mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-31 01:24:12 +02:00
MdeModulePkg/Core/Dxe: Integrate CPU Architectural producer
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3223 In the current design, memory protection is not available till CpuDxe is loaded. To resolve this, introduce CpuArchLib to move the CPU Architectural initialization to DxeCore. Cc: Eric Dong <eric.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Vitaly Cheptsov <vit9696@protonmail.com> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
This commit is contained in:
parent
91f8b375ca
commit
c810b25601
@ -220,6 +220,7 @@
|
||||
DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
|
||||
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
|
||||
PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf
|
||||
CpuArchLib|UefiCpuPkg/Library/CpuArchLib/CpuArchLibNull.inf
|
||||
|
||||
[LibraryClasses.common.DXE_DRIVER]
|
||||
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
|
||||
|
@ -374,6 +374,7 @@
|
||||
<LibraryClasses>
|
||||
NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
|
||||
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
|
||||
DxeServicesTableLib|MdeModulePkg/Library/DxeCoreDxeServicesTableLib/DxeCoreDxeServicesTableLib.inf
|
||||
UefiBootServicesTableLib|MdeModulePkg/Library/DxeCoreUefiBootServicesTableLib/DxeCoreUefiBootServicesTableLib.inf
|
||||
UefiRuntimeServicesTableLib|MdeModulePkg/Library/DxeCoreUefiRuntimeServicesTableLib/DxeCoreUefiRuntimeServicesTableLib.inf
|
||||
}
|
||||
|
@ -84,6 +84,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#include <Library/DxeServicesLib.h>
|
||||
#include <Library/DebugAgentLib.h>
|
||||
#include <Library/CpuExceptionHandlerLib.h>
|
||||
#include <Library/CpuArchLib.h>
|
||||
|
||||
//
|
||||
// attributes for reserved memory before it is promoted to system memory
|
||||
|
@ -71,6 +71,7 @@
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
MdeModulePkg/MdeModulePkg.dec
|
||||
UefiCpuPkg/UefiCpuPkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
BaseMemoryLib
|
||||
@ -93,6 +94,7 @@
|
||||
DebugAgentLib
|
||||
CpuExceptionHandlerLib
|
||||
PcdLib
|
||||
CpuArchLib
|
||||
|
||||
[Guids]
|
||||
gEfiEventMemoryMapChangeGuid ## PRODUCES ## Event
|
||||
|
@ -286,6 +286,12 @@ DxeMain (
|
||||
|
||||
gST->RuntimeServices = gRT;
|
||||
|
||||
//
|
||||
// Install the DXE Services Table into the EFI System Tables's Configuration Table
|
||||
//
|
||||
Status = CoreInstallConfigurationTable (&gEfiDxeServicesTableGuid, gDS);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
//
|
||||
// Start the Image Services.
|
||||
//
|
||||
@ -326,12 +332,6 @@ DxeMain (
|
||||
//
|
||||
UefiImageLoaderRelocateImageExtraAction (&ImageContext);
|
||||
|
||||
//
|
||||
// Install the DXE Services Table into the EFI System Tables's Configuration Table
|
||||
//
|
||||
Status = CoreInstallConfigurationTable (&gEfiDxeServicesTableGuid, gDS);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
//
|
||||
// Install the HOB List into the EFI System Tables's Configuration Table
|
||||
//
|
||||
@ -521,6 +521,16 @@ DxeMain (
|
||||
//
|
||||
CoreDispatcher ();
|
||||
|
||||
//
|
||||
// Initialize CPU Architectural Protocol
|
||||
//
|
||||
InitializeCpu ();
|
||||
|
||||
//
|
||||
// Invoke the DXE Dispatcher
|
||||
//
|
||||
CoreDispatcher ();
|
||||
|
||||
//
|
||||
// Display Architectural protocols that were not loaded if this is DEBUG build
|
||||
//
|
||||
|
@ -128,6 +128,19 @@
|
||||
DxeServicesTableLib|MdeModulePkg/Library/DxeCoreDxeServicesTableLib/DxeCoreDxeServicesTableLib.inf
|
||||
UefiBootServicesTableLib|MdeModulePkg/Library/DxeCoreUefiBootServicesTableLib/DxeCoreUefiBootServicesTableLib.inf
|
||||
UefiRuntimeServicesTableLib|MdeModulePkg/Library/DxeCoreUefiRuntimeServicesTableLib/DxeCoreUefiRuntimeServicesTableLib.inf
|
||||
CpuArchLib|UefiCpuPkg/Library/CpuArchLib/CpuArchLib.inf
|
||||
MtrrLib|UefiCpuPkg/Library/MtrrLib/MtrrLib.inf
|
||||
LocalApicLib|UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
|
||||
UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
|
||||
MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
|
||||
MicrocodeLib|UefiCpuPkg/Library/MicrocodeLib/MicrocodeLib.inf
|
||||
MemEncryptSevLib|OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLib.inf
|
||||
|
||||
[LibraryClasses.IA32.DXE_CORE]
|
||||
CcExitLib|UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
|
||||
|
||||
[LibraryClasses.X64.DXE_CORE]
|
||||
CcExitLib|OvmfPkg/Library/CcExitLib/CcExitLib.inf
|
||||
|
||||
[LibraryClasses.common.DXE_DRIVER]
|
||||
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
|
||||
|
@ -330,6 +330,8 @@
|
||||
!endif
|
||||
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
|
||||
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
||||
CpuArchLib|UefiCpuPkg/Library/CpuArchLib/CpuArchLib.inf
|
||||
MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
|
||||
|
||||
[LibraryClasses.common.DXE_RUNTIME_DRIVER]
|
||||
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
||||
@ -737,6 +739,7 @@
|
||||
<LibraryClasses>
|
||||
NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
|
||||
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
|
||||
DxeServicesTableLib|MdeModulePkg/Library/DxeCoreDxeServicesTableLib/DxeCoreDxeServicesTableLib.inf
|
||||
UefiBootServicesTableLib|MdeModulePkg/Library/DxeCoreUefiBootServicesTableLib/DxeCoreUefiBootServicesTableLib.inf
|
||||
UefiRuntimeServicesTableLib|MdeModulePkg/Library/DxeCoreUefiRuntimeServicesTableLib/DxeCoreUefiRuntimeServicesTableLib.inf
|
||||
}
|
||||
@ -760,7 +763,6 @@
|
||||
|
||||
MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
|
||||
UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
|
||||
UefiCpuPkg/CpuDxe/CpuDxe.inf
|
||||
!ifdef $(CSM_ENABLE)
|
||||
OvmfPkg/8259InterruptControllerDxe/8259.inf
|
||||
OvmfPkg/8254TimerDxe/8254Timer.inf
|
||||
|
@ -218,7 +218,6 @@ INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
|
||||
INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
|
||||
INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
|
||||
INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
|
||||
INF UefiCpuPkg/CpuDxe/CpuDxe.inf
|
||||
!ifdef $(CSM_ENABLE)
|
||||
INF OvmfPkg/8259InterruptControllerDxe/8259.inf
|
||||
INF OvmfPkg/8254TimerDxe/8254Timer.inf
|
||||
|
@ -335,6 +335,8 @@
|
||||
!endif
|
||||
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
|
||||
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
||||
CpuArchLib|UefiCpuPkg/Library/CpuArchLib/CpuArchLib.inf
|
||||
MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
|
||||
|
||||
[LibraryClasses.common.DXE_RUNTIME_DRIVER]
|
||||
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
||||
@ -753,6 +755,7 @@
|
||||
<LibraryClasses>
|
||||
NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
|
||||
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
|
||||
DxeServicesTableLib|MdeModulePkg/Library/DxeCoreDxeServicesTableLib/DxeCoreDxeServicesTableLib.inf
|
||||
UefiBootServicesTableLib|MdeModulePkg/Library/DxeCoreUefiBootServicesTableLib/DxeCoreUefiBootServicesTableLib.inf
|
||||
UefiRuntimeServicesTableLib|MdeModulePkg/Library/DxeCoreUefiRuntimeServicesTableLib/DxeCoreUefiRuntimeServicesTableLib.inf
|
||||
}
|
||||
@ -776,7 +779,6 @@
|
||||
|
||||
MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
|
||||
UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
|
||||
UefiCpuPkg/CpuDxe/CpuDxe.inf
|
||||
!ifdef $(CSM_ENABLE)
|
||||
OvmfPkg/8259InterruptControllerDxe/8259.inf
|
||||
OvmfPkg/8254TimerDxe/8254Timer.inf
|
||||
|
@ -219,7 +219,6 @@ INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
|
||||
INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
|
||||
INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
|
||||
INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
|
||||
INF UefiCpuPkg/CpuDxe/CpuDxe.inf
|
||||
!ifdef $(CSM_ENABLE)
|
||||
INF OvmfPkg/8259InterruptControllerDxe/8259.inf
|
||||
INF OvmfPkg/8254TimerDxe/8254Timer.inf
|
||||
|
@ -355,6 +355,8 @@
|
||||
!endif
|
||||
CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
|
||||
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
||||
CpuArchLib|UefiCpuPkg/Library/CpuArchLib/CpuArchLib.inf
|
||||
MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
|
||||
|
||||
[LibraryClasses.common.DXE_RUNTIME_DRIVER]
|
||||
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
||||
@ -796,6 +798,7 @@
|
||||
<LibraryClasses>
|
||||
NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
|
||||
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
|
||||
DxeServicesTableLib|MdeModulePkg/Library/DxeCoreDxeServicesTableLib/DxeCoreDxeServicesTableLib.inf
|
||||
UefiBootServicesTableLib|MdeModulePkg/Library/DxeCoreUefiBootServicesTableLib/DxeCoreUefiBootServicesTableLib.inf
|
||||
UefiRuntimeServicesTableLib|MdeModulePkg/Library/DxeCoreUefiRuntimeServicesTableLib/DxeCoreUefiRuntimeServicesTableLib.inf
|
||||
}
|
||||
@ -820,29 +823,6 @@
|
||||
MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
|
||||
UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
|
||||
|
||||
UefiCpuPkg/CpuDxe/CpuDxe.inf {
|
||||
<LibraryClasses>
|
||||
#
|
||||
# Directly use DxeMpInitLib. It depends on DxeMpInitLibMpDepLib which
|
||||
# checks the Protocol of gEfiMpInitLibMpDepProtocolGuid.
|
||||
#
|
||||
MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
|
||||
NULL|OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibMpDepLib.inf
|
||||
}
|
||||
|
||||
UefiCpuPkg/CpuDxe/CpuDxe.inf {
|
||||
<Defines>
|
||||
FILE_GUID = $(UP_CPU_DXE_GUID)
|
||||
|
||||
<LibraryClasses>
|
||||
#
|
||||
# Directly use MpInitLibUp. It depends on DxeMpInitLibUpDepLib which
|
||||
# checks the Protocol of gEfiMpInitLibUpDepProtocolGuid.
|
||||
#
|
||||
MpInitLib|UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.inf
|
||||
NULL|OvmfPkg/Library/MpInitLibDepLib/DxeMpInitLibUpDepLib.inf
|
||||
}
|
||||
|
||||
!ifdef $(CSM_ENABLE)
|
||||
OvmfPkg/8259InterruptControllerDxe/8259.inf
|
||||
OvmfPkg/8254TimerDxe/8254Timer.inf
|
||||
|
@ -242,9 +242,6 @@ INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
|
||||
INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
|
||||
INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
|
||||
|
||||
INF UefiCpuPkg/CpuDxe/CpuDxe.inf
|
||||
INF FILE_GUID = $(UP_CPU_DXE_GUID) UefiCpuPkg/CpuDxe/CpuDxe.inf
|
||||
|
||||
!ifdef $(CSM_ENABLE)
|
||||
INF OvmfPkg/8259InterruptControllerDxe/8259.inf
|
||||
INF OvmfPkg/8254TimerDxe/8254Timer.inf
|
||||
|
@ -1,16 +0,0 @@
|
||||
// /** @file
|
||||
// CPU driver installs CPU Architecture Protocol and CPU MP Protocol.
|
||||
//
|
||||
// CPU driver installs CPU Architecture Protocol and CPU MP Protocol.
|
||||
//
|
||||
// Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
//
|
||||
// **/
|
||||
|
||||
|
||||
#string STR_MODULE_ABSTRACT #language en-US "CPU driver installs CPU Architecture Protocol and CPU MP Protocol."
|
||||
|
||||
#string STR_MODULE_DESCRIPTION #language en-US "CPU driver installs CPU Architecture Protocol and CPU MP Protocol."
|
||||
|
22
UefiCpuPkg/Include/Library/CpuArchLib.h
Normal file
22
UefiCpuPkg/Include/Library/CpuArchLib.h
Normal file
@ -0,0 +1,22 @@
|
||||
/** @file
|
||||
CPU DXE Module to produce CPU ARCH Protocol.
|
||||
Copyright (c) 2008 - 2022, Intel Corporation. All rights reserved.<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
**/
|
||||
|
||||
#ifndef _CPU_ARCH_LIB_H_
|
||||
#define _CPU_ARCH_LIB_H_
|
||||
|
||||
/**
|
||||
Initialize the state information for the CPU Architectural Protocol.
|
||||
|
||||
@retval EFI_SUCCESS Thread can be successfully created
|
||||
@retval EFI_OUT_OF_RESOURCES Can not allocate protocol data structure
|
||||
@retval EFI_DEVICE_ERROR Can not create the thread
|
||||
**/
|
||||
EFI_STATUS
|
||||
InitializeCpu (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif // _CPU_ARCH_LIB_H_
|
@ -1,5 +1,5 @@
|
||||
## @file
|
||||
# CPU driver installs CPU Architecture Protocol and CPU MP protocol.
|
||||
# This library installs CPU Architecture Protocol and CPU MP protocol.
|
||||
#
|
||||
# Copyright (c) 2008 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
|
||||
@ -10,12 +10,12 @@
|
||||
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010005
|
||||
BASE_NAME = CpuDxe
|
||||
MODULE_UNI_FILE = CpuDxe.uni
|
||||
FILE_GUID = 1A1E4886-9517-440e-9FDE-3BE44CEE2136
|
||||
MODULE_TYPE = DXE_DRIVER
|
||||
BASE_NAME = CpuArchLib
|
||||
MODULE_UNI_FILE = CpuArchLib.uni
|
||||
FILE_GUID = EF9CBDF2-BD7C-48F1-9D87-EE83A0269EEE
|
||||
MODULE_TYPE = DXE_CORE
|
||||
VERSION_STRING = 1.0
|
||||
ENTRY_POINT = InitializeCpu
|
||||
LIBRARY_CLASS = CpuArchLib
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
@ -31,7 +31,6 @@
|
||||
MemoryAllocationLib
|
||||
MtrrLib
|
||||
UefiBootServicesTableLib
|
||||
UefiDriverEntryPoint
|
||||
LocalApicLib
|
||||
UefiCpuLib
|
||||
UefiLib
|
||||
@ -40,7 +39,8 @@
|
||||
ReportStatusCodeLib
|
||||
MpInitLib
|
||||
TimerLib
|
||||
|
||||
SerialPortLib
|
||||
|
||||
[Sources]
|
||||
CpuDxe.c
|
||||
CpuDxe.h
|
13
UefiCpuPkg/Library/CpuArchLib/CpuArchLib.uni
Normal file
13
UefiCpuPkg/Library/CpuArchLib/CpuArchLib.uni
Normal file
@ -0,0 +1,13 @@
|
||||
// /** @file
|
||||
// This library installs CPU Architecture Protocol and CPU MP Protocol.
|
||||
//
|
||||
// Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
//
|
||||
// **/
|
||||
|
||||
|
||||
#string STR_MODULE_ABSTRACT #language en-US "This library installs CPU Architecture Protocol and CPU MP Protocol."
|
||||
|
||||
#string STR_MODULE_DESCRIPTION #language en-US "This library installs CPU Architecture Protocol and CPU MP Protocol."
|
24
UefiCpuPkg/Library/CpuArchLib/CpuArchLibNull.inf
Normal file
24
UefiCpuPkg/Library/CpuArchLib/CpuArchLibNull.inf
Normal file
@ -0,0 +1,24 @@
|
||||
## @file
|
||||
# This library provides dummy InitializeCpu() for DxeMain.inf.
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#
|
||||
##
|
||||
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010005
|
||||
BASE_NAME = CpuArchLib
|
||||
FILE_GUID = EF9CBDF2-BD7C-48F1-9D87-EE83A0269EEE
|
||||
MODULE_TYPE = DXE_CORE
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = CpuArchLib
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
MdeModulePkg/MdeModulePkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
BaseLib
|
||||
|
||||
[Sources]
|
||||
CpuDxeNull.c
|
@ -81,7 +81,7 @@ FIXED_MTRR mFixedMtrrTable[] = {
|
||||
},
|
||||
};
|
||||
|
||||
EFI_CPU_ARCH_PROTOCOL gCpu = {
|
||||
EFI_CPU_ARCH_PROTOCOL gCpuImpl = {
|
||||
CpuFlushCpuDataCache,
|
||||
CpuEnableInterrupt,
|
||||
CpuDisableInterrupt,
|
||||
@ -1168,7 +1168,7 @@ FreeMemorySpaceMap:
|
||||
**/
|
||||
VOID
|
||||
AddLocalApicMemorySpace (
|
||||
IN EFI_HANDLE ImageHandle
|
||||
VOID
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
@ -1189,7 +1189,7 @@ AddLocalApicMemorySpace (
|
||||
0,
|
||||
SIZE_4KB,
|
||||
&BaseAddress,
|
||||
ImageHandle,
|
||||
gImageHandle,
|
||||
NULL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
@ -1206,19 +1206,14 @@ AddLocalApicMemorySpace (
|
||||
/**
|
||||
Initialize the state information for the CPU Architectural Protocol.
|
||||
|
||||
@param ImageHandle Image handle this driver.
|
||||
@param SystemTable Pointer to the System Table.
|
||||
|
||||
@retval EFI_SUCCESS Thread can be successfully created
|
||||
@retval EFI_OUT_OF_RESOURCES Cannot allocate protocol data structure
|
||||
@retval EFI_DEVICE_ERROR Cannot create the thread
|
||||
@retval EFI_OUT_OF_RESOURCES Can not allocate protocol data structure
|
||||
@retval EFI_DEVICE_ERROR Can not create the thread
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
InitializeCpu (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
VOID
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
@ -1249,7 +1244,7 @@ InitializeCpu (
|
||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||
&mCpuHandle,
|
||||
&gEfiCpuArchProtocolGuid,
|
||||
&gCpu,
|
||||
&gCpuImpl,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
@ -1262,7 +1257,7 @@ InitializeCpu (
|
||||
//
|
||||
// Add and allocate local APIC memory mapped space
|
||||
//
|
||||
AddLocalApicMemorySpace (ImageHandle);
|
||||
AddLocalApicMemorySpace ();
|
||||
|
||||
//
|
||||
// Setup a callback for idle events
|
@ -9,6 +9,4 @@
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"CPU Architectural and CPU Multi-processor DXE Driver"
|
||||
|
||||
|
||||
"CPU Architectural and CPU Multi-processor DXE library"
|
12
UefiCpuPkg/Library/CpuArchLib/CpuDxeNull.c
Normal file
12
UefiCpuPkg/Library/CpuArchLib/CpuDxeNull.c
Normal file
@ -0,0 +1,12 @@
|
||||
/**
|
||||
Dummy function for DxeMain.inf.
|
||||
|
||||
@retval EFI_SUCCESS Thread can be successfully created
|
||||
**/
|
||||
EFI_STATUS
|
||||
InitializeCpu (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return EFI_SUCCESS;
|
||||
}
|
@ -13,7 +13,7 @@
|
||||
FILE_GUID = B88F7146-9834-4c55-BFAC-481CC0C33736
|
||||
MODULE_TYPE = DXE_DRIVER
|
||||
VERSION_STRING = 1.1
|
||||
LIBRARY_CLASS = MpInitLib|DXE_DRIVER
|
||||
LIBRARY_CLASS = MpInitLib|DXE_DRIVER DXE_CORE
|
||||
|
||||
#
|
||||
# The following information is for reference only and not required by the build tools.
|
||||
|
@ -68,6 +68,7 @@
|
||||
UnitTestPersistenceLib|UnitTestFrameworkPkg/Library/UnitTestPersistenceLibNull/UnitTestPersistenceLibNull.inf
|
||||
UnitTestResultReportLib|UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibDebugLib.inf
|
||||
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
|
||||
CpuArchLib|UefiCpuPkg/Library/CpuArchLib/CpuArchLib.inf
|
||||
|
||||
[LibraryClasses.common.SEC]
|
||||
PlatformSecLib|UefiCpuPkg/Library/PlatformSecLibNull/PlatformSecLibNull.inf
|
||||
@ -128,7 +129,6 @@
|
||||
CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
|
||||
|
||||
[Components.IA32, Components.X64]
|
||||
UefiCpuPkg/CpuDxe/CpuDxe.inf
|
||||
UefiCpuPkg/CpuFeatures/CpuFeaturesPei.inf {
|
||||
<LibraryClasses>
|
||||
NULL|UefiCpuPkg/Library/CpuCommonFeaturesLib/CpuCommonFeaturesLib.inf
|
||||
@ -144,6 +144,8 @@
|
||||
UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
|
||||
UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.inf
|
||||
UefiCpuPkg/Library/BaseXApicX2ApicLib/BaseXApicX2ApicLib.inf
|
||||
UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
|
||||
UefiCpuPkg/Library/CpuArchLib/CpuArchLib.inf
|
||||
UefiCpuPkg/Library/CpuCommonFeaturesLib/CpuCommonFeaturesLib.inf
|
||||
UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf
|
||||
UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf
|
||||
@ -161,7 +163,6 @@
|
||||
UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
|
||||
UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLibStm.inf
|
||||
UefiCpuPkg/Library/SmmCpuFeaturesLib/StandaloneMmCpuFeaturesLib.inf
|
||||
UefiCpuPkg/Library/CcExitLibNull/CcExitLibNull.inf
|
||||
UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationPei.inf
|
||||
UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf
|
||||
UefiCpuPkg/SecCore/SecCore.inf
|
||||
|
@ -324,6 +324,8 @@
|
||||
!if $(PERFORMANCE_MEASUREMENT_ENABLE)
|
||||
PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf
|
||||
!endif
|
||||
CpuArchLib|UefiCpuPkg/Library/CpuArchLib/CpuArchLib.inf
|
||||
MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
|
||||
|
||||
[LibraryClasses.common.DXE_DRIVER]
|
||||
PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
||||
@ -616,6 +618,7 @@
|
||||
SerialPortLib|UefiPayloadPkg/Library/BaseSerialPortLibHob/BaseSerialPortLibHob.inf
|
||||
!endif
|
||||
NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
|
||||
DxeServicesTableLib|MdeModulePkg/Library/DxeCoreDxeServicesTableLib/DxeCoreDxeServicesTableLib.inf
|
||||
UefiBootServicesTableLib|MdeModulePkg/Library/DxeCoreUefiBootServicesTableLib/DxeCoreUefiBootServicesTableLib.inf
|
||||
UefiRuntimeServicesTableLib|MdeModulePkg/Library/DxeCoreUefiRuntimeServicesTableLib/DxeCoreUefiRuntimeServicesTableLib.inf
|
||||
}
|
||||
@ -626,7 +629,6 @@
|
||||
!if $(SECURITY_STUB_ENABLE) == TRUE
|
||||
MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
|
||||
!endif
|
||||
UefiCpuPkg/CpuDxe/CpuDxe.inf
|
||||
MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
|
||||
!if $(BOOTSPLASH_IMAGE)
|
||||
MdeModulePkg/Logo/LogoDxe.inf
|
||||
|
@ -127,7 +127,6 @@ INF CryptoPkg/Driver/CryptoDxe.inf
|
||||
!if $(SECURITY_STUB_ENABLE) == TRUE
|
||||
INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
|
||||
!endif
|
||||
INF UefiCpuPkg/CpuDxe/CpuDxe.inf
|
||||
|
||||
INF RuleOverride = UI MdeModulePkg/Application/UiApp/UiApp.inf
|
||||
INF MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf
|
||||
|
Loading…
x
Reference in New Issue
Block a user