ArmPlatformPkg/NorFlashDxe: Fix coding mistakes that would prevent Runtime mode

- No allocation during Runtime mode (post ExitBootServices())
- Allocate all the persistent data into runtime space
- Do not access BootServices API during Runtime mode

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15437 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Olivier Martin
2014-04-08 18:02:32 +00:00
committed by oliviermartin
parent 000f80f77b
commit 2dff0c1ab2
4 changed files with 54 additions and 50 deletions

View File

@@ -1,6 +1,6 @@
/** @file NorFlashDxe.h
Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>
Copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -26,6 +26,7 @@
#include <Library/IoLib.h>
#include <Library/NorFlashPlatformLib.h>
#include <Library/UefiLib.h>
#include <Library/UefiRuntimeLib.h>
#define NOR_FLASH_ERASE_RETRY 10
@@ -141,6 +142,7 @@ struct _NOR_FLASH_INSTANCE {
BOOLEAN SupportFvb;
EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL FvbProtocol;
VOID* FvbBuffer;
NOR_FLASH_DEVICE_PATH DevicePath;
};