OVMF support for QEMU system firmware flash device\r
\r
Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>\r
- This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
+\r
+ This program and the accompanying materials are licensed and made available\r
+ under the terms and conditions of the BSD License which accompanies this\r
+ distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
\r
**/\r
\r
-#include "PiDxe.h"\r
-#include <Library/DebugLib.h>\r
#include <Library/BaseMemoryLib.h>\r
+#include <Library/DebugLib.h>\r
#include <Library/PcdLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/UefiRuntimeLib.h>\r
-#include <Guid/EventGroup.h>\r
\r
#include "QemuFlash.h"\r
\r
#define CLEARED_ARRAY_STATUS 0x00\r
\r
\r
-STATIC UINT8 *mFlashBase = NULL;\r
+UINT8 *mFlashBase;\r
+\r
STATIC UINTN mFdBlockSize = 0;\r
STATIC UINTN mFdBlockCount = 0;\r
\r
-\r
-VOID\r
-QemuFlashConvertPointers (\r
- VOID\r
- )\r
-{\r
- EfiConvertPointer (0x0, (VOID **) &mFlashBase);\r
-}\r
-\r
-\r
STATIC\r
volatile UINT8*\r
QemuFlashPtr (\r
mFdBlockCount = PcdGet32 (PcdOvmfFirmwareFdSize) / mFdBlockSize;\r
\r
if (!QemuFlashDetected ()) {\r
+ ASSERT (!FeaturePcdGet (PcdSmmSmramRequire));\r
return EFI_WRITE_PROTECTED;\r
}\r
\r