Make EdkModulePkg pass Intel IPF compiler with /W4 /WX switches, solving warning #1419.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2338 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
xli24
2007-01-31 04:57:46 +00:00
parent 86e6bb786f
commit 92dda53e9f
100 changed files with 2096 additions and 2043 deletions

View File

@@ -12,31 +12,6 @@
#include "AtapiPassThru.h"
EFI_STATUS
EFIAPI
AtapiScsiPassThruDriverBindingSupported (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
EFI_STATUS
EFIAPI
AtapiScsiPassThruDriverBindingStart (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
EFI_STATUS
EFIAPI
AtapiScsiPassThruDriverBindingStop (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
);
///
/// IDE registers' fixed address
///

View File

@@ -236,6 +236,53 @@ typedef struct {
//
// function prototype
//
EFI_STATUS
EFIAPI
AtapiScsiPassThruDriverBindingSupported (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
EFI_STATUS
EFIAPI
AtapiScsiPassThruDriverBindingStart (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
EFI_STATUS
EFIAPI
AtapiScsiPassThruDriverBindingStop (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
);
//
// EFI Component Name Functions
//
EFI_STATUS
EFIAPI
AtapiScsiPassThruComponentNameGetDriverName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN CHAR8 *Language,
OUT CHAR16 **DriverName
);
EFI_STATUS
EFIAPI
AtapiScsiPassThruComponentNameGetControllerName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN CHAR8 *Language,
OUT CHAR16 **ControllerName
);
/**
AtapiScsiPassThruDriverEntryPoint

View File

@@ -13,27 +13,6 @@
**/
#include "AtapiPassThru.h"
//
// EFI Component Name Functions
//
EFI_STATUS
EFIAPI
AtapiScsiPassThruComponentNameGetDriverName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN CHAR8 *Language,
OUT CHAR16 **DriverName
);
EFI_STATUS
EFIAPI
AtapiScsiPassThruComponentNameGetControllerName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN CHAR8 *Language,
OUT CHAR16 **ControllerName
);
///
/// EFI Component Name Protocol
///

View File

@@ -62,6 +62,19 @@ typedef struct {
UINT8 *LineBuffer;
} CIRRUS_LOGIC_5430_PRIVATE_DATA;
///
/// Video Mode structure
///
typedef struct {
UINT32 Width;
UINT32 Height;
UINT32 ColorDepth;
UINT32 RefreshRate;
UINT8 *CrtcSettings;
UINT16 *SeqSettings;
UINT8 MiscSetting;
} CIRRUS_LOGIC_5430_VIDEO_MODES;
#define CIRRUS_LOGIC_5430_PRIVATE_DATA_FROM_UGA_DRAW_THIS(a) \
CR(a, CIRRUS_LOGIC_5430_PRIVATE_DATA, UgaDraw, CIRRUS_LOGIC_5430_PRIVATE_DATA_SIGNATURE)
@@ -200,4 +213,79 @@ CirrusLogic5430ControllerDriverStop (
)
;
//
// EFI Component Name Functions
//
EFI_STATUS
EFIAPI
CirrusLogic5430ComponentNameGetDriverName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN CHAR8 *Language,
OUT CHAR16 **DriverName
);
EFI_STATUS
EFIAPI
CirrusLogic5430ComponentNameGetControllerName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN CHAR8 *Language,
OUT CHAR16 **ControllerName
);
//
// Local Function Prototypes
//
VOID
InitializeGraphicsMode (
CIRRUS_LOGIC_5430_PRIVATE_DATA *Private,
CIRRUS_LOGIC_5430_VIDEO_MODES *ModeData
);
VOID
SetPaletteColor (
CIRRUS_LOGIC_5430_PRIVATE_DATA *Private,
UINTN Index,
UINT8 Red,
UINT8 Green,
UINT8 Blue
);
VOID
SetDefaultPalette (
CIRRUS_LOGIC_5430_PRIVATE_DATA *Private
);
VOID
DrawLogo (
CIRRUS_LOGIC_5430_PRIVATE_DATA *Private
);
VOID
outb (
CIRRUS_LOGIC_5430_PRIVATE_DATA *Private,
UINTN Address,
UINT8 Data
);
VOID
outw (
CIRRUS_LOGIC_5430_PRIVATE_DATA *Private,
UINTN Address,
UINT16 Data
);
UINT8
inb (
CIRRUS_LOGIC_5430_PRIVATE_DATA *Private,
UINTN Address
);
UINT16
inw (
CIRRUS_LOGIC_5430_PRIVATE_DATA *Private,
UINTN Address
);
#endif

View File

