UefiCpuPkg/CpuFeatures: Change files format to DOS
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@@ -1,122 +1,122 @@
|
||||
/** @file
|
||||
CPU Features DXE driver to initialize CPU features.
|
||||
|
||||
Copyright (c) 2017, 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 <PiDxe.h>
|
||||
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/UefiLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
#include <Library/RegisterCpuFeaturesLib.h>
|
||||
|
||||
#include <Protocol/SmmConfiguration.h>
|
||||
#include <Guid/CpuFeaturesInitDone.h>
|
||||
|
||||
|
||||
/**
|
||||
Worker function to perform CPU feature initialization.
|
||||
|
||||
**/
|
||||
VOID
|
||||
CpuFeaturesInitializeWorker (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_HANDLE Handle;
|
||||
|
||||
CpuFeaturesDetect ();
|
||||
|
||||
CpuFeaturesInitialize ();
|
||||
|
||||
//
|
||||
// Install CPU Features Init Done Protocol
|
||||
//
|
||||
Handle = NULL;
|
||||
Status = gBS->InstallProtocolInterface (
|
||||
&Handle,
|
||||
&gEdkiiCpuFeaturesInitDoneGuid,
|
||||
EFI_NATIVE_INTERFACE,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
|
||||
/**
|
||||
Event notification that initialize CPU features when gEfiSmmConfigurationProtocol installs.
|
||||
|
||||
@param[in] Event The Event that is being processed, not used.
|
||||
@param[in] Context Event Context, not used.
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
SmmConfigurationEventNotify (
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_SMM_CONFIGURATION_PROTOCOL *SmmConfiguration;
|
||||
|
||||
//
|
||||
// Make sure this notification is for this handler
|
||||
//
|
||||
Status = gBS->LocateProtocol (&gEfiSmmConfigurationProtocolGuid, NULL, (VOID **)&SmmConfiguration);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return;
|
||||
}
|
||||
|
||||
CpuFeaturesInitializeWorker ();
|
||||
}
|
||||
|
||||
/**
|
||||
CPU Features driver entry point function.
|
||||
|
||||
If PcdCpuFeaturesInitAfterSmmRelocation is TRUE, it will register one
|
||||
SMM Configuration Protocol notify function to perform CPU features
|
||||
initialization. Otherwise, it will perform CPU features initialization
|
||||
directly.
|
||||
|
||||
@param ImageHandle Image handle this driver.
|
||||
@param SystemTable Pointer to the System Table.
|
||||
|
||||
@retval EFI_SUCCESS CPU Features is initialized successfully.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
CpuFeaturesDxeInitialize (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
{
|
||||
VOID *Registration;
|
||||
|
||||
if (PcdGetBool (PcdCpuFeaturesInitAfterSmmRelocation)) {
|
||||
//
|
||||
// Install notification callback on SMM Configuration Protocol
|
||||
//
|
||||
EfiCreateProtocolNotifyEvent (
|
||||
&gEfiSmmConfigurationProtocolGuid,
|
||||
TPL_CALLBACK,
|
||||
SmmConfigurationEventNotify,
|
||||
NULL,
|
||||
&Registration
|
||||
);
|
||||
} else {
|
||||
CpuFeaturesInitializeWorker ();
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/** @file
|
||||
CPU Features DXE driver to initialize CPU features.
|
||||
|
||||
Copyright (c) 2017, 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 <PiDxe.h>
|
||||
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/UefiLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
#include <Library/RegisterCpuFeaturesLib.h>
|
||||
|
||||
#include <Protocol/SmmConfiguration.h>
|
||||
#include <Guid/CpuFeaturesInitDone.h>
|
||||
|
||||
|
||||
/**
|
||||
Worker function to perform CPU feature initialization.
|
||||
|
||||
**/
|
||||
VOID
|
||||
CpuFeaturesInitializeWorker (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_HANDLE Handle;
|
||||
|
||||
CpuFeaturesDetect ();
|
||||
|
||||
CpuFeaturesInitialize ();
|
||||
|
||||
//
|
||||
// Install CPU Features Init Done Protocol
|
||||
//
|
||||
Handle = NULL;
|
||||
Status = gBS->InstallProtocolInterface (
|
||||
&Handle,
|
||||
&gEdkiiCpuFeaturesInitDoneGuid,
|
||||
EFI_NATIVE_INTERFACE,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
}
|
||||
|
||||
/**
|
||||
Event notification that initialize CPU features when gEfiSmmConfigurationProtocol installs.
|
||||
|
||||
@param[in] Event The Event that is being processed, not used.
|
||||
@param[in] Context Event Context, not used.
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
SmmConfigurationEventNotify (
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_SMM_CONFIGURATION_PROTOCOL *SmmConfiguration;
|
||||
|
||||
//
|
||||
// Make sure this notification is for this handler
|
||||
//
|
||||
Status = gBS->LocateProtocol (&gEfiSmmConfigurationProtocolGuid, NULL, (VOID **)&SmmConfiguration);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return;
|
||||
}
|
||||
|
||||
CpuFeaturesInitializeWorker ();
|
||||
}
|
||||
|
||||
/**
|
||||
CPU Features driver entry point function.
|
||||
|
||||
If PcdCpuFeaturesInitAfterSmmRelocation is TRUE, it will register one
|
||||
SMM Configuration Protocol notify function to perform CPU features
|
||||
initialization. Otherwise, it will perform CPU features initialization
|
||||
directly.
|
||||
|
||||
@param ImageHandle Image handle this driver.
|
||||
@param SystemTable Pointer to the System Table.
|
||||
|
||||
@retval EFI_SUCCESS CPU Features is initialized successfully.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
CpuFeaturesDxeInitialize (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
{
|
||||
VOID *Registration;
|
||||
|
||||
if (PcdGetBool (PcdCpuFeaturesInitAfterSmmRelocation)) {
|
||||
//
|
||||
// Install notification callback on SMM Configuration Protocol
|
||||
//
|
||||
EfiCreateProtocolNotifyEvent (
|
||||
&gEfiSmmConfigurationProtocolGuid,
|
||||
TPL_CALLBACK,
|
||||
SmmConfigurationEventNotify,
|
||||
NULL,
|
||||
&Registration
|
||||
);
|
||||
} else {
|
||||
CpuFeaturesInitializeWorker ();
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@@ -1,53 +1,53 @@
|
||||
## @file
|
||||
# CPU Features DXE driver.
|
||||
#
|
||||
# Copyright (c) 2017, 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 = CpuFeaturesDxe
|
||||
MODULE_UNI_FILE = CpuFeaturesDxe.uni
|
||||
FILE_GUID = 63EB1B62-10C9-4693-88AC-AE0999EA87F8
|
||||
MODULE_TYPE = DXE_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
|
||||
ENTRY_POINT = CpuFeaturesDxeInitialize
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
UefiCpuPkg/UefiCpuPkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
BaseLib
|
||||
DebugLib
|
||||
UefiLib
|
||||
UefiDriverEntryPoint
|
||||
UefiBootServicesTableLib
|
||||
RegisterCpuFeaturesLib
|
||||
|
||||
[Sources]
|
||||
CpuFeaturesDxe.c
|
||||
|
||||
[Guids]
|
||||
gEdkiiCpuFeaturesInitDoneGuid ## PRODUCES ## UNDEFINED # protocol GUID installed
|
||||
|
||||
[Protocols]
|
||||
gEfiSmmConfigurationProtocolGuid ## NOTIFY
|
||||
|
||||
[Pcd]
|
||||
gUefiCpuPkgTokenSpaceGuid.PcdCpuFeaturesInitAfterSmmRelocation ## CONSUMES
|
||||
|
||||
[Depex]
|
||||
TRUE
|
||||
|
||||
[UserExtensions.TianoCore."ExtraFiles"]
|
||||
CpuFeaturesDxeExtra.uni
|
||||
## @file
|
||||
# CPU Features DXE driver.
|
||||
#
|
||||
# Copyright (c) 2017, 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 = CpuFeaturesDxe
|
||||
MODULE_UNI_FILE = CpuFeaturesDxe.uni
|
||||
FILE_GUID = 63EB1B62-10C9-4693-88AC-AE0999EA87F8
|
||||
MODULE_TYPE = DXE_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
|
||||
ENTRY_POINT = CpuFeaturesDxeInitialize
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
UefiCpuPkg/UefiCpuPkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
BaseLib
|
||||
DebugLib
|
||||
UefiLib
|
||||
UefiDriverEntryPoint
|
||||
UefiBootServicesTableLib
|
||||
RegisterCpuFeaturesLib
|
||||
|
||||
[Sources]
|
||||
CpuFeaturesDxe.c
|
||||
|
||||
[Guids]
|
||||
gEdkiiCpuFeaturesInitDoneGuid ## PRODUCES ## UNDEFINED # protocol GUID installed
|
||||
|
||||
[Protocols]
|
||||
gEfiSmmConfigurationProtocolGuid ## NOTIFY
|
||||
|
||||
[Pcd]
|
||||
gUefiCpuPkgTokenSpaceGuid.PcdCpuFeaturesInitAfterSmmRelocation ## CONSUMES
|
||||
|
||||
[Depex]
|
||||
TRUE
|
||||
|
||||
[UserExtensions.TianoCore."ExtraFiles"]
|
||||
CpuFeaturesDxeExtra.uni
|
||||
|
@@ -1,22 +1,22 @@
|
||||
// /** @file
|
||||
// CPU Features DXE driver.
|
||||
//
|
||||
// CPU Features DXE driver.
|
||||
//
|
||||
// Copyright (c) 2017, 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 "CPU Features DXE driver to initialize CPU features."
|
||||
|
||||
#string STR_MODULE_DESCRIPTION #language en-US "CPU Features DXE driver to initialize CPU features."
|
||||
|
||||
// /** @file
|
||||
// CPU Features DXE driver.
|
||||
//
|
||||
// CPU Features DXE driver.
|
||||
//
|
||||
// Copyright (c) 2017, 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 "CPU Features DXE driver to initialize CPU features."
|
||||
|
||||
#string STR_MODULE_DESCRIPTION #language en-US "CPU Features DXE driver to initialize CPU features."
|
||||
|
||||
|
@@ -1,20 +1,20 @@
|
||||
// /** @file
|
||||
// CpuFeaturesDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2017, 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_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"CPU Features DXE Driver"
|
||||
|
||||
|
||||
// /** @file
|
||||
// CpuFeaturesDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2017, 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_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"CPU Features DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,75 +1,75 @@
|
||||
/** @file
|
||||
CPU Features PEIM driver to initialize CPU features.
|
||||
|
||||
Copyright (c) 2017, 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 <PiPei.h>
|
||||
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/PeiServicesLib.h>
|
||||
#include <Library/RegisterCpuFeaturesLib.h>
|
||||
|
||||
#include <Guid/CpuFeaturesInitDone.h>
|
||||
|
||||
EFI_PEI_PPI_DESCRIPTOR mPeiCpuFeaturesInitDonePpiDesc = {
|
||||
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
|
||||
&gEdkiiCpuFeaturesInitDoneGuid,
|
||||
NULL
|
||||
};
|
||||
|
||||
/**
|
||||
CPU Features driver entry point function.
|
||||
|
||||
It will perform CPU features initialization, except for
|
||||
PcdCpuFeaturesInitOnS3Resume is FALSE on S3 resume.
|
||||
|
||||
@param FileHandle Handle of the file being invoked.
|
||||
@param PeiServices Describes the list of possible PEI Services.
|
||||
|
||||
@retval EFI_SUCCESS CPU Features is initialized successfully.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
CpuFeaturesPeimInitialize (
|
||||
IN EFI_PEI_FILE_HANDLE FileHandle,
|
||||
IN CONST EFI_PEI_SERVICES **PeiServices
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_BOOT_MODE BootMode;
|
||||
|
||||
Status = PeiServicesGetBootMode (&BootMode);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
if (BootMode == BOOT_ON_S3_RESUME &&
|
||||
!PcdGetBool (PcdCpuFeaturesInitOnS3Resume)) {
|
||||
//
|
||||
// Does nothing when if PcdCpuFeaturesInitOnS3Resume is FLASE
|
||||
// on S3 boot mode
|
||||
//
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
CpuFeaturesDetect ();
|
||||
|
||||
CpuFeaturesInitialize ();
|
||||
|
||||
//
|
||||
// Install CPU Features Init Done PPI
|
||||
//
|
||||
Status = PeiServicesInstallPpi(&mPeiCpuFeaturesInitDonePpiDesc);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/** @file
|
||||
CPU Features PEIM driver to initialize CPU features.
|
||||
|
||||
Copyright (c) 2017, 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 <PiPei.h>
|
||||
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/PeiServicesLib.h>
|
||||
#include <Library/RegisterCpuFeaturesLib.h>
|
||||
|
||||
#include <Guid/CpuFeaturesInitDone.h>
|
||||
|
||||
EFI_PEI_PPI_DESCRIPTOR mPeiCpuFeaturesInitDonePpiDesc = {
|
||||
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
|
||||
&gEdkiiCpuFeaturesInitDoneGuid,
|
||||
NULL
|
||||
};
|
||||
|
||||
/**
|
||||
CPU Features driver entry point function.
|
||||
|
||||
It will perform CPU features initialization, except for
|
||||
PcdCpuFeaturesInitOnS3Resume is FALSE on S3 resume.
|
||||
|
||||
@param FileHandle Handle of the file being invoked.
|
||||
@param PeiServices Describes the list of possible PEI Services.
|
||||
|
||||
@retval EFI_SUCCESS CPU Features is initialized successfully.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
CpuFeaturesPeimInitialize (
|
||||
IN EFI_PEI_FILE_HANDLE FileHandle,
|
||||
IN CONST EFI_PEI_SERVICES **PeiServices
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_BOOT_MODE BootMode;
|
||||
|
||||
Status = PeiServicesGetBootMode (&BootMode);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
if (BootMode == BOOT_ON_S3_RESUME &&
|
||||
!PcdGetBool (PcdCpuFeaturesInitOnS3Resume)) {
|
||||
//
|
||||
// Does nothing when if PcdCpuFeaturesInitOnS3Resume is FLASE
|
||||
// on S3 boot mode
|
||||
//
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
CpuFeaturesDetect ();
|
||||
|
||||
CpuFeaturesInitialize ();
|
||||
|
||||
//
|
||||
// Install CPU Features Init Done PPI
|
||||
//
|
||||
Status = PeiServicesInstallPpi(&mPeiCpuFeaturesInitDonePpiDesc);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@@ -1,49 +1,49 @@
|
||||
## @file
|
||||
# CPU Features PEIM driver.
|
||||
#
|
||||
# Copyright (c) 2017, 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 = CpuFeaturesPei
|
||||
MODULE_UNI_FILE = CpuFeaturesPei.uni
|
||||
FILE_GUID = 183BB3E1-A1E5-4445-8AC9-0E83B6547E0E
|
||||
MODULE_TYPE = PEIM
|
||||
VERSION_STRING = 1.0
|
||||
|
||||
ENTRY_POINT = CpuFeaturesPeimInitialize
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
UefiCpuPkg/UefiCpuPkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
BaseLib
|
||||
DebugLib
|
||||
PeimEntryPoint
|
||||
PeiServicesLib
|
||||
RegisterCpuFeaturesLib
|
||||
|
||||
[Sources]
|
||||
CpuFeaturesPei.c
|
||||
|
||||
[Guids]
|
||||
gEdkiiCpuFeaturesInitDoneGuid ## PRODUCES ## UNDEFINED # PPI GUID installed
|
||||
|
||||
[Pcd]
|
||||
gUefiCpuPkgTokenSpaceGuid.PcdCpuFeaturesInitOnS3Resume ## CONSUMES
|
||||
|
||||
[Depex]
|
||||
TRUE
|
||||
|
||||
[UserExtensions.TianoCore."ExtraFiles"]
|
||||
CpuFeaturesPeiExtra.uni
|
||||
## @file
|
||||
# CPU Features PEIM driver.
|
||||
#
|
||||
# Copyright (c) 2017, 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 = CpuFeaturesPei
|
||||
MODULE_UNI_FILE = CpuFeaturesPei.uni
|
||||
FILE_GUID = 183BB3E1-A1E5-4445-8AC9-0E83B6547E0E
|
||||
MODULE_TYPE = PEIM
|
||||
VERSION_STRING = 1.0
|
||||
|
||||
ENTRY_POINT = CpuFeaturesPeimInitialize
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
UefiCpuPkg/UefiCpuPkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
BaseLib
|
||||
DebugLib
|
||||
PeimEntryPoint
|
||||
PeiServicesLib
|
||||
RegisterCpuFeaturesLib
|
||||
|
||||
[Sources]
|
||||
CpuFeaturesPei.c
|
||||
|
||||
[Guids]
|
||||
gEdkiiCpuFeaturesInitDoneGuid ## PRODUCES ## UNDEFINED # PPI GUID installed
|
||||
|
||||
[Pcd]
|
||||
gUefiCpuPkgTokenSpaceGuid.PcdCpuFeaturesInitOnS3Resume ## CONSUMES
|
||||
|
||||
[Depex]
|
||||
TRUE
|
||||
|
||||
[UserExtensions.TianoCore."ExtraFiles"]
|
||||
CpuFeaturesPeiExtra.uni
|
||||
|
@@ -1,22 +1,22 @@
|
||||
// /** @file
|
||||
// CPU Features PEIM driver.
|
||||
//
|
||||
// CPU Features PEIM driver.
|
||||
//
|
||||
// Copyright (c) 2017, 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 "CPU Features PEIM driver to initialize CPU features."
|
||||
|
||||
#string STR_MODULE_DESCRIPTION #language en-US "CPU Features PEIM driver to initialize CPU features."
|
||||
|
||||
// /** @file
|
||||
// CPU Features PEIM driver.
|
||||
//
|
||||
// CPU Features PEIM driver.
|
||||
//
|
||||
// Copyright (c) 2017, 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 "CPU Features PEIM driver to initialize CPU features."
|
||||
|
||||
#string STR_MODULE_DESCRIPTION #language en-US "CPU Features PEIM driver to initialize CPU features."
|
||||
|
||||
|
@@ -1,20 +1,20 @@
|
||||
// /** @file
|
||||
// CpuFeaturesPei Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2017, 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_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"CPU Features PEIM Driver"
|
||||
|
||||
|
||||
// /** @file
|
||||
// CpuFeaturesPei Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2017, 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_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"CPU Features PEIM Driver"
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user