* Creating of a memory hole in System memory
@ 2017-05-10 18:08 Vladimir Olovyannikov
0 siblings, 0 replies; only message in thread
From: Vladimir Olovyannikov @ 2017-05-10 18:08 UTC (permalink / raw)
To: edk2-devel
Hello,
I need to reserve an area in the System memory, which should be
write-protected, so that neither UEFI nor Linux could write anything into
it.
If it matters, the platform is ARMv8 64-bit.
I have DDR RAM starting from 0x80000000 with size 0x80000000, and need to
carve out an area of 0x100000 at address 0x8f000000 which UEFI should not
touch.
What is the proper way of doing that? I tried creating of a reserved memory
HOB using this:
BuildResourceDescriptorHob (
MemType,
ResourceAttributes,
Address,
MemSize);
Where ResourceAttributes are
EFI_RESOURCE_ATTRIBUTE_PRESENT | \
EFI_RESOURCE_ATTRIBUTE_INITIALIZED | \
EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE | \
EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTABLE | \
EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED | \
EFI_RESOURCE_ATTRIBUTE_TESTED
Before that, I declared System memory 0x80000000 with size 0x80000000 with
DDR_ATTRIBUTES_CACHED for ARM Virtual memory map.
MemoryInitPei (ArmPlatformPkg) builds a Memory HOB for region 0x80000000,
with size 0x80000000.
Eventually in the DxeCore in CoreInitializeGcdService() I run into an
ASSERT:
ASSERT [DxeCore] /uefi/MdeModulePkg/Core/Dxe/Gcd/Gcd.c(2467):
(Descriptor.GcdMemoryType == EfiGcdMemoryTypeSystemMemory) ||
(Descriptor.GcdMemoryType == EfiGcdMemoryTypeMoreReliable)
ASSERT ((Descriptor.GcdMemoryType == EfiGcdMemoryTypeSystemMemory) ||
(Descriptor.GcdMemoryType == EfiGcdMemoryTypeMoreReliable));
with GcdMemoryType EfiGcdMemoryTypeNonExistent for Descriptor (BaseAddress:
0x8f100000, length 0x7f0f00000).
Please help me to figure out what I am doing wrong.
Thank you,
Vladimir
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-05-10 18:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-10 18:08 Creating of a memory hole in System memory Vladimir Olovyannikov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox