On 03/11/20 13:00, Yao, Jiewen wrote: > Great question on ACPIReclaim! > Yes, it is the confusing part. > > 1) Per ACPI specification, ACPI reclaim is the memory to hold the ACPI table. > It *may* be reclaimed by OS as OS memory, after OS copied the ACPI table to > its own local space. > As such, we need make sure it is treated as *OS usable* memory. So we do not > allow SMM driver to touch it. > > 2) Per our experience, ACPI reclaim *may* be treated as reserved memory by > some OS. > OS just does not use it. > As such, we need group them in the BIN to not leave too many holes for OS. So > we need track it in MemoryTypeInfo. > > > You may refer to > https://github.com/tianocore/edk2-platforms/blob/master/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c > Below is our platform template. > GLOBAL_REMOVE_IF_UNREFERENCED EFI_MEMORY_TYPE_INFORMATION > mDefaultMemoryTypeInformation[] = { > { EfiACPIReclaimMemory, FixedPcdGet32 > (PcdPlatformEfiAcpiReclaimMemorySize) }, // ASL > { EfiACPIMemoryNVS, FixedPcdGet32 (PcdPlatformEfiAcpiNvsMemorySize) > }, // ACPI NVS (including S3 related) > { EfiReservedMemoryType, FixedPcdGet32 (PcdPlatformEfiReservedMemorySize) > }, // BIOS Reserved (including S3 related) > { EfiRuntimeServicesData, FixedPcdGet32 (PcdPlatformEfiRtDataMemorySize) }, > // Runtime Service Data > { EfiRuntimeServicesCode, FixedPcdGet32 (PcdPlatformEfiRtCodeMemorySize) }, > // Runtime Service Code > { EfiMaxMemoryType, 0 } > };
Very tricky indeed. Thanks for the explanation! Now I know what to do. Cheers! Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#55751): https://edk2.groups.io/g/devel/message/55751 Mute This Topic: https://groups.io/mt/71853609/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-