1. Add PeiDxeDebugLibReportStatusCode.inf and UefiLibFramework/UefiLib.inf

2. Add FRAMEWORK_MIDIA_FW_VOL_FILEPATH_DEVICE_PATH definition in FrameworkDxeCis.h

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2830 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff
2007-06-28 05:58:38 +00:00
parent 564995cdf5
commit b51e6bc460
11 changed files with 681 additions and 48 deletions

View File

@ -384,28 +384,28 @@ EfiReleaseLock (
gBS->RestoreTPL (Tpl);
}
/**
Tests whether a controller handle is being managed by a specific driver.
/**
Tests whether a controller handle is being managed by a specific driver.
This function tests whether the driver specified by DriverBindingHandle is
currently managing the controller specified by ControllerHandle. This test
is performed by evaluating if the the protocol specified by ProtocolGuid is
present on ControllerHandle and is was opened by DriverBindingHandle with an
attribute of EFI_OPEN_PROTOCOL_BY_DRIVER.
If ProtocolGuid is NULL, then ASSERT().
@param ControllerHandle A handle for a controller to test.
@param DriverBindingHandle Specifies the driver binding handle for the
driver.
@param ProtocolGuid Specifies the protocol that the driver specified
by DriverBindingHandle opens in its Start()
function.
@retval EFI_SUCCESS ControllerHandle is managed by the driver
specifed by DriverBindingHandle.
@retval EFI_UNSUPPORTED ControllerHandle is not managed by the driver
specifed by DriverBindingHandle.
@param ControllerHandle A handle for a controller to test.
@param DriverBindingHandle Specifies the driver binding handle for the
driver.
@param ProtocolGuid Specifies the protocol that the driver specified
by DriverBindingHandle opens in its Start()
function.
@retval EFI_SUCCESS ControllerHandle is managed by the driver
specifed by DriverBindingHandle.
@retval EFI_UNSUPPORTED ControllerHandle is not managed by the driver
specifed by DriverBindingHandle.
**/
EFI_STATUS
EFIAPI
@ -445,24 +445,24 @@ EfiTestManagedDevice (
return EFI_SUCCESS;
}
/**
Tests whether a child handle is a child device of the controller.
/**
Tests whether a child handle is a child device of the controller.
This function tests whether ChildHandle is one of the children of
ControllerHandle. This test is performed by checking to see if the protocol
specified by ProtocolGuid is present on ControllerHandle and opened by
ChildHandle with an attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
If ProtocolGuid is NULL, then ASSERT().
@param ControllerHandle A handle for a (parent) controller to test.
@param ChildHandle A child handle to test.
@param ConsumsedGuid Supplies the protocol that the child controller
@param ChildHandle A child handle to test.
@param ConsumsedGuid Supplies the protocol that the child controller
opens on its parent controller.
@retval EFI_SUCCESS ChildHandle is a child of the ControllerHandle.
@retval EFI_UNSUPPORTED ChildHandle is not a child of the
ControllerHandle.
@retval EFI_SUCCESS ChildHandle is a child of the ControllerHandle.
@retval EFI_UNSUPPORTED ChildHandle is not a child of the
ControllerHandle.
**/
EFI_STATUS
EFIAPI

View File

@ -0,0 +1,114 @@
#/** @file
# Component description file for the entry point to a EFIDXE Drivers
#
# Library to abstract Framework extensions that conflict with UEFI 2.0 Specification
#
# Help Port Framework/Tinao code that has conflicts with UEFI 2.0 by hiding the oldconflicts with library functions and supporting implementations of the old
# (EDK/EFI 1.10) and new (EDK II/UEFI 2.0) way. This module is a DXE driver as it contains DXE enum extensions for EFI event services.
# 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 = UefiLib
FILE_GUID = 3a004ba5-efe0-4a61-9f1a-267a46ae5ba9
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = UefiLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER 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]
UefiLibPrint.c
UefiNotTiano.c
Console.c
UefiLib.c
################################################################################
#
# Includes Section - list of Include locations that are required for
# this module.
#
################################################################################
[Includes]
$(WORKSPACE)/MdePkg/Include/Library
$(WORKSPACE)/IntelFrameworkPkg/Include
################################################################################
#
# 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]
PrintLib
PcdLib
MemoryAllocationLib
DebugLib
BaseMemoryLib
BaseLib
UefiBootServicesTableLib
################################################################################
#
# Guid C Name Section - list of Guids that this module uses or produces.
#
################################################################################
[Guids]
gEfiFrameworkDevicePathGuid # ALWAYS_CONSUMED
gEfiEventReadyToBootGuid # ALWAYS_CONSUMED
gEfiEventLegacyBootGuid # ALWAYS_CONSUMED
################################################################################
#
# Pcd FIXED_AT_BUILD - list of PCDs that this module is coded for.
#
################################################################################
[PcdsFixedAtBuild.common]
PcdUefiLibMaxPrintBufferSize|gEfiMdePkgTokenSpaceGuid

