]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Library/GenericBdsLib/Ipf/ShadowRom.c
Clean up Device Manager module in BdsDxe.
[mirror_edk2.git] / MdeModulePkg / Library / GenericBdsLib / Ipf / ShadowRom.c
CommitLineData
897f0eee 1/** @file\r
2 Shadow all option rom\r
3\r
4Copyright (c) 2004 - 2008, Intel Corporation. <BR>\r
5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15//@MT:#include "Tiano.h"\r
16//@MT:#include "EfiDriverLib.h"\r
17\r
18//@MT:#include EFI_PROTOCOL_DEFINITION (LegacyBios)\r
19\r
20#include "InternalBdsLib.h"\r
21\r
22UINT8 mShadowRomFlag = 0;\r
23\r
24VOID\r
78f64f28 25EFIAPI\r
897f0eee 26ShadowAllOptionRom()\r
27{\r
28 EFI_STATUS Status;\r
29 EFI_LEGACY_BIOS_PROTOCOL *LegacyBios;\r
30 //\r
31 // Rom shadow only do once.\r
32 //\r
33 if (mShadowRomFlag == 0) {\r
34 Status = gBS->LocateProtocol (\r
35 &gEfiLegacyBiosProtocolGuid,\r
36 NULL,\r
37 (VOID **) &LegacyBios\r
38 );\r
39 if (!EFI_ERROR (Status)) {\r
40 LegacyBios->PrepareToBootEfi (LegacyBios, NULL, NULL);\r
41 }\r
42\r
43 mShadowRomFlag = 1;\r
44 }\r
45\r
46 return ;\r
47}\r