summaryrefslogtreecommitdiff
path: root/EdkUnixPkg/Library/EdkGenericBdsLib/Ipf
diff options
context:
space:
mode:
authortgingold <tgingold@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-06 14:59:06 +0000
committertgingold <tgingold@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-06 14:59:06 +0000
commitc9093a06e72ef16d2f3bd7ce0a2b9a172e9d048c (patch)
tree02dfc93be892697bf02f040b6c8429cecc8370ce /EdkUnixPkg/Library/EdkGenericBdsLib/Ipf
parent8ba7afaf2e9c682a5d17760e6dd5463b3a2b2d67 (diff)
downloadedk2-platforms-c9093a06e72ef16d2f3bd7ce0a2b9a172e9d048c.tar.xz
Unix version of EFI emulator
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2182 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkUnixPkg/Library/EdkGenericBdsLib/Ipf')
-rw-r--r--EdkUnixPkg/Library/EdkGenericBdsLib/Ipf/ShadowRom.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/EdkUnixPkg/Library/EdkGenericBdsLib/Ipf/ShadowRom.c b/EdkUnixPkg/Library/EdkGenericBdsLib/Ipf/ShadowRom.c
new file mode 100644
index 0000000000..44a643d9b8
--- /dev/null
+++ b/EdkUnixPkg/Library/EdkGenericBdsLib/Ipf/ShadowRom.c
@@ -0,0 +1,53 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ ShadowRom.c
+
+Abstract:
+
+ Shadow all option rom
+
+Revision History
+
+--*/
+
+#include "Tiano.h"
+#include "EfiDriverLib.h"
+
+#include EFI_PROTOCOL_DEFINITION (LegacyBios)
+
+UINT8 mShadowRomFlag = 0;
+
+VOID
+ShadowAllOptionRom()
+{
+ EFI_STATUS Status;
+ EFI_LEGACY_BIOS_PROTOCOL *LegacyBios;
+ //
+ // Rom shadow only do once.
+ //
+ if (mShadowRomFlag == 0) {
+ Status = gBS->LocateProtocol (
+ &gEfiLegacyBiosProtocolGuid,
+ NULL,
+ &LegacyBios
+ );
+ if (!EFI_ERROR (Status)) {
+ LegacyBios->PrepareToBootEfi (LegacyBios, NULL, NULL);
+ }
+
+ mShadowRomFlag = 1;
+ }
+
+ return ;
+}