View File

@ -18,7 +18,20 @@
#ifndef _UEFI_LIB_FRAMEWORK_H_
#define _UEFI_LIB_FRAMEWORK_H_
//
// The package level header files this module uses
//
#include <FrameworkDxe.h>
//
// The protocols, PPI and GUID defintions for this module
//
#include <Guid/EventGroup.h>
#include <Guid/EventLegacyBios.h>
#include <Guid/FrameworkDevicePath.h>
//
// The Library classes this module consumes
//
#include <Library/UefiLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
@ -26,6 +39,5 @@
#include <Library/MemoryAllocationLib.h>
#include <Library/PcdLib.h>
#include <Library/PrintLib.h>
#include <Library/UefiLib.h>
#endif

View File

@ -36,9 +36,9 @@
STATIC
UINTN
InternalPrint (
IN CONST CHAR16 *Format,
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *Console,
IN VA_LIST Marker
IN CONST CHAR16 *Format,
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *Console,
IN VA_LIST Marker
)
{
UINTN Return;
@ -159,9 +159,9 @@ ErrorPrint (
STATIC
UINTN
AsciiInternalPrint (
IN CONST CHAR8 *Format,
IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *Console,
IN VA_LIST Marker
IN CONST CHAR8 *Format,
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *Console,
IN VA_LIST Marker
)
{
UINTN Return;

View File

@ -289,16 +289,19 @@ EfiGetNameGuidFromFwVolDevicePathNode (
IN CONST MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvDevicePathNode
)
{
FRAMEWORK_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FrameworkFvDevicePathNode;
ASSERT (FvDevicePathNode != NULL);
FrameworkFvDevicePathNode = (FRAMEWORK_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *) FvDevicePathNode;
//
// Use the new Device path that does not conflict with the UEFI
//
if (FvDevicePathNode->Tiano.Header.Type == MEDIA_DEVICE_PATH ||
FvDevicePathNode->Tiano.Header.SubType == MEDIA_VENDOR_DP) {
if (CompareGuid (&gEfiFrameworkDevicePathGuid, &FvDevicePathNode->Tiano.TianoSpecificDevicePath)) {
if (FvDevicePathNode->Tiano.Type == TIANO_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH_TYPE) {
return (EFI_GUID *) &FvDevicePathNode->NameGuid;
if (FrameworkFvDevicePathNode->Tiano.Header.Type == MEDIA_DEVICE_PATH ||
FrameworkFvDevicePathNode->Tiano.Header.SubType == MEDIA_VENDOR_DP) {
if (CompareGuid (&gEfiFrameworkDevicePathGuid, &FrameworkFvDevicePathNode->Tiano.TianoSpecificDevicePath)) {
if (FrameworkFvDevicePathNode->Tiano.Type == TIANO_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH_TYPE) {
return (EFI_GUID *) &FrameworkFvDevicePathNode->NameGuid;
}
}
}
@ -325,29 +328,33 @@ VOID
EFIAPI
EfiInitializeFwVolDevicepathNode (
IN OUT MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvDevicePathNode,
IN CONST EFI_GUID *NameGuid
IN CONST EFI_GUID *NameGuid
)
{
FRAMEWORK_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FrameworkFvDevicePathNode;
ASSERT (FvDevicePathNode != NULL);
ASSERT (NameGuid != NULL);
FrameworkFvDevicePathNode = (FRAMEWORK_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *) FvDevicePathNode;
//
// Use the new Device path that does not conflict with the UEFI
//
FvDevicePathNode->Tiano.Header.Type = MEDIA_DEVICE_PATH;
FvDevicePathNode->Tiano.Header.SubType = MEDIA_VENDOR_DP;
SetDevicePathNodeLength (&FvDevicePathNode->Tiano.Header, sizeof (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH));
FrameworkFvDevicePathNode->Tiano.Header.Type = MEDIA_DEVICE_PATH;
FrameworkFvDevicePathNode->Tiano.Header.SubType = MEDIA_VENDOR_DP;
SetDevicePathNodeLength (&FrameworkFvDevicePathNode->Tiano.Header, sizeof (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH));
//
// Add the GUID for generic Tiano device paths
//
CopyGuid (&FvDevicePathNode->Tiano.TianoSpecificDevicePath, &gEfiFrameworkDevicePathGuid);
CopyGuid (&FrameworkFvDevicePathNode->Tiano.TianoSpecificDevicePath, &gEfiFrameworkDevicePathGuid);
//
// Add in the FW Vol File Path Tiano defined information
//
FvDevicePathNode->Tiano.Type = TIANO_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH_TYPE;
FrameworkFvDevicePathNode->Tiano.Type = TIANO_MEDIA_FW_VOL_FILEPATH_DEVICE_PATH_TYPE;
CopyGuid (&FvDevicePathNode->NameGuid, NameGuid);
CopyGuid (&FrameworkFvDevicePathNode->NameGuid, NameGuid);
}