As far as I know the proper way is to create resource descriptors using BuildResourceDescriptorHob and then allocate reserved areas using BuildMemoryAllocationHob. This way I don't have any overlapping descriptors - I just allocated some memory very early.
I ran many tests and it looks like all calls to BuildMemoryAllocationHob get ignored if my dram hobs look like this: 0x00000000 - 0x40000000 If I split this range into two Hob's like this everything seems to work just fine: 0x00000000 - 0x20000000 0x20000000 - 0x20000000 I took a look at other platforms like Juno and they add big dram Hob's (2GB and 6GB) too so why is this a problem? Thanks Michael On Wed, Dec 14, 2016 at 11:21 AM, Ard Biesheuvel <ard.biesheu...@linaro.org> wrote: > On 14 December 2016 at 10:02, Michael Zimmermann > <sigmaepsilo...@gmail.com> wrote: >> I tried both BuildResourceDescriptorHob and BuildMemoryAllocationHob >> but apparently they don't have any effect. >> When I look at the output of the shell's memmap command there aren't >> any reserved/unavailable pages. >> >> Furthermore, when using AllocatePages with one of the physical >> addresses which I've reserved it succeeds which means that it's not >> just a problem of how the memmap command works. >> >> Am I doing something wrong or is this a bug? >> > > I think you need to ensure that they don't overlap existing resource > descriptors: if you declare a region as reserved, you should not > declare it as memory first _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel