hybrid-graphics-linux team mailing list archive
-
hybrid-graphics-linux team
-
Mailing list archive
-
Message #00121
Re: RadeonHD+IntelGMA switchable
On Mon, Jul 19, 2010 at 6:03 AM, Matthias Fulz <olz1983@xxxxxxxxxxxxxx> wrote:
> Hi together,
>
> I'm new to this Mailing List, because I found following very interesting
> thread:
>
> https://lists.launchpad.net/hybrid-graphics-linux/msg00072.html
>
> The (for me) very interesting part is following:
>
> On Wed, Jul 14, 2010 at 4:42 AM, Ruslan N. Marchenko <ruff@xxxxxxxxxxx>
> wrote:
>> On Tue, 13 Jul 2010, Dave Airlie wrote:
>>>
>>> As for fglrx you might be able to extract the BIOS and shove it into
>>> 0xc000 location where fglrx will most likely look for it, though I'm
>>> not sure how best to do that.
>>>
>>
>
> I wanted to try, to test the "overwriting" of the RAM at 0xc0000 with
> the extracted bios from the ati card.
>
> But it doesn't matter what I try:
>
> ioremap
> phys_to_virt
>
> This two methods are all I've found so far (I'm new to Kernel Coding).
> I'm able to retrieve the right Address and can read the Intel Bios from
> this address, but I can't overwrite it with the ati bios.
>
> Could someone perhaps give me a hint or (hopefully not) say that it is
> impossible to overwrite this address....
>
> In my tests, I tried to overwrite the address in the function
> "radeon_read_atrm_bios" with following code (example with ioremap, as
> mentioned above I also tried it with just phys_to_virt call and memcpy,
> but with the same effect):
>
> bool radeon_inject_bios(struct radeon_device *rdev)
> {
> char *inject_bios;
> int size = 64 * 1024;
> resource_size_t inject_base = 0xc0000;
>
> inject_bios = NULL;
>
> inject_bios = phys_to_virt(inject_base);
>
> inject_bios = ioremap(inject_base, size);
> if(!inject_bios) {
> printk (KERN_WARNING "RADEON INFO: unable to ioremap at: 0x%08X\n",
> (unsigned int) inject_base);
> return false;
> }
> memcpy_toio(inject_bios, rdev->bios, size);
> iounmap(inject_bios);
> return true;
> }
>
>
> P.S.: I read out the bios via just "dd" from "/dev/mem" and allways
> recieve the Intel Bios.
Did you try dd'ing it back from userspace? using the ati rom as the image?
It might be somehow set to read only at 0xc0000, though I'm not sure
how that is achieved,
Dave.
>
> Best Regards
>
> Matthias
>
> _______________________________________________
> Mailing list: https://launchpad.net/~hybrid-graphics-linux
> Post to : hybrid-graphics-linux@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~hybrid-graphics-linux
> More help : https://help.launchpad.net/ListHelp
>
Follow ups
References