On 13 January 2015 at 15:13, Ard Biesheuvel <[email protected]> wrote:
> The function CoreTerminateMemoryMap() performs some final sanity checks
> on the runtime regions in the memory map before allowing ExitBootServices()
> to complete. Unfortunately, it does so by testing the EFI_MEMORY_RUNTIME bit
> in the Attribute field, which is never set anywhere in the code.
>
> Fix it by setting the bit where appropriate in CoreAddRange().
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel <[email protected]>
> ---
> MdeModulePkg/Core/Dxe/Mem/Page.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c
> b/MdeModulePkg/Core/Dxe/Mem/Page.c
> index fa84e2612526..3abf934933d8 100644
> --- a/MdeModulePkg/Core/Dxe/Mem/Page.c
> +++ b/MdeModulePkg/Core/Dxe/Mem/Page.c
> @@ -240,6 +240,10 @@ CoreAddRange (
> }
> }
>
> + if (mMemoryTypeStatistics[Type].Runtime) {
> + Attribute |= EFI_MEMORY_RUNTIME;
> + }
> +
Replying to self: also need to clear the bit in an else { } branch here.
--
Ard.
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel