Update comments for IsaAcpi.h, IsaIo.h, and VgaMiniPort.h

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8728 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
mdkinney 2009-07-03 00:37:42 +00:00
parent 2e747cee12
commit 099fae5d83
3 changed files with 473 additions and 280 deletions

View File

@ -1,237 +1,305 @@
/** @file
ISA Acpi Protocol is used to operate and communicate with ISA device.
EFI ISA ACPI Protocol is used to enumerate and manage all the ISA controllers on
the platform's ISA Bus.
Copyright (c) 2006 - 2009, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Copyright (c) 2006 - 2009, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __ISA_ACPI_H_
#define __ISA_ACPI_H_
///
/// Global ID for the EFI ISA ACPI Protocol
///
#define EFI_ISA_ACPI_PROTOCOL_GUID \
{ 0x64a892dc, 0x5561, 0x4536, { 0x92, 0xc7, 0x79, 0x9b, 0xfc, 0x18, 0x33, 0x55 } }
{ \
0x64a892dc, 0x5561, 0x4536, { 0x92, 0xc7, 0x79, 0x9b, 0xfc, 0x18, 0x33, 0x55 } \
}
///
/// Forward declaration fo the EFI ISA ACPI Protocol
///
typedef struct _EFI_ISA_ACPI_PROTOCOL EFI_ISA_ACPI_PROTOCOL;
//
// Resource Attribute definition
//
#define EFI_ISA_ACPI_IRQ_TYPE_HIGH_TRUE_EDGE_SENSITIVE 0x01
#define EFI_ISA_ACPI_IRQ_TYPE_LOW_TRUE_EDGE_SENSITIVE 0x02
#define EFI_ISA_ACPI_IRQ_TYPE_HIGH_TRUE_LEVEL_SENSITIVE 0x04
#define EFI_ISA_ACPI_IRQ_TYPE_LOW_TRUE_LEVEL_SENSITIVE 0x08
///
/// ISA ACPI Protocol interrupt resource attributes
///
#define EFI_ISA_ACPI_IRQ_TYPE_HIGH_TRUE_EDGE_SENSITIVE 0x01 ///< Edge triggered interrupt on a rising edge
#define EFI_ISA_ACPI_IRQ_TYPE_LOW_TRUE_EDGE_SENSITIVE 0x02 ///< Edge triggered interrupt on a falling edge
#define EFI_ISA_ACPI_IRQ_TYPE_HIGH_TRUE_LEVEL_SENSITIVE 0x04 ///< Level sensitive interrupt active high
#define EFI_ISA_ACPI_IRQ_TYPE_LOW_TRUE_LEVEL_SENSITIVE 0x08 ///< Level sensitive interrupt active low
#define EFI_ISA_ACPI_DMA_SPEED_TYPE_MASK 0x03
///
/// ISA ACPI Protocol DMA resource attributes
///
#define EFI_ISA_ACPI_DMA_SPEED_TYPE_MASK 0x03 ///< Bit mask of supported DMA speed attributes
#define EFI_ISA_ACPI_DMA_SPEED_TYPE_COMPATIBILITY 0x00 ///< ISA controller supports compatibility mode DMA transfers
#define EFI_ISA_ACPI_DMA_SPEED_TYPE_A 0x01 ///< ISA controller supports type A DMA transfers
#define EFI_ISA_ACPI_DMA_SPEED_TYPE_B 0x02 ///< ISA controller supports type B DMA transfers
#define EFI_ISA_ACPI_DMA_SPEED_TYPE_F 0x03 ///< ISA controller supports type F DMA transfers
#define EFI_ISA_ACPI_DMA_COUNT_BY_BYTE 0x04 ///< ISA controller increments DMA address by bytes (8-bit)
#define EFI_ISA_ACPI_DMA_COUNT_BY_WORD 0x08 ///< ISA controller increments DMA address by words (16-bit)
#define EFI_ISA_ACPI_DMA_BUS_MASTER 0x10 ///< ISA controller is a DMA bus master
#define EFI_ISA_ACPI_DMA_TRANSFER_TYPE_8_BIT 0x20 ///< ISA controller only supports 8-bit DMA transfers
#define EFI_ISA_ACPI_DMA_TRANSFER_TYPE_8_BIT_AND_16_BIT 0x40 ///< ISA controller both 8-bit and 16-bit DMA transfers
#define EFI_ISA_ACPI_DMA_TRANSFER_TYPE_16_BIT 0x80 ///< ISA controller only supports 16-bit DMA transfers
#define EFI_ISA_ACPI_DMA_SPEED_TYPE_COMPATIBILITY 0x00
#define EFI_ISA_ACPI_DMA_SPEED_TYPE_A 0x01
#define EFI_ISA_ACPI_DMA_SPEED_TYPE_B 0x02
#define EFI_ISA_ACPI_DMA_SPEED_TYPE_F 0x03
#define EFI_ISA_ACPI_DMA_COUNT_BY_BYTE 0x04
#define EFI_ISA_ACPI_DMA_COUNT_BY_WORD 0x08
#define EFI_ISA_ACPI_DMA_BUS_MASTER 0x10
#define EFI_ISA_ACPI_DMA_TRANSFER_TYPE_8_BIT 0x20
#define EFI_ISA_ACPI_DMA_TRANSFER_TYPE_8_BIT_AND_16_BIT 0x40
#define EFI_ISA_ACPI_DMA_TRANSFER_TYPE_16_BIT 0x80
///
/// ISA ACPI Protocol MMIO resource attributes
///
#define EFI_ISA_ACPI_MEMORY_WIDTH_MASK 0x03 ///< Bit mask of supported ISA memory width attributes
#define EFI_ISA_ACPI_MEMORY_WIDTH_8_BIT 0x00 ///< ISA MMIO region only supports 8-bit access
#define EFI_ISA_ACPI_MEMORY_WIDTH_16_BIT 0x01 ///< ISA MMIO region only supports 16-bit access
#define EFI_ISA_ACPI_MEMORY_WIDTH_8_BIT_AND_16_BIT 0x02 ///< ISA MMIO region supports both 8-bit and 16-bit access
#define EFI_ISA_ACPI_MEMORY_WRITEABLE 0x04 ///< ISA MMIO region supports write transactions
#define EFI_ISA_ACPI_MEMORY_CACHEABLE 0x08 ///< ISA MMIO region supports being cached
#define EFI_ISA_ACPI_MEMORY_SHADOWABLE 0x10 ///< ISA MMIO region may be shadowed
#define EFI_ISA_ACPI_MEMORY_EXPANSION_ROM 0x20 ///< ISA MMIO region is an expansion ROM
#define EFI_ISA_ACPI_MEMORY_WIDTH_MASK 0x03
///
/// ISA ACPI Protocol I/O resource attributes
///
#define EFI_ISA_ACPI_IO_DECODE_10_BITS 0x01 ///< ISA controllers uses a 10-bit address decoder for I/O cycles
#define EFI_ISA_ACPI_IO_DECODE_16_BITS 0x02 ///< ISA controllers uses a 16-bit address decoder for I/O cycles
#define EFI_ISA_ACPI_MEMORY_WIDTH_8_BIT 0x00
#define EFI_ISA_ACPI_MEMORY_WIDTH_16_BIT 0x01
#define EFI_ISA_ACPI_MEMORY_WIDTH_8_BIT_AND_16_BIT 0x02
#define EFI_ISA_ACPI_MEMORY_WRITEABLE 0x04
#define EFI_ISA_ACPI_MEMORY_CACHEABLE 0x08
#define EFI_ISA_ACPI_MEMORY_SHADOWABLE 0x10
#define EFI_ISA_ACPI_MEMORY_EXPANSION_ROM 0x20
#define EFI_ISA_ACPI_IO_DECODE_10_BITS 0x01
#define EFI_ISA_ACPI_IO_DECODE_16_BITS 0x02
//
// Resource List definition:
//
///
/// EFI ISA ACPI resource type
///
typedef enum {
EfiIsaAcpiResourceEndOfList,
EfiIsaAcpiResourceIo,
EfiIsaAcpiResourceMemory,
EfiIsaAcpiResourceDma,
EfiIsaAcpiResourceInterrupt
EfiIsaAcpiResourceEndOfList, ///< Marks the end if a resource list
EfiIsaAcpiResourceIo, ///< ISA I/O port resource range
EfiIsaAcpiResourceMemory, ///< ISA MMIO resource range
EfiIsaAcpiResourceDma, ///< ISA DMA resource
EfiIsaAcpiResourceInterrupt ///< ISA interrupt resource
} EFI_ISA_ACPI_RESOURCE_TYPE;
///
/// EFI ISA ACPI generic resource structure
///
typedef struct {
EFI_ISA_ACPI_RESOURCE_TYPE Type;
UINT32 Attribute;
UINT32 StartRange;
UINT32 EndRange;
EFI_ISA_ACPI_RESOURCE_TYPE Type; ///< The type of resource (I/O, MMIO, DMA, Interrupt)
UINT32 Attribute; ///< Bit mask of attributes associated with this resource. See EFI_ISA_ACPI_xxx macros for valid combinations.
UINT32 StartRange; ///< The start of the resource range
UINT32 EndRange; ///< The end of the resource range
} EFI_ISA_ACPI_RESOURCE;
///
/// EFI ISA ACPI resource device identifier
///
typedef struct {
UINT32 HID;
UINT32 UID;
UINT32 HID; ///< The ACPI Hardware Identifier value associated with an ISA controller. Matchs ACPI DSDT contents.
UINT32 UID; ///< The ACPI Unique Identifier value associated with an ISA controller. Matches ACPI DSDT contents.
} EFI_ISA_ACPI_DEVICE_ID;
///
/// EFI ISA ACPI resource list
///
typedef struct {
EFI_ISA_ACPI_DEVICE_ID Device;
EFI_ISA_ACPI_RESOURCE *ResourceItem;
EFI_ISA_ACPI_DEVICE_ID Device; ///< The ACPI HID/UID associated with an ISA controller
EFI_ISA_ACPI_RESOURCE *ResourceItem; ///< Pointer to the list of resources associated with an ISA controller
} EFI_ISA_ACPI_RESOURCE_LIST;
/**
Enumerate the ISA devices on the ISA bus.
Enumerates the ISA controllers on an ISA bus.
@param This Pointer to EFI_ISA_ACPI_PROTOCOL.
@param Device Found next ISA device.
This service allows all the ISA controllers on an ISA bus to be enumerated. If
Device is a pointer to a NULL value, then the first ISA controller on the ISA
bus is returned in Device and EFI_SUCESS is returned. If Device is a pointer
to value that was returned on a prior call to DeviceEnumerate(), then the next
ISA controller on the ISA bus is returned in Device and EFI_SUCCESS is returned.
If Device is a pointer to the last ISA controller on the ISA bus, then
EFI_NOT_FOUND is returned.
@retval EFI_NOT_FOUND No device found.
@retval EFI_SUCCESS Success get the next ISA device.
@param[in] This Pointer to the EFI_ISA_ACPI_PROTOCOL instance.
@param[out] Device Pointer to an ISA controller named by ACPI HID/UID.
@retval EFI_SUCCESS The next ISA controller on the ISA bus was returned.
@retval EFI_NOT_FOUND No device found.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ISA_ACPI_DEVICE_ENUMERATE) (
IN EFI_ISA_ACPI_PROTOCOL *This,
OUT EFI_ISA_ACPI_DEVICE_ID **Device
(EFIAPI *EFI_ISA_ACPI_DEVICE_ENUMERATE)(
IN EFI_ISA_ACPI_PROTOCOL *This,
OUT EFI_ISA_ACPI_DEVICE_ID **Device
);
/**
Set ISA device power.
Sets the power state of an ISA controller.
@param This Pointer to EFI_ISA_ACPI_PROTOCOL.
@param Device ISA device.
@param OnOff Whether to set power on or off.
This services sets the power state of the ISA controller specified by Device to
the power state specified by OnOff. If OnOff is TRUE, then power is applied to
the ISA controller. If OnOff is FALSE, then power is remobed from the ISA
controller. If the power state is sucessfully set on the ISA Controller, then
EFI_SUCCESS is returned.
@retval EFI_SUCCESS Successfully set ISA device.
@param[in] This Pointer to the EFI_ISA_ACPI_PROTOCOL instance.
@param[in] Device Pointer to an ISA controller named by ACPI HID/UID.
@param[in] OnOff TRUE to apply power to the ISA controller. FALSE to remove
power from the ISA controller.
@retval EFI_SUCCESS Successfully set the power state of the ISA controller.
@retval Other The ISA controller cound not be placed in the requested power state.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ISA_ACPI_SET_DEVICE_POWER) (
IN EFI_ISA_ACPI_PROTOCOL *This,
IN EFI_ISA_ACPI_DEVICE_ID *Device,
IN BOOLEAN OnOff
(EFIAPI *EFI_ISA_ACPI_SET_DEVICE_POWER)(
IN EFI_ISA_ACPI_PROTOCOL *This,
IN EFI_ISA_ACPI_DEVICE_ID *Device,
IN BOOLEAN OnOff
);
/**
Get current Resource of the specific ISA device.
Retrieves the current set of resource associated with an ISA controller.
@param This Pointer to EFI_ISA_ACPI_PROTOCOL.
@param Device ISA device.
@param ResourceList Returned resource list.
Retrieves the set of I/O, MMIO, DMA, and interrupt resources currently
assigned to the ISA controller specified by Device. These resources
are returned in ResourceList.
@retval EFI_SUCCESS Successfully get current resource.
@retval EFI_NOT_FOUND No resource found.
@param[in] This Pointer to the EFI_ISA_ACPI_PROTOCOL instance.
@param[in] Device Pointer to an ISA controller named by ACPI HID/UID.
@param[out] ResourceList Pointer to the current resource list for Device.
@retval EFI_SUCCESS Successfully retrieved the current resource list.
@retval EFI_NOT_FOUND The resource list could not be retrieved.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ISA_ACPI_GET_CUR_RESOURCE) (
IN EFI_ISA_ACPI_PROTOCOL *This,
IN EFI_ISA_ACPI_DEVICE_ID *Device,
OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList
(EFIAPI *EFI_ISA_ACPI_GET_CUR_RESOURCE)(
IN EFI_ISA_ACPI_PROTOCOL *This,
IN EFI_ISA_ACPI_DEVICE_ID *Device,
OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList
);
/**
Get possible resource for the specific ISA device.
Retrieves the set of possible resources that may be assigned to an ISA controller
with SetResource().
@param This Pointer to EFI_ISA_ACPI_PROTOCOL.
@param Device ISA device.
@param ResourceList Returned resource list.
Retrieves the possible sets of I/O, MMIO, DMA, and interrupt resources for the
ISA controller specified by Device. The sets are returned in ResourceList.
@param[in] This Pointer to the EFI_ISA_ACPI_PROTOCOL instance.
@param[in] Device Pointer to an ISA controller named by ACPI HID/UID.
@param[out] ResourceList Pointer to the returned list of resource lists.
@retval EFI_UNSUPPORTED This services is not supported.
@retval EFI_SUCCESS Successfully get possible resource.
@retval EFI_NOT_FOUND No resource found.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ISA_ACPI_GET_POS_RESOURCE) (
IN EFI_ISA_ACPI_PROTOCOL *This,
IN EFI_ISA_ACPI_DEVICE_ID *Device,
OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList
(EFIAPI *EFI_ISA_ACPI_GET_POS_RESOURCE)(
IN EFI_ISA_ACPI_PROTOCOL *This,
IN EFI_ISA_ACPI_DEVICE_ID *Device,
OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList
);
/**
Set resources for the specific ISA device.
Assigns resources to an ISA controller.
@param This Pointer to EFI_ISA_ACPI_PROTOCOL.
@param Device ISA device.
@param ResourceList Resource list will be set.
Assigns the I/O, MMIO, DMA, and interrupt resources specified by ResourceList
to the ISA controller specified by Device. ResourceList must match on of the
possible resource lists returned by GetPosResource() for the same ISA controller.
@retval EFI_SUCCESS Successfully set resource.
@param[in] This Pointer to the EFI_ISA_ACPI_PROTOCOL instance.
@param[in] Device Pointer to an ISA controller named by ACPI HID/UID.
@param[in] ResourceList Pointer to a resources list that must be one of the
resource lists returned by GetPosResource() for the
ISA controller specified by Device.
@retval EFI_SUCCESS Successfully set resources on the ISA controller.
@retval Other The resources could not be set for the ISA controller.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ISA_ACPI_SET_RESOURCE) (
IN EFI_ISA_ACPI_PROTOCOL *This,
IN EFI_ISA_ACPI_DEVICE_ID *Device,
IN EFI_ISA_ACPI_RESOURCE_LIST *ResourceList
(EFIAPI *EFI_ISA_ACPI_SET_RESOURCE)(
IN EFI_ISA_ACPI_PROTOCOL *This,
IN EFI_ISA_ACPI_DEVICE_ID *Device,
IN EFI_ISA_ACPI_RESOURCE_LIST *ResourceList
);
/**
Enable or disable ISA device.
Enables or disables an ISA controller.
@param This Pointer of EFI_ISA_ACPI_PROTOCOL.
@param Device ISA device.
@param Enable Enable/Disable.
@param[in] This Pointer to the EFI_ISA_ACPI_PROTOCOL instance.
@param[in] Device Pointer to the ISA controller to enable/disable.
@param[in] Enable TRUE to enable the ISA controller. FALSE to disable the
ISA controller.
@retval EFI_SUCCESS Successfully perform this action.
@retval EFI_SUCCESS Successfully enabled/disabled the ISA controller.
@retval Other The ISA controller cound not be placed in the requested state.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ISA_ACPI_ENABLE_DEVICE) (
IN EFI_ISA_ACPI_PROTOCOL *This,
IN EFI_ISA_ACPI_DEVICE_ID *Device,
IN BOOLEAN Enable
(EFIAPI *EFI_ISA_ACPI_ENABLE_DEVICE)(
IN EFI_ISA_ACPI_PROTOCOL *This,
IN EFI_ISA_ACPI_DEVICE_ID *Device,
IN BOOLEAN Enable
);
/**
Init ISA device.
Places an ISA controller into a usable state. This service must be called
before SetResource(), EnableDevice(), or SetPower() will behave as expected.
@param This Pointer to EFI_ISA_ACPI_PROTOCOL.
@param Device ISA device.
@param[in] This Pointer to the EFI_ISA_ACPI_PROTOCOL instance.
@param[in] Device Pointer to an ISA controller named by ACPI HID/UID.
@retval EFI_SUCCESS Successfully initialize ISA device.
@retval EFI_SUCCESS Successfully initialized an ISA controller.
@retval Other The ISA controller could not be initialized.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ISA_ACPI_INIT_DEVICE) (
IN EFI_ISA_ACPI_PROTOCOL *This,
IN EFI_ISA_ACPI_DEVICE_ID *Device
(EFIAPI *EFI_ISA_ACPI_INIT_DEVICE)(
IN EFI_ISA_ACPI_PROTOCOL *This,
IN EFI_ISA_ACPI_DEVICE_ID *Device
);
/**
ISA Interface Init.
Initializes all the HW state required for the ISA controlers on the ISA bus
to be enumerated and managed by this rest of the services in this prorotol.
This service must be called before any of the other services in this
protocol will function as expected.
@param[in] This Pointer to the EFI_ISA_ACPI_PROTOCOL instance.
@param This Pointer of EFI_ISA_ACPI_PROTOCOL.
@retval EFI_SUCCESS Successfully initialize ISA interface.
@retval EFI_SUCCESS Successfully initialized the ISA interface.
@retval Other The ISA interface could not be initialized.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ISA_ACPI_INTERFACE_INIT) (
IN EFI_ISA_ACPI_PROTOCOL *This
(EFIAPI *EFI_ISA_ACPI_INTERFACE_INIT)(
IN EFI_ISA_ACPI_PROTOCOL *This
);
//
// Interface structure for the ISA ACPI Protocol
//
///
/// The EFI_ISA_ACPI_PROTOCOL provides the services to enumberate and manage
/// ISA controllers on an ISA bus. This include the ability to initialize,
/// enable, disable, and manag the power state of ISA controllers. It also
/// includes services to query current ressources, query possible resources,
/// and assign resources to an ISA controller.
///
struct _EFI_ISA_ACPI_PROTOCOL {
EFI_ISA_ACPI_DEVICE_ENUMERATE DeviceEnumerate;
EFI_ISA_ACPI_SET_DEVICE_POWER SetPower;
EFI_ISA_ACPI_GET_CUR_RESOURCE GetCurResource;
EFI_ISA_ACPI_GET_POS_RESOURCE GetPosResource;
EFI_ISA_ACPI_SET_RESOURCE SetResource;
EFI_ISA_ACPI_ENABLE_DEVICE EnableDevice;
EFI_ISA_ACPI_INIT_DEVICE InitDevice;
EFI_ISA_ACPI_INTERFACE_INIT InterfaceInit;
EFI_ISA_ACPI_DEVICE_ENUMERATE DeviceEnumerate;
EFI_ISA_ACPI_SET_DEVICE_POWER SetPower;
EFI_ISA_ACPI_GET_CUR_RESOURCE GetCurResource;
EFI_ISA_ACPI_GET_POS_RESOURCE GetPosResource;
EFI_ISA_ACPI_SET_RESOURCE SetResource;
EFI_ISA_ACPI_ENABLE_DEVICE EnableDevice;
EFI_ISA_ACPI_INIT_DEVICE InitDevice;
EFI_ISA_ACPI_INTERFACE_INIT InterfaceInit;
};
extern EFI_GUID gEfiIsaAcpiProtocolGuid;

View File

@ -1,89 +1,116 @@
/** @file
ISA I/O Protocol is used to perform ISA device Io/Mem operations.
ISA I/O Protocol is used by ISA device drivers to perform I/O, MMIO and DMA
operations on the ISA controllers they manage.
Copyright (c) 2006 - 2009, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
Copyright (c) 2006 - 2009, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef _EFI_ISA_IO_H_
#define _EFI_ISA_IO_H_
#include <Protocol/IsaAcpi.h>
//
// Global GUID for the ISA I/O Protocol
//
///
/// Global ID for the EFI_ISA_IO_PROTOCOL
///
#define EFI_ISA_IO_PROTOCOL_GUID \
{ 0x7ee2bd44, 0x3da0, 0x11d4, { 0x9a, 0x38, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }
{ \
0x7ee2bd44, 0x3da0, 0x11d4, { 0x9a, 0x38, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
}
///
/// Forward declaration for the EFI_ISA_IO_PROTOCOL
///
typedef struct _EFI_ISA_IO_PROTOCOL EFI_ISA_IO_PROTOCOL;
//
// Width of ISA Io/Mem operation
//
///
/// Width of EFI_ISA_IO_PROTOCOL I/O Port and MMIO operations
///
typedef enum {
EfiIsaIoWidthUint8,
EfiIsaIoWidthUint16,
EfiIsaIoWidthUint32,
EfiIsaIoWidthUint8 = 0, ///< 8-bit operation
EfiIsaIoWidthUint16, ///< 16-bit operation
EfiIsaIoWidthUint32, ///< 32-bit operation
EfiIsaIoWidthReserved,
EfiIsaIoWidthFifoUint8,
EfiIsaIoWidthFifoUint16,
EfiIsaIoWidthFifoUint32,
EfiIsaIoWidthFifoUint8, ///< 8-bit FIFO operation
EfiIsaIoWidthFifoUint16, ///< 16-bit FIFO operation
EfiIsaIoWidthFifoUint32, ///< 32-bit FIFO operation
EfiIsaIoWidthFifoReserved,
EfiIsaIoWidthFillUint8,
EfiIsaIoWidthFillUint16,
EfiIsaIoWidthFillUint32,
EfiIsaIoWidthFillUint8, ///< 8-bit Fill operation
EfiIsaIoWidthFillUint16, ///< 16-bit Fill operation
EfiIsaIoWidthFillUint32, ///< 32-bit Fill operation
EfiIsaIoWidthFillReserved,
EfiIsaIoWidthMaximum
} EFI_ISA_IO_PROTOCOL_WIDTH;
//
// Attributes for common buffer allocations
//
///
/// Attributes for the EFI_ISA_IO_PROTOCOL common DMA buffer allocations
///
#define EFI_ISA_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x080 ///< Map a memory range so write are combined
#define EFI_ISA_IO_ATTRIBUTE_MEMORY_CACHED 0x800 ///< Map a memory range so all r/w accesses are cached
#define EFI_ISA_IO_ATTRIBUTE_MEMORY_DISABLE 0x1000 ///< Disable a memory range
//
// Channel attribute for DMA operations
//
#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_COMPATIBLE 0x001
#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_A 0x002
#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_B 0x004
#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_C 0x008
#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_8 0x010
#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_16 0x020
#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SINGLE_MODE 0x040
#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_DEMAND_MODE 0x080
#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_AUTO_INITIALIZE 0x100
///
/// Channel attribute for EFI_ISA_IO_PROTOCOL slave DMA requests
///
#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_COMPATIBLE 0x001 ///< Set the speed of the DMA transfer in compatible mode
#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_A 0x002 ///< Not supported
#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_B 0x004 ///< Not supported
#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SPEED_C 0x008 ///< Not supported
#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_8 0x010 ///< Request 8-bit DMA transfers. Only available on channels 0..3
#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_WIDTH_16 0x020 ///< Request 16-bit DMA transfers. Only available on channels 4..7
#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SINGLE_MODE 0x040 ///< Request a single DMA transfer
#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_DEMAND_MODE 0x080 ///< Request multiple DMA transfers until TC(Terminal Count) or EOP(End of Process)
#define EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_AUTO_INITIALIZE 0x100 ///< Automatically reload base and count at the end of the DMA transfer
///
/// The DMA opreration type for EFI_ISA_IO_PROTOCOL DMA requests
///
typedef enum {
///
/// A read operation from system memory by a bus master.
///
EfiIsaIoOperationBusMasterRead,
///
/// A write operation to system memory by a bus master.
///
EfiIsaIoOperationBusMasterWrite,
///
/// Provides both read and write access to system memory by both the processor
/// and a bus master. The buffer is coherent from both the processor's and the
/// bus master's point of view.
///
EfiIsaIoOperationBusMasterCommonBuffer,
///
/// A read operation from system memory by a slave device.
///
EfiIsaIoOperationSlaveRead,
///
/// A write operation to system memory by a slave master.
///
EfiIsaIoOperationSlaveWrite,
EfiIsaIoOperationMaximum
} EFI_ISA_IO_PROTOCOL_OPERATION;
/**
Performs an ISA Io/Memory Read/Write Cycle
@param This A pointer to the EFI_ISA_IO_PROTOCOL instance.
@param Width Signifies the width of the Io/Memory operation.
@param Offset The offset in ISA Io/Memory space to start the Io/Memory operation.
@param Count The number of Io/Memory operations to perform.
@param Buffer [OUT] The destination buffer to store the results.
[IN] The source buffer to write data to the device.
Performs ISA I/O and MMIO Read/Write Cycles
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
@param[in] Width Specifies the width of the I/O or MMIO operation.
@param[in] Offset The offset into the ISA I/O or MMIO space to start the
operation.
@param[in] Count The number of I/O or MMIO operations to perform.
@param[in, out] Buffer For read operations, the destination buffer to store
the results. For write operations, the source buffer to
write data from.
@retval EFI_SUCCESS The data was read from / written to the device sucessfully.
@retval EFI_UNSUPPORTED The Offset is not valid for this device.
@retval EFI_INVALID_PARAMETER Width or Count, or both, were invalid.
@ -92,27 +119,37 @@ typedef enum {
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ISA_IO_PROTOCOL_IO_MEM) (
IN EFI_ISA_IO_PROTOCOL *This,
IN EFI_ISA_IO_PROTOCOL_WIDTH Width,
IN UINT32 Offset,
IN UINTN Count,
IN OUT VOID *Buffer
(EFIAPI *EFI_ISA_IO_PROTOCOL_IO_MEM)(
IN EFI_ISA_IO_PROTOCOL *This,
IN EFI_ISA_IO_PROTOCOL_WIDTH Width,
IN UINT32 Offset,
IN UINTN Count,
IN OUT VOID *Buffer
);
///
/// Structure of functions for accessing ISA I/O and MMIO space
///
typedef struct {
///
/// Read from ISA I/O or MMIO space.
///
EFI_ISA_IO_PROTOCOL_IO_MEM Read;
///
/// Write to ISA I/O or MMIO space.
///
EFI_ISA_IO_PROTOCOL_IO_MEM Write;
} EFI_ISA_IO_PROTOCOL_ACCESS;
/**
Performs an ISA I/O Copy Memory
Copies data from one region of ISA MMIO space to another region of ISA
MMIO space.
@param This A pointer to the EFI_ISA_IO_PROTOCOL instance.
@param Width Signifies the width of the memory copy operation.
@param DestOffset The offset of the destination
@param SrcOffset The offset of the source
@param Count The number of memory copy operations to perform
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
@param[in] Width Specifies the width of the MMIO copy operation.
@param[in] DestOffset The offset of the destination in ISA MMIO space
@param[in] SrcOffset The offset of the source in ISA MMIO space
@param[in] Count The number tranfers to perform for this copy operation
@retval EFI_SUCCESS The data was copied sucessfully.
@retval EFI_UNSUPPORTED The DestOffset or SrcOffset is not valid for this device.
@ -122,35 +159,63 @@ typedef struct {
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ISA_IO_PROTOCOL_COPY_MEM) (
IN EFI_ISA_IO_PROTOCOL *This,
IN EFI_ISA_IO_PROTOCOL_WIDTH Width,
IN UINT32 DestOffset,
IN UINT32 SrcOffset,
IN UINTN Count
(EFIAPI *EFI_ISA_IO_PROTOCOL_COPY_MEM)(
IN EFI_ISA_IO_PROTOCOL *This,
IN EFI_ISA_IO_PROTOCOL_WIDTH Width,
IN UINT32 DestOffset,
IN UINT32 SrcOffset,
IN UINTN Count
);
/**
Maps a memory region for DMA
Maps a memory region for DMA.
@param This A pointer to the EFI_ISA_IO_PROTOCOL instance.
@param Operation Indicates the type of DMA (slave or bus master), and if
the DMA operation is going to read or write to system memory.
@param ChannelNumber The slave channel number to use for this DMA operation.
If Operation and ChannelAttributes shows that this device
performs bus mastering DMA, then this field is ignored.
The legal range for this field is 0..7.
@param ChannelAttributes The attributes of the DMA channel to use for this DMA operation
@param HostAddress The system memory address to map to the device.
@param NumberOfBytes On input the number of bytes to map. On output the number
of bytes that were mapped.
@param DeviceAddress The resulting map address for the bus master device to use
to access the hosts HostAddress.
@param Mapping A resulting value to pass to EFI_ISA_IO.Unmap().
This function returns the device specific addresses required to access system memory.
This function is used to map system memory for ISA DMA operations. All ISA DMA
operations must be performed through their mapped addresses and such mappings must
be freed with EFI_ISA_IO_PROTOCOL.Unmap() after the DMA operation is completed.
If the DMA operation is a single read or write data transfer through an ISA bus
master, then EfiIsaIoOperationBusMasterRead or EfiIsaIoOperationBusMasterWrite
is used and the range is unmapped to complete the operation. If the DMA operation
is a single read or write data transfer through an ISA slave controller, then
EfiIsaIoOperationSlaveRead or EfiIsaIoOperationSlaveWrite is used and the range
is unmapped to complete the operation. If performing a DMA read operation, all
the data must be present in system memory before the Map() is performed. Similarly,
if performing a DMA write operation, the data must not be accessed in system
memory until EFI_ISA_IO_PROTOCOL.Unmap() is performed. Bus master operations that
require both read and write access or require multiple host device interactions
within the same mapped region must use EfiIsaIoOperationBusMasterCommonBuffer.
However, only memory allocated via the EFI_ISA_IO_PROTOCOL.AllocateBuffer() interface
are guaranteed to be able to be mapped for this operation type. In all mapping
requests the NumberOfBytes returned may be less than originally requested. It is
the caller's responsibility to make additional requests to complete the entire
transfer.
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
@param[in] Operation Indicates the type of DMA (slave or bus master),
and if the DMA operation is going to read or
write to system memory.
@param[in] ChannelNumber The slave channel number to use for this DMA
operation. If Operation and ChannelAttributes
shows that this device performs bus mastering
DMA, then this field is ignored. The legal
range for this field is 0..7.
@param[in] ChannelAttributes A bitmask of the attributes used to configure
the slave DMA channel for this DMA operation.
See EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_* for the
legal bit combinations.
@param[in] HostAddress The system memory address to map to the device.
@param[in, out] NumberOfBytes On input the number of bytes to map. On
output the number of bytes that were mapped.
@param[out] DeviceAddress The resulting map address for the bus master
device to use to access the hosts HostAddress.
@param[out] Mapping A returned value that must be passed to into
EFI_ISA_IO_PROTOCOL.Unmap() to free all the the
resources associated with this map request.
@retval EFI_SUCCESS The range was mapped for the returned NumberOfBytes.
@retval EFI_INVALID_PARAMETER The Operation or HostAddress is undefined.
@retval EFI_INVALID_PARAMETER The Operation is undefined.
@retval EFI_INVALID_PARAMETER The HostAddress is undefined.
@retval EFI_UNSUPPORTED The HostAddress can not be mapped as a common buffer.
@retval EFI_DEVICE_ERROR The system hardware could not map the requested address.
@retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated.
@ -158,7 +223,7 @@ EFI_STATUS
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ISA_IO_PROTOCOL_MAP) (
(EFIAPI *EFI_ISA_IO_PROTOCOL_MAP)(
IN EFI_ISA_IO_PROTOCOL *This,
IN EFI_ISA_IO_PROTOCOL_OPERATION Operation,
IN UINT8 ChannelNumber OPTIONAL,
@ -170,56 +235,64 @@ EFI_STATUS
);
/**
Unmaps a memory region for DMA
Unmaps a memory region that was previously mapped with EFI_ISA_IO_PROTOCOL.Map()
@param This A pointer to the EFI_ISA_IO_PROTOCOL instance.
@param Mapping The mapping value returned from EFI_ISA_IO.Map().
The EFI_ISA_IO_PROTOCOL.Map() operation is completed and any corresponding
resources are released. If the operation was EfiIsaIoOperationSlaveWrite
or EfiIsaIoOperationBusMasterWrite, the data is committed to system memory.
Any resources used for the mapping are freed.
@retval EFI_SUCCESS The range was unmapped.
@retval EFI_DEVICE_ERROR The data was not committed to the target system memory.
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
@param[in] Mapping The mapping value returned from EFI_ISA_IO_PROTOCOL.Map().
@retval EFI_SUCCESS The memory region was unmapped.
@retval EFI_DEVICE_ERROR The data was not committed to the target system memory.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ISA_IO_PROTOCOL_UNMAP) (
IN EFI_ISA_IO_PROTOCOL *This,
IN VOID *Mapping
(EFIAPI *EFI_ISA_IO_PROTOCOL_UNMAP)(
IN EFI_ISA_IO_PROTOCOL *This,
IN VOID *Mapping
);
/**
Allocates a common buffer for DMA
Allocates pages that are suitable for an EfiIsaIoOperationBusMasterCommonBuffer
mapping.
@param This A pointer to the EFI_ISA_IO_PROTOCOL instance.
@param Type The type allocation to perform.
@param MemoryType The type of memory to allocate.
@param Pages The number of pages to allocate.
@param HostAddress A pointer to store the base address of the allocated range.
@param Attributes The requested bit mask of attributes for the allocated range.
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
@param[in] Type The type allocation to perform.
@param[in] MemoryType The type of memory to allocate.
@param[in] Pages The number of pages to allocate.
@param[out] HostAddress A pointer to store the base address of the allocated range.
@param[in] Attributes The requested bit mask of attributes for the allocated range.
@retval EFI_SUCCESS The requested memory pages were allocated.
@retval EFI_INVALID_PARAMETER Type is invalid or MemoryType is invalid or HostAddress is NULL
@retval EFI_UNSUPPORTED Attributes is unsupported or the memory range specified
by HostAddress, Pages, and Type is not available for common buffer use.
@retval EFI_INVALID_PARAMETER Type is invalid.
@retval EFI_INVALID_PARAMETER MemoryType is invalid
@retval EFI_INVALID_PARAMETER HostAddress is NULL
@retval EFI_UNSUPPORTED Attributes is unsupported.
@retval EFI_UNSUPPORTED The memory range specified by HostAddress, Pages,
and Type is not available for common buffer use.
@retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ISA_IO_PROTOCOL_ALLOCATE_BUFFER) (
IN EFI_ISA_IO_PROTOCOL *This,
IN EFI_ALLOCATE_TYPE Type,
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages,
OUT VOID **HostAddress,
IN UINT64 Attributes
(EFIAPI *EFI_ISA_IO_PROTOCOL_ALLOCATE_BUFFER)(
IN EFI_ISA_IO_PROTOCOL *This,
IN EFI_ALLOCATE_TYPE Type,
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages,
OUT VOID **HostAddress,
IN UINT64 Attributes
);
/**
Frees a common buffer
Frees a common buffer that was allocated with EFI_ISA_IO_PROTOCOL.AllocateBuffer()
@param This A pointer to the EFI_ISA_IO_PROTOCOL instance.
@param Pages The number of pages to free.
@param HostAddress The base address of the allocated range.
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
@param[in] Pages The number of pages to free from the previously allocated common buffer.
@param[in] HostAddress The base address of the previously allocated common buffer.
@retval EFI_SUCCESS The requested memory pages were freed.
@ -228,30 +301,34 @@ EFI_STATUS
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ISA_IO_PROTOCOL_FREE_BUFFER) (
IN EFI_ISA_IO_PROTOCOL *This,
IN UINTN Pages,
IN VOID *HostAddress
(EFIAPI *EFI_ISA_IO_PROTOCOL_FREE_BUFFER)(
IN EFI_ISA_IO_PROTOCOL *This,
IN UINTN Pages,
IN VOID *HostAddress
);
/**
Flushes a DMA buffer
Flushes a DMA buffer. This forces all DMA posted write transactions to complete.
@param This A pointer to the EFI_ISA_IO_PROTOCOL instance.
@param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance.
@retval EFI_SUCCESS The buffers were flushed.
@retval EFI_SUCCESS The DMA buffers were flushed.
@retval EFI_DEVICE_ERROR The buffers were not flushed due to a hardware error.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_ISA_IO_PROTOCOL_FLUSH) (
IN EFI_ISA_IO_PROTOCOL *This
(EFIAPI *EFI_ISA_IO_PROTOCOL_FLUSH)(
IN EFI_ISA_IO_PROTOCOL *This
);
//
// Interface structure for the ISA I/O Protocol
//
///
/// The EFI_ISA_IO_PROTOCOL provides the basic Memory, I/O, and DMA interfaces
/// used to abstract accesses to ISA controllers. There is one EFI_ISA_IO_PROTOCOL
/// instance for each ISA controller on a ISA bus. A device driver that wishes
/// to manage an ISA controller in a system will have to retrieve the
/// ISA_PCI_IO_PROTOCOL instance that is associated with the ISA controller.
///
struct _EFI_ISA_IO_PROTOCOL {
EFI_ISA_IO_PROTOCOL_ACCESS Mem;
EFI_ISA_IO_PROTOCOL_ACCESS Io;
@ -261,8 +338,20 @@ struct _EFI_ISA_IO_PROTOCOL {
EFI_ISA_IO_PROTOCOL_ALLOCATE_BUFFER AllocateBuffer;
EFI_ISA_IO_PROTOCOL_FREE_BUFFER FreeBuffer;
EFI_ISA_IO_PROTOCOL_FLUSH Flush;
///
/// The list of I/O , MMIO, DMA, and Interrupt resources associated with the
/// ISA controller abstracted by this instance of the EFI_ISA_IO_PROTOCOL.
///
EFI_ISA_ACPI_RESOURCE_LIST *ResourceList;
///
/// The size, in bytes, of the ROM image.
///
UINT32 RomSize;
///
/// A pointer to the in memory copy of the ROM image. The ISA Bus Driver is responsible
/// for allocating memory for the ROM image, and copying the contents of the ROM to memory
/// during ISA Bus initialization.
///
VOID *RomImage;
};

View File

@ -1,55 +1,91 @@
/** @file
Vga Mini port binding for a VGA controller
VGA Mini Port Protocol that is used to set the text display mode of a VGA controller.
Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Copyright (c) 2006 - 2009, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __VGA_MINI_PORT_H_
#define __VGA_MINI_PORT_H_
///
/// Global ID for the EFI_VGA_MINI_PORT_PROTOCOL
///
#define EFI_VGA_MINI_PORT_PROTOCOL_GUID \
{ \
0xc7735a2f, 0x88f5, 0x4882, {0xae, 0x63, 0xfa, 0xac, 0x8c, 0x8b, 0x86, 0xb3 } \
}
///
/// Forward declaration for the EFI_VGA_MINI_PORT_PROTOCOL
///
typedef struct _EFI_VGA_MINI_PORT_PROTOCOL EFI_VGA_MINI_PORT_PROTOCOL;
/**
Sets the text display mode of a VGA controller
Sets the text display mode of a VGA controller.
@param This Protocol instance pointer.
@param Mode Mode number. 0 - 80x25 1-80x50
Sets the text display mode of the VGA controller to the mode specified by
ModeNumber. A ModeNumber of 0 is a request for an 80x25 text mode. A
ModeNumber of 1 is a request for an 80x50 text mode. If ModeNumber is greater
than MaxModeNumber, then EFI_UNSUPPORTED is returned. If the VGA controller
is not functioning properly, then EFI_DEVICE_ERROR is returned. If the VGA
controller is sucessfully set to the mode number specified by ModeNumber, then
EFI_SUCCESS is returned.
@param[in] This A pointer to the EFI_VGA_MINI_PORT_PROTOCOL instance.
@param[in] ModeNumber The requested mode number. 0 for 80x25. 1 for 80x5.
@retval EFI_SUCCESS The mode was set
@retval EFI_DEVICE_ERROR The device is not functioning properly.
@retval EFI_SUCCESS The mode number was set
@retval EFI_UNSUPPORTED The mode number specified by ModeNumber is not supported.
@retval EFI_DEVICE_ERROR The device is not functioning properly.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_VGA_MINI_PORT_SET_MODE) (
IN EFI_VGA_MINI_PORT_PROTOCOL * This,
IN UINTN ModeNumber
(EFIAPI *EFI_VGA_MINI_PORT_SET_MODE)(
IN EFI_VGA_MINI_PORT_PROTOCOL *This,
IN UINTN ModeNumber
);
struct _EFI_VGA_MINI_PORT_PROTOCOL {
EFI_VGA_MINI_PORT_SET_MODE SetMode;
///
/// MMIO base address of the VGA text mode framebuffer. Typically set to 0xB8000.
///
UINT64 VgaMemoryOffset;
///
/// I/O Port address for the VGA CRTC address register Typically set to 0x3D4.
///
UINT64 CrtcAddressRegisterOffset;
///
/// I/O Port address for the VGA CRTC data register. Typically set to 0x3D5.
///
UINT64 CrtcDataRegisterOffset;
///
/// PCI Controller MMIO BAR index of the VGA text mode frame buffer. Typically
/// set to EFI_PCI_IO_PASS_THROUGH_BAR
///
UINT8 VgaMemoryBar;
///
/// PCI Controller I/O BAR index of the VGA CRTC address register. Typically
/// set to EFI_PCI_IO_PASS_THROUGH_BAR
///
UINT8 CrtcAddressRegisterBar;
///
/// PCI Controller I/O BAR index of the VGA CRTC data register. Typically set
/// to EFI_PCI_IO_PASS_THROUGH_BAR
///
UINT8 CrtcDataRegisterBar;
///
/// The maximum number of text modes that this VGA controller supports.
///
UINT8 MaxMode;
};