Update For R9 Review.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7215 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
hfang
2009-01-08 08:48:15 +00:00
parent 2895c5060c
commit eeefcb9d4b
32 changed files with 711 additions and 461 deletions

View File

@ -10,8 +10,8 @@
**/ **/
#ifndef _IDE_BUS_COMPONENT_NAME_H #ifndef _IDE_BUS_COMPONENT_NAME_H_
#define _IDE_BUS_COMPONENT_NAME_H #define _IDE_BUS_COMPONENT_NAME_H_
#define ADD_NAME(x) AddName ((x)); #define ADD_NAME(x) AddName ((x));

View File

@ -18,8 +18,8 @@
**/ **/
#ifndef _IDE_H #ifndef _IDE_H_
#define _IDE_H #define _IDE_H_
// //
// Helper functions Prototype // Helper functions Prototype
@ -118,7 +118,7 @@ IDEWritePortB (
@param Port TODO: add argument description @param Port TODO: add argument description
@param Data TODO: add argument description @param Data TODO: add argument description
TODO: add return values TODO: add return values.
**/ **/
VOID VOID
@ -442,7 +442,7 @@ AtaPioDataOut (
@param IdeDev TODO: add argument description @param IdeDev TODO: add argument description
TODO: add return values TODO: add return values.
**/ **/
EFI_STATUS EFI_STATUS
@ -1242,10 +1242,8 @@ EnableInterrupt (
/** /**
Clear pending IDE interrupt before OS loader/kernel take control of the IDE device. Clear pending IDE interrupt before OS loader/kernel take control of the IDE device.
@param[in] Event Pointer to this event @param[in] Event Pointer to this event.
@param[in] Context Event hanlder private data @param[in] Context Event hanlder private data.
@retval EFI_SUCCESS - Interrupt cleared.
**/ **/
VOID VOID

View File

@ -1042,9 +1042,12 @@ DeRegisterIdeDevice (
// *********************************************************************************** // ***********************************************************************************
// //
/** /**
TODO: This - add argument and description to function comment GC_TODO: Add function description
TODO: ExtendedVerification - add argument and description to function comment
TODO: EFI_DEVICE_ERROR - add return value to function comment @param This GC_TODO: add argument description.
@param ExtendedVerification GC_TODO: add argument description.
@retval EFI_DEVICE_ERROR GC_TODO: Add description for return value.
**/ **/
EFI_STATUS EFI_STATUS
@ -1244,8 +1247,12 @@ Done:
// *********************************************************************************** // ***********************************************************************************
// //
/** /**
TODO: This - add argument and description to function comment TODO: Add function description
TODO: EFI_SUCCESS - add return value to function comment
@param This TODO: add argument description
@retval EFI_SUCCESS GC_TODO: Add description for return value.
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI

View File

@ -12,8 +12,8 @@
**/ **/
#ifndef _IDE_BUS_H #ifndef _IDE_BUS_H_
#define _IDE_BUS_H #define _IDE_BUS_H_
@ -196,6 +196,18 @@ IDEBusDriverBindingStop (
// //
// EFI Driver Configuration Functions // EFI Driver Configuration Functions
// //
/**
TODO: Add function description
@param This TODO: add argument description
@param ControllerHandle TODO: add argument description
@param ChildHandle TODO: add argument description
@param Language TODO: add argument description
@param ActionRequired TODO: add argument description
TODO: add return values.
**/
EFI_STATUS EFI_STATUS
IDEBusDriverConfigurationSetOptions ( IDEBusDriverConfigurationSetOptions (
IN EFI_DRIVER_CONFIGURATION_PROTOCOL *This, IN EFI_DRIVER_CONFIGURATION_PROTOCOL *This,
@ -205,6 +217,16 @@ IDEBusDriverConfigurationSetOptions (
OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired
); );
/**
TODO: Add function description
@param This TODO: add argument description
@param ControllerHandle TODO: add argument description
@param ChildHandle TODO: add argument description
TODO: add return values.
**/
EFI_STATUS EFI_STATUS
IDEBusDriverConfigurationOptionsValid ( IDEBusDriverConfigurationOptionsValid (
IN EFI_DRIVER_CONFIGURATION_PROTOCOL *This, IN EFI_DRIVER_CONFIGURATION_PROTOCOL *This,
@ -212,6 +234,18 @@ IDEBusDriverConfigurationOptionsValid (
IN EFI_HANDLE ChildHandle OPTIONAL IN EFI_HANDLE ChildHandle OPTIONAL
); );
/**
TODO: Add function description
@param This TODO: add argument description
@param ControllerHandle TODO: add argument description
@param ChildHandle TODO: add argument description
@param DefaultType TODO: add argument description
@param ActionRequired TODO: add argument description
TODO: add return values.
**/
EFI_STATUS EFI_STATUS
IDEBusDriverConfigurationForceDefaults ( IDEBusDriverConfigurationForceDefaults (
IN EFI_DRIVER_CONFIGURATION_PROTOCOL *This, IN EFI_DRIVER_CONFIGURATION_PROTOCOL *This,
@ -224,6 +258,21 @@ IDEBusDriverConfigurationForceDefaults (
// //
// EFI Driver Diagnostics Functions // EFI Driver Diagnostics Functions
// //
/**
TODO: Add function description
@param This TODO: add argument description
@param ControllerHandle TODO: add argument description
@param ChildHandle TODO: add argument description
@param DiagnosticType TODO: add argument description
@param Language TODO: add argument description
@param ErrorType TODO: add argument description
@param BufferSize TODO: add argument description
@param Buffer TODO: add argument description
TODO: add return values.
**/
EFI_STATUS EFI_STATUS
IDEBusDriverDiagnosticsRunDiagnostics ( IDEBusDriverDiagnosticsRunDiagnostics (
IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL *This, IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL *This,
@ -264,7 +313,7 @@ IDEBlkIoReset (
@param BufferSize TODO: add argument description @param BufferSize TODO: add argument description
@param Buffer TODO: add argument description @param Buffer TODO: add argument description
TODO: add return values TODO: add return values.
**/ **/
EFI_STATUS EFI_STATUS

View File

@ -12,8 +12,8 @@
**/ **/
#ifndef _IDE_DATA_H #ifndef _IDE_DATA_H_
#define _IDE_DATA_H #define _IDE_DATA_H_
#include <IndustryStandard/Atapi.h> #include <IndustryStandard/Atapi.h>

View File

@ -1,4 +1,4 @@
/**@file /** @file
Copyright (c) 2006, Intel Corporation Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials

View File

@ -1,4 +1,4 @@
/**@file /** @file
Copyright (c) 2006, Intel Corporation Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
#ifndef _EFI_PCI_BUS_COMPONENT_NAME_H #ifndef _EFI_PCI_BUS_COMPONENT_NAME_H_
#define _EFI_PCI_BUS_COMPONENT_NAME_H #define _EFI_PCI_BUS_COMPONENT_NAME_H_
extern EFI_COMPONENT_NAME_PROTOCOL gPciBusComponentName; extern EFI_COMPONENT_NAME_PROTOCOL gPciBusComponentName;
extern EFI_COMPONENT_NAME2_PROTOCOL gPciBusComponentName2; extern EFI_COMPONENT_NAME2_PROTOCOL gPciBusComponentName2;

View File

@ -1,4 +1,4 @@
/**@file /** @file
Copyright (c) 2006, Intel Corporation Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
#ifndef _EFI_PCI_BUS_H #ifndef _EFI_PCI_BUS_H_
#define _EFI_PCI_BUS_H #define _EFI_PCI_BUS_H_
#include <FrameworkDxe.h> #include <FrameworkDxe.h>
@ -266,6 +266,20 @@ extern EFI_PCI_PLATFORM_PROTOCOL *gPciPlatformProtocol;
// //
// PCI Bus Support Function Prototypes // PCI Bus Support Function Prototypes
// //
/**
Test to see if this driver supports ControllerHandle. Any ControllerHandle
than contains a gEfiPciRootBridgeIoProtocolGuid protocol can be supported.
@param This Protocol instance pointer.
@param ControllerHandle Handle of device to test.
@param RemainingDevicePath Optional parameter use to pick a specific child.
device to start.
@retval EFI_SUCCESS This driver supports this device.
@retval EFI_ALREADY_STARTED This driver is already running on this device.
@retval other This driver does not support this device.
**/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PciBusDriverBindingSupported ( PciBusDriverBindingSupported (
@ -274,6 +288,20 @@ PciBusDriverBindingSupported (
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
); );
/**
Start this driver on ControllerHandle and enumerate Pci bus and start
all device under PCI bus.
@param This Protocol instance pointer.
@param ControllerHandle Handle of device to bind driver to.
@param RemainingDevicePath Optional parameter use to pick a specific child.
device to start.
@retval EFI_SUCCESS This driver is added to ControllerHandle.
@retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle.
@retval other This driver does not support this device.
**/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PciBusDriverBindingStart ( PciBusDriverBindingStart (
@ -282,6 +310,20 @@ PciBusDriverBindingStart (
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
); );
/**
Stop this driver on ControllerHandle. Support stoping any child handles
created by this driver.
@param This Protocol instance pointer.
@param ControllerHandle Handle of device to stop driver on.
@param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
children is zero stop the entire bus driver.
@param ChildHandleBuffer List of Child Handles to Stop.
@retval EFI_SUCCESS This driver is removed ControllerHandle.
@retval other This driver was not removed from this device.
**/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PciBusDriverBindingStop ( PciBusDriverBindingStop (

View File

@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
#ifndef _EFI_PCI_COMMAND_H #ifndef _EFI_PCI_COMMAND_H_
#define _EFI_PCI_COMMAND_H #define _EFI_PCI_COMMAND_H_
// //
// The PCI Command register bits owned by PCI Bus driver. // The PCI Command register bits owned by PCI Bus driver.

View File

@ -11,8 +11,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
#ifndef _EFI_PCI_DEVICE_SUPPORT_H #ifndef _EFI_PCI_DEVICE_SUPPORT_H_
#define _EFI_PCI_DEVICE_SUPPORT_H #define _EFI_PCI_DEVICE_SUPPORT_H_
/** /**
Initialize the gPciDevicePool. Initialize the gPciDevicePool.
@ -194,6 +194,13 @@ GetRootBridgeByHandle (
EFI_HANDLE RootBridgeHandle EFI_HANDLE RootBridgeHandle
); );
/**
Check root bridge device is existed or not.
@param RootBridgeHandle Given root bridge handle.
@return root bridge device is existed or not.
**/
BOOLEAN BOOLEAN
RootBridgeExisted ( RootBridgeExisted (
IN EFI_HANDLE RootBridgeHandle IN EFI_HANDLE RootBridgeHandle

View File

@ -88,11 +88,11 @@ GetDriver (
/** /**
Add an overriding driver image Add an overriding driver image
@param PciIoDevice Instance of PciIo device @param PciIoDevice Instance of PciIo device.
@param DriverImageHandle new added driver image @param DriverImageHandle new added driver image.
@retval EFI_OUT_OF_RESOURCES no memory resource for new driver instance @retval EFI_OUT_OF_RESOURCES no memory resource for new driver instance.
@retval EFI_SUCCESS Success add driver @retval EFI_SUCCESS Success add driver.
**/ **/
EFI_STATUS EFI_STATUS
AddDriver ( AddDriver (

View File

@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
#ifndef _EFI_PCI_DRIVER_OVERRRIDE_H #ifndef _EFI_PCI_DRIVER_OVERRRIDE_H_
#define _EFI_PCI_DRIVER_OVERRRIDE_H #define _EFI_PCI_DRIVER_OVERRRIDE_H_
#define DRIVER_OVERRIDE_SIGNATURE SIGNATURE_32 ('d', 'r', 'o', 'v') #define DRIVER_OVERRIDE_SIGNATURE SIGNATURE_32 ('d', 'r', 'o', 'v')

View File

@ -1765,13 +1765,10 @@ NotifyPhase (
member function. It allows the host bridge driver to preinitialize individual PCI controllers before member function. It allows the host bridge driver to preinitialize individual PCI controllers before
enumeration. enumeration.
@param This Pointer to the EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL instance. @param Bridge Pointer to the EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL instance.
@param RootBridgeHandle The associated PCI root bridge handle. Type EFI_HANDLE is defined in @param Bus The bus number of the pci device.
InstallProtocolInterface() in the UEFI 2.0 Specification. @param Device The device number of the pci device.
@param PciAddress The address of the PCI device on the PCI bus. This address can be passed to the @param Func The function number of the pci device.
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL member functions to access the PCI
configuration space of the device. See Table 12-1 in the UEFI 2.0 Specification for
the definition of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS.
@param Phase The phase of the PCI device enumeration. @param Phase The phase of the PCI device enumeration.
@retval EFI_SUCCESS The requested parameters were returned. @retval EFI_SUCCESS The requested parameters were returned.
@ -1878,7 +1875,7 @@ PreprocessController (
@param This - A pointer to the hot plug request protocol. @param This - A pointer to the hot plug request protocol.
@param Operation - The operation. @param Operation - The operation.
@param Controller - A pointer to the controller. @param Controller - A pointer to the controller.
@param RemainningDevicePath - A pointer to the device path. @param RemainingDevicePath - A pointer to the device path.
@param NumberOfChildren - A the number of child handle in the ChildHandleBuffer. @param NumberOfChildren - A the number of child handle in the ChildHandleBuffer.
@param ChildHandleBuffer - A pointer to the array contain the child handle. @param ChildHandleBuffer - A pointer to the array contain the child handle.
@ -1988,7 +1985,10 @@ PciHotPlugRequestNotify (
/** /**
Search hostbridge according to given handle Search hostbridge according to given handle
@return whether found @param RootBridgeHandle - Host bridge handle.
@return TRUE Found.
@return FALSE Not found.
**/ **/
BOOLEAN BOOLEAN
SearchHostBridgeHandle ( SearchHostBridgeHandle (

View File

@ -13,8 +13,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
#ifndef _EFI_PCI_ENUMERATOR_H #ifndef _EFI_PCI_ENUMERATOR_H_
#define _EFI_PCI_ENUMERATOR_H #define _EFI_PCI_ENUMERATOR_H_
#include "PciResourceSupport.h" #include "PciResourceSupport.h"
@ -405,13 +405,10 @@ NotifyPhase (
member function. It allows the host bridge driver to preinitialize individual PCI controllers before member function. It allows the host bridge driver to preinitialize individual PCI controllers before
enumeration. enumeration.
@param This Pointer to the EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL instance. @param Bridge Pointer to the EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL instance.
@param RootBridgeHandle The associated PCI root bridge handle. Type EFI_HANDLE is defined in @param Bus The bus number of the pci device.
InstallProtocolInterface() in the UEFI 2.0 Specification. @param Device The device number of the pci device.
@param PciAddress The address of the PCI device on the PCI bus. This address can be passed to the @param Func The function number of the pci device.
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL member functions to access the PCI
configuration space of the device. See Table 12-1 in the UEFI 2.0 Specification for
the definition of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS.
@param Phase The phase of the PCI device enumeration. @param Phase The phase of the PCI device enumeration.
@retval EFI_SUCCESS The requested parameters were returned. @retval EFI_SUCCESS The requested parameters were returned.
@ -459,7 +456,10 @@ PciHotPlugRequestNotify (
/** /**
Search hostbridge according to given handle Search hostbridge according to given handle
@return whether found. @param RootBridgeHandle - Host bridge handle.
@return TRUE Found.
@return FALSE Not found.
**/ **/
BOOLEAN BOOLEAN
SearchHostBridgeHandle ( SearchHostBridgeHandle (

View File

@ -1,4 +1,4 @@
/**@ file /** @file
Copyright (c) 2006, Intel Corporation Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
@ -85,7 +85,7 @@ PciDevicePresent (
root bridge will then be created. root bridge will then be created.
@param Bridge Parent bridge instance. @param Bridge Parent bridge instance.
@param StartBusNumer Bus number of begining. @param StartBusNumber Bus number of begining.
**/ **/
EFI_STATUS EFI_STATUS
PciPciDeviceInfoCollector ( PciPciDeviceInfoCollector (
@ -1844,6 +1844,14 @@ PciGetBusRange (
return EFI_NOT_FOUND; return EFI_NOT_FOUND;
} }
/**
This routine can be used to start the root bridge.
@param RootBridgeDev Pci device instance.
@retval EFI_SUCCESS This device started.
**/
EFI_STATUS EFI_STATUS
StartManagingRootBridge ( StartManagingRootBridge (
IN PCI_IO_DEVICE *RootBridgeDev IN PCI_IO_DEVICE *RootBridgeDev

View File

@ -1,4 +1,4 @@
/**@ file /** @file
Copyright (c) 2006, Intel Corporation Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
#ifndef _EFI_PCI_ENUMERATOR_SUPPORT_H #ifndef _EFI_PCI_ENUMERATOR_SUPPORT_H_
#define _EFI_PCI_ENUMERATOR_SUPPORT_H #define _EFI_PCI_ENUMERATOR_SUPPORT_H_
/** /**
This routine is used to check whether the pci device is present. This routine is used to check whether the pci device is present.
@ -42,7 +42,7 @@ PciDevicePresent (
root bridge will then be created. root bridge will then be created.
@param Bridge Parent bridge instance @param Bridge Parent bridge instance
@param StartBusNumer Bus number of begining @param StartBusNumber Bus number of begining
**/ **/
EFI_STATUS EFI_STATUS
PciPciDeviceInfoCollector ( PciPciDeviceInfoCollector (
@ -63,11 +63,11 @@ PciPciDeviceInfoCollector (
EFI_STATUS EFI_STATUS
PciSearchDevice ( PciSearchDevice (
IN PCI_IO_DEVICE *Bridge, IN PCI_IO_DEVICE *Bridge,
PCI_TYPE00 *Pci, IN PCI_TYPE00 *Pci,
UINT8 Bus, IN UINT8 Bus,
UINT8 Device, IN UINT8 Device,
UINT8 Func, IN UINT8 Func,
PCI_IO_DEVICE **PciDevice OUT PCI_IO_DEVICE **PciDevice
); );
/** /**
@ -349,6 +349,14 @@ PciGetBusRange (
OUT UINT16 *BusRange OUT UINT16 *BusRange
); );
/**
This routine can be used to start the root bridge.
@param RootBridgeDev Pci device instance.
@retval EFI_SUCCESS This device started.
**/
EFI_STATUS EFI_STATUS
StartManagingRootBridge ( StartManagingRootBridge (
IN PCI_IO_DEVICE *RootBridgeDev IN PCI_IO_DEVICE *RootBridgeDev

View File

@ -1,4 +1,4 @@
/**@ file /** @file
This module provide support function for hot plug device. This module provide support function for hot plug device.
Copyright (c) 2006, Intel Corporation Copyright (c) 2006, Intel Corporation
@ -131,7 +131,7 @@ InitializeHotPlugSupport (
/** /**
Test whether device path is for root pci hot plug bus Test whether device path is for root pci hot plug bus
@param HpbdevicePath tested device path. @param HpbDevicePath tested device path.
@param HpIndex Return the index of root hot plug in global array. @param HpIndex Return the index of root hot plug in global array.
@retval TRUE device path is for root pci hot plug. @retval TRUE device path is for root pci hot plug.
@ -163,7 +163,7 @@ IsRootPciHotPlugBus (
/** /**
Test whether device path is for root pci hot plug controller Test whether device path is for root pci hot plug controller
@param HpbdevicePath tested device path. @param HpcDevicePath tested device path.
@param HpIndex Return the index of root hot plug in global array. @param HpIndex Return the index of root hot plug in global array.
@retval TRUE device path is for root pci hot plug controller. @retval TRUE device path is for root pci hot plug controller.

View File

@ -1,4 +1,4 @@
/**@ file /** @file
Copyright (c) 2006, Intel Corporation Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
#ifndef _EFI_PCI_HOT_PLUG_SUPPORT_H #ifndef _EFI_PCI_HOT_PLUG_SUPPORT_H_
#define _EFI_PCI_HOT_PLUG_SUPPORT_H #define _EFI_PCI_HOT_PLUG_SUPPORT_H_
// //

View File

@ -1,4 +1,4 @@
/**@file /** @file
Implement all interfaces for EFI_PCI_IO_PROTOCOL. Implement all interfaces for EFI_PCI_IO_PROTOCOL.
Copyright (c) 2006 - 2008, Intel Corporation Copyright (c) 2006 - 2008, Intel Corporation
@ -18,6 +18,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
// //
// Internal use only // Internal use only
// //
/**
report a error Status code of PCI bus driver controller.
@param PciIoDevice Pci device instance.
@param Code status code.
**/
EFI_STATUS EFI_STATUS
ReportErrorStatusCode ( ReportErrorStatusCode (
IN PCI_IO_DEVICE *PciIoDevice, IN PCI_IO_DEVICE *PciIoDevice,
@ -61,10 +67,10 @@ EFI_PCI_IO_PROTOCOL PciIoInterface = {
}; };
/** /**
report a error Status code of PCI bus driver controller report a error Status code of PCI bus driver controller.
@param PciIoDevice Pci device instance @param PciIoDevice Pci device instance.
@param Code status code @param Code status code.
**/ **/
EFI_STATUS EFI_STATUS
ReportErrorStatusCode ( ReportErrorStatusCode (
@ -80,11 +86,11 @@ ReportErrorStatusCode (
} }
/** /**
Initializes a PCI I/O Instance Initializes a PCI I/O Instance.
@param PciIoDevice Pci device instance @param PciIoDevice Pci device instance.
@retval EFI_SUCCESS Success operation @retval EFI_SUCCESS Success operation.
**/ **/
EFI_STATUS EFI_STATUS
InitializePciIoInstance ( InitializePciIoInstance (
@ -281,7 +287,9 @@ PciIoPollMem (
@param This A pointer to the EFI_PCI_IO_PROTOCOL. @param This A pointer to the EFI_PCI_IO_PROTOCOL.
@param Width Signifies the width of the memory or I/O operations. @param Width Signifies the width of the memory or I/O operations.
@param Address The base address of the memory or I/O operations. @param BarIndex The BAR index of the standard PCI Configuration header to use as the
base address for the memory or I/O operation to perform.
@param Offset The offset within the selected BAR to start the memory or I/O operation.
@param Mask Mask used for the polling criteria. @param Mask Mask used for the polling criteria.
@param Value The comparison value used for the polling exit criteria. @param Value The comparison value used for the polling exit criteria.
@param Delay The number of 100 ns units to poll. @param Delay The number of 100 ns units to poll.
@ -1459,7 +1467,7 @@ PciIoAttributes (
// Check if there have been an active VGA device on the same segment // Check if there have been an active VGA device on the same segment
// //
Temp = ActiveVGADeviceOnTheSameSegment (PciIoDevice); Temp = ActiveVGADeviceOnTheSameSegment (PciIoDevice);
if (Temp && Temp != PciIoDevice) { if (Temp != NULL && Temp != PciIoDevice) {
// //
// An active VGA has been detected, so can not enable another // An active VGA has been detected, so can not enable another
// //
@ -1529,7 +1537,7 @@ PciIoAttributes (
// Enable relevant attributes to command register and bridge control register // Enable relevant attributes to command register and bridge control register
// //
Status = PciEnableCommandRegister (PciIoDevice, Command); Status = PciEnableCommandRegister (PciIoDevice, Command);
if (BridgeControl) { if (BridgeControl != 0) {
Status = PciEnableBridgeControlRegister (PciIoDevice, BridgeControl); Status = PciEnableBridgeControlRegister (PciIoDevice, BridgeControl);
} }
@ -1550,7 +1558,7 @@ PciIoAttributes (
// Disable relevant attributes to command register and bridge control register // Disable relevant attributes to command register and bridge control register
// //
Status = PciDisableCommandRegister (PciIoDevice, Command); Status = PciDisableCommandRegister (PciIoDevice, Command);
if (BridgeControl) { if (BridgeControl != 0) {
Status = PciDisableBridgeControlRegister (PciIoDevice, BridgeControl); Status = PciDisableBridgeControlRegister (PciIoDevice, BridgeControl);
} }
@ -1838,7 +1846,7 @@ UpStreamBridgesAttributes (
Parent = PciIoDevice->Parent; Parent = PciIoDevice->Parent;
while (Parent && IS_PCI_BRIDGE (&Parent->Pci)) { while (Parent != NULL && IS_PCI_BRIDGE (&Parent->Pci)) {
// //
// Get the PciIo Protocol // Get the PciIo Protocol

View File

@ -12,15 +12,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
#ifndef _EFI_PCI_IO_PROTOCOL_H #ifndef _EFI_PCI_IO_PROTOCOL_H_
#define _EFI_PCI_IO_PROTOCOL_H #define _EFI_PCI_IO_PROTOCOL_H_
/** /**
Initializes a PCI I/O Instance Initializes a PCI I/O Instance.
@param PciIoDevice Pci device instance @param PciIoDevice Pci device instance.
@retval EFI_SUCCESS Success operation @retval EFI_SUCCESS Success operation.
**/ **/
EFI_STATUS EFI_STATUS
InitializePciIoInstance ( InitializePciIoInstance (
@ -109,7 +109,9 @@ PciIoPollMem (
@param This A pointer to the EFI_PCI_IO_PROTOCOL. @param This A pointer to the EFI_PCI_IO_PROTOCOL.
@param Width Signifies the width of the memory or I/O operations. @param Width Signifies the width of the memory or I/O operations.
@param Address The base address of the memory or I/O operations. @param BarIndex The BAR index of the standard PCI Configuration header to use as the
base address for the memory or I/O operation to perform.
@param Offset The offset within the selected BAR to start the memory or I/O operation.
@param Mask Mask used for the polling criteria. @param Mask Mask used for the polling criteria.
@param Value The comparison value used for the polling exit criteria. @param Value The comparison value used for the polling exit criteria.
@param Delay The number of 100 ns units to poll. @param Delay The number of 100 ns units to poll.

View File

@ -47,9 +47,9 @@ InstallHotPlugRequestProtocol (
/** /**
Install protocol gEfiPciHotplugDeviceGuid into hotplug device Install protocol gEfiPciHotplugDeviceGuid into hotplug device
instance instance.
@param PciIoDevice hotplug device instance @param PciIoDevice hotplug device instance.
**/ **/
VOID VOID
@ -77,9 +77,9 @@ InstallPciHotplugGuid (
/** /**
UnInstall protocol gEfiPciHotplugDeviceGuid into hotplug device UnInstall protocol gEfiPciHotplugDeviceGuid into hotplug device
instance instance.
@param PciIoDevice hotplug device instance @param PciIoDevice hotplug device instance.
**/ **/
VOID VOID
@ -116,9 +116,9 @@ UninstallPciHotplugGuid (
} }
/** /**
Retrieve the BAR information via PciIo interface Retrieve the BAR information via PciIo interface.
@param PciIoDevice Pci device instance @param PciIoDevice Pci device instance.
**/ **/
VOID VOID
GetBackPcCardBar ( GetBackPcCardBar (
@ -196,8 +196,8 @@ GetBackPcCardBar (
Remove rejected pci device from specific root bridge Remove rejected pci device from specific root bridge
handle. handle.
@param RootBridgeHandle specific parent root bridge handle @param RootBridgeHandle specific parent root bridge handle.
@param Bridge Bridge device instance @param Bridge Bridge device instance.
@retval EFI_SUCCESS Success operation. @retval EFI_SUCCESS Success operation.
**/ **/
@ -261,7 +261,7 @@ RemoveRejectedPciDevices (
/** /**
Wrapper function for allocating resource for pci host bridge. Wrapper function for allocating resource for pci host bridge.
@param PciResAlloc Point to protocol instance EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL @param PciResAlloc Point to protocol instance EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.
**/ **/
EFI_STATUS EFI_STATUS
@ -281,11 +281,11 @@ PciHostBridgeResourceAllocator (
} }
/** /**
Submits the I/O and memory resource requirements for the specified PCI Root Bridge Submits the I/O and memory resource requirements for the specified PCI Root Bridge.
@param PciResAlloc Point to protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL @param PciResAlloc Point to protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
PciHostBridgeResourceAllocator_WithoutHotPlugDeviceSupport ( PciHostBridgeResourceAllocator_WithoutHotPlugDeviceSupport (
@ -644,11 +644,11 @@ PciHostBridgeResourceAllocator_WithoutHotPlugDeviceSupport (
} }
/** /**
Submits the I/O and memory resource requirements for the specified PCI Root Bridge Submits the I/O and memory resource requirements for the specified PCI Root Bridge.
@param PciResAlloc Point to protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL @param PciResAlloc Point to protocol instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
PciHostBridgeResourceAllocator_WithHotPlugDeviceSupport ( PciHostBridgeResourceAllocator_WithHotPlugDeviceSupport (
@ -1138,15 +1138,15 @@ PciHostBridgeResourceAllocator_WithHotPlugDeviceSupport (
/** /**
Wapper function of scanning pci bus and assign bus number to the given PCI bus system Wapper function of scanning pci bus and assign bus number to the given PCI bus system
Feature flag PcdPciBusHotplugDeviceSupport determine whether need support hotplug Feature flag PcdPciBusHotplugDeviceSupport determine whether need support hotplug.
@param Bridge Bridge device instance @param Bridge Bridge device instance.
@param StartBusNumber start point @param StartBusNumber start point.
@param SubBusNumber Point to sub bus number @param SubBusNumber Point to sub bus number.
@param PaddedBusRange Customized bus number @param PaddedBusRange Customized bus number.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
@retval EFI_DEVICE_ERROR Fail to scan bus @retval EFI_DEVICE_ERROR Fail to scan bus.
**/ **/
EFI_STATUS EFI_STATUS
PciScanBus ( PciScanBus (
@ -1175,15 +1175,15 @@ PciScanBus (
/** /**
Wapper function of scanning pci bus and assign bus number to the given PCI bus system Wapper function of scanning pci bus and assign bus number to the given PCI bus system
Feature flag PcdPciBusHotplugDeviceSupport determine whether need support hotplug Feature flag PcdPciBusHotplugDeviceSupport determine whether need support hotplug.
@param Bridge Bridge device instance @param Bridge Bridge device instance.
@param StartBusNumber start point @param StartBusNumber start point.
@param SubBusNumber Point to sub bus number @param SubBusNumber Point to sub bus number.
@param PaddedBusRange Customized bus number @param PaddedBusRange Customized bus number.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
@retval EFI_DEVICE_ERROR Fail to scan bus @retval EFI_DEVICE_ERROR Fail to scan bus.
**/ **/
EFI_STATUS EFI_STATUS
PciScanBus_WithoutHotPlugDeviceSupport ( PciScanBus_WithoutHotPlugDeviceSupport (
@ -1353,15 +1353,15 @@ PciScanBus_WithoutHotPlugDeviceSupport (
/** /**
Wapper function of scanning pci bus and assign bus number to the given PCI bus system Wapper function of scanning pci bus and assign bus number to the given PCI bus system
Feature flag PcdPciBusHotplugDeviceSupport determine whether need support hotplug Feature flag PcdPciBusHotplugDeviceSupport determine whether need support hotplug.
@param Bridge Bridge device instance @param Bridge Bridge device instance.
@param StartBusNumber start point @param StartBusNumber start point.
@param SubBusNumber Point to sub bus number @param SubBusNumber Point to sub bus number.
@param PaddedBusRange Customized bus number @param PaddedBusRange Customized bus number.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
@retval EFI_DEVICE_ERROR Fail to scan bus @retval EFI_DEVICE_ERROR Fail to scan bus.
**/ **/
EFI_STATUS EFI_STATUS
PciScanBus_WithHotPlugDeviceSupport ( PciScanBus_WithHotPlugDeviceSupport (
@ -1642,11 +1642,11 @@ PciScanBus_WithHotPlugDeviceSupport (
} }
/** /**
Process Option Rom on this host bridge Process Option Rom on this host bridge.
@param Bridge Pci bridge device instance @param Bridge Pci bridge device instance.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
PciRootBridgeP2CProcess ( PciRootBridgeP2CProcess (
@ -1712,12 +1712,12 @@ PciRootBridgeP2CProcess (
} }
/** /**
Process Option Rom on this host bridge Process Option Rom on this host bridge.
@param PciResAlloc Pointer to instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL @param PciResAlloc Pointer to instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.
@retval EFI_NOT_FOUND Can not find the root bridge instance @retval EFI_NOT_FOUND Can not find the root bridge instance.
@retval EFI_SUCCESS Success process @retval EFI_SUCCESS Success process.
**/ **/
EFI_STATUS EFI_STATUS
PciHostBridgeP2CProcess ( PciHostBridgeP2CProcess (
@ -1758,12 +1758,12 @@ PciHostBridgeP2CProcess (
/** /**
This function is used to enumerate the entire host bridge This function is used to enumerate the entire host bridge
in a given platform in a given platform.
@param PciResAlloc A pointer to the resource allocate protocol. @param PciResAlloc A pointer to the resource allocate protocol.
@retval EFI_OUT_OF_RESOURCES no enough resource @retval EFI_OUT_OF_RESOURCES no enough resource.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
@ -1998,7 +1998,7 @@ PciHostBridgeEnumerator (
@param PciIo A pointer to EFI_PCI_PROTOCOL. @param PciIo A pointer to EFI_PCI_PROTOCOL.
@param PciDeviceInfo A pointer to EFI_PCI_DEVICE_INFO. @param PciDeviceInfo A pointer to EFI_PCI_DEVICE_INFO.
@param Width Signifies the width of the memory operations. @param Width Signifies the width of the memory operations.
@Param Address The address within the PCI configuration space for the PCI controller. @param Address The address within the PCI configuration space for the PCI controller.
@param Buffer For read operations, the destination buffer to store the results. For @param Buffer For read operations, the destination buffer to store the results. For
write operations, the source buffer to write data from. write operations, the source buffer to write data from.
@ -2158,7 +2158,8 @@ ReadConfigData (
@param PciDeviceInfo A pointer to EFI_PCI_DEVICE_INFO. @param PciDeviceInfo A pointer to EFI_PCI_DEVICE_INFO.
@param AccessType Access type, READ or WRITE. @param AccessType Access type, READ or WRITE.
@Param Address The address within the PCI configuration space. @param Width Signifies the width of the memory operations.
@param Address The address within the PCI configuration space.
@param Buffer Store the register data. @param Buffer Store the register data.
@retval EFI_SUCCESS The data has been updated. @retval EFI_SUCCESS The data has been updated.
@ -2229,7 +2230,7 @@ UpdateConfigData (
@param PciIo A pointer to EFI_PCI_PROTOCOL. @param PciIo A pointer to EFI_PCI_PROTOCOL.
@param PciDeviceInfo A pointer to EFI_PCI_DEVICE_INFO. @param PciDeviceInfo A pointer to EFI_PCI_DEVICE_INFO.
@param Width Signifies the width of the memory operations. @param Width Signifies the width of the memory operations.
@Param Address The address within the PCI configuration space for the PCI controller. @param Address The address within the PCI configuration space for the PCI controller.
@param Buffer For read operations, the destination buffer to store the results. For @param Buffer For read operations, the destination buffer to store the results. For
write operations, the source buffer to write data from. write operations, the source buffer to write data from.
@ -2407,7 +2408,7 @@ WriteConfigData (
@param PciRootBridgeIo A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. @param PciRootBridgeIo A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.
@param PciIo A pointer to EFI_PCI_PROTOCOL. @param PciIo A pointer to EFI_PCI_PROTOCOL.
@param Pci A pointer to PCI_TYPE00. @param Pci A pointer to PCI_TYPE00.
@Param Address The address within the PCI configuration space for the PCI controller. @param Address The address within the PCI configuration space for the PCI controller.
@param PciDeviceInfo A pointer to EFI_PCI_DEVICE_INFO. @param PciDeviceInfo A pointer to EFI_PCI_DEVICE_INFO.
@retval EFI_SUCCESS Pci device device information has been abstracted. @retval EFI_SUCCESS Pci device device information has been abstracted.
@ -2508,7 +2509,8 @@ GetPciDeviceDeviceInfo (
@param PciIo A pointer to the EFI_PCI_IO_PROTOCOL. @param PciIo A pointer to the EFI_PCI_IO_PROTOCOL.
@param Pci A pointer to PCI_TYPE00. @param Pci A pointer to PCI_TYPE00.
@param Width Signifies the width of the memory operations. @param Width Signifies the width of the memory operations.
@Param Address The address within the PCI configuration space for the PCI controller. @param Address The address within the PCI configuration space for the PCI controller.
@param Count The number of unit to be read.
@param Buffer For read operations, the destination buffer to store the results. For @param Buffer For read operations, the destination buffer to store the results. For
write operations, the source buffer to write data from. write operations, the source buffer to write data from.
@ -2574,7 +2576,8 @@ PciIncompatibilityCheckRead (
@param PciIo A pointer to the EFI_PCI_IO_PROTOCOL. @param PciIo A pointer to the EFI_PCI_IO_PROTOCOL.
@param Pci A pointer to PCI_TYPE00. @param Pci A pointer to PCI_TYPE00.
@param Width Signifies the width of the memory operations. @param Width Signifies the width of the memory operations.
@Param Address The address within the PCI configuration space for the PCI controller. @param Address The address within the PCI configuration space for the PCI controller.
@param Count The number of unit to be write.
@param Buffer For read operations, the destination buffer to store the results. For @param Buffer For read operations, the destination buffer to store the results. For
write operations, the source buffer to write data from. write operations, the source buffer to write data from.
@ -2658,7 +2661,8 @@ PciIncompatibilityCheckWrite (
@param PciRootBridgeIo A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. @param PciRootBridgeIo A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.
@param Pci A pointer to PCI_TYPE00. @param Pci A pointer to PCI_TYPE00.
@param Width Signifies the width of the memory operations. @param Width Signifies the width of the memory operations.
@Param Address The address within the PCI configuration space for the PCI controller. @param Address The address within the PCI configuration space for the PCI controller.
@param Count The number of unit to be read.
@param Buffer For read operations, the destination buffer to store the results. For @param Buffer For read operations, the destination buffer to store the results. For
write operations, the source buffer to write data from. write operations, the source buffer to write data from.
@ -2708,7 +2712,8 @@ PciRootBridgeIoRead (
@param PciRootBridgeIo A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. @param PciRootBridgeIo A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.
@param Pci A pointer to PCI_TYPE00. @param Pci A pointer to PCI_TYPE00.
@param Width Signifies the width of the memory operations. @param Width Signifies the width of the memory operations.
@Param Address The address within the PCI configuration space for the PCI controller. @param Address The address within the PCI configuration space for the PCI controller.
@param Count The number of unit to be read.
@param Buffer For read operations, the destination buffer to store the results. For @param Buffer For read operations, the destination buffer to store the results. For
write operations, the source buffer to write data from. write operations, the source buffer to write data from.
@ -2758,7 +2763,8 @@ PciRootBridgeIoWrite (
@param PciIo A pointer to the EFI_PCI_O_PROTOCOL. @param PciIo A pointer to the EFI_PCI_O_PROTOCOL.
@param Width Signifies the width of the memory operations. @param Width Signifies the width of the memory operations.
@Param Address The address within the PCI configuration space for the PCI controller. @param Address The address within the PCI configuration space for the PCI controller.
@param Count The number of unit to be read.
@param Buffer For read operations, the destination buffer to store the results. For @param Buffer For read operations, the destination buffer to store the results. For
write operations, the source buffer to write data from. write operations, the source buffer to write data from.
@ -2806,7 +2812,8 @@ PciIoRead (
@param PciIo A pointer to the EFI_PCI_O_PROTOCOL. @param PciIo A pointer to the EFI_PCI_O_PROTOCOL.
@param Width Signifies the width of the memory operations. @param Width Signifies the width of the memory operations.
@Param Address The address within the PCI configuration space for the PCI controller. @param Address The address within the PCI configuration space for the PCI controller.
@param Count The number of unit to be read.
@param Buffer For read operations, the destination buffer to store the results. For @param Buffer For read operations, the destination buffer to store the results. For
write operations, the source buffer to write data from. write operations, the source buffer to write data from.

View File

@ -23,8 +23,8 @@ Revision History
**/ **/
#ifndef _EFI_PCI_LIB_H #ifndef _EFI_PCI_LIB_H_
#define _EFI_PCI_LIB_H #define _EFI_PCI_LIB_H_
// //
// Mask definistions for PCD PcdPciIncompatibleDeviceSupportMask // Mask definistions for PCD PcdPciIncompatibleDeviceSupportMask
@ -60,9 +60,9 @@ InstallHotPlugRequestProtocol (
/** /**
Install protocol gEfiPciHotplugDeviceGuid into hotplug device Install protocol gEfiPciHotplugDeviceGuid into hotplug device
instance instance.
@param PciIoDevice hotplug device instance @param PciIoDevice hotplug device instance.
**/ **/
VOID VOID
@ -72,9 +72,9 @@ InstallPciHotplugGuid (
/** /**
UnInstall protocol gEfiPciHotplugDeviceGuid into hotplug device UnInstall protocol gEfiPciHotplugDeviceGuid into hotplug device
instance instance.
@param PciIoDevice hotplug device instance @param PciIoDevice hotplug device instance.
**/ **/
VOID VOID
@ -83,9 +83,9 @@ UninstallPciHotplugGuid (
); );
/** /**
Retrieve the BAR information via PciIo interface Retrieve the BAR information via PciIo interface.
@param PciIoDevice Pci device instance @param PciIoDevice Pci device instance.
**/ **/
VOID VOID
GetBackPcCardBar ( GetBackPcCardBar (
@ -96,8 +96,8 @@ GetBackPcCardBar (
Remove rejected pci device from specific root bridge Remove rejected pci device from specific root bridge
handle. handle.
@param RootBridgeHandle specific parent root bridge handle @param RootBridgeHandle specific parent root bridge handle.
@param Bridge Bridge device instance @param Bridge Bridge device instance.
@retval EFI_SUCCESS Success operation. @retval EFI_SUCCESS Success operation.
**/ **/
@ -110,7 +110,7 @@ RemoveRejectedPciDevices (
/** /**
Wrapper function for allocating resource for pci host bridge. Wrapper function for allocating resource for pci host bridge.
@param PciResAlloc Point to protocol instance EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL @param PciResAlloc Point to protocol instance EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.
**/ **/
EFI_STATUS EFI_STATUS
@ -118,11 +118,23 @@ PciHostBridgeResourceAllocator (
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc
); );
/**
Wrapper function for allocating resource for pci host bridge without hotplug device support.
@param PciResAlloc Point to protocol instance EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.
**/
EFI_STATUS EFI_STATUS
PciHostBridgeResourceAllocator_WithoutHotPlugDeviceSupport ( PciHostBridgeResourceAllocator_WithoutHotPlugDeviceSupport (
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc
); );
/**
Wrapper function for allocating resource for pci host bridge with hotplug device support.
@param PciResAlloc Point to protocol instance EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.
**/
EFI_STATUS EFI_STATUS
PciHostBridgeResourceAllocator_WithHotPlugDeviceSupport ( PciHostBridgeResourceAllocator_WithHotPlugDeviceSupport (
IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc
@ -130,15 +142,15 @@ PciHostBridgeResourceAllocator_WithHotPlugDeviceSupport (
/** /**
Wapper function of scanning pci bus and assign bus number to the given PCI bus system Wapper function of scanning pci bus and assign bus number to the given PCI bus system
Feature flag PcdPciBusHotplugDeviceSupport determine whether need support hotplug Feature flag PcdPciBusHotplugDeviceSupport determine whether need support hotplug.
@param Bridge Bridge device instance @param Bridge Bridge device instance.
@param StartBusNumber start point @param StartBusNumber start point.
@param SubBusNumber Point to sub bus number @param SubBusNumber Point to sub bus number.
@param PaddedBusRange Customized bus number @param PaddedBusRange Customized bus number.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
@retval EFI_DEVICE_ERROR Fail to scan bus @retval EFI_DEVICE_ERROR Fail to scan bus.
**/ **/
EFI_STATUS EFI_STATUS
PciScanBus ( PciScanBus (
@ -148,6 +160,18 @@ PciScanBus (
OUT UINT8 *PaddedBusRange OUT UINT8 *PaddedBusRange
); );
/**
Wapper function of scanning pci bus and assign bus number to the given PCI bus system
Feature flag PcdPciBusHotplugDeviceSupport determine whether need support hotplug.
@param Bridge Bridge device instance.
@param StartBusNumber start point.
@param SubBusNumber Point to sub bus number.
@param PaddedBusRange Customized bus number.
@retval EFI_SUCCESS Success.
@retval EFI_DEVICE_ERROR Fail to scan bus.
**/
EFI_STATUS EFI_STATUS
PciScanBus_WithHotPlugDeviceSupport ( PciScanBus_WithHotPlugDeviceSupport (
IN PCI_IO_DEVICE *Bridge, IN PCI_IO_DEVICE *Bridge,
@ -156,6 +180,18 @@ PciScanBus_WithHotPlugDeviceSupport (
OUT UINT8 *PaddedBusRange OUT UINT8 *PaddedBusRange
); );
/**
Wapper function of scanning pci bus and assign bus number to the given PCI bus system
Feature flag PcdPciBusHotplugDeviceSupport determine whether need support hotplug.
@param Bridge Bridge device instance.
@param StartBusNumber start point.
@param SubBusNumber Point to sub bus number.
@param PaddedBusRange Customized bus number.
@retval EFI_SUCCESS Success.
@retval EFI_DEVICE_ERROR Fail to scan bus.
**/
EFI_STATUS EFI_STATUS
PciScanBus_WithoutHotPlugDeviceSupport ( PciScanBus_WithoutHotPlugDeviceSupport (
IN PCI_IO_DEVICE *Bridge, IN PCI_IO_DEVICE *Bridge,
@ -165,25 +201,24 @@ PciScanBus_WithoutHotPlugDeviceSupport (
); );
/** /**
Process Option Rom on this host bridge Process Option Rom on this host bridge.
@param Bridge Pci bridge device instance @param Bridge Pci bridge device instance.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
PciRootBridgeP2CProcess ( PciRootBridgeP2CProcess (
IN PCI_IO_DEVICE *Bridge IN PCI_IO_DEVICE *Bridge
); );
/** /**
Process Option Rom on this host bridge Process Option Rom on this host bridge.
@param PciResAlloc Pointer to instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL @param PciResAlloc Pointer to instance of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL.
@retval EFI_NOT_FOUND Can not find the root bridge instance @retval EFI_NOT_FOUND Can not find the root bridge instance.
@retval EFI_SUCCESS Success process @retval EFI_SUCCESS Success process.
**/ **/
EFI_STATUS EFI_STATUS
PciHostBridgeP2CProcess ( PciHostBridgeP2CProcess (
@ -192,15 +227,14 @@ PciHostBridgeP2CProcess (
/** /**
This function is used to enumerate the entire host bridge This function is used to enumerate the entire host bridge
in a given platform in a given platform.
@param PciResAlloc A pointer to the resource allocate protocol. @param PciResAlloc A pointer to the resource allocate protocol.
@retval EFI_OUT_OF_RESOURCES no enough resource @retval EFI_OUT_OF_RESOURCES no enough resource.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
PciHostBridgeEnumerator ( PciHostBridgeEnumerator (
EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *PciResAlloc
@ -211,7 +245,8 @@ PciHostBridgeEnumerator (
@param PciIo A pointer to the EFI_PCI_O_PROTOCOL. @param PciIo A pointer to the EFI_PCI_O_PROTOCOL.
@param Width Signifies the width of the memory operations. @param Width Signifies the width of the memory operations.
@Param Address The address within the PCI configuration space for the PCI controller. @param Address The address within the PCI configuration space for the PCI controller.
@param Count The number of unit to be read.
@param Buffer For read operations, the destination buffer to store the results. For @param Buffer For read operations, the destination buffer to store the results. For
write operations, the source buffer to write data from. write operations, the source buffer to write data from.
@ -235,7 +270,8 @@ PciIoRead (
@param PciIo A pointer to the EFI_PCI_O_PROTOCOL. @param PciIo A pointer to the EFI_PCI_O_PROTOCOL.
@param Width Signifies the width of the memory operations. @param Width Signifies the width of the memory operations.
@Param Address The address within the PCI configuration space for the PCI controller. @param Address The address within the PCI configuration space for the PCI controller.
@param Count The number of unit to be write.
@param Buffer For read operations, the destination buffer to store the results. For @param Buffer For read operations, the destination buffer to store the results. For
write operations, the source buffer to write data from. write operations, the source buffer to write data from.
@ -260,7 +296,8 @@ PciIoWrite (
@param PciRootBridgeIo A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. @param PciRootBridgeIo A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.
@param Pci A pointer to PCI_TYPE00. @param Pci A pointer to PCI_TYPE00.
@param Width Signifies the width of the memory operations. @param Width Signifies the width of the memory operations.
@Param Address The address within the PCI configuration space for the PCI controller. @param Address The address within the PCI configuration space for the PCI controller.
@param Count The number of unit to be write.
@param Buffer For read operations, the destination buffer to store the results. For @param Buffer For read operations, the destination buffer to store the results. For
write operations, the source buffer to write data from. write operations, the source buffer to write data from.
@ -286,7 +323,8 @@ PciRootBridgeIoWrite (
@param PciRootBridgeIo A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL. @param PciRootBridgeIo A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.
@param Pci A pointer to PCI_TYPE00. @param Pci A pointer to PCI_TYPE00.
@param Width Signifies the width of the memory operations. @param Width Signifies the width of the memory operations.
@Param Address The address within the PCI configuration space for the PCI controller. @param Address The address within the PCI configuration space for the PCI controller.
@param Count The number of unit to be read.
@param Buffer For read operations, the destination buffer to store the results. For @param Buffer For read operations, the destination buffer to store the results. For
write operations, the source buffer to write data from. write operations, the source buffer to write data from.
@ -299,7 +337,7 @@ PciRootBridgeIoWrite (
EFI_STATUS EFI_STATUS
PciRootBridgeIoRead ( PciRootBridgeIoRead (
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo,
IN PCI_TYPE00 *Pci, IN PCI_TYPE00 *Pci, OPTIONAL
IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width, IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,
IN UINT64 Address, IN UINT64 Address,
IN UINTN Count, IN UINTN Count,

View File

@ -1,4 +1,4 @@
/**@file /** @file
Copyright (c) 2006 - 2008, Intel Corporation Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
@ -36,6 +36,8 @@ MEMMAP_DEVICE_PATH mPciOptionRomImageDevicePathNodeTemplate = {
/** /**
Get Pci device's oprom infor bits. Get Pci device's oprom infor bits.
@param PciIoDevice Pci device instance
@retval EFI_NOT_FOUND Pci device has not oprom @retval EFI_NOT_FOUND Pci device has not oprom
@retval EFI_SUCCESS Pci device has oprom @retval EFI_SUCCESS Pci device has oprom
**/ **/

View File

@ -1,4 +1,4 @@
/**@file /** @file
Copyright (c) 2006, Intel Corporation Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
@ -11,12 +11,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
#ifndef _EFI_PCI_OP_ROM_SUPPORT_H #ifndef _EFI_PCI_OP_ROM_SUPPORT_H_
#define _EFI_PCI_OP_ROM_SUPPORT_H #define _EFI_PCI_OP_ROM_SUPPORT_H_
/** /**
Get Pci device's oprom infor bits. Get Pci device's oprom infor bits.
@param PciIoDevice Pci device instance
@retval EFI_NOT_FOUND Pci device has not oprom @retval EFI_NOT_FOUND Pci device has not oprom
@retval EFI_SUCCESS Pci device has oprom @retval EFI_SUCCESS Pci device has oprom
**/ **/

View File

@ -1,4 +1,4 @@
/**@file /** @file
Copyright (c) 2006, Intel Corporation Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials

View File

@ -1,4 +1,4 @@
/**@file /** @file
Copyright (c) 2006, Intel Corporation Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
@ -11,8 +11,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
#ifndef _EFI_PCI_POWER_MANAGEMENT_H #ifndef _EFI_PCI_POWER_MANAGEMENT_H_
#define _EFI_PCI_POWER_MANAGEMENT_H #define _EFI_PCI_POWER_MANAGEMENT_H_
/** /**
This function is intended to turn off PWE assertion and This function is intended to turn off PWE assertion and

View File

@ -1,4 +1,4 @@
/**@file /** @file
Copyright (c) 2006 - 2008, Intel Corporation Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
@ -21,7 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@param Start address including VGA range @param Start address including VGA range
@param Length length of VGA range. @param Length length of VGA range.
@retval EFI_SUCCESS success @retval EFI_SUCCESS success.
**/ **/
EFI_STATUS EFI_STATUS
SkipVGAAperture ( SkipVGAAperture (
@ -50,12 +50,12 @@ SkipVGAAperture (
} }
/** /**
This function is used to skip ISA aliasing aperture This function is used to skip ISA aliasing aperture.
@param Start address including ISA aliasing aperture @param Start address including ISA aliasing aperture.
@param Length length of ISA aliasing aperture @param Length length of ISA aliasing aperture.
@retval EFI_SUCCESS success @retval EFI_SUCCESS success.
**/ **/
EFI_STATUS EFI_STATUS
SkipIsaAliasAperture ( SkipIsaAliasAperture (
@ -89,10 +89,10 @@ SkipIsaAliasAperture (
This function inserts a resource node into the resource list. This function inserts a resource node into the resource list.
The resource list is sorted in descend order. The resource list is sorted in descend order.
@param Bridge PCI resource node for bridge @param Bridge PCI resource node for bridge.
@param ResNode Resource node want to be inserted @param ResNode Resource node want to be inserted.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
InsertResourceNode ( InsertResourceNode (
@ -141,13 +141,13 @@ Routine Description:
If the TypeMerge is TRUE, Res resource type is changed to the type of destination resource If the TypeMerge is TRUE, Res resource type is changed to the type of destination resource
type. type.
@param Dst Point to destination resource tree @param Dst Point to destination resource tree.
@param Res Point to source resource tree @param Res Point to source resource tree.
@param TypeMerge If the TypeMerge is TRUE, Res resource type is changed to the type of @param TypeMerge If the TypeMerge is TRUE, Res resource type is changed to the type of
destination resource type. destination resource type.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
MergeResourceTree ( MergeResourceTree (
@ -183,7 +183,7 @@ MergeResourceTree (
@param Bridge PCI resource node for bridge. @param Bridge PCI resource node for bridge.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
CalculateApertureIo16 ( CalculateApertureIo16 (
@ -311,11 +311,11 @@ CalculateApertureIo16 (
/** /**
This function is used to calculate the resource aperture This function is used to calculate the resource aperture
for a given bridge device for a given bridge device.
@param Bridge Give bridge device @param Bridge Give bridge device.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
CalculateResourceAperture ( CalculateResourceAperture (
@ -411,16 +411,16 @@ CalculateResourceAperture (
} }
/** /**
Get IO/Memory resource infor for given PCI device Get IO/Memory resource infor for given PCI device.
@param PciDev Pci device instance @param PciDev Pci device instance.
@param IoNode Resource info node for IO @param IoNode Resource info node for IO .
@param Mem32Node Resource info node for 32-bit memory @param Mem32Node Resource info node for 32-bit memory.
@param PMem32Node Resource info node for 32-bit PMemory @param PMem32Node Resource info node for 32-bit PMemory.
@param Mem64Node Resource info node for 64-bit memory @param Mem64Node Resource info node for 64-bit memory.
@param PMem64Node Resource info node for 64-bit PMemory @param PMem64Node Resource info node for 64-bit PMemory.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
GetResourceFromDevice ( GetResourceFromDevice (
@ -558,14 +558,14 @@ GetResourceFromDevice (
} }
/** /**
This function is used to create a resource node This function is used to create a resource node.
@param PciDev Pci device instance @param PciDev Pci device instance.
@param Length Length of Io/Memory resource @param Length Length of Io/Memory resource.
@param Alignment Alignment of resource @param Alignment Alignment of resource.
@param Bar Bar index @param Bar Bar index.
@param ResType Type of resource: IO/Memory @param ResType Type of resource: IO/Memory.
@param ResUage Resource usage @param ResUsage Resource usage.
**/ **/
PCI_RESOURCE_NODE * PCI_RESOURCE_NODE *
CreateResourceNode ( CreateResourceNode (
@ -605,14 +605,14 @@ CreateResourceNode (
This routine is used to extract resource request from This routine is used to extract resource request from
device node list. device node list.
@param Bridge Pci device instance @param Bridge Pci device instance.
@param IoNode Resource info node for IO @param IoNode Resource info node for IO.
@param Mem32Node Resource info node for 32-bit memory @param Mem32Node Resource info node for 32-bit memory.
@param PMem32Node Resource info node for 32-bit PMemory @param PMem32Node Resource info node for 32-bit PMemory.
@param Mem64Node Resource info node for 64-bit memory @param Mem64Node Resource info node for 64-bit memory.
@param PMem64Node Resource info node for 64-bit PMemory @param PMem64Node Resource info node for 64-bit PMemory.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
CreateResourceMap ( CreateResourceMap (
@ -849,16 +849,16 @@ CreateResourceMap (
} }
/** /**
This function is used to do the resource padding for a specific platform This function is used to do the resource padding for a specific platform.
@param Bridge Pci device instance @param PciDev Pci device instance.
@param IoNode Resource info node for IO @param IoNode Resource info node for IO.
@param Mem32Node Resource info node for 32-bit memory @param Mem32Node Resource info node for 32-bit memory.
@param PMem32Node Resource info node for 32-bit PMemory @param PMem32Node Resource info node for 32-bit PMemory.
@param Mem64Node Resource info node for 64-bit memory @param Mem64Node Resource info node for 64-bit memory.
@param PMem64Node Resource info node for 64-bit PMemory @param PMem64Node Resource info node for 64-bit PMemory.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
ResourcePaddingPolicy ( ResourcePaddingPolicy (
@ -893,16 +893,15 @@ ResourcePaddingPolicy (
doesn't support certain resource. Degradation path is doesn't support certain resource. Degradation path is
PMEM64 -> MEM64 -> MEM32 PMEM64 -> MEM64 -> MEM32
PMEM64 -> PMEM32 -> MEM32 PMEM64 -> PMEM32 -> MEM32
IO32 -> IO16 IO32 -> IO16.
@param Bridge Pci device instance @param Bridge Pci device instance.
@param IoNode Resource info node for IO @param Mem32Node Resource info node for 32-bit memory.
@param Mem32Node Resource info node for 32-bit memory @param PMem32Node Resource info node for 32-bit PMemory.
@param PMem32Node Resource info node for 32-bit PMemory @param Mem64Node Resource info node for 64-bit memory.
@param Mem64Node Resource info node for 64-bit memory @param PMem64Node Resource info node for 64-bit PMemory.
@param PMem64Node Resource info node for 64-bit PMemory
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
DegradeResource ( DegradeResource (
@ -1008,10 +1007,11 @@ DegradeResource (
/** /**
Test whether bridge device support decode resource Test whether bridge device support decode resource
@param Bridge Bridge device instance @param Bridge Bridge device instance.
@param Decode Decode type according to resource type @param Decode Decode type according to resource type.
@return whether bridge device support decode resource @return TRUE bridge device support decode resource.
@return FALSE bridge device don't support decode resource.
**/ **/
BOOLEAN BOOLEAN
@ -1030,13 +1030,13 @@ BridgeSupportResourceDecode (
/** /**
This function is used to program the resource allocated This function is used to program the resource allocated
for each resource node for each resource node.
@param Base Base address of resource @param Base Base address of resource.
@param Bridge Bridge device instance @param Bridge Bridge device instance.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
ProgramResource ( ProgramResource (
@ -1084,10 +1084,10 @@ ProgramResource (
/** /**
Program Bar register. Program Bar register.
@param Base Base address for resource @param Base Base address for resource.
@param Node Point to resoure node structure @param Node Point to resoure node structure.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
ProgramBar ( ProgramBar (
@ -1166,12 +1166,12 @@ ProgramBar (
} }
/** /**
Program PPB apperture Program PPB apperture.
@param Base Base address for resource @param Base Base address for resource.
@param Node Point to resoure node structure @param Node Point to resoure node structure.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
ProgramPpbApperture ( ProgramPpbApperture (
@ -1340,13 +1340,13 @@ ProgramPpbApperture (
} }
/** /**
Program parent bridge for oprom Program parent bridge for oprom.
@param PciDevice Pci deivce instance @param PciDevice Pci deivce instance.
@param OptionRomBase Base address for oprom @param OptionRomBase Base address for oprom.
@param Enable Enable/Disable @param Enable Enable/Disable.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
ProgrameUpstreamBridgeForRom ( ProgrameUpstreamBridgeForRom (
@ -1392,11 +1392,11 @@ ProgrameUpstreamBridgeForRom (
} }
/** /**
Test whether resource exists for a bridge Test whether resource exists for a bridge.
@param Bridge Point to resource node for a bridge @param Bridge Point to resource node for a bridge.
@return whether resource exists @return whether resource exists.
**/ **/
BOOLEAN BOOLEAN
ResourceRequestExisted ( ResourceRequestExisted (
@ -1415,8 +1415,8 @@ ResourceRequestExisted (
/** /**
Initialize resource pool structure. Initialize resource pool structure.
@param ResourcePool Point to resource pool structure @param ResourcePool Point to resource pool structure.
@param ResourceType Type of resource @param ResourceType Type of resource.
**/ **/
EFI_STATUS EFI_STATUS
InitializeResourcePool ( InitializeResourcePool (
@ -1434,21 +1434,21 @@ InitializeResourcePool (
} }
/** /**
Get all resource information for given Pci device Get all resource information for given Pci device.
@param PciDev Pci device instance @param PciDev Pci device instance.
@param IoBridge Io resource node @param IoBridge Io resource node.
@param Mem32Bridge 32-bit memory node @param Mem32Bridge 32-bit memory node.
@param PMem32Bridge 32-bit Pmemory node @param PMem32Bridge 32-bit Pmemory node.
@param Mem64Bridge 64-bit memory node @param Mem64Bridge 64-bit memory node.
@param PMem64Bridge 64-bit PMemory node @param PMem64Bridge 64-bit PMemory node.
@param IoPool Link list header for Io resource @param IoPool Link list header for Io resource.
@param Mem32Pool Link list header for 32-bit memory @param Mem32Pool Link list header for 32-bit memory.
@param PMem32Pool Link list header for 32-bit Pmemory @param PMem32Pool Link list header for 32-bit Pmemory.
@param Mem64Pool Link list header for 64-bit memory @param Mem64Pool Link list header for 64-bit memory.
@param PMem64Pool Link list header for 64-bit Pmemory @param PMem64Pool Link list header for 64-bit Pmemory.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
GetResourceMap ( GetResourceMap (
@ -1553,11 +1553,11 @@ GetResourceMap (
} }
/** /**
Destory given resource tree Destory given resource tree.
@param Bridge root node of resource tree @param Bridge root node of resource tree.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
DestroyResourceTree ( DestroyResourceTree (
@ -1588,10 +1588,10 @@ DestroyResourceTree (
/** /**
Record the reserved resource and insert to reserved list. Record the reserved resource and insert to reserved list.
@param Base Base address of reserved resourse @param Base Base address of reserved resourse.
@param Length Length of reserved resource @param Length Length of reserved resource.
@param ResType Resource type @param ResType Resource type.
@param Bridge Pci device instance @param Bridge Pci device instance.
**/ **/
EFI_STATUS EFI_STATUS
RecordReservedResource ( RecordReservedResource (
@ -1619,16 +1619,16 @@ RecordReservedResource (
} }
/** /**
Insert resource padding for P2C Insert resource padding for P2C.
@param PciDev Pci device instance @param PciDev Pci device instance.
@param IoNode Resource info node for IO @param IoNode Resource info node for IO.
@param Mem32Node Resource info node for 32-bit memory @param Mem32Node Resource info node for 32-bit memory.
@param PMem32Node Resource info node for 32-bit PMemory @param PMem32Node Resource info node for 32-bit PMemory.
@param Mem64Node Resource info node for 64-bit memory @param Mem64Node Resource info node for 64-bit memory.
@param PMem64Node Resource info node for 64-bit PMemory @param PMem64Node Resource info node for 64-bit PMemory.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
ResourcePaddingForCardBusBridge ( ResourcePaddingForCardBusBridge (
@ -1959,14 +1959,14 @@ ProgramP2C (
/** /**
Create padding resource node. Create padding resource node.
@param PciDev Pci device instance @param PciDev Pci device instance.
@param IoNode Resource info node for IO @param IoNode Resource info node for IO.
@param Mem32Node Resource info node for 32-bit memory @param Mem32Node Resource info node for 32-bit memory.
@param PMem32Node Resource info node for 32-bit PMemory @param PMem32Node Resource info node for 32-bit PMemory.
@param Mem64Node Resource info node for 64-bit memory @param Mem64Node Resource info node for 64-bit memory.
@param PMem64Node Resource info node for 64-bit PMemory @param PMem64Node Resource info node for 64-bit PMemory.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
@ -2117,11 +2117,11 @@ ApplyResourcePadding (
} }
/** /**
Get padding resource for PPB Get padding resource for PPB.
Light PCI bus driver woundn't support hotplug root device Light PCI bus driver woundn't support hotplug root device
So no need to pad resource for them So no need to pad resource for them.
@param PciIoDevice Pci device instance @param PciIoDevice Pci device instance.
**/ **/
VOID VOID
GetResourcePaddingPpb ( GetResourcePaddingPpb (

View File

@ -1,4 +1,4 @@
/**@file /** @file
Copyright (c) 2006, Intel Corporation Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
@ -11,8 +11,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
#ifndef _EFI_PCI_RESOURCE_SUPPORT_H #ifndef _EFI_PCI_RESOURCE_SUPPORT_H_
#define _EFI_PCI_RESOURCE_SUPPORT_H #define _EFI_PCI_RESOURCE_SUPPORT_H_
#define RESERVED_RESOURCE_SIGNATURE SIGNATURE_32 ('r', 's', 'v', 'd') #define RESERVED_RESOURCE_SIGNATURE SIGNATURE_32 ('r', 's', 'v', 'd')
@ -65,7 +65,7 @@ typedef struct {
@param Start address including VGA range @param Start address including VGA range
@param Length length of VGA range. @param Length length of VGA range.
@retval EFI_SUCCESS success @retval EFI_SUCCESS success.
**/ **/
EFI_STATUS EFI_STATUS
SkipVGAAperture ( SkipVGAAperture (
@ -74,12 +74,12 @@ SkipVGAAperture (
); );
/** /**
This function is used to skip ISA aliasing aperture This function is used to skip ISA aliasing aperture.
@param Start address including ISA aliasing aperture @param Start address including ISA aliasing aperture.
@param Length length of ISA aliasing aperture @param Length length of ISA aliasing aperture.
@retval EFI_SUCCESS success @retval EFI_SUCCESS success.
**/ **/
EFI_STATUS EFI_STATUS
SkipIsaAliasAperture ( SkipIsaAliasAperture (
@ -91,10 +91,10 @@ SkipIsaAliasAperture (
This function inserts a resource node into the resource list. This function inserts a resource node into the resource list.
The resource list is sorted in descend order. The resource list is sorted in descend order.
@param Bridge PCI resource node for bridge @param Bridge PCI resource node for bridge.
@param ResNode Resource node want to be inserted @param ResNode Resource node want to be inserted.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
InsertResourceNode ( InsertResourceNode (
@ -114,8 +114,8 @@ Routine Description:
If the TypeMerge is TRUE, Res resource type is changed to the type of destination resource If the TypeMerge is TRUE, Res resource type is changed to the type of destination resource
type. type.
@param Dst Point to destination resource tree @param Dst Point to destination resource tree.
@param Res Point to source resource tree @param Res Point to source resource tree.
@param TypeMerge If the TypeMerge is TRUE, Res resource type is changed to the type of @param TypeMerge If the TypeMerge is TRUE, Res resource type is changed to the type of
destination resource type. destination resource type.
@ -135,7 +135,7 @@ MergeResourceTree (
@param Bridge PCI resource node for bridge. @param Bridge PCI resource node for bridge.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
CalculateApertureIo16 ( CalculateApertureIo16 (
@ -144,11 +144,11 @@ CalculateApertureIo16 (
/** /**
This function is used to calculate the resource aperture This function is used to calculate the resource aperture
for a given bridge device for a given bridge device.
@param Bridge Give bridge device @param Bridge Give bridge device.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
CalculateResourceAperture ( CalculateResourceAperture (
@ -156,16 +156,16 @@ CalculateResourceAperture (
); );
/** /**
Get IO/Memory resource infor for given PCI device Get IO/Memory resource infor for given PCI device.
@param PciDev Pci device instance @param PciDev Pci device instance.
@param IoNode Resource info node for IO @param IoNode Resource info node for IO .
@param Mem32Node Resource info node for 32-bit memory @param Mem32Node Resource info node for 32-bit memory.
@param PMem32Node Resource info node for 32-bit PMemory @param PMem32Node Resource info node for 32-bit PMemory.
@param Mem64Node Resource info node for 64-bit memory @param Mem64Node Resource info node for 64-bit memory.
@param PMem64Node Resource info node for 64-bit PMemory @param PMem64Node Resource info node for 64-bit PMemory.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
GetResourceFromDevice ( GetResourceFromDevice (
@ -178,14 +178,14 @@ GetResourceFromDevice (
); );
/** /**
This function is used to create a resource node This function is used to create a resource node.
@param PciDev Pci device instance @param PciDev Pci device instance.
@param Length Length of Io/Memory resource @param Length Length of Io/Memory resource.
@param Alignment Alignment of resource @param Alignment Alignment of resource.
@param Bar Bar index @param Bar Bar index.
@param ResType Type of resource: IO/Memory @param ResType Type of resource: IO/Memory.
@param ResUage Resource usage @param ResUsage Resource usage.
**/ **/
PCI_RESOURCE_NODE * PCI_RESOURCE_NODE *
CreateResourceNode ( CreateResourceNode (
@ -201,14 +201,14 @@ CreateResourceNode (
This routine is used to extract resource request from This routine is used to extract resource request from
device node list. device node list.
@param Bridge Pci device instance @param Bridge Pci device instance.
@param IoNode Resource info node for IO @param IoNode Resource info node for IO.
@param Mem32Node Resource info node for 32-bit memory @param Mem32Node Resource info node for 32-bit memory.
@param PMem32Node Resource info node for 32-bit PMemory @param PMem32Node Resource info node for 32-bit PMemory.
@param Mem64Node Resource info node for 64-bit memory @param Mem64Node Resource info node for 64-bit memory.
@param PMem64Node Resource info node for 64-bit PMemory @param PMem64Node Resource info node for 64-bit PMemory.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
CreateResourceMap ( CreateResourceMap (
@ -221,16 +221,16 @@ CreateResourceMap (
); );
/** /**
This function is used to do the resource padding for a specific platform This function is used to do the resource padding for a specific platform.
@param Bridge Pci device instance @param PciDev Pci device instance.
@param IoNode Resource info node for IO @param IoNode Resource info node for IO.
@param Mem32Node Resource info node for 32-bit memory @param Mem32Node Resource info node for 32-bit memory.
@param PMem32Node Resource info node for 32-bit PMemory @param PMem32Node Resource info node for 32-bit PMemory.
@param Mem64Node Resource info node for 64-bit memory @param Mem64Node Resource info node for 64-bit memory.
@param PMem64Node Resource info node for 64-bit PMemory @param PMem64Node Resource info node for 64-bit PMemory.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
ResourcePaddingPolicy ( ResourcePaddingPolicy (
@ -249,14 +249,13 @@ ResourcePaddingPolicy (
PMEM64 -> PMEM32 -> MEM32 PMEM64 -> PMEM32 -> MEM32
IO32 -> IO16 IO32 -> IO16
@param Bridge Pci device instance @param Bridge Pci device instance.
@param IoNode Resource info node for IO @param Mem32Node Resource info node for 32-bit memory.
@param Mem32Node Resource info node for 32-bit memory @param PMem32Node Resource info node for 32-bit PMemory.
@param PMem32Node Resource info node for 32-bit PMemory @param Mem64Node Resource info node for 64-bit memory.
@param Mem64Node Resource info node for 64-bit memory @param PMem64Node Resource info node for 64-bit PMemory.
@param PMem64Node Resource info node for 64-bit PMemory
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
DegradeResource ( DegradeResource (
@ -268,12 +267,12 @@ DegradeResource (
); );
/** /**
Test whether bridge device support decode resource Test whether bridge device support decode resource.
@param Bridge Bridge device instance @param Bridge Bridge device instance.
@param Decode Decode type according to resource type @param Decode Decode type according to resource type.
@return whether bridge device support decode resource @return whether bridge device support decode resource.
**/ **/
BOOLEAN BOOLEAN
@ -284,13 +283,13 @@ BridgeSupportResourceDecode (
/** /**
This function is used to program the resource allocated This function is used to program the resource allocated
for each resource node for each resource node.
@param Base Base address of resource @param Base Base address of resource.
@param Bridge Bridge device instance @param Bridge Bridge device instance.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
ProgramResource ( ProgramResource (
@ -301,10 +300,10 @@ ProgramResource (
/** /**
Program Bar register. Program Bar register.
@param Base Base address for resource @param Base Base address for resource.
@param Node Point to resoure node structure @param Node Point to resoure node structure.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
ProgramBar ( ProgramBar (
@ -313,12 +312,12 @@ ProgramBar (
); );
/** /**
Program PPB apperture Program PPB apperture.
@param Base Base address for resource @param Base Base address for resource.
@param Node Point to resoure node structure @param Node Point to resoure node structure.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
ProgramPpbApperture ( ProgramPpbApperture (
@ -327,13 +326,13 @@ ProgramPpbApperture (
); );
/** /**
Program parent bridge for oprom Program parent bridge for oprom.
@param PciDevice Pci deivce instance @param PciDevice Pci deivce instance.
@param OptionRomBase Base address for oprom @param OptionRomBase Base address for oprom.
@param Enable Enable/Disable @param Enable Enable/Disable.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
ProgrameUpstreamBridgeForRom ( ProgrameUpstreamBridgeForRom (
@ -343,11 +342,11 @@ ProgrameUpstreamBridgeForRom (
); );
/** /**
Test whether resource exists for a bridge Test whether resource exists for a bridge.
@param Bridge Point to resource node for a bridge @param Bridge Point to resource node for a bridge.
@return whether resource exists @return whether resource exists.
**/ **/
BOOLEAN BOOLEAN
ResourceRequestExisted ( ResourceRequestExisted (
@ -357,8 +356,8 @@ ResourceRequestExisted (
/** /**
Initialize resource pool structure. Initialize resource pool structure.
@param ResourcePool Point to resource pool structure @param ResourcePool Point to resource pool structure.
@param ResourceType Type of resource @param ResourceType Type of resource.
**/ **/
EFI_STATUS EFI_STATUS
InitializeResourcePool ( InitializeResourcePool (
@ -367,21 +366,21 @@ InitializeResourcePool (
); );
/** /**
Get all resource information for given Pci device Get all resource information for given Pci device.
@param PciDev Pci device instance @param PciDev Pci device instance.
@param IoBridge Io resource node @param IoBridge Io resource node.
@param Mem32Bridge 32-bit memory node @param Mem32Bridge 32-bit memory node.
@param PMem32Bridge 32-bit Pmemory node @param PMem32Bridge 32-bit Pmemory node.
@param Mem64Bridge 64-bit memory node @param Mem64Bridge 64-bit memory node.
@param PMem64Bridge 64-bit PMemory node @param PMem64Bridge 64-bit PMemory node.
@param IoPool Link list header for Io resource @param IoPool Link list header for Io resource.
@param Mem32Pool Link list header for 32-bit memory @param Mem32Pool Link list header for 32-bit memory.
@param PMem32Pool Link list header for 32-bit Pmemory @param PMem32Pool Link list header for 32-bit Pmemory.
@param Mem64Pool Link list header for 64-bit memory @param Mem64Pool Link list header for 64-bit memory.
@param PMem64Pool Link list header for 64-bit Pmemory @param PMem64Pool Link list header for 64-bit Pmemory.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
GetResourceMap ( GetResourceMap (
@ -399,11 +398,11 @@ GetResourceMap (
); );
/** /**
Destory given resource tree Destory given resource tree.
@param Bridge root node of resource tree @param Bridge root node of resource tree.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
DestroyResourceTree ( DestroyResourceTree (
@ -413,10 +412,10 @@ DestroyResourceTree (
/** /**
Record the reserved resource and insert to reserved list. Record the reserved resource and insert to reserved list.
@param Base Base address of reserved resourse @param Base Base address of reserved resourse.
@param Length Length of reserved resource @param Length Length of reserved resource.
@param ResType Resource type @param ResType Resource type.
@param Bridge Pci device instance @param Bridge Pci device instance.
**/ **/
EFI_STATUS EFI_STATUS
RecordReservedResource ( RecordReservedResource (
@ -427,16 +426,16 @@ RecordReservedResource (
); );
/** /**
Insert resource padding for P2C Insert resource padding for P2C.
@param PciDev Pci device instance @param PciDev Pci device instance.
@param IoNode Resource info node for IO @param IoNode Resource info node for IO.
@param Mem32Node Resource info node for 32-bit memory @param Mem32Node Resource info node for 32-bit memory.
@param PMem32Node Resource info node for 32-bit PMemory @param PMem32Node Resource info node for 32-bit PMemory.
@param Mem64Node Resource info node for 64-bit memory @param Mem64Node Resource info node for 64-bit memory.
@param PMem64Node Resource info node for 64-bit PMemory @param PMem64Node Resource info node for 64-bit PMemory.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
ResourcePaddingForCardBusBridge ( ResourcePaddingForCardBusBridge (
@ -449,12 +448,12 @@ ResourcePaddingForCardBusBridge (
); );
/** /**
Program P2C register for given resource node Program P2C register for given resource node.
@param Base Base address of P2C device @param Base Base address of P2C device.
@param Node Given resource node. @param Node Given resource node.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS
ProgramP2C ( ProgramP2C (
@ -465,12 +464,12 @@ ProgramP2C (
/** /**
Create padding resource node. Create padding resource node.
@param PciDev Pci device instance @param PciDev Pci device instance.
@param IoNode Resource info node for IO @param IoNode Resource info node for IO.
@param Mem32Node Resource info node for 32-bit memory @param Mem32Node Resource info node for 32-bit memory.
@param PMem32Node Resource info node for 32-bit PMemory @param PMem32Node Resource info node for 32-bit PMemory.
@param Mem64Node Resource info node for 64-bit memory @param Mem64Node Resource info node for 64-bit memory.
@param PMem64Node Resource info node for 64-bit PMemory @param PMem64Node Resource info node for 64-bit PMemory.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success
@ -488,9 +487,9 @@ ApplyResourcePadding (
/** /**
Get padding resource for PPB Get padding resource for PPB
Light PCI bus driver woundn't support hotplug root device Light PCI bus driver woundn't support hotplug root device
So no need to pad resource for them So no need to pad resource for them.
@param PciIoDevice Pci device instance @param PciIoDevice Pci device instance.
**/ **/
VOID VOID
GetResourcePaddingPpb ( GetResourcePaddingPpb (
@ -500,8 +499,8 @@ GetResourcePaddingPpb (
/** /**
Reset and all bus number from specific bridge. Reset and all bus number from specific bridge.
@param Bridge Parent specific bridge @param Bridge Parent specific bridge.
@param StartBusNumber start bus number @param StartBusNumber start bus number.
**/ **/
EFI_STATUS EFI_STATUS
ResetAllPpbBusNumber ( ResetAllPpbBusNumber (

View File

@ -1,4 +1,4 @@
/**@file /** @file
Option Rom Support for PCI Bus Driver Option Rom Support for PCI Bus Driver
Copyright (c) 2006, Intel Corporation Copyright (c) 2006, Intel Corporation
@ -30,14 +30,14 @@ UINTN mMaxNumberOfPciRomImages = 0;
EFI_PCI_ROM_IMAGE_MAPPING *mRomImageTable = NULL; EFI_PCI_ROM_IMAGE_MAPPING *mRomImageTable = NULL;
/** /**
Add the Rom Image to internal database for later PCI light enumeration Add the Rom Image to internal database for later PCI light enumeration.
@param ImageHandle Option Rom image handle @param ImageHandle Option Rom image handle.
@param Seg Segment of PCI space @param Seg Segment of PCI space.
@param Bus Bus NO of PCI space @param Bus Bus NO of PCI space.
@param Dev Dev NO of PCI space @param Dev Dev NO of PCI space.
@param Func Func NO of PCI space @param Func Func NO of PCI space.
@param RomAddress Base address of OptionRom @param RomAddress Base address of OptionRom.
@param RomLength Length of rom image. @param RomLength Length of rom image.
**/ **/
VOID VOID

View File

@ -1,4 +1,4 @@
/**@file /** @file
Option Rom Support for PCI Bus Driver Option Rom Support for PCI Bus Driver
Copyright (c) 2006, Intel Corporation Copyright (c) 2006, Intel Corporation
@ -12,18 +12,18 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
#ifndef _EFI_PCI_ROM_TABLE_H #ifndef _EFI_PCI_ROM_TABLE_H_
#define _EFI_PCI_ROM_TABLE_H #define _EFI_PCI_ROM_TABLE_H_
/** /**
Add the Rom Image to internal database for later PCI light enumeration Add the Rom Image to internal database for later PCI light enumeration.
@param ImageHandle Option Rom image handle @param ImageHandle Option Rom image handle.
@param Seg Segment of PCI space @param Seg Segment of PCI space.
@param Bus Bus NO of PCI space @param Bus Bus NO of PCI space.
@param Dev Dev NO of PCI space @param Dev Dev NO of PCI space.
@param Func Func NO of PCI space @param Func Func NO of PCI space.
@param RomAddress Base address of OptionRom @param RomAddress Base address of OptionRom.
@param RomLength Length of rom image. @param RomLength Length of rom image.
**/ **/
VOID VOID
@ -39,9 +39,9 @@ PciRomAddImageMapping (
/** /**
Load all option rom image to PCI driver list. Load all option rom image to PCI driver list.
@param This Pointer to protocol instance EFI_DRIVER_BINDING_PROTOCOL @param This Pointer to protocol instance EFI_DRIVER_BINDING_PROTOCOL.
@param PciRootBridgeIo Root bridge Io instance @param PciRootBridgeIo Root bridge Io instance.
@param PciIoDevice device instance @param PciIoDevice device instance.
**/ **/
EFI_STATUS EFI_STATUS
PciRomGetRomResourceFromPciOptionRomTable ( PciRomGetRomResourceFromPciOptionRomTable (

View File

@ -36,8 +36,8 @@ EFI_DRIVER_BINDING_PROTOCOL gPciVgaMiniPortDriverBinding = {
/** /**
Driver entry point for VgaMiniPort driver. Driver entry point for VgaMiniPort driver.
@param ImageHandle Driver image handle @param ImageHandle Driver image handle.
@param SystemTable Point to EFI_SYSTEM_TABLE @param SystemTable Point to EFI_SYSTEM_TABLE.
@retval Status of install driver binding protocol. @retval Status of install driver binding protocol.
**/ **/
@ -64,7 +64,12 @@ PciVgaMiniPortDriverEntryPoint (
(Standard DriverBinding Protocol Supported() function) (Standard DriverBinding Protocol Supported() function)
@return EFI_STATUS @param This The driver binding protocol.
@param Controller The controller handle to check.
@param RemainingDevicePath The remaining device path.
@retval EFI_SUCCESS The driver supports this controller.
@retval EFI_UNSUPPORTED This device isn't supported.
**/ **/
EFI_STATUS EFI_STATUS
@ -134,7 +139,13 @@ Done:
(Standard DriverBinding Protocol Start() function) (Standard DriverBinding Protocol Start() function)
@return EFI_STATUS @param This The driver binding instance.
@param Controller The controller to check.
@param RemainingDevicePath The remaining device patch.
@retval EFI_SUCCESS The controller is controlled by the driver.
@retval EFI_ALREADY_STARTED The controller is already controlled by the driver.
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources.
**/ **/
EFI_STATUS EFI_STATUS
@ -212,7 +223,7 @@ Done:
This->DriverBindingHandle, This->DriverBindingHandle,
Controller Controller
); );
if (PciVgaMiniPortPrivate) { if (PciVgaMiniPortPrivate != NULL) {
gBS->FreePool (PciVgaMiniPortPrivate); gBS->FreePool (PciVgaMiniPortPrivate);
} }
} }
@ -226,7 +237,14 @@ Done:
(Standard DriverBinding Protocol Stop() function) (Standard DriverBinding Protocol Stop() function)
@return EFI_STATUS @param This The driver binding protocol.
@param Controller The controller to release.
@param NumberOfChildren The child number that opened controller
BY_CHILD.
@param ChildHandleBuffer The array of child handle.
@retval EFI_SUCCESS The controller or children are stopped.
@retval EFI_DEVICE_ERROR Failed to stop the driver.
**/ **/
EFI_STATUS EFI_STATUS
@ -281,13 +299,13 @@ PciVgaMiniPortDriverBindingStop (
// //
/** /**
Thunk function of EFI_VGA_MINI_PORT_SET_MODE Thunk function of EFI_VGA_MINI_PORT_SET_MODE.
@param This Point to instance of EFI_VGA_MINI_PORT_PROTOCOL @param This Point to instance of EFI_VGA_MINI_PORT_PROTOCOL.
@param ModeNumber Mode number @param ModeNumber Mode number.
@retval EFI_UNSUPPORTED Invalid mode number @retval EFI_UNSUPPORTED Invalid mode number.
@retval EFI_SUCCESS Success @retval EFI_SUCCESS Success.
**/ **/
EFI_STATUS EFI_STATUS

View File

@ -11,8 +11,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/ **/
#ifndef _VGA_MINIPORT_H #ifndef _VGA_MINIPORT_H_
#define _VGA_MINIPORT_H #define _VGA_MINIPORT_H_
// //
// The package level header files this module uses // The package level header files this module uses
@ -61,21 +61,66 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gPciVgaMiniPortComponentName2;
// //
// Driver Binding Protocol functions // Driver Binding Protocol functions
// //
/**
Supported.
(Standard DriverBinding Protocol Supported() function)
@param This The driver binding protocol.
@param Controller The controller handle to check.
@param RemainingDevicePath The remaining device path.
@retval EFI_SUCCESS The driver supports this controller.
@retval EFI_UNSUPPORTED This device isn't supported.
**/
EFI_STATUS EFI_STATUS
EFIAPI
PciVgaMiniPortDriverBindingSupported ( PciVgaMiniPortDriverBindingSupported (
IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller, IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
); );
/**
Install VGA Mini Port Protocol onto VGA device handles
(Standard DriverBinding Protocol Start() function)
@param This The driver binding instance.
@param Controller The controller to check.
@param RemainingDevicePath The remaining device patch.
@retval EFI_SUCCESS The controller is controlled by the driver.
@retval EFI_ALREADY_STARTED The controller is already controlled by the driver.
@retval EFI_OUT_OF_RESOURCES Failed to allocate resources.
**/
EFI_STATUS EFI_STATUS
EFIAPI
PciVgaMiniPortDriverBindingStart ( PciVgaMiniPortDriverBindingStart (
IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller, IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
); );
/**
Stop.
(Standard DriverBinding Protocol Stop() function)
@param This The driver binding protocol.
@param Controller The controller to release.
@param NumberOfChildren The child number that opened controller
BY_CHILD.
@param ChildHandleBuffer The array of child handle.
@retval EFI_SUCCESS The controller or children are stopped.
@retval EFI_DEVICE_ERROR Failed to stop the driver.
**/
EFI_STATUS EFI_STATUS
EFIAPI
PciVgaMiniPortDriverBindingStop ( PciVgaMiniPortDriverBindingStop (
IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller, IN EFI_HANDLE Controller,
@ -86,6 +131,16 @@ PciVgaMiniPortDriverBindingStop (
// //
// VGA Mini Port Protocol functions // VGA Mini Port Protocol functions
// //
/**
Thunk function of EFI_VGA_MINI_PORT_SET_MODE.
@param This Point to instance of EFI_VGA_MINI_PORT_PROTOCOL.
@param ModeNumber Mode number.
@retval EFI_UNSUPPORTED Invalid mode number.
@retval EFI_SUCCESS Success.
**/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PciVgaMiniPortSetMode ( PciVgaMiniPortSetMode (