Checked in part of MDE library instances following PI and UEFI. It includes:

1) UefiLib adds features of RFC 3066/Iso639 language string and driver model protocols installation.

2) PeiCoreEntryPoint following PI.

3) UefiDriverEntryPoint following UEFI/EFI.

4) PeiServicesTablePointerLib following PI for IPF and x86.

5) Remove many CommonHeader.h. If there is only one C file in module, we should add the common headers in C file instead of creating a new CommonHeader.h.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2723 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
yshang1
2007-06-22 16:22:26 +00:00
parent 1a5589a183
commit c7d265a94a
119 changed files with 1033 additions and 1279 deletions

View File

@@ -25,8 +25,10 @@
//
#include <Protocol/DriverBinding.h>
#include <Protocol/ComponentName.h>
#include <Protocol/ComponentName2.h>
#include <Protocol/DriverConfiguration.h>
#include <Protocol/DriverDiagnostics.h>
#include <Protocol/DriverDiagnostics2.h>
#include <Guid/EventGroup.h>

View File

@@ -48,6 +48,7 @@
[Sources.common]
UefiLibPrint.c
UefiNotTiano.c
UefiDriverModel.c
Console.c
UefiLib.c
CommonHeader.h
@@ -116,6 +117,10 @@
[PcdsFixedAtBuild.common]
PcdUefiLibMaxPrintBufferSize|gEfiMdePkgTokenSpaceGuid
[PcdsFeatureFlag.common]
PcdDriverDiagnosticsDisable|gEfiMdePkgTokenSpaceGuid
PcdComponentNameDisable|gEfiMdePkgTokenSpaceGuid
PcdDriverDiagnostics2Disable|gEfiMdePkgTokenSpaceGuid
PcdComponentName2Disable|gEfiMdePkgTokenSpaceGuid

View File

@@ -55,6 +55,7 @@
<Filename>Console.c</Filename>
<Filename>UefiNotTiano.c</Filename>
<Filename>UefiLibPrint.c</Filename>
<Filename>UefiDriverModel.c</Filename>
</SourceFiles>
<PackageDependencies>
<Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
@@ -77,5 +78,25 @@
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<HelpText>This PCD is used by UefiLib APIs, which are Print, ErrorPrint, AsciiPrint, AsciiErrorPrint. If the length of the formatted Unicode or ASCII string is greater than PcdUefiLibMaxPrintBufferSize, then only the first (PcdUefiLibMaxPrintBufferSize / Sizeof(CHAR16)) Unicode characters or PcdUefiLibMaxPrintBufferSize Ascii characters are sent to the respective console.</HelpText>
</PcdEntry>
<PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_CONSUMED">
<C_Name>PcdDriverDiagnosticsDisable</C_Name>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<HelpText>If this value is set TRUE, autogen will replace Driver Diagnostics Protocol instance with NULL.</HelpText>
</PcdEntry>
<PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_CONSUMED">
<C_Name>PcdDriverDiagnostics2Disable</C_Name>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<HelpText>If this value is set TRUE, autogen will replace Driver Diagnostics2 Protocol instance with NULL.</HelpText>
</PcdEntry>
<PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_CONSUMED">
<C_Name>PcdComponentNameDisable</C_Name>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<HelpText>If this value is set TRUE, autogen will replace Component Name Protocol instance with NULL.</HelpText>
</PcdEntry>
<PcdEntry PcdItemType="FEATURE_FLAG" Usage="ALWAYS_CONSUMED">
<C_Name>PcdComponentName2Disable</C_Name>
<TokenSpaceGuidCName>gEfiMdePkgTokenSpaceGuid</TokenSpaceGuidCName>
<HelpText>If this value is set TRUE, autogen will replace Component Name2 Protocol instance with NULL.</HelpText>
</PcdEntry>
</PcdCoded>
</ModuleSurfaceArea>

View File

@@ -103,7 +103,10 @@ EfiCreateEventLegacyBootEx (
ASSERT (LegacyBootEvent != NULL);
if (gST->Hdr.Revision < 0x00020000) {
if (gST->Hdr.Revision < EFI_2_00_SYSTEM_TABLE_REVISION) {
DEBUG ((EFI_D_ERROR, "EFI1.1 can't support LegacyBootEvent!"));
ASSERT (FALSE);
return EFI_UNSUPPORTED;
} else {
//
@@ -145,7 +148,7 @@ EfiCreateEventReadyToBoot (
)
{
return EfiCreateEventReadyToBootEx (
TPL_CALLBACK ,
TPL_CALLBACK,
InternalEmptyFuntion,
NULL,
ReadyToBootEvent
@@ -184,7 +187,10 @@ EfiCreateEventReadyToBootEx (
ASSERT (ReadyToBootEvent != NULL);
if (gST->Hdr.Revision < 0x00020000) {
if (gST->Hdr.Revision < EFI_2_00_SYSTEM_TABLE_REVISION) {
DEBUG ((EFI_D_ERROR, "EFI1.1 can't support ReadyToBootEvent!"));
ASSERT (FALSE);
return EFI_UNSUPPORTED;
} else {
//
@@ -269,16 +275,20 @@ EfiSignalEventLegacyBoot (
@retval Other FvDevicePathNode is valid and pointer to NameGuid was returned.
**/
EFI_GUID *
EFI_GUID*
EFIAPI
EfiGetNameGuidFromFwVolDevicePathNode (
IN CONST MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvDevicePathNode
IN CONST MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvFileDevicePathNode
)
{
ASSERT (FvDevicePathNode != NULL);
//
// bugbug:Need to implement ...
//
ASSERT (FvFileDevicePathNode != NULL);
if (FvFileDevicePathNode->Header.Type == MEDIA_DEVICE_PATH &&
FvFileDevicePathNode->Header.SubType == MEDIA_PIWG_FW_FILE_DP
) {
return (EFI_GUID *) &FvFileDevicePathNode->FvFileName;
}
return NULL;
}
@@ -300,14 +310,20 @@ EfiGetNameGuidFromFwVolDevicePathNode (
VOID
EFIAPI
EfiInitializeFwVolDevicepathNode (
IN OUT MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvDevicePathNode,
IN CONST EFI_GUID *NameGuid
IN OUT MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvFileDevicePathNode,
IN CONST EFI_GUID *NameGuid
)
{
ASSERT (FvDevicePathNode != NULL);
ASSERT (FvFileDevicePathNode != NULL);
ASSERT (NameGuid != NULL);
//
// bugbug:Need to implement ...
// Use the new Device path that does not conflict with the UEFI
//
FvFileDevicePathNode->Header.Type = MEDIA_DEVICE_PATH;
FvFileDevicePathNode->Header.SubType = MEDIA_PIWG_FW_FILE_DP;
SetDevicePathNodeLength (&FvFileDevicePathNode->Header, sizeof (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH));
CopyGuid (&FvFileDevicePathNode->FvFileName, NameGuid);
}