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 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel