diff options
Diffstat (limited to 'ReferenceCode/AcpiTables/AcpiFvi')
-rw-r--r-- | ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.c | 67 | ||||
-rw-r--r-- | ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.cif | 13 | ||||
-rw-r--r-- | ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.dxs | 41 | ||||
-rw-r--r-- | ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.h | 28 | ||||
-rw-r--r-- | ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.inf | 80 | ||||
-rw-r--r-- | ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.mak | 56 | ||||
-rw-r--r-- | ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.sdl | 24 |
7 files changed, 309 insertions, 0 deletions
diff --git a/ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.c b/ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.c new file mode 100644 index 0000000..94d2a90 --- /dev/null +++ b/ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.c @@ -0,0 +1,67 @@ +/** @file + ACPI RC FVI DXE driver + +@copyright + Copyright (c) 2011 - 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 a 'Sample Driver' and is licensed as such + under the terms of your license agreement with Intel or your + vendor. This file may be modified by the user, subject to + the additional terms of the license agreement +**/ + +/// +/// External include files do NOT need to be explicitly specified in real EDKII +/// environment +/// +#if !defined(EDK_RELEASE_VERSION) || (EDK_RELEASE_VERSION < 0x00020000) +#include "AcpiFvi.h" +#endif /// EDK_RELEASE_VERSION + +FVI_ELEMENT_AND_FUNCTION mAcpiFviElementsData[] = { + { + DEFAULT_FVI_ELEMENT_DATA (ACPI), + NULL + } +}; + +FVI_DATA_HUB_CALLBACK_CONTEXT mAcpiFviVersionData = { + MISC_SUBCLASS_FVI_HEADER_ENTRY (ACPI), + mAcpiFviElementsData, +}; + +UINTN mAcpiFviElements = sizeof (mAcpiFviElementsData) / sizeof (FVI_ELEMENT_AND_FUNCTION); + +EFI_STATUS +AcpiFviEntryPoint ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +/** +@brief + The entry-point of ACPI RC FVI DXE driver + + @param[in] ImageHandle - Standard entry point parameter. + @param[in] SystemTable - Standard entry point parameter. + + @retval EFI_STATUS +**/ +{ + + InitFviDataHubCbContext ( + ACPI_FVI_SMBIOS_TYPE, + (UINT8) mAcpiFviElements, + &mAcpiFviVersionData + ); + + CreateRcFviDatahub (&mAcpiFviVersionData); + + return EFI_SUCCESS; +} diff --git a/ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.cif b/ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.cif new file mode 100644 index 0000000..54efa3d --- /dev/null +++ b/ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.cif @@ -0,0 +1,13 @@ +<component> + name = "AcpiFvi" + category = ModulePart + LocalRoot = "ReferenceCode\AcpiTables\AcpiFvi\" + RefName = "AcpiFvi" +[files] +"AcpiFvi.sdl" +"AcpiFvi.mak" +"AcpiFvi.c" +"AcpiFvi.dxs" +"AcpiFvi.h" +"AcpiFvi.inf" +<endComponent> diff --git a/ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.dxs b/ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.dxs new file mode 100644 index 0000000..3b352ff --- /dev/null +++ b/ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.dxs @@ -0,0 +1,41 @@ +/** @file + Dependency expression source file. + +@copyright + Copyright (c) 2011 - 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 a 'Sample Driver' and is licensed as such + under the terms of your license agreement with Intel or your + vendor. This file may be modified by the user, subject to + the additional terms of the license agreement + +**/ + + +// +// Common for R8 and R9 codebase +// +#include "AutoGen.h" +#include "DxeDepex.h" + +// +// BUILD_WITH_GLUELIB and BUILD_WITH_EDKII_GLUE_LIB are both "defined" in R8 codebase; +// BUILD_WITH_EDKII_GLUE_LIB is defined in Edk-Dev-Snapshot-20070228 and later version +// BUILD_WITH_GLUELIB and BUILD_WITH_EDKII_GLUE_LIB are "not defined" in R9 codebase. +// +#if defined (BUILD_WITH_GLUELIB) || defined (BUILD_WITH_EDKII_GLUE_LIB) +#include "EfiDepex.h" +#include EFI_PROTOCOL_DEFINITION (DataHub) +#endif + +DEPENDENCY_START + EFI_DATA_HUB_PROTOCOL_GUID +DEPENDENCY_END + diff --git a/ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.h b/ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.h new file mode 100644 index 0000000..09e38e6 --- /dev/null +++ b/ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.h @@ -0,0 +1,28 @@ +/** @file + Definitions for ACPI RC FVI DXE driver + +@copyright + Copyright (c) 2011 - 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 a 'Sample Driver' and is licensed as such + under the terms of your license agreement with Intel or your + vendor. This file may be modified by the user, subject to + the additional terms of the license agreement +**/ +#ifndef _ACPI_RC_FVI_H_ +#define _ACPI_RC_FVI_H_ +#include "EdkIIGlueDxe.h" +#include "RcFviDxeLib.h" +#include EFI_PROTOCOL_PRODUCER (AcpiInfo) + +#define ACPI_FVI_STRING "Reference Code - ACPI" +#define ACPI_FVI_SMBIOS_TYPE 0xDD ///< Default value +#define ACPI_FVI_SMBIOS_INSTANCE 0x01 +#endif diff --git a/ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.inf b/ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.inf new file mode 100644 index 0000000..21873da --- /dev/null +++ b/ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.inf @@ -0,0 +1,80 @@ +## @file +# Component description file for ACPI RC FVI DXE driver +# +#@copyright +# Copyright (c) 2011 - 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 a 'Sample Driver' and is licensed as such +# under the terms of your license agreement with Intel or your +# vendor. This file may be modified by the user, subject to +# the additional terms of the license agreement +# + +[defines] +BASE_NAME = AcpiFvi +FILE_GUID = D7E31ECB-0A17-4529-9B84-C529DE8E1C0E +COMPONENT_TYPE = BS_DRIVER + +[sources.common] + AcpiFvi.c + AcpiFvi.h +# +# Edk II Glue Driver Entry Point +# + EdkIIGlueDxeDriverEntryPoint.c + +[includes.common] +# +# EDK II Glue Library utilizes some standard headers from EDK +# + $(EDK_SOURCE)/Foundation + $(EDK_SOURCE)/Foundation/Core/Dxe + $(EDK_SOURCE)/Foundation/Efi + $(EDK_SOURCE)/Foundation/Efi/Include + $(EDK_SOURCE)/Foundation/Framework + $(EDK_SOURCE)/Foundation/Framework/Include + $(EDK_SOURCE)/Foundation/Include + $(EDK_SOURCE)/Foundation/Include/IndustryStandard + $(EDK_SOURCE)/Foundation/Library/Dxe/Include + $(EDK_SOURCE)/Foundation/Library/EdkIIGlueLib/Include + $(EFI_SOURCE)/$(PROJECT_PCH_ROOT)/Include/Library + $(EFI_SOURCE)/$(PROJECT_ACPI_ROOT) + +[libraries.common] + EfiProtocolLib + EdkProtocolLib + EdkFrameworkProtocolLib + EdkIIGlueBaseIoLibIntrinsic + EdkIIGlueDxeReportStatusCodeLib + EdkIIGlueDxeDebugLibReportStatusCode + EdkIIGlueUefiBootServicesTableLib + EdkIIGlueUefiRuntimeServicesTableLib + EdkIIGlueUefiLib + EdkIIGlueBasePciLibPciExpress + EdkIIGlueBasePciExpressLib + EdkIIGlueDxeServicesTableLib + RcFviDxeLib + AcpiProtocolLib + +[nmake.common] + IMAGE_ENTRY_POINT=_ModuleEntryPoint + DPX_SOURCE=AcpiFvi.dxs +# +# Module Entry Point +# + C_FLAGS = $(C_FLAGS) -D __EDKII_GLUE_MODULE_ENTRY_POINT__=AcpiFviEntryPoint + C_FLAGS = $(C_FLAGS) -D __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__ \ + -D __EDKII_GLUE_DXE_REPORT_STATUS_CODE_LIB__ \ + -D __EDKII_GLUE_DXE_DEBUG_LIB_REPORT_STATUS_CODE__ \ + -D __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__ \ + -D __EDKII_GLUE_UEFI_RUNTIME_SERVICES_TABLE_LIB__ \ + -D __EDKII_GLUE_UEFI_LIB__ \ + -D __EDKII_GLUE_DXE_SERVICES_TABLE_LIB__ \ + -D __EDKII_GLUE_BASE_PCI_LIB_PCI_EXPRESS__ diff --git a/ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.mak b/ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.mak new file mode 100644 index 0000000..ce67b84 --- /dev/null +++ b/ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.mak @@ -0,0 +1,56 @@ +#--------------------------------------------------------------------------- +# Create AcpiFvi Driver +#--------------------------------------------------------------------------- +EDK : AcpiFvi + +AcpiFvi: $(BUILD_DIR)\AcpiFvi.mak AcpiFviBin + +$(BUILD_DIR)\AcpiFvi.mak : $(AcpiFvi_DIR)\$(@B).cif $(AcpiFvi_DIR)\$(@B).mak $(BUILD_RULES) + $(CIF2MAK) $(AcpiFvi_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS) + + +AcpiFvi_DEFINES =$(MY_DEFINES)\ + /D "__EDKII_GLUE_MODULE_ENTRY_POINT__=AcpiFviEntryPoint" \ + /D __EDKII_GLUE_BASE_IO_LIB_INTRINSIC__ \ + /D __EDKII_GLUE_DXE_REPORT_STATUS_CODE_LIB__ \ + /D __EDKII_GLUE_DXE_DEBUG_LIB_REPORT_STATUS_CODE__ \ + /D __EDKII_GLUE_UEFI_BOOT_SERVICES_TABLE_LIB__\ + /D __EDKII_GLUE_UEFI_RUNTIME_SERVICES_TABLE_LIB__ \ + /D __EDKII_GLUE_UEFI_LIB__\ + /D __EDKII_GLUE_DXE_SERVICES_TABLE_LIB__ \ + /D __EDKII_GLUE_BASE_PCI_LIB_PCI_EXPRESS__ \ + + +AcpiFvi_LIB_LINKS =\ + $(EFIPROTOCOLLIB)\ + $(EDKFRAMEWORKPROTOCOLLIB)\ + $(EdkIIGlueBaseIoLibIntrinsic_LIB)\ + $(EdkIIGlueDxeReportStatusCodeLib_LIB)\ + $(EdkIIGlueDxeDebugLibReportStatusCode_LIB)\ + $(EdkIIGlueUefiBootServicesTableLib_LIB)\ + $(EdkIIGlueUefiRuntimeServicesTableLib_LIB)\ + $(EdkIIGlueDxeServicesTableLib_LIB)\ + $(EdkIIGlueUefiLib_LIB)\ + $(EdkIIGlueBasePciLibPciExpress_LIB)\ + $(EdkIIGlueBasePciExpressLib_LIB)\ + $(RcFviDxeLib_LIB)\ + $(EDKPROTOCOLLIB)\ + $(AcpiProtocolLib_LIB)\ + +AcpiFvi_INCLUDES=\ + /I ReferenceCode\AcpiTables\ + $(EdkIIGlueLib_INCLUDES)\ + $(INTEL_PCH_INCLUDES)\ + +AcpiFviBin: $(AcpiFvi_LIB_LINKS) + $(MAKE) /$(MAKEFLAGS) $(EDKIIGLUE_DEFAULTS)\ + /f $(BUILD_DIR)\AcpiFvi.mak all \ + "MY_INCLUDES=$(AcpiFvi_INCLUDES)"\ + "MY_DEFINES=$(AcpiFvi_DEFINES)"\ + GUID=D7E31ECB-0A17-4529-9B84-C529DE8E1C0E\ + ENTRY_POINT=_ModuleEntryPoint \ + TYPE=BS_DRIVER\ + EDKIIModule=DXEDRIVER\ + DEPEX1=$(AcpiFvi_DIR)\AcpiFvi.dxs\ + DEPEX1_TYPE=EFI_SECTION_DXE_DEPEX\ + COMPRESS=1 diff --git a/ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.sdl b/ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.sdl new file mode 100644 index 0000000..2fd8ad0 --- /dev/null +++ b/ReferenceCode/AcpiTables/AcpiFvi/AcpiFvi.sdl @@ -0,0 +1,24 @@ +TOKEN + Name = "AcpiFvi_SUPPORT" + Value = "1" + Help = "Main switch to enable AcpiFvi support in Project" + TokenType = Boolean + TargetEQU = Yes + TargetMAK = Yes + Master = Yes +End + +PATH + Name = "AcpiFvi_DIR" +End + +MODULE + File = "AcpiFvi.mak" + Help = "Includes AcpiFvi.mak to Project" +End + +ELINK + Name = "$(BUILD_DIR)\AcpiFvi.ffs" + Parent = "FV_MAIN" + InvokeOrder = AfterParent +End
\ No newline at end of file |