@@ -16,18 +16,11 @@
#include "CirrusLogic5430.h"
///
/// Video Mode structure
///
typedef struct {
UINT32 Width;
UINT32 Height;
UINT32 ColorDepth;
UINT32 RefreshRate;
UINT8 *CrtcSettings;
UINT16 *SeqSettings;
UINT8 MiscSetting;
} CIRRUS_LOGIC_5430_VIDEO_MODES;
STATIC
VOID
ClearScreen (
CIRRUS_LOGIC_5430_PRIVATE_DATA *Private
);
///
/// Generic Attribute Controller Register Settings
@@ -99,66 +92,6 @@ static CIRRUS_LOGIC_5430_VIDEO_MODES CirrusLogic5430VideoModes[] = {
{ 1024, 768, 8, 60, Crtc_1024_768_256_60, Seq_1024_768_256_60, 0xef }
};
//
// Local Function Prototypes
//
VOID
InitializeGraphicsMode (
CIRRUS_LOGIC_5430_PRIVATE_DATA *Private,
CIRRUS_LOGIC_5430_VIDEO_MODES *ModeData
);
VOID
SetPaletteColor (
CIRRUS_LOGIC_5430_PRIVATE_DATA *Private,
UINTN Index,
UINT8 Red,
UINT8 Green,
UINT8 Blue
);
VOID
SetDefaultPalette (
CIRRUS_LOGIC_5430_PRIVATE_DATA *Private
);
STATIC
VOID
ClearScreen (
CIRRUS_LOGIC_5430_PRIVATE_DATA *Private
);
VOID
DrawLogo (
CIRRUS_LOGIC_5430_PRIVATE_DATA *Private
);
VOID
outb (
CIRRUS_LOGIC_5430_PRIVATE_DATA *Private,
UINTN Address,
UINT8 Data
);
VOID
outw (
CIRRUS_LOGIC_5430_PRIVATE_DATA *Private,
UINTN Address,
UINT16 Data
);
UINT8
inb (
CIRRUS_LOGIC_5430_PRIVATE_DATA *Private,
UINTN Address
);
UINT16
inw (
CIRRUS_LOGIC_5430_PRIVATE_DATA *Private,
UINTN Address
);
//
// UGA Draw Protocol Member Functions
//

View File

@@ -12,27 +12,6 @@
#include "CirrusLogic5430.h"
//
// EFI Component Name Functions
//
EFI_STATUS
EFIAPI
CirrusLogic5430ComponentNameGetDriverName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN CHAR8 *Language,
OUT CHAR16 **DriverName
);
EFI_STATUS
EFIAPI
CirrusLogic5430ComponentNameGetControllerName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN CHAR8 *Language,
OUT CHAR16 **ControllerName
);
//
// EFI Component Name Protocol
//

View File

@@ -19,27 +19,6 @@ Abstract:
#include "Ehci.h"
//
// EFI Component Name Functions
//
EFI_STATUS
EFIAPI
EhciComponentNameGetDriverName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN CHAR8 *Language,
OUT CHAR16 **DriverName
);
EFI_STATUS
EFIAPI
EhciComponentNameGetControllerName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle, OPTIONAL
IN CHAR8 *Language,
OUT CHAR16 **ControllerName
);
//
// EFI Component Name Protocol
//

View File

