Add inf files for PeiSmbusLibSmbus2, PeiDxePostCodeLibReportStatusCode, PeiMemoryLib and DxeSmbusLib
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3066 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -15,9 +15,9 @@ Module Name: DxeSmbusLib.c
|
||||
|
||||
**/
|
||||
|
||||
|
||||
#include "InternalSmbusLib.h"
|
||||
|
||||
#include <Protocol/SmbusHc.h>
|
||||
|
||||
//
|
||||
// Globle varible to cache pointer to Smbus protocol.
|
||||
|
84
MdePkg/Library/DxeSmbusLib/DxeSmbusLib.inf
Normal file
84
MdePkg/Library/DxeSmbusLib/DxeSmbusLib.inf
Normal file
@ -0,0 +1,84 @@
|
||||
#/** @file
|
||||
# Component description file for Dxe Smbus Library.
|
||||
#
|
||||
# SMBUS Library that layers on top of the SMBUS Protocol.
|
||||
# Copyright (c) 2006, Intel Corporation
|
||||
#
|
||||
# All rights reserved. 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 Section - statements that will be processed to create a Makefile.
|
||||
#
|
||||
################################################################################
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010005
|
||||
BASE_NAME = DxeSmbusLib
|
||||
FILE_GUID = 4F369FB1-31A7-423c-960E-B3EFD337894F
|
||||
MODULE_TYPE = DXE_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = SmbusLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
|
||||
EDK_RELEASE_VERSION = 0x00020000
|
||||
EFI_SPECIFICATION_VERSION = 0x00020000
|
||||
|
||||
CONSTRUCTOR = SmbusLibConstructor
|
||||
|
||||
#
|
||||
# The following information is for reference only and not required by the build tools.
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
||||
#
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Sources Section - list of files that are required for the build to succeed.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Sources.common]
|
||||
SmbusLib.c
|
||||
DxeSmbusLib.c
|
||||
InternalSmbusLib.h
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Package Dependency Section - list of Package files that are required for
|
||||
# this module.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Library Class Section - list of Library Classes that are required for
|
||||
# this module.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[LibraryClasses]
|
||||
BaseMemoryLib
|
||||
UefiBootServicesTableLib
|
||||
DebugLib
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Protocol C Name Section - list of Protocol and Protocol Notify C Names
|
||||
# that this module uses or produces.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Protocols]
|
||||
gEfiSmbusHcProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||
|
@ -3,7 +3,7 @@
|
||||
<MsaHeader>
|
||||
<ModuleName>DxeSmbusLib</ModuleName>
|
||||
<ModuleType>DXE_DRIVER</ModuleType>
|
||||
<GuidValue>07720769-A7D0-4a8d-BE41-71CC18EB3338</GuidValue>
|
||||
<GuidValue>4F369FB1-31A7-423c-960E-B3EFD337894F</GuidValue>
|
||||
<Version>1.0</Version>
|
||||
<Abstract>Component description file for Dxe Smbus Library.</Abstract>
|
||||
<Description>SMBUS Library that layers on top of the SMBUS Protocol.</Description>
|
||||
@ -45,7 +45,7 @@
|
||||
</PackageDependencies>
|
||||
<Protocols>
|
||||
<Protocol Usage="ALWAYS_CONSUMED">
|
||||
<ProtocolCName>gEfiSmbusProtocolGuid</ProtocolCName>
|
||||
<ProtocolCName>gEfiSmbusHcProtocolGuid</ProtocolCName>
|
||||
</Protocol>
|
||||
</Protocols>
|
||||
<Externs>
|
||||
|
@ -16,6 +16,22 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#ifndef __INTERNAL_SMBUS_LIB_H
|
||||
#define __INTERNAL_SMBUS_LIB_H
|
||||
|
||||
//
|
||||
// The package level header files this module uses
|
||||
//
|
||||
#include <PiDxe.h>
|
||||
//
|
||||
// The protocols, PPI and GUID defintions for this module
|
||||
//
|
||||
#include <Protocol/SmbusHc.h>
|
||||
//
|
||||
// The Library classes this module consumes
|
||||
//
|
||||
#include <Library/SmbusLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
|
||||
#include <IndustryStandard/Smbus.h>
|
||||
|
||||
#define SMBUS_LIB_SLAVE_ADDRESS(SmBusAddress) (((SmBusAddress) >> 1) & 0x7f)
|
||||
|
@ -14,6 +14,17 @@
|
||||
|
||||
**/
|
||||
|
||||
//
|
||||
// The package level header files this module uses
|
||||
//
|
||||
#include <PiDxe.h>
|
||||
//
|
||||
// The Library classes this module consumes
|
||||
//
|
||||
#include <Library/HiiLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
|
||||
/**
|
||||
This function allocates pool for an EFI_HII_PACKAGES structure
|
||||
with enough space for the variable argument list of package pointers.
|
||||
|
@ -0,0 +1,80 @@
|
||||
#/** @file
|
||||
# Post code library based on report status code library
|
||||
#
|
||||
# PostCode Library for PEIMs and DXE drivers that send PostCode to ReportStatusCode
|
||||
# Copyright (c) 2006, Intel Corporation.
|
||||
#
|
||||
# All rights reserved. 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 Section - statements that will be processed to create a Makefile.
|
||||
#
|
||||
################################################################################
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010005
|
||||
BASE_NAME = PeiDxePostCodeLibReportStatusCode
|
||||
FILE_GUID = e062c52d-78dc-4cc5-b246-b13497a8123c
|
||||
MODULE_TYPE = PEIM
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = PostCodeLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER PEIM PEI_CORE UEFI_APPLICATION UEFI_DRIVER
|
||||
EDK_RELEASE_VERSION = 0x00020000
|
||||
EFI_SPECIFICATION_VERSION = 0x00020000
|
||||
|
||||
|
||||
#
|
||||
# The following information is for reference only and not required by the build tools.
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
||||
#
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Sources Section - list of files that are required for the build to succeed.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Sources.common]
|
||||
PostCode.c
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Package Dependency Section - list of Package files that are required for
|
||||
# this module.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Library Class Section - list of Library Classes that are required for
|
||||
# this module.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[LibraryClasses]
|
||||
BaseLib
|
||||
PcdLib
|
||||
ReportStatusCodeLib
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Pcd FIXED_AT_BUILD - list of PCDs that this module is coded for.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[PcdsFixedAtBuild.common]
|
||||
PcdPostCodePropertyMask|gEfiMdePkgTokenSpaceGuid
|
||||
|
@ -12,6 +12,18 @@
|
||||
|
||||
**/
|
||||
|
||||
//
|
||||
// The package level header files this module uses
|
||||
//
|
||||
#include <PiPei.h>
|
||||
//
|
||||
// The Library classes this module consumes
|
||||
//
|
||||
#include <Library/PostCodeLib.h>
|
||||
#include <Library/ReportStatusCodeLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
#include <Library/BaseLib.h>
|
||||
|
||||
/**
|
||||
Converts POST code value to status code value.
|
||||
|
||||
|
@ -23,6 +23,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#include "MemLibInternals.h"
|
||||
|
||||
/**
|
||||
Copies a source GUID to a destination GUID.
|
||||
|
||||
|
@ -26,6 +26,18 @@
|
||||
#ifndef __MEM_LIB_INTERNALS__
|
||||
#define __MEM_LIB_INTERNALS__
|
||||
|
||||
//
|
||||
// The package level header files this module uses
|
||||
//
|
||||
#include <PiPei.h>
|
||||
//
|
||||
// The Library classes this module consumes
|
||||
//
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/PeiServicesTablePointerLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/BaseLib.h>
|
||||
|
||||
/**
|
||||
Copy Length bytes from Source to Destination.
|
||||
|
||||
|
86
MdePkg/Library/PeiMemoryLib/PeiMemoryLib.inf
Normal file
86
MdePkg/Library/PeiMemoryLib/PeiMemoryLib.inf
Normal file
@ -0,0 +1,86 @@
|
||||
#/** @file
|
||||
# Component description file for Pei Memory Library
|
||||
#
|
||||
# Base Memory Library implementation that uses PEI Services
|
||||
# where possible for size reduction.
|
||||
# Copyright (c) 2006, Intel Corporation
|
||||
#
|
||||
# All rights reserved. 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 Section - statements that will be processed to create a Makefile.
|
||||
#
|
||||
################################################################################
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010005
|
||||
BASE_NAME = PeiMemoryLib
|
||||
FILE_GUID = 3a9759d2-53bc-4eb2-abcd-c93099419063
|
||||
MODULE_TYPE = PEIM
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = BaseMemoryLib|PEIM
|
||||
EDK_RELEASE_VERSION = 0x00020000
|
||||
EFI_SPECIFICATION_VERSION = 0x00020000
|
||||
|
||||
|
||||
#
|
||||
# The following information is for reference only and not required by the build tools.
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
||||
#
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Sources Section - list of files that are required for the build to succeed.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Sources.common]
|
||||
ScanMem64Wrapper.c
|
||||
ScanMem32Wrapper.c
|
||||
ScanMem16Wrapper.c
|
||||
ScanMem8Wrapper.c
|
||||
ZeroMemWrapper.c
|
||||
CompareMemWrapper.c
|
||||
SetMem64Wrapper.c
|
||||
SetMem32Wrapper.c
|
||||
SetMem16Wrapper.c
|
||||
SetMemWrapper.c
|
||||
CopyMemWrapper.c
|
||||
MemLibGeneric.c
|
||||
MemLibGuid.c
|
||||
MemLib.c
|
||||
MemLibInternals.h
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Package Dependency Section - list of Package files that are required for
|
||||
# this module.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Library Class Section - list of Library Classes that are required for
|
||||
# this module.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[LibraryClasses]
|
||||
BaseLib
|
||||
DebugLib
|
||||
PeiServicesTablePointerLib
|
||||
|
@ -16,6 +16,22 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#ifndef __INTERNAL_SMBUS_LIB_H
|
||||
#define __INTERNAL_SMBUS_LIB_H
|
||||
|
||||
//
|
||||
// The package level header files this module uses
|
||||
//
|
||||
#include <PiPei.h>
|
||||
//
|
||||
// The protocols, PPI and GUID defintions for this module
|
||||
//
|
||||
#include <Ppi/Smbus2.h>
|
||||
//
|
||||
// The Library classes this module consumes
|
||||
//
|
||||
#include <Library/SmbusLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/PeiServicesTablePointerLib.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
|
||||
#define SMBUS_LIB_SLAVE_ADDRESS(SmBusAddress) (((SmBusAddress) >> 1) & 0x7f)
|
||||
#define SMBUS_LIB_COMMAND(SmBusAddress) (((SmBusAddress) >> 8) & 0xff)
|
||||
#define SMBUS_LIB_LENGTH(SmBusAddress) (((SmBusAddress) >> 16) & 0x3f)
|
||||
|
@ -15,8 +15,6 @@ Module Name: PeiSmbusLib.c
|
||||
|
||||
**/
|
||||
|
||||
#include <Ppi/Smbus2.h>
|
||||
|
||||
#include "InternalSmbusLib.h"
|
||||
|
||||
/**
|
||||
|
84
MdePkg/Library/PeiSmbusLibSmbus2/PeiSmbusLib.inf
Normal file
84
MdePkg/Library/PeiSmbusLibSmbus2/PeiSmbusLib.inf
Normal file
@ -0,0 +1,84 @@
|
||||
#/** @file
|
||||
# Component description file for Pei Smbus Library.
|
||||
#
|
||||
# SMBUS library that layers on top of the SMBUS PPI.
|
||||
# Copyright (c) 2006 - 2007, Intel Corporation
|
||||
#
|
||||
# All rights reserved. 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 Section - statements that will be processed to create a Makefile.
|
||||
#
|
||||
################################################################################
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010005
|
||||
BASE_NAME = PeiSmbusLib
|
||||
FILE_GUID = 2A1E1C92-AABA-4d62-AC40-F3A4C3387356
|
||||
MODULE_TYPE = PEIM
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = SmbusLib|PEIM
|
||||
EDK_RELEASE_VERSION = 0x00020000
|
||||
EFI_SPECIFICATION_VERSION = 0x00020000
|
||||
|
||||
|
||||
#
|
||||
# The following information is for reference only and not required by the build tools.
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
||||
#
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Sources Section - list of files that are required for the build to succeed.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Sources.common]
|
||||
SmbusLib.c
|
||||
PeiSmbusLib.c
|
||||
InternalSmbusLib.h
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Package Dependency Section - list of Package files that are required for
|
||||
# this module.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Library Class Section - list of Library Classes that are required for
|
||||
# this module.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[LibraryClasses]
|
||||
BaseMemoryLib
|
||||
PeiServicesTablePointerLib
|
||||
DebugLib
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# PPI C Name Section - list of PPI and PPI Notify C Names that this module
|
||||
# uses or produces.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
[Ppis]
|
||||
gEfiPeiSmbus2PpiGuid # PPI ALWAYS_CONSUMED
|
||||
|
@ -3,7 +3,7 @@
|
||||
<MsaHeader>
|
||||
<ModuleName>PeiSmbusLib</ModuleName>
|
||||
<ModuleType>PEIM</ModuleType>
|
||||
<GuidValue>51C4C059-67F0-4e3c-9A55-FF42A8291C8C</GuidValue>
|
||||
<GuidValue>2A1E1C92-AABA-4d62-AC40-F3A4C3387356</GuidValue>
|
||||
<Version>1.0</Version>
|
||||
<Abstract>Component description file for Pei Smbus Library.</Abstract>
|
||||
<Description>SMBUS library that layers on top of the SMBUS PPI.</Description>
|
||||
@ -45,7 +45,7 @@
|
||||
</PackageDependencies>
|
||||
<PPIs>
|
||||
<Ppi Usage="ALWAYS_CONSUMED">
|
||||
<PpiCName>gEfiPeiSmbusPpiGuid</PpiCName>
|
||||
<PpiCName>gEfiPeiSmbusPpi2Guid</PpiCName>
|
||||
</Ppi>
|
||||
</PPIs>
|
||||
<Externs>
|
||||
|
@ -15,7 +15,6 @@ Module Name: SmbusLib.c
|
||||
|
||||
**/
|
||||
|
||||
#include <Ppi/Smbus2.h>
|
||||
#include "InternalSmbusLib.h"
|
||||
|
||||
/**
|
||||
|
@ -98,16 +98,19 @@
|
||||
${WORKSPACE}/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf
|
||||
${WORKSPACE}/MdePkg/Library/DxePcdLib/DxePcdLib.inf
|
||||
${WORKSPACE}/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
|
||||
# ${WORKSPACE}/MdePkg/Library/DxeSmbusLib/DxeSmbusLib.inf
|
||||
${WORKSPACE}/MdePkg/Library/DxeSmbusLib/DxeSmbusLib.inf
|
||||
#${WORKSPACE}/MdePkg/Library/HiiLib/HiiLib.inf
|
||||
${WORKSPACE}/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
|
||||
${WORKSPACE}/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PeiDxePostCodeLibReportStatusCode.inf
|
||||
${WORKSPACE}/MdePkg/Library/PeiHobLib/PeiHobLib.inf
|
||||
${WORKSPACE}/MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
|
||||
${WORKSPACE}/MdePkg/Library/PeiMemoryLib/PeiMemoryLib.inf
|
||||
${WORKSPACE}/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
|
||||
${WORKSPACE}/MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
|
||||
${WORKSPACE}/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
|
||||
${WORKSPACE}/MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
|
||||
${WORKSPACE}/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
|
||||
# ${WORKSPACE}/MdePkg/Library/PeiSmbusLib/PeiSmbusLib.inf
|
||||
${WORKSPACE}/MdePkg/Library/PeiSmbusLibSmbus2/PeiSmbusLib.inf
|
||||
${WORKSPACE}/MdePkg/Library/SerialPortLibNull/SerialPortLibNull.inf
|
||||
${WORKSPACE}/MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
|
||||
${WORKSPACE}/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
|
||||
|
Reference in New Issue
Block a user