mirror of https://github.com/acidanthera/audk.git
CorebootModulePkg: Add a library to parse platform specific info.
Update CbSupportPei to consume the new library, so platform could provide platform specific library instance to parse platform specif info. And add a NULL library instance to pass build. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: gdong1 <guo.dong@intel.com> Reviewed-by: Maurice Ma <maurice.ma@intel.com>
This commit is contained in:
parent
3f0edb77f6
commit
2f20bfd98e
|
@ -387,6 +387,15 @@ CbPeiEntryPoint (
|
||||||
DEBUG ((EFI_D_ERROR, "Create frame buffer info guid hob\n"));
|
DEBUG ((EFI_D_ERROR, "Create frame buffer info guid hob\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Parse platform specific information from coreboot.
|
||||||
|
//
|
||||||
|
Status = CbParsePlatformInfo ();
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
DEBUG ((EFI_D_ERROR, "Error when parsing platform info, Status = %r\n", Status));
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Mask off all legacy 8259 interrupt sources
|
// Mask off all legacy 8259 interrupt sources
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
The header file of Coreboot Support PEIM.
|
The header file of Coreboot Support PEIM.
|
||||||
|
|
||||||
Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -28,6 +28,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#include <Library/CbParseLib.h>
|
#include <Library/CbParseLib.h>
|
||||||
#include <Library/MtrrLib.h>
|
#include <Library/MtrrLib.h>
|
||||||
#include <Library/IoLib.h>
|
#include <Library/IoLib.h>
|
||||||
|
#include <Library/CbPlatformSupportLib.h>
|
||||||
|
|
||||||
#include <Guid/SmramMemoryReserve.h>
|
#include <Guid/SmramMemoryReserve.h>
|
||||||
#include <Guid/MemoryTypeInformation.h>
|
#include <Guid/MemoryTypeInformation.h>
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
CbParseLib
|
CbParseLib
|
||||||
MtrrLib
|
MtrrLib
|
||||||
IoLib
|
IoLib
|
||||||
|
CbPlatformSupportLib
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gEfiSmmPeiSmramMemoryReserveGuid
|
gEfiSmmPeiSmramMemoryReserveGuid
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
/** @file
|
||||||
|
Coreboot Platform Support library. Platform can provide an implementation of this
|
||||||
|
library class to provide hooks that may be required for some type of
|
||||||
|
platform features.
|
||||||
|
|
||||||
|
Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
|
||||||
|
This program and the accompanying materials are licensed and made available under
|
||||||
|
the terms and conditions of the BSD License that 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.
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
#ifndef __CB_PLATFORM_SUPPORT_LIB__
|
||||||
|
#define __CB_PLATFORM_SUPPORT_LIB__
|
||||||
|
|
||||||
|
/**
|
||||||
|
Parse platform specific information from coreboot.
|
||||||
|
|
||||||
|
@retval RETURN_SUCCESS The platform specific coreboot support succeeded.
|
||||||
|
@retval RETURN_DEVICE_ERROR The platform specific coreboot support could not be completed.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
CbParsePlatformInfo (
|
||||||
|
VOID
|
||||||
|
);
|
||||||
|
|
||||||
|
#endif // __CB_PLATFORM_SUPPORT_LIB__
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
/** @file
|
||||||
|
Include all platform specific features which can be customized by IBV/OEM.
|
||||||
|
|
||||||
|
Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
|
||||||
|
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.
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
#include <Uefi.h>
|
||||||
|
#include <Library/BaseLib.h>
|
||||||
|
#include <Library/UefiLib.h>
|
||||||
|
#include <Library/CbPlatformSupportLib.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
Parse platform specific information from coreboot.
|
||||||
|
|
||||||
|
@retval RETURN_SUCCESS The platform specific coreboot support succeeded.
|
||||||
|
@retval RETURN_DEVICE_ERROR The platform specific coreboot support could not be completed.
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
|
CbParsePlatformInfo (
|
||||||
|
VOID
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
## @file
|
||||||
|
# Include all platform specific features which can be customized by IBV/OEM.
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
##
|
||||||
|
|
||||||
|
[Defines]
|
||||||
|
INF_VERSION = 0x00010005
|
||||||
|
BASE_NAME = CbPlatformSupportLib
|
||||||
|
MODULE_UNI_FILE = CbPlatformSupportLibNull.uni
|
||||||
|
FILE_GUID = B42AA265-00CA-4d4b-AC14-DBD5268E1BC7
|
||||||
|
MODULE_TYPE = BASE
|
||||||
|
VERSION_STRING = 1.0
|
||||||
|
LIBRARY_CLASS = CbPlatformSupportLib
|
||||||
|
|
||||||
|
#
|
||||||
|
# The following information is for reference only and not required by the build tools.
|
||||||
|
#
|
||||||
|
# VALID_ARCHITECTURES = IA32 X64 EBC
|
||||||
|
#
|
||||||
|
|
||||||
|
[Sources]
|
||||||
|
CbPlatformSupportLibNull.c
|
||||||
|
|
||||||
|
[Packages]
|
||||||
|
MdePkg/MdePkg.dec
|
||||||
|
CorebootModulePkg/CorebootModulePkg.dec
|
|
@ -0,0 +1,19 @@
|
||||||
|
// /** @file
|
||||||
|
// NULL implementation for CbPlatformSupportLib library class interfaces.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
|
||||||
|
//
|
||||||
|
// 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.
|
||||||
|
//
|
||||||
|
// **/
|
||||||
|
|
||||||
|
|
||||||
|
#string STR_MODULE_ABSTRACT #language en-US "NULL implementation for CbPlatformSupportLib library class interfaces"
|
||||||
|
|
||||||
|
#string STR_MODULE_DESCRIPTION #language en-US "NULL implementation for CbPlatformSupportLib library class interfaces."
|
||||||
|
|
|
@ -174,6 +174,7 @@
|
||||||
SerialPortLib|CorebootModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
|
SerialPortLib|CorebootModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
|
||||||
PlatformHookLib|CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
|
PlatformHookLib|CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
|
||||||
PlatformBootManagerLib|CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
|
PlatformBootManagerLib|CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
|
||||||
|
CbPlatformSupportLib|CorebootModulePkg/Library/CbPlatformSupportLibNull/CbPlatformSupportLibNull.inf
|
||||||
|
|
||||||
#
|
#
|
||||||
# Misc
|
# Misc
|
||||||
|
|
|
@ -176,6 +176,7 @@
|
||||||
SerialPortLib|CorebootModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
|
SerialPortLib|CorebootModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
|
||||||
PlatformHookLib|CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
|
PlatformHookLib|CorebootPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
|
||||||
PlatformBootManagerLib|CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
|
PlatformBootManagerLib|CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
|
||||||
|
CbPlatformSupportLib|CorebootModulePkg/Library/CbPlatformSupportLibNull/CbPlatformSupportLibNull.inf
|
||||||
|
|
||||||
#
|
#
|
||||||
# Misc
|
# Misc
|
||||||
|
|
Loading…
Reference in New Issue