From b7c51c9cf4864df6aabb99a1ae843becd577237c Mon Sep 17 00:00:00 2001 From: raywu Date: Fri, 15 Jun 2018 00:00:50 +0800 Subject: init. 1AQQW051 --- ReferenceCode/AcpiTables/Dptf/Dxe/Dptf.c | 440 ++++++++++++++++++++++++++ ReferenceCode/AcpiTables/Dptf/Dxe/Dptf.dxs | 33 ++ ReferenceCode/AcpiTables/Dptf/Dxe/Dptf.h | 196 ++++++++++++ ReferenceCode/AcpiTables/Dptf/Dxe/Dptf.inf | 83 +++++ ReferenceCode/AcpiTables/Dptf/Dxe/DptfDxe.cif | 13 + ReferenceCode/AcpiTables/Dptf/Dxe/DptfDxe.mak | 106 +++++++ ReferenceCode/AcpiTables/Dptf/Dxe/DptfDxe.sdl | 30 ++ 7 files changed, 901 insertions(+) create mode 100644 ReferenceCode/AcpiTables/Dptf/Dxe/Dptf.c create mode 100644 ReferenceCode/AcpiTables/Dptf/Dxe/Dptf.dxs create mode 100644 ReferenceCode/AcpiTables/Dptf/Dxe/Dptf.h create mode 100644 ReferenceCode/AcpiTables/Dptf/Dxe/Dptf.inf create mode 100644 ReferenceCode/AcpiTables/Dptf/Dxe/DptfDxe.cif create mode 100644 ReferenceCode/AcpiTables/Dptf/Dxe/DptfDxe.mak create mode 100644 ReferenceCode/AcpiTables/Dptf/Dxe/DptfDxe.sdl (limited to 'ReferenceCode/AcpiTables/Dptf/Dxe') diff --git a/ReferenceCode/AcpiTables/Dptf/Dxe/Dptf.c b/ReferenceCode/AcpiTables/Dptf/Dxe/Dptf.c new file mode 100644 index 0000000..caee0a7 --- /dev/null +++ b/ReferenceCode/AcpiTables/Dptf/Dxe/Dptf.c @@ -0,0 +1,440 @@ +/** @file + This DXE driver configures and supports Dptf. + +@copyright + Copyright (c) 2013 Intel Corporation. All rights reserved + This software and associated documentation (if any) is furnished + under a license and may only be used or copied in accordance + with the terms of the license. Except as permitted by such + license, no part of this software or documentation may be + reproduced, stored in a retrieval system, or transmitted in any + form or by any means without the express written consent of + Intel Corporation. + + This file contains an 'Intel Peripheral Driver' and uniquely + identified as "Intel Reference Module" and is + licensed for Intel CPUs and chipsets under the terms of your + license agreement with Intel or your vendor. This file may + be modified by the user, subject to additional terms of the + license agreement + +**/ +#include "Dptf.h" + +ACPI_PLATFORM_POLICY_PROTOCOL *mAcpiPlatformPolicyProtocol; + +EFI_RUNTIME_SERVICES *gRT; + +/// +/// Driver entry point +/// +EFI_DRIVER_ENTRY_POINT (InitializeDptf) + +EFI_STATUS +InitializeDptf ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +/** +@brief + This procedure does all the DPTF initialization and loads the ACPI tables. + + @param[in] ImageHandle - The firmware allocated handle to the Driver Image + @param[in] SystemTable - Pointer to the EFI System Table + + @retval EFI_SUCCESS - The driver installed/initialized correctly. +**/ +{ + EFI_STATUS Status; + + gRT = SystemTable->RuntimeServices; + + /// + /// Initialize the EFI Runtime Library + /// + DxeInitializeDriverLib (ImageHandle, SystemTable); + + /// + /// S3 boot script + /// + INITIALIZE_SCRIPT (ImageHandle, SystemTable); + + /// + /// Locate platform configuration information and copy it to a global variable. + /// + Status = gBS->LocateProtocol ( + &gAcpiPlatformPolicyProtocolGuid, + NULL, + (VOID**) &mAcpiPlatformPolicyProtocol + ); + if (EFI_ERROR(Status)) { + DEBUG ((EFI_D_ERROR, "No ACPI Platform Policy Protocol available.")); + } else { + DEBUG ((EFI_D_INFO, "ACPI Platform Policy Protocol is loaded.")); + } + ASSERT_EFI_ERROR(Status); + + /// + /// Check if Dptf is enabled and load the ACPI SSDT. + /// + if (mAcpiPlatformPolicyProtocol->EnableDptf == 1) { + /// + /// Load the SSDT ACPI Tables. + /// + switch (mAcpiPlatformPolicyProtocol->BoardId) { + case 0x30: // BoardId for Ffrd + LoadAcpiTablesFfrd (); + break; + default: + LoadAcpiTables (); + } + } + + return EFI_SUCCESS; +} + +VOID +LoadAcpiTables( + VOID + ) +/** +@brief + This procedure loads the ACPI SSDT tables. + + @param[in] None + + @retval None + +**/ +{ + EFI_STATUS Status; + EFI_HANDLE *HandleBuffer; + UINTN NumberOfHandles; + UINTN Index; + EFI_FIRMWARE_VOLUME_PROTOCOL *FwVol; + EFI_ACPI_TABLE_PROTOCOL *AcpiTable; + INTN Instance; + EFI_ACPI_COMMON_HEADER *Table; + UINTN Size; + EFI_FV_FILETYPE FileType; + EFI_FV_FILE_ATTRIBUTES Attributes; + UINT32 FvStatus; + EFI_ACPI_DESCRIPTION_HEADER *TableHeader; + UINTN TableHandle; + EFI_ACPI_TABLE_VERSION Version; + BOOLEAN LoadTable; + + FwVol = NULL; + Table = NULL; + + /// + /// Locate FV protocol. + /// + Status = gBS->LocateHandleBuffer ( + ByProtocol, + &gEfiFirmwareVolumeProtocolGuid, + NULL, + &NumberOfHandles, + &HandleBuffer + ); + ASSERT_EFI_ERROR (Status); + + /// + /// Look for FV with ACPI storage file + /// + for (Index = 0; Index < NumberOfHandles; Index++) { + + /// + /// Get the protocol on this handle + /// This should not fail because of LocateHandleBuffer + /// + Status = gBS->HandleProtocol ( + HandleBuffer[Index], + &gEfiFirmwareVolumeProtocolGuid, + (VOID **) &FwVol + ); + ASSERT_EFI_ERROR (Status); + + if ((Status == EFI_SUCCESS) && (FwVol != NULL)) { + /// + /// See if it has the ACPI storage file + /// + Size = 0; + FvStatus = 0; + Status = FwVol->ReadFile ( + FwVol, + &gDptfAcpiTableStorageGuid, + NULL, + &Size, + &FileType, + &Attributes, + &FvStatus + ); + + /// + /// If we found it, then we are done + /// + if (Status == EFI_SUCCESS) { + break; + } + } + } + + /// + /// Our exit status is determined by the success of the previous operations + /// If the protocol was found, Instance already points to it. + /// + /// Free any allocated buffers + /// + FreePool (HandleBuffer); + + /// + /// Sanity check that we found our data file + /// + ASSERT (FwVol); + if (FwVol == NULL) { + return; + } + + /// + /// By default, a table belongs in all ACPI table versions published. + /// + Version = EFI_ACPI_TABLE_VERSION_1_0B | EFI_ACPI_TABLE_VERSION_2_0 | EFI_ACPI_TABLE_VERSION_3_0; + + /// + /// Find the Table protocol + /// + Status = gBS->LocateProtocol (&gEfiAcpiTableProtocolGuid, NULL, (VOID **) &AcpiTable); + + /// + /// Read tables from the storage file. + /// + Instance = 0; + + while (Status == EFI_SUCCESS) { + /// + /// Read the ACPI tables + /// + Status = FwVol->ReadSection ( + FwVol, + &gDptfAcpiTableStorageGuid, + EFI_SECTION_RAW, + Instance, + (VOID **) &Table, + &Size, + &FvStatus + ); + + if (!EFI_ERROR (Status)) { + + LoadTable = FALSE; + TableHeader = (EFI_ACPI_DESCRIPTION_HEADER *) Table; + + switch (((EFI_ACPI_DESCRIPTION_HEADER*) TableHeader)->OemTableId) { + + case EFI_SIGNATURE_64 ('D', 'p', 't', 'f', 'T', 'a', 'b', 'l'): + /// + /// This is Dptf SSDT. Dptf should be enabled if we reach here so load the table. + /// + LoadTable = TRUE; + DEBUG ((EFI_D_INFO, "Found Dptf SSDT signature.")); + break; + + default: + break; + } + + /// + /// Add the table + /// + if (LoadTable) { + TableHandle = 0; + Status = AcpiTable->InstallAcpiTable ( + AcpiTable, + Table, + Table->Length, + &TableHandle + ); + } + + /// + /// Increment the instance + /// + Instance++; + Table = NULL; + } + } +} + +VOID +LoadAcpiTablesFfrd( + VOID + ) +/** +@brief + This procedure loads the ACPI SSDT tables. + + @param[in] None + + @retval None + +**/ +{ + EFI_STATUS Status; + EFI_HANDLE *HandleBuffer; + UINTN NumberOfHandles; + UINTN Index; + EFI_FIRMWARE_VOLUME_PROTOCOL *FwVol; + EFI_ACPI_TABLE_PROTOCOL *AcpiTable; + INTN Instance; + EFI_ACPI_COMMON_HEADER *Table; + UINTN Size; + EFI_FV_FILETYPE FileType; + EFI_FV_FILE_ATTRIBUTES Attributes; + UINT32 FvStatus; + EFI_ACPI_DESCRIPTION_HEADER *TableHeader; + UINTN TableHandle; + EFI_ACPI_TABLE_VERSION Version; + BOOLEAN LoadTable; + + FwVol = NULL; + Table = NULL; + + /// + /// Locate FV protocol. + /// + Status = gBS->LocateHandleBuffer ( + ByProtocol, + &gEfiFirmwareVolumeProtocolGuid, + NULL, + &NumberOfHandles, + &HandleBuffer + ); + ASSERT_EFI_ERROR (Status); + + /// + /// Look for FV with ACPI storage file + /// + for (Index = 0; Index < NumberOfHandles; Index++) { + + /// + /// Get the protocol on this handle + /// This should not fail because of LocateHandleBuffer + /// + Status = gBS->HandleProtocol ( + HandleBuffer[Index], + &gEfiFirmwareVolumeProtocolGuid, + (VOID **) &FwVol + ); + ASSERT_EFI_ERROR (Status); + + if ((Status == EFI_SUCCESS) && (FwVol != NULL)) { + /// + /// See if it has the ACPI storage file + /// + Size = 0; + FvStatus = 0; + Status = FwVol->ReadFile ( + FwVol, + &gDptfAcpiTableStorageGuidFfrd, + NULL, + &Size, + &FileType, + &Attributes, + &FvStatus + ); + + /// + /// If we found it, then we are done + /// + if (Status == EFI_SUCCESS) { + break; + } + } + } + + /// + /// Our exit status is determined by the success of the previous operations + /// If the protocol was found, Instance already points to it. + /// + /// Free any allocated buffers + /// + FreePool (HandleBuffer); + + /// + /// Sanity check that we found our data file + /// + ASSERT (FwVol); + if (FwVol == NULL) { + return; + } + + /// + /// By default, a table belongs in all ACPI table versions published. + /// + Version = EFI_ACPI_TABLE_VERSION_1_0B | EFI_ACPI_TABLE_VERSION_2_0 | EFI_ACPI_TABLE_VERSION_3_0; + + /// + /// Find the Table protocol + /// + Status = gBS->LocateProtocol (&gEfiAcpiTableProtocolGuid, NULL, (VOID **) &AcpiTable); + + /// + /// Read tables from the storage file. + /// + Instance = 0; + + while (Status == EFI_SUCCESS) { + /// + /// Read the ACPI tables + /// + Status = FwVol->ReadSection ( + FwVol, + &gDptfAcpiTableStorageGuidFfrd, + EFI_SECTION_RAW, + Instance, + (VOID **) &Table, + &Size, + &FvStatus + ); + + if (!EFI_ERROR (Status)) { + + LoadTable = FALSE; + TableHeader = (EFI_ACPI_DESCRIPTION_HEADER *) Table; + + switch (((EFI_ACPI_DESCRIPTION_HEADER*) TableHeader)->OemTableId) { + + case EFI_SIGNATURE_64 ('D', 'p', 't', 'f', 'F', 'f', 'r', 'd'): + /// + /// This is Dptf SSDT. Dptf should be enabled if we reach here so load the table. + /// + LoadTable = TRUE; + DEBUG ((EFI_D_INFO, "Found Dptf SSDT signature.")); + break; + + default: + break; + } + + /// + /// Add the table + /// + if (LoadTable) { + TableHandle = 0; + Status = AcpiTable->InstallAcpiTable ( + AcpiTable, + Table, + Table->Length, + &TableHandle + ); + } + + /// + /// Increment the instance + /// + Instance++; + Table = NULL; + } + } +} diff --git a/ReferenceCode/AcpiTables/Dptf/Dxe/Dptf.dxs b/ReferenceCode/AcpiTables/Dptf/Dxe/Dptf.dxs new file mode 100644 index 0000000..3804c02 --- /dev/null +++ b/ReferenceCode/AcpiTables/Dptf/Dxe/Dptf.dxs @@ -0,0 +1,33 @@ +/** @file + Dependency expression source file. + +@copyright + Copyright (c) 1999 - 2012 Intel Corporation. All rights reserved + This software and associated documentation (if any) is furnished + under a license and may only be used or copied in accordance + with the terms of the license. Except as permitted by such + license, no part of this software or documentation may be + reproduced, stored in a retrieval system, or transmitted in any + form or by any means without the express written consent of + Intel Corporation. + + This file contains an 'Intel Peripheral Driver' and uniquely + identified as "Intel Reference Module" and is + licensed for Intel CPUs and chipsets under the terms of your + license agreement with Intel or your vendor. This file may + be modified by the user, subject to additional terms of the + license agreement + +**/ + + +#include "EfiDepex.h" +#include EFI_PROTOCOL_DEPENDENCY (CpuIo) +#include EFI_PROTOCOL_DEPENDENCY (AcpiSupport) +#include EFI_PROTOCOL_DEPENDENCY (AcpiPlatformPolicy) + +DEPENDENCY_START + EFI_CPU_IO_PROTOCOL_GUID AND + EFI_ACPI_SUPPORT_GUID AND + ACPI_PLATFORM_POLICY_PROTOCOL_GUID +DEPENDENCY_END diff --git a/ReferenceCode/AcpiTables/Dptf/Dxe/Dptf.h b/ReferenceCode/AcpiTables/Dptf/Dxe/Dptf.h new file mode 100644 index 0000000..8f66020 --- /dev/null +++ b/ReferenceCode/AcpiTables/Dptf/Dxe/Dptf.h @@ -0,0 +1,196 @@ +/** @file + Header file for the Dptf driver. + +@copyright + Copyright (c) 2013 Intel Corporation. All rights reserved + This software and associated documentation (if any) is furnished + under a license and may only be used or copied in accordance + with the terms of the license. Except as permitted by such + license, no part of this software or documentation may be + reproduced, stored in a retrieval system, or transmitted in any + form or by any means without the express written consent of + Intel Corporation. + + This file contains an 'Intel Peripheral Driver' and uniquely + identified as "Intel Reference Module" and is + licensed for Intel CPUs and chipsets under the terms of your + license agreement with Intel or your vendor. This file may + be modified by the user, subject to additional terms of the + license agreement +**/ + +#ifndef _DPTF_H_ +#define _DPTF_H_ + +#include "EdkIIGlueBase.h" +#include "EdkIIGlueDxe.h" +#include "EdkIIGluePcd.h" +#include "Acpi.h" +#include "CpuIA32.h" +#include "EfiScriptLib.h" +#include "SaAccess.h" + +/// +/// Consumed protocols +/// +#include EFI_PROTOCOL_DEPENDENCY (AcpiTable) +#include EFI_PROTOCOL_DEPENDENCY (FirmwareVolume) +#include EFI_PROTOCOL_CONSUMER (PciRootBridgeIo) +#include EFI_PROTOCOL_DEFINITION (AcpiPlatformPolicy) + +#ifndef DPTF_BASE_ADDRESS +#define DPTF_BASE_ADDRESS 0xFED98000 +#endif +#ifndef DPTF_LENGTH +#define DPTF_LENGTH 0x8000 +#endif + +/// +/// SSDT data storage file +/// +#include "DptfAcpiTableStorage.h" + +/// +/// AML parsing definitions +/// +#define AML_METHOD_OP 0x14 + +/// +/// MSR definitions +/// +#define MSR_PLATFORM_INFO 0xCE + #define CONFIG_TDP_NUM_LEVELS_OFFSET 33 + #define CONFIG_TDP_NUM_LEVELS_MASK (0x3 << 1) // Bits 34:33 + #define LOW_POWER_MODE_OFFSET 32 + #define LOW_POWER_MODE_MASK 0x1 + +/// +/// UINT64 workaround +/// +/// The MS compiler doesn't handle QWORDs very well. I'm breaking +/// them into DWORDs to circumvent the problems. Converting back +/// shouldn't be a big deal. +/// +#pragma pack(1) +typedef union _MSR_REGISTER { + UINT64 Qword; + + struct _DWORDS { + UINT32 Low; + UINT32 High; + } Dwords; + + struct _BYTES { + UINT8 FirstByte; + UINT8 SecondByte; + UINT8 ThirdByte; + UINT8 FouthByte; + UINT8 FifthByte; + UINT8 SixthByte; + UINT8 SeventhByte; + UINT8 EighthByte; + } Bytes; + +} MSR_REGISTER; +#pragma pack() + +/// +/// register definitions +/// +#define MCHBAR (0x48) +#define MCHBAR_MCHBAR_MASK 0x7fffff8000 + +#define TMBAR (0x10) + +#ifndef BIT63 +#define BIT0 0x0001 +#define BIT1 0x0002 +#define BIT2 0x0004 +#define BIT3 0x0008 +#define BIT4 0x0010 +#define BIT5 0x0020 +#define BIT6 0x0040 +#define BIT7 0x0080 +#define BIT8 0x0100 +#define BIT9 0x0200 +#define BIT10 0x0400 +#define BIT11 0x0800 +#define BIT12 0x1000 +#define BIT13 0x2000 +#define BIT14 0x4000 +#define BIT15 0x8000 +#define BIT16 0x00010000 +#define BIT17 0x00020000 +#define BIT18 0x00040000 +#define BIT19 0x00080000 +#define BIT20 0x00100000 +#define BIT21 0x00200000 +#define BIT22 0x00400000 +#define BIT23 0x00800000 +#define BIT24 0x01000000 +#define BIT25 0x02000000 +#define BIT26 0x04000000 +#define BIT27 0x08000000 +#define BIT28 0x10000000 +#define BIT29 0x20000000 +#define BIT30 0x40000000 +#define BIT31 0x80000000 +#define BIT32 0x100000000 +#define BIT33 0x200000000 +#define BIT34 0x400000000 +#define BIT35 0x800000000 +#define BIT36 0x1000000000 +#define BIT37 0x2000000000 +#define BIT38 0x4000000000 +#define BIT39 0x8000000000 +#define BIT40 0x10000000000 +#define BIT41 0x20000000000 +#define BIT42 0x40000000000 +#define BIT43 0x80000000000 +#define BIT44 0x100000000000 +#define BIT45 0x200000000000 +#define BIT46 0x400000000000 +#define BIT47 0x800000000000 +#define BIT48 0x1000000000000 +#define BIT49 0x2000000000000 +#define BIT50 0x4000000000000 +#define BIT51 0x8000000000000 +#define BIT52 0x10000000000000 +#define BIT53 0x20000000000000 +#define BIT54 0x40000000000000 +#define BIT55 0x80000000000000 +#define BIT56 0x100000000000000 +#define BIT57 0x200000000000000 +#define BIT58 0x400000000000000 +#define BIT59 0x800000000000000 +#define BIT60 0x1000000000000000 +#define BIT61 0x2000000000000000 +#define BIT62 0x4000000000000000 +#define BIT63 0x8000000000000000 +#endif + +#define MmPciExpressAddress(Segment, Bus, Device, Function, Register) \ + ( (UINTN) (PciRead32 (PCI_LIB_ADDRESS (0,0,0,0x60)) & 0xFC000000) + \ + (UINTN) (Bus << 20) + \ + (UINTN) (Device << 15) + \ + (UINTN) (Function << 12) + \ + (UINTN) (Register) \ + ) + +EFI_STATUS +InitializeDptf ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ); + +VOID +LoadAcpiTables( + VOID + ); + +VOID +LoadAcpiTablesFfrd( + VOID + ); + +#endif diff --git a/ReferenceCode/AcpiTables/Dptf/Dxe/Dptf.inf b/ReferenceCode/AcpiTables/Dptf/Dxe/Dptf.inf new file mode 100644 index 0000000..1de1ee6 --- /dev/null +++ b/ReferenceCode/AcpiTables/Dptf/Dxe/Dptf.inf @@ -0,0 +1,83 @@ +## @file +# Component description file for Dptf module +# +#@copyright +# Copyright (c) 2012 Intel Corporation. All rights reserved +# This software and associated documentation (if any) is furnished +# under a license and may only be used or copied in accordance +# with the terms of the license. Except as permitted by such +# license, no part of this software or documentation may be +# reproduced, stored in a retrieval system, or transmitted in any +# form or by any means without the express written consent of +# Intel Corporation. +# +# This file contains an 'Intel Peripheral Driver' and uniquely +# identified as "Intel Reference Module" and is +# licensed for Intel CPUs and chipsets under the terms of your +# license agreement with Intel or your vendor. This file may +# be modified by the user, subject to additional terms of the +# license agreement +# + + +[defines] +BASE_NAME = Dptf +FILE_GUID = 918ABA30-3D8D-4bb5-B849-45CC4FC7DE7C +COMPONENT_TYPE = RT_DRIVER + +[sources.common] + Dptf.h + Dptf.c + +[includes.common] + $(EFI_SOURCE)/$(PROJECT_ACPI_ROOT) + $(EFI_SOURCE)/$(PROJECT_ACPI_ROOT)/Dptf + $(EFI_SOURCE)/$(PROJECT_ACPI_ROOT)/Dptf/Guid/AcpiTableStorage + . + $(EDK_SOURCE)/Sample/Chipset/PcCompatible + $(EDK_SOURCE)/Foundation + $(EDK_SOURCE)/Foundation/Include + $(EDK_SOURCE)/Foundation/Efi + $(EDK_SOURCE)/Foundation/Efi/Include + $(EDK_SOURCE)/Foundation/Framework + $(EDK_SOURCE)/Foundation/Framework/Include + $(EDK_SOURCE)/Include/IndustryStandard + $(EDK_SOURCE)/Foundation/Include/IndustryStandard + $(EDK_SOURCE)/Foundation/Core/Dxe + $(EDK_SOURCE)/Foundation/Core/Dxe/ArchProtocol/Cpu + $(EDK_SOURCE)/Foundation/Library/Dxe/Include + $(EFI_SOURCE) + $(EFI_SOURCE)/Framework + $(EFI_SOURCE)/Include + $(EFI_SOURCE)/Include/IndustryStandard + $(EDK_SOURCE)/Foundation/Library/EdkIIGlueLib/Include/Pcd + $(EDK_SOURCE)/Foundation/Library/EdkIIGlueLib/Include + $(EDK_SOURCE)/Foundation/Library/EdkIIGlueLib/Include/Library + $(EDK_SOURCE)/Foundation/Cpu/Pentium/Include + $(EFI_SOURCE)/$(PROJECT_SA_ROOT)/Include + +[libraries.common] + EdkIIGlueDxeReportStatusCodeLib + EdkIIGlueDxeDebugLibReportStatusCode + EdkProtocolLib + EfiProtocolLib + EfiDriverLib + ArchProtocolLib + EdkFrameworkProtocolLib + EdkIIGlueBasePciExpressLib + EdkIIGlueUefiBootServicesTableLib + EdkIIGlueUefiLib + EdkIIGlueBaseLib + EfiScriptLib + AcpiProtocolLib + DptfGuidLib + +[nmake.common] + IMAGE_ENTRY_POINT = InitializeDptf + DPX_SOURCE = Dptf.dxs +# +# Module Entry Point +# + C_FLAGS = $(C_FLAGS) -D"__EDKII_GLUE_MODULE_ENTRY_POINT__=InitializeDptf" \ + -D __EDKII_GLUE_DXE_REPORT_STATUS_CODE_LIB__ \ + -D __EDKII_GLUE_DXE_DEBUG_LIB_REPORT_STATUS_CODE__ diff --git a/ReferenceCode/AcpiTables/Dptf/Dxe/DptfDxe.cif b/ReferenceCode/AcpiTables/Dptf/Dxe/DptfDxe.cif new file mode 100644 index 0000000..78cbeda --- /dev/null +++ b/ReferenceCode/AcpiTables/Dptf/Dxe/DptfDxe.cif @@ -0,0 +1,13 @@ + + name = "DptfDxe" + category = ModulePart + LocalRoot = "ReferenceCode\AcpiTables\Dptf\Dxe\" + RefName = "DptfDxe" +[files] +"DptfDxe.sdl" +"DptfDxe.mak" +"Dptf.c" +"Dptf.dxs" +"Dptf.h" +"Dptf.inf" + diff --git a/ReferenceCode/AcpiTables/Dptf/Dxe/DptfDxe.mak b/ReferenceCode/AcpiTables/Dptf/Dxe/DptfDxe.mak new file mode 100644 index 0000000..1a0ac0a --- /dev/null +++ b/ReferenceCode/AcpiTables/Dptf/Dxe/DptfDxe.mak @@ -0,0 +1,106 @@ +#************************************************************************* +#************************************************************************* +#** ** +#** (C)Copyright 1985-2012, American Megatrends, Inc. ** +#** ** +#** All Rights Reserved. ** +#** ** +#** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 ** +#** ** +#** Phone: (770)-246-8600 ** +#** ** +#************************************************************************* +#************************************************************************* + +#************************************************************************* +# $Header: /Alaska/SOURCE/Modules/SharkBayRefCodes/DPTF/DptfDxe/DptfDxe.mak 2 9/26/12 2:00a Victortu $ +# +# $Revision: 2 $ +# +# $Date: 9/26/12 2:00a $ +#************************************************************************* +# Revision History +# ---------------- +# $Log: /Alaska/SOURCE/Modules/SharkBayRefCodes/DPTF/DptfDxe/DptfDxe.mak $ +# +# 2 9/26/12 2:00a Victortu +# +# 1 4/24/12 9:25a Victortu +# Intel DPTF initialization. +# +#************************************************************************* +# +# +# Name: DptfDxe.mak +# +# Description: MAke file to build Intel DPTF components +# +# +#************************************************************************* +EDK : DptfDxe + +DptfDxe : $(BUILD_DIR)\DptfDxe.mak DptfDxeBin + +DptfDxe_OBJECTS = \ +$(BUILD_DIR)\$(INTEL_DPTF_DXE_DIR)\Dptf.obj + +$(BUILD_DIR)\DptfDxe.mak : $(INTEL_DPTF_DXE_DIR)\$(@B).cif $(INTEL_DPTF_DXE_DIR)\$(@B).mak $(BUILD_RULES) + $(CIF2MAK) $(INTEL_DPTF_DXE_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS) + +DptfDxe_LIBS =\ + $(EDKPROTOCOLLIB)\ + $(EFIPROTOCOLLIB)\ + $(ARCHPROTOCOLLIB)\ + $(EDKFRAMEWORKPROTOCOLLIB)\ + $(EFISCRIPTLIB)\ + $(EdkIIGlueBaseLib_LIB)\ + $(EdkIIGlueBasePciExpressLib_LIB)\ + $(EdkIIGlueUefiBootServicesTableLib_LIB)\ + $(EdkIIGlueUefiLib_LIB)\ +!IF "$(x64_BUILD)"=="1" + $(EdkIIGlueBaseLibX64_LIB)\ +!ELSE + $(EdkIIGlueBaseLibIA32_LIB)\ +!ENDIF + $(EdkIIGlueDxeReportStatusCodeLib_LIB)\ + $(EdkIIGlueDxeServicesTableLib_LIB)\ + $(EdkIIGlueDxeDebugLibReportStatusCode_LIB)\ + $(EdkIIGlueDxeHobLib_LIB)\ + $(EFIDRIVERLIB)\ + $(AcpiProtocolLib_LIB)\ + $(DptfGuidLib_LIB)\ + +DptfDxe_INCLUDES= $(EDK_INCLUDES)\ + $(IndustryStandard_INCLUDES)\ + $(EdkIIGlueLib_INCLUDES)\ + $(DPTF_INCLUDES)\ + /I ReferenceCode\AcpiTables\ + /I$(ArchProtocolLib_DIR)\Cpu\ + /I$(INTEL_SYSTEM_AGENT_DIR)\Include\ + +DptfDxeBin: $(DptfDxe_LIBS) + $(MAKE) /$(MAKEFLAGS) $(EDKIIGLUE_DEFAULTS)\ + /f $(BUILD_DIR)\DptfDxe.mak all \ + NAME=DptfDxe\ + MAKEFILE=$(BUILD_DIR)\DptfDxe.mak \ + "MY_INCLUDES=$(DptfDxe_INCLUDES)"\ + GUID=918ABA30-3D8D-4bb5-B849-45CC4FC7DE7C\ + ENTRY_POINT=InitializeDptf \ + TYPE=RT_DRIVER\ + "OBJECTS=$(DptfDxe_OBJECTS)"\ + DEPEX1=$(INTEL_DPTF_DXE_DIR)\Dptf.dxs\ + DEPEX1_TYPE=EFI_SECTION_DXE_DEPEX\ + COMPRESS=1 +#************************************************************************* +#************************************************************************* +#** ** +#** (C)Copyright 1985-2012, American Megatrends, Inc. ** +#** ** +#** All Rights Reserved. ** +#** ** +#** 5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093 ** +#** ** +#** Phone: (770)-246-8600 ** +#** ** +#************************************************************************* +#************************************************************************* \ No newline at end of file diff --git a/ReferenceCode/AcpiTables/Dptf/Dxe/DptfDxe.sdl b/ReferenceCode/AcpiTables/Dptf/Dxe/DptfDxe.sdl new file mode 100644 index 0000000..03960e9 --- /dev/null +++ b/ReferenceCode/AcpiTables/Dptf/Dxe/DptfDxe.sdl @@ -0,0 +1,30 @@ +TOKEN + Name = DptfDxe_SUPPORT + Value = 1 + TokenType = Boolean + TargetEQU = Yes + TargetMAK = Yes + Master = Yes + Help = "Main switch to enable DptfDxe support in Project" +End + +MODULE + Help = "Includes DptfDxe.mak to Project" + File = "DptfDxe.mak" +End + +PATH + Name = "INTEL_DPTF_DXE_DIR" +End + +ELINK + Name = "/I$(INTEL_DPTF_DXE_DIR)" + Parent = "DPTF_INCLUDES" + InvokeOrder = AfterParent +End + +ELINK + Name = "$(BUILD_DIR)\DptfDxe.ffs" + Parent = "FV_MAIN" + InvokeOrder = AfterParent +End -- cgit v1.2.3