2 This driver effectuates OVMF's platform configuration settings and exposes
5 Copyright (C) 2014, Red Hat, Inc.
6 Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
8 This program and the accompanying materials are licensed and made available
9 under the terms and conditions of the BSD License which accompanies this
10 distribution. The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
14 WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #include <Library/DebugLib.h>
18 #include <Library/UefiBootServicesTableLib.h>
20 #include "PlatformConfig.h"
23 Load and execute the platform configuration.
25 @retval EFI_SUCCESS Configuration loaded and executed.
26 @return Status codes from PlatformConfigLoad().
31 ExecutePlatformConfig (
36 PLATFORM_CONFIG PlatformConfig
;
37 UINT64 OptionalElements
;
39 Status
= PlatformConfigLoad (&PlatformConfig
, &OptionalElements
);
40 if (EFI_ERROR (Status
)) {
41 DEBUG (((Status
== EFI_NOT_FOUND
) ? EFI_D_VERBOSE
: EFI_D_ERROR
,
42 "%a: failed to load platform config: %r\n", __FUNCTION__
, Status
));
46 if (OptionalElements
& PLATFORM_CONFIG_F_GRAPHICS_RESOLUTION
) {
48 // Pass the preferred resolution to GraphicsConsoleDxe via dynamic PCDs.
50 PcdSet32 (PcdVideoHorizontalResolution
,
51 PlatformConfig
.HorizontalResolution
);
52 PcdSet32 (PcdVideoVerticalResolution
,
53 PlatformConfig
.VerticalResolution
);
61 Entry point for this driver.
63 @param[in] ImageHandle Image handle of this driver.
64 @param[in] SystemTable Pointer to SystemTable.
66 @retval EFI_SUCESS Driver has loaded successfully.
72 IN EFI_HANDLE ImageHandle
,
73 IN EFI_SYSTEM_TABLE
*SystemTable
76 ExecutePlatformConfig ();
83 @param[in] ImageHandle Handle that identifies the image to evict.
85 @retval EFI_SUCCESS The image has been unloaded.
90 IN EFI_HANDLE ImageHandle