Abstract:
The subject invention relates to a Universal Graphics Adapter (UGA) that is a hardware-independent design that encapsulates and abstracts low-level graphics hardware in a standard manner through firmware. UGA is a firmware standard, intended to wrap existing or planned hardware, including VGA. UGA does not require the use of real-mode assembly language, direct hardware register, or frame buffer access to program, thus providing advantages over conventional systems. UGA supports basic drawing operations, continuous display modes, and power management. As a firmware-based standard, UGA facilitates updating a system to support both evolving and new hardware features.

Description:
CROSS-REFERENCE TO RELATED APPLICATION  
       [0001]     This application is a Continuation of co-pending U.S. patent application Ser. No. 10/157,067 entitled “UNIVERSAL GRAPHIC ADAPTER FOR INTERFACING WITH HARDWARE AND MEANS FOR ENCAPSULATING AND ABSTRACTING DETAILS OF THE HARDWARE,” filed May 29, 2002 and is related to U.S. Divisional patent application Ser. No. 10/885,955 entitled “UNIVERSAL GRAPHICS ADAPTER,” filed Jul. 7, 2004. This application claims the benefit of U.S. Provisional Patent application Ser. No. 60/341,140 entitled “UNIVERSAL GRAPHICS ADAPTER,” filed Dec. 13, 2001. The entireties of the above-noted applications are incorporated by reference herein. 
     
    
     TECHNICAL FIELD  
       [0002]     The present invention relates generally to video graphics display and more particularly to hardware independent video display facilitated through firmware services that abstract video hardware and expose an interface to an operating system.  
       BACKGROUND OF THE INVENTION  
       [0003]     Video graphics array (VGA) is a graphics display system for personal computers (PCs). VGA has become one of the de facto standards for PCs, providing a resolution of 720 by 400 pixels in text mode and a choice of resolutions in graphics mode (e.g., 640 by 480 by 16 colors, 320 by 200 by 256 colors). VGA is a hardware specific standard that employs analog signals, not digital signals. Other standards have appeared since the 1987 VGA debut but VGA remains the lowest common denominator standard and thus substantially all PCs support VGA. However, VGA has drawbacks.  
         [0004]     For example, VGA is hardware specific and thus to program to VGA requires knowledge of hardware, software, and assembly and/or machine language, which makes such programming difficult. Furthermore, some of the original requirements of VGA are becoming harder to support as the PC continues to evolve, requiring extensive rework of assembler and/or machine coded BIOS (Basic Input Output System) code to support enhancements. The VGA standard from the 1980s makes demands on hardware and software that are outdated today, such as the use of Int 10 services, a non-linear frame buffer, a limited range of display modes, and direct register addressing using real-mode assembly language. Further limitations include that BIOS code executes in a real-mode ×86 environment and that the video BIOS image is restricted to an absolute maximum of 64K. Additionally, VGA is tied to legacy I/O (Input/Output) and memory usage that has a non-relocateable memory and a non-intuitive, non-linear frame buffer layout. Also, VGA has limited mode support (e.g., 80×25×70 Hz characters and 640×480×16-color graphics). VGA also does not support power management, which has become increasingly important in mobile computing environments. Also, there is no firmware support of VGA adapters in a multiple-monitor configuration under existing operating systems.  
         [0005]     Substantially all display devices support VGA in addition to the high-performance device capabilities they expose. Many PCs require a VGA device to be in the machine before the system can boot and BIOS Power-On Self Test (POST) messages require a VGA device for display. In addition to being a de facto universal standard, VGA is also now a dated standard, with capabilities that have not changed significantly as the PC platform has evolved.  
       SUMMARY OF THE INVENTION  
       [0006]     The following presents a simplified summary of the invention in order to provide a basic understanding of some aspects of the invention. This summary is not an extensive overview of the invention. It is not intended to identify key or critical elements of the invention or to delineate the scope of the invention. Its sole purpose is to present some concepts of the invention in a simplified form as a prelude to the more detailed description that is presented later.  
         [0007]     Universal Graphics Adapter (UGA) is a hardware-independent design that encapsulates and abstracts low-level graphics hardware in a standard manner through firmware. UGA is a firmware standard, intended to wrap existing or planned hardware, including VGA. UGA does not require the use of real-mode assembly language, direct hardware register, or frame buffer access to program, thus providing advantages over conventional systems. UGA supports basic drawing operations, continuous display modes, and power management. As a firmware-based standard, UGA facilitates updating a system to support both evolving and new hardware features.  
         [0008]     UGA mitigates shortcomings of VGA without making basic graphical operations more difficult to perform. For example, use of firmware to wrap hardware implementations facilitates a variety of display adapters complying with a UGA specification without requiring hardware changes. An example UGA firmware interface specification is attached hereto as Appendix A and which is considered part of this patent application specification. UGA facilitates devices supporting multiple BIOS, including both UGA and VGA BIOS in, for example an Option ROM (Read Only Memory). The VGA register set will not be changed, so hybrid display adapters will continue to work in existing machines, as well as working with a UGA-enable operating system. From one point of view, UGA extends the concepts of Plug and Play (PnP) and ACPI (behind the PCI bus) by providing standardized enumerating and manipulating of child devices of display adapters.  
         [0009]     UGA features include, but are not limited to: hardware details being wrapped by firmware; exposed device capabilities being implemented in firmware; native mode support being exposed by firmware; not requiring access to legacy I/O ports or memory; employing Base Address Registers (BARs) in PCI (Peripheral Component Interconnect, a local bus standard) space only; not requiring real-mode execution environment; not limiting size of BIOS to 64K; facilitating adding new functionality to the BIOS; cross-platform support (e.g., ×86, Itanium); improved overall graphics hardware and driver quality, and being able to code a BIOS in a higher level language (e.g., C vs. assembler/machine).  
         [0010]     UGA benefits different classes of user in different ways. For example, substantially all users benefit from an improved pre- and post-boot experience. When users first switch on computers, they will be presented with a high-resolution graphical display on which an OEM (Other Equipment Manufacturer) can place graphics during and/or before a power on self-test (POST). This can include, for example, tools for repairing or configuring the system that follow the same paradigm as the operating system. An experienced user who wants to take advantage of multi-monitor support will not be required to understand how to disable the VGA BIOS on one of the display adapters. Users upgrading from earlier releases of operating systems on mobile PCs that lack high-performance display drivers can benefit from power-managed driver support, unlike the conventional VGA driver.  
         [0011]     UGA has other benefits. For example, a BIOS can be developed in a high-level language (e.g., C, C#) rather than in assembler. Thus, a BIOS will be easier to maintain, because high-level language programming skills are more widely available than assembler skills. Furthermore, the BIOS size will not be restricted to 64K, so support for new features can be added as they become available and required. Display adapters will be platform independent, freed from the hardware restrictions for Int 10 support or ×86 assembler thus facilitating adapting and evolving new display hardware. New display adapters will not be required to support the VGA register set in new display adapters, thus facilitating innovation in adapter design. Display hardware can be made to support UGA through firmware, which can reduce die size. Furthermore, independent hardware vendors will not be required to supply a UGA device driver, since a UGA driver can be provided as part of an operating system. Thus, adapters should be more timely brought to market.  
         [0012]     Operating systems can provide a UGA driver. A UGA Hardware Abstraction Layer (HAL) wraps both native UGA driver support and the VGA driver, which facilitates a system supporting the transition between VGA and UGA devices. In one example of the present invention, if both supported types are available, a system can be configured to default to UGA.  
         [0013]     To the accomplishment of the foregoing and related ends, certain illustrative aspects of the invention are described herein in connection with the following description and the annexed drawings. These aspects are indicative, however, of but a few of the various ways in which the principles of the invention may be employed and the present invention is intended to include all such aspects and their equivalents. Other advantages and novel features of the invention may become apparent from the following detailed description of the invention when considered in conjunction with the drawings. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS AND APPENDICES  
       [0014]      FIG. 1  compares a BIOS with UGA firmware abstracting UGA hardware through an exposed interface and a conventional VGA specific BIOS interacting with a register interface.  
         [0015]      FIG. 2  illustrates a sample architecture of a UGA enabled operating system, in accordance with an aspect of the present invention.  
         [0016]      FIG. 3  illustrates a sample UGA device tree for a UGA enabled display adapter, in accordance with an aspect of the present invention.  
         [0017]      FIG. 4  is a flow chart that illustrates UGA I/O service request dispatching, in accordance with an aspect of the present invention.  
         [0018]      FIG. 5  is a flow chart that illustrates UGA output range negotiating, in accordance with an aspect of the present invention.  
         [0019]      FIG. 6  is a flow chart that illustrates UGA device enumerating, in accordance with an aspect of the present invention.  
         [0020]      FIG. 7  illustrates a display device with child devices that can interact with the UGA firmware, in accordance with an aspect of the present invention.  
         [0021]      FIG. 8  is a schematic block diagram of an example computing environment in which the present invention may operate, in accordance with an aspect of the present invention.  
         [0022]      FIG. 9  illustrates a sample option ROM layout of a UGA enabled display adapter, in accordance with an aspect of the present invention.  
         [0023]     Appendix A is an example UGA firmware interface, and this Appendix is considered part of this patent application specification.  
         [0024]     Appendix B is an example Extensible Firmware Interface Universal Graphics Adaptor (EFI-UGA) Binding Protocol, and this Appendix is considered part of this patent application specification.  
     
    
     DETAILED DESCRIPTION  
       [0025]     The present invention is now described with reference to the drawings, where like reference numerals are used to refer to like elements throughout. In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It may be evident, however, to one skilled in the art that the present invention may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form in order to facilitate description of the present invention.  
         [0026]     As used in this application, the term “computer component” is intended to refer to a computer-related entity, either hardware, a combination of hardware and software, software, or software in execution. For example, a computer component may be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program and a computer. By way of illustration, both an application running on a server and the server can be computer components. One or more computer components may reside within a process and/or thread of execution and a computer component may be localized on one computer and/or distributed between two or more computers.  
         [0027]     UGA is a next generation graphics adapter technology that succeeds VGA. UGA abstracts graphics hardware and exposes a UGA firmware interface that facilitates platform independent interaction between entities on the different sides of the firmware interface (e.g., an operating system and a graphics display device). The UGA firmware interface is exposed from UGA firmware. In one example of the present invention, the system firmware and UGA HAL driver employ the interface to perform basic operations with the UGA hardware. This layer replaces legacy video BIOS. In the example, UGA firmware exports a single entry point to the external world (e.g., system firmware, operating system runtime). One example exported entry point is UgaFwDispatchService, which is responsible for dispatching a UGA I/O request to an appropriate handler within the UGA firmware, based on a UGA device type and I/O request type. One example UGA specification therefore defines five UGA device types (UgaDtParentBus, UgaDtGraphicsController, UgaDtOutputController, UgaDtOutputPort, UgaDtOther) to facilitate interacting with an operating system through the entry point.  
         [0028]     UGA supplies high resolution, high color, multiple monitor support, GDI (Graphics Device Interface) acceleration and LFB (Linear Frame Buffer) layout independence. UGA defines an interface that IHVs (Independent Hardware Vendors) can implement on UGA hardware to facilitate interacting with an operating system via a UGA firmware. Thus, as an operating system, firmware and/or hardware evolve, so long as the interfaces between such entities are maintained, such changes can be independent of the other entities, which minimizes the impact of such changes on related entities, providing advantages over conventional systems where the impact can be greater. For example, a graphics display hardware component can be updated to provide a higher resolution. So long as the hardware component maintains the interface to the UGA firmware, neither the UGA firmware nor the operating system are required to change due to the graphics display hardware change. This provides an advantage over conventional systems where a hardware component upgrade can require patching the operating system with which it operates.  
         [0029]     UGA facilitates dispatching I/O service requests for display controller firmware, facilitates reporting, negotiating and configuring display capability ranges for output controllers and devices, facilitates enumerating display controller devices and their children, and facilitates power management of display controller devices and their children. Such services facilitate producing a platform independent graphics display environment, providing advantages over conventional systems.  
         [0030]     UGA defines a firmware interface specification for firmware that can be written in a high level language (e.g., C, C#) that can be compiled to be interpreted by a system BIOS and/or operating system virtual machine p-code and/or byte code. The UGA firmware can be located in a display device and/or in a system for an integrated environment.  
         [0031]     Turning now to  FIG. 1 , by employing the present invention, an operating system  100  can interact with abstracted UGA hardware  110  via a UGA firmware  120  stored in a BIOS. Such firmware can be interpreted byte code that was compiled from a higher level language (e.g., C, C#) that executes in an on-board execution environment. The firmware  120  can implement an interface that facilitates non-hardware specific interactions between the operating system  100  and the hardware  110 . Such an interface can include abstractions like device_on, device_off, device_accept_data, device_provide_data, and device_report_children. One example interface is described in Appendix A. Such an interface facilitates a flexible approach for operating system to hardware interaction wherein the details of how the hardware will perform certain tasks are restricted to the hardware. This is contrasted with the conventional situation where an operating system  130  interacts with a VGA hardware  140  through a VGA specific, hardware specific, BIOS  150  that implements the standard VGA register interface. The BIOS  150  is conventionally coded in a lower level language (e.g., assembler, machine language).  
         [0032]     Turning now to  FIG. 2 , a system  200  that includes a UGA virtual machine  210  that facilitates access via a UGA interface to UGA hardware  220  is illustrated. The UGA virtual machine  210  can be implemented in firmware and stored in a BIOS on a chip associated with the UGA hardware  220 . The system  200  illustrates one configuration of computer components wherein legacy compatibility with VGA hardware  230  is maintained. Conventionally, access to VGA hardware  230  has been via an Int 10, VGA I/O register interface  240 .  
         [0033]     In the system  200 , a boot time application  242  and/or a run-time application  250  can consider the system  200  to have only UGA hardware  220  through the interaction of a hardware abstraction layer  260  (HAL) and a UGA kernel services  270 . The HAL  260  abstracts the details of video display hardware into an interface. The boot time application  242  calls a boot time display API (Application Programming Interface)  280  to perform actions like displaying messages during POST and/or to display a power on banner (e.g., trademark screen). The run time application  250  calls a run time display API  290  to perform display functions (e.g., display text, display graphics). Although the boot time application  242  and/or run time application  250  may desire to interact with UGA hardware  220 , the system  200  may only have VGA hardware  230 . Thus, the HAL  260  can implement abstracted methods to work with VGA hardware  230  through the conventional register interface  240 . However, when UGA hardware  220  is present, the HAL  260  can implement the abstracted methods to work through the UGA virtual machine  210  to interact with the UGA hardware  220 .  
         [0034]     Turning now to  FIG. 3 , a hierarchy  300  of computer components associated with UGA are illustrated. The hierarchy  300  includes five sample devices defined in the example UGA firmware specification attached as appendix A that facilitate communicating through devices to attached devices. At the top of the hierarchy  300  is a parent device  310  (e.g., UgaDtParentBus). An operating system can interact with the parent device  310 , which may be a physical and/or logical device, through the UGA firmware interface. Two pieces of information are employed to communicate with a device, a device identifier (e.g., with which device do you wish to communicate) and a request type (e.g., what would you like the device to do). In one example of the present invention, what the user would like the device to do is referred to as a service. A UGA firmware interface can define a set of services for devices to perform. Such services can include, but are not limited to, power management (e.g., turn on, turn off, go to lower power state, go to higher power state), device description (e.g., provide EDID (extended display identification data standard) data), and data communications (e.g., accept data, provide data).  
         [0035]     The hierarchy  300  also includes a graphic controller (e.g., UgaDtGraphicsController). Such a controller can perform functions (e.g., services) for the operating system and can also interact with other child computer components (e.g., devices). For example, one or more other devices  330  (e.g., UgaDtOther) can be logically and/or physically connected to the controller device  320 . An operating system can communicate through the parent device  310  to the graphics controller  320  and thus to the other device(s)  330 . Similarly, an operating system can communicate through the parent device  310  to the graphics controller  320  and thus to an output controller  340  or  350  (e.g., UgaDtOutputController). While one other device  330  and two output controllers  340  and  350  are illustrated, it is to be appreciated that a variety of combinations of such devices can be employed with the present invention. The output controller  340  could be connected with an actual output device (e.g., an output port  342  associated with a monitor) and the output controller  350  could be connected with another actual output device (e.g., an output port  344  associated with a television).  
         [0036]     The hierarchy  300 , an example of which is defined in the UGA firmware specification attached in Appendix A, thus facilitates operating system communications with actual output devices and physical and/or logical devices residing between the operating system and the actual device. In one example of the present invention, one or more of the computer components identified in the hierarchy  300  can be located on a video graphics adapter card. By way of illustration, a video graphics card could have two output ports, one for a television output and one for a computer monitor output. Such outputs could be operatively connected to output controllers that facilitate performing actions like identifying the capabilities of the output devices and performing power management for the devices. Similarly, the output controllers could be operatively connected to a graphics controller, which is in turn operatively connected to a bus that facilitates connecting the video graphics adapter card to a host system. Conventionally, individually accessing more than one physical and/or logical entity on a video graphics card via the VGA register interface was impractical, if possible at all. Thus, the UGA firmware interface provides advantages over conventional systems with respect to accessing multiple physical and/or logical devices located on one physical device.  
         [0037]     In view of the exemplary systems shown and described above, methodologies that are implemented in accordance with the present invention will be better appreciated with reference to the flow diagrams of  FIGS. 4 through 6 . While for purposes of simplicity of explanation, the illustrated methodologies are shown and described as a series of blocks, it is to be understood and appreciated that the present invention is not limited by the order of the blocks, as some blocks can, in accordance with the present invention, occur in different orders and/or concurrently with other blocks from that shown and described herein. Moreover, not all illustrated blocks may be required to implement a methodology in accordance with the present invention. Furthermore, additional and/or alternative methodologies can employ additional blocks, not illustrated herein. In one example of the present invention, such methodologies can be implemented as computer executable instructions and/or operations, which instructions and/or operations can be stored on computer readable media including, but not limited to an ASIC, a CD, a DVD, a RAM, a ROM, a PROM, an EEPROM, a disk, a carrier wave, and a memory stick.  
         [0038]     Turning now to  FIG. 4 , a method  400  for I/O service request dispatching is flow-charted. At  410 , a UGA client establishes a context that includes establishing information like, a device identity, a location and size of an input buffer, a location and size of an output buffer, and a request type. At  420 , a method (e.g., UgaHalDispatchService (Context, IoRequest) is called to begin dispatching the abstracted service through the layers of the UGA firmware interface. At  430 , a determination is made concerning whether the context established at  410  is valid and at  440  a determination is made concerning whether the requested I/O action is valid. If the determination at either  430  or  440  is NO, then processing proceeds to  450  where a status code is generated. But if the determinations  430  and  440  are YES, then processing proceeds to  460 .  
         [0039]     At  460 , a determination is made concerning whether there is UGA hardware available for the abstracted UGA service that has been requested. If the determination at  460  is NO, then there is no UGA hardware, and the abstracted UGA calls can be processed by emulation to interact with the VGA hardware that is available. But if the determination at  460  is YES, then at  470  the service is dispatched to the next lowest level in the UGA firmware interface. Similarly, at  480 , the service is dispatched to the next lowest level until, at  490  through  499 , the actual service routine is invoked. The service routines  490 , and  492  through  494  represent a set of services for a first UGA device. The service routines  496 , and  498  through  499  represent a set of services for a second UGA device. UGA devices implement a set of abstracted UGA services. Thus, UGA devices can appear like an abstracted hardware that implements an interface to a UGA client, which simplifies operating system to hardware communications and control. This abstraction contrasts directly with the conventional VGA register interface, where the operating system has to be aware of and implement the register interface for communications with VGA hardware.  
         [0040]     Thus, to invoke a UGA firmware method, a UGA client can call an entry point (e.g., UgaFwDispatchService) that is exported from UGA firmware supplying UGA device specific context and UGA I/O request blocks. The UGA device context is employed by the UGA firmware to identify a UGA device for which the I/O request is intended. The UGA client provides a memory storage for a UGA device context, a UGA I/O request block and input and output buffers associated with the UGA I/O request block. The UGA client populates a UGA I/O request block request code, and the location(s) and size(s) of input and/or output buffers. Upon successful completion of an I/O request, UGA firmware places the number of returned bytes into an I/O request block and can, based on UGA I/O request code and device context, fill the output buffer with the requested data. UGA firmware can return a status code indicating the status (e.g., success/failure) of the I/O request for each UGA I/O request.  
         [0041]     A UGA firmware runtime environment (e.g., system firmware, operating system) can implement a UGA Hardware Abstraction Layer (UGA HAL) to facilitate a common interface to UGA and non-UGA (e.g., VGA) display devices. Thus, a firmware client can assume that UGA firmware is available and for non-UGA devices, the UGA HAL facilitates translating UGA I/O requests from the UGA client and non-UGA (e.g., VGA, firewire, network) output device. Furthermore, firmware that is UGA specification compliant can be implemented for display controller devices that are not local. Remote display devices appear as a local display device to the UGA client, including the UGA HAL.  
         [0042]     Turning now to  FIG. 5 , a method  500  for negotiating output ranges is flow-charted. Output ranges are associated with what a display device can do. For example, a first display device may be able to display 640 by 480 @ 60 Hz while a second display device may be able to display  1280  by 1024 @ 80 Hz. If both display devices are associated with the same graphics controller, then the present invention can be employed to ascertain the intersection between the performance capabilities of the devices.  
         [0043]     At  510 , initial values are established. Such initial values can include, but are not limited to, establishing an index to the set of available devices and establishing a context for the output controller. At  520 , information concerning the capabilities of a device are read. For example, a UgaFwGetEdidSegment(context) call can be made to retrieve EDID data (e.g., 128 byte, 256 byte) descriptions of the capabilities of a device. Such EDID data can contain discrete values (e.g., for a device with one capability) and/or a range of values (e.g., for multi-capability devices). A determination at  530  is made concerning whether this is the first device read. If so, then a determination is made at  534  concerning whether the data read succeeded. If not, then a fatal error has occurred and processing proceeds to  540 . But if the read succeeded, then at  570 , the currently determined output ranges are established as the initial ranges read at  520 . If this was not the first read, then a determination is made at  532  concerning whether the read succeeded. If the read did not succeed, then processing continues at  580 , where the next potential device is identified and a context is established to facilitate reading description data from that next device. If the read did succeed, then processing continues at  550  where an intersection between previously determined ranges and the currently read range is performed. At  560 , a determination is made concerning whether the intersection computation has determined a new range. If so, then at  570 , the determined intersection ranges are updated and processing proceeds to  580 .  
         [0044]     At  585 , a determination is made concerning whether there is another device from which descriptive data is to be read. If the determination is YES, then processing proceeds to  520  where such descriptive data is read. If the determination is NO, then processing concludes and video modes that lie within the determined output ranges can safely be employed.  
         [0045]     Thus, system firmware and/or an operating system intersect display capabilities data returned for output controllers and output ports attached to the controllers. The intersections define video mode ranges that are supported by connected devices. Thus, a mode identified in the intersection can be set on an output controller and can be displayed on the output device attached to the output port attached to the output controller.  
         [0046]     Based, at least in part, on the EDID data returned for output ports and/or controllers, supported, intersected video mode ranges may contain discreet or contiguous sets of available modes. Thus, system firmware and/or an operating system can request a mode from the intersected ranges. Then the system firmware and/or operating system can invoke a UGA firmware video setting method (e.g., UgaFwSetVideoMode) on an output controller specifying device context, I/O request type and requested mode data (e.g., horizontal resolution, vertical resolution, color depth, refresh rate) and based on such information the UGA firmware can dispatch an I/O handler method for the I/O request and the UGA child device. The UGA firmware can employ, for example, a table driven algorithm that analyzes discrete mode ranges and/or a timing formula (e.g., VESA GTF) for contiguous and/or discreet mode ranges to program UGA hardware to set a requested mode.  
         [0047]      FIG. 6  illustrates a flow chart for a device enumeration method  600 . At  610 , a recursive enumeration method begins by acquiring data associated with an initial device (e.g., UgaDtParentBus). Given the initial data, at  620 , a context can be created to facilitate interacting with the device. Thus, at  630 , the context is employed to start the initial device via, for example, a UgaFwStartDevice call. At  640 , a determination is made concerning whether the device could be started. If not, then the context is set to the parent context at  670 . If the device could be started, then processing proceeds to  650  where an attempt to acquire data associated with a child device associated with the current device is made. For example, a UgaFwGetChildDevice call can be made to retrieve the child data. At  660 , a determination is made concerning whether child data was acquired. If the determination at  660  was NO, then, processing proceeds to  670  where the context is set to be the context of the parent device. But if the determination at  660  was YES, then processing returns to  620  where a context is created for the child device and the depth first traversal continues to search for children of this child device.  
         [0048]     At  680 , a determination is made concerning whether there was a valid parent context. If not, then the depth first traversal has completed. If so, then processing proceeds to  690  where the next iteration of the recursive enumeration is begun.  
         [0049]     Such a recursive enumeration method facilitates UGA firmware supporting a variety of devices. A UGA firmware specification can define a set of I/O services that are implemented in UGA firmware for enumerated UGA devices. Service types are associated with UGA I/O request codes and such I/O request codes can be added to a UGA firmware specification. The UGA firmware I/O model is designed to facilitate new I/O request codes and/or new device types being added to a UGA firmware specification while preserving compatibility between UGA clients, UGA runtime environments and UGA firmware.  
         [0050]     By employing a recursive enumeration method, UGA firmware supports one or more video child devices that include, but are not limited to, a parent bus, a graphics controller, an output controller, an output port and other device types. For enumerated UGA devices, the UGA firmware can provide an additional device descriptor data that can be interpreted by a system BIOS and IHV video driver, a standardized PnP identifier to support generic child device driver support and a device description string. UGA devices can be associated with a unique context or a shared context can be shared by UGA devices associated with a single UGA adapter.  
         [0051]     To enumerate UGA devices, system firmware and/or an operating system traverse a UGA device tree using, for example, a depth first traversal algorithm. UGA firmware method calls (e.g., UgaFwStartDevice, UgaFwGetChildDevice) can be invoked for the devices. In one example of the present invention, a device context creation method and a start method for a parent device are executed before child devices are enumerated and/or started.  
         [0052]     The system BIOS and/or operating system pass device context and I/O request types to UGA firmware which, based on the information, can dispatch an I/O handler method for the I/O request and UGA child device. By employing a recursive enumeration method, UGA firmware can support one or more output controllers and/or output ports. Such enumerated ports can be attached to a physical output device (e.g., CRTC monitor, flat panel, television). For enumerated output ports, the system firmware and/or operating system invokes a data acquisition method, (e.g., UgaFwGetEdidSegment) specifying a device context and I/O request type. Based on such information, the UGA firmware dispatches an I/O handler method for the I/O request and the UGA child device. The UGA firmware then returns display identification and configuration data for the output device attached to the output port. Such information can be returned, for example, in the EDID format defined in the VESA (Video Electronics Standards Association), standard. The UGA firmware reads the EDID information from the output device by, for example, DDC (display data channel standard), and/or an implementation specific communication channel. The UGA firmware can, if the EDID data cannot be obtained from the output device, create an EDID.  
         [0053]     If the UGA firmware does not implement, or fails while employing a data acquisition method (e.g., UgaFwGetEdidSegment) for an output port device, then the UGA firmware implements a set of device channel I/O routines (e.g., UgaFwDeviceChannelOpen, UgaFwDeviceChannelRead, UgaFwDeviceChannelWrite, UgaFwDeviceChannelClose), which enable system firmware and/or an operating system to communicate directly with output devices over DDC or other implementation specific communication channels.  
         [0054]     Similar to processing for output ports, for enumerated output controllers the system firmware and/or operating system invokes a data acquisition method, (e.g., UgaFwGetEdidSegment) specifying a device context and I/O request type. Based on such information, the UGA firmware dispatches an I/O handler method for the I/O request and the UGA child device. The UGA firmware then returns display identification and configuration data for the output controller. Such information can be returned, for example, in the VESA EDID format. EDID data for output controller devices is provided by UGA firmware based on the hardware capabilities of the UGA display adapter. In one example of the present invention, the data acquisition method must be implemented in the UGA firmware for output controller devices.  
         [0055]     Concerning power management facilitated by the present invention, a top-down tree traversal can be employed for power up and a bottom-up tree traversal can be employed for power down. For devices, UGA firmware methods (e.g., UgaFwSetPowerState) can be invoked to probe a power state and cause power changes. Such methods can be vetoed, in which case power state setting methods previously invoked can be cancelled. The system firmware and/or operating system can pass device context, I/O request types, power request types, requested device states, and requested power states to UGA firmware. Thus, UGA devices can support multiple power states and UGA firmware can dispatch I/O handler methods for I/O requests and child devices related to such power state management.  
         [0056]     One example of the present invention implements UGA as an EFI (Extensible Firmware Interface) driver. Thus, an EFI-UGA Binding Protocol is attached hereto as Appendix B which is considered part of this patent application specification.  
         [0057]      FIG. 7  illustrates an operating system  700  interacting with a display device  710  and with its child devices  712  through  718 . Conventionally, a VGA system could not interact with such child devices  712  through  718 . UGA facilitates enumerating such child devices  712  through  718  through the UGA firmware interface and if the child devices  712  through  718  expose the UGA firmware interface, the operating system  700  can interact with them. Thus, one example of the UGA firmware can support a number of child devices of a variety of types and provide methods for enumerating such child devices, performing power management for such child devices, querying and controlling state for such child devices, setting display modes for such child devices and facilitating fundamental drawing operations.  
         [0058]     In order to provide additional context for various aspects of the present invention,  FIG. 8  and the following discussion are intended to provide a brief, general description of a suitable computing environment  810  in which the various aspects of the present invention may be implemented. While the invention has been described above in the general context of computer-executable components, instructions and/or operations that may run on one or more computers, those skilled in the art will recognize that the invention also may be implemented in combination with other program modules and/or as a combination of hardware and software. Generally, program modules include routines, programs, components, data structures, etc. that perform particular tasks or implement particular abstract data types. Moreover, those skilled in the art will appreciate that the inventive methods may be practiced with computer system configurations, including single-processor or multiprocessor computer systems, minicomputers, mainframe computers, personal computers, hand-held computing devices, microprocessor-based or programmable consumer electronics, and the like, each of which may be operatively coupled to one or more associated devices. The illustrated aspects of the invention may also be practiced in distributed computing environments where certain tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.  
         [0059]     With reference to  FIG. 8 , an exemplary environment  810  for implementing various aspects of the invention includes a computer  812 , the computer  812  including a processing unit  814 , a system memory  816  and a system bus  818 . The system bus  818  couples system components including, but not limited to the system memory  816  to the processing unit  814 . The processing unit  814  may be any of various processors. Dual microprocessors and other multi-processor architectures also can be employed as the processing unit  814 .  
         [0060]     The system bus  818  can be any of several types of bus structure including a memory bus or memory controller, a peripheral bus and a local bus using any of a variety of bus architectures. The system memory  822  includes read only memory (ROM)  820  and random access memory (RAM)  822 . A basic input/output system (BIOS), containing the basic routines that help to transfer information between elements within the computer  812 , such as during start-up, is stored in ROM  820 . The BIOS can include, for example, the UGA firmware.  
         [0061]     The computer  812  further includes a hard disk drive  824 , a magnetic disk drive  826 , (e.g., to read from or write to a removable disk  828 ) and an optical disk drive  830 , (e.g., for reading a CD-ROM disk  832  or to read from or write to other optical media). The hard disk drive  824 , magnetic disk drive  826  and optical disk drive  830  can be connected to the system bus  818  by a hard disk drive interface  834 , a magnetic disk drive interface  836  and an optical drive interface  838 , respectively. The drives and their associated computer-readable media provide nonvolatile storage of data, data structures, computer components, computer-executable instructions, etc. for the computer  812 . Although the description of computer-readable media above refers to a hard disk, a removable magnetic disk and a CD, it should be appreciated that other types of media that are readable by a computer, such as zip drives, magnetic cassettes, flash memory cards, digital video disks, cartridges, ASICs, and the like, may also be used in the exemplary operating environment, and further that any such media may contain computer-executable instructions for performing the methods of the present invention.  
         [0062]     A number of program modules can be stored in the drives and RAM  822 , including an operating system  840 , one or more application programs  842 , other program modules  844  and program data  846 . It is to be appreciated that the present invention can be implemented with various operating systems or combinations of operating systems.  
         [0063]     A user can enter commands and information into the computer  812  through a keyboard  848  and a pointing device, such as a mouse  850 . Other input devices (not shown) may include a microphone, an IR remote control, a joystick, a game pad, a satellite dish, a scanner, or the like. These and other input devices are often connected to the processing unit  814  through a serial port interface  852  that is coupled to the system bus  818 , but may be connected by other interfaces, such as a parallel port, a game port, a universal serial bus (“USB”), an IR (infrared) interface, etc. A monitor  854  or other type of display device is also connected to the system bus  818  via an interface, such as a video adapter  856 . In addition to the monitor, a computer typically includes other peripheral output devices (not shown), such as speakers, printers etc.  
         [0064]     The computer  812  may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer(s)  858 . The remote computer(s)  858  may be a workstation, a server computer, a router, a personal computer, microprocessor based entertainment appliance, a peer device or other common network node, and typically includes many or all of the elements described relative to the computer  812 , although, for purposes of brevity, only a memory storage device  860  is illustrated. The logical connections depicted include a local area network (LAN)  862  and a wide area network (WAN)  864 . Such networking environments are commonplace in offices, enterprise-wide computer networks, intranets and the Internet.  
         [0065]     When used in a LAN environment, the computer  812  is connected to the local network  862  through a network interface or adapter  866 . When used in a WAN environment, the computer  812  typically includes a modem  868 , or is connected to a communications server on the LAN, or has other means for establishing communications over the WAN  864 , such as the Internet. The modem  868 , which may be internal or external, is connected to the system bus  818  via the serial port interface  852 . In a networked environment, program modules depicted relative to the computer  812 , or portions thereof, may be stored in the remote memory storage device  860 . It will be appreciated that the network connections shown are exemplary and other means of establishing a communications link between the computers may be used.  
         [0066]      FIG. 9  illustrates an option ROM in which multiple video adapter images are stored. For example, a first image can support a legacy ×86 video BIOS while a second image can support a UGA BIOS. To support the UGA BIOS, the second image can include a firmware specific binding (e.g., EFI to UGA) that facilitates UGA firmware byte code interacting with a runtime environment. The second image can also include a runtime support library binding that facilitates interfacing the system firmware binding and the UGA firmware services dispatch. The UGA firmware services dispatch receive calls intended for a UGA device, identify the device to which a user desires to talk and what service the user desires to have performed. The dispatcher calls the appropriate method in the UGA firmware services. Thus, the ability to store multiple images in an option ROM facilitates concurrent support for legacy systems and UGA systems providing interoperability improvements over conventional systems.  
         [0067]     What has been described above includes examples of the present invention. It is of course, not possible to describe every conceivable combination of components or methodologies for purposes of describing the present invention, but one of ordinary skill in the art may recognize that many further combinations and permutations of the present invention are possible. Accordingly, the present invention is intended to embrace all such alterations, modifications and variations that fall within the spirit and scope of the appended claims. Furthermore, to the extent that the term “includes” is used in either the detailed description or the claims, such term is intended to be inclusive in a manner similar to the term “comprising”, as comprising is interpreted as a transitional word in a claim.  
       APPENDIX A  
       [0000]     UGA  
         [0000]     Universal Graphics Adapter  
         [0000]     Firmware Interface Specification  
         [0000]     Part 1  
         [0000]     1.1 UGA Interface Naming Convention  
         [0068]     UgaFwXxxx—methods exported by UGA firmware to system firmware and operating system and UGA IO request handlers.  
         [0069]     VmlXxxx—methods exported by Virtual Machine (VM) to UGA firmware via UGAVMXXX.LIB I/O library. Note: I in the prefix is a lower case L.  
         [0000]     Part 2  
         [0000]     UGA Firmware Interface  
         [0070]     UGA firmware interface is exposed from UGA firmware. The system firmware and UGA HAL driver use this interface to perform basic operations with UGA hardware. This layer replaces legacy video BIOS.  
         [0000]     2.1 UGA Firmware Interface—Constants and Data Types  
         [0000]    
       
         
           
              UGA_DATA_WIDTH  
              UGA_DEVICE_ID  
              UGA_DEVICE_STATE  
              UGA_DEVICE_TYPE  
              UGA_IOREQUEST_CODE  
              UGA_MEMORY_CACHING_TYPE  
              UGA_MEMORY_TRANSFER_TYPE  
              UGA_PHYSICAL_ADDRESS  
              UGA_POWER_REQUEST_TYPE  
              UGA_POWER_STATE_DEVICE  
              UGA_POWER_STATE_SYSTEM  
              UGA_STATUS  
              UGA_VERSION_NUMBER  
           
         
       
     
         [0084]     UGA_DATA_WIDTH  
                                                                       typedef enum _UGA_DATA_WIDTH           {                UgaDwInt8 = 1,           UgaDwInt16,           UgaDwInt32,           UgaDwInt64                } UGA_DATA_WIDTH, *PUGA_DATA_WIDTH;                      
 
 UGA_DEVICE_ID 
        typedef UINT32 UGA_DEVICE_ID, *PUGA_DEVICE_ID;        
 
         [0086]     UGA_DEVICE_PROPERTY  
                                                   typedef enum _UGA_DEVICE_PROPERTY       {                UgaDpType = 1,           UgaDpId,           UgaDpAcpiId,           UgaDpPnpId,           UgaDpDescription,           UgaDpManufacturer,           UgaDpPrivateData = 0x10000            } UGA_DEVICE_PROPERTY, *PUGA_DEVICE_PROPERTY;                  
 
         [0087]     UgaDpPrivateData and higher property IDs are reserved for IHV specific properties only.  
         [0088]     UGA_DEVICE_STATE  
                                                                       typedef enum _UGA_DEVICE_STATE           {                IN UgaDsEnable = 1,           IN UgaDsDisable,           OUT UgaDsNotAvailable,           OUT UgaDsDisabled,           OUT UgaDsEnabled,           OUT UgaDsActive                } UGA_DEVICE_STATE, *PUGA_DEVICE_STATE;                      
 
         [0089]     UGA_DEVICE_TYPE  
                                                                       typedef enum _UGA_DEVICE_TYPE           {                UgaDtParentBus = 1,           UgaDtGraphicsController,           UgaDtOutputController,           UgaDtOutputPort,           UgaDtOther                } UGA_DEVICE_TYPE, *PUGA_DEVICE_TYPE;                      
 
         [0090]     UGA_IO_REQUEST_CODE  
                                                   typedef enum _UGA_IO_REQUEST_CODE       {                UgaIoGetVersion = 1,           UgaIoGetChildDevice,           UgaIoStartDevice,           UgaIoStopDevice,           UgaIoFlushDevice,           UgaIoResetDevice,           UgaIoGetDeviceState,           UgaIoSetDeviceState,           UgaIoSetPowerState,           UgaIoGetMemoryConfiguration,           UgaIoSetVideoMode,           UgaIoCopyRectangle,           UgaIoGetEdidSegment,           UgaIoDeviceChannelOpen,           UgaIoDeviceChannelClose,           UgaIoDeviceChannelRead,           UgaIoDeviceChannelWrite,           UgaIoGetPersistentDataSize,           UgaIoGetPersistentData,           UgaIoSetPersistentData,           UgaIoGetDevicePropertySize,           UgaIoGetDeviceProperty,           UgaIoBtPrivateInterface            } UGA_IO_REQUEST_CODE, *PUGA_IO_REQUEST_CODE;                  
 
         [0091]     UGA_MEMORY_CACHING_TYPE  
                                                                       typedef enum _UGA_MEMORY_CACHING_TYPE           {                UgaMcNonCached = 1,           UgaMcCached,           UgaMcWriteCombined                } UGA_MEMORY_CACHING_TYPE,           *PUGA_MEMORY_CACHING_TYPE;                      
 
         [0092]     UGA_MEMORY_TRANSFER_TYPE  
                                                                       typedef enum _UGA_MEMORY_TRANSFER_TYPE           {                UgaMtSystemToVideo = 1,           UgaMtVideoToSystem,           UgaMtVideoToVideo                } UGA_MEMORY_TRANSFER_TYPE,           *PUGA_MEMORY_TRANSFER_TYPE;                      
 
 UGA_PHYSICAL_ADDRESS 
        typedef UINT64 UGA_PHYSICAL_ADDRESS, *PUGA_PHYSICAL_ADDRESS;        
 
         [0094]     UGA_POWER_REQUEST_TYPE  
                                                                       typedef enum _UGA_POWER_REQUEST_TYPE           {                UgaPrProbe = 1,           UgaPrCommit,           UgaPrCancel                } UGA_POWER_REQUEST_TYPE,           *PUGA_POWER_REQUEST_TYPE;                      
 
         [0095]     UGA_POWER_STATE_DEVICE  
                                                                       typedef enum _UGA_POWER_STATE_DEVICE           {                UgaPsD0 = 1,           UgaPsD1,           UgaPsD2,           UgaPsD3                } UGA_POWER_STATE_DEVICE,           *PUGA_POWER_STATE_DEVICE;                      
 
         [0096]     UGA_POWER_STATE_SYSTEM  
                                                                       typedef enum _UGA_POWER_STATE_SYSTEM           {                UgaPsS0 = 1,           UgaPsS1,           UgaPsS2,           UgaPsS3,           UgaPsS4,           UgaPsS5                } UGA_POWER_STATE_SYSTEM,           *PUGA_POWER_STATE_SYSTEM;                      
 
 UGA_STATUS 
        typedef UINT32 UGA_STATUS, *PUGA_STATUS;        
 
         [0098]     UGA_STATUS values are 32 bit values laid out as follows:  
                                       30-31   16-29   0-15                   Severity   Reserved   Status code                  
 
         [0099]     Severity bits are defined as follows: 
        00—Success     01—Informational     10—Warning     11—Error        
 
         [0104]     UGA_STATUS values are defined as follows: (TBD)  
                                       #define UGA_STATUS_SUCCESS   ((UGA_STATUS)0x00000000)       #define UGA_STATUS_INFORMATIONAL   ((UGA_STATUS)0x40000000)       #define UGA_STATUS_WARNING   ((UGA_STATUS)0x80000000)       #define UGA_STATUS_ERROR   ((UGA_STATUS)0xc0000000)       #define UGA_STATUS_INVALID_DEVICE   ((UGA_STATUS)(UGA_STATUS_ERROR | 0x00000001))       #define UGA_STATUS_INVALID_MODE   ((UGA_STATUS)(UGA_STATUS_ERROR | 0x00000002))       #define UGA_STATUS_INVALID_FUNCTION   ((UGA_STATUS)(UGA_STATUS_ERROR | 0x00000003))       #define UGA_STATUS_UNSUPPORTED   ((UGA_STATUS)(UGA_STATUS_ERROR | 0x00000004))       #define UGA_STATUS_OPERATION_FAILED   ((UGA_STATUS)(UGA_STATUS_ERROR | 0x00000005))       #define UGA_STATUS_DEVICE_BUSY   ((UGA_STATUS)(UGA_STATUS_ERROR | 0x00000006))       #define UGA_STATUS_INSUFFICIENT_BUFFER   ((UGA_STATUS)(UGA_STATUS_ERROR | 0x00000007))       #define UGA_STATUS_NO_MORE_DATA   ((UGA_STATUS)(UGA_STATUS_ERROR | 0x00000008))       #define UGA_STATUS_TIMEOUT   ((UGA_STATUS)(UGA_STATUS_ERROR | 0x00000009))       #define UGA_STATUS_INVALID_PARAMETER   ((UGA_STATUS)(UGA_STATUS_ERROR | 0x0000000a))       #define UGA_STATUS_OUT_OF_RESOURCES   ((UGA_STATUS)(UGA_STATUS_ERROR | 0x0000000b))                  
 
 UGA_VERSION_NUMBER 
        typedef UINT32 UGA_VERION_NUMBER, *PUGA_VERSION_NUMBER;        
 
         [0106]     UGA_VERSION_NUMBER values are 32 bit values laid out as follows:  
                                       16-31   8-15   0-7                   Reserved   Version major   Version minor                  
 
 2.2 UGA Firmware Interface—Data Structures 
        UGA_CHANNEL_TRANSFER     UGA_DEVICE     UGA_DEVICE_DATA     UGA_IO_REQUEST     UGA_MEMORY_CONFIGURATION     UGA_MEMORY_TRANSFER     UGA_POWER_REQUEST     UGA_VERSION     UGA_VIDEO_MODE     UGA_VM_VERSION        
 
         [0117]     UGA_CHANNEL_TRANSFER  
                                                   typedef struct _UGA_CHANNEL_TRANSFER       {                VOID UNALIGNED *pvBuffer;           UINT64 ui64Size;           BOOLEAN bEndOfTransfer;            } UGA_CHANNEL_TRANSFER, *PUGA_CHANNEL_TRANSFER;                  
 
         [0118]     UGA_CHANNEL_TRANSFER contains information required by the UGA firmware to perform data transfers between open device channel and memory buffer.  
         [0000]     Members  
         [0000]     pvBuffer  
         [0119]     Virtual pointer to the source or destination memory buffer for data send to or received from open device channel.  
         [0000]     ui64Size  
         [0120]     Size in bytes of the requested data transfer.  
         [0000]     bEndOfTransfer  
         [0121]     Specifies if UGA firmware should expect additional channel transfer request in the same direction to follow. FALSE indicates additional transfers are still pending, TRUE indicates last transfer in a batch.  
         [0122]     UGA_DEVICE  
                                                                       typedef struct _UGA_DEVICE           {                PVOID pvDeviceContext;           PVOID pvSharedContext;           PVOID pvRunTimeContext;           struct _UGA_DEVICE *pParentDevice;           PVOID pvBusIoServices;           PVOID pvStdIoServices;           UGA_DEVICE_DATA deviceData;                } UGA_DEVICE, *PUGA_DEVICE;                      
 
         [0123]     UGA_DEVICE specifies a device object associated with a device enumerated by UgaFwGetChildDevice. System firmware/operating system allocates UGA_DEVICE for each enumerated device. A pointer to this object is passed to UGA firmware methods. This is an opaque object—UGA firmware cannot dereference any of its fields directly—its layout may change without notice.  
         [0124]     UGA_DEVICE_DATA  
                                                                       typedef struct _UGA_DEVICE_DATA           {                UGA_DEVICE_TYPE deviceType;           UGA_DEVICE_ID deviceId;           UINT32 ui32DeviceContextSize;           UINT32 ui32SharedContextSize;                } UGA_DEVICE_DATA, *PUGA_DEVICE_DATA;                      
 
         [0125]     UGA_DEVICE_DATA specifies a device data returned by UgaFwGetChildDevice method.  
         [0000]     Members  
         [0000]     deviceType  
         [0126]     Specifies the type of device.  
         [0000]     deviceId  
         [0127]     Video IHV defined device Id.  
         [0000]     ui32DeviceContextSize  
         [0128]     Requested size in bytes of the context buffer allocated for enumerated UGA device. This buffer will be allocated by the system firmware/operating system. UGA firmware can use this buffer to store any runtime device specific information.  
         [0000]     ui32SharedContextSize  
         [0129]     Requested size in bytes of the shared context buffer allocated for the UGA adapter. This buffer will be allocated by the system firmware/operating system. UGA firmware can use this buffer to store any runtime device specific information.  
         [0130]     UGA_IO_REQUEST  
                                                                       typedef struct _UGA_IO_REQUEST           {                IN UGA_IO_REQUEST_CODE ioRequestCode;           IN PVOID pvInBuffer;           IN UINT64 ui64InBufferSize;           OUT PVOID pvOutBuffer;           IN UINT64 ui64OutBufferSize;           OUT UINT64 ui64BytesReturned;                } UGA_IO_REQUEST, *PUGA_IO_REQUEST;                      
 
         [0131]     UGA_MEMORY_CONFIGURATION  
                                                                       typedef struct _UGA_MEMORY_CONFIGURATION           {                UINT64 ui64VideoMemorySize;           UINT64 ui64PrimaryOffset;           UINT32 ui32PrimaryDelta;           UINT64 ui64OffScreenOffset;           UINT64 ui64OffScreenSize;           UINT32 ui32OffScreenAlignment;                } UGA_MEMORY_CONFIGURATION,           *PUGA_MEMORY_CONFIGURATION;                      
 
         [0132]     UGA_MEMORY_TRANSFER  
                                                                                                                                   typedef struct _UGA_MEMORY_TRANSFER       {                UGA_MEMORY_TRANSFER_TYPE transferType;           union           {                struct           {                UINT64 ui64Source;           UINT64 ui64Destination;                } videoToVideo;           struct           {                VOID UNALIGNED *pvSource;           UINT64 ui64Destination;                } systemToVideo;           struct           {                UINT64 ui64Source;           VOID UNALIGNED *pvDestination;                } videoToSystem;                };           INT32 i32Width;           INT32 i32Height;           INT32 i32SourceDelta;           INT32 i32DestinationDelta;           BOOLEAN bEndOfTransfer;            } UGA_MEMORY_TRANSFER, *PUGA_MEMORY_TRANSFER;                  
 
         [0133]     UGA_MEMORY_TRANSFER contains information required by the UGA firmware to perform memory data transfers.  
         [0000]     Members  
         [0000]     transferType  
         [0134]     Specifies the type of the transfer: UgaMtSystemToVideo, UgaMtVideoToSystem, or UgaMtVideoToVideo.  
         [0000]     pvSource  
         [0135]     Virtual pointer to the transfer source located in system memory.  
         [0000]     pvDestination  
         [0136]     Virtual pointer to the transfer destination located in system memory.  
         [0000]     ui64Source  
         [0137]     Offset from the beginning of the frame buffer of the transfer source located in video memory.  
         [0000]     ui64Destination  
         [0138]     Offset from the beginning of the frame buffer of the transfer destination located in video memory.  
         [0000]     i32Width  
         [0139]     Width of the transfer region in bytes.  
         [0000]     i32Height  
         [0140]     Height of the transfer region in lines.  
         [0000]     i32SourceDelta  
         [0141]     Number of bytes between starting points of two adjacent lines of the source transfer region.  
         [0000]     i32DestinationDelta  
         [0142]     Number of bytes between starting points of two adjacent lines of the destination transfer region.  
         [0000]     bEndOfTransfer  
         [0143]     Specifies if UGA firmware should expect additional calls to UgaFwCopyRectangle to follow. FALSE indicates pending additional transfers, TRUE indicates last transfer in a batch. UGA firmware can interpret value of TRUE as a hint to flush pixel cache lines if required.  
         [0144]     UGA_POWER_REQUEST  
                                                                       typedef struct _UGA_POWER_REQUEST           {                UGA_POWER_REQUEST_TYPE powerRequestType;           UGA_POWER_STATE_DEVICE powerStateDevice;           UGA_POWER_STATE_SYSTEM powerStateSystem;                } UGA_POWER_REQUEST, *PUGA_POWER_REQUEST;                      
 
         [0145]     UGA_VERSION  
                                                                       typedef struct _UGA_VERSION           {                UGA_VERSION_NUMBER vmUgaSpecificationVersion;           UGA_VERSION_NUMBER vmVirtualMachineVersion;           UGA_VERSION_NUMBER fwUgaSpecificationVersion;           UGA_VERSION_NUMBER fwFirmwareVersion;                } UGA_VERSION, *PUGA_VERSION;                      
 
         [0146]     UGA_VIDEO_MODE  
                                                                       typedef struct _UGA_VIDEO_MODE           {                UINT32 ui32HorizontalResolution;           UINT32 ui32VerticalResolution;           UINT32 ui32ColorDepth;           UINT32 ui32RefreshRate;                } UGA_VIDEO_MODE, *PUGA_VIDEO_MODE;                      
 
         [0147]     UGA_VM_VERSION  
                                                                       typedef struct _UGA_VM_VERSION           {                UGA_VERSION_NUMBER vmUgaSpecificationVersion;           UGA_VERSION_NUMBER vmVirtualMachineVersion;                } UGA_VM_VERSION, *PUGA_VM_VERSION;                      
 
 2.3 UGA Firmware Interface 
 
         [0148]     UGA firmware exports a single entry point to the external world (system firmware, operating system runtime). The exported entry point is called UgaFwDispatchService. UgaFwDispatchService is responsible for dispatching the UGA IO request to the proper handler within the UGA firmware, based on UGA device type and IO request type.  
         [0149]     UgaFwDispatchService is called with two arguments: PUGA_DEVICE pDevice and PUGA_IO_REQUEST pIoRequest. UgaFwDispatchService can determine the device type the request is intended for calling VM Library method VmlGetDeviceType(pDevice). UGA firmware cannot dereference directly any fields within UGA_DEVICE data structure—this is an opaque object and its internal layout may change in the future without notice.  
         [0150]     UGA Specification Version 1.0 defines following UGA device types: 
        UgaDtParentBus     UgaDtGraphicsController     UgaDtOutputController     UgaDtOutputPort     UgaDtOther  
                         
       
 
         [0156]     UGA_IO_REQUEST contains pointers to input and output buffers, lengths of both buffers, field to store a number of bytes returned by UGA firmware in the output buffer, and the IO request code in the UGA_IO_REQUEST.ioRequestCode field.  
         [0157]     TBD: Should we declare UGA_IO_REQUEST an opaque object as well and define methods to manipulate its fields? 
         [0158]     UGA Specification Version 1.0 defines following UGA IO request codes: 
        UgaIoGetVersion     UgaIoGetChildDevice     UgaIoStartDevice     UgaIoStopDevice     UgaIoFlushDevice     UgaIoResetDevice     UgaIoGetDeviceState     UgaIoSetDeviceState     UgaIoSetPowerState     UgaIoGetMemoryConfiguration     UgaIoSetVideoMode     UgaIoCopyRectangle     UgaIoGetEdidSegment     UgaIoDeviceChannelOpen     UgaIoDeviceChannelClose     UgaIoDeviceChannelRead     UgaIoDeviceChannelWrite     UgaIoGetPersistentDataSize     UgaIoGetPersistentData     UgaIoSetPersistentData     UgaIoGetDevicePropertySize     UgaIoGetDeviceProperty     UgaIoBtPrivateInterface        
 
         [0182]     For each UGA device UGA firmware will initially receive UgaIoStartDevice followed by UgaIoGetChildDevice IO requests, moving from the top to the bottom of the UGA device tree. Other IO requests will be received after devices have been enumerated and started. UgaDtParentBus is a special case—it is intended to seed UGA device enumeration process, and it will not be used for anything else than UgaIoGetVersion and UgaIoGetChildDevice.  
         [0183]     2.4.1 UGA Firmware Interface—Entry Point  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_API           UgaFwDispatchService(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0184]     UgaFwDispatchService is the only entry point exported from UGA firmware and it is used as the main UGA service dispatch routine.  
         [0185]     This is a required method.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0186]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0187]     Points to the UGA IO request packet.  
         [0000]     Return Value  
         [0188]     UGA firmware status code.  
         [0189]     2.4.2 UGA Firmware Interface—IO Request Handlers  
                                                       UgaFwBtPrivateInterface   Optional, boot time only           UgaFwCopyRectangle   Required           UgaFwDeviceChannelClose   Required*           UgaFwDeviceChannelOpen   Required*           UgaFwDeviceChannelRead   Required*           UgaFwDeviceChannelWrite   Required*           UgaFwFlushDevice   Required           UgaFwGetChildDevice   Required           UgaFwGetDeviceProperty   Required           UgaFwGetDevicePropertySize   Required           UgaFwGetDeviceState   Required           UgaFwGetEdidSegment   Required*           UgaFwGetMemoryConfiguration   Required           UgaFwGetPersistentData   Optional           UgaFwGetPersistentDataSize   Optional           UgaFwGetVersion   Optional           UgaFwResetDevice   Required           UgaFwSetDeviceState   Required           UgaFwSetPersistentData   Optional           UgaFwSetPowerState   Required           UgaFwSetVideoMode   Required           UgaFwStartDevice   Required           UgaFwStopDevice   Required                         *These methods may not be required for specific hardware configurations.             
 
         [0190]     UgaFwBtPrivateInterface  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwBtPrivateInterface(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0191]     UgaFwBtPrivateInterface provides a way to send OEM/IHV specific requests to the UGA firmware and to exchange free formatted data between the system and UGA firmware.  
         [0192]     This is an optional, boot time only, method.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0193]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0194]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0195]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0196]     IHV/OEM defined.  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0197]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0198]     IHV/OEM defined.  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0199]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0200]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0201]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0202]     UgaFwGetChildDevice, VmlBtPrivateInterface.  
         [0203]     UgaFwCopyRectangle  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwCopyRectangle(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0204]     UgaFwCopyRectangle copies data from video to video memory, from system to video memory, or from video to system memory.  
         [0205]     This is a required method.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0206]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0207]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0208]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0209]     Points to UGA_MEMORY_TRANSFER object.  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0210]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0211]     Unused.  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0212]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0213]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0214]     UGA firmware status code.  
         [0000]     Comments  
         [0215]     Bitmap translations between source and destination regions are not supported—both regions must use the same format. UGA 1.0 supports only 16 bpp as RGB 565 and 32 bpp as ×RGB.  
         [0000]     See Also  
         [0216]     UgaFwGetChildDevice.  
         [0217]     UgaFwDeviceChannelClose  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwDeviceChannelClose(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0218]     UgaFwDeviceChannelClose closes a communication channel with a slave device.  
         [0219]     This is a required method with the exception of OEM systems with built in non-PnP displays (e.g. laptops), which do not support external PnP display devices. For such OEM systems UgaFwGetEdidSegment method must be implemented.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0220]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0221]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0222]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0223]     Unused.  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0224]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0225]     Unused.  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0226]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0227]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0228]     UGA firmware status code.  
         [0000]     Comments  
         [0229]     UgaFwDeviceChannelClose is mainly intended for retrieving EDID data from display devices (flexible support for new EDID formats). Additionally, IHV driver writers can use this method to communicate with other video child devices.  
         [0000]     See Also  
         [0230]     UgaFwGetChildDevice, UgaFwDeviceChannelOpen, UgaFwDeviceChannelRead, UgaFwDeviceChannelWrite, UgaFwGetEdidSegment.  
         [0231]     UgaFwDeviceChannelOpen  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwDeviceChannelOpen(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0232]     UgaFwDeviceChannelOpen initiates communication with a slave device.  
         [0233]     This is a required method with the exception of OEM systems with built in non-PnP displays (e.g. laptops), which do not support external PnP display devices. For such OEM systems UgaFwGetEdidSegment method must be implemented.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0234]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0235]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0236]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0237]     Unused.  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0238]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0239]     Unused.  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0240]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0241]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0242]     UGA firmware status code.  
         [0000]     Comments  
         [0243]     UgaFwDeviceChannelOpen is mainly intended for retrieving EDID data from display devices (flexible support for new EDID formats). Additionally, IHV driver writers can use this method to communicate with other video child devices.  
         [0000]     See Also  
         [0244]     UgaFwGetChildDevice, UgaFwDeviceChannelRead, UgaFwDeviceChannelWrite, UgaFwDeviceChannelClose, UgaFwGetEdidSegment.  
         [0245]     UgaFwDeviceChannelRead  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwDeviceChannelRead(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0246]     UgaFwDeviceChannelRead reads a block of data from a slave device.  
         [0247]     This is a required method with the exception of OEM systems with built in non-PnP displays (e.g. laptops), which do not support external PnP display devices. For such OEM systems UgaFwGetEdidSegment method must be implemented.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0248]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0249]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0250]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0251]     Points to UGA_CHANNEL_TRANSFER object.  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0252]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0253]     Unused.  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0254]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0255]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0256]     UGA firmware status code.  
         [0000]     Comments  
         [0257]     UgaFwDeviceChannelRead is mainly intended for retrieving EDID data from display devices (flexible support for new EDID formats). Additionally, IHV driver writers can use this method to communicate with other video child devices.  
         [0000]     See Also  
         [0258]     UgaFwGetChildDevice, UgaFwDeviceChannelOpen, UgaFwDeviceChannelClose, UgaFwDeviceChannelWrite, UgaFwGetEdidSegment.  
         [0259]     UgaFwDeviceChannelWrite  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwDeviceChannelWrite(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0260]     UgaFwDeviceChannelWrite writes a block of data to a slave device.  
         [0261]     This is a required method with the exception of OEM systems with built in non-PnP displays (e.g. laptops), which do not support external PnP display devices. For such OEM systems UgaFwGetEdidSegment method must be implemented.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0262]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0263]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0264]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0265]     Points to UGA_CHANNEL_TRANSFER object.  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0266]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0267]     Unused.  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0268]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0269]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0270]     UGA firmware status code.  
         [0000]     Comments  
         [0271]     UgaFwDeviceChannelWrite is mainly intended for retrieving EDID data from display devices (flexible support for new EDID formats). Additionally, IHV driver writers can use this method to communicate with other video child devices.  
         [0000]     See Also  
         [0272]     UgaFwGetChildDevice, UgaFwDeviceChannelOpen, UgaFwDeviceChannelClose, UgaFwDeviceChannelRead, UgaFwGetEdidSegment.  
         [0273]     UgaFwFlushDevice  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwFlushDevice(           IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0274]     UgaFwFlushDevice is responsible for flushing any pending writes to hardware, making sure all DMA operations are completed, etc.  
         [0275]     This is a required method.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0276]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0277]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0278]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0279]     Unused.  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0280]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0281]     Unused.  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0282]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0283]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0284]     UGA firmware status code.  
         [0000]     Comments  
         [0285]     UGA hardware must remain fully idle upon return from this routine until some other UGA method is called—system firmware/OS may be touching PCI configuration space of this device.  
         [0000]     See Also  
         [0286]     UgaFwGetChildDevice.  
         [0287]     UgaFwGetChildDevice  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwGetChildDevice(                IN PUGA_DEVICE pDevice,           IN PUGA_TO_REQUEST pIoReguest           );                      
 
         [0288]     UgaFwGetChildDevice returns info about child device of device associated with pDevice device object.  
         [0289]     This is a required method.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0290]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0291]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0292]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0293]     Points to 0-based child index (UINT32 value).  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0294]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0295]     Points to UGA_DEVICE_DATA object.  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0296]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0297]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0298]     UGA firmware status code.  
         [0000]     Comments  
         [0299]     UgaFwGetChildDevice must report all devices, which are supported by UGA adapter, regardless if they are available or not at the time of enumeration. UgaFwGetDeviceState method will be used to determine a current state of devices on per-needed bases.  
         [0300]     Setting UGA_DEVICE_DATA.ui32SharedContextSize property to non-zero value tells the run-time environment to allocate shared context buffer of given size, associate it with currently enumerated device, and point all subsequently enumerated devices to the same buffer as long as enumeration returns zero as shared context size for those devices. In general shared context size should be set to non-zero value only for the root device and to zero for all subsequently enumerated devices.  
         [0301]     Additional information about UGA devices can be obtained using UgaFwGetDevicePropertySize and UgaFwGetDeviceProperty methods.  
         [0000]     See Also  
         [0302]     UgaFwGetDeviceState, UgaFwGetDevicePropertySize, UgaFwGetDeviceProperty.  
         [0303]     UgaFwGetDeviceProperty  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwGetDeviceProperty(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0304]     UgaFwGetDeviceProperty returns static information about a device.  
         [0305]     This is a required method.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0306]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0307]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0308]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0309]     Points to UGA_DEVICE_PROPERTY object.  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0310]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0311]     Points to storage for device property data.  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0312]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0313]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0314]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0315]     UgaFwGetChildDevice, UgaFwGetDevicePropertySize.  
         [0316]     UgaFwGetDevicePropertySize  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwGetDevicePropertySize(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0317]     UgaFwGetDevicePropertySize returns size of static information about a device.  
         [0318]     This is a required method.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0319]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0320]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0321]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0322]     Points to UGA_DEVICE_PROPERTY object.  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0323]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0324]     Points to storage for size of device property (UINT64).  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0325]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0326]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0327]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0328]     UgaFwGetChildDevice, UgaFwGetDeviceProperty.  
         [0329]     UgaFwGetDeviceState  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwGetDeviceState(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0330]     UgaFwGetDeviceState returns the current state of a device associated with a device object.  
         [0331]     This is a required method.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0332]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0333]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0334]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0335]     Unused.  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0336]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0337]     Points to UGA_DEVICE_STATE object.  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0338]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0339]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0340]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0341]     UgaFwGetChildDevice, UgaFwSetDeviceState.  
         [0342]     UgaFwGetEdidSegment  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwGetEdidSegment(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0343]     UgaFwGetEdidSegment returns EDID data for a device.  
         [0344]     This is a required method.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0345]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0346]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0347]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0348]     Points to EDID segment number (UINT32).  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0349]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0350]     Points to storage for EDID segment data.  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0351]     Size of output buffer in bytes (UGA_MAX_EDID_SEGMENT_LENGTH).  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0352]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0353]     UGA firmware status code.  
         [0000]     Comments  
         [0354]     This method will be used for enumerated UgaDtOutputController and UgaDtOutputPort devices.  
         [0355]     For UgaDtOutputController devices UgaFwGetEdidSegment returns capabilities of individual output controllers, i.e. capabilities of the video adapter itself.  
         [0356]     This method can fail if UGA firmware provides I2C methods for given UgaDtOutputPort device and EDID for that device is accessible via I2C protocol. This method must always succeed for UgaDtOutputController devices, and for UgaDtOutputPort devices not supporting I2C protocol by default (e.g. TV, some laptop flat panel displays).  
         [0357]     This method can fail for EDID-less legacy monitors.  
         [0000]     See Also  
         [0358]     UgaFwGetChildDevice.  
         [0359]     UgaFwGetMemoryConfiguration  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwGetMemoryConfiguration(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0360]     UgaFwGetVideoMemoryConfiguration returns video memory configuration data.  
         [0361]     This is a required method.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0362]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0363]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0364]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0365]     Unused.  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0366]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0367]     Points to UGA_MEMORY_CONFIGURATION object.  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0368]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0369]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0370]     UGA firmware status code.  
         [0000]     Comments  
         [0371]     This method will be called for enumerated UgaDtOutputController devices.  
         [0372]     Video memory configuration data varies based on currently selected video mode. UgaFwGetMemoryConfiguration will be typically called after UgaFwSetVideoMode call.  
         [0000]     See Also  
         [0373]     UgaFwGetChildDevice, UgaFwSetVideoMode.  
         [0374]     UgaFwGetPersistentData  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwGetPersistentData(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0375]     UgaFwGetPersistentData returns a free formatted, IHV defined, device configuration data. This data is stored by a system firmware on a non-volatile media and it is persistent over a reboot.  
         [0376]     This is an optional method.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0377]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0378]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0379]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0380]     Points to number of bytes to read (UINT64).  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0381]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0382]     Points to storage for read data.  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0383]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0384]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0385]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0386]     UgaFwGetChildDevice, UgaFwGetPersistentDataSize, UgaFwSetPersistentData.  
         [0387]     UgaFwGetPersistentDataSize  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwGetPersistentDataSize(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0388]     UgaFwGetPersistentDataSize returns a size in bytes of a persistent storage area available for UGA device. A persistent storage area for a device is provided by a system firmware and hardware.  
         [0389]     This is an optional method.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0390]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0391]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0392]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0393]     Unused.  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0394]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0395]     Points to size of persistent data buffer (UINT64).  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0396]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0397]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0398]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0399]     UgaFwGetChildDevice, UgaFwGetPersistentData, UgaFwSetPersistentData.  
         [0400]     UgaFwGetVersion  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwGetVersion(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0401]     UgaFwGetVersion returns version information.  
         [0402]     This is a required method.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0403]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0404]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0405]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0406]     Unused.  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0407]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0408]     Points to UGA_VERSION object.  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0409]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0410]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0411]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0412]     UgaFwGetChildDevice.  
         [0413]     UgaFwResetDevice  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwResetDevice(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0414]     UgaFwResetDevice resets a device to the initial state.  
         [0415]     This is a required method.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0416]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0417]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0418]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0419]     Unused.  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0420]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0421]     Unused.  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0422]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0423]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0424]     UGA firmware status code.  
         [0000]     Comments  
         [0425]     This method cannot fail for UgaDtGraphicsController and UgaDtOutputController devices—it must reset those devices to the initial state where any other UGA method can be used, especially UgaFwSetVideoMode. UgaFwResetDevice will be used by the operating system in the case of emergency.  
         [0000]     See Also  
         [0426]     UgaFwGetChildDevice.  
         [0427]     UgaFwSetDeviceState  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwSetDeviceState(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0428]     UgaFwSetDeviceState sets a current state of a child device to enabled or disabled.  
         [0429]     This is a required method.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0430]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0431]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0432]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0433]     Points to UGA_DEVICE_STATE object.  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0434]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0435]     Unused.  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0436]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0437]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0438]     UGA firmware status code.  
         [0000]     Comments  
         [0439]     To determine an actual state of a device at any time a call to UgaFwGetDeviceState must be issued. Caller should not make any assumptions about current device state based on device state value passed to UgaFwSetDeviceState.  
         [0440]     If UgaFwSetDeviceState is called for UgaDtOutputController and UgaDtOutputPort devices then UGA firmware should expect UgaFwSetVideoMode call to follow, i.e. UGA firmware should not set video mode on its own even if this is required to complete a set state request.  
         [0000]     See Also  
         [0441]     UgaFwGetChildDevice, UgaFwGetDeviceState.  
         [0442]     UgaFwSetPersistentData  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwSetPersistentData(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0443]     UgaFwSetPersistentData writes a free formatted, IHV defined, device configuration data. This data is stored by a system firmware on a non-volatile media and it is persistent over a reboot.  
         [0444]     This is an optional method.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0445]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0446]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0447]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0448]     Points to data to write.  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0449]     Size of input buffer in bytes (number of bytes to write).  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0450]     Points to number of bytes written (UINT64).  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0451]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0452]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0453]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0454]     UgaFwGetChildDevice, UgaFwGetPersistentDataSize, UgaFwGetPersistentData.  
         [0455]     UgaFwSetPowerState  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwSetPowerState(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0456]     UgaFwSetPowerState probes if OK to set, cancels probe, or sets (commits probed) device power state.  
         [0457]     This is a required method.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0458]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0459]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0460]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0461]     Points to UGA_POWER_REQUEST object.  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0462]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0463]     Unused.  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0464]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0465]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0466]     UGA firmware status code.  
         [0000]     Comments  
         [0467]     The device must remain idle between UgaPrProbe and UgaPrCommit or UgaPrCancel requests. This method cannot fail UgaPrCommit request.  
         [0000]     See Also  
         [0468]     UgaFwGetChildDevice.  
         [0469]     UgaFwSetVideoMode  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwSetVideoMode(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0470]     UgaFwSetVideoMode sets video mode.  
         [0471]     This is a required method.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0472]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0473]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0474]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0475]     Points to UGA_VIDEO_MODE object.  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0476]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0477]     Unused.  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0478]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0479]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0480]     UGA firmware status code.  
         [0000]     Comments  
         [0481]     This method is used for enumerated UgaDtOutputController devices.  
         [0482]     Required pixel depths and color ordering (little endian): 
        16 bpp—RGB 565     32 bpp—×RGB        
 
         [0485]     For add-in UGA adapters 800×600×32 bpp at 60 Hz must be supported. This mode is optional for integrated video implementations.  
         [0000]     See Also  
         [0486]     UgaFwGetChildDevice, UgaFwGetEdidSegment.  
         [0487]     UgaFwStartDevice  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwStartDevice(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0488]     UgaFwStartDevice powers on and initializes device associated with device object to the state when other UGA firmware methods can be used with that device.  
         [0489]     This is a required method.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0490]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0491]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0492]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0493]     Unused.  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0494]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0495]     Unused.  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0496]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0497]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0498]     UGA firmware status code.  
         [0000]     Comments  
         [0499]     UgaFwStartDevice code in not discardable! It is used by the firmware during the POST/INIT faze of boot process, but it may be used by the OS at any other time as well, e.g. during multi-monitor initialization or during the power management cycles.  
         [0000]     See Also  
         [0500]     UgaFwGetChildDevice.  
         [0501]     UgaFwStopDevice  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_SERVICE           UgaFwStopDevice(                IN PUGA_DEVICE pDevice,           IN PUGA_IO_REQUEST pIoRequest           );                      
 
         [0502]     UgaFwStopDevice stops UGA device. It is responsible for cleaning up all resources associated with pDevice—pDevice will be gone! 
         [0503]     This is a required method.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0504]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0505]     Points to the UGA IO request packet.  
         [0000]     pIoRequest-&gt;ioRequestCode  
         [0506]     UGA IO request code.  
         [0000]     pIoRequest-&gt;pvInBuffer  
         [0507]     Unused.  
         [0000]     pIoRequest-&gt;ui64InBufferSize  
         [0508]     Size of input buffer in bytes.  
         [0000]     pIoRequest-&gt;pvOutBuffer  
         [0509]     Unused.  
         [0000]     pIoRequest-&gt;ui64OutBufferSize  
         [0510]     Size of output buffer in bytes.  
         [0000]     pIoRequest-&gt;ui64BytesReturned  
         [0511]     On return number of bytes in output buffer.  
         [0000]     Return Value  
         [0512]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0513]     UgaFwGetChildDevice.  
         [0000]     Part 3  
         [0000]     Virtual Machine Interface  
         [0514]     Virtual machine interface is exposed by the system firmware (boot time) and by the operating system (run time). UGA firmware uses this interface to request basic services from its run environment. The UGA-VM stub is included as a part of UGA/VMXXX.LIB static library that UGA firmware code is linked with.  
         [0000]     3.1 Virtual Machine Interface—Constants and Data Types  
         [0000]    
       
         
           
              UGA_FW_CALL_TYPE_API  
              UGA_FW_CALL_TYPE_SERVICE  
              UGA_FW_CALL_TYPE_VML  
              UGA_FW_I2C_READ_CLOCK_LINE  
              UGA_FW_I2C_READ_DATA_LINE  
              UGA_FW_I2C_WRITE_CLOCK_LINE  
              UGA_FW_I2C_WRITE_DATA_LINE  
              UGA_FW_I2C_CONTROL  
              UGA_FW_SERVICE  
              UGA_FW_SERVICE_DISPATCH  
              UGA_FW_CALL_TYPE_XXXX  
              #define UGA_FW_CALL_TYPE_API  
              #define UGA_FW_CALL_TYPE_SERVICE  
              #define UGA_FW_CALL_TYPE_VML  
           
         
       
     
         [0529]     UGA_FW_I2C_READ_CLOCK_LINE  
                                                             typedef           UGA_STATUS           (*PUGA_FW_I2C_READ_CLOCK_LINE)(                IN PUGA_DEVICE pDevice,           OUT PUINT8 pui8Data           );                      
 
         [0530]     UGA_FW_I2C_READ DATA_LINE  
                                                             typedef           UGA_STATUS           (*PUGA_FW_I2C_READ_DATA_LINE)(                IN PUGA_DEVICE pDevice,           OUT PUINT8 pui8Data           );                      
 
         [0531]     UGA_FW_I2C_WRITE_CLOCK_LINE  
                                                             typedef           UGA_STATUS           (*PUGA_FW_I2C_WRITE_CLOCK_LINE)(                IN PUGA_DEVICE pDevice,           OUT PUINT8 pui8Data           );                      
 
         [0532]     UGA_FW_I2C_WRITE_DATA_LINE  
                                                             typedef           UGA_STATUS           (*PUGA_FW_I2C_WRITE_DATA_LINE)(                IN PUGA_DEVICE pDevice,           OUT PUINT8 pui8Data           );                      
 
         [0533]     UGA_FW_I2C_CONTROL  
                                                   typedef struct _UGA_FW_I2C_CONTROL       {                PUGA_FW_I2C_READ_CLOCK_LINE pfnI2cReadClockLine;           PUGA_FW_I2C_READ_DATA_LINE pfnI2cReadDataLine;           PUGA_FW_I2C_WRITE_CLOCK_LINE pfnI2cWriteClockLine;           PUGA_FW_I2C_WRITE_DATA_LINE pfnI2cWriteDataLine;           UINT32 ui32I2cDelay;     // 100ns units            } UGA_FW_I2C_CONTROL, *PUGA_FW_I2C_CONTROL;                  
 
         [0534]     UGA_FW_SERVICE  
                                                             typedef           UGA_STATUS           (UGA_FW_CALL_TYPE_SERVICE *PUGA_FW_SERVICE)(                IN PUGA_DEVICE pDevice,           IN OUT PUGA_IO_REQUEST pIoRequest           );                      
 
         [0535]     UGA_FW_SERVICE_DISPATCH  
                                                   typedef           UGA_STATUS           (UGA_FW_CALL_TYPE_API           *PUGA_FW_SERVICE_DISPATCH)(            IN PUGA_DEVICE pDevice,            IN OUT PUGA_IO_REQUEST pIoRequest            );                      
 
 3.3 Virtual Machine Interface—Methods 
        VmlBtPrivateInterface     VmlCopySystemMemory     VmlGetDeviceContext     VmlGetDeviceId     VmlGetDeviceType     VmlGetParentDevice     VmlGetPersistentData     VmlGetPersistentDataSize     VmlGetSharedContext     VmlGetTimeStamp     VmlGetVersion     VmlI2cGetEdidSegment     VmlI2cRead     VmlI2cStart     VmlI2cStop     VmlI2cWrite     VmlPciAllocateCommonBuffer     VmlPciCopyDeviceMemory     VmlPciFlush     VmlPciFreeCommonBuffer     VmlPciGetRomImage     VmlPciLockSystemMemory     VmlPciMapDeviceIoSpace     VmlPciMapDeviceMemory     VmlPciPollDeviceIoPort     VmlPciPollDeviceMemory     VmlPciReadConfigurationSpace     VmlPciReadDeviceIoPort     VmlPciReadDeviceMemory     VmlPciUnlockSystemMemory     VmlPciUnmapDeviceIoSpace     VmlPciUnmapDeviceMemory     VmlPciWriteConfigurationSpace     VmlPciWriteDeviceIoPort     VmlPciWriteDeviceMemory     VmlSetPersistentData     VmlSleep        
 
         [0573]     VmlBtPrivateInterface  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlBtPrivateInterface(            IN PUGA_DEVICE pDevice,            IN PVOID pvInBuffer,            IN UINT64 ui64InBufferSize,            OUT PVOID pvOutBuffer,            IN UINT64 ui64OutBufferSize,            OUT PUINT64 pui64BytesReturned            );                      
 
         [0574]     VmlBtPrivateInterface provides a way to send OEM/IHV specific requests to the system firmware and to exchange free formatted data between the UGA and system firmware. This method is available only at the boot time and is not exported from the VM at the OS run time.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0575]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pIoRequest  
         [0576]     Points to the UGA IO request packet.  
         [0000]     pvInBuffer  
         [0577]     IHV/OEM defined.  
         [0000]     ui64InBufferSize  
         [0578]     Size of input buffer in bytes.  
         [0000]     pvOutBuffer  
         [0579]     IHV/OEM defined.  
         [0000]     ui64OutBufferSize  
         [0580]     Size of output buffer in bytes.  
         [0000]     pui64BytesReturned  
         [0581]     On return points to number of bytes in output buffer.  
         [0000]     Return Value  
         [0582]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0583]     UgaFwGetChildDevice, UgaFwBtPrivateInterface.  
         [0584]     VmlCopySystemMemory  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlCopySystemMemory(            IN PUGA_DEVICE pDevice,            OUT VOID UNALIGNED *pvDestination,            IN VOID UNALIGNED *pvSource,            IN UINT64 ui64Length            );                      
 
         [0585]     VmlCopySystemMemory copies data from the source location in the system memory to the destination location in the system memory.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0586]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pvDestination  
         [0587]     Points to the destination location in the system memory.  
         [0000]     pvSource  
         [0588]     Points to the location in the system memory of the data to copy.  
         [0000]     ui64Length  
         [0589]     Specifies the number of bytes to copy.  
         [0000]     Return Value  
         [0590]     UGA firmware status code.  
         [0000]     Comments  
         [0591]     pvDestination and pvSource must point to the addresses in the system memory. This function cannot be used to access device physical memory. Source+Length cannot overlap Destination.  
         [0000]     See Also  
         [0592]     UgaFwGetChildDevice, VmlPciAllocateCommonBuffer, VmlPciMapSystemMemory, VmlPciReadDeviceMemory, VmlPciWriteDeviceMemory.  
         [0593]     VmlGetDeviceContext  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlGetDeviceContext(            IN PUGA_DEVICE pDevice,            OUT PVOID *ppvDeviceContext            );                      
 
         [0594]     VmlGetDeviceContext returns a pointer to IHV defined device specific context associated with a device object pointed by pDevice.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0595]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     ppvDeviceContext  
         [0596]     Points to the storage for a pointer to the device context.  
         [0000]     Return Value  
         [0597]     UGA firmware status code.  
         [0000]     Comments  
         [0598]     UGA firmware specifies the size of the device context for each enumerated UGA device in the UgaFwGetChildDevice handler of the parent device. The device context size of the child device is returned in the UGA_DEVICE_DATA.ui32DeviceContextSize field.  
         [0000]     See Also  
         [0599]     UgaFwGetChildDevice, VmlGetSharedContext.  
         [0600]     VmlGetDeviceId  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlGetDeviceId(            IN PUGA_DEVICE pDevice,            OUT PUGA_DEVICE_ID pDeviceId            );                      
 
         [0601]     VmlGetDeviceId returns IHV defined device specific device ID associated with a device object pointed by pDevice.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0602]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pDeviceId  
         [0603]     Points to the storage for the device ID value.  
         [0000]     Return Value  
         [0604]     UGA firmware status code.  
         [0000]     Comments  
         [0605]     UGA firmware specifies device ID for each enumerated UGA device in the UgaFwGetChildDevice handler of the parent device. The device ID value for the child device is returned in the UGA_DEVICE_DATA.deviceId field.  
         [0000]     See Also  
         [0606]     UgaFwGetChildDevice, VmlGetDeviceType.  
         [0607]     VmlGetDeviceType  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlGetDeviceType(            IN PUGA_DEVICE pDevice,            OUT PUGA_DEVICE_TYPE pDeviceType            );                      
 
         [0608]     VmlGetDeviceType returns device type associated with a device object pointed by pDevice.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0609]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pDeviceType  
         [0610]     Points to the storage for the device type value.  
         [0000]     Return Value  
         [0611]     UGA firmware status code.  
         [0000]     Comments  
         [0612]     UGA firmware specifies device type for each enumerated UGA device in the UgaFwGetChildDevice handler of the parent device. The device type value for the child device is returned in the UGA_DEVICE_DATA.deviceType field.  
         [0000]     See Also  
         [0613]     UgaFwGetChildDevice, VmlGetDeviceId.  
         [0614]     VmlGetParentDevice  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlGetParentDevice(            IN PUGA_DEVICE pDevice,            OUT PUGA_DEVICE *ppParentDevice            );                      
 
         [0615]     VmlGetParentDevice returns a pointer to the parent device object of the device associated with a device object pointed by pDevice.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0616]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     ppParentDevice  
         [0617]     Points to the storage for a pointer to the parent device object.  
         [0000]     Return Value  
         [0618]     UGA firmware status code.  
         [0000]     Comments  
         [0619]     UGA runtime environment maintains a link to the parent device only. UGA firmware itself can maintain links to child devices in device context if needed (using VmlGetParentDevice and VmlGetDeviceContext for parent device in UgaFwStartDevice handler for example).  
         [0000]     See Also  
         [0620]     UgaFwGetChildDevice, UgaFwStartDevice, VmlGetDeviceContext, VmlGetParentDevice.  
         [0621]     VmlGetPersistentData  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlGetPersistentData(            IN PUGA_DEVICE pDevice,            OUT VOID UNALIGNED *pvBuffer,            IN UINT32 ui32Offset,            IN UINT32 ui32Length            );                      
 
         [0622]     VmlGetPersistentData returns a free formatted, IHV/OEM defined, device configuration data. This data is stored by a system firmware on a non-volatile media and it is persistent over a reboot.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0623]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pvBuffer  
         [0624]     On return contains the data read from a persistent storage area for a device.  
         [0000]     ui32Offset  
         [0625]     Specifies an offset in bytes from a beginning of a persistent storage area for a device.  
         [0000]     ui32Length  
         [0626]     Specifies length in bytes of the data to be read from a persistent storage area for a device.  
         [0000]     Return Value  
         [0627]     UGA firmware status code.  
         [0000]     See Also  
         [0628]     VmlGetPersistentDataSize, VmlSetPersistentData.  
         [0629]     VmlGetPersistentDataSize  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlGetPersistentDataSize(            IN PUGA_DEVICE pDevice,            OUT PUINT32 pui32Size            );                      
 
         [0630]     VmlGetPersistentDataSize returns a size in bytes of a persistent storage area available for a device. A persistent storage area for a device is provided by a system firmware and hardware.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0631]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pui32Size  
         [0632]     On return contains a size in bytes of a persistent storage area available for a device.  
         [0000]     Return Value  
         [0633]     UGA firmware status code.  
         [0000]     See Also  
         [0634]     VmlGetPersistentData, VmlSetPersistentData.  
         [0635]     VmlGetSharedContext  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlGetSharedContext(            IN PUGA_DEVICE pDevice,            OUT PVOID *ppvSharedContext            );                      
 
         [0636]     VmlGetSharedContext returns a pointer to IHV defined context shared between all devices enumerated by UGA firmware for given display adapter.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0637]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     ppvSharedContext  
         [0638]     Points to the storage for a pointer to the shared context.  
         [0000]     Return Value  
         [0639]     UGA firmware status code.  
         [0000]     Comments  
         [0640]     UGA firmware must specify the same size of the shared context for each enumerated UGA device in the UgaFwGetChildDevice handlers. The shared context size is returned in the UGA_DEVICE_DATA.ui32SharedContextSize field.  
         [0000]     See Also  
         [0641]     UgaFwGetChildDevice, VmlGetDeviceContext.  
         [0642]     VmlGetTimeStamp  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlGetTimeStamp(            IN PUGA_DEVICE pDevice,            OUT PUINT64 pui64TimeStamp            );                      
 
         [0643]     VmlGetTimeStamp returns a current time stamp value in 100 nanosecond units.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0644]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pui64TimeStamp  
         [0645]     Points to the storage for a time stamp value.  
         [0000]     Return Value  
         [0646]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0647]     UgaFwGetChildDevice.  
         [0648]     VmlGetVersion  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlGetVersion(            IN PUGA_DEVICE pDevice,            OUT PUGA_VM_VERSION pVmVersion            );                      
 
         [0649]     VmlGetVersion returns virtual machine version information.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0650]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pVmVersion  
         [0651]     Points to the storage for virtual machine version information.  
         [0000]     Return Value  
         [0652]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0653]     UgaFwGetChildDevice.  
         [0654]     VmlI2cGetEdidSegment  
                                                             UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlI2cGetEdidSegment(                IN PUGA_DEVICE pDevice,           IN PUGA_I2C_CONTROL pI2cControl,           IN UINT8 ui8Segment           OUT PVOID pvBuffer,           OUT PUINT32 pui32Length           );                      
 
         [0655]     UgaFwGetEdidSegment returns EDID data for a device.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0656]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pI2cControl  
         [0657]     Specifies a pointer to UGA_I2C_CONTROL structure. The caller must initialize fields of this structure with pointers to SDA (serial data) and SCL (serial clock) line toggling callback routines and I2C delay required by the I2C slave device (monitor).  
         [0000]     ui8Segment  
         [0658]     Specifies zero based EDID segment number. EDID segment is always 256 bytes long and it may contain one or two 128 byte EDIDs, one 256 byte EDID, a part of EDID larger than 256 bytes (does not exist at the time of writing), or no EDID at all.  
         [0000]     pvBuffer  
         [0659]     On return contains EDID segment data.  
         [0000]     pui32Length  
         [0660]     On return contains number of EDID data bytes returned in the buffer pointed by pvBuffer.  
         [0000]     Return Value  
         [0661]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0662]     UGA_I2C_CONTROL, UgaFwGetChildDevice.  
         [0663]     VmlI2cRead  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlI2cRead(            IN PUGA_DEVICE pDevice,            IN PUGA_I2C_CONTROL pI2cControl,            OUT VOID UNALIGNED *pvBuffer,            IN UINT32 ui32Length            );                      
 
         [0664]     VmlI2cRead reads a block of data from I2C slave device.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0665]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pI2cControl  
         [0666]     Specifies a pointer to UGA_I2C_CONTROL structure. The caller must initialize fields of this structure with pointers to SDA (serial data) and SCL (serial clock) line toggling callback routines and I2C delay required by the I2C slave device.  
         [0000]     pvBuffer  
         [0667]     On return contains data read from I2C slave device.  
         [0000]     ui32Length  
         [0668]     Specifies length in bytes of data to read.  
         [0000]     Return Value  
         [0669]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0670]     UGA_I2C_CONTROL, UgaFwGetChildDevice, VmlI2cStart, VmlI2cStop, VmlI2cWrite.  
         [0671]     VmlI2cStart  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlI2cStart(            IN PUGA_DEVICE pDevice            IN PUGA_I2C_CONTROL pI2cControl            );                      
 
         [0672]     VmlI2cStart initiates I2C communication with a slave device.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0673]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pI2cControl  
         [0674]     Specifies a pointer to UGA_I2C_CONTROL structure. The caller must initialize fields of this structure with pointers to SDA (serial data) and SCL (serial clock) line toggling callback routines and I2C delay required by the I2C slave device.  
         [0000]     Return Value  
         [0675]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0676]     UGA_I2C_CONTROL, UgaFwGetChildDevice, VmlI2cRead, VmlI2cWrite, VmlI2cStop.  
         [0677]     VmlI2cStop  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlI2cStop(            IN PUGA_DEVICE pDevice            IN PUGA_I2C_CONTROL pI2cControl            );                      
 
         [0678]     VmlI2cRead stops I2C communication with a slave device.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0679]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pI2cControl  
         [0680]     Specifies a pointer to UGA_I2C_CONTROL structure. The caller must initialize fields of this structure with pointers to SDA (serial data) and SCL (serial clock) line toggling callback routines and I2C delay required by the I2C slave device.  
         [0000]     Return Value  
         [0681]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0682]     UGA_I2C_CONTROL, UgaFwGetChildDevice, VmlI2cStart, VmlI2cRead, VmlI2cWrite.  
         [0683]     VmlI2cWrite  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlI2cWrite(            IN PUGA_DEVICE pDevice,            IN PUGA_I2C_CONTROL pI2cControl,            IN VOID UNALIGNED *pvBuffer,            IN UINT32 ui32Length            );                      
 
         [0684]     VmlI2cWrite writes a block of data to I2C slave device.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0685]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pI2cControl  
         [0686]     Specifies a pointer to UGA_I2C_CONTROL structure. The caller must initialize fields of this structure with pointers to SDA (serial data) and SCL (serial clock) line toggling callback routines and I2C delay required by the I2C slave device.  
         [0000]     pvBuffer  
         [0687]     Contains data to be written to the I2C slave device.  
         [0000]     ui32Length  
         [0688]     Specifies length in bytes of data to write.  
         [0000]     Return Value  
         [0689]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0690]     UGA_I2C_CONTROL, UgaFwGetChildDevice, VmlI2cStart, VmlI2cStop, VmlI2cRead.  
         [0691]     VmlPciAllocateCommonBuffer  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlPciAllocateCommonBuffer(            IN PUGA_DEVICE pDevice,            IN UINT64 ui64Length,            IN UGA_MEMORY_CACHING_TYPE cachingType,            OUT PVOID *ppvHostAddress,            OUT PUGA_PHYSICAL_ADDRESS pDeviceAddress            );                      
 
         [0692]     VmlPciAllocateCommonBuffer allocates contiguous, non-pageable system memory and maps it so that it is simultaneously accessible from both the processor and a device for DMA operations.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0693]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     ui64Length  
         [0694]     Specifies the number of byte of memory to allocate.  
         [0000]     cachingType  
         [0695]     Specifies a UGA_MEMORY_CACHING_TYPE value, which indicates the type of caching allowed for the requested memory. The possible values that firmware can use are: 
        UgaMcNonCached        
 
         [0697]     The requested memory cannot be cached by the processor. 
        UgaMcCached        
 
         [0699]     The processor may cache the requested memory. 
        UgaMcWriteCombined        
 
         [0701]     The requested memory can have a write-combine enabled (typical for frame buffer).  
         [0000]     ppvHostAddress  
         [0702]     On return contains the base virtual address of the allocated range.  
         [0000]     pDeviceAddress  
         [0703]     On return contains the bus translated base physical address of the allocated range.  
         [0000]     Return Value  
         [0704]     UGA firmware status code.  
         [0000]     Comments  
         [0705]     VmlPciAllocateCommonBuffer allocates system memory that can be reached from both the processor and the device. This memory appears contiguous to the device. This method sets up a translation for the device, including loading map registers if necessary.  
         [0706]     VmlPciAllocateCommonBuffer allocates at least a page of memory, regardless of the requested ui64Length. After a successful allocation requesting fewer than PAGE_SIZE bytes, the caller can access only the requested ui64Length. After a successful allocation requesting more than an integral multiple of PAGE_SIZE bytes, any remaining bytes on the last allocated page are inaccessible to the caller.  
         [0707]     If UGA firmware needs several pages of common buffer space, but the pages need not be contiguous, the driver should make several one-page requests to VmlPciAllocateCommonBuffer instead of one large request. This approach conserves contiguous memory.  
         [0000]     See Also  
         [0708]     UgaFwGetChildDevice, VmlPciFreeCommonBuffer.  
         [0709]     VmlPciCopyDeviceMemory  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlPciCopyDeviceMemory(            IN PUGA_DEVICE pDevice,            IN UINT8 ui8BarIndex,            IN UINT64 ui64DestinationOffest,            IN UINT64 ui64SourceOffest,            IN UINT64 ui64Count,            IN UGA_DATA_WIDTH dataWidth            );                      
 
         [0710]     VmlPciCopyDeviceMemory copies the contents of the device memory block from one location to another.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0711]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     ui8BarIndex  
         [0712]     Specifies a zero based index of Base Address Register (BAR) of PCI Configuration Header for memory or IO aperture. All UGA MMIO and IO operations use BAR relative addressing. The valid range for this value is 0-5.  
         [0000]     ui64DestinationOffset  
         [0713]     Specifies BAR relative offset to the destination of the copy operation.  
         [0000]     ui64SourceOffset  
         [0714]     Specifies BAR relative offset to the sources of the copy operation.  
         [0000]     ui64Count  
         [0715]     Specifies the number of memory operations to perform.  
         [0000]     dataWidth  
         [0716]     Specifies the width of memory operation.  
         [0000]     Return Value  
         [0717]     UGA firmware status code.  
         [0000]     Comments  
         [0718]     Source and destination regions cannot overlap.  
         [0000]     See Also  
         [0719]     UgaFwGetChildDevice.  
         [0720]     VmlPciFlush  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlPciFlush(            IN PUGA_DEVICE pDevice            );                      
 
         [0721]     VmlPciFlush flushes all data posted to the device.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0722]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     Return Value  
         [0723]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0724]     UgaFwGetChildDevice.  
         [0725]     VmlPciFreeCommonBuffer  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlPciFreeCommonBuffer(            IN PUGA_DEVICE pDevice,            IN PVOID pvHostAddress,            IN UINT64 ui64Length,            IN UGA_MEMORY_CACHING_TYPE cachingType            );                      
 
         [0726]     VmlPciFreeCommonBuffer frees a common buffer allocated by VmlPciAllocateCommonBuffer, along with all resources the buffer uses.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0727]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pvHostAddress  
         [0728]     Specifies the base virtual address of the allocated range.  
         [0000]     ui64Length  
         [0729]     Specifies the number of byte of memory to deallocate.  
         [0000]     caching Type  
         [0730]     Specifies a UGA_MEMORY_CACHING_TYPE value.  
         [0000]     Return Value  
         [0731]     UGA firmware status code.  
         [0000]     Comments  
         [0732]     The parameters passed to VmlPciFreeCommonBuffer must match exactly those passed to and returned from VmlPciAllocateCommonBuffer. UGA firmware cannot free part of an allocated common buffer.  
         [0000]     See Also  
         [0733]     UgaFwGetChildDevice, VmlPciAllocateCommonBuffer.  
         [0734]     VmlPciGetRomImage  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlPciGetRomImage(            IN PUGA_DEVICE pDevice,            OUT VOID UNALIGNED *pvOutputBuffer,            IN UINT32 ui32Offset,            IN UINT32 ui32Length            );                      
 
         [0735]     VmlPciGetRomImage provides an access to a copy of the PCI Option ROM in system memory.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0736]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pvOutputBuffer  
         [0737]     On return contains data read from the option ROM image.  
         [0000]     ui32Offset  
         [0738]     Specifies an offset in bytes from the beginning of the option ROM image.  
         [0000]     ui32Length  
         [0739]     Specifies length in bytes on the option ROM image to read.  
         [0000]     Return Value  
         [0740]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0741]     UgaFwGetChildDevice.  
         [0742]     VmlPciLockSystemMemory  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlPciLockSystemMemory(            IN PUGA_DEVICE pDevice,            IN VOID UNALIGNED *pvHostAddress,            IN OUT PUINT64 pui64Length,            IN UGA_MEMORY_TRANSFER_TYPE transferType,            OUT PUGA_PHYSICAL_ADDRESS pDeviceAddress,            OUT PVOID *ppvMapping            );                      
 
         [0743]     VmlPciLockSystemMemory makes physical pages mapped by the virtual address range resident and locked in the memory.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0744]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pvHostAddress  
         [0745]     Specifies the virtual address of the memory block to be locked.  
         [0000]     pui64Length  
         [0746]     Specifies the length in bytes of the memory block to be locked.  
         [0747]     On return contains the length of contiguous physical memory block locked by this operation. Returned length will be smaller than requested in case when pvAddress points to the virtual address range which is not contiguous in the physical memory.  
         [0000]     transferType  
         [0748]     Specifies the type of DMA transfer to be performed using locked system memory buffer. Valid values are UgaMtSystemToVideo and UgaMtVideoToSystem.  
         [0000]     pDeviceAddress  
         [0749]     On return contains the bus translated base physical address of the locked memory range.  
         [0000]     ppvMapping  
         [0750]     On return points to system memory mapping information. This is an opaque data to be used with matching VmlPciUnlockSystemMemory call only.  
         [0000]     Return Value  
         [0751]     UGA firmware status code.  
         [0000]     Comments  
         [0752]     VmlPciLockSystemMemory may have to allocate temporary transfer buffer visible to PCI device. In this case VmlPciLockSystemMemory will copy the content of the buffer pointed by pvHostAddress to that temporary transfer buffer for UgaMtSystemToVideo transfer operation and VmlPciUnlockSystemMemory will copy the content of temporary transfer buffer to UgaMtVideoToSystem operation. Because of possibility of this dual buffering it is illegal for the CPU to access directly buffer pointed by pvHostAddress between matching VmlPciLockSystemMemory and VmlPciUnlockSystemMemory for given transfer operation.  
         [0753]     If the length returned in pui64Length is smaller than the initial value then the pvAddress can be advanced by returned length and VmlPciLockSystemMemory can be called again for the remaining length. This operation can be repeated till the whole memory region is successfully locked. If multiple calls to VmlPciLockSystemMemory must be used to lock whole memory region then it means that virtual contiguous memory region is mapped into multiple detached contiguous physical memory blocks. In this case multiple mapping values will be returned as well via ppvMapping argument. Caller must store all retuned mapping values in order to use them with matching calls to VmlPciUnlockSystemMemory.  
         [0000]     See Also  
         [0754]     UgaFwGetChildDevice, VmlPciUnlockSystemMemory.  
         [0755]     VmlPciMapDeviceIoSpace  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlPciMapDeviceIoSpace(            IN PUGA_DEVICE pDevice,            IN UINT8 ui8BarIndex,            IN UINT64 ui64Offset,            IN UINT64 ui64Length,            IN PUGA_UGA_MEMORY_CACHING_TYPE cachingType            );                      
 
         [0756]     VmlPciMapDeviceIoSpace maps a device specific physical IO address range to nonpaged system space.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0757]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     ui8BarIndex  
         [0758]     Specifies a zero based index of Base Address Register (BAR) of PCI Configuration Header for memory or IO aperture. All UGA MMIO and IO operations use BAR relative addressing. The valid range for this value is 0-5.  
         [0000]     ui64Offset  
         [0759]     Specifies BAR relative base offset to the IO range to be mapped.  
         [0000]     ui64Length  
         [0760]     Specifies the length in bytes of the IO range to be mapped.  
         [0000]     cachingType  
         [0761]     Specifies a UGA_MEMORY_CACHING_TYPE value, which indicates the type of caching allowed for the requested memory. The possible values that UGA firmware can use are: 
        UgaMcNonCached        
 
         [0763]     The requested memory cannot be cached by the processor. 
        UgaMcCached        
 
         [0765]     The processor may cache the requested memory. 
        UgaMcWriteCombined        
 
         [0767]     The requested memory can have a write-combine enabled (typical for frame buffer).  
         [0000]     Return Value  
         [0768]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0769]     UgaFwGetChildDevice, VmlPciUnmapDeviceIoSpace.  
         [0770]     VmlPciMapDeviceMemory  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlPciMapDeviceMemory(            IN PUGA_DEVICE pDevice,            IN UINT8 ui8BarIndex,            IN UINT64 ui64Offset,            IN UINT64 ui64Length,            IN PUGA_UGA_MEMORY_CACHING_TYPE cachingType            );                      
 
         [0771]     VmlPciMapDeviceMemory maps a device specific physical memory address range to nonpaged system space.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0772]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     ui8BarIndex  
         [0773]     Specifies a zero based index of Base Address Register (BAR) of PCI Configuration Header for memory or IO aperture. All UGA MMIO and IO operations use BAR relative addressing. The valid range for this value is 0-5.  
         [0000]     ui64Offset  
         [0774]     Specifies BAR relative base offset to the device memory range to be mapped.  
         [0000]     ui64Length  
         [0775]     Specifies the length in bytes of the device memory range to be mapped.  
         [0000]     cachingType  
         [0776]     Specifies a UGA_MEMORY_CACHING_TYPE value, which indicates the type of caching allowed for the requested memory. The possible values that UGA firmware can use are: 
        UgaMcNonCached        
 
         [0778]     The requested memory cannot be cached by the processor. 
        UgaMcCached        
 
         [0780]     The processor may cache the requested memory. 
        UgaMcWriteCombined        
 
         [0782]     The requested memory can have a write-combine enabled (typical for frame buffer).  
         [0000]     Return Value  
         [0783]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0784]     UgaFwGetChildDevice, VmlPciUnmapDeviceMemory. VmlPciPollDeviceIoPort  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlPciPollDeviceIoPort(            IN PUGA_DEVICE pDevice,            OUT VOID UNALIGNED *pvData,            IN UINT8 ui8BarIndex,            IN UINT64 ui64Offset,            IN VOID UNALIGNED *pvMask,            IN VOID UNALIGNED *pvValue,            IN UGA_DATA_WIDTH dataWidth,            IN UINT64 ui64TimeOut            );                      
 
         [0785]     VmlPciPollDeviceIoPort polls device IO port for specified bit pattern.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0786]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pvData  
         [0787]     On return contains the final, not masked value read from polled IO port.  
         [0000]     ui8BarIndex  
         [0788]     Specifies a zero based index of Base Address Register (BAR) of PCI Configuration Header for memory or IO aperture. All UGA MMIO and IO operations use BAR relative addressing. The valid range for this value is 0-5.  
         [0000]     ui64Offset  
         [0789]     Specifies BAR relative offset in bytes of the IO port to be polled.  
         [0000]     pvMask  
         [0790]     Points to the mask to be ANDed with values read from the polled IO port.  
         [0000]     pvValue  
         [0791]     Points to the value to be compared with values read from the polled IO port and ANDed with the mask pointed by pvMask.  
         [0000]     dataWidth  
         [0792]     Specifies the data width of values read from polled IO port and values stored at pvMask, pvValue, and pvData.  
         [0000]     ui64TimeOut  
         [0793]     Specifies the timeout value in 100-nanosecond units for the poll operation.  
         [0000]     Return Value  
         [0794]     UGA firmware status code.  
         [0000]     Comments  
         [0795]     VmlPciPollDeviceIoPort returns UGA_STATUS_TIMEOUT when there is no match before timeout is reached. Otherwise VmlPciPollDeviceIoPort returns UGA_STATUS_SUCCESS immediately after matching pattern is read.  
         [0000]     See Also  
         [0796]     UgaFwGetChildDevice, VmlPciPollDeviceMemory.  
         [0797]     VmlPciPollDeviceMemory  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlPciPollDeviceMemory(            IN PUGA_DEVICE pDevice,            OUT VOID UNALIGNED *pvData,            IN UINT8 ui8BarIndex,            IN UINT64 ui64Offset,            IN VOID UNALIGNED *pvMask,            IN VOID UNALIGNED *pvValue,            IN UGA_DATA_WIDTH dataWidth,            IN UINT64 ui64TimeOut            );                      
 
         [0798]     VmlPciPollDeviceMemory polls device memory location for specified bit pattern.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0799]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pvData  
         [0800]     On return contains the final, not masked value read from polled device memory location.  
         [0000]     ui8BarIndex  
         [0801]     Specifies a zero based index of Base Address Register (BAR) of PCI Configuration Header for memory or IO aperture. All UGA MMIO and IO operations use BAR relative addressing. The valid range for this value is 0-5.  
         [0000]     ui64Offset  
         [0802]     Specifies BAR relative offset in bytes of the device memory to be polled.  
         [0000]     pvMask  
         [0803]     Points to the mask to be ANDed with values read from the polled device memory location.  
         [0000]     pvValue  
         [0804]     Points to the value to be compared with values read from the polled device memory location and ANDed with the mask pointed by pvMask.  
         [0000]     dataWidth  
         [0805]     Specifies the data width of values read from polled device memory location and values stored at pvMask, pvValue, and pvData.  
         [0000]     ui64TimeOut  
         [0806]     Specifies the timeout value in 100-nanosecond units for the poll operation.  
         [0000]     Return Value  
         [0807]     UGA firmware status code.  
         [0000]     Comments  
         [0808]     VmlPciPollDeviceMemory returns UGA_STATUS_TIMEOUT when there is no match before timeout is reached. Otherwise VmlPciPollDeviceMemory returns UGA_STATUS_SUCCESS immediately after matching pattern is read.  
         [0000]     See Also  
         [0809]     UgaFwGetChildDevice, VmlPciPollDeviceIoPort.  
         [0810]     VmlPciReadConfigurationSpace  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlPciReadConfigurationSpace(            IN PUGA_DEVICE pDevice,            OUT VOID UNALIGNED *pvBuffer,            IN UINT32 ui32Offset,            IN UINT32 ui32Count,            IN UGA_DATA_WIDTH dataWidth            );                      
 
         [0811]     VmlPciReadConfigurationSpace reads the data from the PCI Configuration Header of UGA device.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0812]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pvBuffer  
         [0813]     On return contains the data read from PCI Configuration Header of UGA device.  
         [0000]     ui32Offset  
         [0814]     Specifies an offset in bytes from the beginning of the device configuration data. VmlPciReadConfigurationSpace will read device configuration data starting from this offset.  
         [0000]     ui32Count  
         [0815]     Specifies the number of configuration space reads.  
         [0000]     dataWidth  
         [0816]     Specifies the data width of values read from configuration space.  
         [0000]     Return Value  
         [0817]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0818]     UgaFwGetChildDevice, VmlPciWriteConfigurationSpace.  
         [0819]     VmlPciReadDeviceIoPort  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlPciReadDeviceIoPort(            IN PUGA_DEVICE pDevice,            OUT VOID UNALIGNED *pvData,            IN UINT8 ui8BarIndex,            IN UINT64 ui64Offset,            IN UGA_DATA_WIDTH dataWidth            );                      
 
         [0820]     VmlPciReadDeviceIoPort reads a value from device IO port.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0821]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pvData  
         [0822]     On return contains value read from the IO port.  
         [0000]     ui8BarIndex  
         [0823]     Specifies a zero based index of Base Address Register (BAR) of PCI Configuration Header for memory or IO aperture. All UGA MMIO and IO operations use BAR relative addressing. The valid range for this value is 0-5.  
         [0000]     ui64Offset  
         [0824]     Specifies BAR relative offset in bytes of the IO port to be read.  
         [0000]     dataWidth  
         [0825]     Specifies the data width of the value to be read from the IO port.  
         [0000]     Return Value  
         [0826]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0827]     UgaFwGetChildDevice, VmlPciReadDeviceMemory, VmlPciWriteDeviceIoPort, VmlPciWriteDeviceMemory.  
         [0828]     VmlPciReadDeviceMemory  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlPciReadDeviceMemory(            IN PUGA_DEVICE pDevice,            OUT VOID UNALIGNED *pvData,            IN UINT8 ui8BarIndex,            IN UINT64 ui64Offset,            IN UINT64 ui64Count,            IN UGA_DATA_WIDTH dataWidth            );                      
 
         [0829]     VmlPciReadDeviceMemory reads data block from the device memory.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0830]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pvData  
         [0831]     On return contains the block of data read from the device memory. The buffer pointed by pvData must be at least (dataWidth*ui64Count) bytes long.  
         [0000]     ui8BarIndex  
         [0832]     Specifies a zero based index of Base Address Register (BAR) of PCI Configuration Header for memory or IO aperture. All UGA MMIO and IO operations use BAR relative addressing. The valid range for this value is 0-5.  
         [0000]     ui64Offset  
         [0833]     Specifies BAR relative base offset in bytes of the device memory to be read.  
         [0000]     ui64Count  
         [0834]     Specifies the number of dataWidth reads to execute starting from ui64Offset.  
         [0000]     dataWidth  
         [0835]     Specifies the data width of values to be read from the device memory.  
         [0000]     Return Value  
         [0836]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0837]     UgaFwGetChildDevice, VmlPciReadDeviceIoPort, VmlPciWriteDeviceIoPort, VmlPciWriteDeviceMemory.  
         [0838]     VmlPciUnlockSystemMemory  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlPciUnlockSystemMemory(            IN PUGA_DEVICE pDevice,            IN VOID UNALIGNED *pvHostAddress,            IN UINT64 ui64Length,            IN PVOID pvMapping            );                      
 
         [0839]     VmlPciUnlockSystemMemory unlocks physical pages locked by VmlPciLockSystemMemory.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0840]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pvHostAddress  
         [0841]     Specifies the virtual address of the memory block to be unlocked.  
         [0000]     ui64Length  
         [0842]     Specifies the length in bytes of the memory block to be unlocked.  
         [0000]     pvMapping  
         [0843]     Specifies system memory mapping information returned by VmlPciLockSystemMemory.  
         [0000]     Return Value  
         [0844]     UGA firmware status code.  
         [0000]     Comments  
         [0845]     VmlPciLockSystemMemory may have to allocate temporary transfer buffer visible to PCI device. In this case VmlPciLockSystemMemory will copy the content of the buffer pointed by pvHostAddress to that temporary transfer buffer for UgaMtSystemToVideo transfer operation and VmlPciUnlockSystemMemory will copy the content of temporary transfer buffer to UgaMtVideoToSystem operation. Because of possibility of this dual buffering it is illegal for the CPU to access directly buffer pointed by pvHostAddress between matching VmlPciLockSystemMemory and VmlPciUnlockSystemMemory for given transfer operation.  
         [0846]     UGA firmware cannot unlock a part of locked contiguous physical memory block. If the multiple calls had to be used to lock a contiguous virtual memory block mapped into multiple, disconnected contiguous physical memory blocks, then the caller must use multiple matching calls to VmlPciUnlockSystemMemory to unlock multiple blocks of physical memory passing pvHostAddress, ui64Length, and pvMapping corresponding to each physical memory block.  
         [0000]     See Also  
         [0847]     UgaFwGetChildDevice, VmlPciLockSystemMemory.  
         [0848]     VmlPciUnmapDeviceIoSpace  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlPciUnmapDeviceIoSpace(             IN PUGA_DEVICE pDevice,             IN UINT8 ui8BarIndex,             IN UINT64 ui64Offset,             IN UINT64 ui64Length             );                      
 
         [0849]     VmlPciUnmapDeviceIoSpace unmaps device specific physical IO address range mapped by VmlPciMapDeviceIoSpace.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0850]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     ui8BarIndex  
         [0851]     Specifies a zero based index of Base Address Register (BAR) of PCI Configuration Header for memory or IO aperture. All UGA MMIO and IO operations use BAR relative addressing. The valid range for this value is 0-5.  
         [0000]     ui64Offset  
         [0852]     Specifies BAR relative base offset to the IO range to be unmapped.  
         [0000]     ui64Length  
         [0853]     Specifies the length in bytes of the IO range to be unmapped.  
         [0000]     Return Value  
         [0854]     UGA firmware status code.  
         [0000]     Comments  
         [0855]     The parameters passed to VmlPciUnmapDeviceIoSpace must match exactly those passed to and returned from VmlPciMapDeviceIoSpace. UGA firmware cannot unmap a part of mapped device physical IO range.  
         [0000]     See Also  
         [0856]     UgaFwGetChildDevice, VmlPciMapDeviceIoSpace.  
         [0857]     VmlpciUnmapDeviceMemory  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlPciMapDeviceMemory(             IN PUGA_DEVICE pDevice,             IN UINT8 ui8BarIndex,             IN UINT64 ui64Offset,             IN UINT64 ui64Length             );                      
 
         [0858]     VmlPciUnmapDeviceMemory unmaps a device specific physical memory address range mapped by VmlPciMapDeviceMemory.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0859]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     ui8BarIndex  
         [0860]     Specifies a zero based index of Base Address Register (BAR) of PCI Configuration Header for memory or IO aperture. All UGA MMIO and IO operations use BAR relative addressing. The valid range for this value is 0-5.  
         [0000]     ui64Offset  
         [0861]     Specifies BAR relative base offset to the device memory range to be unmapped.  
         [0000]     ui64Length  
         [0862]     Specifies the length in bytes of the device memory range to be unmapped.  
         [0000]     Return Value  
         [0863]     UGA firmware status code.  
         [0000]     Comments  
         [0864]     The parameters passed to VmlPciUnmapDeviceMemory must match exactly those passed to and returned from VmlPciMapDeviceMemory. UGA firmware cannot unmap a part of mapped device physical memory range.  
         [0000]     See Also  
         [0865]     UgaFwGetChildDevice, VmlPciMapDeviceMemory.  
         [0866]     VmlPciWriteConfigurationSpace  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlPciReadConfigurationSpace(             IN PUGA_DEVICE pDevice,             IN VOID UNALIGNED *pvBuffer,             IN UINT32 ui32Offset,             IN UINT32 ui32Count,             IN UGA_DATA_WIDTH dataWidth             );                      
 
         [0867]     VmlPciWriteConfigurationSpace writes the data to the PCI Configuration Header of UGA device.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0868]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pvBuffer  
         [0869]     Points to the data to be written to PCI Configuration Header of UGA device.  
         [0000]     ui32Offset  
         [0870]     Specifies an offset in bytes from the beginning of the device configuration data. VmlPciWriteConfigurationSpace will write device configuration data starting from this offset.  
         [0000]     ui32Count  
         [0871]     Specifies the number of configuration space writes.  
         [0000]     dataWidth  
         [0872]     Specifies the number of configuration space writes.  
         [0000]     Return Value  
         [0873]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0874]     UgaFwGetChildDevice, VmlPciReadConfigurationSpace.  
         [0875]     VmlPciWriteDeviceIoPort  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlPciWriteDeviceIoPort(             IN PUGA_DEVICE pDevice,             IN VOID UNALIGNED *pvData,             IN UINT8 ui8BarIndex,             IN UINT64 ui64Offset,             IN UGA_DATA_WIDTH dataWidth             );                      
 
         [0876]     VmlPciWriteDeviceIoPort writes a value to device IO port.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0877]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pvData  
         [0878]     Points to value to be written to the IO port.  
         [0000]     ui8BarIndex  
         [0879]     Specifies a zero based index of Base Address Register (BAR) of PCI Configuration Header for memory or IO aperture. All UGA MMIO and IO operations use BAR relative addressing. The valid range for this value is 0-5.  
         [0000]     ui64Offset  
         [0880]     Specifies BAR relative offset in bytes of the IO port to be written.  
         [0000]     dataWidth  
         [0881]     Specifies the data width of the value to be written to the IO port.  
         [0000]     Return Value  
         [0882]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0883]     UgaFwGetChildDevice, VmlPciReadDeviceIoPort, VmlPciReadDeviceMemory, VmlPciWriteDeviceMemory.  
         [0884]     VmlPciWriteDeviceMemory  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlPciWriteDeviceMemory(             IN PUGA_DEVICE pDevice,             IN VOID UNALIGNED *pvData,             IN UINT8 ui8BarIndex,             IN UINT64 ui64Offset,             IN UINT64 ui64Count,             IN UGA_DATA_WIDTH dataWidth             );                      
 
         [0885]     VmlPciWriteDeviceMemory writes a data block to the device memory.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0886]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pvData  
         [0887]     Points to the block of data to write to the device memory. The buffer pointed by pvData must be at least (dataWidth*ui64Count) bytes long.  
         [0000]     ui8BarIndex  
         [0888]     Specifies a zero based index of Base Address Register (BAR) of PCI Configuration Header for memory or IO aperture. All UGA MMIO and IO operations use BAR relative addressing. The valid range for this value is 0-5.  
         [0000]     ui64Offset  
         [0889]     Specifies BAR relative base offset in bytes of the device memory to be written.  
         [0000]     ui64Count  
         [0890]     Specifies the number of dataWidth writes to execute starting from ui64Offset.  
         [0000]     dataWidth  
         [0891]     Specifies the data width of values to be written to the device memory.  
         [0000]     Return Value  
         [0892]     UGA firmware status code.  
         [0000]     Comments  
         [0000]     See Also  
         [0893]     UgaFwGetChildDevice, VmlPciReadDeviceIoPort, VmlPciReadDeviceMemory, VmlPciWriteDeviceIoPort.  
         [0894]     VmlSetPersistentData  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlSetPersistentData(             IN PUGA_DEVICE pDevice,             IN VOID UNALIGNED *pvBuffer,             IN UINT32 ui32Offset,             IN UINT32 ui32Length             );                      
 
         [0895]     VmlSetPersistentData writes a free formatted, IHV/OEM defined, device configuration data. This data is stored by a system firmware on a non-volatile media and it is persistent over a reboot.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0896]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     pvBuffer  
         [0897]     Points to the data to be written to a persistent storage area for a device.  
         [0000]     u32Offset  
         [0898]     Specifies an offset in bytes from a beginning of a persistent storage area for a device.  
         [0000]     ui32Length  
         [0899]     Specifies length in bytes of the data to be written to a persistent storage area for a device.  
         [0000]     Return Value  
         [0900]     UGA firmware status code.  
         [0000]     See Also  
         [0901]     VmlGetPersistentDataSize, VmlGetPersistentData.  
         [0902]     VmlSleep  
                                                   UGA_STATUS           UGA_FW_CALL_TYPE_VML           VmlSleep(             IN PUGA_DEVICE pDevice,             IN UINT64 ui64Duration             );                      
 
         [0903]     VmlSleep suspends UGA firmware execution for specified number of 100 nanosecond units.  
         [0000]     Parameters  
         [0000]     pDevice  
         [0904]     Specifies a device object associated with a device enumerated by UgaFwGetChildDevice. Each device enumerated by UgaFwGetChildDevice has a unique device object associated with it.  
         [0000]     ui64Duration  
         [0905]     Specifies the number of 100 nanoseconds units.  
         [0000]     Return Value  
         [0906]     UGA firmware status code.  
         [0000]     Comments  
         [0907]     Currently the smallest “settable” value is 10, which means that for any duration &lt;=10 the delay will be at least 10*100 ns=1 us long.  
         [0000]     See Also  
         [0908]     UgaFwGetChildDevice.  
       APPENDIX B  
       [0000]     EFI-UGA Binding  
         [0000]     EFI_UGA_IO_PROTOCOL  
         [0000]     Part  1   
         [0000]     EFI_UGA_IO_PROTOCOL  
         [0909]     EFI_UGA_IO_PROTOCOL provides an EFI interface to display adapter firmware, one that is compliant with the UGA Firmware Interface Specification. In order to simplify EFI client code implementation, EFI_UGA_IO_PROTOCOL exports CreateDevice and DeleteDevice methods, in addition to a single UGA firmware dispatch entry point.  
         [0910]     The EFI_UGA_IO_PROTOCOL implementation and EFI-UGA driver binding code samples shown in this document are completely generic and are independent of the display hardware architecture. They can be provided as a part of an EFI driver library.  
         [0911]     A video ROM must export EFI_UGA_IO_PROTOCOL in order to be compliant with EFI 1.1.  
         [0000]     1.1 EFI_UGA_IO_PROTOCOL Methods  
         [0912]     This section lists the EFI_UGA_IO_PROTOCOL methods. These methods are used to create and initialize a UGA device object, delete a UGA device object, and send an I/O request packet to a UGA device object. 
        EFI_UGA_IO_CREATE_DEVICE     EFI_UGA_IO_DELETE_DEVICE     EFI_UGA_IO_DISPATCH_SERVICE 
 
 EFI_UGA IO CREATE_DEVICE 
       
 
         [0916]     The EFI_UGA IO_CREATE_DEVICE method creates and initializes a UGA device object.  
                                                   typedef           EFI_STATUS           (*EFI_UGA_IO_CREATE_DEVICE)(             IN EFI_UGA_IO_PROTOCOL *This,             IN UGA_DEVICE *ParentDevice,             IN UGA_DEVICE_DATA *DeviceData,             IN VOID *RunTimeContext,             OUT UGA_DEVICE **Device             );                      
 
 Parameters 
 
         [0917]     This  
         [0918]     Points to an EFI_UGA_IO_PROTOCOL structure.  
         [0919]     ParentDevice  
         [0920]     Points to the UGA_DEVICE structure for the parent of the device to be created. A value of NULL indicates that the created device object is the root of enumeration; that is, a UGA device object of type UgaDtParentBus (see the UGA_DEVICE_TYPE enumeration) is to be created.  
         [0921]     DeviceData  
         [0922]     Points to a UGA_DEVICE_DATA structure that contains UGA device data for the device to be created.  
         [0923]     Run TimeContext  
         [0924]     Points to a memory location that contains run-time environment-specific context for the device to be created.  
         [0925]     Device  
         [0926]     Points to a memory location that receives that address of the UGA_DEVICE structure for the created device.  
         [0000]     Return Value  
         [0927]     This method returns a standard EFI status code.  
         [0000]     Headers  
         [0928]     Declared in efiuga.h. Include efiuga.h and uga.h.  
         [0000]     Comments  
         [0929]     Video IHVs do not need to implement this method. It is included in the EFI VML static library. For implementation details, see Section 2.1, EFI-UGA Binding and EFI_UGA_IO_PROTOCOL Implementation Sample.  
         [0000]     EFI_UGA_IO_DELETE_DEVICE  
         [0930]     The EFI_UGA_IO_DELETE_DEVICE method deletes a UGA device object that was created in a previous call to the EFI_UGA_IO_CREATE_DEVICE method.  
                                                   typedef           EFI_STATUS           (*EFI_UGA_IO_DELETE_DEVICE)(             IN EFI_UGA_IO_PROTOCOL *This,             IN UGA_DEVICE *Device             );                      
 
 Parameters 
 
         [0931]     This  
         [0932]     Points to an EFI_UGA_IO_PROTOCOL structure.  
         [0933]     Device  
         [0934]     Points to the UGA_DEVICE structure for the device to be deleted.  
         [0000]     Return Value  
         [0935]     This method returns a standard EFI status code.  
         [0000]     Headers  
         [0936]     Declared in efiuga.h. Include efiuga.h and uga.h.  
         [0000]     Comments  
         [0937]     Video IHVs do not need to implement this method. It is included in the EFI VML static library. For implementation details, see the sample code in Section 2.1, EFI-UGA Binding and EFI_UGA_IO_PROTOCOL Implementation Sample.  
         [0000]     EFI_UGA_IO_DISPATCH_SERVICE  
         [0938]     The EFI_UGA_IO_DISPATCH_SERVICE method sends a UGA I/O request packet to a UGA device object.  
                                                   typedef           UGA_STATUS           UGA_FW_CALL_TYPE_API           (*EFI_UGA_IO_DISPATCH_SERVICE)(             IN UGA_DEVICE *Device,             IN UGA_IO_REQUEST IoRequest             );                      
 
 Parameters 
 
         [0939]     Device  
         [0940]     Points to the UGA_DEVICE structure for the device object associated with an enumerated UGA device.  
         [0941]     IoRequest  
         [0942]     Specifies a UGA_IO_REQUEST structure that contains the UGA I/O request packet.  
         [0000]     Return Value  
         [0943]     This method returns a standard UGA status code.  
         [0000]     Headers  
         [0944]     Declared in efiuga.h. Include efiuga.h and uga.h.  
         [0000]     Comments  
         [0945]     Video IHVs must implement this method. For a sample implementation, see Section 2.2, UGA Firmware Interface Implementation Sample.  
         [0946]     This method is the main UGA firmware service dispatch routine. In addition to implementing this method, video IHVs must implement any of the functions that are specified in IORequest.ioRequestCode. (See the UGA_IO_REQUEST_CODE enumeration for a list of names of the functions that this method can call.)  
         [0000]     1.2 EFI_UGA_IO_PROTOCOL Structures  
         [0947]     The structures listed in this section are used by the EFI_UGA_IO_PROTOCOL methods to hold information about a particular UGA device object. 
        EFI_UGA_IO_PROTOCOL     EFI_UGA_IO_PROTOCOL_CONTEXT 
 
 EFI_UGA_IO_PROTOCOL 
       
 
         [0950]     The EFI_UGA_IO_PROTOCOL structure contains the addresses of functions used to create a UGA device, delete a UGA device, and send messages to a UGA device.  
                                                   typedef struct_EFI_UGA_IO_PROTOCOL{            EFI_UGA_IO_CREATE_DEVICE CreateDevice;            EFI_UGA_IO_DELETE_DEVICE DeleteDevice;            EFI_UGA_IO_DISPATCH_SERVICE DispatchService;           }EFI_UGA_IO_PROTOCOL;                      
 
 Members 
 
         [0951]     CreateDevice  
         [0952]     Points to a function that is used to create a UGA device object.  
         [0953]     DeleteDevice  
         [0954]     Points to a function that is used to delete a UGA device object.  
         [0955]     DispatchService  
         [0956]     Points to a function that is used to send messages to a UGA device object.  
         [0000]     Headers  
         [0957]     Declared in efiuga.h. Include efiuga.h.  
         [0000]     EFI_UGA_IO_PROTOCOL_CONTEXT  
         [0958]     The EFI_UGA_IO_PROTOCOL_CONTEXT structure contains the information of an EFI_UGA_IO_PROTOCOL structure, together with the handle associated with a PCI video adapter.  
                                                   typedef struct_EFI_UGA_IO_PROTOCOL_CONTEXT{            EFI_UGA_IO_PROTOCOL Protocol;            EFI_HANDLE Controller;           }EFI_UGA_IO_PROTOCOL_CONTEXT;                      
 
 Members 
 
         [0959]     Protocol  
         [0960]     Specifies an EFI_UGA_IO_PROTOCOL structure.  
         [0961]     Controller  
         [0962]     Is a handle to the PCI video adapter. The EFI runtime environment supplies this value.  
         [0000]     Headers  
         [0963]     Declared in efiuga.h. Include efiuga.h.  
         [0000]     1.3 EFI_UGA_IO_PROTOCOL Constants  
         [0964]     This section lists EFI_UGA_IO_PROTOCOL constants. 
        EFI_UGA_IO_PROTOCOL_GUID 
 
 EFI_UGA_IO_PROTOCOL_GUID 
       
 
         [0966]     EFI_UGA_IO_PROTOCOL_GUID is the GUID for the EFI-UGA I/O protocol. 
        #define EFI_UGA_IO_PROTOCOL_GUID\{0x61a4d49e, 0x6f68, 0x4f1b, 0xb9, 0x22, 0xa8, 0x6e, 0xed, 0xb, 0x7, 0xa2}
 
 Headers 
       
 
         [0968]     Defined in efiuga.h. Include efiuga.h.  
         [0000]     Part 2  
         [0000]     Implementation Samples  
         [0969]     This section provides sample code that illustrates how to implement EFI-UGA Binding and EFI_UGA_IO_PROTOCOL. The section also provides sample code for a UGA Firmware Interface implementation. 
        2.1 EFI-UGA Binding and EFI_UGA_IO_PROTOCOL Implementation     2.2 UGA Firmware Interface Implementation 
 
 2.1 EFI-UGA Binding and EFI_UGA_IO_PROTOCOL Implementation Sample 
 
 /*++
       
 
         [0972]     This code and information is provided “as is” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.  
         [0000]     Copyright (c) 2000-2001 Microsoft Corporation  
         [0000]     Module Name:  
         [0973]     efiuga.h  
         [0000]     Abstract:  
         [0974]     This is an implementation of EFI-UGA binding code.  
         [0000]     Author:  
         [0975]     Michael Maciesowicz (mmacie) 7 Aug. 2001  
         [0000]     Environment:  
         [0976]     Firmware boot-time and OS kernel mode run-time.  
         [0000]     Notes:  
         [0977]     Revision History:  
                                   −−*/       #ifndef _EFIUGA_H —         #define _EFIUGA_H —         #include “vml.h”       extern const UINT16 g_ui16UgaFwPciVendorId;       extern const UINT16 g_ui16UgaFwPciDeviceId;       extern const UINT16 g_ui16UgaFwPciSubvendorId;       extern const UINT16 g_ui16UgaFwPciSubdeviceId;       extern const UINT8 g_ui8UgaFwPciDeviceRevision;       //       // BUGBUG: Remove from here once EFI_UGA_IO_PROTOCOL       is in EFI 1.1.       //       #define EFI_UGA_IO_PROTOCOL_GUID \         {0x61a4d49e, 0x6f68, 0x4f1b, 0xb9,0x22,0xa8,0x6e,0xed,0xb,         0x7,0xa2}       typedef       EFI_STATUS       (EFIAPI *EFI_UGA_IO_CREATE_DEVICE)(         IN struct _EFI_UGA_IO_PROTOCOL *This,         IN UGA_DEVICE *ParentDevice,         IN UGA_DEVICE_DATA *DeviceData,         IN VOID *RunTimeContext,         OUT UGA_DEVICE **Device         );       typedef       EFI_STATUS       (EFIAPI *EFI_UGA_IO_DELETE_DEVICE)(         IN struct _EFI_UGA_IO_PROTOCOL *This,         IN UGA_DEVICE *Device         );       typedef struct _EFI_UGA_IO_PROTOCOL       {         EFI_UGA_IO_CREATE_DEVICE CreateDevice;         EFI_UGA_IO_DELETE_DEVICE DeleteDevice;         PUGA_FW_SERVICE_DISPATCH DispatchService;       } EFI_UGA_IO_PROTOCOL;       typedef struct _EFI_UGA_IO_PROTOCOL_CONTEXT       {         EFI_UGA_IO_PROTOCOL Protocol;         EFI_HANDLE Controller;       } EFI_UGA_IO_PROTOCOL_CONTEXT;       #define EFI_UGA_IO_PROTOCOL_CR(This) \         ((EFI_UGA_IO_PROTOCOL_CONTEXT *)&amp;         (((EFI_UGA_IO_PROTOCOL_CONTEXT       *)(This))-&gt;Protocol))       extern PUGA_FW_SERVICE_DISPATCH UgaFwDispatchService;       extern EFI_HANDLE gMyImageHandle;       extern EFI_GUID gEfiUgaIoProtocolGuid;       //       // BUGBUG: Remove to here once EFI 1.1 is in the build.       //       EFI_STATUS       EFIAPI       EfiUgaDriverEntryPoint(         IN EFI_HANDLE ImageHandle,         IN EFI_SYSTEM_TABLE *SystemTable         );       EFI_STATUS       EFIAPI       EfiUgaControllerDriverSupported(         IN EFI_DRIVER_BINDING_PROTOCOL *This,         IN EFI_HANDLE Controller,         IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath         );       EFI_STATUS       EFIAPI       EfiUgaControllerDriverStart(         IN EFI_DRIVER_BINDING_PROTOCOL *This,         IN EFI_HANDLE Controller,         IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath         );       EFI_STATUS       EFIAPI       EfiUgaControllerDriverStop(         IN EFI_DRIVER_BINDING_PROTOCOL *This,         IN EFI_HANDLE Controller,         IN UINTN NumberOfChildren,         IN EFI_HANDLE *ChildHandleBuffer         );       EFI_STATUS       EFIAPI       EfiUgaCreateDevice(         IN EFI_UGA_IO_PROTOCOL *This,         IN UGA_DEVICE *ParentDevice,         IN UGA_DEVICE_DATA *DeviceData,         IN VOID *RunTimeContext,         OUT UGA_DEVICE **Device         );       EFI_STATUS       EFIAPI       EfiUgaDeleteDevice(         IN EFI_UGA_IO_PROTOCOL *This,         IN UGA_DEVICE *Device         );       #endif // _EFIUGA_H —         /*++                  
 
         [0978]     This code and information is provided “as is” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.  
         [0000]     Copyright (c) 2000-2001 Microsoft Corporation  
         [0000]     Module Name:  
         [0979]     efiuga.c  
         [0000]     Abstract:  
         [0980]     This is an implementation of EFI-UGA binding code.  
         [0000]     Author:  
         [0981]     Michael Maciesowicz (mmacie) 24 Jul. 2001  
         [0000]     Environment:  
         [0982]     Firmware boot-time and OS kernel mode run-time.  
         [0000]     Notes:  
         [0983]     Revision History:  
                                                   −−*/           #include “efiuga.h”           EFI_STATUS           EFIAPI           EfiUgaDriverEntryPoint(             IN EFI_HANDLE ImageHandle,             IN EFI_SYSTEM_TABLE *SystemTable             )           /*++                      
 
 Routine Description: 
 
         [0984]     This is a main entry point to EFI driver.  
         [0000]     Arguments:  
         [0985]     ImageHandle—Specifies driver&#39;s image handle.  
         [0986]     SystemTable—Specifies EFI system data table.  
         [0987]     Return Value:  
                                    EFI status code.       −−*/       {        EFI_STATUS Status;        static EFI_DRIVER_BINDING_PROTOCOL EfiUgaDriverBinding =        {         EfiUgaControllerDriverSupported,         EfiUgaControllerDriverStart,         EfiUgaControllerDriverStop,         1        };        //        // Initialize the EFI Library.        //        EfiInitializeDriverLib(ImageHandle, SystemTable);        //        // Attach the Driver Binding Protocol to the driver&#39;s Image Handle.        //        Status = gBS-&gt;InstallProtocolInterface(         &amp;ImageHandle,         &amp;gEfiDriverBindingProtocolGuid,         EFI_NATIVE_INTERFACE,         &amp;EfiUgaDriverBinding);        return Status;       }       EFI_STATUS       EFIAPI       EfiUgaControllerDriverSupported(        IN EFI_DRIVER_BINDING_PROTOCOL *This,        IN EFI_HANDLE Controller,        IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath        )       /*++                  
 
         [0988]     Routine Description:  
         [0989]     This routine checks compatiblity between EFI driver image and hardware. This a required entry point for EFI driver.  
         [0000]     Arguments:  
         [0990]     This—Specifies EFI driver binding protocol.  
         [0991]     Controller—Specifies PCI controller.  
         [0992]     RemainingDevicePath—Specifies additional EFI device path.  
         [0993]     Return Value:  
                                    EFI status code.       −−*/       {        EFI_STATUS EfiStatus;        EFI_PCI_IO_PROTOCOL *PciIo;        UINT16 VendorId;        UINT16 DeviceId;        UINT16 SubvendorId;        UINT16 SubdeviceId;        UINT8 DeviceRevision;        //        // Open PCI IO protocol.        //        PciIo = NULL;        EfiStatus = gBS-&gt;OpenProtocol(         Controller,         &amp;gEfiPciIoProtocolGuid,         &amp;PciIo,         gMyImageHandle,       // Global set by DriverLib         Controller,         EFI_OPEN_PROTOCOL_BY_DRIVER);        //        // Read vendor ID from the PCI configuration header.        //        if (!EFI_ERROR(EfiStatus))        {         EfiStatus = PciIo-&gt;Pci.Read(          PciIo,          EfiPciIoWidthUint16,          0x0,          1,          &amp;VendorId);        }        //        // Read device ID from the PCI configuration header.        //        if (!EFI_ERROR(EfiStatus))        {         EfiStatus = PciIo-&gt;Pci.Read(          PciIo,          EfiPciIoWidthUint16,          0x2,          1,          &amp;DeviceId);        }        //        // Read subvendor ID from the PCI configuration header.        //        if (!EFI_ERROR(EfiStatus))        {         EfiStatus = PciIo-&gt;Pci.Read(          PciIo,          EfiPciIoWidthUint16,          0x2c,          1,          &amp;SubvendorId);        }        //        // Read subdevice ID from the PCI configuration header.        //        if (!EFI_ERROR(EfiStatus))        {         EfiStatus = PciIo-&gt;Pci.Read(          PciIo,          EfiPciIoWidthUint16,          0x2e,          1,          &amp;SubdeviceId);        }        //        // Read device revision from the PCI configuration header.        //        if (!EFI_ERROR(EfiStatus))        {         EfiStatus = PciIo-&gt;Pci.Read(          PciIo,          EfiPciIoWidthUint8,          0x8,          1,          &amp;DeviceRevision);        }        //        // Verify against driver&#39;s data.        //        if (!EFI_ERROR(EfiStatus))        {         if ((VendorId == g_ui16UgaFwPciVendorId) &amp;&amp;          (DeviceId == g_ui16UgaFwPciDeviceId) &amp;&amp;          (SubvendorId == g_ui16UgaFwPciSubvendorId) &amp;&amp;          (SubdeviceId == g_ui16UgaFwPciSubdeviceId) &amp;&amp;          (DeviceRevision == g_ui8UgaFwPciDeviceRevision))         {          EfiStatus = EFI_SUCCESS;         }         else         {          EfiStatus = EFI_UNSUPPORTED;         }        }        //        // Close PCI IO protocol.        //        if (PciIo)        {         gBS-&gt;CloseProtocol(          Controller,          &amp;gEfiPciIoProtocolGuid,          gMyImageHandle,          Controller);         PciIo = NULL;        }        return EfiStatus;       }       EFI_STATUS       EFIAPI       EfiUgaControllerDriverStart(        IN EFI_DRIVER_BINDING_PROTOCOL *This,        IN EFI_HANDLE Controller,        IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath        )       /*++                  
 
 Routine Description: 
 
         [0994]     This routine starts EFI driver. This a required entry point for EFI driver.  
         [0000]     Arguments:  
         [0995]     This—Specifies EFI driver binding protocol.  
         [0996]     Controller—Specifies PCI controller.  
         [0997]     RemainingDevicePath—Specifies additional EFI device path.  
         [0998]     Return Value:  
                                    EFI status code.       −−*/       {        EFI_STATUS EfiStatus;        EFI_UGA_IO_PROTOCOL_CONTEXT *UgaIoContext = NULL;        //        // Allocate UGA IO protocol context.        //        EfiStatus = gBS-&gt;AllocatePool(         EfiBootServicesData,         sizeof (EFI_UGA_IO_PROTOCOL_CONTEXT),         &amp;UgaIoContext);        //        // Publish UGA IO protocol.        //        if (!EFI_ERROR(EfiStatus))        {         //         // BUGBUG: Intel-MS sync pending (DispatchService definition).         //         UgaIoContext-&gt;Protocol.CreateDevice = EfiUgaCreateDevice;         UgaIoContext-&gt;Protocol.DeleteDevice = EfiUgaDeleteDevice;         UgaIoContext-&gt;Protocol.DispatchService = UgaFwDispatchService;         UgaIoContext-&gt;Controller = Controller;         EfiStatus = gBS-&gt;InstallMultipleProtocolInterfaces(          Controller,          &amp;gEfiUgaIoProtocolGuid,          &amp;(UgaIoContext-&gt;Protocol),          NULL);        }        //        // Clean-up if anything failed.        //        if (EFI_ERROR(EfiStatus))        {         if (UgaIoContext)         {          gBS-&gt;FreePool(UgaIoContext);          UgaIoContext = NULL;         }        }        return EfiStatus;       }       EFI_STATUS       EFIAPI       EfiUgaControllerDriverStop(        IN EFI_DRIVER_BINDING_PROTOCOL *This,        IN EFI_HANDLE Controller,        IN UINTN NumberOfChildren,        IN EFI_HANDLE *ChildHandleBuffer        )       /*++                  
 
 Routine Description: 
 
         [0999]     This routine stops EFI driver. This a required entry point for EFI driver.  
         [0000]     Arguments:  
         [1000]     This—Specifies EFI driver binding protocol.  
         [1001]     Controller—Specifies PCI controller.  
         [1002]     NumberOfChildren—Specifies number of child devices of PCI controller.  
         [1003]     ChildHandleBuffer—Specifies list of child device handles of PCI controller.  
         [1004]     Return Value:  
                                                    EFI status code.           −−*/           {            EFI_STATUS EfiStatus;            EFI_UGA_IO_PROTOCOL *UgaIo;            EFI_UGA_IO_PROTOCOL_CONTEXT *UgaIoContext;            //            // Open UGA IO protocol.            //            EfiStatus = gBS-&gt;OpenProtocol(             Controller,             &amp;gEfiUgaIoProtocolGuid,             &amp;UgaIo,             gMyImageHandle,             Controller,             EFI_OPEN_PROTOCOL_GET_PROTOCOL);            //            // Remove UGA IO protocol from the system.            //            if (!EFI_ERROR (EfiStatus))            {             //             // Get UGA IO protocol context.             //             UgaIoContext = EFI_UGA_IO_PROTOCOL_CR(UgaIo);             //             // Close UGA IO protocol.             //             gBS-&gt;CloseProtocol(              Controller,              &amp;gEfiUgaIoProtocolGuid,              gMyImageHandle,              Controller);             //             // Uninstall UGA IO protocol.             //             EfiStatus = gBS-&gt;UninstallMultipleProtocolInterfaces(              Controller,              &amp;gEfiUgaIoProtocolGuid,              &amp;(UgaIoContext-&gt;Protocol),              NULL);            }            //            // Free UGA IO protocol context.            //            if (!EFI_ERROR(EfiStatus))            {             gBS-&gt;FreePool(UgaIoContext);            }            return EfiStatus;           }           //           // BUGBUG: Intel-MS sync pending (RunTimeContext).           //           EFI_STATUS           EFIAPI           EfiUgaCreateDevice(            IN EFI_UGA_IO_PROTOCOL *This,            IN UGA_DEVICE *ParentDevice,            IN UGA_DEVICE_DATA *DeviceData,            IN VOID *RunTimeContext,            OUT UGA_DEVICE **Device            )           /*++                      
 
 Routine Description: 
 
         [1005]     This routine creates and initializes UGA device object.  
         [0000]     Arguments:  
         [1006]     This—Specifies UGA IO protocol.  
         [1007]     ParentDevice—Specifies UGA parent device. NULL inticates root of the.  
         [1008]     enumeration—UGA device object for UgaDtParentBus will be created.  
         [1009]     DeviceData—Specifies UGA device data.  
         [1010]     RunTimeContext—Specifies run-time environment specific context.  
         [1011]     Device—Specifies storage for pointer to created UGA device.  
         [1012]     Return Value:  
                                    EFI status code.       −−*/       {        EFI_UGA_IO_PROTOCOL_CONTEXT *UgaIoContext;        EFI_STATUS EfiStatus = EFI_SUCCESS;        EFI_PCI_IO_PROTOCOL *PciIo = NULL;        UGA_DEVICE *NewDevice = NULL;        VOID *DeviceContext = NULL;        VOID *SharedContext = NULL;        ASSERT(This != NULL);        ASSERT(DeviceData != NULL);        ASSERT(Device != NULL);        //        // Get UGA IO protocol context.        //        UgaIoContext = EFI_UGA_IO_PROTOCOL_CR(This);        //        // Check if root of enumeration.        //        if (ParentDevice == NULL)        {         //         // Root device - open PCI IO protocol and fill in default device       data.         //         EfiStatus = gBS-&gt;OpenProtocol(          UgaIoContext-&gt;Controller,          &amp;gEfiPciIoProtocolGuid,          &amp;PciIo,          gMyImageHandle,          UgaIoContext-&gt;Controller,          EFI_OPEN_PROTOCOL_BY_DRIVER);         if (!EFI_ERROR(EfiStatus))         {          DeviceData-&gt;deviceType = UgaDtParentBus;          DeviceData-&gt;deviceId = 0;          DeviceData-&gt;ui32SharedContextSize = 0;          DeviceData-&gt;ui32DeviceContextSize = 0;         }        }        else        {         PciIo = (EFI_PCI_IO_PROTOCOL *)         (ParentDevice-&gt;pvBusIoServices);        }        //        // Allocate context data for UGA device.        //        if (!EFI_ERROR(EfiStatus))        {         EfiStatus = gBS-&gt;AllocatePool(          EfiBootServicesData,          sizeof (UGA_DEVICE),          &amp;NewDevice);        }        if (!EFI_ERROR(EfiStatus))        {         if (DeviceData-&gt;ui32DeviceContextSize)         {          EfiStatus = gBS-&gt;AllocatePool(           EfiBootServicesData,           DeviceData-&gt;ui32DeviceContextSize,           &amp;DeviceContext);         }         else         {          DeviceContext = NULL;         }        }        if (!EFI_ERROR(EfiStatus))        {         if (DeviceData-&gt;ui32SharedContextSize)         {          EfiStatus = gBS-&gt;AllocatePool(           EfiBootServicesData,           DeviceData-&gt;ui32SharedContextSize,           &amp;SharedContext);         }         else if (ParentDevice)         {          SharedContext = ParentDevice-&gt;pvSharedContext;         }         else         {          SharedContext = NULL;         }        }        //        // Set up device context record.        //        if (!EFI_ERROR(EfiStatus))        {         NewDevice-&gt;pvDeviceContext = DeviceContext;         NewDevice-&gt;pvSharedContext = SharedContext;         NewDevice-&gt;pvRunTimeContext = RunTimeContext;         NewDevice-&gt;pParentDevice = ParentDevice;         NewDevice-&gt;pvBusIoServices = PciIo;         NewDevice-&gt;pvStdIoServices = gBS;         gBS-&gt;CopyMem(&amp;(NewDevice-&gt;deviceData), DeviceData, sizeof       (UGA_DEVICE_DATA));        }        //        // Clean-up if anything failed.        //        if (EFI_ERROR(EfiStatus))        {         if ((ParentDevice == NULL) &amp;&amp; PciIo)         {          gBS-&gt;CloseProtocol(           UgaIoContext-&gt;Controller,           &amp;gEfiPciIoprotocolGuid,           gMyImageHandle,           UgaIoContext-&gt;Controller);          PciIo = NULL;         }         if (DeviceData-&gt;ui32SharedContextSize &amp;&amp; SharedContext)         {          gBS-&gt;FreePool(SharedContext);          SharedContext = NULL;         }         if (DeviceContext)         {          gBS-&gt;FreePool(DeviceContext);          DeviceContext = NULL;         }         if (NewDevice)         {          gBS-&gt;FreePool(NewDevice);          NewDevice = NULL;         }        }        *Device = NewDevice;        return EfiStatus;       }       EFI_STATUS       EFIAPI       EfiUgaDeleteDevice(        IN EFI_UGA_IO_PROTOCOL *This,        IN UGA_DEVICE *Device        )       /*++                  
 
 Routine Description: 
 
         [1013]     This routine deletes UGA device object.  
         [0000]     Arguments:  
         [1014]     This—Specifies UGA IO protocol.  
         [1015]     Device—Specifies UGA device object to delete.  
         [1016]     Return Value:  
                                                                                                                                                               EFI status code.            −−*/       {                EFI_UGA_IO_PROTOCOL_CONTEXT *UgaIoContext;           ASSERT(This != NULL);           ASSERT(Device != NULL);           UgaIoContext = EFI_UGA_IO_PROTOCOL_CR(This);           //           // Check if root device.           //           if (Device-&gt;pParentDevice == NULL)           {                //           // Root device - close PCI IO protocol.           //           gBS-&gt;CloseProtocol(                UgaIoContext-&gt;Controller,           &amp;gEfiPciIoProtocolGuid,           gMyImageHandle,           UgaIoContext-&gt;Controller);                }           //           // Free context data.           //           // Note: Shared context was only allocated for UGA devices with           // non-zero deviceData.ui64SharedContextSize.           //           if (Device-&gt;deviceData.ui32SharedContextSize)           {                gBS-&gt;FreePool(Device-&gt;pvSharedContext);                }           if (Device-&gt;pvDeviceContext)           {                gBS-&gt;FreePool(Device-&gt;pvDeviceContext);                }           gBS-&gt;FreePool(Device);             /*++                return EFI_SUCCESS;            }                  
 
 2.2 UGA Firmware Interface Implementation Sample 
 
         [1017]     This code and information is provided “as is” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.  
         [0000]     Copyright (c) 2000-2001 Microsoft Corporation  
         [0000]     Module Name:  
         [1018]     dispatch.c  
         [0000]     Abstract:  
         [1019]     This is the UGA firmware driver implementation template.  
         [1020]     This module contains dispatch routines for UGA services.  
         [1021]     This template assumes following sample logical layout of UGA adapter:  
                         
 
 Author: 
 
         [1022]     Michael Maciesowicz (mmacie) 30 Oct. 2000  
         [0000]     Environment:  
         [1023]     Firmware boot-time and OS kernel mode run-time.  
         [0000]     Notes:  
         [1024]     Revision History:  
                                                   −−*/           #include “ugafw.h”           UGA_STATUS           UGA_FW_CALL_TYPE_API           UgaFwDispatchService(            IN PUGA_DEVICE pDevice,            IN OUT PUGA_IO_REQUEST pIoRequest            )           /*++                      
 
 Routine Description: 
 
         [1025]     This is a main UGA firmware service dispatch routine.  
         [1026]     This is a required method.  
         [0000]     Arguments:  
         [1027]     pDevice—Specifies a device object associated with an enumerated UGA device.  
         [1028]     pIoRequest—Points to UGA IO request packet.  
         [1029]     Return Value:  
                                                                                                                                                                                                     UGA status code.            −−*/       {                UGA_STATUS ugaStatus;           UGA_DEVICE_TYPE ugaDeviceType;           static PUGA_FW_SERVICE apUgaFwService[ ] =           {                UgaFwDispatchService_UgaDtParentBus,           UgaFwDispatchService_UgaDtGraphicsController,           UgaFwDispatchService_UgaDtOutputController,           UgaFwDispatchService_UgaDtOutputPort,           UgaFwDispatchService_UgaDtOther                };           ASSERT(NULL != pDevice);           ASSERT(NULL != pIoRequest);           //           // Get device type associated with passed UGA_DEVICE object.           //           ugaStatus = VmlGetDeviceType(pDevice, &amp;ugaDeviceType);           //           // VmlGetDeviceType( ) call should never fail.           //           ASSERT(UGA_SUCCESS(ugaStatus));           //           // Dispatch service request to dispatch routine for given device            type.                //           if ((ugaDeviceType &lt; UgaDtParentBus) || (ugaDeviceType &gt;            UgaDtOther))                {                ASSERT(FALSE);           //           // Set number of bytes returned and status code.           //           pIoRequest-&gt;ui64BytesReturned = 0;           ugaStatus = UGA_STATUS_INVALID_DEVICE;                }           else           {                ugaStatus = (*apUgaFwService[ugaDeviceType − 1])(pDevice,            pIoRequest);                }           return ugaStatus;            }   // UgaFwDispatchService( )            UGA_STATUS       UGA_FW_CALL_TYPE_SERVICE       UgaFwDispatchService_UgaDtParentBus(                IN PUGA_DEVICE pDevice,           IN OUT PUGA_IO_REQUEST pIoRequest           }            /*++                  
 
 Routine Description: 
 
         [1030]     This is UGA firmware service dispatch routine for parent bus.  
         [1031]     This is a required method.  
         [0000]     Arguments:  
         [1032]     pDevice—Specifies a device object associated with an enumerated UGA device.  
         [1033]     pIoRequest—Points to UGA IO request packet.  
         [1034]     Return Value:  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         UGA status code.            −−*/       {                UGA_STATUS ugaStatus;           static PUGA_FW_SERVICE apUgaFwService[ ] =           {                Common_UgaFwGetVersion,   //            UgaIoGetVersion                UgaDtParentBus_UgaFwGetChildDevice,   //            UgaIoGetChildDevice                NULL,   //            UgaIoStartDevice                NULL,   //            UgaIoStopDevice                NULL,   //            UgaIoFlushDevice                NULL,   //            UgaIoResetDevice                NULL,   //            UgaIoGetDeviceState                NULL,   //            UgaIoSetDeviceState                NULL,   //            UgaIoSetPowerState                NULL,   //            UgaIoGetMemoryConfiguration                NULL,   //            UgaIoSetVideoMode                NULL,   //            UgaIoCopyRectangle                NULL,   //            UgaIoGetEdidSegment                NULL,   //            UgaIoDeviceChannelOpen                NULL,   //            UgaIoDeviceChannelClose                NULL,   //            UgaIoDeviceChannelRead                NULL,   //            UgaIoDeviceChannelWrite                NULL,   //            UgaIoGetPersistentDataSize                NULL,   //            UgaIoGetPersistentData                NULL,   //            UgaIoSetPersistentData                NULL,   //            UgaIoGetDevicePropertySize                NULL,   //            UgaIoGetDeviceProperty                NULL   //            UgaIoBtPrivateInterface                };           ASSERT(NULL != pDevice);           ASSERT(NULL != pIoRequest);           //           // Dispatch service request.           //           ugaStatus = UgaFwDispatchDeviceService(pDevice, pIoRequest,            apUgaFwService);                return ugaStatus;            }   // UgaFwDispatchService_UgaDtParentBus( )            UGA_STATUS       UGA_FW_CALL_TYPE_SERVICE       UgaFwDispatchService_UgaDtGraPhicsController(                IN PUGA_DEVICE pDevice,           IN OUT PUGA_IO_REQUEST pIoRequest            /*++                  
 
 Routine Description: 
 
         [1035]     This is UGA firmware service dispatch routine for graphics controller.  
         [1036]     This is a required method.  
         [0000]     Arguments:  
         [1037]     pDevice—Specifies a device object associated with an enumerated UGA device.  
         [1038]     pIoRequest—Points to UGA IO request packet.  
         [1039]     Return Value:  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                UGA status code.       −−*/       {        UGA_STATUS ugaStatus;        static PUGA_FW_SERVICE apUgaFwService[ ] =        {                Common_UgaFwGetVersion,   //            UgaIoGetVersion                UgaDtGraphicsController_UgaFwGetChildDevice,   //            UgaIoGetChildDevice                UgaDtGraphicsController_UgaFwStartDevice,   //            UgaIoStopDevice                UgaDtGraphicsController_UgaFwStopDevice,   //            UgaIoStopDevice                UgaDtGraphicsController_UgaFwFlushDevice,   //            UgaIoFlushDevice                UgaDtGraphicsController_UgaFwResetDevice,   //            UgaIoResetDevice                UgaDtGraphicsController_UgaFwSetDeviceState,   //            UgaIoGetDeviceState                UgaDtGraphicsController_UgaFwSetDeviceState,   //            UgaIoGetDeviceState                UgaDtGraphicsController_UgaFwSetPowerState,   //            UgaIoSetPowerState                UgaDtGraphicsController_UgaFwGetMemoryConfiguration,   //            UgaIoGetMemoryConfiguration                NULL,   //            UgaIoSetVideoMode                NULL,   //            UgaIoCopyRectangle                NULL,   //            UgaIoGetEdidSegment                UgaDtGraphicsController_UgaFwDeviceChannelOpen,   //            UgaIoDeviceChannelOpen                UgaDtGraphicsController_UgaFwDeviceChannelClose,   //            UgaIoDeviceChannelClose                UgaDtGraphicsController_UgaFwDeviceChannelRead,   //            UgaIoDeviceChannelRead                UgaDtGraphicsController_UgaFwDeviceChannelWrite,   //            UgaIoDeviceChannelWrite                UgaoDtGraphicsController_UgaFwGetpersistentDatasize,   //            UgaIoGetPersistentDataSize                UgaDtGraphicsController_UgaFwGetPersistentData,   //            UgaIoGetPersistentData                UgaDtGraphicsController_UgaFwSetPersistentData,   //            UgaIoSetPersistentData                UgaDtGraphicsController_UgaFwGetDevicePropertysize,   //            UgaIoGetDevicePropertySize                UgaDtGraphicsController_UgaFwGetDeviceProperty,   //            UgaIoGetDeviceProperty                UgaDtGraphicsController_UgaFwBtPrivateInterface   //            UgaIoBtPrivateInterface        };        ASSERT(NULL != pDevice);        ASSERT(NULL != pIoRequest);        //        // Dispatch service request.        //        ugaStatus = UgaFwDispatchDeviceService(pDevice, pIoRequest.       apUgaFwService);        return ugaStatus;       } // UgaFwDispatchService_UgaDtGraphicsController( )       UGA_STATUS       UGA_FW_CALL_TYPE_SERVICE       UgaFwDispatchService_UgaDtOutputController(        IN PUGA_DEVICE pDevice,        IN OUT PUGA_IO_REQUEST pIoRequest        )       /*++                  
 
 Routine Description: 
 
         [1040]     This is UGA firmware service dispatch routine for output controller.  
         [1041]     This is a required method.  
         [0000]     Arguments:  
         [1042]     pDevice—Specifies a device object associated with an enumerated UGA device.  
         [1043]     pIoRequest—Points to UGA IO request packet.  
         [1044]     Return Value:  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         UGA status code.            −−*/       {                UGA_STATUS ugaStatus;           static PUGA_FW_SERVICE apUgaFwService[ ] =           {                Common_UgaFwGetVersion,   //            UgaIoGetVersion                UgaDtOutputController_UgaFwGetChildDevice,   //            UgaIoGetChildDevice                UgaDtOutputController_UgaFwStartDevice,   //            UgaIoStartDevice                UgaDtOutputController_UgaFwStopDevice,   //            UgaIoStopDevice                UgaDtOutputController_UgaFwFlushDevice,   //            UgaIoFlushDevice                UgaDtOutputController_UgaFwResetDevice,   //            UgaIoResetDevice                UgaDtOutputController_UgaFwGetDeviceState,   //            UgaIoGetDeviceState                UgaDtOutputController_UgaFwSetDeviceState,   //            UgaIoSetDeviceState                UgaDtOutputController_UgaFwSetPowerState,   //            UgaIoSetPowerState                UgaDtOutputController_UgaFwGetMemoryConfiguration,   //            UgaIoGetMemoryConfiguration                UgaDtOutputController_UgaFwSetVideoMode,   //            UgaIoSetVideoMode                UgaDtOutputController_UgaFwCopyRectangle,   //            UgaIoCopyRectangle                UgaDtOutputController_UgaFwGetEdidSegment,   //            UgaIoGetEdidSegment                UgaDtOutputController_UgaFwDeviceChannelOpen,   //            UgaIoDeviceChannelOpen                UgaDtOutputController_UgaFwDeviceChannelClose,   //            UgaIoDeviceChannelClose                UgaDtOutputController_UgaFwDeviceChannelRead,   //            UgaIoDeviceChannelRead                UgaDtOutputController_UgaFwDeviceChannelWrite,   //            UgaIoDeviceChannelWrite                UgaDtOutputController_UgaFwGetPersistentDataSize,   //            UgaIoGetPersistentDataSize                UgaDtOutputController_UgaFwGetPersistentData,   //            UgaIoGetPersistentData                UgaDtOutputController_UgaFwSetPersistentData,   //            UgaIoSetPersistentData                UgaDtOutputController_UgaFwGetDevicePropertySize,   //            UgaIoGetDevicePropertySize                UgaDtOutputController_UgaFwGetDeviceProperty,   //            UgaIoGetDeviceProperty                UgaDtOutputController_UgaFwBtPrivateInterface   //            UgaIoBtPrivateInterface                };           ASSERT(NULL != pDevice);           ASSERT(NULL != pIoRequest);           //           // Dispatch service request.           //           ugaStatus = UgaFwDispatchDeviceService(pDevice, pIoRequest,            apUgaFwService);                return ugaStatus;            }   // UgaFwDispatchService_UgaDtOutputController( )            UGA_STATUS       UGA_FW_CALL_TYPE_SERVICE       UgaFwDispatchService_UgaDtOutputPort(                IN PUGA_DEVICE pDevice,           IN OUT PUGA_IO_REQUEST pIoRequest           )            /*++                  
 
 Routine Description: 
 
         [1045]     This is UGA firmware service dispatch routine for output port.  
         [1046]     This is a required method.  
         [0000]     Arguments:  
         [1047]     pDevice—Specifies a device object associated with an enumerated UGA device.  
         [1048]     pIoRequest—Points to UGA IO request packet.  
         [1049]     Return Value:  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         UGA status code.            −−*/       {                UGA_STATUS ugaStatus;           static PUGA_FW_SERVICE apUgaFwService[ ] =           {                Common_UgaFwGetVersion,   //            UgaIoGetVersion                UgaDtOutputPort_UgaFwGetChildDevice,   //            UgaIoGetChildDevice                UgaDtOutputPort_UgaFwStartDevice,   //            UgaIoStartDevice                UgaDtOutputPort_UgaFwStopDevice,   //            UgaIoStopDevice                UgaDtOutputPort_UgaFwFlushDevice,   //            UgaIoFlushDevice                UgaDtOutputPort_UgaFwResetDevice,   //            UgaIoResetDevice                UgaDtOutputPort_UgaFwGetDeviceState,   //            UgaIoGetDeviceState                UgaDtOutputPort_UgaFwSetDeviceState,   //            UgaIoSetDeviceState                UgaDtOutputPort_UgaFwSetPowerState,   //            UgaIoSetPowerState                NULL,   //            UgaIoGetMemoryConfiguration                NULL,   //            UgaIoSetVideoMode                NULL,   //            UgaIoCopyRectangle                UgaDtOutputPort_UgaFwGetEdidSegment,   //            UgaIoGetEdidSegment                UgaDtOutputPort_UgaFwDeviceChannelOpen,   //            UgaIoDeviceChannelOpen                UgaDtOutputPort_UgaFwDeviceChannelClose,   //            UgaIoDeviceChannelClose                UgaDtOutputPort_UgaFwDeviceChannelRead,   //            UgaIoDeviceChannelRead                UgaDtOutputPort_UgaFwDeviceChannelWrite,   //            UgaIoDeviceChannelWrite                UgaDtOutputPort_UgaFwGetPersistentDataSize,   //            UgaIoGetPersistentDataSize                UgaDtOutputPort_UgaFwGetPersistentData,   //            UgaIoGetPersistentData                UgaDtOutputPort_UgaFwSetPersistentData,   //            UgaIoSetPersistentData                UgaDtOutputPort_UgaFwGetDevicePropertySize,   //            UgaIoGetDevicePropertySize                UgaDtOutputPort_UgaFwGetDeviceProperty,   //            UgaIoGetDeviceProperty                UgaDtOutputPort_UgaFwBtPrivateInterface   //            UgaIoBtPrivateInterface                };           ASSERT(NULL != pDevice);           ASSERT(NULL != pIoRequest);           //           // Dispatch service request.           //           ugaStatus = UgaFwDispatchDeviceService(pDevice, pIoRequest,            apUgaFwService);                return ugaStatus;            }   // UgaFwDispatchService_UgaDtOutputPort( )            UGA_STATUS       UGA_FW_CALL_TYPE_SERVICE       UgaFwDispatchService_UgaDtOther(                IN PUGA_DEVICE pDevice,           IN OUT PUGA_IO_REQUEST pIoRequest           )            /*++                  
 
 Routine Description: 
 
         [1050]     This is UGA firmware service dispatch routine for other device.  
         [1051]     This is an optional method.  
         [0000]     Arguments:  
         [1052]     pDevice—Specifies a device object associated with an enumerated UGA device.  
         [1053]     pIoRequest—Points to UGA IO request packet.  
         [1054]     Return Value:  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     UGA status code.            −−*/       {                UGA_STATUS ugaStatus;           static PUGA_FW_SERVICE apUgaFwService[ ] =           {                Common_UgaFwGetVersion,   //            UgaIoGetVersion                UgaDtOther_UgaFwGetChildDevice,   //            UgaIoGetChildDevice                UgaDtOther_UgaFwStartDevice,   //            UgaIoStartDevice                UgaDtOther_UgaFwStopDevice,   //            UgaIoStopDevice                UgaDtother_UgaFwFlushDevice,   //            UgaIoFlushDevice                UgaDtOther_UgaFwResetDevice,   //            UgaIoResetDevice                UgaDtOther_UgaFwGetDeviceState,   //            UgaIoGetDeviceState                UgaDtOther_UgaFwSetDeviceState,   //            UgaIoSetDeviceState                UgaDtOther_UgaFwSetPowerState,   //            UgaIoSetPowerState                NULL,   //            UgaIoGetMemoryConfiguration                NULL,   //            UgaIoSetVideoMode                NULL,   //            UgaIoCopyRectangle                NULL,   //            UgaIoGetEdidSegment                UgaDtOther_UgaFwDeviceChannelOpen,   //            UgaIoDeviceChannelOpen                UgaDtOther_UgaFwDeviceChannelClose,   //            UgaIoDeviceChannelClose                UgaDtOther_UgaFwDeviceChannelRead,   //            UgaIoDeviceChannelRead                UgaDtOther_UgaFwDeviceChannelWrite,   //            UgaIoDeviceChannelWrite                UgaDtOther_UgaFwGetPersistentDataSize,   //            UgaIoGetPersistentDataSize                UgaDtOther_UgaFwGetPersistentData,   //            UgaIoGetPersistentData                UgaDtOther_ugaFwSetPersistentData,   //            UgaIoSetPersistentData                UgaDtOther_UgaFwGetDevicePropertySize,   //            UgaIoGetDevicePropertySize                UgaDtOther_UgaFwGetDeviceProperty,   //            UgaIoGetDeviceProperty                UgaDtOther_UgaFwBtPrivateInterface //            UgaIoBtPrivateInterface                };           ASSERT(NULL != pDevice);           ASSERT(NULL != pIoRequest);           //           // Dispatch service request.           //           ugaStatus = UgaFwDispatchDeviceService(pDevice, pIoRequest,            apUgaFwService);                return ugaStatus;            }   // UgaFwDispatchService_UgaDtOther( )            UGA_STATUS       UgaFwDispatchDeviceService(                IN PUGA_DEVICE pDevice,           IN OUT PUGA_IO_REQUEST pIoRequest,           IN PUGA_FW_SERVICE *ppUgaFwService           )            /*++                  
 
 Routine Description: 
 
         [1055]     This is UGA firmware service dispatch routine for passed in device type specific dispatch table.  
         [1056]     This is an optional method.  
         [0000]     Arguments:  
         [1057]     pDevice—Specifies a device object associated with an enumerated UGA device.  
         [1058]     pIoRequest—Points to UGA IO request packet.  
         [1059]     ppUgaFwService—Points od array of pointers to device type specific UGA services.  
         [1060]     Return Value:  
                                                                                                                                                                   UGA status code.            −−*/       {                UGA_STATUS ugaStatus;           ASSERT(NULL != pDevice);           ASSERT(NULL != pIoRequest);           ASSERT(NULL != ppUgaFwService);           //           // Dispatch device type specific service request.           //           if (pIoRequest-&gt;ioRequestCode &lt; UgaIoGetVersion)           {                ASSERT(FALSE);           //           // Set number of bytes returned and status code.           //           pIoRequest-&gt;ui64BytesReturned = 0;           ugaStatus = UGA_STATUS_INVALID_FUNCTION;                }           else if (pIoRequest-&gt;ioRequestCode &gt; UgaIoBtPrivateInterface)           {                //           // Set number of bytes returned and status code.           //           pIoRequest-&gt;ui64BytesReturned = 0;           ugaStatus = UGA_STATUS_UNSUPPORTED;                }           else if (NULL == ppUgaFwService[pIoRequest-&gt;ioRequestCode −           1])           {                //           // Set number of bytes returned and status code.           //           pIoRequest-&gt;ui64BytesReturned = 0;           ugaStatus = UGA_STATUS_UNSUPPORTED;                }           else           {                ugaStatus = (*ppUgaFwService[pIoRequest-&gt;ioRequestCode −            1]) (pDevice, pIoRequest);                }           return ugaStatus;            }   // UgaFwDispatchDeviceService( )