Skip to content

Commit

Permalink
MpDxe: Produce MpService protocol to standalone Mp dxe driver
Browse files Browse the repository at this point in the history
Signed-off-by: Vineel Kovvuri[MSFT] <[email protected]>
  • Loading branch information
vineelko committed Jan 10, 2025
1 parent cd81b47 commit 0fcf892
Show file tree
Hide file tree
Showing 9 changed files with 2,060 additions and 0 deletions.
16 changes: 16 additions & 0 deletions MdeModulePkg/Include/Guid/CacheAttributesChangeEvent.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/** @file
Event group triggered when caching attributes are updated in the system.
Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/

#ifndef CACHE_ATTRIBUTES_CHANGE_EVENT_H_
#define CACHE_ATTRIBUTES_CHANGE_EVENT_H_

#define CACHE_ATTRIBUTES_CHANGE_EVENT_GUID \
{ 0XB8E477C7, 0X26A9, 0X4B9A, { 0XA7, 0XC9, 0X5F, 0X8F, 0X1F, 0X3D, 0X9C, 0X7B } }

extern EFI_GUID gCacheAttributesChangeEventGuid;

#endif
4 changes: 4 additions & 0 deletions MdeModulePkg/MdeModulePkg.dec
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,10 @@
gEdk2JedecSfdpSpiDxeDriverGuid = { 0xBE71701E, 0xB63C, 0x4574, { 0x9C, 0x5C, 0x36, 0x29, 0xE8, 0xEA, 0xC4, 0x14 }}
gEdk2JedecSfdpSpiSmmDriverGuid = { 0x95A1E915, 0x195C, 0x477C, { 0x92, 0x6F, 0x7E, 0x24, 0x67, 0xC1, 0xB3, 0x1F }}

# MU_CHANGE START
gCacheAttributesChangeEventGuid = { 0XB8E477C7, 0X26A9, 0X4B9A, { 0XA7, 0XC9, 0X5F, 0X8F, 0X1F, 0X3D, 0X9C, 0X7B } }
# MU_CHANGE END

[Ppis]
## Include/Ppi/FirmwareVolumeShadowPpi.h
gEdkiiPeiFirmwareVolumeShadowPpiGuid = { 0x7dfe756c, 0xed8d, 0x4d77, {0x9e, 0xc4, 0x39, 0x9a, 0x8a, 0x81, 0x51, 0x16 } }
Expand Down
557 changes: 557 additions & 0 deletions UefiCpuPkg/MpDxe/LoongArch64/MpDxe.c

Large diffs are not rendered by default.

862 changes: 862 additions & 0 deletions UefiCpuPkg/MpDxe/MpDxe.c

Large diffs are not rendered by default.

492 changes: 492 additions & 0 deletions UefiCpuPkg/MpDxe/MpDxe.h

Large diffs are not rendered by default.

98 changes: 98 additions & 0 deletions UefiCpuPkg/MpDxe/MpDxe.inf
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
## @file
# MP driver installs MP protocol.
#
# Copyright (c) 2008 - 2019, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
# Copyright (c) 2024, Loongson Technology Corporation Limited. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##

[Defines]
INF_VERSION = 0x00010005
BASE_NAME = MpDxe
MODULE_UNI_FILE = MpDxe.uni
FILE_GUID = 94598893-936a-481e-998e-1b0880916ae4
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
ENTRY_POINT = InitializeMp

[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
UefiCpuPkg/UefiCpuPkg.dec

[LibraryClasses.common]
BaseLib
BaseMemoryLib
CpuExceptionHandlerLib
CpuLib
DebugLib
DxeServicesTableLib
HobLib
MemoryAllocationLib
MpInitLib
PeCoffGetEntryPointLib
ReportStatusCodeLib
TimerLib
UefiBootServicesTableLib
UefiDriverEntryPoint
UefiLib
PanicLib ## MU_CHANGE
DxeMemoryProtectionHobLib ## MU_CHANGE
DeviceStateLib ## MU_CHANGE

[LibraryClasses.IA32, LibraryClasses.X64]
LocalApicLib
MtrrLib

[LibraryClasses.LoongArch64]
CacheMaintenanceLib
CpuMmuLib

[Sources.IA32, Sources.X64]
MpDxe.c
MpDxe.h

[Sources.LoongArch64]
LoongArch64/MpDxe.c
MpDxe.h

[Protocols]
gEfiMpServiceProtocolGuid ## PRODUCES
# gEfiCpuArchProtocolGuid ## CONSUMES
# gEfiMemoryAttributeProtocolGuid ## TCBZ3519 MU_CHANGE PRODUCES
# gEfiSmmBase2ProtocolGuid ## SOMETIMES_CONSUMES
# gMemoryProtectionNonstopModeProtocolGuid ## MU_CHANGE: PRODUCES
# gEdkiiGcdSyncCompleteProtocolGuid ## MU_CHANGE: PRODUCES
# gEfiCpuArchProtocolGuid ## PRODUCES

[Guids]
gCacheAttributesChangeEventGuid ## CONSUMES
# gIdleLoopEventGuid ## CONSUMES ## Event
# gEfiVectorHandoffTableGuid ## SOMETIMES_CONSUMES ## SystemTable

[Ppis]
gEfiSecPlatformInformation2PpiGuid ## UNDEFINED # HOB
gEfiSecPlatformInformationPpiGuid ## UNDEFINED # HOB

# [Pcd]
# gEfiMdeModulePkgTokenSpaceGuid.PcdPteMemoryEncryptionAddressOrMask ## CONSUMES
# # MU_CHANGE START Remove memory protection PCD references
# # gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard ## CONSUMES
# # gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPropertyMask ## CONSUMES
# # gEfiMdeModulePkgTokenSpaceGuid.PcdNullPointerDetectionPropertyMask ## CONSUMES
# # MU_CHANGE END
# gEfiMdeModulePkgTokenSpaceGuid.PcdTdxSharedBitMask ## CONSUMES
# gUefiCpuPkgTokenSpaceGuid.PcdCpuStackSwitchExceptionList ## CONSUMES
# gUefiCpuPkgTokenSpaceGuid.PcdCpuKnownGoodStackSize ## CONSUMES

# [Pcd.LoongArch64]
# gUefiCpuPkgTokenSpaceGuid.PcdLoongArchExceptionVectorBaseAddress ## CONSUMES

[Depex]
gEfiCpuArchProtocolGuid

[UserExtensions.TianoCore."ExtraFiles"]
MpDxeExtra.uni
16 changes: 16 additions & 0 deletions UefiCpuPkg/MpDxe/MpDxe.uni
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// /** @file
// MP driver installs MP Protocol.
//
// MP driver installs 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 "MP driver installs MP Protocol."

#string STR_MODULE_DESCRIPTION #language en-US "MP driver installs MP Protocol."

14 changes: 14 additions & 0 deletions UefiCpuPkg/MpDxe/MpDxeExtra.uni
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// /** @file
// MpDxe Localized Strings and Content
//
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
//
// SPDX-License-Identifier: BSD-2-Clause-Patent
//
// **/

#string STR_PROPERTIES_MODULE_NAME
#language en-US
"Multi-processor DXE Driver"


1 change: 1 addition & 0 deletions UefiCpuPkg/UefiCpuPkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@

[Components.IA32, Components.X64]
UefiCpuPkg/CpuDxe/CpuDxe.inf
UefiCpuPkg/MpDxe/MpDxe.inf
UefiCpuPkg/CpuFeatures/CpuFeaturesPei.inf {
<LibraryClasses>
NULL|UefiCpuPkg/Library/CpuCommonFeaturesLib/CpuCommonFeaturesLib.inf
Expand Down

0 comments on commit 0fcf892

Please sign in to comment.