@@ -27,190 +27,6 @@ GLOBAL_REMOVE_IF_UNREFERENCED UINTN gEHCDebugLevel = EFI_D_ERROR;
GLOBAL_REMOVE_IF_UNREFERENCED UINTN gEHCErrorLevel = EFI_D_ERROR;
//
// Prototypes
// Driver model protocol interface
//
EFI_STATUS
EFIAPI
EhciDriverBindingSupported (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
EFI_STATUS
EFIAPI
EhciDriverBindingStart (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
EFI_STATUS
EFIAPI
EhciDriverBindingStop (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
);
//
// Ehci protocol interface
//
EFI_STATUS
EFIAPI
EhciGetCapability (
IN EFI_USB2_HC_PROTOCOL *This,
OUT UINT8 *MaxSpeed,
OUT UINT8 *PortNumber,
OUT UINT8 *Is64BitCapable
);
EFI_STATUS
EFIAPI
EhciReset (
IN EFI_USB2_HC_PROTOCOL *This,
IN UINT16 Attributes
);
EFI_STATUS
EFIAPI
EhciGetState (
IN EFI_USB2_HC_PROTOCOL *This,
OUT EFI_USB_HC_STATE *State
);
EFI_STATUS
EFIAPI
EhciSetState (
IN EFI_USB2_HC_PROTOCOL *This,
IN EFI_USB_HC_STATE State
);
EFI_STATUS
EFIAPI
EhciControlTransfer (
IN EFI_USB2_HC_PROTOCOL *This,
IN UINT8 DeviceAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN EFI_USB_DEVICE_REQUEST *Request,
IN EFI_USB_DATA_DIRECTION TransferDirection,
IN OUT VOID *Data,
IN OUT UINTN *DataLength,
IN UINTN TimeOut,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
EhciBulkTransfer (
IN EFI_USB2_HC_PROTOCOL *This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN UINT8 DataBuffersNumber,
IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM],
IN OUT UINTN *DataLength,
IN OUT UINT8 *DataToggle,
IN UINTN TimeOut,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
EhciAsyncInterruptTransfer (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaxiumPacketLength,
IN BOOLEAN IsNewTransfer,
IN OUT UINT8 *DataToggle,
IN UINTN PollingInterval,
IN UINTN DataLength,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
IN EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunction,
IN VOID *Context OPTIONAL
);
EFI_STATUS
EFIAPI
EhciSyncInterruptTransfer (
IN EFI_USB2_HC_PROTOCOL *This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN OUT VOID *Data,
IN OUT UINTN *DataLength,
IN OUT UINT8 *DataToggle,
IN UINTN TimeOut,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
EhciIsochronousTransfer (
IN EFI_USB2_HC_PROTOCOL *This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN UINT8 DataBuffersNumber,
IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],
IN UINTN DataLength,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
EhciAsyncIsochronousTransfer (
IN EFI_USB2_HC_PROTOCOL *This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN UINT8 DataBuffersNumber,
IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],
IN UINTN DataLength,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack,
IN VOID *Context
);
EFI_STATUS
EFIAPI
EhciGetRootHubPortStatus (
IN EFI_USB2_HC_PROTOCOL *This,
IN UINT8 PortNumber,
OUT EFI_USB_PORT_STATUS *PortStatus
);
EFI_STATUS
EFIAPI
EhciSetRootHubPortFeature (
IN EFI_USB2_HC_PROTOCOL *This,
IN UINT8 PortNumber,
IN EFI_USB_PORT_FEATURE PortFeature
);
EFI_STATUS
EFIAPI
EhciClearRootHubPortFeature (
IN EFI_USB2_HC_PROTOCOL *This,
IN UINT8 PortNumber,
IN EFI_USB_PORT_FEATURE PortFeature
);
//
// Ehci Driver Global Variables
//

View File

@@ -403,6 +403,211 @@ typedef struct _USB2_HC_DEV {
} USB2_HC_DEV;
//
// Prototypes
// Driver model protocol interface
//
EFI_STATUS
EFIAPI
EhciDriverBindingSupported (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
EFI_STATUS
EFIAPI
EhciDriverBindingStart (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
EFI_STATUS
EFIAPI
EhciDriverBindingStop (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
);
//
// Ehci protocol interface
//
EFI_STATUS
EFIAPI
EhciGetCapability (
IN EFI_USB2_HC_PROTOCOL *This,
OUT UINT8 *MaxSpeed,
OUT UINT8 *PortNumber,
OUT UINT8 *Is64BitCapable
);
EFI_STATUS
EFIAPI
EhciReset (
IN EFI_USB2_HC_PROTOCOL *This,
IN UINT16 Attributes
);
EFI_STATUS
EFIAPI
EhciGetState (
IN EFI_USB2_HC_PROTOCOL *This,
OUT EFI_USB_HC_STATE *State
);
EFI_STATUS
EFIAPI
EhciSetState (
IN EFI_USB2_HC_PROTOCOL *This,
IN EFI_USB_HC_STATE State
);
EFI_STATUS
EFIAPI
EhciControlTransfer (
IN EFI_USB2_HC_PROTOCOL *This,
IN UINT8 DeviceAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN EFI_USB_DEVICE_REQUEST *Request,
IN EFI_USB_DATA_DIRECTION TransferDirection,
IN OUT VOID *Data,
IN OUT UINTN *DataLength,
IN UINTN TimeOut,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
EhciBulkTransfer (
IN EFI_USB2_HC_PROTOCOL *This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN UINT8 DataBuffersNumber,
IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM],
IN OUT UINTN *DataLength,
IN OUT UINT8 *DataToggle,
IN UINTN TimeOut,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
EhciAsyncInterruptTransfer (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaxiumPacketLength,
IN BOOLEAN IsNewTransfer,
IN OUT UINT8 *DataToggle,
IN UINTN PollingInterval,
IN UINTN DataLength,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
IN EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunction,
IN VOID *Context OPTIONAL
);
EFI_STATUS
EFIAPI
EhciSyncInterruptTransfer (
IN EFI_USB2_HC_PROTOCOL *This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN OUT VOID *Data,
IN OUT UINTN *DataLength,
IN OUT UINT8 *DataToggle,
IN UINTN TimeOut,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
EhciIsochronousTransfer (
IN EFI_USB2_HC_PROTOCOL *This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN UINT8 DataBuffersNumber,
IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],
IN UINTN DataLength,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
EhciAsyncIsochronousTransfer (
IN EFI_USB2_HC_PROTOCOL *This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN UINT8 DataBuffersNumber,
IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],
IN UINTN DataLength,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack,
IN VOID *Context
);
EFI_STATUS
EFIAPI
EhciGetRootHubPortStatus (
IN EFI_USB2_HC_PROTOCOL *This,
IN UINT8 PortNumber,
OUT EFI_USB_PORT_STATUS *PortStatus
);
EFI_STATUS
EFIAPI
EhciSetRootHubPortFeature (
IN EFI_USB2_HC_PROTOCOL *This,
IN UINT8 PortNumber,
IN EFI_USB_PORT_FEATURE PortFeature
);
EFI_STATUS
EFIAPI
EhciClearRootHubPortFeature (
IN EFI_USB2_HC_PROTOCOL *This,
IN UINT8 PortNumber,
IN EFI_USB_PORT_FEATURE PortFeature
);
//
// EFI Component Name Functions
//
EFI_STATUS
EFIAPI
EhciComponentNameGetDriverName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN CHAR8 *Language,
OUT CHAR16 **DriverName
);
EFI_STATUS
EFIAPI
EhciComponentNameGetControllerName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle, OPTIONAL
IN CHAR8 *Language,
OUT CHAR16 **ControllerName
);
//
// Internal Functions Declaration
//

View File

@@ -18,33 +18,6 @@ CHAR16 *OptionString[4] = {
L"Enable Secondary Master (Y/N)? -->",
L"Enable Secondary Slave (Y/N)? -->"
};
//
// EFI Driver Configuration Functions
//
EFI_STATUS
IDEBusDriverConfigurationSetOptions (
IN EFI_DRIVER_CONFIGURATION_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN CHAR8 *Language,
OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired
);
EFI_STATUS
IDEBusDriverConfigurationOptionsValid (
IN EFI_DRIVER_CONFIGURATION_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL
);
EFI_STATUS
IDEBusDriverConfigurationForceDefaults (
IN EFI_DRIVER_CONFIGURATION_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN UINT32 DefaultType,
OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired
);
//
// EFI Driver Configuration Protocol

View File

@@ -14,21 +14,6 @@
#define IDE_BUS_DIAGNOSTIC_ERROR L"PCI IDE/ATAPI Driver Diagnostics Failed"
//
// EFI Driver Diagnostics Functions
//
EFI_STATUS
IDEBusDriverDiagnosticsRunDiagnostics (
IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN EFI_DRIVER_DIAGNOSTIC_TYPE DiagnosticType,
IN CHAR8 *Language,
OUT EFI_GUID **ErrorType,
OUT UINTN *BufferSize,
OUT CHAR16 **Buffer
);
//
// EFI Driver Diagnostics Protocol
//

View File

@@ -23,43 +23,6 @@
#include "idebus.h"
EFI_STATUS
AtaReadSectorsExt (
IN IDE_BLK_IO_DEV *IdeDev,
IN OUT VOID *DataBuffer,
IN EFI_LBA StartLba,
IN UINTN NumberOfBlocks
);
EFI_STATUS
AtaWriteSectorsExt (
IN IDE_BLK_IO_DEV *IdeDev,
IN VOID *DataBuffer,
IN EFI_LBA StartLba,
IN UINTN NumberOfBlocks
);
EFI_STATUS
AtaPioDataInExt (
IN IDE_BLK_IO_DEV *IdeDev,
IN OUT VOID *Buffer,
IN UINT32 ByteCount,
IN UINT8 AtaCommand,
IN EFI_LBA StartLba,
IN UINT16 SectorCount
);
EFI_STATUS
AtaPioDataOutExt (
IN IDE_BLK_IO_DEV *IdeDev,
IN VOID *Buffer,
IN UINT32 ByteCount,
IN UINT8 AtaCommand,
IN EFI_LBA StartLba,
IN UINT16 SectorCount
);
/**
Sends out an ATA Identify Command to the specified device.

View File

@@ -171,6 +171,49 @@ IDEBusDriverBindingStop (
)
;
//
// EFI Driver Configuration Functions
//
EFI_STATUS
IDEBusDriverConfigurationSetOptions (
IN EFI_DRIVER_CONFIGURATION_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN CHAR8 *Language,
OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired
);
EFI_STATUS
IDEBusDriverConfigurationOptionsValid (
IN EFI_DRIVER_CONFIGURATION_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL
);
EFI_STATUS
IDEBusDriverConfigurationForceDefaults (
IN EFI_DRIVER_CONFIGURATION_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN UINT32 DefaultType,
OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired
);
//
// EFI Driver Diagnostics Functions
//
EFI_STATUS
IDEBusDriverDiagnosticsRunDiagnostics (
IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle OPTIONAL,
IN EFI_DRIVER_DIAGNOSTIC_TYPE DiagnosticType,
IN CHAR8 *Language,
OUT EFI_GUID **ErrorType,
OUT UINTN *BufferSize,
OUT CHAR16 **Buffer
);
//
// Block I/O Protocol Interface
//

View File

@@ -23,42 +23,6 @@ Revision History
#include "pcibus.h"
//
// PCI Bus Support Function Prototypes
//
EFI_STATUS
EFIAPI
PciBusEntryPoint (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
);
EFI_STATUS
EFIAPI
PciBusDriverBindingSupported (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
EFI_STATUS
EFIAPI
PciBusDriverBindingStart (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
EFI_STATUS
EFIAPI
PciBusDriverBindingStop (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
);
//
// PCI Bus Driver Global Variables
//

View File

@@ -240,4 +240,32 @@ extern EFI_PCI_PLATFORM_PROTOCOL *gPciPlatformProtocol;
#include "PciHotPlugSupport.h"
#include "PciLib.h"
//
// PCI Bus Support Function Prototypes
//
EFI_STATUS
EFIAPI
PciBusDriverBindingSupported (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
EFI_STATUS
EFIAPI
PciBusDriverBindingStart (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
EFI_STATUS
EFIAPI
PciBusDriverBindingStop (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
);
#endif

View File

@@ -19,27 +19,6 @@ Abstract:
#include "uhci.h"
//
// EFI Component Name Functions
//
EFI_STATUS
EFIAPI
UhciComponentNameGetDriverName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN CHAR8 *Language,
OUT CHAR16 **DriverName
);
EFI_STATUS
EFIAPI
UhciComponentNameGetControllerName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle, OPTIONAL
IN CHAR8 *Language,
OUT CHAR16 **ControllerName
);
//
// EFI Component Name Protocol
//

View File

@@ -21,342 +21,6 @@ Revision History
#include "uhci.h"
//
// Prototypes
// Driver model protocol interface
//
EFI_STATUS
EFIAPI
UHCIDriverBindingSupported (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
EFI_STATUS
EFIAPI
UHCIDriverBindingStart (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
EFI_STATUS
EFIAPI
UHCIDriverBindingStop (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
);
//
// UHCI interface functions
//
EFI_STATUS
EFIAPI
UHCIReset (
IN EFI_USB_HC_PROTOCOL *This,
IN UINT16 Attributes
);
EFI_STATUS
EFIAPI
UHCIGetState (
IN EFI_USB_HC_PROTOCOL *This,
OUT EFI_USB_HC_STATE *State
);
EFI_STATUS
EFIAPI
UHCISetState (
IN EFI_USB_HC_PROTOCOL *This,
IN EFI_USB_HC_STATE State
);
EFI_STATUS
EFIAPI
UHCIControlTransfer (
IN EFI_USB_HC_PROTOCOL *This,
IN UINT8 DeviceAddress,
IN BOOLEAN IsSlowDevice,
IN UINT8 MaximumPacketLength,
IN EFI_USB_DEVICE_REQUEST *Request,
IN EFI_USB_DATA_DIRECTION TransferDirection,
IN OUT VOID *Data, OPTIONAL
IN OUT UINTN *DataLength, OPTIONAL
IN UINTN TimeOut,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
UHCIBulkTransfer (
IN EFI_USB_HC_PROTOCOL *This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 MaximumPacketLength,
IN OUT VOID *Data,
IN OUT UINTN *DataLength,
IN OUT UINT8 *DataToggle,
IN UINTN TimeOut,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
UHCIAsyncInterruptTransfer (
IN EFI_USB_HC_PROTOCOL * This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN BOOLEAN IsSlowDevice,
IN UINT8 MaximumPacketLength,
IN BOOLEAN IsNewTransfer,
IN OUT UINT8 *DataToggle,
IN UINTN PollingInterval, OPTIONAL
IN UINTN DataLength, OPTIONAL
IN EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunction, OPTIONAL
IN VOID *Context OPTIONAL
);
EFI_STATUS
EFIAPI
UHCISyncInterruptTransfer (
IN EFI_USB_HC_PROTOCOL *This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN BOOLEAN IsSlowDevice,
IN UINT8 MaximumPacketLength,
IN OUT VOID *Data,
IN OUT UINTN *DataLength,
IN OUT UINT8 *DataToggle,
IN UINTN TimeOut,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
UHCIIsochronousTransfer (
IN EFI_USB_HC_PROTOCOL *This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 MaximumPacketLength,
IN OUT VOID *Data,
IN UINTN DataLength,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
UHCIAsyncIsochronousTransfer (
IN EFI_USB_HC_PROTOCOL * This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 MaximumPacketLength,
IN OUT VOID *Data,
IN UINTN DataLength,
IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack,
IN VOID *Context OPTIONAL
);
EFI_STATUS
EFIAPI
UHCIGetRootHubPortNumber (
IN EFI_USB_HC_PROTOCOL *This,
OUT UINT8 *PortNumber
);
EFI_STATUS
EFIAPI
UHCIGetRootHubPortStatus (
IN EFI_USB_HC_PROTOCOL *This,
IN UINT8 PortNumber,
OUT EFI_USB_PORT_STATUS *PortStatus
);
EFI_STATUS
EFIAPI
UHCISetRootHubPortFeature (
IN EFI_USB_HC_PROTOCOL *This,
IN UINT8 PortNumber,
IN EFI_USB_PORT_FEATURE PortFeature
);
EFI_STATUS
EFIAPI
UHCIClearRootHubPortFeature (
IN EFI_USB_HC_PROTOCOL *This,
IN UINT8 PortNumber,
IN EFI_USB_PORT_FEATURE PortFeature
);
//
// UEFI 2.0 Protocol
//
EFI_STATUS
EFIAPI
UHCI2GetCapability(
IN EFI_USB2_HC_PROTOCOL * This,
OUT UINT8 *MaxSpeed,
OUT UINT8 *PortNumber,
OUT UINT8 *Is64BitCapable
);
EFI_STATUS
EFIAPI
UHCI2Reset (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT16 Attributes
);
EFI_STATUS
EFIAPI
UHCI2GetState (
IN EFI_USB2_HC_PROTOCOL * This,
OUT EFI_USB_HC_STATE * State
);
EFI_STATUS
EFIAPI
UHCI2SetState (
IN EFI_USB2_HC_PROTOCOL * This,
IN EFI_USB_HC_STATE State
);
EFI_STATUS
EFIAPI
UHCI2ControlTransfer (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT8 DeviceAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN EFI_USB_DEVICE_REQUEST * Request,
IN EFI_USB_DATA_DIRECTION TransferDirection,
IN OUT VOID *Data, OPTIONAL
IN OUT UINTN *DataLength, OPTIONAL
IN UINTN TimeOut,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
UHCI2BulkTransfer (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN UINT8 DataBuffersNumber,
IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM],
IN OUT UINTN *DataLength,
IN OUT UINT8 *DataToggle,
IN UINTN TimeOut,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
UHCI2AsyncInterruptTransfer (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN BOOLEAN IsNewTransfer,
IN OUT UINT8 *DataToggle,
IN UINTN PollingInterval, OPTIONAL
IN UINTN DataLength, OPTIONAL
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
IN EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunction, OPTIONAL
IN VOID *Context OPTIONAL
);
EFI_STATUS
EFIAPI
UHCI2SyncInterruptTransfer (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN OUT VOID *Data,
IN OUT UINTN *DataLength,
IN OUT UINT8 *DataToggle,
IN UINTN TimeOut,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
UHCI2IsochronousTransfer (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN UINT8 DataBuffersNumber,
IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],
IN UINTN DataLength,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
UHCI2AsyncIsochronousTransfer (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN UINT8 DataBuffersNumber,
IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],
IN UINTN DataLength,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack,
IN VOID *Context OPTIONAL
);
EFI_STATUS
EFIAPI
UHCI2GetRootHubPortStatus (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT8 PortNumber,
OUT EFI_USB_PORT_STATUS * PortStatus
);
EFI_STATUS
EFIAPI
UHCI2SetRootHubPortFeature (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT8 PortNumber,
IN EFI_USB_PORT_FEATURE PortFeature
);
EFI_STATUS
EFIAPI
UHCI2ClearRootHubPortFeature (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT8 PortNumber,
IN EFI_USB_PORT_FEATURE PortFeature
);
//
// Asynchronous interrupt transfer monitor function
//
VOID
EFIAPI
MonitorInterruptTrans (
IN EFI_EVENT Event,
IN VOID *Context
);
//
// UHCI Driver Global Variables
//

View File

@@ -285,6 +285,27 @@ typedef struct {
extern EFI_DRIVER_BINDING_PROTOCOL gUhciDriverBinding;
extern EFI_COMPONENT_NAME_PROTOCOL gUhciComponentName;
//
// EFI Component Name Functions
//
EFI_STATUS
EFIAPI
UhciComponentNameGetDriverName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN CHAR8 *Language,
OUT CHAR16 **DriverName
);
EFI_STATUS
EFIAPI
UhciComponentNameGetControllerName (
IN EFI_COMPONENT_NAME_PROTOCOL *This,
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE ChildHandle, OPTIONAL
IN CHAR8 *Language,
OUT CHAR16 **ControllerName
);
EFI_STATUS
WriteUHCCommandReg (
IN EFI_PCI_IO_PROTOCOL *PciIo,
@@ -2635,4 +2656,340 @@ Returns:
--*/
;
//
// Prototypes
// Driver model protocol interface
//
EFI_STATUS
EFIAPI
UHCIDriverBindingSupported (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
EFI_STATUS
EFIAPI
UHCIDriverBindingStart (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
EFI_STATUS
EFIAPI
UHCIDriverBindingStop (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
);
//
// UHCI interface functions
//
EFI_STATUS
EFIAPI
UHCIReset (
IN EFI_USB_HC_PROTOCOL *This,
IN UINT16 Attributes
);
EFI_STATUS
EFIAPI
UHCIGetState (
IN EFI_USB_HC_PROTOCOL *This,
OUT EFI_USB_HC_STATE *State
);
EFI_STATUS
EFIAPI
UHCISetState (
IN EFI_USB_HC_PROTOCOL *This,
IN EFI_USB_HC_STATE State
);
EFI_STATUS
EFIAPI
UHCIControlTransfer (
IN EFI_USB_HC_PROTOCOL *This,
IN UINT8 DeviceAddress,
IN BOOLEAN IsSlowDevice,
IN UINT8 MaximumPacketLength,
IN EFI_USB_DEVICE_REQUEST *Request,
IN EFI_USB_DATA_DIRECTION TransferDirection,
IN OUT VOID *Data, OPTIONAL
IN OUT UINTN *DataLength, OPTIONAL
IN UINTN TimeOut,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
UHCIBulkTransfer (
IN EFI_USB_HC_PROTOCOL *This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 MaximumPacketLength,
IN OUT VOID *Data,
IN OUT UINTN *DataLength,
IN OUT UINT8 *DataToggle,
IN UINTN TimeOut,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
UHCIAsyncInterruptTransfer (
IN EFI_USB_HC_PROTOCOL * This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN BOOLEAN IsSlowDevice,
IN UINT8 MaximumPacketLength,
IN BOOLEAN IsNewTransfer,
IN OUT UINT8 *DataToggle,
IN UINTN PollingInterval, OPTIONAL
IN UINTN DataLength, OPTIONAL
IN EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunction, OPTIONAL
IN VOID *Context OPTIONAL
);
EFI_STATUS
EFIAPI
UHCISyncInterruptTransfer (
IN EFI_USB_HC_PROTOCOL *This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN BOOLEAN IsSlowDevice,
IN UINT8 MaximumPacketLength,
IN OUT VOID *Data,
IN OUT UINTN *DataLength,
IN OUT UINT8 *DataToggle,
IN UINTN TimeOut,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
UHCIIsochronousTransfer (
IN EFI_USB_HC_PROTOCOL *This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 MaximumPacketLength,
IN OUT VOID *Data,
IN UINTN DataLength,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
UHCIAsyncIsochronousTransfer (
IN EFI_USB_HC_PROTOCOL * This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 MaximumPacketLength,
IN OUT VOID *Data,
IN UINTN DataLength,
IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack,
IN VOID *Context OPTIONAL
);
EFI_STATUS
EFIAPI
UHCIGetRootHubPortNumber (
IN EFI_USB_HC_PROTOCOL *This,
OUT UINT8 *PortNumber
);
EFI_STATUS
EFIAPI
UHCIGetRootHubPortStatus (
IN EFI_USB_HC_PROTOCOL *This,
IN UINT8 PortNumber,
OUT EFI_USB_PORT_STATUS *PortStatus
);
EFI_STATUS
EFIAPI
UHCISetRootHubPortFeature (
IN EFI_USB_HC_PROTOCOL *This,
IN UINT8 PortNumber,
IN EFI_USB_PORT_FEATURE PortFeature
);
EFI_STATUS
EFIAPI
UHCIClearRootHubPortFeature (
IN EFI_USB_HC_PROTOCOL *This,
IN UINT8 PortNumber,
IN EFI_USB_PORT_FEATURE PortFeature
);
//
// UEFI 2.0 Protocol
//
EFI_STATUS
EFIAPI
UHCI2GetCapability(
IN EFI_USB2_HC_PROTOCOL * This,
OUT UINT8 *MaxSpeed,
OUT UINT8 *PortNumber,
OUT UINT8 *Is64BitCapable
);
EFI_STATUS
EFIAPI
UHCI2Reset (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT16 Attributes
);
EFI_STATUS
EFIAPI
UHCI2GetState (
IN EFI_USB2_HC_PROTOCOL * This,
OUT EFI_USB_HC_STATE * State
);
EFI_STATUS
EFIAPI
UHCI2SetState (
IN EFI_USB2_HC_PROTOCOL * This,
IN EFI_USB_HC_STATE State
);
EFI_STATUS
EFIAPI
UHCI2ControlTransfer (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT8 DeviceAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN EFI_USB_DEVICE_REQUEST * Request,
IN EFI_USB_DATA_DIRECTION TransferDirection,
IN OUT VOID *Data, OPTIONAL
IN OUT UINTN *DataLength, OPTIONAL
IN UINTN TimeOut,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
UHCI2BulkTransfer (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN UINT8 DataBuffersNumber,
IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM],
IN OUT UINTN *DataLength,
IN OUT UINT8 *DataToggle,
IN UINTN TimeOut,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
UHCI2AsyncInterruptTransfer (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN BOOLEAN IsNewTransfer,
IN OUT UINT8 *DataToggle,
IN UINTN PollingInterval, OPTIONAL
IN UINTN DataLength, OPTIONAL
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
IN EFI_ASYNC_USB_TRANSFER_CALLBACK CallBackFunction, OPTIONAL
IN VOID *Context OPTIONAL
);
EFI_STATUS
EFIAPI
UHCI2SyncInterruptTransfer (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN OUT VOID *Data,
IN OUT UINTN *DataLength,
IN OUT UINT8 *DataToggle,
IN UINTN TimeOut,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
UHCI2IsochronousTransfer (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN UINT8 DataBuffersNumber,
IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],
IN UINTN DataLength,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
OUT UINT32 *TransferResult
);
EFI_STATUS
EFIAPI
UHCI2AsyncIsochronousTransfer (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT8 DeviceAddress,
IN UINT8 EndPointAddress,
IN UINT8 DeviceSpeed,
IN UINTN MaximumPacketLength,
IN UINT8 DataBuffersNumber,
IN OUT VOID *Data[EFI_USB_MAX_ISO_BUFFER_NUM],
IN UINTN DataLength,
IN EFI_USB2_HC_TRANSACTION_TRANSLATOR *Translator,
IN EFI_ASYNC_USB_TRANSFER_CALLBACK IsochronousCallBack,
IN VOID *Context OPTIONAL
);
EFI_STATUS
EFIAPI
UHCI2GetRootHubPortStatus (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT8 PortNumber,
OUT EFI_USB_PORT_STATUS * PortStatus
);
EFI_STATUS
EFIAPI
UHCI2SetRootHubPortFeature (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT8 PortNumber,
IN EFI_USB_PORT_FEATURE PortFeature
);
EFI_STATUS
EFIAPI
UHCI2ClearRootHubPortFeature (
IN EFI_USB2_HC_PROTOCOL * This,
IN UINT8 PortNumber,
IN EFI_USB_PORT_FEATURE PortFeature
);
//
// Asynchronous interrupt transfer monitor function
//
VOID
EFIAPI
MonitorInterruptTrans (
IN EFI_EVENT Event,
IN VOID *Context
);
#endif

View File

@@ -24,13 +24,6 @@ Revision history:
#pragma data_seg("rtdata")
//
// Global variables defined outside this file
//
extern PXE_SW_UNDI *pxe; // !pxe structure
extern PXE_SW_UNDI *pxe_31; // !pxe structure for 3.1 drivers
extern UNDI32_DEV *UNDI32DeviceList[MAX_NIC_INTERFACES];
//
// Global variables defined in this file
//

View File

@@ -31,73 +31,7 @@ PXE_SW_UNDI *pxe_31 = 0; // 3.1 entry
UNDI32_DEV *UNDI32DeviceList[MAX_NIC_INTERFACES];
NII_TABLE *UnidiDataPointer=NULL;
//
// external Global Variables
//
extern UNDI_CALL_TABLE api_table[];
//
// function prototypes
//
EFI_STATUS
InstallConfigTable (
IN VOID
);
EFI_STATUS
EFIAPI
InitializeUNDIDriver (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
);
VOID
UNDI_notify_virtual (
EFI_EVENT event,
VOID *context
);
VOID
EFIAPI
UndiNotifyExitBs (
EFI_EVENT Event,
VOID *Context
);
EFI_STATUS
EFIAPI
UndiDriverSupported (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
EFI_STATUS
EFIAPI
UndiDriverStart (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
EFI_STATUS
EFIAPI
UndiDriverStop (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
);
EFI_STATUS
AppendMac2DevPath (
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevPtr,
IN EFI_DEVICE_PATH_PROTOCOL *BaseDevPtr,
IN NIC_DATA_INSTANCE *AdapterInfo
);
//
// end function prototypes
//
VOID
EFIAPI
UndiNotifyVirtual (

View File

@@ -94,6 +94,11 @@ typedef VOID (*map_mem)(UINT64, UINT64, UINT32, UINT32, UINT64);
typedef VOID (*unmap_mem)(UINT64, UINT64, UINT32, UINT32, UINT64);
typedef VOID (*sync_mem)(UINT64, UINT64, UINT32, UINT32, UINT64);
extern UNDI_CALL_TABLE api_table[];
extern PXE_SW_UNDI *pxe; // !pxe structure
extern PXE_SW_UNDI *pxe_31; // !pxe structure for 3.1 drivers
extern UNDI32_DEV *UNDI32DeviceList[MAX_NIC_INTERFACES];
//
// functions defined in e100b.c
//
@@ -158,6 +163,63 @@ VOID FindPhySpeedAndDpx (NIC_DATA_INSTANCE *AdapterInfo, UINT32 PhyId);
//
// functions defined in init.c
//
EFI_STATUS
InstallConfigTable (
IN VOID
);
EFI_STATUS
EFIAPI
InitializeUNDIDriver (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
);
VOID
UNDI_notify_virtual (
EFI_EVENT event,
VOID *context
);
VOID
EFIAPI
UndiNotifyExitBs (
EFI_EVENT Event,
VOID *Context
);
EFI_STATUS
EFIAPI
UndiDriverSupported (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
EFI_STATUS
EFIAPI
UndiDriverStart (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
);
EFI_STATUS
EFIAPI
UndiDriverStop (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
IN EFI_HANDLE Controller,
IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
);
EFI_STATUS
AppendMac2DevPath (
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevPtr,
IN EFI_DEVICE_PATH_PROTOCOL *BaseDevPtr,
IN NIC_DATA_INSTANCE *AdapterInfo
);
VOID
TmpDelay (
IN UINT64 UnqId,