On 08/28/14 15:11, Ard Biesheuvel wrote:
> On 28 August 2014 14:50, Ard Biesheuvel <[email protected]> wrote:

>> I don't think it is necessary for this module to be that rigid.
>> In particular, now that we have PcdDeviceTreeBaseAddress, we can
>> define it in the DSC, and in QEMU's case, its default value will be
>> 0x4000_0000.
>> Then, if you are using a slightly different flavor of emulation, it
>> would be perfectly legal to define this to point elsewhere (as long as
>> it points to where you are in fact putting the DTB). If this address
>> is not covered by system DRAM, that is perfectly fine. In fact, the
>> asserts should only fire if we detect here that
>> PcdDeviceTreeBaseAddress is in DRAM, and PlatformPeim() should only
>> perform the relocation under that condition as well.
>>
> 
> Actually, for the latter it doesn't make a lot of sense to do that, as
> you would just use the plain one in that case.
> 
> I am in two minds about this: on the one hand, I don't want to
> introduce rigidity that we need to remove again once we start reusing
> these modules for Xen, for instance.
> On the other hand, I don't think there is any other location of which
> we can guarantee that it will remain untouched.

Predictably, I agree with the "on the other hand" statement.

Remember that we discussed options that would have
- moved up the DTB from 1G to 1G+16M, or
- moved it out of DRAM completely (to sth like fw_cfg, MMIO).

We discussed the 1G+16M option for reasons that are no longer relevant
(we were still considering an in-place memalloc HOB, while not bothering
the guest kernel with it). But still, placing the DTB anywhere else than
the bottom of system RAM might require more intrusive changes to
InitializeMemory(), which is (thus far) shared by all ARM platforms.

We already need quite elaborate ASSERT()s in our
ArmPlatformInitializeSystemMemory() version, so that InitializeMemory()
is forced to the Right Path (TM).

The other option, ie. moving the DTB from DRAM to MMIO would have been
the easiest for edk2 all along, but it's new hardware for QEMU, and
Peter doesn't like that.

So, let's just stick with the bottom of the system DRAM for now. And
I'll trust you to heed or ignore my request for an explicit assert :)

Thanks,
Laszlo

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to