0

I am wondering if it is possible to allocate the memory buffer whose "physical address" is beyond 4GB in efi application ?

Ex. There is 6GB DRAM installed on PC and efi application allocates 4KB buffer and its physical memory address is 0x100000000(=4GB)

Is it OK ?

liaoo
  • 193
  • 2
  • 15

1 Answers1

0

On a 32-bit platform this would not be possible, even if address extension technology permits more than 4GB to be installed. This is because of the requirement that all RAM is mapped 1:1 physical:virtual address.

On a 64-bit platform this should work just fine, as long as no silly platform-specific firmware bugs prevent it.

Some early x64 UEFI "bioses" forgot to actually map RAM >4GB - causing access violation errors, but on anything that was actually ever properly verified in anything other than BIOS compatibility mode (CSM), this will work fine.

unixsmurf
  • 5,852
  • 1
  • 33
  • 40
  • Can I say that "a 64-bit platform" means (64-bit CPU) + (>4GB DRAM installed) + (64-bit efi shell/application) ? (I just want to know the requirements...Thx) – liaoo May 12 '14 at 02:34
  • Well, I would consider any platform executing UEFI in 64-bit mode to be a 64-bit platform. Of course, if it doesn't have memory above 4GB it would be difficult to allocate memory above 4GB :) – unixsmurf May 13 '14 at 22:14
  • Is there any function call for this purpose(allocate memory and return the physical address above 4GB) ? I will be grateful for any help you can provide... – liaoo May 14 '14 at 01:33
  • Well, you can use the AllocateAddress flag to AllocatePages(), which lets you request a particular address to allocate. – unixsmurf May 14 '14 at 06:55