Changeset 58466 in vbox for trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg
- Timestamp:
- Oct 29, 2015 4:30:44 AM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 202 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
- Property svn:mergeinfo changed
/vendor/edk2/current merged: 103769-103776
- Property svn:mergeinfo changed
-
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/InternalIsaBus.h
r48674 r58466 1 1 /** @file 2 2 The header file for ISA bus driver 3 3 4 4 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 158 158 // 159 159 160 /** 161 Tests to see if a controller can be managed by the ISA Bus Driver. If a child device is provided, 160 /** 161 Tests to see if a controller can be managed by the ISA Bus Driver. If a child device is provided, 162 162 it further tests to see if this driver supports creating a handle for the specified child device. 163 163 … … 165 165 How the Start() function of a driver is implemented can affect how the Supported() function is implemented. 166 166 167 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 167 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 168 168 @param[in] Controller The handle of the controller to test. 169 169 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. 170 170 171 171 @retval EFI_SUCCESS The device is supported by this driver. 172 172 @retval EFI_ALREADY_STARTED The device is already being managed by this driver. 173 @retval EFI_ACCESS_DENIED The device is already being managed by a different driver 173 @retval EFI_ACCESS_DENIED The device is already being managed by a different driver 174 174 or an application that requires exclusive access. 175 175 @retval EFI_UNSUPPORTED The device is is not supported by this driver. … … 185 185 186 186 /** 187 Start this driver on ControllerHandle. 188 187 Start this driver on ControllerHandle. 188 189 189 Note that the ISA Bus driver always creates all of its child handles on the first call to Start(). 190 The Start() function is designed to be invoked from the EFI boot service ConnectController(). 191 As a result, much of the error checking on the parameters to Start() has been moved into this 192 common boot service. It is legal to call Start() from other locations, but the following calling 190 The Start() function is designed to be invoked from the EFI boot service ConnectController(). 191 As a result, much of the error checking on the parameters to Start() has been moved into this 192 common boot service. It is legal to call Start() from other locations, but the following calling 193 193 restrictions must be followed or the system behavior will not be deterministic. 194 194 1. ControllerHandle must be a valid EFI_HANDLE. … … 196 196 EFI_DEVICE_PATH_PROTOCOL. 197 197 3. Prior to calling Start(), the Supported() function for the driver specified by This must 198 have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. 198 have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. 199 199 200 200 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 201 @param[in] ControllerHandle The handle of the controller to start. This handle 202 must support a protocol interface that supplies 201 @param[in] ControllerHandle The handle of the controller to start. This handle 202 must support a protocol interface that supplies 203 203 an I/O abstraction to the driver. 204 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. 204 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. 205 205 This parameter is ignored by device drivers, and is optional for bus drivers. 206 206 … … 220 220 221 221 /** 222 Stop this driver on ControllerHandle. 223 224 The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). 225 As a result, much of the error checking on the parameters to Stop() has been moved 226 into this common boot service. It is legal to call Stop() from other locations, 222 Stop this driver on ControllerHandle. 223 224 The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). 225 As a result, much of the error checking on the parameters to Stop() has been moved 226 into this common boot service. It is legal to call Stop() from other locations, 227 227 but the following calling restrictions must be followed or the system behavior will not be deterministic. 228 228 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this … … 232 232 Start() function, and the Start() function must have called OpenProtocol() on 233 233 ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. 234 234 235 235 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 236 @param[in] ControllerHandle A handle to the device being stopped. The handle must 237 support a bus specific I/O protocol for the driver 236 @param[in] ControllerHandle A handle to the device being stopped. The handle must 237 support a bus specific I/O protocol for the driver 238 238 to use to stop the device. 239 239 @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer. 240 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL 240 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL 241 241 if NumberOfChildren is 0. 242 242 … … 258 258 259 259 /** 260 Create EFI Handle for a ISA device found via ISA ACPI Protocol 260 Create EFI Handle for a ISA device found via ISA ACPI Protocol 261 261 262 262 @param[in] This The EFI_DRIVER_BINDING_PROTOCOL instance. 263 263 @param[in] Controller The handle of ISA bus controller(PCI to ISA bridge) 264 @param[in] PciIo The Pointer to the PCI protocol 264 @param[in] PciIo The Pointer to the PCI protocol 265 265 @param[in] ParentDevicePath Device path of the ISA bus controller 266 266 @param[in] IsaDeviceResourceList The resource list of the ISA device … … 286 286 @param[in] IsaIoDevice The iso device to be initialized. 287 287 @param[in] IsaDeviceResourceList The resource list. 288 288 289 289 **/ 290 290 VOID -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/InternalIsaIo.h
r48674 r58466 1 1 /** @file 2 2 The header file for EFI_ISA_IO protocol implementation. 3 3 4 4 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 35 35 @param[in] Type The Access type. The input must be either IsaAccessTypeMem or IsaAccessTypeIo. 36 36 @param[in] Width The width of the memory operation. 37 @param[in] Count The number of memory operations to perform. 38 @param[in] Offset The offset in ISA memory space to start the memory operation. 39 37 @param[in] Count The number of memory operations to perform. 38 @param[in] Offset The offset in ISA memory space to start the memory operation. 39 40 40 @retval EFI_SUCCESS Verify success. 41 41 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value. … … 50 50 IN UINT32 Offset 51 51 ); 52 52 53 53 /** 54 54 Performs an ISA I/O Read Cycle … … 56 56 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 57 57 @param[in] Width Specifies the width of the I/O operation. 58 @param[in] Offset The offset in ISA I/O space to start the I/O operation. 59 @param[in] Count The number of I/O operations to perform. 58 @param[in] Offset The offset in ISA I/O space to start the I/O operation. 59 @param[in] Count The number of I/O operations to perform. 60 60 @param[out] Buffer The destination buffer to store the results 61 61 … … 80 80 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 81 81 @param[in] Width Specifies the width of the I/O operation. 82 @param[in] Offset The offset in ISA I/O space to start the I/O operation. 83 @param[in] Count The number of I/O operations to perform. 82 @param[in] Offset The offset in ISA I/O space to start the I/O operation. 83 @param[in] Count The number of I/O operations to perform. 84 84 @param[in] Buffer The source buffer to write data from 85 85 … … 103 103 104 104 @param This A pointer to the EFI_ISA_IO_PROTOCOL instance. 105 @param Operation Indicates the type of DMA (slave or bus master), and if 106 the DMA operation is going to read or write to system memory. 107 @param ChannelNumber The slave channel number to use for this DMA operation. 108 If Operation and ChannelAttributes shows that this device 109 performs bus mastering DMA, then this field is ignored. 110 The legal range for this field is 0..7. 105 @param Operation Indicates the type of DMA (slave or bus master), and if 106 the DMA operation is going to read or write to system memory. 107 @param ChannelNumber The slave channel number to use for this DMA operation. 108 If Operation and ChannelAttributes shows that this device 109 performs bus mastering DMA, then this field is ignored. 110 The legal range for this field is 0..7. 111 111 @param ChannelAttributes The attributes of the DMA channel to use for this DMA operation 112 @param HostAddress The system memory address to map to the device. 113 @param NumberOfBytes On input the number of bytes to map. On output the number 112 @param HostAddress The system memory address to map to the device. 113 @param NumberOfBytes On input the number of bytes to map. On output the number 114 114 of bytes that were mapped. 115 @param DeviceAddress The resulting map address for the bus master device to use 116 to access the hosts HostAddress. 115 @param DeviceAddress The resulting map address for the bus master device to use 116 to access the hosts HostAddress. 117 117 @param Mapping A resulting value to pass to EFI_ISA_IO.Unmap(). 118 118 … … 174 174 @param[in] CountOffset The count's offset. 175 175 @param[in] BaseAddress The base address. 176 @param[in] Count The number of I/O operations to perform. 177 176 @param[in] Count The number of I/O operations to perform. 177 178 178 @retval EFI_SUCCESS Success. 179 179 @retval EFI_INVALID_PARAMETER Parameter is invalid. … … 195 195 196 196 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 197 @param[in] Offset The offset in ISA IO space to start the IO operation. 197 @param[in] Offset The offset in ISA IO space to start the IO operation. 198 198 @param[in] Value The data to write port. 199 199 … … 208 208 IN UINT32 Offset, 209 209 IN UINT8 Value 210 ); 210 ); 211 211 212 212 /** … … 215 215 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 216 216 @param[in] Width Specifies the width of the memory operation. 217 @param[in] Offset The offset in ISA memory space to start the memory operation. 218 @param[in] Count The number of memory operations to perform. 217 @param[in] Offset The offset in ISA memory space to start the memory operation. 218 @param[in] Count The number of memory operations to perform. 219 219 @param[out] Buffer The destination buffer to store the results 220 220 221 221 @retval EFI_SUCCESS The data was read from the device successfully. 222 222 @retval EFI_UNSUPPORTED The Offset is not valid for this device. … … 238 238 Performs an ISA Memory Write Cycle 239 239 240 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 240 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 241 241 @param[in] Width Specifies the width of the memory operation. 242 @param[in] Offset The offset in ISA memory space to start the memory operation. 243 @param[in] Count The number of memory operations to perform. 242 @param[in] Offset The offset in ISA memory space to start the memory operation. 243 @param[in] Count The number of memory operations to perform. 244 244 @param[in] Buffer The source buffer to write data from 245 245 … … 264 264 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 265 265 @param[in] Width Specifies the width of the memory copy operation. 266 @param[in] DestOffset The offset of the destination 266 @param[in] DestOffset The offset of the destination 267 267 @param[in] SrcOffset The offset of the source 268 268 @param[in] Count The number of memory copy operations to perform … … 295 295 @retval EFI_SUCCESS The requested memory pages were allocated. 296 296 @retval EFI_INVALID_PARAMETER Type is invalid or MemoryType is invalid or HostAddress is NULL 297 @retval EFI_UNSUPPORTED Attributes is unsupported or the memory range specified 297 @retval EFI_UNSUPPORTED Attributes is unsupported or the memory range specified 298 298 by HostAddress, Pages, and Type is not available for common buffer use. 299 299 @retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated. … … 311 311 312 312 /** 313 Frees memory that was allocated with EFI_ISA_IO.AllocateBuffer(). 313 Frees memory that was allocated with EFI_ISA_IO.AllocateBuffer(). 314 314 315 315 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBus.c
r58459 r58466 2 2 ISA Bus UEFI driver. 3 3 4 Discovers all the ISA Controllers and their resources by using the ISA ACPI 5 Protocol, produces an instance of the ISA I/O Protocol for every ISA 4 Discovers all the ISA Controllers and their resources by using the ISA ACPI 5 Protocol, produces an instance of the ISA I/O Protocol for every ISA 6 6 Controller found. This driver is designed to manage a PCI-to-ISA bridge Device 7 7 such as LPC bridge. 8 8 9 9 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 10 10 This program and the accompanying materials … … 35 35 The main entry point for the ISA Bus driver. 36 36 37 @param[in] ImageHandle The firmware allocated handle for the EFI image. 37 @param[in] ImageHandle The firmware allocated handle for the EFI image. 38 38 @param[in] SystemTable A pointer to the EFI System Table. 39 39 40 40 @retval EFI_SUCCESS The entry point is executed successfully. 41 41 @retval EFI_OUT_OF_RESOURCES There was not enough memory in pool to install all the protocols. … … 66 66 } 67 67 68 /** 69 Tests to see if a controller can be managed by the ISA Bus Driver. If a child device is provided, 68 /** 69 Tests to see if a controller can be managed by the ISA Bus Driver. If a child device is provided, 70 70 it further tests to see if this driver supports creating a handle for the specified child device. 71 71 … … 73 73 How the Start() function of a driver is implemented can affect how the Supported() function is implemented. 74 74 75 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 75 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 76 76 @param[in] Controller The handle of the controller to test. 77 77 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. 78 78 79 79 @retval EFI_SUCCESS The device is supported by this driver. 80 80 @retval EFI_ALREADY_STARTED The device is already being managed by this driver. 81 @retval EFI_ACCESS_DENIED The device is already being managed by a different driver 81 @retval EFI_ACCESS_DENIED The device is already being managed by a different driver 82 82 or an application that requires exclusive access. 83 83 @retval EFI_UNSUPPORTED The device is is not supported by this driver. … … 98 98 // 99 99 // If RemainingDevicePath is not NULL, it should verify that the first device 100 // path node in RemainingDevicePath is an ACPI Device path node which is a 100 // path node in RemainingDevicePath is an ACPI Device path node which is a 101 101 // legal Device Path Node for this bus driver's children. 102 102 // … … 193 193 194 194 /** 195 Start this driver on ControllerHandle. 196 195 Start this driver on ControllerHandle. 196 197 197 Note that the ISA Bus driver always creates all of its child handles on the first call to Start(). 198 The Start() function is designed to be invoked from the EFI boot service ConnectController(). 199 As a result, much of the error checking on the parameters to Start() has been moved into this 200 common boot service. It is legal to call Start() from other locations, but the following calling 198 The Start() function is designed to be invoked from the EFI boot service ConnectController(). 199 As a result, much of the error checking on the parameters to Start() has been moved into this 200 common boot service. It is legal to call Start() from other locations, but the following calling 201 201 restrictions must be followed or the system behavior will not be deterministic. 202 202 1. ControllerHandle must be a valid EFI_HANDLE. … … 204 204 EFI_DEVICE_PATH_PROTOCOL. 205 205 3. Prior to calling Start(), the Supported() function for the driver specified by This must 206 have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. 206 have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. 207 207 208 208 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 209 @param[in] ControllerHandle The handle of the controller to start. This handle 210 must support a protocol interface that supplies 209 @param[in] ControllerHandle The handle of the controller to start. This handle 210 must support a protocol interface that supplies 211 211 an I/O abstraction to the driver. 212 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. 212 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. 213 213 This parameter is ignored by device drivers, and is optional for bus drivers. 214 214 … … 414 414 415 415 /** 416 Stop this driver on ControllerHandle. 417 418 The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). 419 As a result, much of the error checking on the parameters to Stop() has been moved 420 into this common boot service. It is legal to call Stop() from other locations, 416 Stop this driver on ControllerHandle. 417 418 The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). 419 As a result, much of the error checking on the parameters to Stop() has been moved 420 into this common boot service. It is legal to call Stop() from other locations, 421 421 but the following calling restrictions must be followed or the system behavior will not be deterministic. 422 422 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this … … 426 426 Start() function, and the Start() function must have called OpenProtocol() on 427 427 ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. 428 428 429 429 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 430 @param[in] ControllerHandle A handle to the device being stopped. The handle must 431 support a bus specific I/O protocol for the driver 430 @param[in] ControllerHandle A handle to the device being stopped. The handle must 431 support a bus specific I/O protocol for the driver 432 432 to use to stop the device. 433 433 @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer. 434 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL 434 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL 435 435 if NumberOfChildren is 0. 436 436 … … 539 539 ChildHandleBuffer[Index], 540 540 EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 541 ); 541 ); 542 542 } 543 543 } … … 560 560 561 561 /** 562 Create EFI Handle for a ISA device found via ISA ACPI Protocol 562 Create EFI Handle for a ISA device found via ISA ACPI Protocol 563 563 564 564 @param[in] This The EFI_DRIVER_BINDING_PROTOCOL instance. 565 565 @param[in] Controller The handle of ISA bus controller(PCI to ISA bridge) 566 @param[in] PciIo The Pointer to the PCI protocol 566 @param[in] PciIo The Pointer to the PCI protocol 567 567 @param[in] ParentDevicePath Device path of the ISA bus controller 568 568 @param[in] IsaDeviceResourceList The resource list of the ISA device -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaIo.c
r58459 r58466 1 1 /** @file 2 The implementation for EFI_ISA_IO_PROTOCOL. 3 2 The implementation for EFI_ISA_IO_PROTOCOL. 3 4 4 Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 19 19 // 20 20 EFI_ISA_IO_PROTOCOL mIsaIoInterface = { 21 { 21 { 22 22 IsaIoMemRead, 23 23 IsaIoMemWrite 24 24 }, 25 { 25 { 26 26 IsaIoIoRead, 27 27 IsaIoIoWrite … … 86 86 @param[in] IsaIoDevice The iso device to be initialized. 87 87 @param[in] IsaDeviceResourceList The resource list. 88 88 89 89 **/ 90 90 VOID … … 111 111 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 112 112 @param[in] Width Specifies the width of the I/O operation. 113 @param[in] Offset The offset in ISA I/O space to start the I/O operation. 114 @param[in] Count The number of I/O operations to perform. 113 @param[in] Offset The offset in ISA I/O space to start the I/O operation. 114 @param[in] Count The number of I/O operations to perform. 115 115 @param[out] Buffer The destination buffer to store the results 116 116 … … 173 173 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 174 174 @param[in] Width Specifies the width of the I/O operation. 175 @param[in] Offset The offset in ISA I/O space to start the I/O operation. 176 @param[in] Count The number of I/O operations to perform. 175 @param[in] Offset The offset in ISA I/O space to start the I/O operation. 176 @param[in] Count The number of I/O operations to perform. 177 177 @param[in] Buffer The source buffer to write data from 178 178 … … 234 234 235 235 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 236 @param[in] Offset The offset in ISA IO space to start the IO operation. 236 @param[in] Offset The offset in ISA IO space to start the IO operation. 237 237 @param[in] Value The data to write port. 238 238 … … 283 283 @param[in] CountOffset The count's offset. 284 284 @param[in] BaseAddress The base address. 285 @param[in] Count The number of I/O operations to perform. 286 285 @param[in] Count The number of I/O operations to perform. 286 287 287 @retval EFI_SUCCESS Success. 288 288 @retval EFI_INVALID_PARAMETER Parameter is invalid. … … 421 421 @param[in] Type The Access type. The input must be either IsaAccessTypeMem or IsaAccessTypeIo. 422 422 @param[in] Width The width of the memory operation. 423 @param[in] Count The number of memory operations to perform. 424 @param[in] Offset The offset in ISA memory space to start the memory operation. 425 423 @param[in] Count The number of memory operations to perform. 424 @param[in] Offset The offset in ISA memory space to start the memory operation. 425 426 426 @retval EFI_SUCCESS Verify success. 427 427 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value. … … 483 483 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 484 484 @param[in] Width Specifies the width of the memory operation. 485 @param[in] Offset The offset in ISA memory space to start the memory operation. 486 @param[in] Count The number of memory operations to perform. 485 @param[in] Offset The offset in ISA memory space to start the memory operation. 486 @param[in] Count The number of memory operations to perform. 487 487 @param[out] Buffer The destination buffer to store the results 488 488 489 489 @retval EFI_SUCCESS The data was read from the device successfully. 490 490 @retval EFI_UNSUPPORTED The Offset is not valid for this device. … … 550 550 Performs an ISA Memory Write Cycle 551 551 552 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 552 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 553 553 @param[in] Width Specifies the width of the memory operation. 554 @param[in] Offset The offset in ISA memory space to start the memory operation. 555 @param[in] Count The number of memory operations to perform. 554 @param[in] Offset The offset in ISA memory space to start the memory operation. 555 @param[in] Count The number of memory operations to perform. 556 556 @param[in] Buffer The source buffer to write data from 557 557 … … 621 621 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 622 622 @param[in] Width Specifies the width of the memory copy operation. 623 @param[in] DestOffset The offset of the destination 623 @param[in] DestOffset The offset of the destination 624 624 @param[in] SrcOffset The offset of the source 625 625 @param[in] Count The number of memory copy operations to perform … … 702 702 703 703 @param This A pointer to the EFI_ISA_IO_PROTOCOL instance. 704 @param Operation Indicates the type of DMA (slave or bus master), and if 705 the DMA operation is going to read or write to system memory. 706 @param ChannelNumber The slave channel number to use for this DMA operation. 707 If Operation and ChannelAttributes shows that this device 708 performs bus mastering DMA, then this field is ignored. 709 The legal range for this field is 0..7. 704 @param Operation Indicates the type of DMA (slave or bus master), and if 705 the DMA operation is going to read or write to system memory. 706 @param ChannelNumber The slave channel number to use for this DMA operation. 707 If Operation and ChannelAttributes shows that this device 708 performs bus mastering DMA, then this field is ignored. 709 The legal range for this field is 0..7. 710 710 @param ChannelAttributes The attributes of the DMA channel to use for this DMA operation 711 @param HostAddress The system memory address to map to the device. 712 @param NumberOfBytes On input the number of bytes to map. On output the number 711 @param HostAddress The system memory address to map to the device. 712 @param NumberOfBytes On input the number of bytes to map. On output the number 713 713 of bytes that were mapped. 714 @param DeviceAddress The resulting map address for the bus master device to use 715 to access the hosts HostAddress. 714 @param DeviceAddress The resulting map address for the bus master device to use 715 to access the hosts HostAddress. 716 716 @param Mapping A resulting value to pass to EFI_ISA_IO.Unmap(). 717 717 … … 744 744 UINT8 DmaClear; 745 745 UINT8 DmaChannelMode; 746 746 747 747 if ((NULL == This) || 748 748 (NULL == HostAddress) || … … 763 763 // Light IsaIo only supports two operations. 764 764 // 765 if (!(Operation == EfiIsaIoOperationSlaveRead || 765 if (!(Operation == EfiIsaIoOperationSlaveRead || 766 766 Operation == EfiIsaIoOperationSlaveWrite)) { 767 767 return EFI_INVALID_PARAMETER; … … 849 849 *DeviceAddress = PhysicalAddress; 850 850 } 851 851 852 852 // 853 853 // Figure out what to program into the DMA Channel Mode Register … … 934 934 935 935 /** 936 Maps a memory region for DMA. This implementation implement the 936 Maps a memory region for DMA. This implementation implement the 937 937 the full mapping support. 938 938 939 939 @param This A pointer to the EFI_ISA_IO_PROTOCOL instance. 940 @param Operation Indicates the type of DMA (slave or bus master), and if 941 the DMA operation is going to read or write to system memory. 942 @param ChannelNumber The slave channel number to use for this DMA operation. 943 If Operation and ChannelAttributes shows that this device 944 performs bus mastering DMA, then this field is ignored. 945 The legal range for this field is 0..7. 940 @param Operation Indicates the type of DMA (slave or bus master), and if 941 the DMA operation is going to read or write to system memory. 942 @param ChannelNumber The slave channel number to use for this DMA operation. 943 If Operation and ChannelAttributes shows that this device 944 performs bus mastering DMA, then this field is ignored. 945 The legal range for this field is 0..7. 946 946 @param ChannelAttributes The attributes of the DMA channel to use for this DMA operation 947 @param HostAddress The system memory address to map to the device. 948 @param NumberOfBytes On input the number of bytes to map. On output the number 947 @param HostAddress The system memory address to map to the device. 948 @param NumberOfBytes On input the number of bytes to map. On output the number 949 949 of bytes that were mapped. 950 @param DeviceAddress The resulting map address for the bus master device to use 951 to access the hosts HostAddress. 950 @param DeviceAddress The resulting map address for the bus master device to use 951 to access the hosts HostAddress. 952 952 @param Mapping A resulting value to pass to EFI_ISA_IO.Unmap(). 953 953 … … 1263 1263 1264 1264 @param This A pointer to the EFI_ISA_IO_PROTOCOL instance. 1265 @param Operation Indicates the type of DMA (slave or bus master), and if 1266 the DMA operation is going to read or write to system memory. 1267 @param ChannelNumber The slave channel number to use for this DMA operation. 1268 If Operation and ChannelAttributes shows that this device 1269 performs bus mastering DMA, then this field is ignored. 1270 The legal range for this field is 0..7. 1265 @param Operation Indicates the type of DMA (slave or bus master), and if 1266 the DMA operation is going to read or write to system memory. 1267 @param ChannelNumber The slave channel number to use for this DMA operation. 1268 If Operation and ChannelAttributes shows that this device 1269 performs bus mastering DMA, then this field is ignored. 1270 The legal range for this field is 0..7. 1271 1271 @param ChannelAttributes The attributes of the DMA channel to use for this DMA operation 1272 @param HostAddress The system memory address to map to the device. 1273 @param NumberOfBytes On input the number of bytes to map. On output the number 1272 @param HostAddress The system memory address to map to the device. 1273 @param NumberOfBytes On input the number of bytes to map. On output the number 1274 1274 of bytes that were mapped. 1275 @param DeviceAddress The resulting map address for the bus master device to use 1276 to access the hosts HostAddress. 1275 @param DeviceAddress The resulting map address for the bus master device to use 1276 to access the hosts HostAddress. 1277 1277 @param Mapping A resulting value to pass to EFI_ISA_IO.Unmap(). 1278 1278 … … 1303 1303 } 1304 1304 // 1305 // Set Feature Flag PcdIsaBusSupportBusMaster to FALSE to disable support for 1305 // Set Feature Flag PcdIsaBusSupportBusMaster to FALSE to disable support for 1306 1306 // ISA Bus Master. 1307 1307 // … … 1346 1346 @retval EFI_SUCCESS The requested memory pages were allocated. 1347 1347 @retval EFI_INVALID_PARAMETER Type is invalid or MemoryType is invalid or HostAddress is NULL 1348 @retval EFI_UNSUPPORTED Attributes is unsupported or the memory range specified 1348 @retval EFI_UNSUPPORTED Attributes is unsupported or the memory range specified 1349 1349 by HostAddress, Pages, and Type is not available for common buffer use. 1350 1350 @retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated. … … 1365 1365 1366 1366 // 1367 // Set Feature Flag PcdIsaBusOnlySupportSlaveDma to FALSE to disable support for 1367 // Set Feature Flag PcdIsaBusOnlySupportSlaveDma to FALSE to disable support for 1368 1368 // ISA Bus Master. 1369 1369 // Or unset Feature Flag PcdIsaBusSupportDma to disable support for ISA DMA. … … 1419 1419 1420 1420 /** 1421 Frees memory that was allocated with EFI_ISA_IO.AllocateBuffer(). 1421 Frees memory that was allocated with EFI_ISA_IO.AllocateBuffer(). 1422 1422 1423 1423 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. … … 1439 1439 1440 1440 // 1441 // Set Feature Flag PcdIsaBusOnlySupportSlaveDma to FALSE to disable support for 1441 // Set Feature Flag PcdIsaBusOnlySupportSlaveDma to FALSE to disable support for 1442 1442 // ISA Bus Master. 1443 1443 // Or unset Feature Flag PcdIsaBusSupportDma to disable support for ISA DMA. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppy.c
r48674 r58466 2 2 ISA Floppy Disk UEFI Driver conforming to the UEFI driver model 3 3 4 1. Support two types diskette drive 4 1. Support two types diskette drive 5 5 1.44M drive and 2.88M drive (and now only support 1.44M) 6 6 2. Support two diskette drives per floppy disk controller … … 8 8 4. Do not use interrupt 9 9 5. Support diskette change line signal and write protect 10 10 11 11 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> 12 12 This program and the accompanying materials … … 40 40 The main Entry Point for this driver. 41 41 42 @param[in] ImageHandle The firmware allocated handle for the EFI image. 42 @param[in] ImageHandle The firmware allocated handle for the EFI image. 43 43 @param[in] SystemTable A pointer to the EFI System Table. 44 44 45 45 @retval EFI_SUCCESS The entry point is executed successfully. 46 46 @retval other Some error occurs when executing this entry point. … … 73 73 /** 74 74 Test if the controller is a floppy disk drive device 75 76 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 75 76 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 77 77 @param[in] Controller The handle of the controller to test. 78 78 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. 79 79 80 80 @retval EFI_SUCCESS The device is supported by this driver. 81 81 @retval EFI_ALREADY_STARTED The device is already being managed by this driver. 82 @retval EFI_ACCESS_DENIED The device is already being managed by a different driver 82 @retval EFI_ACCESS_DENIED The device is already being managed by a different driver 83 83 or an application that requires exclusive access. 84 84 @retval EFI_UNSUPPORTED The device is is not supported by this driver. … … 160 160 161 161 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 162 @param[in] ControllerHandle The handle of the controller to start. This handle 163 must support a protocol interface that supplies 162 @param[in] ControllerHandle The handle of the controller to start. This handle 163 must support a protocol interface that supplies 164 164 an I/O abstraction to the driver. 165 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. 165 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. 166 166 This parameter is ignored by device drivers, and is optional for bus drivers. 167 167 … … 249 249 FdcDev->ControllerNameTable = NULL; 250 250 AddName (FdcDev); 251 251 252 252 // 253 253 // Look up the base address of the Floppy Disk Controller which controls this floppy device … … 398 398 399 399 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 400 @param[in] ControllerHandle A handle to the device being stopped. The handle must 401 support a bus specific I/O protocol for the driver 400 @param[in] ControllerHandle A handle to the device being stopped. The handle must 401 support a bus specific I/O protocol for the driver 402 402 to use to stop the device. 403 403 @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer. 404 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL 404 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL 405 405 if NumberOfChildren is 0. 406 406 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppy.h
r58459 r58466 1 1 /** @file 2 2 Include file for ISA Floppy Driver 3 3 4 4 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 483 483 /** 484 484 Test controller is a floppy disk drive device 485 486 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 485 486 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 487 487 @param[in] Controller The handle of the controller to test. 488 488 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. 489 489 490 490 @retval EFI_SUCCESS The device is supported by this driver. 491 491 @retval EFI_ALREADY_STARTED The device is already being managed by this driver. 492 @retval EFI_ACCESS_DENIED The device is already being managed by a different driver 492 @retval EFI_ACCESS_DENIED The device is already being managed by a different driver 493 493 or an application that requires exclusive access. 494 494 **/ … … 505 505 506 506 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 507 @param[in] ControllerHandle The handle of the controller to start. This handle 508 must support a protocol interface that supplies 507 @param[in] ControllerHandle The handle of the controller to start. This handle 508 must support a protocol interface that supplies 509 509 an I/O abstraction to the driver. 510 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. 510 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. 511 511 This parameter is ignored by device drivers, and is optional for bus drivers. 512 512 … … 529 529 530 530 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 531 @param[in] ControllerHandle A handle to the device being stopped. The handle must 532 support a bus specific I/O protocol for the driver 531 @param[in] ControllerHandle A handle to the device being stopped. The handle must 532 support a bus specific I/O protocol for the driver 533 533 to use to stop the device. 534 534 @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer. 535 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL 535 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL 536 536 if NumberOfChildren is 0. 537 537 … … 553 553 554 554 /** 555 Reset the Floppy Logic Drive, call the FddReset function. 556 555 Reset the Floppy Logic Drive, call the FddReset function. 556 557 557 @param This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface 558 @param ExtendedVerification BOOLEAN: Indicate that the driver may perform a more 559 exhaustive verification operation of the device during 560 reset, now this par is ignored in this driver 558 @param ExtendedVerification BOOLEAN: Indicate that the driver may perform a more 559 exhaustive verification operation of the device during 560 reset, now this par is ignored in this driver 561 561 @retval EFI_SUCCESS: The Floppy Logic Drive is reset 562 @retval EFI_DEVICE_ERROR: The Floppy Logic Drive is not functioning correctly 562 @retval EFI_DEVICE_ERROR: The Floppy Logic Drive is not functioning correctly 563 563 and can not be reset 564 564 … … 573 573 /** 574 574 Flush block via fdd controller. 575 575 576 576 @param This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface 577 577 @return EFI_SUCCESS … … 585 585 586 586 /** 587 Read the requested number of blocks from the device. 588 587 Read the requested number of blocks from the device. 588 589 589 @param This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface 590 @param MediaId UINT32: The media id that the read request is for 590 @param MediaId UINT32: The media id that the read request is for 591 591 @param Lba EFI_LBA: The starting logic block address to read from on the device 592 592 @param BufferSize UINTN: The size of the Buffer in bytes 593 593 @param Buffer VOID *: A pointer to the destination buffer for the data 594 594 595 595 @retval EFI_SUCCESS: The data was read correctly from the device 596 596 @retval EFI_DEVICE_ERROR:The device reported an error while attempting to perform … … 598 598 @retval EFI_NO_MEDIA: There is no media in the device 599 599 @retval EFI_MEDIA_CHANGED: The MediaId is not for the current media 600 @retval EFI_BAD_BUFFER_SIZE: The BufferSize parameter is not a multiple of the 600 @retval EFI_BAD_BUFFER_SIZE: The BufferSize parameter is not a multiple of the 601 601 intrinsic block size of the device 602 @retval EFI_INVALID_PARAMETER:The read request contains LBAs that are not valid, 603 or the buffer is not on proper alignment 602 @retval EFI_INVALID_PARAMETER:The read request contains LBAs that are not valid, 603 or the buffer is not on proper alignment 604 604 605 605 **/ … … 615 615 616 616 /** 617 Write a specified number of blocks to the device. 618 617 Write a specified number of blocks to the device. 618 619 619 @param This EFI_BLOCK_IO *: A pointer to the Block I/O protocol interface 620 @param MediaId UINT32: The media id that the write request is for 620 @param MediaId UINT32: The media id that the write request is for 621 621 @param Lba EFI_LBA: The starting logic block address to be written 622 622 @param BufferSize UINTN: The size in bytes in Buffer 623 623 @param Buffer VOID *: A pointer to the source buffer for the data 624 624 625 625 @retval EFI_SUCCESS: The data were written correctly to the device 626 @retval EFI_WRITE_PROTECTED: The device can not be written to 626 @retval EFI_WRITE_PROTECTED: The device can not be written to 627 627 @retval EFI_NO_MEDIA: There is no media in the device 628 628 @retval EFI_MEDIA_CHANGED: The MediaId is not for the current media 629 @retval EFI_DEVICE_ERROR: The device reported an error while attempting to perform 630 the write operation 631 @retval EFI_BAD_BUFFER_SIZE: The BufferSize parameter is not a multiple of the 629 @retval EFI_DEVICE_ERROR: The device reported an error while attempting to perform 630 the write operation 631 @retval EFI_BAD_BUFFER_SIZE: The BufferSize parameter is not a multiple of the 632 632 intrinsic block size of the device 633 @retval EFI_INVALID_PARAMETER:The write request contains LBAs that are not valid, 634 or the buffer is not on proper alignment 633 @retval EFI_INVALID_PARAMETER:The write request contains LBAs that are not valid, 634 or the buffer is not on proper alignment 635 635 **/ 636 636 EFI_STATUS … … 650 650 651 651 Detect the floppy drive is presented or not. 652 652 653 653 @param FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV 654 654 @retval EFI_SUCCESS Drive is presented … … 665 665 Do recalibrate and see the drive is presented or not. 666 666 Set the media parameters. 667 667 668 668 @param FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV 669 669 @return the drive is presented or not … … 678 678 679 679 Reset the Floppy Logic Drive. 680 680 681 681 @param FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV 682 682 683 683 @retval EFI_SUCCESS: The Floppy Logic Drive is reset 684 684 @retval EFI_DEVICE_ERROR: The Floppy Logic Drive is not functioning correctly and … … 695 695 Turn the drive's motor on. 696 696 The drive's motor must be on before any command can be executed. 697 697 698 698 @param FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV 699 699 700 700 @retval EFI_SUCCESS: Turn the drive's motor on successfully 701 701 @retval EFI_DEVICE_ERROR: The drive is busy, so can not turn motor on … … 711 711 712 712 Set a Timer and when Timer goes off, turn the motor off. 713 714 713 714 715 715 @param FdcDev FDC_BLK_IO_DEV * : A pointer to the Data Structure FDC_BLK_IO_DEV 716 716 717 717 @retval EFI_SUCCESS: Set the Timer successfully 718 718 @retval EFI_INVALID_PARAMETER: Fail to Set the timer … … 726 726 /** 727 727 Detect the disk in the drive is changed or not. 728 729 728 729 730 730 @param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV 731 731 732 732 @retval EFI_SUCCESS: No disk media change 733 733 @retval EFI_DEVICE_ERROR: Fail to do the recalibrate or seek operation … … 744 744 and the initial values for each of the three internal 745 745 times: HUT, SRT and HLT. 746 746 747 747 @param FdcDev Pointer to instance of FDC_BLK_IO_DEV 748 748 749 749 @retval EFI_SUCCESS: Execute the Specify command successfully 750 750 @retval EFI_DEVICE_ERROR: Fail to execute the command … … 758 758 /** 759 759 Set the head of floppy drive to track 0. 760 760 761 761 @param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV 762 762 @retval EFI_SUCCESS: Execute the Recalibrate operation successfully … … 771 771 /** 772 772 Set the head of floppy drive to the new cylinder. 773 773 774 774 @param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV 775 775 @param Lba EFI_LBA : The logic block address want to seek 776 776 777 777 @retval EFI_SUCCESS: Execute the Seek operation successfully 778 778 @retval EFI_DEVICE_ERROR: Fail to execute the Seek operation … … 787 787 /** 788 788 Do the Sense Interrupt Status command, this command resets the interrupt signal. 789 789 790 790 @param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV 791 791 @param StatusRegister0 UINT8 *: Be used to save Status Register 0 read from FDC 792 792 @param PresentCylinderNumber UINT8 *: Be used to save present cylinder number 793 793 read from FDC 794 794 795 795 @retval EFI_SUCCESS: Execute the Sense Interrupt Status command successfully 796 796 @retval EFI_DEVICE_ERROR: Fail to execute the command … … 806 806 /** 807 807 Do the Sense Drive Status command. 808 808 809 809 @param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV 810 810 @param Lba EFI_LBA : Logic block address 811 811 812 812 @retval EFI_SUCCESS: Execute the Sense Drive Status command successfully 813 813 @retval EFI_DEVICE_ERROR: Fail to execute the command … … 823 823 /** 824 824 Update the disk media properties and if necessary reinstall Block I/O interface. 825 825 826 826 @param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV 827 827 828 828 @retval EFI_SUCCESS: Do the operation successfully 829 829 @retval EFI_DEVICE_ERROR: Fail to the operation … … 837 837 /** 838 838 Set the data rate and so on. 839 839 840 840 @param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV 841 841 … … 849 849 /** 850 850 Read or Write a number of blocks in the same cylinder. 851 851 852 852 @param FdcDev A pointer to Data Structure FDC_BLK_IO_DEV 853 @param HostAddress device address 853 @param HostAddress device address 854 854 @param Lba The starting logic block address to read from on the device 855 855 @param NumberOfBlocks The number of block wanted to be read or write 856 856 @param Read Operation type: read or write 857 857 858 858 @retval EFI_SUCCESS Success operate 859 859 … … 870 870 /** 871 871 Fill in FDD command's parameter. 872 872 873 873 @param FdcDev Pointer to instance of FDC_BLK_IO_DEV 874 874 @param Lba The starting logic block address to read from on the device … … 885 885 /** 886 886 Read result byte from Data Register of FDC. 887 887 888 888 @param FdcDev Pointer to instance of FDC_BLK_IO_DEV 889 889 @param Pointer Buffer to store the byte read from FDC 890 890 891 891 @retval EFI_SUCCESS Read result byte from FDC successfully 892 892 @retval EFI_DEVICE_ERROR The FDC is not ready to be read … … 901 901 /** 902 902 Write command byte to Data Register of FDC. 903 903 904 904 @param FdcDev Pointer to instance of FDC_BLK_IO_DEV 905 905 @param Pointer Be used to save command byte written to FDC 906 906 907 907 @retval EFI_SUCCESS: Write command byte to FDC successfully 908 908 @retval EFI_DEVICE_ERROR: The FDC is not ready to be written … … 917 917 /** 918 918 Detect the specified floppy logic drive is busy or not within a period of time. 919 919 920 920 @param FdcDev Indicate it is drive A or drive B 921 921 @param Timeout The time period for waiting 922 922 923 923 @retval EFI_SUCCESS: The drive and command are not busy 924 924 @retval EFI_TIMEOUT: The drive or command is still busy after a period time that … … 934 934 /** 935 935 Determine whether FDC is ready to write or read. 936 936 937 937 @param FdcDev Pointer to instance of FDC_BLK_IO_DEV 938 938 @param Dio BOOLEAN: Indicate the FDC is waiting to write or read 939 939 @param Timeout The time period for waiting 940 940 941 941 @retval EFI_SUCCESS: FDC is ready to write or read 942 942 @retval EFI_NOT_READY: FDC is not ready within the specified time period … … 970 970 /** 971 971 Check the drive status information. 972 972 973 973 @param StatusRegister3 the value of Status Register 3 974 974 975 975 @retval EFI_SUCCESS The disk is not write protected 976 976 @retval EFI_WRITE_PROTECTED: The disk is write protected … … 984 984 /** 985 985 Calculate the number of block in the same cylinder according to Lba. 986 986 987 987 @param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV 988 988 @param Lba EFI_LBA: The starting logic block address 989 989 @param NumberOfBlocks UINTN: The number of blocks 990 990 991 991 @return The number of blocks in the same cylinder which the starting 992 992 logic block address is Lba … … 1002 1002 /** 1003 1003 When the Timer(2s) off, turn the drive's motor off. 1004 1004 1005 1005 @param Event EFI_EVENT: Event(the timer) whose notification function is being 1006 1006 invoked … … 1017 1017 /** 1018 1018 Read I/O port for FDC. 1019 1019 1020 1020 @param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV 1021 1021 @param Offset The offset address of port … … 1030 1030 /** 1031 1031 Write I/O port for FDC. 1032 1032 1033 1033 @param FdcDev FDC_BLK_IO_DEV *: A pointer to Data Structure FDC_BLK_IO_DEV 1034 1034 @param Offset The offset address of port 1035 1035 @param Data Value written to port 1036 1036 1037 1037 **/ 1038 1038 VOID … … 1080 1080 1081 1081 /** 1082 Common interface for free cache. 1083 1082 Common interface for free cache. 1083 1084 1084 @param FdcDev Pointer of FDC_BLK_IO_DEV instance 1085 1085 1086 1086 **/ 1087 1087 VOID -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyBlock.c
r48674 r58466 1 /** @file 1 /** @file 2 2 Implementation of the EFI Block IO Protocol for ISA Floppy driver 3 3 4 4 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 72 72 /** 73 73 Common report status code interface. 74 74 75 75 @param This Pointer of FDC_BLK_IO_DEV instance 76 76 @param Read Read or write operation when error occurrs … … 108 108 @retval EFI_MEDIA_CHANGED The MediaId does not matched the current device. 109 109 @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. 110 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, 110 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, 111 111 or the buffer is not on proper alignment. 112 112 … … 149 149 @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device. 150 150 @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. 151 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 151 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 152 152 or the buffer is not on proper alignment. 153 153 … … 190 190 @retval EFI_MEDIA_CHANGED The MediaId does not matched the current device. 191 191 @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. 192 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, 192 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, 193 193 or the buffer is not on proper alignment. 194 194 @retval EFI_WRITE_PROTECTED The device can not be written to. … … 360 360 /** 361 361 Free cache for a floppy disk. 362 362 363 363 @param FdcDev A Pointer to FDC_BLK_IO_DEV instance 364 364 365 365 **/ 366 366 VOID -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyCtrl.c
r58459 r58466 1 1 /** @file 2 2 Internal floppy disk controller programming functions for the floppy driver. 3 3 4 4 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 17 17 /** 18 18 Detect whether a floppy drive is present or not. 19 19 20 20 @param[in] FdcDev A pointer to the FDC_BLK_IO_DEV 21 21 … … 50 50 Do recalibrate and check if the drive is present or not 51 51 and set the media parameters if the driver is present. 52 52 53 53 @param[in] FdcDev A pointer to the FDC_BLK_IO_DEV 54 54 … … 124 124 /** 125 125 Reset the Floppy Logic Drive. 126 126 127 127 @param FdcDev FDC_BLK_IO_DEV * : A pointer to the FDC_BLK_IO_DEV 128 128 129 129 @retval EFI_SUCCESS: The Floppy Logic Drive is reset 130 130 @retval EFI_DEVICE_ERROR: The Floppy Logic Drive is not functioning correctly and … … 223 223 Turn the floppy disk drive's motor on. 224 224 The drive's motor must be on before any command can be executed. 225 225 226 226 @param[in] FdcDev A pointer to the FDC_BLK_IO_DEV 227 227 228 228 @retval EFI_SUCCESS The drive's motor was turned on successfully 229 229 @retval EFI_DEVICE_ERROR The drive is busy, so can not turn motor on … … 299 299 /** 300 300 Set a Timer and when Timer goes off, turn the motor off. 301 301 302 302 @param[in] FdcDev A pointer to the FDC_BLK_IO_DEV 303 303 304 304 @retval EFI_SUCCESS Set the Timer successfully 305 305 @retval EFI_INVALID_PARAMETER Fail to Set the timer … … 318 318 /** 319 319 Detect whether the disk in the drive is changed or not. 320 320 321 321 @param[in] FdcDev A pointer to FDC_BLK_IO_DEV 322 322 323 323 @retval EFI_SUCCESS No disk media change 324 324 @retval EFI_DEVICE_ERROR Fail to do the recalibrate or seek operation … … 383 383 and the initial values for each of the three internal 384 384 times: HUT, SRT and HLT. 385 385 386 386 @param[in] FdcDev Pointer to instance of FDC_BLK_IO_DEV 387 387 388 388 @retval EFI_SUCCESS Execute the Specify command successfully 389 389 @retval EFI_DEVICE_ERROR Fail to execute the command … … 423 423 /** 424 424 Set the head of floppy drive to track 0. 425 425 426 426 @param FdcDev FDC_BLK_IO_DEV *: A pointer to FDC_BLK_IO_DEV 427 427 @retval EFI_SUCCESS: Execute the Recalibrate operation successfully … … 497 497 /** 498 498 Set the head of floppy drive to the new cylinder. 499 499 500 500 @param FdcDev FDC_BLK_IO_DEV *: A pointer to FDC_BLK_IO_DEV 501 501 @param Lba EFI_LBA : The logic block address want to seek 502 502 503 503 @retval EFI_SUCCESS: Execute the Seek operation successfully 504 504 @retval EFI_DEVICE_ERROR: Fail to execute the Seek operation … … 601 601 Do the Sense Interrupt Status command, this command 602 602 resets the interrupt signal. 603 603 604 604 @param FdcDev FDC_BLK_IO_DEV *: A pointer to FDC_BLK_IO_DEV 605 605 @param StatusRegister0 UINT8 *: Be used to save Status Register 0 read from FDC 606 606 @param PresentCylinderNumber UINT8 *: Be used to save present cylinder number 607 607 read from FDC 608 608 609 609 @retval EFI_SUCCESS: Execute the Sense Interrupt Status command successfully 610 610 @retval EFI_DEVICE_ERROR: Fail to execute the command … … 638 638 /** 639 639 Do the Sense Drive Status command. 640 640 641 641 @param FdcDev FDC_BLK_IO_DEV *: A pointer to FDC_BLK_IO_DEV 642 642 @param Lba EFI_LBA : Logic block address 643 643 644 644 @retval EFI_SUCCESS: Execute the Sense Drive Status command successfully 645 645 @retval EFI_DEVICE_ERROR: Fail to execute the command … … 701 701 /** 702 702 Update the disk media properties and if necessary reinstall Block I/O interface. 703 703 704 704 @param FdcDev FDC_BLK_IO_DEV *: A pointer to FDC_BLK_IO_DEV 705 705 706 706 @retval EFI_SUCCESS: Do the operation successfully 707 707 @retval EFI_DEVICE_ERROR: Fail to the operation … … 779 779 /** 780 780 Set the data rate and so on. 781 781 782 782 @param FdcDev A pointer to FDC_BLK_IO_DEV 783 783 … … 812 812 /** 813 813 Read or Write a number of blocks in the same cylinder. 814 814 815 815 @param FdcDev A pointer to FDC_BLK_IO_DEV 816 @param HostAddress device address 816 @param HostAddress device address 817 817 @param Lba The starting logic block address to read from on the device 818 818 @param NumberOfBlocks The number of block wanted to be read or write 819 819 @param Read Operation type: read or write 820 820 821 821 @retval EFI_SUCCESS Success operate 822 822 … … 962 962 /** 963 963 Fill in FDD command's parameter. 964 964 965 965 @param FdcDev Pointer to instance of FDC_BLK_IO_DEV 966 966 @param Lba The starting logic block address to read from on the device … … 1003 1003 /** 1004 1004 Read result byte from Data Register of FDC. 1005 1005 1006 1006 @param FdcDev Pointer to instance of FDC_BLK_IO_DEV 1007 1007 @param Pointer Buffer to store the byte read from FDC 1008 1008 1009 1009 @retval EFI_SUCCESS Read result byte from FDC successfully 1010 1010 @retval EFI_DEVICE_ERROR The FDC is not ready to be read … … 1042 1042 /** 1043 1043 Write command byte to Data Register of FDC. 1044 1044 1045 1045 @param FdcDev Pointer to instance of FDC_BLK_IO_DEV 1046 1046 @param Pointer Be used to save command byte written to FDC 1047 1047 1048 1048 @retval EFI_SUCCESS: Write command byte to FDC successfully 1049 1049 @retval EFI_DEVICE_ERROR: The FDC is not ready to be written … … 1082 1082 /** 1083 1083 Detect the specified floppy logic drive is busy or not within a period of time. 1084 1084 1085 1085 @param FdcDev Indicate it is drive A or drive B 1086 1086 @param Timeout The time period for waiting 1087 1087 1088 1088 @retval EFI_SUCCESS: The drive and command are not busy 1089 1089 @retval EFI_TIMEOUT: The drive or command is still busy after a period time that … … 1136 1136 /** 1137 1137 Determine whether FDC is ready to write or read. 1138 1138 1139 1139 @param FdcDev Pointer to instance of FDC_BLK_IO_DEV 1140 1140 @param Dio BOOLEAN: Indicate the FDC is waiting to write or read 1141 1141 @param Timeout The time period for waiting 1142 1142 1143 1143 @retval EFI_SUCCESS: FDC is ready to write or read 1144 1144 @retval EFI_NOT_READY: FDC is not ready within the specified time period … … 1197 1197 1198 1198 /** 1199 Set FDC control structure's attribute according to result. 1199 Set FDC control structure's attribute according to result. 1200 1200 1201 1201 @param Result Point to result structure … … 1248 1248 /** 1249 1249 Check the drive status information. 1250 1250 1251 1251 @param StatusRegister3 the value of Status Register 3 1252 1252 1253 1253 @retval EFI_SUCCESS The disk is not write protected 1254 1254 @retval EFI_WRITE_PROTECTED: The disk is write protected … … 1269 1269 /** 1270 1270 Calculate the number of block in the same cylinder according to LBA. 1271 1271 1272 1272 @param FdcDev FDC_BLK_IO_DEV *: A pointer to FDC_BLK_IO_DEV 1273 1273 @param LBA EFI_LBA: The starting logic block address 1274 1274 @param NumberOfBlocks UINTN: The number of blocks 1275 1275 1276 1276 @return The number of blocks in the same cylinder which the starting 1277 1277 logic block address is LBA … … 1305 1305 /** 1306 1306 When the Timer(2s) off, turn the drive's motor off. 1307 1307 1308 1308 @param Event EFI_EVENT: Event(the timer) whose notification function is being 1309 1309 invoked … … 1344 1344 /** 1345 1345 Read an I/O port of FDC. 1346 1346 1347 1347 @param[in] FdcDev A pointer to FDC_BLK_IO_DEV. 1348 1348 @param[in] Offset The address offset of the I/O port. … … 1373 1373 /** 1374 1374 Write an I/O port of FDC. 1375 1375 1376 1376 @param[in] FdcDev A pointer to FDC_BLK_IO_DEV 1377 1377 @param[in] Offset The address offset of the I/O port -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyPei/Fdc.h
r48674 r58466 1 /** @file 1 /** @file 2 2 Definition of FDC registers and structures. 3 3 4 4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 5 5 6 6 This program and the accompanying materials 7 7 are licensed and made available under the terms and conditions -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyPei/FloppyPeim.c
r58459 r58466 3 3 4 4 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 6 6 This program and the accompanying materials 7 7 are licensed and made available under the terms and conditions … … 153 153 154 154 // 155 // Table of diskette parameters of various diskette types 155 // Table of diskette parameters of various diskette types 156 156 // 157 157 DISKET_PARA_TABLE DiskPara[9] = { … … 293 293 FALSE means output. 294 294 @param TimeoutInMseconds Timeout value to wait. 295 295 296 296 @retval EFI_SUCCESS FDC is ready. 297 297 @retval EFI_NOT_READY FDC is not ready within the specified time period. … … 784 784 if ((Sts0 & 0xf0) == BIT5 && Pcn == 0) { 785 785 // 786 // Recalibration is successful. 786 // Recalibration is successful. 787 787 // 788 788 Info->Pcn = 0; … … 1023 1023 // No diskette in floppy. 1024 1024 // 1025 MediaInfo->MediaPresent = FALSE; 1025 MediaInfo->MediaPresent = FALSE; 1026 1026 } else if (Status != EFI_MEDIA_CHANGED && Status != EFI_SUCCESS) { 1027 1027 // … … 1440 1440 Gets the count of block I/O devices that one specific block driver detects. 1441 1441 1442 This function is used for getting the count of block I/O devices that one 1442 This function is used for getting the count of block I/O devices that one 1443 1443 specific block driver detects. To the PEI ATAPI driver, it returns the number 1444 of all the detected ATAPI devices it detects during the enumeration process. 1445 To the PEI legacy floppy driver, it returns the number of all the legacy 1446 devices it finds during its enumeration process. If no device is detected, 1447 then the function will return zero. 1448 1449 @param[in] PeiServices General-purpose services that are available 1444 of all the detected ATAPI devices it detects during the enumeration process. 1445 To the PEI legacy floppy driver, it returns the number of all the legacy 1446 devices it finds during its enumeration process. If no device is detected, 1447 then the function will return zero. 1448 1449 @param[in] PeiServices General-purpose services that are available 1450 1450 to every PEIM. 1451 @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI 1451 @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI 1452 1452 instance. 1453 1453 @param[out] NumberBlockDevices The number of block I/O devices discovered. … … 1478 1478 Gets a block device's media information. 1479 1479 1480 This function will provide the caller with the specified block device's media 1481 information. If the media changes, calling this function will update the media 1480 This function will provide the caller with the specified block device's media 1481 information. If the media changes, calling this function will update the media 1482 1482 information accordingly. 1483 1483 … … 1485 1485 PEIM 1486 1486 @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance. 1487 @param[in] DeviceIndex Specifies the block device to which the function wants 1488 to talk. Because the driver that implements Block I/O 1489 PPIs will manage multiple block devices, the PPIs that 1490 want to talk to a single device must specify the 1487 @param[in] DeviceIndex Specifies the block device to which the function wants 1488 to talk. Because the driver that implements Block I/O 1489 PPIs will manage multiple block devices, the PPIs that 1490 want to talk to a single device must specify the 1491 1491 device index that was assigned during the enumeration 1492 process. This index is a number from one to 1492 process. This index is a number from one to 1493 1493 NumberBlockDevices. 1494 @param[out] MediaInfo The media information of the specified block media. 1495 The caller is responsible for the ownership of this 1494 @param[out] MediaInfo The media information of the specified block media. 1495 The caller is responsible for the ownership of this 1496 1496 data structure. 1497 1498 @retval EFI_SUCCESS Media information about the specified block device 1497 1498 @retval EFI_SUCCESS Media information about the specified block device 1499 1499 was obtained successfully. 1500 @retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware 1500 @retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware 1501 1501 error. 1502 1502 @retval Others Other failure occurs. … … 1560 1560 Reads the requested number of blocks from the specified block device. 1561 1561 1562 The function reads the requested number of blocks from the device. All the 1562 The function reads the requested number of blocks from the device. All the 1563 1563 blocks are read, or an error is returned. If there is no media in the device, 1564 1564 the function returns EFI_NO_MEDIA. 1565 1565 1566 @param[in] PeiServices General-purpose services that are available to 1566 @param[in] PeiServices General-purpose services that are available to 1567 1567 every PEIM. 1568 1568 @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance. 1569 @param[in] DeviceIndex Specifies the block device to which the function wants 1570 to talk. Because the driver that implements Block I/O 1571 PPIs will manage multiple block devices, the PPIs that 1572 want to talk to a single device must specify the device 1573 index that was assigned during the enumeration process. 1569 @param[in] DeviceIndex Specifies the block device to which the function wants 1570 to talk. Because the driver that implements Block I/O 1571 PPIs will manage multiple block devices, the PPIs that 1572 want to talk to a single device must specify the device 1573 index that was assigned during the enumeration process. 1574 1574 This index is a number from one to NumberBlockDevices. 1575 1575 @param[in] StartLBA The starting logical block address (LBA) to read from … … 1578 1578 a multiple of the intrinsic block size of the device. 1579 1579 @param[out] Buffer A pointer to the destination buffer for the data. 1580 The caller is responsible for the ownership of the 1580 The caller is responsible for the ownership of the 1581 1581 buffer. 1582 1582 1583 1583 @retval EFI_SUCCESS The data was read correctly from the device. 1584 @retval EFI_DEVICE_ERROR The device reported an error while attempting 1584 @retval EFI_DEVICE_ERROR The device reported an error while attempting 1585 1585 to perform the read operation. 1586 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not 1586 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not 1587 1587 valid, or the buffer is not properly aligned. 1588 1588 @retval EFI_NO_MEDIA There is no media in the device. … … 1730 1730 // 1731 1731 // Allocate memory for instance of FDC_BLK_IO_DEV and copy initial value 1732 // from template to it. 1732 // from template to it. 1733 1733 // 1734 1734 FdcBlkIoDev = AllocatePages (EFI_SIZE_TO_PAGES(sizeof (FDC_BLK_IO_DEV))); -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/IsaFloppyPei/FloppyPeim.h
r48674 r58466 3 3 4 4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 5 5 6 6 This program and the accompanying materials 7 7 are licensed and made available under the terms and conditions … … 105 105 /// ISA memory range 106 106 /// 107 #define ISA_MAX_MEMORY_ADDRESS 0x1000000 107 #define ISA_MAX_MEMORY_ADDRESS 0x1000000 108 108 109 109 // -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/IsaIoDxe/IsaDriver.c
r48674 r58466 3 3 4 4 Produce an instance of the ISA I/O Protocol for every SIO controller. 5 5 6 6 Copyright (c) 2010, Intel Corporation. All rights reserved.<BR> 7 7 This program and the accompanying materials … … 32 32 The main entry point for the IsaIo driver. 33 33 34 @param[in] ImageHandle The firmware allocated handle for the EFI image. 34 @param[in] ImageHandle The firmware allocated handle for the EFI image. 35 35 @param[in] SystemTable A pointer to the EFI System Table. 36 36 37 37 @retval EFI_SUCCESS The entry point is executed successfully. 38 38 @retval EFI_OUT_OF_RESOURCES There was not enough memory in pool to install all the protocols. … … 63 63 } 64 64 65 /** 65 /** 66 66 Tests to see if a controller can be managed by the IsaIo driver. 67 67 68 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 68 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 69 69 @param[in] Controller The handle of the controller to test. 70 70 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. 71 71 72 72 @retval EFI_SUCCESS The device is supported by this driver. 73 73 @retval EFI_ALREADY_STARTED The device is already being managed by this driver. 74 @retval EFI_ACCESS_DENIED The device is already being managed by a different driver 74 @retval EFI_ACCESS_DENIED The device is already being managed by a different driver 75 75 or an application that requires exclusive access. 76 76 @retval EFI_UNSUPPORTED The device is is not supported by this driver. … … 137 137 138 138 /** 139 Start this driver on ControllerHandle. 140 141 The Start() function is designed to be invoked from the EFI boot service ConnectController(). 142 As a result, much of the error checking on the parameters to Start() has been moved into this 143 common boot service. It is legal to call Start() from other locations, but the following calling 139 Start this driver on ControllerHandle. 140 141 The Start() function is designed to be invoked from the EFI boot service ConnectController(). 142 As a result, much of the error checking on the parameters to Start() has been moved into this 143 common boot service. It is legal to call Start() from other locations, but the following calling 144 144 restrictions must be followed or the system behavior will not be deterministic. 145 145 1. ControllerHandle must be a valid EFI_HANDLE. … … 147 147 EFI_DEVICE_PATH_PROTOCOL. 148 148 3. Prior to calling Start(), the Supported() function for the driver specified by This must 149 have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. 149 have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. 150 150 151 151 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 152 @param[in] ControllerHandle The handle of the controller to start. This handle 153 must support a protocol interface that supplies 152 @param[in] ControllerHandle The handle of the controller to start. This handle 153 must support a protocol interface that supplies 154 154 an I/O abstraction to the driver. 155 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. 155 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. 156 156 This parameter is ignored by device drivers, and is optional for bus drivers. 157 157 … … 255 255 256 256 /** 257 Stop this driver on ControllerHandle. 258 259 The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). 260 As a result, much of the error checking on the parameters to Stop() has been moved 261 into this common boot service. It is legal to call Stop() from other locations, 257 Stop this driver on ControllerHandle. 258 259 The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). 260 As a result, much of the error checking on the parameters to Stop() has been moved 261 into this common boot service. It is legal to call Stop() from other locations, 262 262 but the following calling restrictions must be followed or the system behavior will not be deterministic. 263 263 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this … … 267 267 Start() function, and the Start() function must have called OpenProtocol() on 268 268 ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. 269 269 270 270 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 271 @param[in] ControllerHandle A handle to the device being stopped. The handle must 272 support a bus specific I/O protocol for the driver 271 @param[in] ControllerHandle A handle to the device being stopped. The handle must 272 support a bus specific I/O protocol for the driver 273 273 to use to stop the device. 274 274 @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer. 275 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL 275 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL 276 276 if NumberOfChildren is 0. 277 277 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/IsaIoDxe/IsaDriver.h
r48674 r58466 1 1 /** @file 2 2 The header file for ISA driver 3 3 4 4 Copyright (c) 2010, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 149 149 // 150 150 151 /** 151 /** 152 152 Tests to see if a controller can be managed by the ISA Driver. 153 153 154 154 How the Start() function of a driver is implemented can affect how the Supported() function is implemented. 155 155 156 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 156 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 157 157 @param[in] Controller The handle of the controller to test. 158 158 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. 159 159 160 160 @retval EFI_SUCCESS The device is supported by this driver. 161 161 @retval EFI_ALREADY_STARTED The device is already being managed by this driver. 162 @retval EFI_ACCESS_DENIED The device is already being managed by a different driver 162 @retval EFI_ACCESS_DENIED The device is already being managed by a different driver 163 163 or an application that requires exclusive access. 164 164 @retval EFI_UNSUPPORTED The device is is not supported by this driver. … … 174 174 175 175 /** 176 Start this driver on ControllerHandle. 177 178 The Start() function is designed to be invoked from the EFI boot service ConnectController(). 179 As a result, much of the error checking on the parameters to Start() has been moved into this 180 common boot service. It is legal to call Start() from other locations, but the following calling 176 Start this driver on ControllerHandle. 177 178 The Start() function is designed to be invoked from the EFI boot service ConnectController(). 179 As a result, much of the error checking on the parameters to Start() has been moved into this 180 common boot service. It is legal to call Start() from other locations, but the following calling 181 181 restrictions must be followed or the system behavior will not be deterministic. 182 182 1. ControllerHandle must be a valid EFI_HANDLE. … … 184 184 EFI_DEVICE_PATH_PROTOCOL. 185 185 3. Prior to calling Start(), the Supported() function for the driver specified by This must 186 have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. 186 have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. 187 187 188 188 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 189 @param[in] ControllerHandle The handle of the controller to start. This handle 190 must support a protocol interface that supplies 189 @param[in] ControllerHandle The handle of the controller to start. This handle 190 must support a protocol interface that supplies 191 191 an I/O abstraction to the driver. 192 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. 192 @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. 193 193 This parameter is ignored by device drivers, and is optional for bus drivers. 194 194 … … 208 208 209 209 /** 210 Stop this driver on ControllerHandle. 211 212 The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). 213 As a result, much of the error checking on the parameters to Stop() has been moved 214 into this common boot service. It is legal to call Stop() from other locations, 210 Stop this driver on ControllerHandle. 211 212 The Stop() function is designed to be invoked from the EFI boot service DisconnectController(). 213 As a result, much of the error checking on the parameters to Stop() has been moved 214 into this common boot service. It is legal to call Stop() from other locations, 215 215 but the following calling restrictions must be followed or the system behavior will not be deterministic. 216 216 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this … … 220 220 Start() function, and the Start() function must have called OpenProtocol() on 221 221 ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. 222 222 223 223 @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. 224 @param[in] ControllerHandle A handle to the device being stopped. The handle must 225 support a bus specific I/O protocol for the driver 224 @param[in] ControllerHandle A handle to the device being stopped. The handle must 225 support a bus specific I/O protocol for the driver 226 226 to use to stop the device. 227 227 @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer. 228 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL 228 @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL 229 229 if NumberOfChildren is 0. 230 230 … … 251 251 @param[in] DevicePath The device path of the isa device. 252 252 @param[in] Resources The ACPI resource list. 253 253 254 254 **/ 255 255 VOID -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/IsaIoDxe/IsaIo.c
r58459 r58466 1 1 /** @file 2 The implementation for EFI_ISA_IO_PROTOCOL. 3 2 The implementation for EFI_ISA_IO_PROTOCOL. 3 4 4 Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 19 19 // 20 20 EFI_ISA_IO_PROTOCOL mIsaIoInterface = { 21 { 21 { 22 22 IsaIoMemRead, 23 23 IsaIoMemWrite 24 24 }, 25 { 25 { 26 26 IsaIoIoRead, 27 27 IsaIoIoWrite … … 87 87 @param[in] Type The Access type. The input must be either IsaAccessTypeMem or IsaAccessTypeIo. 88 88 @param[in] Width The width of the memory operation. 89 @param[in] Count The number of memory operations to perform. 90 @param[in] Offset The offset in ISA memory space to start the memory operation. 91 89 @param[in] Count The number of memory operations to perform. 90 @param[in] Offset The offset in ISA memory space to start the memory operation. 91 92 92 @retval EFI_SUCCESS Verify success. 93 93 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value. … … 164 164 Attribute |= EFI_ISA_ACPI_IO_DECODE_16_BITS; 165 165 break; 166 166 167 167 case EFI_ACPI_IO_DECODE_10_BIT: 168 168 Attribute |= EFI_ISA_ACPI_IO_DECODE_10_BITS; … … 245 245 246 246 Attribute = EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_SINGLE_MODE; 247 247 248 248 switch (Information & EFI_ACPI_DMA_SPEED_TYPE_MASK) { 249 249 case EFI_ACPI_DMA_SPEED_TYPE_COMPATIBILITY: … … 425 425 @param[in] DevicePath The device path of the isa device. 426 426 @param[in] Resources The ACPI resource list. 427 427 428 428 **/ 429 429 VOID … … 453 453 Index = 0; 454 454 while (ResourcePtr.SmallHeader->Byte != ACPI_END_TAG_DESCRIPTOR) { 455 455 456 456 Index += AcpiResourceToIsaResource (ResourcePtr, NULL); 457 457 … … 499 499 } 500 500 } 501 501 502 502 // 503 503 // Convert the ACPI End Tag … … 511 511 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 512 512 @param[in] Width Specifies the width of the I/O operation. 513 @param[in] Offset The offset in ISA I/O space to start the I/O operation. 514 @param[in] Count The number of I/O operations to perform. 513 @param[in] Offset The offset in ISA I/O space to start the I/O operation. 514 @param[in] Count The number of I/O operations to perform. 515 515 @param[out] Buffer The destination buffer to store the results 516 516 … … 573 573 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 574 574 @param[in] Width Specifies the width of the I/O operation. 575 @param[in] Offset The offset in ISA I/O space to start the I/O operation. 576 @param[in] Count The number of I/O operations to perform. 575 @param[in] Offset The offset in ISA I/O space to start the I/O operation. 576 @param[in] Count The number of I/O operations to perform. 577 577 @param[in] Buffer The source buffer to write data from 578 578 … … 634 634 635 635 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 636 @param[in] Offset The offset in ISA IO space to start the IO operation. 636 @param[in] Offset The offset in ISA IO space to start the IO operation. 637 637 @param[in] Value The data to write port. 638 638 … … 686 686 @param[in] CountOffset The count's offset. 687 687 @param[in] BaseAddress The base address. 688 @param[in] Count The number of I/O operations to perform. 689 688 @param[in] Count The number of I/O operations to perform. 689 690 690 @retval EFI_SUCCESS Success. 691 691 @retval EFI_INVALID_PARAMETER Parameter is invalid. … … 823 823 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 824 824 @param[in] Width Specifies the width of the memory operation. 825 @param[in] Offset The offset in ISA memory space to start the memory operation. 826 @param[in] Count The number of memory operations to perform. 825 @param[in] Offset The offset in ISA memory space to start the memory operation. 826 @param[in] Count The number of memory operations to perform. 827 827 @param[out] Buffer The destination buffer to store the results 828 828 829 829 @retval EFI_SUCCESS The data was read from the device successfully. 830 830 @retval EFI_UNSUPPORTED The Offset is not valid for this device. … … 890 890 Performs an ISA Memory Write Cycle 891 891 892 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 892 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 893 893 @param[in] Width Specifies the width of the memory operation. 894 @param[in] Offset The offset in ISA memory space to start the memory operation. 895 @param[in] Count The number of memory operations to perform. 894 @param[in] Offset The offset in ISA memory space to start the memory operation. 895 @param[in] Count The number of memory operations to perform. 896 896 @param[in] Buffer The source buffer to write data from 897 897 … … 961 961 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 962 962 @param[in] Width Specifies the width of the memory copy operation. 963 @param[in] DestOffset The offset of the destination 963 @param[in] DestOffset The offset of the destination 964 964 @param[in] SrcOffset The offset of the source 965 965 @param[in] Count The number of memory copy operations to perform … … 1042 1042 1043 1043 @param This A pointer to the EFI_ISA_IO_PROTOCOL instance. 1044 @param Operation Indicates the type of DMA (slave or bus master), and if 1045 the DMA operation is going to read or write to system memory. 1046 @param ChannelNumber The slave channel number to use for this DMA operation. 1047 If Operation and ChannelAttributes shows that this device 1048 performs bus mastering DMA, then this field is ignored. 1049 The legal range for this field is 0..7. 1044 @param Operation Indicates the type of DMA (slave or bus master), and if 1045 the DMA operation is going to read or write to system memory. 1046 @param ChannelNumber The slave channel number to use for this DMA operation. 1047 If Operation and ChannelAttributes shows that this device 1048 performs bus mastering DMA, then this field is ignored. 1049 The legal range for this field is 0..7. 1050 1050 @param ChannelAttributes The attributes of the DMA channel to use for this DMA operation 1051 @param HostAddress The system memory address to map to the device. 1052 @param NumberOfBytes On input the number of bytes to map. On output the number 1051 @param HostAddress The system memory address to map to the device. 1052 @param NumberOfBytes On input the number of bytes to map. On output the number 1053 1053 of bytes that were mapped. 1054 @param DeviceAddress The resulting map address for the bus master device to use 1055 to access the hosts HostAddress. 1054 @param DeviceAddress The resulting map address for the bus master device to use 1055 to access the hosts HostAddress. 1056 1056 @param Mapping A resulting value to pass to EFI_ISA_IO.Unmap(). 1057 1057 … … 1084 1084 UINT8 DmaClear; 1085 1085 UINT8 DmaChannelMode; 1086 1086 1087 1087 if ((NULL == This) || 1088 1088 (NULL == HostAddress) || … … 1103 1103 // Light IsaIo only supports two operations. 1104 1104 // 1105 if (!(Operation == EfiIsaIoOperationSlaveRead || 1105 if (!(Operation == EfiIsaIoOperationSlaveRead || 1106 1106 Operation == EfiIsaIoOperationSlaveWrite)) { 1107 1107 return EFI_INVALID_PARAMETER; … … 1189 1189 *DeviceAddress = PhysicalAddress; 1190 1190 } 1191 1191 1192 1192 // 1193 1193 // Figure out what to program into the DMA Channel Mode Register … … 1274 1274 1275 1275 /** 1276 Maps a memory region for DMA. This implementation implement the 1276 Maps a memory region for DMA. This implementation implement the 1277 1277 the full mapping support. 1278 1278 1279 1279 @param This A pointer to the EFI_ISA_IO_PROTOCOL instance. 1280 @param Operation Indicates the type of DMA (slave or bus master), and if 1281 the DMA operation is going to read or write to system memory. 1282 @param ChannelNumber The slave channel number to use for this DMA operation. 1283 If Operation and ChannelAttributes shows that this device 1284 performs bus mastering DMA, then this field is ignored. 1285 The legal range for this field is 0..7. 1280 @param Operation Indicates the type of DMA (slave or bus master), and if 1281 the DMA operation is going to read or write to system memory. 1282 @param ChannelNumber The slave channel number to use for this DMA operation. 1283 If Operation and ChannelAttributes shows that this device 1284 performs bus mastering DMA, then this field is ignored. 1285 The legal range for this field is 0..7. 1286 1286 @param ChannelAttributes The attributes of the DMA channel to use for this DMA operation 1287 @param HostAddress The system memory address to map to the device. 1288 @param NumberOfBytes On input the number of bytes to map. On output the number 1287 @param HostAddress The system memory address to map to the device. 1288 @param NumberOfBytes On input the number of bytes to map. On output the number 1289 1289 of bytes that were mapped. 1290 @param DeviceAddress The resulting map address for the bus master device to use 1291 to access the hosts HostAddress. 1290 @param DeviceAddress The resulting map address for the bus master device to use 1291 to access the hosts HostAddress. 1292 1292 @param Mapping A resulting value to pass to EFI_ISA_IO.Unmap(). 1293 1293 … … 1603 1603 1604 1604 @param This A pointer to the EFI_ISA_IO_PROTOCOL instance. 1605 @param Operation Indicates the type of DMA (slave or bus master), and if 1606 the DMA operation is going to read or write to system memory. 1607 @param ChannelNumber The slave channel number to use for this DMA operation. 1608 If Operation and ChannelAttributes shows that this device 1609 performs bus mastering DMA, then this field is ignored. 1610 The legal range for this field is 0..7. 1605 @param Operation Indicates the type of DMA (slave or bus master), and if 1606 the DMA operation is going to read or write to system memory. 1607 @param ChannelNumber The slave channel number to use for this DMA operation. 1608 If Operation and ChannelAttributes shows that this device 1609 performs bus mastering DMA, then this field is ignored. 1610 The legal range for this field is 0..7. 1611 1611 @param ChannelAttributes The attributes of the DMA channel to use for this DMA operation 1612 @param HostAddress The system memory address to map to the device. 1613 @param NumberOfBytes On input the number of bytes to map. On output the number 1612 @param HostAddress The system memory address to map to the device. 1613 @param NumberOfBytes On input the number of bytes to map. On output the number 1614 1614 of bytes that were mapped. 1615 @param DeviceAddress The resulting map address for the bus master device to use 1616 to access the hosts HostAddress. 1615 @param DeviceAddress The resulting map address for the bus master device to use 1616 to access the hosts HostAddress. 1617 1617 @param Mapping A resulting value to pass to EFI_ISA_IO.Unmap(). 1618 1618 … … 1643 1643 } 1644 1644 // 1645 // Set Feature Flag PcdIsaBusSupportBusMaster to FALSE to disable support for 1645 // Set Feature Flag PcdIsaBusSupportBusMaster to FALSE to disable support for 1646 1646 // ISA Bus Master. 1647 1647 // … … 1686 1686 @retval EFI_SUCCESS The requested memory pages were allocated. 1687 1687 @retval EFI_INVALID_PARAMETER Type is invalid or MemoryType is invalid or HostAddress is NULL 1688 @retval EFI_UNSUPPORTED Attributes is unsupported or the memory range specified 1688 @retval EFI_UNSUPPORTED Attributes is unsupported or the memory range specified 1689 1689 by HostAddress, Pages, and Type is not available for common buffer use. 1690 1690 @retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated. … … 1705 1705 1706 1706 // 1707 // Set Feature Flag PcdIsaBusOnlySupportSlaveDma to FALSE to disable support for 1707 // Set Feature Flag PcdIsaBusOnlySupportSlaveDma to FALSE to disable support for 1708 1708 // ISA Bus Master. 1709 1709 // Or unset Feature Flag PcdIsaBusSupportDma to disable support for ISA DMA. … … 1759 1759 1760 1760 /** 1761 Frees memory that was allocated with EFI_ISA_IO.AllocateBuffer(). 1761 Frees memory that was allocated with EFI_ISA_IO.AllocateBuffer(). 1762 1762 1763 1763 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. … … 1779 1779 1780 1780 // 1781 // Set Feature Flag PcdIsaBusOnlySupportSlaveDma to FALSE to disable support for 1781 // Set Feature Flag PcdIsaBusOnlySupportSlaveDma to FALSE to disable support for 1782 1782 // ISA Bus Master. 1783 1783 // Or unset Feature Flag PcdIsaBusSupportDma to disable support for ISA DMA. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/IsaIoDxe/IsaIo.h
r48674 r58466 1 1 /** @file 2 2 The header file for EFI_ISA_IO protocol implementation. 3 3 4 4 Copyright (c) 2010, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 35 35 @param[in] Type The Access type. The input must be either IsaAccessTypeMem or IsaAccessTypeIo. 36 36 @param[in] Width The width of the memory operation. 37 @param[in] Count The number of memory operations to perform. 38 @param[in] Offset The offset in ISA memory space to start the memory operation. 39 37 @param[in] Count The number of memory operations to perform. 38 @param[in] Offset The offset in ISA memory space to start the memory operation. 39 40 40 @retval EFI_SUCCESS Verify success. 41 41 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value. … … 50 50 IN UINT32 Offset 51 51 ); 52 52 53 53 /** 54 54 Performs an ISA I/O Read Cycle … … 56 56 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 57 57 @param[in] Width Specifies the width of the I/O operation. 58 @param[in] Offset The offset in ISA I/O space to start the I/O operation. 59 @param[in] Count The number of I/O operations to perform. 58 @param[in] Offset The offset in ISA I/O space to start the I/O operation. 59 @param[in] Count The number of I/O operations to perform. 60 60 @param[out] Buffer The destination buffer to store the results 61 61 … … 80 80 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 81 81 @param[in] Width Specifies the width of the I/O operation. 82 @param[in] Offset The offset in ISA I/O space to start the I/O operation. 83 @param[in] Count The number of I/O operations to perform. 82 @param[in] Offset The offset in ISA I/O space to start the I/O operation. 83 @param[in] Count The number of I/O operations to perform. 84 84 @param[in] Buffer The source buffer to write data from 85 85 … … 103 103 104 104 @param This A pointer to the EFI_ISA_IO_PROTOCOL instance. 105 @param Operation Indicates the type of DMA (slave or bus master), and if 106 the DMA operation is going to read or write to system memory. 107 @param ChannelNumber The slave channel number to use for this DMA operation. 108 If Operation and ChannelAttributes shows that this device 109 performs bus mastering DMA, then this field is ignored. 110 The legal range for this field is 0..7. 105 @param Operation Indicates the type of DMA (slave or bus master), and if 106 the DMA operation is going to read or write to system memory. 107 @param ChannelNumber The slave channel number to use for this DMA operation. 108 If Operation and ChannelAttributes shows that this device 109 performs bus mastering DMA, then this field is ignored. 110 The legal range for this field is 0..7. 111 111 @param ChannelAttributes The attributes of the DMA channel to use for this DMA operation 112 @param HostAddress The system memory address to map to the device. 113 @param NumberOfBytes On input the number of bytes to map. On output the number 112 @param HostAddress The system memory address to map to the device. 113 @param NumberOfBytes On input the number of bytes to map. On output the number 114 114 of bytes that were mapped. 115 @param DeviceAddress The resulting map address for the bus master device to use 116 to access the hosts HostAddress. 115 @param DeviceAddress The resulting map address for the bus master device to use 116 to access the hosts HostAddress. 117 117 @param Mapping A resulting value to pass to EFI_ISA_IO.Unmap(). 118 118 … … 174 174 @param[in] CountOffset The count's offset. 175 175 @param[in] BaseAddress The base address. 176 @param[in] Count The number of I/O operations to perform. 177 176 @param[in] Count The number of I/O operations to perform. 177 178 178 @retval EFI_SUCCESS Success. 179 179 @retval EFI_INVALID_PARAMETER Parameter is invalid. … … 195 195 196 196 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 197 @param[in] Offset The offset in ISA IO space to start the IO operation. 197 @param[in] Offset The offset in ISA IO space to start the IO operation. 198 198 @param[in] Value The data to write port. 199 199 … … 208 208 IN UINT32 Offset, 209 209 IN UINT8 Value 210 ); 210 ); 211 211 212 212 /** … … 215 215 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 216 216 @param[in] Width Specifies the width of the memory operation. 217 @param[in] Offset The offset in ISA memory space to start the memory operation. 218 @param[in] Count The number of memory operations to perform. 217 @param[in] Offset The offset in ISA memory space to start the memory operation. 218 @param[in] Count The number of memory operations to perform. 219 219 @param[out] Buffer The destination buffer to store the results 220 220 221 221 @retval EFI_SUCCESS The data was read from the device successfully. 222 222 @retval EFI_UNSUPPORTED The Offset is not valid for this device. … … 238 238 Performs an ISA Memory Write Cycle 239 239 240 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 240 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 241 241 @param[in] Width Specifies the width of the memory operation. 242 @param[in] Offset The offset in ISA memory space to start the memory operation. 243 @param[in] Count The number of memory operations to perform. 242 @param[in] Offset The offset in ISA memory space to start the memory operation. 243 @param[in] Count The number of memory operations to perform. 244 244 @param[in] Buffer The source buffer to write data from 245 245 … … 264 264 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 265 265 @param[in] Width Specifies the width of the memory copy operation. 266 @param[in] DestOffset The offset of the destination 266 @param[in] DestOffset The offset of the destination 267 267 @param[in] SrcOffset The offset of the source 268 268 @param[in] Count The number of memory copy operations to perform … … 295 295 @retval EFI_SUCCESS The requested memory pages were allocated. 296 296 @retval EFI_INVALID_PARAMETER Type is invalid or MemoryType is invalid or HostAddress is NULL 297 @retval EFI_UNSUPPORTED Attributes is unsupported or the memory range specified 297 @retval EFI_UNSUPPORTED Attributes is unsupported or the memory range specified 298 298 by HostAddress, Pages, and Type is not available for common buffer use. 299 299 @retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated. … … 311 311 312 312 /** 313 Frees memory that was allocated with EFI_ISA_IO.AllocateBuffer(). 313 Frees memory that was allocated with EFI_ISA_IO.AllocateBuffer(). 314 314 315 315 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf
r58459 r58466 31 31 # VALID_ARCHITECTURES = IA32 X64 IPF EBC 32 32 # 33 # DRIVER_BINDING = gSerialControllerDriver 34 # COMPONENT_NAME = gIsaSerialComponentName 33 # DRIVER_BINDING = gSerialControllerDriver 34 # COMPONENT_NAME = gIsaSerialComponentName 35 35 # COMPONENT_NAME2 = gIsaSerialComponentName2 36 36 # -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c
r58459 r58466 91 91 92 92 @param[in] FlowControl The device path node to be checked. 93 93 94 94 @retval TRUE It's the Flow Control node. 95 95 @retval FALSE It's not. … … 112 112 113 113 @param[in] DevicePath The device path to be checked. 114 114 115 115 @retval TRUE It contains the Flow Control node. 116 116 @retval FALSE It doesn't. … … 135 135 The user Entry Point for module IsaSerial. The user code starts with this function. 136 136 137 @param[in] ImageHandle The firmware allocated handle for the EFI image. 137 @param[in] ImageHandle The firmware allocated handle for the EFI image. 138 138 @param[in] SystemTable A pointer to the EFI System Table. 139 139 140 140 @retval EFI_SUCCESS The entry point is executed successfully. 141 141 @retval other Some error occurs when executing this entry point. … … 214 214 if (RemainingDevicePath != NULL) { 215 215 // 216 // Check if RemainingDevicePath is the End of Device Path Node, 216 // Check if RemainingDevicePath is the End of Device Path Node, 217 217 // if yes, go on checking other conditions 218 218 // … … 231 231 goto Error; 232 232 } 233 233 234 234 if (UartNode->BaudRate > SERIAL_PORT_MAX_BAUD_RATE) { 235 235 goto Error; 236 236 } 237 237 238 238 if (UartNode->Parity < NoParity || UartNode->Parity > SpaceParity) { 239 239 goto Error; 240 240 } 241 241 242 242 if (UartNode->DataBits < 5 || UartNode->DataBits > 8) { 243 243 goto Error; 244 244 } 245 245 246 246 if (UartNode->StopBits < OneStopBit || UartNode->StopBits > TwoStopBits) { 247 247 goto Error; 248 248 } 249 249 250 250 if ((UartNode->DataBits == 5) && (UartNode->StopBits == TwoStopBits)) { 251 251 goto Error; 252 252 } 253 253 254 254 if ((UartNode->DataBits >= 6) && (UartNode->DataBits <= 8) && (UartNode->StopBits == OneFiveStopBits)) { 255 255 goto Error; … … 511 511 // 512 512 Control &= (EFI_SERIAL_REQUEST_TO_SEND | EFI_SERIAL_DATA_TERMINAL_READY | 513 EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE | EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE | 513 EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE | EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE | 514 514 EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE); 515 515 Status = SerialIo->SetControl (SerialIo, Control); … … 530 530 // If RemainingDevicePath is the End of Device Path Node, 531 531 // skip enumerate any device and return EFI_SUCESSS 532 // 532 // 533 533 return EFI_SUCCESS; 534 534 } … … 551 551 552 552 // 553 // Check if RemainingDevicePath is NULL, 553 // Check if RemainingDevicePath is NULL, 554 554 // if yes, use the values from the gSerialDevTempate as no remaining device path was 555 555 // passed in. … … 557 557 if (RemainingDevicePath != NULL) { 558 558 // 559 // If RemainingDevicePath isn't NULL, 559 // If RemainingDevicePath isn't NULL, 560 560 // match the configuration of the RemainingDevicePath. IsHandleSupported() 561 561 // already checked to make sure the RemainingDevicePath contains settings … … 578 578 } 579 579 } 580 580 581 581 SerialDevice->HardwareFlowControl = (BOOLEAN) (FlowControlMap == UART_FLOW_CONTROL_HARDWARE); 582 582 … … 602 602 // 603 603 // Build the device path by appending the UART node to the ParentDevicePath. 604 // The Uart setings are zero here, since SetAttribute() will update them to match 604 // The Uart setings are zero here, since SetAttribute() will update them to match 605 605 // the default setings. 606 606 // … … 854 854 /** 855 855 Detect whether specific FIFO is empty or not. 856 856 857 857 @param Fifo A pointer to the Data Structure SERIAL_DEV_FIFO 858 858 … … 1023 1023 1024 1024 IsaSerialFifoAdd (&SerialDevice->Receive, Data); 1025 1025 1026 1026 // 1027 1027 // For full handshake flow control, if receive buffer full … … 1572 1572 // 1573 1573 if ((Control & (~(EFI_SERIAL_REQUEST_TO_SEND | EFI_SERIAL_DATA_TERMINAL_READY | 1574 EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE | EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE | 1574 EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE | EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE | 1575 1575 EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE))) != 0) { 1576 1576 return EFI_UNSUPPORTED; … … 1784 1784 // Compute the number of bits in a single character. This is a start bit, 1785 1785 // followed by the number of data bits, followed by the number of stop bits. 1786 // The number of stop bits is specified by an enumeration that includes 1786 // The number of stop bits is specified by an enumeration that includes 1787 1787 // support for 1.5 stop bits. Treat 1.5 stop bits as 2 stop bits. 1788 1788 // 1789 BitsPerCharacter = 1790 1 + 1791 This->Mode->DataBits + 1789 BitsPerCharacter = 1790 1 + 1791 This->Mode->DataBits + 1792 1792 ((This->Mode->StopBits == TwoStopBits) ? 2 : This->Mode->StopBits); 1793 1793 1794 1794 // 1795 // Compute the timeout in microseconds to wait for a single byte to be 1796 // transmitted. The Mode structure contans a Timeout field that is the 1797 // maximum time to transmit or receive a character. However, many UARTs 1795 // Compute the timeout in microseconds to wait for a single byte to be 1796 // transmitted. The Mode structure contans a Timeout field that is the 1797 // maximum time to transmit or receive a character. However, many UARTs 1798 1798 // have a FIFO for transmits, so the time required to add one new character 1799 // to the transmit FIFO may be the time required to flush a full FIFO. If 1799 // to the transmit FIFO may be the time required to flush a full FIFO. If 1800 1800 // the Timeout in the Mode structure is smaller than the time required to 1801 1801 // flush a full FIFO at the current baud rate, then use a timeout value that … … 1810 1810 ) 1811 1811 ); 1812 1812 1813 1813 for (Index = 0; Index < *BufferSize; Index++) { 1814 1814 IsaSerialFifoAdd (&SerialDevice->Transmit, CharBuffer[Index]); -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.h
r48674 r58466 1 1 /** @file 2 2 Include for Serial Driver 3 3 4 4 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 610 610 /** 611 611 Detect whether specific FIFO is empty or not. 612 612 613 613 @param Fifo A pointer to the Data Structure SERIAL_DEV_FIFO 614 614 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/ComponentName.c
r48674 r58466 1 1 /** @file 2 2 Routines related Component Name protocol. 3 3 4 4 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c
r58459 r58466 1560 1560 goto Done; 1561 1561 } 1562 1562 1563 1563 Status = KeyboardRead (ConsoleIn, &CommandByte); 1564 1564 if (EFI_ERROR (Status)) { … … 1576 1576 } else { 1577 1577 mEnableMouseInterface = FALSE; 1578 } 1578 } 1579 1579 } else { 1580 1580 // … … 1592 1592 goto Done; 1593 1593 } 1594 1594 1595 1595 Status = KeyboardCommand (ConsoleIn, KEYBOARD_8042_COMMAND_DISABLE_MOUSE_INTERFACE); 1596 1596 if (EFI_ERROR (Status)) { … … 1598 1598 goto Done; 1599 1599 } 1600 1600 1601 1601 REPORT_STATUS_CODE_WITH_DEVICE_PATH ( 1602 1602 EFI_PROGRESS_CODE, … … 1612 1612 goto Done; 1613 1613 } 1614 1614 1615 1615 Status = KeyboardWaitForValue (ConsoleIn, 0x55); 1616 1616 if (EFI_ERROR (Status)) { … … 1882 1882 KEYBOARD_KBEN 1883 1883 ); 1884 1884 1885 1885 if (EFI_ERROR (Status)) { 1886 1886 return FALSE; … … 1896 1896 ); 1897 1897 mWaitForValueTimeOut = WaitForValueTimeOutBcakup; 1898 1898 1899 1899 if (EFI_ERROR (Status)) { 1900 1900 return FALSE; 1901 1901 } 1902 1902 1903 1903 return TRUE; 1904 1904 } else { -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c
r58459 r58466 269 269 270 270 ConsoleIn = KEYBOARD_CONSOLE_IN_DEV_FROM_THIS (This); 271 271 272 272 // 273 273 // Considering if the partial keystroke is enabled, there maybe a partial -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.c
r58459 r58466 22 22 /** 23 23 Test controller is a keyboard Controller. 24 24 25 25 @param This Pointer of EFI_DRIVER_BINDING_PROTOCOL 26 26 @param Controller driver's controller 27 27 @param RemainingDevicePath children device path 28 28 29 29 @retval EFI_UNSUPPORTED controller is not floppy disk 30 30 @retval EFI_SUCCESS controller is floppy disk … … 40 40 /** 41 41 Create KEYBOARD_CONSOLE_IN_DEV instance on controller. 42 42 43 43 @param This Pointer of EFI_DRIVER_BINDING_PROTOCOL 44 44 @param Controller driver controller handle 45 45 @param RemainingDevicePath Children's device path 46 46 47 47 @retval whether success to create floppy control instance. 48 48 **/ … … 80 80 /** 81 81 Free the waiting key notify list. 82 82 83 83 @param ListHead Pointer to list head 84 84 85 85 @retval EFI_INVALID_PARAMETER ListHead is NULL 86 86 @retval EFI_SUCCESS Sucess to free NotifyList … … 89 89 KbdFreeNotifyList ( 90 90 IN OUT LIST_ENTRY *ListHead 91 ); 91 ); 92 92 93 93 // … … 105 105 /** 106 106 Test controller is a keyboard Controller. 107 107 108 108 @param This Pointer of EFI_DRIVER_BINDING_PROTOCOL 109 109 @param Controller driver's controller 110 110 @param RemainingDevicePath children device path 111 111 112 112 @retval EFI_UNSUPPORTED controller is not floppy disk 113 113 @retval EFI_SUCCESS controller is floppy disk … … 159 159 /** 160 160 Create KEYBOARD_CONSOLE_IN_DEV instance on controller. 161 161 162 162 @param This Pointer of EFI_DRIVER_BINDING_PROTOCOL 163 163 @param Controller driver controller handle 164 164 @param RemainingDevicePath Children's device path 165 165 166 166 @retval whether success to create floppy control instance. 167 167 **/ … … 250 250 ConsoleIn->ConInEx.SetState = KeyboardSetState; 251 251 ConsoleIn->ConInEx.RegisterKeyNotify = KeyboardRegisterKeyNotify; 252 ConsoleIn->ConInEx.UnregisterKeyNotify = KeyboardUnregisterKeyNotify; 253 252 ConsoleIn->ConInEx.UnregisterKeyNotify = KeyboardUnregisterKeyNotify; 253 254 254 InitializeListHead (&ConsoleIn->NotifyList); 255 255 256 256 // 257 257 // Fix for random hangs in System waiting for the Key if no KBC is present in BIOS. 258 // When KBC decode (IO port 0x60/0x64 decode) is not enabled, 258 // When KBC decode (IO port 0x60/0x64 decode) is not enabled, 259 259 // KeyboardRead will read back as 0xFF and return status is EFI_SUCCESS. 260 260 // So instead we read status register to detect after read if KBC decode is enabled. 261 261 // 262 262 263 263 // 264 264 // Return code is ignored on purpose. … … 276 276 } 277 277 } 278 278 279 279 // 280 280 // Setup the WaitForKey event … … 294 294 // 295 295 // Setup the WaitForKeyEx event 296 // 296 // 297 297 Status = gBS->CreateEvent ( 298 298 EVT_NOTIFY_WAIT, … … 426 426 } 427 427 } 428 428 429 429 if (ConsoleIn != NULL) { 430 430 gBS->FreePool (ConsoleIn); … … 501 501 return Status; 502 502 } 503 503 504 504 ConsoleIn = KEYBOARD_CONSOLE_IN_DEV_FROM_THIS (ConIn); 505 505 … … 575 575 /** 576 576 Free the waiting key notify list. 577 577 578 578 @param ListHead Pointer to list head 579 579 580 580 @retval EFI_INVALID_PARAMETER ListHead is NULL 581 581 @retval EFI_SUCCESS Sucess to free NotifyList … … 593 593 while (!IsListEmpty (ListHead)) { 594 594 NotifyNode = CR ( 595 ListHead->ForwardLink, 596 KEYBOARD_CONSOLE_IN_EX_NOTIFY, 597 NotifyEntry, 595 ListHead->ForwardLink, 596 KEYBOARD_CONSOLE_IN_EX_NOTIFY, 597 NotifyEntry, 598 598 KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE 599 599 ); … … 601 601 gBS->FreePool (NotifyNode); 602 602 } 603 603 604 604 return EFI_SUCCESS; 605 605 } 606 606 607 607 /** 608 The module Entry Point for module Ps2Keyboard. 609 610 @param[in] ImageHandle The firmware allocated handle for the EFI image. 608 The module Entry Point for module Ps2Keyboard. 609 610 @param[in] ImageHandle The firmware allocated handle for the EFI image. 611 611 @param[in] SystemTable A pointer to the EFI System Table. 612 612 613 613 @retval EFI_SUCCESS The entry point is executed successfully. 614 614 @retval other Some error occurs when executing this entry point. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf
r58459 r58466 59 59 TimerLib 60 60 PcdLib 61 61 62 62 [Protocols] 63 63 gEfiSimpleTextInProtocolGuid ## BY_START -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseAbsolutePointerDxe/CommPs2.c
r48674 r58466 1 1 /** @file 2 2 PS2 Mouse Communication Interface. 3 3 4 4 Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 22 22 /** 23 23 Issue self test command via IsaIo interface. 24 24 25 25 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 26 26 27 27 @return EFI_SUCCESS Success to do keyboard self testing. 28 28 @return others Fail to do keyboard self testing. … … 83 83 /** 84 84 Issue command to enable keyboard AUX functionality. 85 85 86 86 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 87 87 88 88 @return Status of command issuing. 89 89 **/ … … 101 101 /** 102 102 Issue command to disable keyboard AUX functionality. 103 103 104 104 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 105 105 106 106 @return Status of command issuing. 107 107 **/ … … 119 119 /** 120 120 Issue command to enable keyboard. 121 121 122 122 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 123 123 124 124 @return Status of command issuing. 125 125 **/ … … 137 137 /** 138 138 Issue command to disable keyboard. 139 139 140 140 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 141 141 142 142 @return Status of command issuing. 143 143 **/ … … 155 155 /** 156 156 Issue command to check keyboard status. 157 157 158 158 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 159 159 @param KeyboardEnable return whether keyboard is enable. 160 160 161 161 @return Status of command issuing. 162 162 **/ … … 196 196 /** 197 197 Issue command to reset keyboard. 198 198 199 199 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 200 200 201 201 @return Status of command issuing. 202 202 **/ … … 241 241 /** 242 242 Issue command to set mouse's sample rate 243 243 244 244 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 245 @param SampleRate value of sample rate 246 245 @param SampleRate value of sample rate 246 247 247 @return Status of command issuing. 248 248 **/ … … 270 270 /** 271 271 Issue command to set mouse's resolution. 272 272 273 273 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 274 274 @param Resolution value of resolution 275 275 276 276 @return Status of command issuing. 277 277 **/ … … 299 299 /** 300 300 Issue command to set mouse's scaling. 301 301 302 302 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 303 303 @param Scaling value of scaling 304 304 305 305 @return Status of command issuing. 306 306 **/ … … 323 323 /** 324 324 Issue command to enable Ps2 mouse. 325 325 326 326 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 327 327 328 328 @return Status of command issuing. 329 329 **/ … … 342 342 Get mouse packet . Only care first 3 bytes 343 343 344 @param MouseAbsolutePointerDev Pointer to PS2 Absolute Pointer Simulation Device Private Data Structure 344 @param MouseAbsolutePointerDev Pointer to PS2 Absolute Pointer Simulation Device Private Data Structure 345 345 346 346 @retval EFI_NOT_READY Mouse Device not ready to input data packet, or some error happened during getting the packet … … 433 433 RelativeMovementY = Packet[2]; 434 434 // 435 // Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 436 // Byte 0 | Y overflow | X overflow | Y sign bit | X sign bit | Always 1 | Middle Btn | Right Btn | Left Btn 437 // Byte 1 | 8 bit X Movement 438 // Byte 2 | 8 bit Y Movement 439 // 435 // Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 436 // Byte 0 | Y overflow | X overflow | Y sign bit | X sign bit | Always 1 | Middle Btn | Right Btn | Left Btn 437 // Byte 1 | 8 bit X Movement 438 // Byte 2 | 8 bit Y Movement 439 // 440 440 // X sign bit + 8 bit X Movement : 9-bit signed twos complement integer that presents the relative displacement of the device in the X direction since the last data transmission. 441 441 // Y sign bit + 8 bit Y Movement : Same as X sign bit + 8 bit X Movement. … … 444 444 // First, Clear X and Y high 8 bits 445 445 // 446 RelativeMovementX = (INT16) (RelativeMovementX & 0xFF); 447 RelativeMovementY = (INT16) (RelativeMovementY & 0xFF); 446 RelativeMovementX = (INT16) (RelativeMovementX & 0xFF); 447 RelativeMovementY = (INT16) (RelativeMovementY & 0xFF); 448 448 // 449 449 // Second, if the 9-bit signed twos complement integer is negative, set the high 8 bit 0xff … … 456 456 } 457 457 458 458 459 459 RButton = (UINT8) (Packet[0] & 0x2); 460 460 LButton = (UINT8) (Packet[0] & 0x1); … … 476 476 /** 477 477 Read data via IsaIo protocol with given number. 478 478 479 479 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 480 480 @param Buffer Buffer receive data of mouse 481 481 @param BufSize The size of buffer 482 482 @param State Check input or read data 483 483 484 484 @return status of reading mouse data. 485 485 **/ … … 537 537 /** 538 538 I/O work flow of outing 8042 command. 539 539 540 540 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 541 541 @param Command I/O command. 542 542 543 543 @retval EFI_SUCCESS Success to excute I/O work flow 544 544 @retval EFI_TIMEOUT Keyboard controller time out. … … 576 576 /** 577 577 I/O work flow of outing 8042 data. 578 578 579 579 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 580 580 @param Data Data value 581 581 582 582 @retval EFI_SUCCESS Success to excute I/O work flow 583 583 @retval EFI_TIMEOUT Keyboard controller time out. … … 612 612 /** 613 613 I/O work flow of in 8042 data. 614 614 615 615 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 616 616 @param Data Data value 617 617 618 618 @retval EFI_SUCCESS Success to excute I/O work flow 619 619 @retval EFI_TIMEOUT Keyboard controller time out. … … 655 655 /** 656 656 I/O work flow of outing 8042 Aux command. 657 657 658 658 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 659 659 @param Command Aux I/O command 660 660 @param Resend Whether need resend the Aux command. 661 661 662 662 @retval EFI_SUCCESS Success to excute I/O work flow 663 663 @retval EFI_TIMEOUT Keyboard controller time out. … … 737 737 /** 738 738 I/O work flow of outing 8042 Aux data. 739 739 740 740 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 741 @param Data Buffer holding return value 742 741 @param Data Buffer holding return value 742 743 743 @retval EFI_SUCCESS Success to excute I/O work flow. 744 744 @retval EFI_TIMEOUT Keyboard controller time out. … … 783 783 /** 784 784 I/O work flow of in 8042 Aux data. 785 785 786 786 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 787 787 @param Data Buffer holding return value. 788 788 789 789 @retval EFI_SUCCESS Success to excute I/O work flow 790 790 @retval EFI_TIMEOUT Keyboard controller time out. … … 814 814 /** 815 815 Check keyboard controller status, if it is output buffer full and for auxiliary device. 816 816 817 817 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 818 818 819 819 @retval EFI_SUCCESS Keyboard controller is ready 820 820 @retval EFI_NOT_READY Keyboard controller is not ready … … 841 841 /** 842 842 I/O work flow to wait input buffer empty in given time. 843 843 844 844 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 845 845 @param Timeout Wating time. 846 846 847 847 @retval EFI_TIMEOUT if input is still not empty in given time. 848 848 @retval EFI_SUCCESS input is empty. … … 882 882 /** 883 883 I/O work flow to wait output buffer full in given time. 884 884 885 885 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 886 886 @param Timeout given time 887 887 888 888 @retval EFI_TIMEOUT output is not full in given time 889 889 @retval EFI_SUCCESS output is full in given time. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseAbsolutePointerDxe/CommPs2.h
r48674 r58466 1 1 /** @file 2 2 Using PS2 Mouse to simulation Absolution Pointer Device. 3 3 4 4 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 79 79 /// Parity Error 80 80 /// 81 #define KBC_PARE 0x80 81 #define KBC_PARE 0x80 82 82 /// 83 83 /// General Time Out 84 84 /// 85 #define KBC_TIM 0x40 85 #define KBC_TIM 0x40 86 86 /// 87 87 /// Output buffer for auxiliary device (PS/2): … … 89 89 /// 1 - Holds data for auxiliary device 90 90 /// 91 #define KBC_AUXB 0x20 91 #define KBC_AUXB 0x20 92 92 /// 93 93 /// Keyboard lock status: … … 95 95 /// 1 - keyboard free 96 96 /// 97 #define KBC_KEYL 0x10 97 #define KBC_KEYL 0x10 98 98 /// 99 99 /// Command/Data: … … 107 107 /// 1 - self-test successful 108 108 /// 109 #define KBC_SYSF 0x04 109 #define KBC_SYSF 0x04 110 110 /// 111 111 /// Input Buffer Status : … … 113 113 /// 1 - CPU data in input buffer 114 114 /// 115 #define KBC_INPB 0x02 115 #define KBC_INPB 0x02 116 116 /// 117 117 /// Output Buffer Status : … … 119 119 /// 1 - keyboard controller data in output buffer 120 120 /// 121 #define KBC_OUTB 0x01 121 #define KBC_OUTB 0x01 122 122 123 123 /** 124 124 Issue self test command via IsaIo interface. 125 125 126 126 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 127 127 128 128 @return EFI_SUCCESS Success to do keyboard self testing. 129 129 @return others Fail to do keyboard self testing. … … 136 136 /** 137 137 Issue command to enable keyboard AUX functionality. 138 139 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 140 138 139 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 140 141 141 @return Status of command issuing. 142 142 **/ … … 148 148 /** 149 149 Issue command to disable keyboard AUX functionality. 150 151 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 152 150 151 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 152 153 153 @return Status of command issuing. 154 154 **/ … … 160 160 /** 161 161 Issue command to enable keyboard. 162 163 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 164 162 163 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 164 165 165 @return Status of command issuing. 166 166 **/ … … 172 172 /** 173 173 Issue command to disable keyboard. 174 175 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 176 174 175 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 176 177 177 @return Status of command issuing. 178 178 **/ … … 184 184 /** 185 185 Issue command to check keyboard status. 186 186 187 187 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 188 188 @param KeyboardEnable return whether keyboard is enable. 189 189 190 190 @return Status of command issuing. 191 191 **/ … … 198 198 /** 199 199 Issue command to reset keyboard. 200 201 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 202 200 201 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 202 203 203 @return Status of command issuing. 204 204 **/ … … 210 210 /** 211 211 Issue command to set mouse's sample rate 212 213 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 214 @param SampleRate value of sample rate 215 212 213 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 214 @param SampleRate value of sample rate 215 216 216 @return Status of command issuing. 217 217 **/ … … 224 224 /** 225 225 Issue command to set mouse's resolution. 226 226 227 227 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 228 228 @param Resolution value of resolution 229 229 230 230 @return Status of command issuing. 231 231 **/ … … 238 238 /** 239 239 Issue command to set mouse's scaling. 240 240 241 241 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 242 242 @param Scaling value of scaling 243 243 244 244 @return Status of command issuing. 245 245 **/ … … 252 252 /** 253 253 Issue command to enable Ps2 mouse. 254 255 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 256 254 255 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 256 257 257 @return Status of command issuing. 258 258 **/ … … 278 278 /** 279 279 Read data via IsaIo protocol with given number. 280 280 281 281 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 282 282 @param Buffer Buffer receive data of mouse 283 283 @param BufSize The size of buffer 284 284 @param State Check input or read data 285 285 286 286 @return status of reading mouse data. 287 287 **/ … … 299 299 /** 300 300 I/O work flow of outing 8042 command. 301 301 302 302 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 303 303 @param Command I/O command. 304 304 305 305 @retval EFI_SUCCESS Success to excute I/O work flow 306 306 @retval EFI_TIMEOUT Keyboard controller time out. … … 314 314 /** 315 315 I/O work flow of in 8042 data. 316 316 317 317 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 318 318 @param Data Data value 319 319 320 320 @retval EFI_SUCCESS Success to excute I/O work flow 321 321 @retval EFI_TIMEOUT Keyboard controller time out. … … 329 329 /** 330 330 I/O work flow of outing 8042 data. 331 331 332 332 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 333 333 @param Data Data value 334 334 335 335 @retval EFI_SUCCESS Success to excute I/O work flow 336 336 @retval EFI_TIMEOUT Keyboard controller time out. … … 344 344 /** 345 345 I/O work flow of outing 8042 Aux command. 346 346 347 347 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 348 348 @param Command Aux I/O command 349 349 @param Resend Whether need resend the Aux command. 350 350 351 351 @retval EFI_SUCCESS Success to excute I/O work flow 352 352 @retval EFI_TIMEOUT Keyboard controller time out. … … 361 361 /** 362 362 I/O work flow of in 8042 Aux data. 363 363 364 364 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 365 365 @param Data Buffer holding return value. 366 366 367 367 @retval EFI_SUCCESS Success to excute I/O work flow 368 368 @retval EFI_TIMEOUT Keyboard controller time out. … … 376 376 /** 377 377 I/O work flow of outing 8042 Aux data. 378 378 379 379 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 380 380 @param Data Buffer holding return value. 381 381 382 382 @retval EFI_SUCCESS Success to excute I/O work flow 383 383 @retval EFI_TIMEOUT Keyboard controller time out. … … 391 391 /** 392 392 Check keyboard controller status, if it is output buffer full and for auxiliary device. 393 394 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 395 393 394 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 395 396 396 @retval EFI_SUCCESS Keyboard controller is ready 397 397 @retval EFI_NOT_READY Keyboard controller is not ready … … 404 404 /** 405 405 I/O work flow to wait input buffer empty in given time. 406 406 407 407 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 408 408 @param Timeout Wating time. 409 409 410 410 @retval EFI_TIMEOUT if input is still not empty in given time. 411 411 @retval EFI_SUCCESS input is empty. … … 419 419 /** 420 420 I/O work flow to wait output buffer full in given time. 421 421 422 422 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 423 423 @param Timeout given time 424 424 425 425 @retval EFI_TIMEOUT output is not full in given time 426 426 @retval EFI_SUCCESS output is full in given time. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseAbsolutePointerDxe/Ps2MouseAbsolutePointer.c
r58459 r58466 2 2 A faked PS/2 Absolute Pointer driver. Routines that interacts with callers, 3 3 conforming to EFI driver model 4 4 5 5 Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR> 6 6 This program and the accompanying materials … … 231 231 // Initialize keyboard controller if necessary 232 232 // 233 REPORT_STATUS_CODE_WITH_DEVICE_PATH ( 233 REPORT_STATUS_CODE_WITH_DEVICE_PATH ( 234 234 EFI_PROGRESS_CODE, 235 235 EFI_PERIPHERAL_MOUSE | EFI_P_MOUSE_PC_SELF_TEST, … … 641 641 /** 642 642 Get and Clear mouse status. 643 643 644 644 @param This - Pointer of simple pointer Protocol. 645 645 @param State - Output buffer holding status. … … 744 744 The user Entry Point for module Ps2MouseAbsolutePointer. The user code starts with this function. 745 745 746 @param[in] ImageHandle The firmware allocated handle for the EFI image. 746 @param[in] ImageHandle The firmware allocated handle for the EFI image. 747 747 @param[in] SystemTable A pointer to the EFI System Table. 748 748 749 749 @retval EFI_SUCCESS The entry point is executed successfully. 750 750 @retval other Some error occurs when executing this entry point. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseAbsolutePointerDxe/Ps2MouseAbsolutePointer.h
r48674 r58466 1 1 /** @file 2 2 A Ps2MouseAbsolutePointer driver header file 3 3 4 4 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 323 323 /** 324 324 Get and Clear mouse status. 325 325 326 326 @param This - Pointer of simple pointer Protocol. 327 327 @param State - Output buffer holding status. … … 371 371 /** 372 372 I/O work flow of in 8042 data. 373 373 374 374 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 375 375 @param Data Data value 376 376 377 377 @retval EFI_SUCCESS Success to excute I/O work flow 378 378 @retval EFI_TIMEOUT Keyboard controller time out. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/CommPs2.c
r48674 r58466 1 1 /** @file 2 2 PS2 Mouse Communication Interface. 3 3 4 4 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 22 22 /** 23 23 Issue self test command via IsaIo interface. 24 24 25 25 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 26 26 27 27 @return EFI_SUCCESS Success to do keyboard self testing. 28 28 @return others Fail to do keyboard self testing. … … 83 83 /** 84 84 Issue command to enable keyboard AUX functionality. 85 85 86 86 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 87 87 88 88 @return Status of command issuing. 89 89 **/ … … 101 101 /** 102 102 Issue command to disable keyboard AUX functionality. 103 103 104 104 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 105 105 106 106 @return Status of command issuing. 107 107 **/ … … 119 119 /** 120 120 Issue command to enable keyboard. 121 121 122 122 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 123 123 124 124 @return Status of command issuing. 125 125 **/ … … 137 137 /** 138 138 Issue command to disable keyboard. 139 139 140 140 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 141 141 142 142 @return Status of command issuing. 143 143 **/ … … 155 155 /** 156 156 Issue command to check keyboard status. 157 157 158 158 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 159 159 @param KeyboardEnable return whether keyboard is enable. 160 160 161 161 @return Status of command issuing. 162 162 **/ … … 196 196 /** 197 197 Issue command to reset keyboard. 198 198 199 199 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 200 200 201 201 @return Status of command issuing. 202 202 **/ … … 241 241 /** 242 242 Issue command to set mouse's sample rate 243 243 244 244 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 245 @param SampleRate value of sample rate 246 245 @param SampleRate value of sample rate 246 247 247 @return Status of command issuing. 248 248 **/ … … 270 270 /** 271 271 Issue command to set mouse's resolution. 272 272 273 273 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 274 274 @param Resolution value of resolution 275 275 276 276 @return Status of command issuing. 277 277 **/ … … 299 299 /** 300 300 Issue command to set mouse's scaling. 301 301 302 302 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 303 303 @param Scaling value of scaling 304 304 305 305 @return Status of command issuing. 306 306 **/ … … 323 323 /** 324 324 Issue command to enable Ps2 mouse. 325 325 326 326 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 327 327 328 328 @return Status of command issuing. 329 329 **/ … … 342 342 Get mouse packet . Only care first 3 bytes 343 343 344 @param MouseDev Pointer of PS2 Mouse Private Data Structure 344 @param MouseDev Pointer of PS2 Mouse Private Data Structure 345 345 346 346 @retval EFI_NOT_READY Mouse Device not ready to input data packet, or some error happened during getting the packet … … 433 433 RelativeMovementY = Packet[2]; 434 434 // 435 // Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 436 // Byte 0 | Y overflow | X overflow | Y sign bit | X sign bit | Always 1 | Middle Btn | Right Btn | Left Btn 437 // Byte 1 | 8 bit X Movement 438 // Byte 2 | 8 bit Y Movement 439 // 435 // Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 436 // Byte 0 | Y overflow | X overflow | Y sign bit | X sign bit | Always 1 | Middle Btn | Right Btn | Left Btn 437 // Byte 1 | 8 bit X Movement 438 // Byte 2 | 8 bit Y Movement 439 // 440 440 // X sign bit + 8 bit X Movement : 9-bit signed twos complement integer that presents the relative displacement of the device in the X direction since the last data transmission. 441 441 // Y sign bit + 8 bit Y Movement : Same as X sign bit + 8 bit X Movement. … … 444 444 // First, Clear X and Y high 8 bits 445 445 // 446 RelativeMovementX = (INT16) (RelativeMovementX & 0xFF); 447 RelativeMovementY = (INT16) (RelativeMovementY & 0xFF); 446 RelativeMovementX = (INT16) (RelativeMovementX & 0xFF); 447 RelativeMovementY = (INT16) (RelativeMovementY & 0xFF); 448 448 // 449 449 // Second, if the 9-bit signed twos complement integer is negative, set the high 8 bit 0xff … … 456 456 } 457 457 458 458 459 459 RButton = (UINT8) (Packet[0] & 0x2); 460 460 LButton = (UINT8) (Packet[0] & 0x1); … … 476 476 /** 477 477 Read data via IsaIo protocol with given number. 478 478 479 479 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 480 480 @param Buffer Buffer receive data of mouse 481 481 @param BufSize The size of buffer 482 482 @param State Check input or read data 483 483 484 484 @return status of reading mouse data. 485 485 **/ … … 536 536 /** 537 537 I/O work flow of outing 8042 command. 538 538 539 539 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 540 540 @param Command I/O command. 541 541 542 542 @retval EFI_SUCCESS Success to excute I/O work flow 543 543 @retval EFI_TIMEOUT Keyboard controller time out. … … 575 575 /** 576 576 I/O work flow of outing 8042 data. 577 577 578 578 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 579 579 @param Data Data value 580 580 581 581 @retval EFI_SUCCESS Success to excute I/O work flow 582 582 @retval EFI_TIMEOUT Keyboard controller time out. … … 611 611 /** 612 612 I/O work flow of in 8042 data. 613 613 614 614 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 615 615 @param Data Data value 616 616 617 617 @retval EFI_SUCCESS Success to excute I/O work flow 618 618 @retval EFI_TIMEOUT Keyboard controller time out. … … 654 654 /** 655 655 I/O work flow of outing 8042 Aux command. 656 656 657 657 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 658 658 @param Command Aux I/O command 659 659 @param Resend Whether need resend the Aux command. 660 660 661 661 @retval EFI_SUCCESS Success to excute I/O work flow 662 662 @retval EFI_TIMEOUT Keyboard controller time out. … … 736 736 /** 737 737 I/O work flow of outing 8042 Aux data. 738 738 739 739 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 740 740 @param Data Buffer holding return value 741 741 742 742 @retval EFI_SUCCESS Success to excute I/O work flow 743 743 @retval EFI_TIMEOUT Keyboard controller time out. … … 782 782 /** 783 783 I/O work flow of in 8042 Aux data. 784 784 785 785 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 786 786 @param Data Buffer holding return value. 787 787 788 788 @retval EFI_SUCCESS Success to excute I/O work flow 789 789 @retval EFI_TIMEOUT Keyboard controller time out. … … 813 813 /** 814 814 Check keyboard controller status, if it is output buffer full and for auxiliary device. 815 815 816 816 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 817 817 818 818 @retval EFI_SUCCESS Keyboard controller is ready 819 819 @retval EFI_NOT_READY Keyboard controller is not ready … … 840 840 /** 841 841 I/O work flow to wait input buffer empty in given time. 842 842 843 843 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 844 844 @param Timeout Wating time. 845 845 846 846 @retval EFI_TIMEOUT if input is still not empty in given time. 847 847 @retval EFI_SUCCESS input is empty. … … 881 881 /** 882 882 I/O work flow to wait output buffer full in given time. 883 883 884 884 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 885 885 @param Timeout given time 886 886 887 887 @retval EFI_TIMEOUT output is not full in given time 888 888 @retval EFI_SUCCESS output is full in given time. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/CommPs2.h
r48674 r58466 1 1 /** @file 2 PS2 Mouse Communication Interface 2 PS2 Mouse Communication Interface 3 3 4 4 Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR> … … 79 79 /// Parity Error 80 80 /// 81 #define KBC_PARE 0x80 81 #define KBC_PARE 0x80 82 82 /// 83 83 /// General Time Out 84 84 /// 85 #define KBC_TIM 0x40 85 #define KBC_TIM 0x40 86 86 /// 87 87 /// Output buffer for auxiliary device (PS/2): … … 89 89 /// 1 - Holds data for auxiliary device 90 90 /// 91 #define KBC_AUXB 0x20 91 #define KBC_AUXB 0x20 92 92 /// 93 93 /// Keyboard lock status: … … 95 95 /// 1 - keyboard free 96 96 /// 97 #define KBC_KEYL 0x10 97 #define KBC_KEYL 0x10 98 98 /// 99 99 /// Command/Data: … … 107 107 /// 1 - self-test successful 108 108 /// 109 #define KBC_SYSF 0x04 109 #define KBC_SYSF 0x04 110 110 /// 111 111 /// Input Buffer Status : … … 113 113 /// 1 - CPU data in input buffer 114 114 /// 115 #define KBC_INPB 0x02 115 #define KBC_INPB 0x02 116 116 /// 117 117 /// Output Buffer Status : … … 119 119 /// 1 - keyboard controller data in output buffer 120 120 /// 121 #define KBC_OUTB 0x01 121 #define KBC_OUTB 0x01 122 122 123 123 /** 124 124 Issue self test command via IsaIo interface. 125 125 126 126 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 127 127 128 128 @return EFI_SUCCESS Success to do keyboard self testing. 129 129 @return others Fail to do keyboard self testing. … … 136 136 /** 137 137 Issue command to enable keyboard AUX functionality. 138 139 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 140 138 139 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 140 141 141 @return Status of command issuing. 142 142 **/ … … 148 148 /** 149 149 Issue command to disable keyboard AUX functionality. 150 151 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 152 150 151 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 152 153 153 @return Status of command issuing. 154 154 **/ … … 160 160 /** 161 161 Issue command to enable keyboard. 162 163 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 164 162 163 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 164 165 165 @return Status of command issuing. 166 166 **/ … … 172 172 /** 173 173 Issue command to disable keyboard. 174 175 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 176 174 175 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 176 177 177 @return Status of command issuing. 178 178 **/ … … 184 184 /** 185 185 Issue command to check keyboard status. 186 186 187 187 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 188 188 @param KeyboardEnable return whether keyboard is enable. 189 189 190 190 @return Status of command issuing. 191 191 **/ … … 198 198 /** 199 199 Issue command to reset keyboard. 200 201 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 202 200 201 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 202 203 203 @return Status of command issuing. 204 204 **/ … … 210 210 /** 211 211 Issue command to set mouse's sample rate 212 213 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 214 @param SampleRate value of sample rate 215 212 213 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 214 @param SampleRate value of sample rate 215 216 216 @return Status of command issuing. 217 217 **/ … … 224 224 /** 225 225 Issue command to set mouse's resolution. 226 226 227 227 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 228 228 @param Resolution value of resolution 229 229 230 230 @return Status of command issuing. 231 231 **/ … … 238 238 /** 239 239 Issue command to set mouse's scaling. 240 240 241 241 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 242 242 @param Scaling value of scaling 243 243 244 244 @return Status of command issuing. 245 245 **/ … … 252 252 /** 253 253 Issue command to enable Ps2 mouse. 254 255 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 256 254 255 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 256 257 257 @return Status of command issuing. 258 258 **/ … … 265 265 Get mouse packet . Only care first 3 bytes 266 266 267 @param MouseDev Pointer of PS2 Mouse Private Data Structure 267 @param MouseDev Pointer of PS2 Mouse Private Data Structure 268 268 269 269 @retval EFI_NOT_READY Mouse Device not ready to input data packet, or some error happened during getting the packet … … 278 278 /** 279 279 Read data via IsaIo protocol with given number. 280 280 281 281 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 282 282 @param Buffer Buffer receive data of mouse 283 283 @param BufSize The size of buffer 284 284 @param State Check input or read data 285 285 286 286 @return status of reading mouse data. 287 287 **/ … … 299 299 /** 300 300 I/O work flow of outing 8042 command. 301 301 302 302 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 303 303 @param Command I/O command. 304 304 305 305 @retval EFI_SUCCESS Success to excute I/O work flow 306 306 @retval EFI_TIMEOUT Keyboard controller time out. … … 314 314 /** 315 315 I/O work flow of in 8042 data. 316 316 317 317 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 318 318 @param Data Data value 319 319 320 320 @retval EFI_SUCCESS Success to excute I/O work flow 321 321 @retval EFI_TIMEOUT Keyboard controller time out. … … 329 329 /** 330 330 I/O work flow of outing 8042 data. 331 331 332 332 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 333 333 @param Data Data value 334 334 335 335 @retval EFI_SUCCESS Success to excute I/O work flow 336 336 @retval EFI_TIMEOUT Keyboard controller time out. … … 344 344 /** 345 345 I/O work flow of outing 8042 Aux command. 346 346 347 347 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 348 348 @param Command Aux I/O command 349 349 @param Resend Whether need resend the Aux command. 350 350 351 351 @retval EFI_SUCCESS Success to excute I/O work flow 352 352 @retval EFI_TIMEOUT Keyboard controller time out. … … 361 361 /** 362 362 I/O work flow of in 8042 Aux data. 363 363 364 364 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 365 365 @param Data Buffer holding return value. 366 366 367 367 @retval EFI_SUCCESS Success to excute I/O work flow 368 368 @retval EFI_TIMEOUT Keyboard controller time out. … … 376 376 /** 377 377 I/O work flow of outing 8042 Aux data. 378 378 379 379 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 380 380 @param Data Buffer holding return value 381 381 382 382 @retval EFI_SUCCESS Success to excute I/O work flow 383 383 @retval EFI_TIMEOUT Keyboard controller time out. … … 391 391 /** 392 392 Check keyboard controller status, if it is output buffer full and for auxiliary device. 393 394 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 395 393 394 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 395 396 396 @retval EFI_SUCCESS Keyboard controller is ready 397 397 @retval EFI_NOT_READY Keyboard controller is not ready … … 404 404 /** 405 405 I/O work flow to wait input buffer empty in given time. 406 406 407 407 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 408 408 @param Timeout Wating time. 409 409 410 410 @retval EFI_TIMEOUT if input is still not empty in given time. 411 411 @retval EFI_SUCCESS input is empty. … … 419 419 /** 420 420 I/O work flow to wait output buffer full in given time. 421 421 422 422 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 423 423 @param Timeout given time 424 424 425 425 @retval EFI_TIMEOUT output is not full in given time 426 426 @retval EFI_SUCCESS output is full in given time. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2Mouse.c
r58459 r58466 2 2 PS/2 Mouse driver. Routines that interacts with callers, 3 3 conforming to EFI driver model. 4 4 5 5 Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR> 6 6 This program and the accompanying materials … … 110 110 111 111 /** 112 Start this driver on ControllerHandle by opening a IsaIo protocol, creating 112 Start this driver on ControllerHandle by opening a IsaIo protocol, creating 113 113 PS2_MOUSE_ABSOLUTE_POINTER_DEV device and install gEfiAbsolutePointerProtocolGuid 114 114 finally. … … 240 240 StatusCode = EFI_PERIPHERAL_MOUSE | EFI_P_EC_NOT_DETECTED; 241 241 goto ErrorExit; 242 } 242 } 243 243 244 244 REPORT_STATUS_CODE_WITH_DEVICE_PATH ( … … 382 382 FreeUnicodeStringTable (MouseDev->ControllerNameTable); 383 383 } 384 384 385 385 if (Status != EFI_DEVICE_ERROR) { 386 386 // … … 656 656 /** 657 657 Get and Clear mouse status. 658 658 659 659 @param This - Pointer of simple pointer Protocol. 660 660 @param State - Output buffer holding status. … … 758 758 The user Entry Point for module Ps2Mouse. The user code starts with this function. 759 759 760 @param[in] ImageHandle The firmware allocated handle for the EFI image. 760 @param[in] ImageHandle The firmware allocated handle for the EFI image. 761 761 @param[in] SystemTable A pointer to the EFI System Table. 762 762 763 763 @retval EFI_SUCCESS The entry point is executed successfully. 764 764 @retval other Some error occurs when executing this entry point. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2Mouse.h
r48674 r58466 1 1 /** @file 2 2 PS/2 Mouse driver header file. 3 3 4 4 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 323 323 /** 324 324 Get and Clear mouse status. 325 325 326 326 @param This - Pointer of simple pointer Protocol. 327 327 @param State - Output buffer holding status. … … 371 371 /** 372 372 I/O work flow of in 8042 data. 373 373 374 374 @param IsaIo Pointer to instance of EFI_ISA_IO_PROTOCOL 375 375 @param Data Data value 376 376 377 377 @retval EFI_SUCCESS Success to excute I/O work flow 378 378 @retval EFI_TIMEOUT Keyboard controller time out. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/Ata.c
r48674 r58466 1 1 /** @file 2 This file contains all helper functions on the ATA command 3 2 This file contains all helper functions on the ATA command 3 4 4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 32 32 all the information of the IDE device. 33 33 34 @retval EFI_SUCCESS The disk specified by IdeDev is a Atapi6 supported one and 34 @retval EFI_SUCCESS The disk specified by IdeDev is a Atapi6 supported one and 35 35 48-bit addressing must be used 36 @retval EFI_UNSUPPORTED The disk dosn't not support Atapi6 or it supports but the 36 @retval EFI_UNSUPPORTED The disk dosn't not support Atapi6 or it supports but the 37 37 capacity is below 120G, 48bit addressing is not needed 38 38 @retval EFI_DEVICE_ERROR The identify data in IdeDev is incorrect … … 111 111 Enable SMART of the disk if supported 112 112 113 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to record 113 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to record 114 114 all the information of the IDE device. 115 115 **/ … … 264 264 including device type, media block size, media capacity, and etc. 265 265 266 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to record 266 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to record 267 267 all the information of the IDE device. 268 268 … … 298 298 DeviceSelect = (UINT8) ((IdeDev->Device) << 4); 299 299 300 300 301 301 Retry = 3; 302 while (Retry > 0) { 302 while (Retry > 0) { 303 303 Status = AtaPioDataIn ( 304 304 IdeDev, … … 405 405 /** 406 406 This function is a helper function used to change the char order in a string. It 407 is designed specially for the PrintAtaModuleName() function. After the IDE device 408 is detected, the IDE driver gets the device module name by sending ATA command 407 is designed specially for the PrintAtaModuleName() function. After the IDE device 408 is detected, the IDE driver gets the device module name by sending ATA command 409 409 called ATA Identify Command or ATAPI Identify Command to the specified IDE device. 410 410 The module name returned is a string of ASCII characters: the first character is bit8--bit15 411 411 of the first word, the second character is BIT0--bit7 of the first word and so on. Thus 412 the string can not be print directly before it is preprocessed by this func to change 412 the string can not be print directly before it is preprocessed by this func to change 413 413 the order of characters in each word in the string. 414 414 … … 456 456 This function is used to send out ATA commands conforms to the PIO Data In Protocol. 457 457 458 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 458 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 459 459 all the information of the IDE device. 460 460 @param Buffer buffer contained data transferred from device to host. … … 466 466 @param CylinderLsb value of the low byte of the Cylinder Register 467 467 @param CylinderMsb value of the high byte of the Cylinder Register 468 468 469 469 @retval EFI_SUCCESS send out the ATA command and device send required data successfully. 470 470 @retval EFI_DEVICE_ERROR command sent failed. … … 753 753 Register, the Error Register's value is also be parsed and print out. 754 754 755 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to 755 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to 756 756 record all the information of the IDE device. 757 757 … … 851 851 852 852 /** 853 This function is called by the AtaBlkIoReadBlocks() to perform reading from 853 This function is called by the AtaBlkIoReadBlocks() to perform reading from 854 854 media in block unit. 855 855 856 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 856 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 857 857 all the information of the IDE device. 858 858 @param DataBuffer A pointer to the destination buffer for the data. 859 859 @param Lba The starting logical block address to read from on the device media. 860 860 @param NumberOfBlocks The number of transfer data blocks. 861 861 862 862 @return status is fully dependent on the return status of AtaPioDataIn() function. 863 863 … … 960 960 961 961 /** 962 This function is called by the AtaBlkIoWriteBlocks() to perform writing onto 962 This function is called by the AtaBlkIoWriteBlocks() to perform writing onto 963 963 media in block unit. 964 964 … … 968 968 @param Lba The starting logical block address to write onto the device media. 969 969 @param NumberOfBlocks The number of transfer data blocks. 970 970 971 971 @return status is fully dependent on the return status of AtaPioDataIn() function. 972 972 … … 1056 1056 /** 1057 1057 This function is used to implement the Soft Reset on the specified device. But, 1058 the ATA Soft Reset mechanism is so strong a reset method that it will force 1058 the ATA Soft Reset mechanism is so strong a reset method that it will force 1059 1059 resetting on both devices connected to the same cable. 1060 1060 … … 1121 1121 } 1122 1122 /** 1123 This function is used to send out ATA commands conforms to the PIO Data In 1123 This function is used to send out ATA commands conforms to the PIO Data In 1124 1124 Protocol, supporting ATA/ATAPI-6 standard 1125 1125 … … 1603 1603 &RegisterValue 1604 1604 ); 1605 1605 1606 1606 RegisterValue |= (BMIS_INTERRUPT | BMIS_ERROR); 1607 1607 1608 1608 IdeDev->PciIo->Io.Write ( 1609 1609 IdeDev->PciIo, … … 1616 1616 1617 1617 Status = EFI_SUCCESS; 1618 1618 1619 1619 RemainBlockNum = NumberOfBlocks; 1620 1620 while (RemainBlockNum > 0) { … … 1899 1899 /** 1900 1900 This function is called by the AtaBlkIoReadBlocks() to perform reading from 1901 media in block unit. The function has been enhanced to support >120GB access 1901 media in block unit. The function has been enhanced to support >120GB access 1902 1902 and transfer at most 65536 blocks per command 1903 1903 1904 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 1904 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 1905 1905 all the information of the IDE device. 1906 1906 @param DataBuffer A pointer to the destination buffer for the data. … … 1931 1931 on the device media. 1932 1932 @param NumberOfBlocks The number of transfer data blocks. 1933 1933 1934 1934 @return status depends on the function DoAtaUdma() returns. 1935 1935 **/ … … 2314 2314 /** 2315 2315 This function is called by the AtaBlkIoWriteBlocks() to perform 2316 writing to media in block unit. 2316 writing to media in block unit. 2317 2317 2318 2318 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used … … 2322 2322 on the device media. 2323 2323 @param NumberOfBlocks The number of transfer data blocks. 2324 2324 2325 2325 @return status depends on the function DoAtaUdma() returns. 2326 2326 **/ … … 2343 2343 to record all the information of the IDE device. 2344 2344 @param DataBuffer A pointer to the source buffer for the data. 2345 @param StartLba The starting logical block address to write onto the device 2345 @param StartLba The starting logical block address to write onto the device 2346 2346 media. 2347 2347 @param NumberOfBlocks The number of transfer data blocks. … … 2424 2424 of the intrinsic block size of the device. 2425 2425 @param Buffer A pointer to the source buffer for the data.The caller 2426 is responsible for either having implicit or explicit 2426 is responsible for either having implicit or explicit 2427 2427 ownership of the memory that data is written from. 2428 2428 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/Atapi.c
r48674 r58466 1 1 /** @file 2 This file contains all helper functions on the ATAPI command 3 2 This file contains all helper functions on the ATAPI command 3 4 4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 13 13 **/ … … 17 17 /** 18 18 This function is used to get the current status of the media residing 19 in the LS-120 drive or ZIP drive. The media status is returned in the 19 in the LS-120 drive or ZIP drive. The media status is returned in the 20 20 Error Status. 21 21 … … 29 29 @retval EFI_WRITE_PROTECTED The media is writing protected. 30 30 31 @note This function must be called after the LS120EnableMediaStatus() 32 with second parameter set to TRUE 31 @note This function must be called after the LS120EnableMediaStatus() 32 with second parameter set to TRUE 33 33 (means enable media status notification) is called. 34 34 **/ … … 190 190 IDEReadPortWMultiple ( 191 191 IdeDev->PciIo, 192 IdeDev->IoPort->Data, 193 1, 192 IdeDev->IoPort->Data, 193 1, 194 194 &TempWordBuffer 195 195 ); … … 201 201 202 202 /** 203 This function is called by either AtapiPacketCommandIn() or AtapiPacketCommandOut(). 203 This function is called by either AtapiPacketCommandIn() or AtapiPacketCommandOut(). 204 204 It is used to transfer data between host and device. The data direction is specified 205 205 by the fourth parameter. … … 247 247 // 248 248 // for performance, we assert the ByteCount is an even number 249 // which is actually a resonable assumption 249 // which is actually a resonable assumption 250 250 ASSERT((ByteCount%2) == 0); 251 251 252 252 PtrBuffer = Buffer; 253 253 RequiredWordCount = ByteCount / 2; … … 258 258 259 259 while (ActualWordCount < RequiredWordCount) { 260 260 261 261 // 262 262 // before each data transfer stream, the host should poll DRQ bit ready, … … 267 267 return CheckErrorStatus (IdeDev); 268 268 } 269 269 270 270 // 271 271 // read Status Register will clear interrupt … … 302 302 ActualWordCount += WordCount; 303 303 } 304 304 305 305 if (Read) { 306 306 // … … 327 327 328 328 /** 329 This function is used to send out ATAPI commands conforms to the Packet Command 329 This function is used to send out ATAPI commands conforms to the Packet Command 330 330 with PIO Data In Protocol. 331 331 … … 333 333 to record all the information of the IDE device. 334 334 @param Packet pointer pointing to ATAPI_PACKET_COMMAND data structure 335 which contains the contents of the command. 335 which contains the contents of the command. 336 336 @param Buffer buffer contained data transferred from device to host. 337 337 @param ByteCount data size in byte unit of the buffer. 338 @param TimeOut this parameter is used to specify the timeout value for the 339 PioReadWriteData() function. 338 @param TimeOut this parameter is used to specify the timeout value for the 339 PioReadWriteData() function. 340 340 341 341 @retval EFI_SUCCESS send out the ATAPI packet command successfully … … 438 438 @param Buffer buffer contained data transferred from host to device. 439 439 @param ByteCount data size in byte unit of the buffer. 440 @param TimeOut this parameter is used to specify the timeout value 441 for the PioReadWriteData() function. 440 @param TimeOut this parameter is used to specify the timeout value 441 for the PioReadWriteData() function. 442 442 @retval EFI_SUCCESS send out the ATAPI packet command successfully 443 and device received data successfully. 443 and device received data successfully. 444 444 @retval EFI_DEVICE_ERROR the device failed to send data. 445 445 … … 466 466 return Status; 467 467 } 468 468 469 469 // 470 470 // Select device via Device/Head Register. … … 588 588 589 589 There are 5 steps to reach such objective: 590 1. Sends out the ATAPI Identify Command to the specified device. 590 1. Sends out the ATAPI Identify Command to the specified device. 591 591 Only ATAPI device responses to this command. If the command succeeds, 592 it returns the Identify data structure which filled with information 593 about the device. Since the ATAPI device contains removable media, 592 it returns the Identify data structure which filled with information 593 about the device. Since the ATAPI device contains removable media, 594 594 the only meaningful information is the device module name. 595 595 2. Sends out ATAPI Inquiry Packet Command to the specified device. … … 597 597 the device type information. 598 598 3. Allocate sense data space for future use. We don't detect the media 599 presence here to improvement boot performance, especially when CD 599 presence here to improvement boot performance, especially when CD 600 600 media is present. The media detection will be performed just before 601 601 each BLK_IO read/write 602 602 603 603 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 604 604 to record all the information of the IDE device. … … 607 607 @retval EFI_DEVICE_ERROR ATAPI Identify Device Command failed or device type 608 608 is not supported by this IDE driver. 609 @retval EFI_OUT_OF_RESOURCES Allocate memory for sense data failed 609 @retval EFI_OUT_OF_RESOURCES Allocate memory for sense data failed 610 610 611 611 @note Parameter "IdeDev" will be updated in this function. … … 720 720 // 721 721 case 0x04: 722 722 723 723 // 724 724 // Optical … … 759 759 /** 760 760 Sends out ATAPI Request Sense Packet Command to the specified device. This command 761 will return all the current Sense data in the device. This function will pack 761 will return all the current Sense data in the device. This function will pack 762 762 all the Sense data in one single buffer. 763 763 … … 765 765 to record all the information of the IDE device. 766 766 @param SenseCounts allocated in this function, and freed by the calling function. 767 This buffer is used to accommodate all the sense data returned 767 This buffer is used to accommodate all the sense data returned 768 768 by the device. 769 769 … … 851 851 /** 852 852 This function is used to parse sense data. Only the first sense data is honoured 853 853 854 854 @param IdeDev Indicates the calling context. 855 855 @param SenseCount Count of sense data. … … 937 937 AtapiTestUnitReady ( 938 938 IN IDE_BLK_IO_DEV *IdeDev, 939 OUT SENSE_RESULT *SResult 939 OUT SENSE_RESULT *SResult 940 940 ) 941 941 { … … 975 975 Current device status will impact device's response to the Read Capacity 976 976 Command. For example, if the device once reset, the Read Capacity 977 Command will fail. The Sense data record the current device status, so 977 Command will fail. The Sense data record the current device status, so 978 978 if the Read Capacity Command failed, the Sense data must be requested 979 979 and be analyzed to determine if the Read Capacity Command should retry. … … 989 989 @note Parameter "IdeDev" will be updated in this function. 990 990 991 991 992 992 **/ 993 993 EFI_STATUS 994 994 AtapiReadCapacity ( 995 995 IN IDE_BLK_IO_DEV *IdeDev, 996 OUT SENSE_RESULT *SResult 996 OUT SENSE_RESULT *SResult 997 997 ) 998 998 { … … 1049 1049 1050 1050 if (!EFI_ERROR (SenseStatus)) { 1051 ParseSenseData (IdeDev, SenseCount, SResult); 1052 1051 ParseSenseData (IdeDev, SenseCount, SResult); 1052 1053 1053 if (!EFI_ERROR (Status) && *SResult == SenseNoSenseKey) { 1054 1054 if (IdeDev->Type == IdeCdRom) { … … 1078 1078 1079 1079 IdeDev->BlkIo.Media->LastBlock = (FormatData.LastLba3 << 24) | 1080 (FormatData.LastLba2 << 16) | 1080 (FormatData.LastLba2 << 16) | 1081 1081 (FormatData.LastLba1 << 8) | 1082 1082 FormatData.LastLba0; … … 1111 1111 /** 1112 1112 This function is used to test the current media write-protected or not residing 1113 in the LS-120 drive or ZIP drive. 1113 in the LS-120 drive or ZIP drive. 1114 1114 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 1115 1115 to record all the information of the IDE device. … … 1160 1160 1161 1161 /** 1162 Used before read/write blocks from/to ATAPI device media. Since ATAPI device 1163 media is removable, it is necessary to detect whether media is present and 1162 Used before read/write blocks from/to ATAPI device media. Since ATAPI device 1163 media is removable, it is necessary to detect whether media is present and 1164 1164 get current present media's information, and if media has been changed, Block 1165 1165 I/O Protocol need to be reinstalled. … … 1410 1410 read from media in block unit. 1411 1411 1412 The main command used to access media here is READ(10) Command. 1413 READ(10) Command requests that the ATAPI device media transfer 1414 specified data to the host. Data is transferred in block(sector) 1412 The main command used to access media here is READ(10) Command. 1413 READ(10) Command requests that the ATAPI device media transfer 1414 specified data to the host. Data is transferred in block(sector) 1415 1415 unit. The maximum number of blocks that can be transferred once is 1416 65536. This is the main difference between READ(10) and READ(12) 1416 65536. This is the main difference between READ(10) and READ(12) 1417 1417 Command. The maximum number of blocks in READ(12) is 2 power 32. 1418 1418 1419 1419 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 1420 1420 to record all the information of the IDE device. 1421 @param Buffer A pointer to the destination buffer for the data. 1422 @param Lba The starting logical block address to read from on the 1421 @param Buffer A pointer to the destination buffer for the data. 1422 @param Lba The starting logical block address to read from on the 1423 1423 device media. 1424 1424 @param NumberOfBlocks The number of transfer data blocks. … … 1528 1528 This function is called by the AtapiBlkIoWriteBlocks() to perform 1529 1529 write onto media in block unit. 1530 The main command used to access media here is Write(10) Command. 1531 Write(10) Command requests that the ATAPI device media transfer 1532 specified data to the host. Data is transferred in block (sector) 1530 The main command used to access media here is Write(10) Command. 1531 Write(10) Command requests that the ATAPI device media transfer 1532 specified data to the host. Data is transferred in block (sector) 1533 1533 unit. The maximum number of blocks that can be transferred once is 1534 65536. 1534 65536. 1535 1535 1536 1536 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 1537 1537 to record all the information of the IDE device. 1538 @param Buffer A pointer to the source buffer for the data. 1539 @param Lba The starting logical block address to write onto 1538 @param Buffer A pointer to the source buffer for the data. 1539 @param Lba The starting logical block address to write onto 1540 1540 the device media. 1541 1541 @param NumberOfBlocks The number of transfer data blocks. 1542 1542 1543 1543 @return status is fully dependent on the return status of AtapiPacketCommandOut() function. 1544 1544 … … 1595 1595 SectorCount = (UINT16) BlocksRemaining; 1596 1596 } 1597 1597 1598 1598 // 1599 1599 // Command code is WRITE_10. … … 1646 1646 command should be sent without waiting for the BSY clear and DRDY 1647 1647 set. 1648 This function is called by IdeBlkIoReset(), 1648 This function is called by IdeBlkIoReset(), 1649 1649 a interface function of Block I/O protocol. 1650 1650 … … 1684 1684 return EFI_DEVICE_ERROR; 1685 1685 } 1686 1686 1687 1687 // 1688 1688 // stall 5 seconds to make the device status stable … … 1703 1703 of the intrinsic block size of the device. 1704 1704 @param Buffer A pointer to the destination buffer for the data. The caller 1705 is responsible for either having implicit or explicit 1705 is responsible for either having implicit or explicit 1706 1706 ownership of the memory that data is read into. 1707 1707 1708 1708 @retval EFI_SUCCESS Read Blocks successfully. 1709 1709 @retval EFI_DEVICE_ERROR Read Blocks failed. … … 1805 1805 return EFI_DEVICE_ERROR; 1806 1806 } 1807 1807 1808 1808 // 1809 1809 // Read blocks succeeded 1810 1810 // 1811 1811 1812 1812 // 1813 1813 // save the first block to the cache for performance … … 1841 1841 @retval EFI_MEDIA_CHANGE The MediaId is not for the current media. 1842 1842 @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the 1843 intrinsic block size of the device. 1844 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 1843 intrinsic block size of the device. 1844 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 1845 1845 or the data buffer is not valid. 1846 1846 … … 1890 1890 return Status; 1891 1891 } 1892 1892 1893 1893 // 1894 1894 // Get the intrinsic block size -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/ComponentName.c
r48674 r58466 1 1 /** @file 2 2 UEFI Component Name(2) protocol implementation for ConPlatform driver. 3 3 4 4 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 13 13 **/ -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/ComponentName.h
r48674 r58466 1 1 /** @file 2 2 3 3 UEFI Component Name(2) protocol implementation header file for IDE Bus driver. 4 4 5 5 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> 6 6 This program and the accompanying materials -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/DriverConfiguration.c
r48674 r58466 1 1 /** @file 2 Implementation of UEFI Driver Configuration Protocol for IDE bus driver which 2 Implementation of UEFI Driver Configuration Protocol for IDE bus driver which 3 3 provides ability to set IDE bus controller specific options. 4 4 5 5 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> 6 This program and the accompanying materials 7 are licensed and made available under the terms and conditions of the BSD License 8 which accompanies this distribution. The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 6 This program and the accompanying materials 7 are licensed and made available under the terms and conditions of the BSD License 8 which accompanies this distribution. The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 13 14 14 **/ … … 81 81 82 82 /** 83 Allows the user to set controller specific options for a controller that a 83 Allows the user to set controller specific options for a controller that a 84 84 driver is currently managing. 85 85 … … 92 92 It will not be NULL for a bus driver that wishes to set 93 93 options for one of its child controllers. 94 @param Language A pointer to a three character ISO 639-2 language identifier. 95 This is the language of the user interface that should be presented 96 to the user, and it must match one of the languages specified in 94 @param Language A pointer to a three character ISO 639-2 language identifier. 95 This is the language of the user interface that should be presented 96 to the user, and it must match one of the languages specified in 97 97 SupportedLanguages. The number of languages supported by a driver is up to 98 98 the driver writer. 99 @param ActionRequired A pointer to the action that the calling agent is required 99 @param ActionRequired A pointer to the action that the calling agent is required 100 100 to perform when this function returns. 101 102 103 @retval EFI_SUCCESS The driver specified by This successfully set the configuration 101 102 103 @retval EFI_SUCCESS The driver specified by This successfully set the configuration 104 104 options for the controller specified by ControllerHandle.. 105 105 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE. 106 106 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. 107 107 @retval EFI_INVALID_PARAMETER ActionRequired is NULL. 108 @retval EFI_UNSUPPORTED The driver specified by This does not support setting configuration options for 108 @retval EFI_UNSUPPORTED The driver specified by This does not support setting configuration options for 109 109 the controller specified by ControllerHandle and ChildHandle. 110 110 @retval EFI_UNSUPPORTED The driver specified by This does not support the language specified by Language. 111 @retval EFI_DEVICE_ERROR A device error occurred while attempt to set the configuration options for the 111 @retval EFI_DEVICE_ERROR A device error occurred while attempt to set the configuration options for the 112 112 controller specified by ControllerHandle and ChildHandle. 113 @retval EFI_OUT_RESOURCES There are not enough resources available to set the configuration options for the 113 @retval EFI_OUT_RESOURCES There are not enough resources available to set the configuration options for the 114 114 controller specified by ControllerHandle and ChildHandle 115 115 **/ … … 183 183 184 184 @param This A pointer to the EFI_DRIVER_CONFIGURATION_PROTOCOL instance. 185 @param ControllerHandle The handle of the controller to test if it's current configuration options 185 @param ControllerHandle The handle of the controller to test if it's current configuration options 186 186 are valid. 187 @param ChildHandle The handle of the child controller to test if it's current configuration 188 options are valid. This is an optional parameter that may be NULL. It will 187 @param ChildHandle The handle of the child controller to test if it's current configuration 188 options are valid. This is an optional parameter that may be NULL. It will 189 189 be NULL for device drivers. It will also be NULL for a bus drivers that 190 wish to test the configuration options for the bus controller. It will 191 not be NULL for a bus driver that wishes to test configuration options for 190 wish to test the configuration options for the bus controller. It will 191 not be NULL for a bus driver that wishes to test configuration options for 192 192 one of its child controllers. 193 193 @retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle that is being … … 196 196 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE. 197 197 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. 198 @retval EFI_UNSUPPORTED The driver specified by This is not currently managing the controller 198 @retval EFI_UNSUPPORTED The driver specified by This is not currently managing the controller 199 199 specified by ControllerHandle and ChildHandle. 200 200 @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle that is being … … 237 237 @param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance. 238 238 @param ControllerHandle The handle of the controller to force default configuration options on. 239 @param ChildHandle The handle of the child controller to force default configuration 240 options on This is an optional parameter that may be NULL. It 241 will be NULL for device drivers. It will also be NULL for a bus 239 @param ChildHandle The handle of the child controller to force default configuration 240 options on This is an optional parameter that may be NULL. It 241 will be NULL for device drivers. It will also be NULL for a bus 242 242 drivers that wish to force default configuration options for the bus 243 243 controller. It will not be NULL for a bus driver that wishes to force 244 244 default configuration options for one of its child controllers. 245 @param DefaultType The type of default configuration options to force on the controller 246 specified by ControllerHandle and ChildHandle. 247 @param ActionRequired A pointer to the action that the calling agent is required to perform 245 @param DefaultType The type of default configuration options to force on the controller 246 specified by ControllerHandle and ChildHandle. 247 @param ActionRequired A pointer to the action that the calling agent is required to perform 248 248 when this function returns. 249 249 250 @retval EFI_SUCCESS The driver specified by This successfully forced the 251 default configuration options on the controller specified by 250 @retval EFI_SUCCESS The driver specified by This successfully forced the 251 default configuration options on the controller specified by 252 252 ControllerHandle and ChildHandle. 253 253 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE. 254 254 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. 255 255 @retval EFI_INVALID_PARAMETER ActionRequired is NULL. 256 @retval EFI_UNSUPPORTED The driver specified by This does not support forcing the default 256 @retval EFI_UNSUPPORTED The driver specified by This does not support forcing the default 257 257 configuration options on the controller specified by ControllerHandle 258 258 and ChildHandle. 259 @retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type 259 @retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type 260 260 specified by DefaultType. 261 @retval EFI_DEVICE_ERROR A device error occurred while attempt to force the default configuration 261 @retval EFI_DEVICE_ERROR A device error occurred while attempt to force the default configuration 262 262 options on the controller specified by ControllerHandle and ChildHandle. 263 @retval EFI_OUT_RESOURCES There are not enough resources available to force the default configuration 263 @retval EFI_OUT_RESOURCES There are not enough resources available to force the default configuration 264 264 options on the controller specified by ControllerHandle and ChildHandle. 265 265 **/ -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/DriverDiagnostics.c
r48674 r58466 2 2 Implementation of UEFI driver Dialnostics protocol which to perform diagnostic on the IDE 3 3 Bus controller. 4 4 5 5 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> 6 This program and the accompanying materials 7 are licensed and made available under the terms and conditions of the BSD License 8 which accompanies this distribution. The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 6 This program and the accompanying materials 7 are licensed and made available under the terms and conditions of the BSD License 8 which accompanies this distribution. The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 13 14 14 **/ … … 43 43 This is an optional parameter that may be NULL. It will 44 44 be NULL for device drivers. It will also be NULL for a 45 bus drivers that wish to run diagnostics on the bus controller. 46 It will not be NULL for a bus driver that wishes to run 45 bus drivers that wish to run diagnostics on the bus controller. 46 It will not be NULL for a bus driver that wishes to run 47 47 diagnostics on one of its child controllers. 48 48 @param DiagnosticType Indicates type of diagnostics to perform on the controller 49 49 specified by ControllerHandle and ChildHandle. 50 @param Language A pointer to a three character ISO 639-2 language identifier. 51 This is the language in which the optional error message should 52 be returned in Buffer, and it must match one of the languages 50 @param Language A pointer to a three character ISO 639-2 language identifier. 51 This is the language in which the optional error message should 52 be returned in Buffer, and it must match one of the languages 53 53 specified in SupportedLanguages. The number of languages supported by 54 54 a driver is up to the driver writer. … … 56 56 @param BufferSize The size, in bytes, of the data returned in Buffer. 57 57 @param Buffer A buffer that contains a Null-terminated Unicode string 58 plus some additional data whose format is defined by ErrorType. 59 Buffer is allocated by this function with AllocatePool(), and 58 plus some additional data whose format is defined by ErrorType. 59 Buffer is allocated by this function with AllocatePool(), and 60 60 it is the caller's responsibility to free it with a call to FreePool(). 61 61 62 @retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle passed 62 @retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle passed 63 63 the diagnostic. 64 64 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. … … 68 68 @retval EFI_INVALID_PARAMETER BufferType is NULL. 69 69 @retval EFI_INVALID_PARAMETER Buffer is NULL. 70 @retval EFI_UNSUPPORTED The driver specified by This does not support running 71 diagnostics for the controller specified by ControllerHandle 70 @retval EFI_UNSUPPORTED The driver specified by This does not support running 71 diagnostics for the controller specified by ControllerHandle 72 72 and ChildHandle. 73 73 @retval EFI_UNSUPPORTED The driver specified by This does not support the 74 74 type of diagnostic specified by DiagnosticType. 75 @retval EFI_UNSUPPORTED The driver specified by This does not support the language 75 @retval EFI_UNSUPPORTED The driver specified by This does not support the language 76 76 specified by Language. 77 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete the 77 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete the 78 78 diagnostics. 79 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to return the 79 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to return the 80 80 status information in ErrorType, BufferSize,and Buffer. 81 @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle 81 @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle 82 82 did not pass the diagnostic. 83 83 **/ -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/Ide.c
r48674 r58466 1 1 /** @file 2 2 The file ontaining the helper functions implement of the Ide Bus driver 3 3 4 4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 25 25 26 26 @param PciIo The PCI IO protocol instance 27 @param Port the IDE Port number 27 @param Port the IDE Port number 28 28 29 29 @return the one-byte data read from IDE port … … 271 271 @param IdeRegsBaseAddr Pointer to IDE_REGISTERS_BASE_ADDR to 272 272 receive IDE IO port registers' base addresses 273 273 274 274 @retval EFI_UNSUPPORTED return this value when the BARs is not IO type 275 275 @retval EFI_SUCCESS Get the Base address successfully … … 352 352 353 353 @param IdeDev The BLK_IO private data which specifies the IDE device 354 354 355 355 @retval EFI_INVALID_PARAMETER return this value when the channel is invalid 356 356 @retval EFI_SUCCESS reassign the IDE IO resource successfully … … 371 371 return EFI_INVALID_PARAMETER; 372 372 } 373 373 374 374 // 375 375 // Requery IDE IO port registers' base addresses in case of the switch of … … 594 594 595 595 @param IdeDev The BLK_IO private data which specifies the IDE device. 596 596 597 597 @retval EFI_NOT_FOUND The device or channel is not found 598 598 @retval EFI_SUCCESS The device is found … … 716 716 So this function is called after data transfer is finished. 717 717 718 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 718 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 719 719 to record all the information of the IDE device. 720 720 @param TimeoutInMilliSeconds used to designate the timeout for the DRQ clear. … … 779 779 is finished. 780 780 781 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 781 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 782 782 to record all the information of the IDE device. 783 783 … … 902 902 /** 903 903 This function is used to poll for the DRQ bit set in the Alternate Status Register. 904 DRQ is set when the device is ready to transfer data. So this function is called after 904 DRQ is set when the device is ready to transfer data. So this function is called after 905 905 the command is sent to the device and before required data is transferred. 906 906 907 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to 907 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to 908 908 record all the information of the IDE device. 909 909 … … 967 967 is clear when the device is not busy. Every command must be sent after device is not busy. 968 968 969 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 969 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 970 970 to record all the information of the IDE device. 971 971 @param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready. … … 1009 1009 } 1010 1010 /** 1011 This function is used to poll for the BSY bit clear in the Alternate Status Register. 1012 BSY is clear when the device is not busy. Every command must be sent after device is 1011 This function is used to poll for the BSY bit clear in the Alternate Status Register. 1012 BSY is clear when the device is not busy. Every command must be sent after device is 1013 1013 not busy. 1014 1014 1015 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 1015 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 1016 1016 all the information of the IDE device. 1017 1017 @param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready. … … 1052 1052 /** 1053 1053 This function is used to poll for the DRDY bit set in the Status Register. DRDY 1054 bit is set when the device is ready to accept command. Most ATA commands must be 1054 bit is set when the device is ready to accept command. Most ATA commands must be 1055 1055 sent after DRDY set except the ATAPI Packet Command. 1056 1056 … … 1104 1104 } 1105 1105 /** 1106 This function is used to poll for the DRDY bit set in the Alternate Status Register. 1107 DRDY bit is set when the device is ready to accept command. Most ATA commands must 1106 This function is used to poll for the DRDY bit set in the Alternate Status Register. 1107 DRDY bit is set when the device is ready to accept command. Most ATA commands must 1108 1108 be sent after DRDY set except the ATAPI Packet Command. 1109 1109 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/Ide.h
r48674 r58466 29 29 30 30 @param PciIo The PCI IO protocol instance 31 @param Port the IDE Port number 31 @param Port the IDE Port number 32 32 33 33 return the one-byte data read from IDE port … … 154 154 @param IdeRegsBaseAddr Pointer to IDE_REGISTERS_BASE_ADDR to 155 155 receive IDE IO port registers' base addresses 156 156 157 157 @retval EFI_UNSUPPORTED return this value when the BARs is not IO type 158 158 @retval EFI_SUCCESS Get the Base address successfully … … 188 188 189 189 @param IdeDev The BLK_IO private data which specifies the IDE device. 190 190 191 191 @retval EFI_NOT_FOUND The device or channel is not found 192 192 @retval EFI_SUCCESS The device is found … … 213 213 So this function is called after data transfer is finished. 214 214 215 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 215 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 216 216 to record all the information of the IDE device. 217 217 @param TimeoutInMilliSeconds used to designate the timeout for the DRQ clear. … … 237 237 is finished. 238 238 239 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 239 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 240 240 to record all the information of the IDE device. 241 241 … … 281 281 /** 282 282 This function is used to poll for the DRQ bit set in the Alternate Status Register. 283 DRQ is set when the device is ready to transfer data. So this function is called after 283 DRQ is set when the device is ready to transfer data. So this function is called after 284 284 the command is sent to the device and before required data is transferred. 285 285 286 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to 286 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to 287 287 record all the information of the IDE device. 288 288 … … 305 305 is clear when the device is not busy. Every command must be sent after device is not busy. 306 306 307 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 307 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 308 308 to record all the information of the IDE device. 309 309 @param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready. … … 321 321 322 322 /** 323 This function is used to poll for the BSY bit clear in the Alternate Status Register. 324 BSY is clear when the device is not busy. Every command must be sent after device is 323 This function is used to poll for the BSY bit clear in the Alternate Status Register. 324 BSY is clear when the device is not busy. Every command must be sent after device is 325 325 not busy. 326 326 327 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 327 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 328 328 all the information of the IDE device. 329 329 @param TimeoutInMilliSeconds used to designate the timeout for the DRQ ready. … … 342 342 /** 343 343 This function is used to poll for the DRDY bit set in the Status Register. DRDY 344 bit is set when the device is ready to accept command. Most ATA commands must be 344 bit is set when the device is ready to accept command. Most ATA commands must be 345 345 sent after DRDY set except the ATAPI Packet Command. 346 346 … … 361 361 362 362 /** 363 This function is used to poll for the DRDY bit set in the Alternate Status Register. 364 DRDY bit is set when the device is ready to accept command. Most ATA commands must 363 This function is used to poll for the DRDY bit set in the Alternate Status Register. 364 DRDY bit is set when the device is ready to accept command. Most ATA commands must 365 365 be sent after DRDY set except the ATAPI Packet Command. 366 366 … … 395 395 including device type, media block size, media capacity, and etc. 396 396 397 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to record 397 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure,used to record 398 398 all the information of the IDE device. 399 399 … … 421 421 This function is used to send out ATA commands conforms to the PIO Data In Protocol. 422 422 423 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 423 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to record 424 424 all the information of the IDE device. 425 425 @param Buffer buffer contained data transferred from device to host. … … 431 431 @param CylinderLsb value of the low byte of the Cylinder Register 432 432 @param CylinderMsb value of the high byte of the Cylinder Register 433 433 434 434 @retval EFI_SUCCESS send out the ATA command and device send required data successfully. 435 435 @retval EFI_DEVICE_ERROR command sent failed. … … 487 487 Register, the Error Register's value is also be parsed and print out. 488 488 489 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to 489 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used to 490 490 record all the information of the IDE device. 491 491 … … 501 501 /** 502 502 This function is used to implement the Soft Reset on the specified device. But, 503 the ATA Soft Reset mechanism is so strong a reset method that it will force 503 the ATA Soft Reset mechanism is so strong a reset method that it will force 504 504 resetting on both devices connected to the same cable. 505 505 … … 569 569 of the intrinsic block size of the device. 570 570 @param Buffer A pointer to the source buffer for the data.The caller 571 is responsible for either having implicit or explicit 571 is responsible for either having implicit or explicit 572 572 ownership of the memory that data is written from. 573 573 … … 601 601 602 602 There are 5 steps to reach such objective: 603 1. Sends out the ATAPI Identify Command to the specified device. 603 1. Sends out the ATAPI Identify Command to the specified device. 604 604 Only ATAPI device responses to this command. If the command succeeds, 605 it returns the Identify data structure which filled with information 606 about the device. Since the ATAPI device contains removable media, 605 it returns the Identify data structure which filled with information 606 about the device. Since the ATAPI device contains removable media, 607 607 the only meaningful information is the device module name. 608 608 2. Sends out ATAPI Inquiry Packet Command to the specified device. … … 610 610 the device type information. 611 611 3. Allocate sense data space for future use. We don't detect the media 612 presence here to improvement boot performance, especially when CD 612 presence here to improvement boot performance, especially when CD 613 613 media is present. The media detection will be performed just before 614 614 each BLK_IO read/write 615 615 616 616 @param IdeDev pointer pointing to IDE_BLK_IO_DEV data structure, used 617 617 to record all the information of the IDE device. … … 620 620 @retval EFI_DEVICE_ERROR ATAPI Identify Device Command failed or device type 621 621 is not supported by this IDE driver. 622 @retval EFI_OUT_OF_RESOURCES Allocate memory for sense data failed 622 @retval EFI_OUT_OF_RESOURCES Allocate memory for sense data failed 623 623 624 624 @note Parameter "IdeDev" will be updated in this function. … … 638 638 command should be sent without waiting for the BSY clear and DRDY 639 639 set. 640 This function is called by IdeBlkIoReset(), 640 This function is called by IdeBlkIoReset(), 641 641 a interface function of Block I/O protocol. 642 642 … … 663 663 of the intrinsic block size of the device. 664 664 @param Buffer A pointer to the destination buffer for the data. The caller 665 is responsible for either having implicit or explicit 665 is responsible for either having implicit or explicit 666 666 ownership of the memory that data is read into. 667 667 668 668 @retval EFI_SUCCESS Read Blocks successfully. 669 669 @retval EFI_DEVICE_ERROR Read Blocks failed. … … 702 702 @retval EFI_MEDIA_CHANGE The MediaId is not for the current media. 703 703 @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the 704 intrinsic block size of the device. 705 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 704 intrinsic block size of the device. 705 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 706 706 or the data buffer is not valid. 707 707 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBus.c
r58459 r58466 1 1 /** @file 2 This file implement UEFI driver for IDE Bus which includes device identification, 3 Child device(Disk, CDROM, etc) enumeration and child handler installation, and 2 This file implement UEFI driver for IDE Bus which includes device identification, 3 Child device(Disk, CDROM, etc) enumeration and child handler installation, and 4 4 driver stop. 5 5 6 6 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 7 7 This program and the accompanying materials … … 155 155 Node = (EFI_DEV_PATH *) RemainingDevicePath; 156 156 // 157 // Check if RemainingDevicePath is the End of Device Path Node, 157 // Check if RemainingDevicePath is the End of Device Path Node, 158 158 // if yes, go on checking other conditions 159 159 // … … 191 191 return Status; 192 192 } 193 193 194 194 // 195 195 // Close the I/O Abstraction(s) used to perform the supported test … … 238 238 EFI_OPEN_PROTOCOL_GET_PROTOCOL 239 239 ); 240 240 241 241 if (EFI_ERROR (Status)) { 242 242 return Status; 243 243 } 244 244 245 245 // 246 246 // Now further check the PCI header: Base class (offset 0x0B) and … … 259 259 // Examine if it is IDE mode by class code 260 260 // 261 if ((PciData.Hdr.ClassCode[2] != PCI_CLASS_MASS_STORAGE) || (PciData.Hdr.ClassCode[1] != PCI_SUB_CLASS_IDE)) { 261 if ((PciData.Hdr.ClassCode[2] != PCI_CLASS_MASS_STORAGE) || (PciData.Hdr.ClassCode[1] != PCI_SUB_CLASS_IDE)) { 262 262 Status = EFI_UNSUPPORTED; 263 } else { 263 } else { 264 264 Status = EFI_SUCCESS; 265 } 265 } 266 266 } 267 267 … … 465 465 if (EnumAll || RemainingDevicePath == NULL) { 466 466 // 467 // If IdeInit->EnumAll is TRUE or RemainingDevicePath is NULL, 467 // If IdeInit->EnumAll is TRUE or RemainingDevicePath is NULL, 468 468 // must enumerate all IDE devices anyway 469 469 // … … 475 475 } else if (!IsDevicePathEnd (RemainingDevicePath)) { 476 476 // 477 // If RemainingDevicePath isn't the End of Device Path Node, 477 // If RemainingDevicePath isn't the End of Device Path Node, 478 478 // only scan the specified device by RemainingDevicePath 479 479 // … … 496 496 // If RemainingDevicePath is the End of Device Path Node, 497 497 // skip enumerate any device and return EFI_SUCESSS 498 // 498 // 499 499 BeginningIdeChannel = IdeMaxChannel; 500 500 EndIdeChannel = IdeMaxChannel - 1; … … 1299 1299 1300 1300 /** 1301 This function is used by the IDE bus driver to get inquiry data. 1301 This function is used by the IDE bus driver to get inquiry data. 1302 1302 Data format of Identify data is defined by the Interface GUID. 1303 1303 … … 1307 1307 1308 1308 @retval EFI_SUCCESS The command was accepted without any errors. 1309 @retval EFI_NOT_FOUND Device does not support this data class 1310 @retval EFI_DEVICE_ERROR Error reading InquiryData from device 1311 @retval EFI_BUFFER_TOO_SMALL IntquiryDataSize not big enough 1309 @retval EFI_NOT_FOUND Device does not support this data class 1310 @retval EFI_DEVICE_ERROR Error reading InquiryData from device 1311 @retval EFI_BUFFER_TOO_SMALL IntquiryDataSize not big enough 1312 1312 1313 1313 **/ … … 1340 1340 1341 1341 /** 1342 This function is used by the IDE bus driver to get identify data. 1342 This function is used by the IDE bus driver to get identify data. 1343 1343 Data format of Identify data is defined by the Interface GUID. 1344 1344 … … 1348 1348 1349 1349 @retval EFI_SUCCESS The command was accepted without any errors. 1350 @retval EFI_NOT_FOUND Device does not support this data class 1351 @retval EFI_DEVICE_ERROR Error reading IdentifyData from device 1352 @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough 1350 @retval EFI_NOT_FOUND Device does not support this data class 1351 @retval EFI_DEVICE_ERROR Error reading IdentifyData from device 1352 @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough 1353 1353 1354 1354 **/ … … 1381 1381 1382 1382 /** 1383 This function is used by the IDE bus driver to get sense data. 1383 This function is used by the IDE bus driver to get sense data. 1384 1384 Data format of Sense data is defined by the Interface GUID. 1385 1385 1386 @param This Pointer to the EFI_DISK_INFO_PROTOCOL instance. 1387 @param SenseData Pointer to the SenseData. 1388 @param SenseDataSize Size of SenseData in bytes. 1386 @param This Pointer to the EFI_DISK_INFO_PROTOCOL instance. 1387 @param SenseData Pointer to the SenseData. 1388 @param SenseDataSize Size of SenseData in bytes. 1389 1389 @param SenseDataNumber Pointer to the value for the identify data size. 1390 1390 1391 1391 @retval EFI_SUCCESS The command was accepted without any errors. 1392 @retval EFI_NOT_FOUND Device does not support this data class 1393 @retval EFI_DEVICE_ERROR Error reading InquiryData from device 1394 @retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough 1392 @retval EFI_NOT_FOUND Device does not support this data class 1393 @retval EFI_DEVICE_ERROR Error reading InquiryData from device 1394 @retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough 1395 1395 1396 1396 **/ … … 1410 1410 This function is used by the IDE bus driver to get controller information. 1411 1411 1412 @param This Pointer to the EFI_DISK_INFO_PROTOCOL instance. 1412 @param This Pointer to the EFI_DISK_INFO_PROTOCOL instance. 1413 1413 @param IdeChannel Pointer to the Ide Channel number. Primary or secondary. 1414 1414 @param IdeDevice Pointer to the Ide Device number. Master or slave. 1415 1415 1416 @retval EFI_SUCCESS IdeChannel and IdeDevice are valid 1417 @retval EFI_UNSUPPORTED This is not an IDE device 1416 @retval EFI_SUCCESS IdeChannel and IdeDevice are valid 1417 @retval EFI_UNSUPPORTED This is not an IDE device 1418 1418 1419 1419 **/ -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBus.h
r58459 r58466 182 182 // 183 183 /** 184 Allows the user to set controller specific options for a controller that a 184 Allows the user to set controller specific options for a controller that a 185 185 driver is currently managing. 186 186 … … 193 193 It will not be NULL for a bus driver that wishes to set 194 194 options for one of its child controllers. 195 @param Language A pointer to a three character ISO 639-2 language identifier. 196 This is the language of the user interface that should be presented 197 to the user, and it must match one of the languages specified in 195 @param Language A pointer to a three character ISO 639-2 language identifier. 196 This is the language of the user interface that should be presented 197 to the user, and it must match one of the languages specified in 198 198 SupportedLanguages. The number of languages supported by a driver is up to 199 199 the driver writer. 200 @param ActionRequired A pointer to the action that the calling agent is required 200 @param ActionRequired A pointer to the action that the calling agent is required 201 201 to perform when this function returns. 202 203 204 @retval EFI_SUCCESS The driver specified by This successfully set the configuration 202 203 204 @retval EFI_SUCCESS The driver specified by This successfully set the configuration 205 205 options for the controller specified by ControllerHandle.. 206 206 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE. 207 207 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. 208 208 @retval EFI_INVALID_PARAMETER ActionRequired is NULL. 209 @retval EFI_UNSUPPORTED The driver specified by This does not support setting configuration options for 209 @retval EFI_UNSUPPORTED The driver specified by This does not support setting configuration options for 210 210 the controller specified by ControllerHandle and ChildHandle. 211 211 @retval EFI_UNSUPPORTED The driver specified by This does not support the language specified by Language. 212 @retval EFI_DEVICE_ERROR A device error occurred while attempt to set the configuration options for the 212 @retval EFI_DEVICE_ERROR A device error occurred while attempt to set the configuration options for the 213 213 controller specified by ControllerHandle and ChildHandle. 214 @retval EFI_OUT_RESOURCES There are not enough resources available to set the configuration options for the 214 @retval EFI_OUT_RESOURCES There are not enough resources available to set the configuration options for the 215 215 controller specified by ControllerHandle and ChildHandle 216 216 **/ … … 229 229 230 230 @param This A pointer to the EFI_DRIVER_CONFIGURATION_PROTOCOL instance. 231 @param ControllerHandle The handle of the controller to test if it's current configuration options 231 @param ControllerHandle The handle of the controller to test if it's current configuration options 232 232 are valid. 233 @param ChildHandle The handle of the child controller to test if it's current configuration 234 options are valid. This is an optional parameter that may be NULL. It will 233 @param ChildHandle The handle of the child controller to test if it's current configuration 234 options are valid. This is an optional parameter that may be NULL. It will 235 235 be NULL for device drivers. It will also be NULL for a bus drivers that 236 wish to test the configuration options for the bus controller. It will 237 not be NULL for a bus driver that wishes to test configuration options for 236 wish to test the configuration options for the bus controller. It will 237 not be NULL for a bus driver that wishes to test configuration options for 238 238 one of its child controllers. 239 239 @retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle that is being … … 242 242 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE. 243 243 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. 244 @retval EFI_UNSUPPORTED The driver specified by This is not currently managing the controller 244 @retval EFI_UNSUPPORTED The driver specified by This is not currently managing the controller 245 245 specified by ControllerHandle and ChildHandle. 246 246 @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle that is being … … 261 261 @param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance. 262 262 @param ControllerHandle The handle of the controller to force default configuration options on. 263 @param ChildHandle The handle of the child controller to force default configuration 264 options on This is an optional parameter that may be NULL. It 265 will be NULL for device drivers. It will also be NULL for a bus 263 @param ChildHandle The handle of the child controller to force default configuration 264 options on This is an optional parameter that may be NULL. It 265 will be NULL for device drivers. It will also be NULL for a bus 266 266 drivers that wish to force default configuration options for the bus 267 267 controller. It will not be NULL for a bus driver that wishes to force 268 268 default configuration options for one of its child controllers. 269 @param DefaultType The type of default configuration options to force on the controller 270 specified by ControllerHandle and ChildHandle. 271 @param ActionRequired A pointer to the action that the calling agent is required to perform 269 @param DefaultType The type of default configuration options to force on the controller 270 specified by ControllerHandle and ChildHandle. 271 @param ActionRequired A pointer to the action that the calling agent is required to perform 272 272 when this function returns. 273 273 274 @retval EFI_SUCCESS The driver specified by This successfully forced the 275 default configuration options on the controller specified by 274 @retval EFI_SUCCESS The driver specified by This successfully forced the 275 default configuration options on the controller specified by 276 276 ControllerHandle and ChildHandle. 277 277 @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE. 278 278 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. 279 279 @retval EFI_INVALID_PARAMETER ActionRequired is NULL. 280 @retval EFI_UNSUPPORTED The driver specified by This does not support forcing the default 280 @retval EFI_UNSUPPORTED The driver specified by This does not support forcing the default 281 281 configuration options on the controller specified by ControllerHandle 282 282 and ChildHandle. 283 @retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type 283 @retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type 284 284 specified by DefaultType. 285 @retval EFI_DEVICE_ERROR A device error occurred while attempt to force the default configuration 285 @retval EFI_DEVICE_ERROR A device error occurred while attempt to force the default configuration 286 286 options on the controller specified by ControllerHandle and ChildHandle. 287 @retval EFI_OUT_RESOURCES There are not enough resources available to force the default configuration 287 @retval EFI_OUT_RESOURCES There are not enough resources available to force the default configuration 288 288 options on the controller specified by ControllerHandle and ChildHandle. 289 289 **/ … … 309 309 This is an optional parameter that may be NULL. It will 310 310 be NULL for device drivers. It will also be NULL for a 311 bus drivers that wish to run diagnostics on the bus controller. 312 It will not be NULL for a bus driver that wishes to run 311 bus drivers that wish to run diagnostics on the bus controller. 312 It will not be NULL for a bus driver that wishes to run 313 313 diagnostics on one of its child controllers. 314 314 @param DiagnosticType Indicates type of diagnostics to perform on the controller 315 315 specified by ControllerHandle and ChildHandle. 316 @param Language A pointer to a three character ISO 639-2 language identifier. 317 This is the language in which the optional error message should 318 be returned in Buffer, and it must match one of the languages 316 @param Language A pointer to a three character ISO 639-2 language identifier. 317 This is the language in which the optional error message should 318 be returned in Buffer, and it must match one of the languages 319 319 specified in SupportedLanguages. The number of languages supported by 320 320 a driver is up to the driver writer. … … 322 322 @param BufferSize The size, in bytes, of the data returned in Buffer. 323 323 @param Buffer A buffer that contains a Null-terminated Unicode string 324 plus some additional data whose format is defined by ErrorType. 325 Buffer is allocated by this function with AllocatePool(), and 324 plus some additional data whose format is defined by ErrorType. 325 Buffer is allocated by this function with AllocatePool(), and 326 326 it is the caller's responsibility to free it with a call to FreePool(). 327 327 328 @retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle passed 328 @retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle passed 329 329 the diagnostic. 330 330 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. … … 334 334 @retval EFI_INVALID_PARAMETER BufferType is NULL. 335 335 @retval EFI_INVALID_PARAMETER Buffer is NULL. 336 @retval EFI_UNSUPPORTED The driver specified by This does not support running 337 diagnostics for the controller specified by ControllerHandle 336 @retval EFI_UNSUPPORTED The driver specified by This does not support running 337 diagnostics for the controller specified by ControllerHandle 338 338 and ChildHandle. 339 339 @retval EFI_UNSUPPORTED The driver specified by This does not support the 340 340 type of diagnostic specified by DiagnosticType. 341 @retval EFI_UNSUPPORTED The driver specified by This does not support the language 341 @retval EFI_UNSUPPORTED The driver specified by This does not support the language 342 342 specified by Language. 343 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete the 343 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete the 344 344 diagnostics. 345 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to return the 345 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to return the 346 346 status information in ErrorType, BufferSize,and Buffer. 347 @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle 347 @retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle 348 348 did not pass the diagnostic. 349 349 **/ … … 428 428 Flushes all modified data to a physical block devices 429 429 430 @param This Indicates a pointer to the calling context which to sepcify a 430 @param This Indicates a pointer to the calling context which to sepcify a 431 431 sepcific block device 432 432 … … 439 439 ); 440 440 /** 441 This function is used by the IDE bus driver to get inquiry data. 441 This function is used by the IDE bus driver to get inquiry data. 442 442 Data format of Identify data is defined by the Interface GUID. 443 443 … … 447 447 448 448 @retval EFI_SUCCESS The command was accepted without any errors. 449 @retval EFI_NOT_FOUND Device does not support this data class 450 @retval EFI_DEVICE_ERROR Error reading InquiryData from device 451 @retval EFI_BUFFER_TOO_SMALL IntquiryDataSize not big enough 449 @retval EFI_NOT_FOUND Device does not support this data class 450 @retval EFI_DEVICE_ERROR Error reading InquiryData from device 451 @retval EFI_BUFFER_TOO_SMALL IntquiryDataSize not big enough 452 452 453 453 **/ … … 461 461 462 462 /** 463 This function is used by the IDE bus driver to get identify data. 463 This function is used by the IDE bus driver to get identify data. 464 464 Data format of Identify data is defined by the Interface GUID. 465 465 … … 469 469 470 470 @retval EFI_SUCCESS The command was accepted without any errors. 471 @retval EFI_NOT_FOUND Device does not support this data class 472 @retval EFI_DEVICE_ERROR Error reading IdentifyData from device 473 @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough 471 @retval EFI_NOT_FOUND Device does not support this data class 472 @retval EFI_DEVICE_ERROR Error reading IdentifyData from device 473 @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough 474 474 475 475 **/ … … 483 483 484 484 /** 485 This function is used by the IDE bus driver to get sense data. 485 This function is used by the IDE bus driver to get sense data. 486 486 Data format of Sense data is defined by the Interface GUID. 487 487 488 @param This Pointer to the EFI_DISK_INFO_PROTOCOL instance. 489 @param SenseData Pointer to the SenseData. 490 @param SenseDataSize Size of SenseData in bytes. 488 @param This Pointer to the EFI_DISK_INFO_PROTOCOL instance. 489 @param SenseData Pointer to the SenseData. 490 @param SenseDataSize Size of SenseData in bytes. 491 491 @param SenseDataNumber Pointer to the value for the identify data size. 492 492 493 493 @retval EFI_SUCCESS The command was accepted without any errors. 494 @retval EFI_NOT_FOUND Device does not support this data class 495 @retval EFI_DEVICE_ERROR Error reading InquiryData from device 496 @retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough 494 @retval EFI_NOT_FOUND Device does not support this data class 495 @retval EFI_DEVICE_ERROR Error reading InquiryData from device 496 @retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough 497 497 498 498 **/ … … 509 509 This function is used by the IDE bus driver to get controller information. 510 510 511 @param This Pointer to the EFI_DISK_INFO_PROTOCOL instance. 511 @param This Pointer to the EFI_DISK_INFO_PROTOCOL instance. 512 512 @param IdeChannel Pointer to the Ide Channel number. Primary or secondary. 513 513 @param IdeDevice Pointer to the Ide Device number. Master or slave. 514 514 515 @retval EFI_SUCCESS IdeChannel and IdeDevice are valid 516 @retval EFI_UNSUPPORTED This is not an IDE device 515 @retval EFI_SUCCESS IdeChannel and IdeDevice are valid 516 @retval EFI_UNSUPPORTED This is not an IDE device 517 517 518 518 **/ … … 525 525 ); 526 526 /** 527 The is an event(generally the event is exitBootService event) call back function. 527 The is an event(generally the event is exitBootService event) call back function. 528 528 Clear pending IDE interrupt before OS loader/kernel take control of the IDE device. 529 529 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBusDxe.inf
r58459 r58466 30 30 # VALID_ARCHITECTURES = IA32 X64 IPF EBC 31 31 # 32 # DRIVER_BINDING = gIDEBusDriverBinding 32 # DRIVER_BINDING = gIDEBusDriverBinding 33 33 # COMPONENT_NAME = gIDEBusComponentName 34 # COMPONENT_NAME2 = gIDEBusComponentName2 34 # COMPONENT_NAME2 = gIDEBusComponentName2 35 35 # Variable Guid C Name: gConfigurationGuid Variable Name: L"Configuration" 36 36 # … … 54 54 MdePkg/MdePkg.dec 55 55 IntelFrameworkPkg/IntelFrameworkPkg.dec 56 IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec 56 IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec 57 57 58 58 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeData.h
r48674 r58466 3 3 4 4 Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 13 13 **/ … … 143 143 // 1 second 144 144 // 145 #define ATATIMEOUT 1000 145 #define ATATIMEOUT 1000 146 146 147 147 // … … 153 153 // 1 second 154 154 // 155 #define ATAPITIMEOUT 1000 155 #define ATAPITIMEOUT 1000 156 156 157 157 // … … 163 163 // 2 seconds 164 164 // 165 #define CDROMLONGTIMEOUT 2000 165 #define CDROMLONGTIMEOUT 2000 166 166 167 167 // 168 168 // 5 seconds 169 169 // 170 #define ATAPILONGTIMEOUT 5000 170 #define ATAPILONGTIMEOUT 5000 171 171 172 172 // -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Pci/VgaMiniPortDxe/ComponentName.c
r48674 r58466 1 1 /** @file 2 2 Implements EFI Component Name Protocol for VGA Mini Port Driver. 3 3 4 4 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Pci/VgaMiniPortDxe/VgaMiniPort.c
r48674 r58466 307 307 If ModeNumber exceeds the valid range, then EFI_UNSUPPORTED is returned. 308 308 Otherwise, EFI_SUCCESS is directly returned without real operation. 309 309 310 310 @param This Protocol instance pointer. 311 311 @param ModeNumber Mode number. 0 - 80x25 1-80x50 … … 314 314 @retval EFI_UNSUPPORTED ModeNumber is not supported. 315 315 @retval EFI_DEVICE_ERROR The device is not functioning properly. 316 316 317 317 **/ 318 318 EFI_STATUS … … 329 329 return EFI_SUCCESS; 330 330 } 331 331 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Pci/VgaMiniPortDxe/VgaMiniPort.h
r48674 r58466 253 253 If ModeNumber exceeds the valid range, then EFI_UNSUPPORTED is returned. 254 254 Otherwise, EFI_SUCCESS is directly returned without real operation. 255 255 256 256 @param This Protocol instance pointer. 257 257 @param ModeNumber Mode number. 0 - 80x25 1-80x50 … … 260 260 @retval EFI_UNSUPPORTED ModeNumber is not supported. 261 261 @retval EFI_DEVICE_ERROR The device is not functioning properly. 262 262 263 263 **/ 264 264 EFI_STATUS -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Bus/Pci/VgaMiniPortDxe/VgaMiniPortDxe.inf
r58459 r58466 30 30 # DRIVER_BINDING = gPciVgaMiniPortDriverBinding; 31 31 # COMPONENT_NAME = gPciVgaMiniPortComponentName; 32 # COMPONENT_NAME2 = gPciVgaMiniPortComponentName2; 32 # COMPONENT_NAME2 = gPciVgaMiniPortComponentName2; 33 33 # 34 34 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/BiosThunk/BlockIoDxe/BiosBlkIo.c
r48674 r58466 157 157 return Status; 158 158 } 159 159 160 160 gBS->CloseProtocol ( 161 161 Controller, … … 163 163 This->DriverBindingHandle, 164 164 Controller 165 ); 166 165 ); 166 167 167 // 168 168 // Open the IO Abstraction(s) needed to perform the supported test … … 244 244 PciIo = NULL; 245 245 PciDevPath = NULL; 246 247 DeviceEnable = FALSE; 246 247 DeviceEnable = FALSE; 248 248 249 249 // … … 293 293 goto Error; 294 294 } 295 295 296 296 DeviceEnable = TRUE; 297 297 298 298 // 299 299 // Check to see if there is a legacy option ROM image associated with this PCI device … … 636 636 EFI_STATUS Status; 637 637 BLOCKIO_VENDOR_DEVICE_PATH VendorNode; 638 638 639 639 Status = EFI_UNSUPPORTED; 640 640 641 641 // 642 642 // BugBug: Check for memory leaks! … … 648 648 Status = BuildEdd30DevicePath (BaseDevicePath, Drive, DevicePath); 649 649 } 650 650 651 651 if (EFI_ERROR (Status)) { 652 652 // … … 768 768 Drive->Parameters.InterfaceType 769 769 ) 770 ); 770 ); 771 771 } 772 772 } … … 775 775 return EFI_UNSUPPORTED; 776 776 } 777 777 778 778 *DevicePath = AppendDevicePathNode (BaseDevicePath, &Node.DevPath); 779 779 return EFI_SUCCESS; -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/BiosThunk/BlockIoDxe/BiosBlkIo.h
r48674 r58466 174 174 @retval EFI_MEDIA_CHANGED The MediaId does not matched the current device. 175 175 @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. 176 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, 176 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, 177 177 or the buffer is not on proper alignment. 178 178 … … 204 204 @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device. 205 205 @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. 206 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 206 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 207 207 or the buffer is not on proper alignment. 208 208 … … 267 267 @retval EFI_MEDIA_CHANGED The MediaId does not matched the current device. 268 268 @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. 269 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, 269 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, 270 270 or the buffer is not on proper alignment. 271 271 … … 297 297 @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device. 298 298 @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. 299 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 299 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 300 300 or the buffer is not on proper alignment. 301 301 … … 326 326 @retval EFI_MEDIA_CHANGED The MediaId does not matched the current device. 327 327 @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. 328 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, 328 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, 329 329 or the buffer is not on proper alignment. 330 330 … … 356 356 @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device. 357 357 @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. 358 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 358 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 359 359 or the buffer is not on proper alignment. 360 360 … … 377 377 378 378 @return Result of device parameter retrieval. 379 379 380 380 **/ 381 381 UINTN … … 392 392 393 393 @return Result of this extension. 394 394 395 395 **/ 396 396 UINTN … … 407 407 408 408 @return Result of drive parameter retrieval. 409 409 410 410 **/ 411 411 UINTN -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/BiosThunk/BlockIoDxe/BiosInt13.c
r48674 r58466 131 131 132 132 @return Result of device parameter retrieval. 133 133 134 134 **/ 135 135 UINTN … … 186 186 187 187 @return Result of this extension. 188 188 189 189 **/ 190 190 UINTN … … 228 228 229 229 @return Result of drive parameter retrieval. 230 230 231 231 **/ 232 232 UINTN … … 407 407 @retval EFI_MEDIA_CHANGED The MediaId does not matched the current device. 408 408 @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. 409 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, 409 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, 410 410 or the buffer is not on proper alignment. 411 411 … … 555 555 @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device. 556 556 @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. 557 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 557 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 558 558 or the buffer is not on proper alignment. 559 559 … … 790 790 @retval EFI_MEDIA_CHANGED The MediaId does not matched the current device. 791 791 @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. 792 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, 792 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, 793 793 or the buffer is not on proper alignment. 794 794 … … 943 943 @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device. 944 944 @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. 945 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 945 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 946 946 or the buffer is not on proper alignment. 947 947 … … 1104 1104 @retval EFI_MEDIA_CHANGED The MediaId does not matched the current device. 1105 1105 @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. 1106 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, 1106 @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, 1107 1107 or the buffer is not on proper alignment. 1108 1108 … … 1306 1306 @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device. 1307 1307 @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. 1308 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 1308 @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, 1309 1309 or the buffer is not on proper alignment. 1310 1310 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c
r58459 r58466 59 59 /** 60 60 Dequeue the key. 61 61 62 62 @param Queue The queue to be dequeued. 63 63 @param KeyData The key data to be dequeued. … … 86 86 /** 87 87 Check whether the queue is empty. 88 88 89 89 @param Queue The queue to be checked. 90 90 … … 270 270 BiosKeyboardPrivate->CommandRegisterAddress = KEYBOARD_8042_COMMAND_REGISTER; 271 271 BiosKeyboardPrivate->ExtendedKeyboard = TRUE; 272 272 273 273 BiosKeyboardPrivate->Queue.Front = 0; 274 274 BiosKeyboardPrivate->Queue.Rear = 0; … … 276 276 BiosKeyboardPrivate->SimpleTextInputEx.ReadKeyStrokeEx = BiosKeyboardReadKeyStrokeEx; 277 277 BiosKeyboardPrivate->SimpleTextInputEx.SetState = BiosKeyboardSetState; 278 BiosKeyboardPrivate->SimpleTextInputEx.RegisterKeyNotify = BiosKeyboardRegisterKeyNotify; 279 BiosKeyboardPrivate->SimpleTextInputEx.UnregisterKeyNotify = BiosKeyboardUnregisterKeyNotify; 278 BiosKeyboardPrivate->SimpleTextInputEx.RegisterKeyNotify = BiosKeyboardRegisterKeyNotify; 279 BiosKeyboardPrivate->SimpleTextInputEx.UnregisterKeyNotify = BiosKeyboardUnregisterKeyNotify; 280 280 InitializeListHead (&BiosKeyboardPrivate->NotifyList); 281 281 … … 312 312 BiosKeyboardPrivate->SimpleTextInputEx.WaitForKeyEx = NULL; 313 313 goto Done; 314 } 314 } 315 315 316 316 // … … 340 340 goto Done; 341 341 } 342 342 343 343 // 344 344 // Report a Progress Code for an attempt to detect the precense of the keyboard device in the system … … 357 357 ); 358 358 if (EFI_ERROR (Status)) { 359 DEBUG ((EFI_D_ERROR, "[KBD]Reset Failed. Status - %r\n", Status)); 359 DEBUG ((EFI_D_ERROR, "[KBD]Reset Failed. Status - %r\n", Status)); 360 360 StatusCode = EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_NOT_DETECTED; 361 361 goto Done; … … 455 455 if (EFI_ERROR (Status)) { 456 456 457 if (BiosKeyboardPrivate != NULL) { 457 if (BiosKeyboardPrivate != NULL) { 458 458 if ((BiosKeyboardPrivate->SimpleTextIn).WaitForKey != NULL) { 459 459 gBS->CloseEvent ((BiosKeyboardPrivate->SimpleTextIn).WaitForKey); … … 461 461 462 462 if ((BiosKeyboardPrivate->SimpleTextInputEx).WaitForKeyEx != NULL) { 463 gBS->CloseEvent ((BiosKeyboardPrivate->SimpleTextInputEx).WaitForKeyEx); 463 gBS->CloseEvent ((BiosKeyboardPrivate->SimpleTextInputEx).WaitForKeyEx); 464 464 } 465 465 BiosKeyboardFreeNotifyList (&BiosKeyboardPrivate->NotifyList); 466 466 467 467 if (BiosKeyboardPrivate->TimerEvent != NULL) { 468 gBS->CloseEvent (BiosKeyboardPrivate->TimerEvent); 468 gBS->CloseEvent (BiosKeyboardPrivate->TimerEvent); 469 469 } 470 470 … … 537 537 return Status; 538 538 } 539 539 540 540 BiosKeyboardPrivate = BIOS_KEYBOARD_DEV_FROM_THIS (SimpleTextIn); 541 541 … … 908 908 909 909 /** 910 Reads the next keystroke from the input device. The WaitForKey Event can 910 Reads the next keystroke from the input device. The WaitForKey Event can 911 911 be used to test for existance of a keystroke via WaitForEvent () call. 912 912 913 913 @param BiosKeyboardPrivate Bioskeyboard driver private structure. 914 @param KeyData A pointer to a buffer that is filled in with the keystroke 914 @param KeyData A pointer to a buffer that is filled in with the keystroke 915 915 state data for the key that was pressed. 916 916 917 917 @retval EFI_SUCCESS The keystroke information was returned. 918 918 @retval EFI_NOT_READY There was no keystroke data availiable. 919 @retval EFI_DEVICE_ERROR The keystroke information was not returned due to 919 @retval EFI_DEVICE_ERROR The keystroke information was not returned due to 920 920 hardware errors. 921 @retval EFI_INVALID_PARAMETER KeyData is NULL. 922 921 @retval EFI_INVALID_PARAMETER KeyData is NULL. 922 923 923 **/ 924 924 EFI_STATUS … … 937 937 // Use TimerEvent callback funciton to check whether there's any key pressed 938 938 // 939 939 940 940 // 941 941 // Stall 1ms to give a chance to let other driver interrupt this routine for their timer event. 942 // Csm will be used to check whether there is a key pending, but the csm will disable all 942 // Csm will be used to check whether there is a key pending, but the csm will disable all 943 943 // interrupt before switch to compatibility16, which mean all the efiCompatibility timer 944 // event will stop work during the compatibility16. And If a caller recursivly invoke this function, 945 // e.g. OS loader, other drivers which are driven by timer event will have a bad performance during this period, 946 // e.g. usb keyboard driver. 944 // event will stop work during the compatibility16. And If a caller recursivly invoke this function, 945 // e.g. OS loader, other drivers which are driven by timer event will have a bad performance during this period, 946 // e.g. usb keyboard driver. 947 947 // Add a stall period can greatly increate other driver performance during the WaitForKey is recursivly invoked. 948 948 // 1ms delay will make little impact to the thunk keyboard driver, and user can not feel the delay at all when input. … … 1051 1051 KBC_CMDREG_VIA64_CMDBYTE_R 1052 1052 ); 1053 1053 1054 1054 if (EFI_ERROR (Status)) { 1055 1055 Status = EFI_DEVICE_ERROR; 1056 1056 goto Exit; 1057 1057 } 1058 1058 1059 1059 Status = KeyboardRead ( 1060 1060 BiosKeyboardPrivate, 1061 1061 &CommandByte 1062 1062 ); 1063 1063 1064 1064 if (EFI_ERROR (Status)) { 1065 1065 Status = EFI_DEVICE_ERROR; … … 1082 1082 KBC_CMDREG_VIA64_AUX_DISABLE 1083 1083 ); 1084 1084 1085 1085 if (EFI_ERROR (Status)) { 1086 1086 Status = EFI_DEVICE_ERROR; 1087 1087 goto Exit; 1088 1088 } 1089 1089 1090 1090 Status = KeyboardCommand ( 1091 1091 BiosKeyboardPrivate, 1092 1092 KBC_CMDREG_VIA64_KB_DISABLE 1093 1093 ); 1094 1094 1095 1095 if (EFI_ERROR (Status)) { 1096 1096 Status = EFI_DEVICE_ERROR; … … 1104 1104 // 1105 1105 // Report a Progress Code for performing a self test on the keyboard controller 1106 // 1106 // 1107 1107 REPORT_STATUS_CODE ( 1108 1108 EFI_PROGRESS_CODE, 1109 1109 EFI_PERIPHERAL_KEYBOARD | EFI_P_KEYBOARD_PC_SELF_TEST 1110 1110 ); 1111 1111 1112 1112 Status = KeyboardCommand ( 1113 1113 BiosKeyboardPrivate, … … 1118 1118 goto Exit; 1119 1119 } 1120 1120 1121 1121 Status = KeyboardWaitForValue ( 1122 1122 BiosKeyboardPrivate, … … 1328 1328 KBC_CMDREG_VIA64_KB_ENABLE 1329 1329 ); 1330 1330 1331 1331 if (EFI_ERROR (Status)) { 1332 1332 Status = EFI_DEVICE_ERROR; … … 1401 1401 } 1402 1402 1403 CopyMem (Key, &KeyData.Key, sizeof (EFI_INPUT_KEY)); 1403 CopyMem (Key, &KeyData.Key, sizeof (EFI_INPUT_KEY)); 1404 1404 1405 1405 return EFI_SUCCESS; … … 1445 1445 1446 1446 @param This Pointer of the protocol EFI_SIMPLE_TEXT_IN_PROTOCOL. 1447 1447 1448 1448 @retval EFI_SUCCESS A key is being pressed now. 1449 1449 @retval Other No key is now pressed. … … 1620 1620 @param ScanCode Scan code of key. 1621 1621 1622 @return The value of EFI Scancode for the key. 1622 @return The value of EFI Scancode for the key. 1623 1623 @retval SCAN_NULL No corresponding value in the EFI convert table is found for the key. 1624 1624 … … 1658 1658 Check whether there is Ps/2 Keyboard device in system by 0xF4 Keyboard Command 1659 1659 If Keyboard receives 0xF4, it will respond with 'ACK'. If it doesn't respond, the device 1660 should not be in system. 1660 should not be in system. 1661 1661 1662 1662 @param BiosKeyboardPrivate Keyboard Private Data Struture … … 1714 1714 /** 1715 1715 Timer event handler: read a series of key stroke from 8042 1716 and put them into memory key buffer. 1716 and put them into memory key buffer. 1717 1717 It is registered as running under TPL_NOTIFY 1718 1718 1719 1719 @param Event The timer event 1720 1720 @param Context A BIOS_KEYBOARD_DEV pointer … … 1761 1761 gBS->RestoreTPL (OldTpl); 1762 1762 return; 1763 } 1763 } 1764 1764 1765 1765 // … … 1786 1786 KeyData.Key.UnicodeChar 1787 1787 )); 1788 1788 1789 1789 KeyData.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID; 1790 1790 KeyData.KeyState.KeyToggleState = EFI_TOGGLE_STATE_VALID; 1791 1791 // 1792 // Leagcy Bios use Int 9 which is IRQ1 interrupt handler to get keystroke scancode to KB buffer in BDA (BIOS DATE AREA), then 1793 // Int 16 depend KB buffer and some key bits in BDA to translate the scancode to ASCII code, and return both the scancode and ASCII 1794 // code to Int 16 caller. This translation process works well if the Int 9 could response user input in time. But in Tiano enviorment, the Int 9 1795 // will be disabled after the thunk call finish, which means if user crazy input during int 9 being disabled, some keystrokes will be lost when 1796 // KB device own hardware buffer overflows. And if the lost keystroke code is CTRL or ALT or SHIFT release code, these function key flags bit 1797 // in BDA will not be updated. So the Int 16 will believe the CTRL or ALT or SHIFT is still pressed, and Int 16 will translate later scancode 1798 // to wrong ASCII code. We can increase the Thunk frequence to let Int 9 response in time, but this way will much hurt other dirvers 1792 // Leagcy Bios use Int 9 which is IRQ1 interrupt handler to get keystroke scancode to KB buffer in BDA (BIOS DATE AREA), then 1793 // Int 16 depend KB buffer and some key bits in BDA to translate the scancode to ASCII code, and return both the scancode and ASCII 1794 // code to Int 16 caller. This translation process works well if the Int 9 could response user input in time. But in Tiano enviorment, the Int 9 1795 // will be disabled after the thunk call finish, which means if user crazy input during int 9 being disabled, some keystrokes will be lost when 1796 // KB device own hardware buffer overflows. And if the lost keystroke code is CTRL or ALT or SHIFT release code, these function key flags bit 1797 // in BDA will not be updated. So the Int 16 will believe the CTRL or ALT or SHIFT is still pressed, and Int 16 will translate later scancode 1798 // to wrong ASCII code. We can increase the Thunk frequence to let Int 9 response in time, but this way will much hurt other dirvers 1799 1799 // performance, like USB. 1800 1800 // 1801 // 1. If CTRL or ALT release code is missed, all later input keys will be translated to wrong ASCII codes which the Tiano cannot support. In 1802 // this case, the KB input seems fail to work, and user input is blocked. To solve the problem, we can help to clear the CTRL or ALT flag in BDA 1803 // after every Int 16 finish. Thus persist to press CTRL or ALT has same effection as only press one time. It is Ok, since user not often use the 1801 // 1. If CTRL or ALT release code is missed, all later input keys will be translated to wrong ASCII codes which the Tiano cannot support. In 1802 // this case, the KB input seems fail to work, and user input is blocked. To solve the problem, we can help to clear the CTRL or ALT flag in BDA 1803 // after every Int 16 finish. Thus persist to press CTRL or ALT has same effection as only press one time. It is Ok, since user not often use the 1804 1804 // CTRL and ALT. 1805 1805 // 1806 // 2. If SHIFT release code is missed, all later lowercase input will become capital. This is ugly, but not block user input. If user press the lost 1806 // 2. If SHIFT release code is missed, all later lowercase input will become capital. This is ugly, but not block user input. If user press the lost 1807 1807 // SHIFT again, the lowercase will come back to normal. Since user often use the SHIFT, it is not reasonable to help to clear the SHIFT flag in BDA, 1808 // which will let persist to press SHIFT has same effection as only press one time. 1808 // which will let persist to press SHIFT has same effection as only press one time. 1809 1809 // 1810 1810 //0040h:0017h - KEYBOARD - STATUS FLAGS 1 … … 1835 1835 if ((KbFlag1 & KB_SCROLL_LOCK_BIT) == KB_SCROLL_LOCK_BIT) { 1836 1836 DEBUG ((EFI_D_INFO, "[KBD]Scroll Lock Key is pressed.\n")); 1837 } 1837 } 1838 1838 if ((KbFlag1 & KB_ALT_PRESSED) == KB_ALT_PRESSED) { 1839 1839 if ((KbFlag2 & KB_LEFT_ALT_PRESSED) == KB_LEFT_ALT_PRESSED) { … … 1842 1842 DEBUG ((EFI_D_INFO, "[KBD]Right Alt Key is pressed.\n")); 1843 1843 } 1844 } 1844 } 1845 1845 if ((KbFlag1 & KB_CTRL_PRESSED) == KB_CTRL_PRESSED) { 1846 1846 if ((KbFlag2 & KB_LEFT_CTRL_PRESSED) == KB_LEFT_CTRL_PRESSED) { … … 1849 1849 DEBUG ((EFI_D_INFO, "[KBD]Right Ctrl Key is pressed.\n")); 1850 1850 } 1851 } 1851 } 1852 1852 if ((KbFlag1 & KB_LEFT_SHIFT_PRESSED) == KB_LEFT_SHIFT_PRESSED) { 1853 1853 DEBUG ((EFI_D_INFO, "[KBD]Left Shift Key is pressed.\n")); … … 1874 1874 // Record shift state 1875 1875 // BUGBUG: Need add Menu key and Left/Right Logo key state in the future 1876 // 1876 // 1877 1877 if ((KbFlag1 & KB_ALT_PRESSED) == KB_ALT_PRESSED) { 1878 1878 KeyData.KeyState.KeyShiftState |= ((KbFlag2 & KB_LEFT_ALT_PRESSED) == KB_LEFT_ALT_PRESSED) ? EFI_LEFT_ALT_PRESSED : EFI_RIGHT_ALT_PRESSED; 1879 } 1879 } 1880 1880 if ((KbFlag1 & KB_CTRL_PRESSED) == KB_CTRL_PRESSED) { 1881 1881 KeyData.KeyState.KeyShiftState |= ((KbFlag2 & KB_LEFT_CTRL_PRESSED) == KB_LEFT_CTRL_PRESSED) ? EFI_LEFT_CONTROL_PRESSED : EFI_RIGHT_CONTROL_PRESSED; 1882 } 1882 } 1883 1883 if ((KbFlag1 & KB_LEFT_SHIFT_PRESSED) == KB_LEFT_SHIFT_PRESSED) { 1884 1884 KeyData.KeyState.KeyShiftState |= EFI_LEFT_SHIFT_PRESSED; … … 1893 1893 KbFlag2 &= ~(KB_LEFT_ALT_PRESSED | KB_LEFT_CTRL_PRESSED); 1894 1894 *((UINT8 *) (UINTN) 0x418) = KbFlag2; 1895 KbFlag1 &= ~0x0C; 1896 *((UINT8 *) (UINTN) 0x417) = KbFlag1; 1897 1898 1895 KbFlag1 &= ~0x0C; 1896 *((UINT8 *) (UINTN) 0x417) = KbFlag1; 1897 1898 1899 1899 // 1900 1900 // Output EFI input key and shift/toggle state … … 1946 1946 for (Link = BiosKeyboardPrivate->NotifyList.ForwardLink; Link != &BiosKeyboardPrivate->NotifyList; Link = Link->ForwardLink) { 1947 1947 CurrentNotify = CR ( 1948 Link, 1949 BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY, 1950 NotifyEntry, 1948 Link, 1949 BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY, 1950 NotifyEntry, 1951 1951 BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE 1952 1952 ); 1953 if (IsKeyRegistered (&CurrentNotify->KeyData, &KeyData)) { 1953 if (IsKeyRegistered (&CurrentNotify->KeyData, &KeyData)) { 1954 1954 CurrentNotify->KeyNotificationFn (&KeyData); 1955 1955 } … … 1962 1962 gBS->RestoreTPL (OldTpl); 1963 1963 1964 return ; 1964 return ; 1965 1965 } 1966 1966 … … 1986 1986 while (!IsListEmpty (ListHead)) { 1987 1987 NotifyNode = CR ( 1988 ListHead->ForwardLink, 1989 BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY, 1990 NotifyEntry, 1988 ListHead->ForwardLink, 1989 BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY, 1990 NotifyEntry, 1991 1991 BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE 1992 1992 ); … … 2001 2001 Check if key is registered. 2002 2002 2003 @param RegsiteredData A pointer to a buffer that is filled in with the keystroke 2003 @param RegsiteredData A pointer to a buffer that is filled in with the keystroke 2004 2004 state data for the key that was registered. 2005 @param InputData A pointer to a buffer that is filled in with the keystroke 2005 @param InputData A pointer to a buffer that is filled in with the keystroke 2006 2006 state data for the key that was pressed. 2007 2007 2008 2008 @retval TRUE Key be pressed matches a registered key. 2009 @retval FLASE Match failed. 2010 2009 @retval FLASE Match failed. 2010 2011 2011 **/ 2012 2012 BOOLEAN … … 2017 2017 { 2018 2018 ASSERT (RegsiteredData != NULL && InputData != NULL); 2019 2019 2020 2020 if ((RegsiteredData->Key.ScanCode != InputData->Key.ScanCode) || 2021 2021 (RegsiteredData->Key.UnicodeChar != InputData->Key.UnicodeChar)) { 2022 return FALSE; 2023 } 2024 2022 return FALSE; 2023 } 2024 2025 2025 // 2026 2026 // Assume KeyShiftState/KeyToggleState = 0 in Registered key data means these state could be ignored. … … 2028 2028 if (RegsiteredData->KeyState.KeyShiftState != 0 && 2029 2029 RegsiteredData->KeyState.KeyShiftState != InputData->KeyState.KeyShiftState) { 2030 return FALSE; 2031 } 2030 return FALSE; 2031 } 2032 2032 if (RegsiteredData->KeyState.KeyToggleState != 0 && 2033 2033 RegsiteredData->KeyState.KeyToggleState != InputData->KeyState.KeyToggleState) { 2034 return FALSE; 2035 } 2036 2034 return FALSE; 2035 } 2036 2037 2037 return TRUE; 2038 2038 … … 2044 2044 @param Event The event that be siganlled when any key has been stroked. 2045 2045 @param Context Pointer of the protocol EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL. 2046 2046 2047 2047 **/ 2048 2048 VOID … … 2052 2052 IN VOID *Context 2053 2053 ) 2054 { 2054 { 2055 2055 BIOS_KEYBOARD_DEV *BiosKeyboardPrivate; 2056 2057 BiosKeyboardPrivate = TEXT_INPUT_EX_BIOS_KEYBOARD_DEV_FROM_THIS (Context); 2056 2057 BiosKeyboardPrivate = TEXT_INPUT_EX_BIOS_KEYBOARD_DEV_FROM_THIS (Context); 2058 2058 BiosKeyboardWaitForKey (Event, &BiosKeyboardPrivate->SimpleTextIn); 2059 2059 … … 2062 2062 /** 2063 2063 Reset the input device and optionaly run diagnostics 2064 2064 2065 2065 @param This Protocol instance pointer. 2066 2066 @param ExtendedVerification Driver may perform diagnostics on reset. 2067 2067 2068 2068 @retval EFI_SUCCESS The device was reset. 2069 @retval EFI_DEVICE_ERROR The device is not functioning properly and could 2069 @retval EFI_DEVICE_ERROR The device is not functioning properly and could 2070 2070 not be reset. 2071 2071 … … 2081 2081 EFI_STATUS Status; 2082 2082 EFI_TPL OldTpl; 2083 2084 BiosKeyboardPrivate = TEXT_INPUT_EX_BIOS_KEYBOARD_DEV_FROM_THIS (This); 2083 2084 BiosKeyboardPrivate = TEXT_INPUT_EX_BIOS_KEYBOARD_DEV_FROM_THIS (This); 2085 2085 2086 2086 Status = BiosKeyboardPrivate->SimpleTextIn.Reset ( 2087 &BiosKeyboardPrivate->SimpleTextIn, 2087 &BiosKeyboardPrivate->SimpleTextIn, 2088 2088 ExtendedVerification 2089 2089 ); … … 2095 2095 2096 2096 gBS->RestoreTPL (OldTpl); 2097 2097 2098 2098 return EFI_SUCCESS; 2099 2099 … … 2101 2101 2102 2102 /** 2103 Reads the next keystroke from the input device. The WaitForKey Event can 2103 Reads the next keystroke from the input device. The WaitForKey Event can 2104 2104 be used to test for existance of a keystroke via WaitForEvent () call. 2105 2105 2106 2106 @param This Protocol instance pointer. 2107 @param KeyData A pointer to a buffer that is filled in with the keystroke 2107 @param KeyData A pointer to a buffer that is filled in with the keystroke 2108 2108 state data for the key that was pressed. 2109 2109 2110 2110 @retval EFI_SUCCESS The keystroke information was returned. 2111 2111 @retval EFI_NOT_READY There was no keystroke data availiable. 2112 @retval EFI_DEVICE_ERROR The keystroke information was not returned due to 2112 @retval EFI_DEVICE_ERROR The keystroke information was not returned due to 2113 2113 hardware errors. 2114 @retval EFI_INVALID_PARAMETER KeyData is NULL. 2115 2114 @retval EFI_INVALID_PARAMETER KeyData is NULL. 2115 2116 2116 **/ 2117 2117 EFI_STATUS … … 2127 2127 return EFI_INVALID_PARAMETER; 2128 2128 } 2129 2129 2130 2130 BiosKeyboardPrivate = TEXT_INPUT_EX_BIOS_KEYBOARD_DEV_FROM_THIS (This); 2131 2131 2132 2132 return KeyboardReadKeyStrokeWorker (BiosKeyboardPrivate, KeyData); 2133 2133 2134 2134 } 2135 2135 … … 2138 2138 2139 2139 @param This Protocol instance pointer. 2140 @param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the 2140 @param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the 2141 2141 state for the input device. 2142 2142 2143 2143 @retval EFI_SUCCESS The device state was set successfully. 2144 @retval EFI_DEVICE_ERROR The device is not functioning correctly and could 2144 @retval EFI_DEVICE_ERROR The device is not functioning correctly and could 2145 2145 not have the setting adjusted. 2146 2146 @retval EFI_UNSUPPORTED The device does not have the ability to set its state. 2147 @retval EFI_INVALID_PARAMETER KeyToggleState is NULL. 2148 2149 **/ 2147 @retval EFI_INVALID_PARAMETER KeyToggleState is NULL. 2148 2149 **/ 2150 2150 EFI_STATUS 2151 2151 EFIAPI … … 2204 2204 if (EFI_ERROR (Status)) { 2205 2205 return EFI_DEVICE_ERROR; 2206 } 2206 } 2207 2207 Status = KeyboardWaitForValue (BiosKeyboardPrivate, 0xfa, KEYBOARD_WAITFORVALUE_TIMEOUT); 2208 2208 if (EFI_ERROR (Status)) { … … 2212 2212 if (EFI_ERROR (Status)) { 2213 2213 return EFI_DEVICE_ERROR; 2214 } 2214 } 2215 2215 // 2216 2216 // Call Legacy BIOS Protocol to set whatever is necessary … … 2233 2233 2234 2234 @param This Protocol instance pointer. 2235 @param KeyData A pointer to a buffer that is filled in with the keystroke 2235 @param KeyData A pointer to a buffer that is filled in with the keystroke 2236 2236 information data for the key that was pressed. 2237 @param KeyNotificationFunction Points to the function to be called when the key 2238 sequence is typed specified by KeyData. 2239 @param NotifyHandle Points to the unique handle assigned to the registered notification. 2240 2241 2237 @param KeyNotificationFunction Points to the function to be called when the key 2238 sequence is typed specified by KeyData. 2239 @param NotifyHandle Points to the unique handle assigned to the registered notification. 2240 2241 2242 2242 @retval EFI_SUCCESS The notification function was registered successfully. 2243 2243 @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data structures. 2244 2244 @retval EFI_INVALID_PARAMETER KeyData or NotifyHandle is NULL. 2245 2246 **/ 2245 2246 **/ 2247 2247 EFI_STATUS 2248 2248 EFIAPI … … 2259 2259 BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY *NewNotify; 2260 2260 LIST_ENTRY *Link; 2261 BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY *CurrentNotify; 2261 BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY *CurrentNotify; 2262 2262 2263 2263 if (KeyData == NULL || NotifyHandle == NULL || KeyNotificationFunction == NULL) { … … 2277 2277 for (Link = BiosKeyboardPrivate->NotifyList.ForwardLink; Link != &BiosKeyboardPrivate->NotifyList; Link = Link->ForwardLink) { 2278 2278 CurrentNotify = CR ( 2279 Link, 2280 BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY, 2281 NotifyEntry, 2279 Link, 2280 BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY, 2281 NotifyEntry, 2282 2282 BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE 2283 2283 ); 2284 if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) { 2284 if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) { 2285 2285 if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) { 2286 2286 *NotifyHandle = CurrentNotify; … … 2288 2288 goto Exit; 2289 2289 } 2290 } 2290 } 2291 2291 } 2292 2292 … … 2294 2294 // Allocate resource to save the notification function 2295 2295 // 2296 2296 2297 2297 NewNotify = (BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY *) AllocateZeroPool (sizeof (BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY)); 2298 2298 if (NewNotify == NULL) { … … 2308 2308 *NotifyHandle = NewNotify; 2309 2309 Status = EFI_SUCCESS; 2310 2310 2311 2311 Exit: 2312 2312 // … … 2314 2314 // 2315 2315 gBS->RestoreTPL (OldTpl); 2316 return Status; 2316 return Status; 2317 2317 } 2318 2318 … … 2320 2320 Remove a registered notification function from a particular keystroke. 2321 2321 2322 @param This Protocol instance pointer. 2322 @param This Protocol instance pointer. 2323 2323 @param NotificationHandle The handle of the notification function being unregistered. 2324 2324 2325 2325 @retval EFI_SUCCESS The notification function was unregistered successfully. 2326 2326 @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid. 2327 2328 **/ 2327 2328 **/ 2329 2329 EFI_STATUS 2330 2330 EFIAPI … … 2349 2349 if (((BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY *) NotificationHandle)->Signature != BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE) { 2350 2350 return EFI_INVALID_PARAMETER; 2351 } 2352 2351 } 2352 2353 2353 BiosKeyboardPrivate = TEXT_INPUT_EX_BIOS_KEYBOARD_DEV_FROM_THIS (This); 2354 2354 2355 2355 // 2356 2356 // Enter critical section … … 2360 2360 for (Link = BiosKeyboardPrivate->NotifyList.ForwardLink; Link != &BiosKeyboardPrivate->NotifyList; Link = Link->ForwardLink) { 2361 2361 CurrentNotify = CR ( 2362 Link, 2363 BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY, 2364 NotifyEntry, 2362 Link, 2363 BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY, 2364 NotifyEntry, 2365 2365 BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE 2366 ); 2366 ); 2367 2367 if (CurrentNotify == NotificationHandle) { 2368 2368 // 2369 2369 // Remove the notification function from NotifyList and free resources 2370 2370 // 2371 RemoveEntryList (&CurrentNotify->NotifyEntry); 2371 RemoveEntryList (&CurrentNotify->NotifyEntry); 2372 2372 2373 2373 Status = EFI_SUCCESS; … … 2375 2375 } 2376 2376 } 2377 2377 2378 2378 // 2379 2379 // Can not find the specified Notification Handle -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.h
r58459 r58466 219 219 UINT16 CommandRegisterAddress; 220 220 BOOLEAN ExtendedKeyboard; 221 221 222 222 // 223 223 // Buffer storing EFI_KEY_DATA … … 230 230 LIST_ENTRY NotifyList; 231 231 EFI_EVENT TimerEvent; 232 232 233 233 } BIOS_KEYBOARD_DEV; 234 234 … … 496 496 497 497 @param This Pointer of the protocol EFI_SIMPLE_TEXT_IN_PROTOCOL. 498 498 499 499 @retval EFI_SUCCESS A key is being pressed now. 500 500 @retval Other No key is now pressed. … … 513 513 @param ScanCode Scan code of key. 514 514 515 @return The value of EFI Scancode for the key. 515 @return The value of EFI Scancode for the key. 516 516 @retval SCAN_NULL No corresponding value in the EFI convert table is found for the key. 517 517 … … 526 526 Check whether there is Ps/2 Keyboard device in system by 0xF4 Keyboard Command 527 527 If Keyboard receives 0xF4, it will respond with 'ACK'. If it doesn't respond, the device 528 should not be in system. 528 should not be in system. 529 529 530 530 @param BiosKeyboardPrivate Keyboard Private Data Struture … … 541 541 /** 542 542 Timer event handler: read a series of key stroke from 8042 543 and put them into memory key buffer. 543 and put them into memory key buffer. 544 544 It is registered as running under TPL_NOTIFY 545 545 546 546 @param Event The timer event 547 547 @param Context A BIOS_KEYBOARD_DEV pointer … … 557 557 /** 558 558 Reset the input device and optionaly run diagnostics 559 559 560 560 @param This Protocol instance pointer. 561 561 @param ExtendedVerification Driver may perform diagnostics on reset. 562 562 563 563 @retval EFI_SUCCESS The device was reset. 564 @retval EFI_DEVICE_ERROR The device is not functioning properly and could 564 @retval EFI_DEVICE_ERROR The device is not functioning properly and could 565 565 not be reset. 566 566 … … 574 574 575 575 /** 576 Reads the next keystroke from the input device. The WaitForKey Event can 576 Reads the next keystroke from the input device. The WaitForKey Event can 577 577 be used to test for existance of a keystroke via WaitForEvent () call. 578 578 579 579 @param This Protocol instance pointer. 580 @param KeyData A pointer to a buffer that is filled in with the keystroke 580 @param KeyData A pointer to a buffer that is filled in with the keystroke 581 581 state data for the key that was pressed. 582 582 583 583 @retval EFI_SUCCESS The keystroke information was returned. 584 584 @retval EFI_NOT_READY There was no keystroke data availiable. 585 @retval EFI_DEVICE_ERROR The keystroke information was not returned due to 585 @retval EFI_DEVICE_ERROR The keystroke information was not returned due to 586 586 hardware errors. 587 @retval EFI_INVALID_PARAMETER KeyData is NULL. 588 587 @retval EFI_INVALID_PARAMETER KeyData is NULL. 588 589 589 **/ 590 590 EFI_STATUS … … 599 599 600 600 @param This Protocol instance pointer. 601 @param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the 601 @param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the 602 602 state for the input device. 603 603 604 604 @retval EFI_SUCCESS The device state was set successfully. 605 @retval EFI_DEVICE_ERROR The device is not functioning correctly and could 605 @retval EFI_DEVICE_ERROR The device is not functioning correctly and could 606 606 not have the setting adjusted. 607 607 @retval EFI_UNSUPPORTED The device does not have the ability to set its state. 608 @retval EFI_INVALID_PARAMETER KeyToggleState is NULL. 609 610 **/ 608 @retval EFI_INVALID_PARAMETER KeyToggleState is NULL. 609 610 **/ 611 611 EFI_STATUS 612 612 EFIAPI … … 620 620 621 621 @param This Protocol instance pointer. 622 @param KeyData A pointer to a buffer that is filled in with the keystroke 622 @param KeyData A pointer to a buffer that is filled in with the keystroke 623 623 information data for the key that was pressed. 624 @param KeyNotificationFunction Points to the function to be called when the key 625 sequence is typed specified by KeyData. 626 @param NotifyHandle Points to the unique handle assigned to the registered notification. 627 628 624 @param KeyNotificationFunction Points to the function to be called when the key 625 sequence is typed specified by KeyData. 626 @param NotifyHandle Points to the unique handle assigned to the registered notification. 627 628 629 629 @retval EFI_SUCCESS The notification function was registered successfully. 630 630 @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data structures. 631 631 @retval EFI_INVALID_PARAMETER KeyData or NotifyHandle is NULL. 632 633 **/ 632 633 **/ 634 634 EFI_STATUS 635 635 EFIAPI … … 644 644 Remove a registered notification function from a particular keystroke. 645 645 646 @param This Protocol instance pointer. 646 @param This Protocol instance pointer. 647 647 @param NotificationHandle The handle of the notification function being unregistered. 648 648 649 649 @retval EFI_SUCCESS The notification function was unregistered successfully. 650 650 @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid. 651 652 **/ 651 652 **/ 653 653 EFI_STATUS 654 654 EFIAPI … … 706 706 BiosKeyboardFreeNotifyList ( 707 707 IN OUT LIST_ENTRY *ListHead 708 ); 708 ); 709 709 710 710 /** 711 711 Check if key is registered. 712 712 713 @param RegsiteredData A pointer to a buffer that is filled in with the keystroke 713 @param RegsiteredData A pointer to a buffer that is filled in with the keystroke 714 714 state data for the key that was registered. 715 @param InputData A pointer to a buffer that is filled in with the keystroke 715 @param InputData A pointer to a buffer that is filled in with the keystroke 716 716 state data for the key that was pressed. 717 717 718 718 @retval TRUE Key be pressed matches a registered key. 719 @retval FLASE Match failed. 720 719 @retval FLASE Match failed. 720 721 721 **/ 722 722 BOOLEAN … … 731 731 @param Event The event that be siganlled when any key has been stroked. 732 732 @param Context Pointer of the protocol EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL. 733 733 734 734 **/ 735 735 VOID -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/KeyboardDxe.inf
r58459 r58466 2 2 # Ps2 Keyboard driver. 3 3 # 4 # Ps2 Keyboard driver by using Legacy Bios protocol service and IsaIo protocol 4 # Ps2 Keyboard driver by using Legacy Bios protocol service and IsaIo protocol 5 5 # service. This dirver uses legacy INT16 to get the key stroke status. 6 6 # -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/BiosSnp16.c
r58459 r58466 43 43 @param SimpleNetworkDevice A pointer to EFI_SIMPLE_NETWORK_DEV data structure. 44 44 @param Ax PCI address of Undi device. 45 46 @retval EFI_DEVICE_ERROR Fail to start 16 bit UNDI ROM. 47 @retval Others Status of start 16 bit UNDI ROM. 45 46 @retval EFI_DEVICE_ERROR Fail to start 16 bit UNDI ROM. 47 @retval Others Status of start 16 bit UNDI ROM. 48 48 **/ 49 49 EFI_STATUS … … 57 57 58 58 @param SimpleNetworkDevice A pointer to EFI_SIMPLE_NETWORK_DEV data structure. 59 60 @retval EFI_DEVICE_ERROR Fail to start 16 bit UNDI ROM. 61 @retval Others Status of start 16 bit UNDI ROM. 59 60 @retval EFI_DEVICE_ERROR Fail to start 16 bit UNDI ROM. 61 @retval Others Status of start 16 bit UNDI ROM. 62 62 **/ 63 63 EFI_STATUS … … 70 70 71 71 @param SimpleNetworkDevice A pointer to EFI_SIMPLE_NETWORK_DEV data structure. 72 73 @retval EFI_DEVICE_ERROR Fail to stop 16 bit UNDI ROM. 74 @retval Others Status of stop 16 bit UNDI ROM. 72 73 @retval EFI_DEVICE_ERROR Fail to stop 16 bit UNDI ROM. 74 @retval Others Status of stop 16 bit UNDI ROM. 75 75 **/ 76 76 EFI_STATUS … … 83 83 84 84 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure. 85 86 @retval EFI_SUCCESS Sucess operation. 87 @retval Others Fail to get runtime information for Undi network interface. 85 86 @retval EFI_SUCCESS Sucess operation. 87 @retval Others Fail to get runtime information for Undi network interface. 88 88 **/ 89 89 EFI_STATUS … … 96 96 97 97 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure. 98 99 @retval EFI_SUCCESS Sucess operation. 98 99 @retval EFI_SUCCESS Sucess operation. 100 100 @retval Others Fail to get NIC type. 101 101 **/ … … 109 109 110 110 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure. 111 112 @retval EFI_SUCCESS Sucess operation. 111 112 @retval EFI_SUCCESS Sucess operation. 113 113 @retval Others Fail to get NDIS information. 114 114 **/ … … 120 120 /** 121 121 Signal handlers for ExitBootServices event. 122 123 Clean up any Real-mode UNDI residue from the system 124 122 123 Clean up any Real-mode UNDI residue from the system 124 125 125 @param Event ExitBootServices event 126 @param Context 126 @param Context 127 127 **/ 128 128 VOID … … 137 137 138 138 @param SimpleNetworkDevice A pointer to EFI_SIMPLE_NETWORK_DEV data structure. 139 139 140 140 @retval EFI_SUCCESS - Successfully loads undi driver. 141 141 @retval EFI_NOT_FOUND - Doesn't find undi driver or undi driver load failure. … … 150 150 151 151 @param SimpleNetworkDevice A pointer to EFI_SIMPLE_NETWORK_DEV data structure. 152 153 @return EFI_STATUS 152 153 @return EFI_STATUS 154 154 **/ 155 155 EFI_STATUS … … 163 163 @param ImageHandle Handle that identifies the loaded image. 164 164 @param SystemTable System Table for this image. 165 166 @return EFI_STATUS Return status from EfiLibInstallAllDriverProtocols. 165 166 @return EFI_STATUS Return status from EfiLibInstallAllDriverProtocols. 167 167 **/ 168 168 EFI_STATUS … … 192 192 @param Controller The handle of the controller to test. 193 193 @param RemainingDevicePath A pointer to the remaining portion of a device path. 194 194 195 195 @retval EFI_SUCCESS The driver supports given controller. 196 196 @retval EFI_UNSUPPORT The driver doesn't support given controller. … … 287 287 @param Controller The handle of the controller to test. 288 288 @param RemainingDevicePath A pointer to the remaining portion of a device path. 289 290 @retval EFI_SUCCESS - The device was started. 289 290 @retval EFI_SUCCESS - The device was started. 291 291 @retval EFI_DEVICE_ERROR - The device could not be started due to a device error. 292 292 @retval EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of resources. … … 507 507 // 508 508 Status = EfiCreateEventLegacyBootEx( 509 TPL_NOTIFY, 510 Undi16SimpleNetworkEvent, 511 NULL, 509 TPL_NOTIFY, 510 Undi16SimpleNetworkEvent, 511 NULL, 512 512 &SimpleNetworkDevice->LegacyBootEvent 513 513 ); 514 514 515 515 if (EFI_ERROR(Status)) { 516 516 DEBUG ((DEBUG_ERROR,"ERROR : Could not create event. Status = %r\n",Status)); … … 751 751 gBS->CloseEvent (SimpleNetworkDevice->LegacyBootEvent); 752 752 } 753 753 754 754 if (SimpleNetworkDevice->EfiBootEvent != NULL) { 755 755 gBS->CloseEvent (SimpleNetworkDevice->EfiBootEvent); … … 776 776 777 777 gBS->FreePool (SimpleNetworkDevice); 778 778 779 779 // 780 780 // Only restore the vector if it was cached. … … 820 820 Status = EFI_DEVICE_ERROR; 821 821 } 822 } 822 } 823 823 return Status; 824 824 } … … 832 832 @param ChildHandleBuffer An array of child handles to be freed. May be NULL if 833 833 NumberOfChildren is 0. 834 834 835 835 @retval EFI_SUCCESS - The device was stopped. 836 836 @retval EFI_DEVICE_ERROR - The device could not be stopped due to a device error. … … 900 900 Controller 901 901 ); 902 902 903 903 if (EFI_ERROR (Status)) { 904 904 Status = EFI_DEVICE_ERROR; … … 974 974 gBS->CloseEvent (SimpleNetworkDevice->LegacyBootEvent); 975 975 } 976 976 977 977 if (SimpleNetworkDevice->EfiBootEvent != NULL) { 978 978 gBS->CloseEvent (SimpleNetworkDevice->EfiBootEvent); … … 1022 1022 1023 1023 @param Fifo Point to trasmit FIFO structure. 1024 1024 1025 1025 @return BOOLEAN whether transmit FIFO is full. 1026 1026 **/ … … 1041 1041 1042 1042 @param Fifo Point to trasmit FIFO structure. 1043 1043 1044 1044 @return BOOLEAN whether transmit FIFO is empty. 1045 1045 **/ … … 1062 1062 @param Fifo Point to trasmit FIFO structure. 1063 1063 @param Data The data point want to be added. 1064 1065 @retval EFI_OUT_OF_RESOURCES FIFO is full 1066 @retval EFI_SUCCESS Success operation. 1064 1065 @retval EFI_OUT_OF_RESOURCES FIFO is full 1066 @retval EFI_SUCCESS Success operation. 1067 1067 **/ 1068 1068 EFI_STATUS … … 1086 1086 @param Fifo Point to trasmit FIFO structure. 1087 1087 @param Data On return, point to the data point want to be got and removed. 1088 1089 @retval EFI_OUT_OF_RESOURCES network transmit buffer is empty. 1090 @retval EFI_SUCCESS Success operation. 1088 1089 @retval EFI_OUT_OF_RESOURCES network transmit buffer is empty. 1090 @retval EFI_SUCCESS Success operation. 1091 1091 **/ 1092 1092 EFI_STATUS … … 1109 1109 1110 1110 @param ReceiveFilterSetting filter setting EFI mask value. 1111 1111 1112 1112 @return UINT16 Undi filter setting value. 1113 1113 **/ … … 1150 1150 /** 1151 1151 Get filter setting from multi cast buffer . 1152 1152 1153 1153 @param Mode Point to mode structure. 1154 @param McastBuffer The multi cast buffer 1154 @param McastBuffer The multi cast buffer 1155 1155 @param HwAddressSize Size of filter value. 1156 1156 1157 1157 **/ 1158 1158 VOID … … 1184 1184 1185 1185 @param SimpleNetworkDevice A pointer to EFI_SIMPLE_NETWORK_DEV data structure. 1186 1186 1187 1187 @retval EFI_SUCCESS - Successfully loads undi driver. 1188 1188 @retval EFI_NOT_FOUND - Doesn't find undi driver or undi driver load failure. … … 1199 1199 PCI_DATA_STRUCTURE *PciDataStructure; 1200 1200 PCI_TYPE00 Pci; 1201 1201 1202 1202 if (!mCachedInt1A) { 1203 1203 Status = CacheVectorAddress (0x1A); 1204 1204 if (!EFI_ERROR (Status)) { 1205 mCachedInt1A = TRUE; 1205 mCachedInt1A = TRUE; 1206 1206 } 1207 1207 } … … 1228 1228 1229 1229 // 1230 // If the pointer to the PCI Data Structure is invalid, no further images can be located. 1231 // The PCI Data Structure must be DWORD aligned. 1230 // If the pointer to the PCI Data Structure is invalid, no further images can be located. 1231 // The PCI Data Structure must be DWORD aligned. 1232 1232 // 1233 1233 if (PciExpansionRomHeader->PcirOffset == 0 || … … 1250 1250 1251 1251 DEBUG ( 1252 (DEBUG_INIT, 1252 (DEBUG_INIT, 1253 1253 "PCI device with matchinng VendorId and DeviceId (%d,%d)\n", 1254 1254 (UINTN) PciDataStructure->VendorId, … … 1261 1261 return EFI_SUCCESS; 1262 1262 } 1263 1263 1264 1264 // 1265 1265 // Free resources allocated in LaunchBaseCode … … 1275 1275 1276 1276 @param SimpleNetworkDevice A pointer to EFI_SIMPLE_NETWORK_DEV data structure. 1277 1278 @return EFI_STATUS 1277 1278 @return EFI_STATUS 1279 1279 **/ 1280 1280 EFI_STATUS … … 1332 1332 @param SimpleNetworkDevice A pointer to EFI_SIMPLE_NETWORK_DEV data structure. 1333 1333 @param Ax PCI address of Undi device. 1334 1335 @retval EFI_DEVICE_ERROR Fail to start 16 bit UNDI ROM. 1336 @retval Others Status of start 16 bit UNDI ROM. 1334 1335 @retval EFI_DEVICE_ERROR Fail to start 16 bit UNDI ROM. 1336 @retval Others Status of start 16 bit UNDI ROM. 1337 1337 **/ 1338 1338 EFI_STATUS … … 1377 1377 1378 1378 @param SimpleNetworkDevice A pointer to EFI_SIMPLE_NETWORK_DEV data structure. 1379 1380 @retval EFI_DEVICE_ERROR Fail to stop 16 bit UNDI ROM. 1381 @retval Others Status of stop 16 bit UNDI ROM. 1379 1380 @retval EFI_DEVICE_ERROR Fail to stop 16 bit UNDI ROM. 1381 @retval Others Status of stop 16 bit UNDI ROM. 1382 1382 **/ 1383 1383 EFI_STATUS … … 1412 1412 1413 1413 @param SimpleNetworkDevice A pointer to EFI_SIMPLE_NETWORK_DEV data structure. 1414 1415 @retval EFI_DEVICE_ERROR Fail to cleanup 16 bit UNDI ROM. 1416 @retval Others Status of cleanup 16 bit UNDI ROM. 1414 1415 @retval EFI_DEVICE_ERROR Fail to cleanup 16 bit UNDI ROM. 1416 @retval Others Status of cleanup 16 bit UNDI ROM. 1417 1417 **/ 1418 1418 EFI_STATUS … … 1447 1447 1448 1448 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure. 1449 1450 @retval EFI_SUCCESS Sucess operation. 1451 @retval Others Fail to get runtime information for Undi network interface. 1449 1450 @retval EFI_SUCCESS Sucess operation. 1451 @retval Others Fail to get runtime information for Undi network interface. 1452 1452 **/ 1453 1453 EFI_STATUS … … 1578 1578 1579 1579 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure. 1580 1581 @retval EFI_SUCCESS Sucess operation. 1580 1581 @retval EFI_SUCCESS Sucess operation. 1582 1582 @retval Others Fail to get NIC type. 1583 1583 **/ … … 1629 1629 1630 1630 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure. 1631 1632 @retval EFI_SUCCESS Sucess operation. 1631 1632 @retval EFI_SUCCESS Sucess operation. 1633 1633 @retval Others Fail to get NDIS information. 1634 1634 **/ … … 1688 1688 @param ProtType The type network transmit protocol 1689 1689 @param PktType The type of package. 1690 1691 @retval EFI_DEVICE_ERROR Fail to execute 16 bit ROM's ISR, or status is invalid. 1692 @retval EFI_SUCCESS Success operation. 1690 1691 @retval EFI_DEVICE_ERROR Fail to execute 16 bit ROM's ISR, or status is invalid. 1692 @retval EFI_SUCCESS Success operation. 1693 1693 **/ 1694 1694 EFI_STATUS … … 1903 1903 1904 1904 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure. 1905 1905 1906 1906 @retval EFI_DEVICE_ERROR Network interface has not be initialized. 1907 1907 @retval EFI_DEVICE_ERROR Fail to execute 16 bit ROM call. … … 1977 1977 1978 1978 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure. 1979 1979 1980 1980 @retval EFI_DEVICE_ERROR Network interface has not be initialized. 1981 1981 @retval EFI_DEVICE_ERROR Fail to execute 16 bit ROM call. … … 2025 2025 // 2026 2026 /** 2027 Initialize network interface 2027 Initialize network interface 2028 2028 2029 2029 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure. 2030 2030 @param ExtraRxBufferSize The size of extra request receive buffer. 2031 2031 @param ExtraTxBufferSize The size of extra request transmit buffer. 2032 2032 2033 2033 @retval EFI_DEVICE_ERROR Fail to execute 16 bit ROM call. 2034 2034 @retval EFI_SUCESS Success operation. … … 2148 2148 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure. 2149 2149 @param ExtendedVerification Need extended verfication. 2150 2150 2151 2151 @retval EFI_INVALID_PARAMETER Invalid This paramter. 2152 2152 @retval EFI_DEVICE_ERROR Network device has not been initialized. … … 2229 2229 2230 2230 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure. 2231 2231 2232 2232 @retval EFI_INVALID_PARAMETER Invalid This paramter. 2233 2233 @retval EFI_DEVICE_ERROR Network device has not been initialized. … … 2342 2342 @param MCastFilterCnt Count of mutli cast filter for different MAC address 2343 2343 @param MCastFilter Buffer for mustli cast filter for different MAC address. 2344 2344 2345 2345 @retval EFI_INVALID_PARAMETER Invalid This paramter. 2346 2346 @retval EFI_DEVICE_ERROR Network device has not been initialized. … … 2482 2482 &MCastFilter[Index], 2483 2483 sizeof (EFI_MAC_ADDRESS) 2484 ); 2484 ); 2485 2485 } 2486 2486 } … … 2499 2499 @param Reset Whether reset station MAC address to permenent address 2500 2500 @param New A pointer to New address 2501 2501 2502 2502 @retval EFI_INVALID_PARAMETER Invalid This paramter. 2503 2503 @retval EFI_DEVICE_ERROR Network device has not been initialized. … … 2853 2853 @param IP A pointer to given Ip address. 2854 2854 @param MAC On return, translated MAC address. 2855 2855 2856 2856 @retval EFI_INVALID_PARAMETER Invalid This paramter. 2857 2857 @retval EFI_INVALID_PARAMETER Invalid IP address. 2858 2858 @retval EFI_INVALID_PARAMETER Invalid return buffer for holding MAC address. 2859 @retval EFI_UNSUPPORTED Do not support IPv6 2859 @retval EFI_UNSUPPORTED Do not support IPv6 2860 2860 @retval EFI_DEVICE_ERROR Network device has not been initialized. 2861 2861 @retval EFI_NOT_STARTED Network device has been stopped. … … 2938 2938 // 2939 2939 /** 2940 Performs read and write operations on the NVRAM device attached to a 2940 Performs read and write operations on the NVRAM device attached to a 2941 2941 network interface. 2942 2942 … … 2973 2973 // 2974 2974 /** 2975 Reads the current interrupt status and recycled transmit buffer status from 2975 Reads the current interrupt status and recycled transmit buffer status from 2976 2976 a network interface. 2977 2977 … … 3090 3090 @retval EFI_SUCCESS The packet was placed on the transmit queue. 3091 3091 @retval EFI_NOT_STARTED The network interface has not been started. 3092 @retval EFI_NOT_READY The network interface is too busy to accept this transmit request. 3092 @retval EFI_NOT_READY The network interface is too busy to accept this transmit request. 3093 3093 @retval EFI_BUFFER_TOO_SMALL The BufferSize parameter is too small. 3094 3094 @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. … … 3258 3258 /** 3259 3259 Receives a packet from a network interface. 3260 3260 3261 3261 @param This The protocol instance pointer. 3262 3262 @param HeaderSize The size, in bytes, of the media header received on the network … … 3378 3378 @param Event Event used with WaitForEvent() to wait for a packet to be received. 3379 3379 @param Context Event Context 3380 3380 3381 3381 **/ 3382 3382 VOID … … 3402 3402 3403 3403 @param This The protocol instance pointer. 3404 3404 3405 3405 @retval EFI_SUCCESS Receive data is ready. 3406 3406 @retval EFI_NOT_STARTED The network interface has not been started. … … 3467 3467 /** 3468 3468 Signal handlers for ExitBootServices event. 3469 3470 Clean up any Real-mode UNDI residue from the system 3471 3469 3470 Clean up any Real-mode UNDI residue from the system 3471 3472 3472 @param Event ExitBootServices event 3473 @param Context 3473 @param Context 3474 3474 **/ 3475 3475 VOID … … 3495 3495 @param NumPages The number pages want to be allocated. 3496 3496 @param Buffer On return, allocated buffer. 3497 3497 3498 3498 @return Status of allocating pages. 3499 3499 **/ -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/BiosSnp16.h
r48674 r58466 120 120 @param Controller The handle of the controller to test. 121 121 @param RemainingDevicePath A pointer to the remaining portion of a device path. 122 122 123 123 @retval EFI_SUCCESS The driver supports given controller. 124 124 @retval EFI_UNSUPPORT The driver doesn't support given controller. … … 141 141 @param Controller The handle of the controller to test. 142 142 @param RemainingDevicePath A pointer to the remaining portion of a device path. 143 144 @retval EFI_SUCCESS - The device was started. 143 144 @retval EFI_SUCCESS - The device was started. 145 145 @retval EFI_DEVICE_ERROR - The device could not be started due to a device error. 146 146 @retval EFI_OUT_OF_RESOURCES - The request could not be completed due to a lack of resources. … … 163 163 @param ChildHandleBuffer An array of child handles to be freed. May be NULL if 164 164 NumberOfChildren is 0. 165 165 166 166 @retval EFI_SUCCESS - The device was stopped. 167 167 @retval EFI_DEVICE_ERROR - The device could not be stopped due to a device error. … … 184 184 185 185 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure. 186 186 187 187 @retval EFI_DEVICE_ERROR Network interface has not be initialized. 188 188 @retval EFI_DEVICE_ERROR Fail to execute 16 bit ROM call. … … 200 200 201 201 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure. 202 202 203 203 @retval EFI_DEVICE_ERROR Network interface has not be initialized. 204 204 @retval EFI_DEVICE_ERROR Fail to execute 16 bit ROM call. … … 213 213 214 214 /** 215 Initialize network interface 215 Initialize network interface 216 216 217 217 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure. 218 218 @param ExtraRxBufferSize The size of extra request receive buffer. 219 219 @param ExtraTxBufferSize The size of extra request transmit buffer. 220 220 221 221 @retval EFI_DEVICE_ERROR Fail to execute 16 bit ROM call. 222 222 @retval EFI_SUCESS Success operation. … … 236 236 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure. 237 237 @param ExtendedVerification Need extended verfication. 238 238 239 239 @retval EFI_INVALID_PARAMETER Invalid This paramter. 240 240 @retval EFI_DEVICE_ERROR Network device has not been initialized. … … 255 255 256 256 @param This A pointer to EFI_SIMPLE_NETWORK_PROTOCOL structure. 257 257 258 258 @retval EFI_INVALID_PARAMETER Invalid This paramter. 259 259 @retval EFI_DEVICE_ERROR Network device has not been initialized. … … 278 278 @param MCastFilterCnt Count of mutli cast filter for different MAC address 279 279 @param MCastFilter Buffer for mustli cast filter for different MAC address. 280 280 281 281 @retval EFI_INVALID_PARAMETER Invalid This paramter. 282 282 @retval EFI_DEVICE_ERROR Network device has not been initialized. … … 303 303 @param Reset Whether reset station MAC address to permenent address 304 304 @param New A pointer to New address 305 305 306 306 @retval EFI_INVALID_PARAMETER Invalid This paramter. 307 307 @retval EFI_DEVICE_ERROR Network device has not been initialized. … … 326 326 @param StatisticsSize The buffer of statistics table. 327 327 @param StatisticsTable A pointer to statistics buffer. 328 328 329 329 @retval EFI_INVALID_PARAMETER Invalid This paramter. 330 330 @retval EFI_DEVICE_ERROR Network device has not been initialized. … … 350 350 @param IP A pointer to given Ip address. 351 351 @param MAC On return, translated MAC address. 352 352 353 353 @retval EFI_INVALID_PARAMETER Invalid This paramter. 354 354 @retval EFI_INVALID_PARAMETER Invalid IP address. 355 355 @retval EFI_INVALID_PARAMETER Invalid return buffer for holding MAC address. 356 @retval EFI_UNSUPPORTED Do not support IPv6 356 @retval EFI_UNSUPPORTED Do not support IPv6 357 357 @retval EFI_DEVICE_ERROR Network device has not been initialized. 358 358 @retval EFI_NOT_STARTED Network device has been stopped. … … 371 371 372 372 /** 373 Performs read and write operations on the NVRAM device attached to a 373 Performs read and write operations on the NVRAM device attached to a 374 374 network interface. 375 375 … … 402 402 403 403 /** 404 Reads the current interrupt status and recycled transmit buffer status from 404 Reads the current interrupt status and recycled transmit buffer status from 405 405 a network interface. 406 406 … … 461 461 @retval EFI_SUCCESS The packet was placed on the transmit queue. 462 462 @retval EFI_NOT_STARTED The network interface has not been started. 463 @retval EFI_NOT_READY The network interface is too busy to accept this transmit request. 463 @retval EFI_NOT_READY The network interface is too busy to accept this transmit request. 464 464 @retval EFI_BUFFER_TOO_SMALL The BufferSize parameter is too small. 465 465 @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. … … 531 531 @param Event Event used with WaitForEvent() to wait for a packet to be received. 532 532 @param Context Event Context 533 533 534 534 **/ 535 535 VOID … … 545 545 546 546 @param This The protocol instance pointer. 547 547 548 548 @retval EFI_SUCCESS Receive data is ready. 549 549 @retval EFI_NOT_STARTED The network interface has not been started. … … 565 565 566 566 @param VectorNumber IVT number 567 567 568 568 @retval EFI_SUCCESS Success to operation. 569 569 **/ … … 575 575 576 576 /** 577 Get interrupt vector address according to IVT number. 578 577 Get interrupt vector address according to IVT number. 578 579 579 @param VectorNumber Given IVT number 580 580 581 581 @return cached interrupt vector address. 582 582 **/ … … 591 591 This should install the !PXE and PXENV+ structures in memory for 592 592 subsequent use. 593 593 594 594 595 595 @param SimpleNetworkDevice Simple network device instance 596 596 @param RomAddress The ROM base address for NIC rom. 597 598 @retval EFI_NOT_FOUND The check sum does not match 599 @retval EFI_NOT_FOUND Rom ID offset is wrong 600 @retval EFI_NOT_FOUND No Rom ID structure is found 597 598 @retval EFI_NOT_FOUND The check sum does not match 599 @retval EFI_NOT_FOUND Rom ID offset is wrong 600 @retval EFI_NOT_FOUND No Rom ID structure is found 601 601 **/ 602 602 EFI_STATUS … … 608 608 609 609 /** 610 PXE 610 PXE 611 611 START UNDI 612 612 Op-Code: PXENV_START_UNDI (0000h) … … 637 637 [BBS] specifications. 638 638 Returned from API service 639 Status: See the PXENV_STATUS_xxx constants. 640 641 @param SimpleNetworkDevice Device instance 642 @param PxeUndiTable Point to structure which hold paramter and return value 643 for option ROM call. 644 645 @return Return value of PXE option ROM far call. 639 Status: See the PXENV_STATUS_xxx constants. 640 641 @param SimpleNetworkDevice Device instance 642 @param PxeUndiTable Point to structure which hold paramter and return value 643 for option ROM call. 644 645 @return Return value of PXE option ROM far call. 646 646 **/ 647 647 EFI_STATUS … … 653 653 654 654 /** 655 PXE 656 UNDI STARTUP 655 PXE 656 UNDI STARTUP 657 657 Op-Code: PXENV_UNDI_STARTUP (0001h) 658 658 Input: Far pointer to a PXENV_UNDI_STARTUP_T parameter structure that has been initialized by the … … 671 671 PXENV_STOP_UNDI API calls. 672 672 This service cannot be used in protected mode. 673 typedef struct 673 typedef struct 674 674 { 675 675 PXENV_STATUS Status; … … 681 681 682 682 @param SimpleNetworkDevice Device instance 683 @param PxeUndiTable Point to structure which hold paramter and return value 684 for option ROM call. 685 686 @return Return value of PXE option ROM far call. 683 @param PxeUndiTable Point to structure which hold paramter and return value 684 for option ROM call. 685 686 @return Return value of PXE option ROM far call. 687 687 **/ 688 688 EFI_STATUS … … 694 694 695 695 /** 696 PXE 696 PXE 697 697 UNDI CLEANUP 698 698 Op-Code: PXENV_UNDI_CLEANUP (0002h) … … 714 714 715 715 @param SimpleNetworkDevice Device instance 716 @param PxeUndiTable Point to structure which hold paramter and return value 717 for option ROM call. 718 719 @return Return value of PXE option ROM far call. 716 @param PxeUndiTable Point to structure which hold paramter and return value 717 for option ROM call. 718 719 @return Return value of PXE option ROM far call. 720 720 **/ 721 721 EFI_STATUS … … 727 727 728 728 /** 729 PXE 729 PXE 730 730 UNDI INITIALIZE 731 731 Op-Code: PXENV_UNDI_INITIALIZE (0003h) … … 757 757 other application interfacing to the universal NIC driver 758 758 Returned from API service 759 Status: See the PXENV_STATUS_xxx constants. 760 759 Status: See the PXENV_STATUS_xxx constants. 760 761 761 @param SimpleNetworkDevice Device instance. 762 @param PxeUndiTable Point to structure which hold paramter and return value 763 for option ROM call. 764 765 @return Return value of PXE option ROM far call. 762 @param PxeUndiTable Point to structure which hold paramter and return value 763 for option ROM call. 764 765 @return Return value of PXE option ROM far call. 766 766 **/ 767 767 EFI_STATUS … … 774 774 /** 775 775 Wrapper routine for reset adapter. 776 777 PXE 776 777 PXE 778 778 UNDI RESET ADAPTER 779 779 Op-Code: PXENV_UNDI_RESET_ADAPTER (0004h) … … 807 807 Returned from API service 808 808 Status: See the PXENV_STATUS_xxx constants. 809 809 810 810 @param SimpleNetworkDevice Device instance. 811 @param PxeUndiTable Point to structure which hold paramter and return value 812 for option ROM call. 813 @param RxFilter Filter setting mask value for PXE recive . 814 815 @return Return value of PXE option ROM far call. 811 @param PxeUndiTable Point to structure which hold paramter and return value 812 for option ROM call. 813 @param RxFilter Filter setting mask value for PXE recive . 814 815 @return Return value of PXE option ROM far call. 816 816 **/ 817 817 EFI_STATUS … … 824 824 825 825 /** 826 PXE 826 PXE 827 827 UNDI SHUTDOWN 828 828 Op-Code: PXENV_UNDI_SHUTDOWN (0005h) … … 834 834 Note: The contents of the PXENV_UNDI_STARTUP parameter structure need to be saved by the 835 835 Universal NIC Driver in case PXENV_UNDI_INITIALIZE is called again. 836 typedef struct 836 typedef struct 837 837 { 838 838 PXENV_STATUS Status; … … 842 842 Returned from API service 843 843 Status: See the PXENV_STATUS_xxx constants. 844 845 @param SimpleNetworkDevice Device instance 846 @param PxeUndiTable Point to structure which hold paramter and return value 847 for option ROM call. 848 849 @return Return value of PXE option ROM far call. 844 845 @param SimpleNetworkDevice Device instance 846 @param PxeUndiTable Point to structure which hold paramter and return value 847 for option ROM call. 848 849 @return Return value of PXE option ROM far call. 850 850 **/ 851 851 EFI_STATUS … … 857 857 858 858 /** 859 PXE 859 PXE 860 860 UNDI OPEN 861 861 Op-Code: PXENV_UNDI_OPEN (0006h) … … 889 889 Returned from API service 890 890 Status: See the PXENV_STATUS_xxx constants. 891 892 @param SimpleNetworkDevice Device instance 893 @param PxeUndiTable Point to structure which hold paramter and return value 894 for option ROM call. 895 896 @return Return value of PXE option ROM far call. 891 892 @param SimpleNetworkDevice Device instance 893 @param PxeUndiTable Point to structure which hold paramter and return value 894 for option ROM call. 895 896 @return Return value of PXE option ROM far call. 897 897 **/ 898 898 EFI_STATUS … … 904 904 905 905 /** 906 PXE 906 PXE 907 907 UNDI CLOSE 908 908 Op-Code: PXENV_UNDI_CLOSE (0007h) … … 920 920 Returned from API service 921 921 Status: See the PXENV_STATUS_xxx constants. 922 923 @param SimpleNetworkDevice Device instance 924 @param PxeUndiTable Point to structure which hold paramter and return value 925 for option ROM call. 926 927 @return Return value of PXE option ROM far call. 922 923 @param SimpleNetworkDevice Device instance 924 @param PxeUndiTable Point to structure which hold paramter and return value 925 for option ROM call. 926 927 @return Return value of PXE option ROM far call. 928 928 **/ 929 929 EFI_STATUS … … 935 935 936 936 /** 937 PXE 937 PXE 938 938 UNDI TRANSMIT PACKET 939 939 Op-Code: PXENV_UNDI_TRANSMIT (0008h) … … 1005 1005 DataBlock: Array of transmit data blocks. 1006 1006 Returned from API service 1007 Status: See the PXENV_STATUS_xxx constants 1008 1009 @param SimpleNetworkDevice Device instance 1010 @param PxeUndiTable Point to structure which hold paramter and return value 1011 for option ROM call. 1012 1013 @return Return value of PXE option ROM far call. 1007 Status: See the PXENV_STATUS_xxx constants 1008 1009 @param SimpleNetworkDevice Device instance 1010 @param PxeUndiTable Point to structure which hold paramter and return value 1011 for option ROM call. 1012 1013 @return Return value of PXE option ROM far call. 1014 1014 **/ 1015 1015 EFI_STATUS … … 1021 1021 1022 1022 /** 1023 PXE 1023 PXE 1024 1024 UNDI SET MULTICAST ADDRESS 1025 1025 Op-Code: PXENV_UNDI_SET_MCAST_ADDRESS (0009h) … … 1039 1039 (0004h) API. 1040 1040 Returned from API service 1041 Status: See the PXENV_STATUS_xxx constants 1042 1043 @param SimpleNetworkDevice Device instance 1044 @param PxeUndiTable Point to structure which hold paramter and return value 1045 for option ROM call. 1046 1047 @return Return value of PXE option ROM far call. 1041 Status: See the PXENV_STATUS_xxx constants 1042 1043 @param SimpleNetworkDevice Device instance 1044 @param PxeUndiTable Point to structure which hold paramter and return value 1045 for option ROM call. 1046 1047 @return Return value of PXE option ROM far call. 1048 1048 **/ 1049 1049 EFI_STATUS … … 1055 1055 1056 1056 /** 1057 PXE 1057 PXE 1058 1058 UNDI SET STATION ADDRESS 1059 1059 Op-Code: PXENV_UNDI_SET_STATION_ADDRESS (000Ah) … … 1074 1074 transmit and receive. 1075 1075 Returned from API service 1076 Status: See the PXENV_STATUS_xxx constants. 1077 1078 @param SimpleNetworkDevice Device instance 1079 @param PxeUndiTable Point to structure which hold paramter and return value 1080 for option ROM call. 1081 1082 @return Return value of PXE option ROM far call. 1076 Status: See the PXENV_STATUS_xxx constants. 1077 1078 @param SimpleNetworkDevice Device instance 1079 @param PxeUndiTable Point to structure which hold paramter and return value 1080 for option ROM call. 1081 1082 @return Return value of PXE option ROM far call. 1083 1083 **/ 1084 1084 EFI_STATUS … … 1090 1090 1091 1091 /** 1092 PXE 1092 PXE 1093 1093 UNDI SET PACKET FILTER 1094 1094 Op-Code: PXENV_UNDI_SET_PACKET_FILTER (000Bh) … … 1108 1108 (0006h) API description. 1109 1109 Returned from API service 1110 Status: See the PXENV_STATUS_xxx constants. 1111 1112 @param SimpleNetworkDevice Device instance 1113 @param PxeUndiTable Point to structure which hold paramter and return value 1114 for option ROM call. 1115 1116 @return Return value of PXE option ROM far call. 1110 Status: See the PXENV_STATUS_xxx constants. 1111 1112 @param SimpleNetworkDevice Device instance 1113 @param PxeUndiTable Point to structure which hold paramter and return value 1114 for option ROM call. 1115 1116 @return Return value of PXE option ROM far call. 1117 1117 **/ 1118 1118 EFI_STATUS … … 1124 1124 1125 1125 /** 1126 PXE 1126 PXE 1127 1127 UNDI GET INFORMATION 1128 1128 Op-Code: PXENV_UNDI_GET_INFORMATION (000Ch) … … 1167 1167 ROMAddress: Real mode ROM segment address. 1168 1168 RxBufCnt: Receive queue length. 1169 TxBufCnt: Transmit queue length. 1170 1171 @param SimpleNetworkDevice Device instance 1172 @param PxeUndiTable Point to structure which hold paramter and return value 1173 for option ROM call. 1174 1175 @return Return value of PXE option ROM far call. 1169 TxBufCnt: Transmit queue length. 1170 1171 @param SimpleNetworkDevice Device instance 1172 @param PxeUndiTable Point to structure which hold paramter and return value 1173 for option ROM call. 1174 1175 @return Return value of PXE option ROM far call. 1176 1176 **/ 1177 1177 EFI_STATUS … … 1183 1183 1184 1184 /** 1185 PXE 1185 PXE 1186 1186 UNDI GET STATISTICS 1187 1187 Op-Code: PXENV_UNDI_GET_STATISTICS (000Dh) … … 1209 1209 RcvResourceErrors: Number of frames discarded 1210 1210 because receive queue was full. 1211 1212 @param SimpleNetworkDevice Device instance 1213 @param PxeUndiTable Point to structure which hold paramter and return value 1214 for option ROM call. 1215 1216 @return Return value of PXE option ROM far call. 1211 1212 @param SimpleNetworkDevice Device instance 1213 @param PxeUndiTable Point to structure which hold paramter and return value 1214 for option ROM call. 1215 1216 @return Return value of PXE option ROM far call. 1217 1217 **/ 1218 1218 EFI_STATUS … … 1224 1224 1225 1225 /** 1226 PXE 1226 PXE 1227 1227 UNDI CLEAR STATISTICS 1228 1228 Op-Code: PXENV_UNDI_CLEAR_STATISTICS (000Eh) … … 1239 1239 Returned from API service 1240 1240 Status: See the PXENV_STATUS_xxx constants. 1241 1242 @param SimpleNetworkDevice Device instance 1243 @param PxeUndiTable Point to structure which hold paramter and return value 1244 for option ROM call. 1245 1246 @return Return value of PXE option ROM far call. 1241 1242 @param SimpleNetworkDevice Device instance 1243 @param PxeUndiTable Point to structure which hold paramter and return value 1244 for option ROM call. 1245 1246 @return Return value of PXE option ROM far call. 1247 1247 **/ 1248 1248 EFI_STATUS … … 1254 1254 1255 1255 /** 1256 PXE 1256 PXE 1257 1257 UNDI INITIATE DIAGS 1258 1258 Op-Code: PXENV_UNDI_INITIATE_DIAGS (000Fh) … … 1269 1269 N/A 1270 1270 Returned from API service 1271 Status: See the PXENV_STATUS_xxx constants. 1272 1273 @param SimpleNetworkDevice Device instance 1274 @param PxeUndiTable Point to structure which hold paramter and return value 1275 for option ROM call. 1276 1277 @return Return value of PXE option ROM far call. 1271 Status: See the PXENV_STATUS_xxx constants. 1272 1273 @param SimpleNetworkDevice Device instance 1274 @param PxeUndiTable Point to structure which hold paramter and return value 1275 for option ROM call. 1276 1277 @return Return value of PXE option ROM far call. 1278 1278 **/ 1279 1279 EFI_STATUS … … 1285 1285 1286 1286 /** 1287 PXE 1287 PXE 1288 1288 UNDI FORCE INTERRUPT 1289 1289 Op-Code: PXENV_UNDI_FORCE_INTERRUPT (0010h) … … 1306 1306 N/A 1307 1307 Returned from API service 1308 Status: See the PXENV_STATUS_xxx constants. 1309 1310 @param SimpleNetworkDevice Device instance 1311 @param PxeUndiTable Point to structure which hold paramter and return value 1312 for option ROM call. 1313 1314 @return Return value of PXE option ROM far call. 1308 Status: See the PXENV_STATUS_xxx constants. 1309 1310 @param SimpleNetworkDevice Device instance 1311 @param PxeUndiTable Point to structure which hold paramter and return value 1312 for option ROM call. 1313 1314 @return Return value of PXE option ROM far call. 1315 1315 **/ 1316 1316 EFI_STATUS … … 1322 1322 1323 1323 /** 1324 PXE 1324 PXE 1325 1325 UNDI GET MULTICAST ADDRESS 1326 1326 Op-Code: PXENV_UNDI_GET_MCAST_ADDRESS (0011h) … … 1341 1341 Status: See the PXENV_STATUS_xxx constants. 1342 1342 MediaAddr: MAC multicast address. 1343 1344 @param SimpleNetworkDevice Device instance 1345 @param PxeUndiTable Point to structure which hold paramter and return value 1346 for option ROM call. 1347 1348 @return Return value of PXE option ROM far call. 1343 1344 @param SimpleNetworkDevice Device instance 1345 @param PxeUndiTable Point to structure which hold paramter and return value 1346 for option ROM call. 1347 1348 @return Return value of PXE option ROM far call. 1349 1349 **/ 1350 1350 EFI_STATUS … … 1356 1356 1357 1357 /** 1358 PXE 1358 PXE 1359 1359 UNDI GET NIC TYPE 1360 1360 Op-Code: PXENV_UNDI_GET_NIC_TYPE (0012h) … … 1406 1406 structure. 1407 1407 Info: Information about the fields in this union can be found 1408 in the [PnP] and [PCI] specifications 1409 1410 @param SimpleNetworkDevice Device instance 1411 @param PxeUndiTable Point to structure which hold paramter and return value 1412 for option ROM call. 1413 1414 @return Return value of PXE option ROM far call. 1408 in the [PnP] and [PCI] specifications 1409 1410 @param SimpleNetworkDevice Device instance 1411 @param PxeUndiTable Point to structure which hold paramter and return value 1412 for option ROM call. 1413 1414 @return Return value of PXE option ROM far call. 1415 1415 **/ 1416 1416 EFI_STATUS … … 1422 1422 1423 1423 /** 1424 PXE 1424 PXE 1425 1425 UNDI GET IFACE INFO 1426 1426 Op-Code: PXENV_UNDI_GET_IFACE_INFO (0013h) … … 1455 1455 LinkSpeed: Defined in the NDIS 2.0 specification. 1456 1456 ServiceFlags: Defined in the NDIS 2.0 specification. 1457 Reserved: Must be zero. 1458 1459 @param SimpleNetworkDevice Device instance 1460 @param PxeUndiTable Point to structure which hold paramter and return value 1461 for option ROM call. 1462 1463 @return Return value of PXE option ROM far call. 1457 Reserved: Must be zero. 1458 1459 @param SimpleNetworkDevice Device instance 1460 @param PxeUndiTable Point to structure which hold paramter and return value 1461 for option ROM call. 1462 1463 @return Return value of PXE option ROM far call. 1464 1464 **/ 1465 1465 EFI_STATUS … … 1471 1471 1472 1472 /** 1473 PXE 1473 PXE 1474 1474 UNDI ISR 1475 1475 Op-Code: PXENV_UNDI_ISR (0014h) … … 1513 1513 NETWORK INTERFACE level and returns PXENV_UNDI_ISR_OUT_DONE in the FuncFlag. 1514 1514 IMPORTANT: It is possible for the protocol driver to be interrupted again while in the 1515 strategy routine when the UNDI re-enables interrupts. 1516 1517 @param SimpleNetworkDevice Device instance 1518 @param PxeUndiTable Point to structure which hold paramter and return value 1519 for option ROM call. 1520 1521 @return Return value of PXE option ROM far call. 1515 strategy routine when the UNDI re-enables interrupts. 1516 1517 @param SimpleNetworkDevice Device instance 1518 @param PxeUndiTable Point to structure which hold paramter and return value 1519 for option ROM call. 1520 1521 @return Return value of PXE option ROM far call. 1522 1522 **/ 1523 1523 EFI_STATUS … … 1529 1529 1530 1530 /** 1531 PXE 1531 PXE 1532 1532 STOP UNDI 1533 1533 Op-Code: PXENV_STOP_UNDI (0015h) … … 1548 1548 N/A 1549 1549 Returned from API service 1550 Status: See the PXENV_STATUS_xxx constants. 1551 1552 @param SimpleNetworkDevice Device instance 1553 @param PxeUndiTable Point to structure which hold paramter and return value 1554 for option ROM call. 1555 1556 @return Return value of PXE option ROM far call. 1550 Status: See the PXENV_STATUS_xxx constants. 1551 1552 @param SimpleNetworkDevice Device instance 1553 @param PxeUndiTable Point to structure which hold paramter and return value 1554 for option ROM call. 1555 1556 @return Return value of PXE option ROM far call. 1557 1557 **/ 1558 1558 EFI_STATUS … … 1564 1564 1565 1565 /** 1566 PXE 1566 PXE 1567 1567 UNDI GET STATE 1568 1568 Op-Code: PXENV_UNDI_GET_STATE (0015h) … … 1596 1596 Description: This API function will be called at different levels of processing the interrupt. The FuncFlag field in 1597 1597 the parameter block indicates the operation to be performed for the call. This field is filled with the 1598 status of that operation on return. 1599 1600 @param SimpleNetworkDevice Device instance 1601 @param PxeUndiTable Point to structure which hold paramter and return value 1602 for option ROM call. 1603 1604 @return Return value of PXE option ROM far call. 1598 status of that operation on return. 1599 1600 @param SimpleNetworkDevice Device instance 1601 @param PxeUndiTable Point to structure which hold paramter and return value 1602 for option ROM call. 1603 1604 @return Return value of PXE option ROM far call. 1605 1605 **/ 1606 1606 EFI_STATUS … … 1620 1620 push Index ;UINT16 is pushed onto stack. 1621 1621 call dword ptr (s_PXE ptr es:[di]).EntryPointSP 1622 add sp, 6 ;Caller cleans up stack. 1622 add sp, 6 ;Caller cleans up stack. 1623 1623 1624 1624 @param SimpleNetworkDevice Device instance for simple network … … 1626 1626 @param TableSize The size of paramter/return value table 1627 1627 @param CallIndex The index of legacy call. 1628 1629 @return EFI_STATUS 1628 1629 @return EFI_STATUS 1630 1630 **/ 1631 1631 EFI_STATUS … … 1643 1643 @param NumPages The number pages want to be allocated. 1644 1644 @param Buffer On return, allocated buffer. 1645 1645 1646 1646 @return Status of allocating pages. 1647 1647 **/ -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/Misc.c
r58459 r58466 1 1 /** @file 2 2 Helper Routines that use a PXE-enabled NIC option ROM. 3 3 4 4 Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 … … 40 40 41 41 @param VectorNumber IVT number 42 42 43 43 @retval EFI_SUCCESS Success to operation. 44 44 **/ … … 56 56 57 57 /** 58 Get interrupt vector address according to IVT number. 59 58 Get interrupt vector address according to IVT number. 59 60 60 @param VectorNumber Given IVT number 61 61 62 62 @return cached interrupt vector address. 63 63 **/ … … 75 75 76 76 /** 77 Print Undi loader table. 78 79 @param UndiLoaderStructure Point to Undi Loader table structure. 80 77 Print Undi loader table. 78 79 @param UndiLoaderStructure Point to Undi Loader table structure. 80 81 81 **/ 82 82 VOID … … 109 109 Simple table dumper. The ROMID table is necessary in order to effect 110 110 the "Early UNDI" trick. Herein, the UNDI layer can be loaded in the 111 pre-boot phase without having to download a Network Boot Program 111 pre-boot phase without having to download a Network Boot Program 112 112 across the wire. It is required in the implementation in that we 113 113 are not using PXE. 114 114 115 115 @param RomIDStructure Point to RomID structure. 116 116 117 117 **/ 118 118 VOID … … 200 200 201 201 @param PxeTable Point to PXE table structure 202 202 203 203 **/ 204 204 VOID … … 352 352 353 353 @param PxenvTable Point to PXENV 354 354 355 355 **/ 356 356 VOID … … 426 426 This should install the !PXE and PXENV+ structures in memory for 427 427 subsequent use. 428 428 429 429 430 430 @param SimpleNetworkDevice Simple network device instance 431 431 @param RomAddress The ROM base address for NIC rom. 432 433 @retval EFI_NOT_FOUND The check sum does not match 434 @retval EFI_NOT_FOUND Rom ID offset is wrong 435 @retval EFI_NOT_FOUND No Rom ID structure is found 432 433 @retval EFI_NOT_FOUND The check sum does not match 434 @retval EFI_NOT_FOUND Rom ID offset is wrong 435 @retval EFI_NOT_FOUND No Rom ID structure is found 436 436 **/ 437 437 EFI_STATUS … … 820 820 push Index ;UINT16 is pushed onto stack. 821 821 call dword ptr (s_PXE ptr es:[di]).EntryPointSP 822 add sp, 6 ;Caller cleans up stack. 822 add sp, 6 ;Caller cleans up stack. 823 823 824 824 @param SimpleNetworkDevice Device instance for simple network … … 826 826 @param TableSize The size of paramter/return value table 827 827 @param CallIndex The index of legacy call. 828 829 @return EFI_STATUS 828 829 @return EFI_STATUS 830 830 **/ 831 831 EFI_STATUS -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/Pxe.h
r48674 r58466 3 3 4 4 This file relies upon the existence of a PXE-compliant ROM 5 in memory, as defined by the Preboot Execution Environment 5 in memory, as defined by the Preboot Execution Environment 6 6 Specification (PXE), Version 2.1, located at 7 7 … … 70 70 // 71 71 // Status codes returned in the status word of PXENV API parameter structures. 72 // 72 // 73 73 // Generic API errors - these do not match up with the M0x or E0x messages 74 74 // that are reported by the loader. … … 93 93 /* Driver errors (0x60 to 0x6F) */ 94 94 95 // These errors are for UNDI compatible NIC drivers. 95 // These errors are for UNDI compatible NIC drivers. 96 96 #define PXENV_STATUS_UNDI_INVALID_FUNCTION 0x60 97 97 #define PXENV_STATUS_UNDI_MEDIATEST_FAILED 0x61 … … 261 261 #define ADDR_LEN 16 262 262 #define MAXNUM_MCADDR 8 263 #define IPLEN 4 ///< length of an IP address 263 #define IPLEN 4 ///< length of an IP address 264 264 #define XMT_DESTADDR 0x0000 ///< destination address given 265 265 #define XMT_BROADCAST 0x0001 ///< use broadcast address … … 289 289 IN UINT16 Bx; ///< filled in with the same data 290 290 IN UINT16 Dx; ///< that was passed to the MLID 291 IN UINT16 Di; ///< option ROM boot code by the 291 IN UINT16 Di; ///< option ROM boot code by the 292 292 IN UINT16 Es; ///< system BIOS. 293 293 } PXENV_START_UNDI_T; … … 303 303 typedef struct { 304 304 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 305 305 306 306 /// 307 307 /// This is an input parameter and is a 32-bit physical address of … … 316 316 /// interfacing to the Universal NIC Driver. 317 317 /// 318 IN UINT32 ProtocolIni; 318 IN UINT32 ProtocolIni; 319 319 UINT8 Reserved[8]; 320 320 } PXENV_UNDI_INITIALIZE_T; … … 330 330 addresses provided in any call. So the application must 331 331 provide the multicast address list with all the calls that 332 reset the receive unit of the adapter. 332 reset the receive unit of the adapter. 333 333 --*/ 334 334 typedef struct { 335 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 335 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 336 336 } PXENV_UNDI_SHUTDOWN_T; 337 337 338 338 typedef struct { 339 339 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 340 340 341 341 /// 342 342 /// This is an input parameter and is adapter specific. This is 343 343 /// supported for Universal NDIS 2.0 driver to pass down the Open 344 344 /// flags provided by the protocol driver (See NDIS 2.0 345 /// specifications). This can be zero. 346 /// 347 IN UINT16 OpenFlag; ///< In: See description below 348 IN UINT16 PktFilter; ///< In: Filter for receiving 345 /// specifications). This can be zero. 346 /// 347 IN UINT16 OpenFlag; ///< In: See description below 348 IN UINT16 PktFilter; ///< In: Filter for receiving 349 349 350 350 /* packet. It takes the following */ … … 356 356 #define FLTR_BRDCST 0x0002 ///< broadcast packets 357 357 #define FLTR_PRMSCS 0x0004 ///< any packet on LAN 358 #define FLTR_SRC_RTG 0x0008 ///< source routing packet 358 #define FLTR_SRC_RTG 0x0008 ///< source routing packet 359 359 IN PXENV_UNDI_MCAST_ADDR_T McastBuffer; /* In: */ 360 360 /* See t_PXENV_UNDI_MCAST_ADDR. */ … … 371 371 372 372 /* bytes. */ 373 UINT16 XmitOffset; ///< 16-bit segment & offset of the 374 UINT16 XmitSegment; ///< immediate data buffer. 375 UINT16 DataBlkCount; ///< In: Number of data blocks. 373 UINT16 XmitOffset; ///< 16-bit segment & offset of the 374 UINT16 XmitSegment; ///< immediate data buffer. 375 UINT16 DataBlkCount; ///< In: Number of data blocks. 376 376 struct DataBlk { 377 UINT8 TDPtrType; ///< 0 => 32 bit Phys pointer in TDDataPtr, not supported in this version of LSA 377 UINT8 TDPtrType; ///< 0 => 32 bit Phys pointer in TDDataPtr, not supported in this version of LSA 378 378 ///< 1 => seg:offser in TDDataPtr which can be a real mode or 16-bit protected mode pointer 379 UINT8 TDRsvdByte; ///< Reserved, must be zero. 380 UINT16 TDDataLen; ///< Data block length in bytes. 381 UINT16 TDDataPtrOffset; ///< Far pointer to data buffer. 382 UINT16 TDDataPtrSegment; ///< Far pointer to data buffer. 379 UINT8 TDRsvdByte; ///< Reserved, must be zero. 380 UINT16 TDDataLen; ///< Data block length in bytes. 381 UINT16 TDDataPtrOffset; ///< Far pointer to data buffer. 382 UINT16 TDDataPtrSegment; ///< Far pointer to data buffer. 383 383 } DataBlock[MAX_DATA_BLKS]; 384 384 } … … 386 386 387 387 typedef struct { 388 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 388 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 389 389 390 390 /// … … 404 404 /// the NIC driver fills the broadcast address for the 405 405 /// destination. 406 /// 407 IN UINT8 XmitFlag; 408 #define XMT_DESTADDR 0x0000 ///< destination address given 406 /// 407 IN UINT8 XmitFlag; 408 #define XMT_DESTADDR 0x0000 ///< destination address given 409 409 #define XMT_BROADCAST 0x0001 ///< use broadcast address 410 410 … … 416 416 /// (with Address Resolution Protocol) and NIC driver does not do 417 417 /// any address resolution. 418 /// 418 /// 419 419 IN UINT16 DestAddrOffset; ///< 16-bit segment & offset of the 420 420 IN UINT16 DestAddrSegment; ///< destination media address 421 421 422 423 IN UINT16 TBDOffset; ///< 16-bit segment & offset of the 424 IN UINT16 TBDSegment; ///< transmit buffer descriptor of type 425 426 /// XmitBufferDesc 422 423 IN UINT16 TBDOffset; ///< 16-bit segment & offset of the 424 IN UINT16 TBDSegment; ///< transmit buffer descriptor of type 425 426 /// XmitBufferDesc 427 427 IN UINT32 Reserved[2]; 428 428 } PXENV_UNDI_TRANSMIT_T; … … 430 430 431 431 typedef struct { 432 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 433 IN PXENV_UNDI_MCAST_ADDR_T McastBuffer; ///< In: 432 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 433 IN PXENV_UNDI_MCAST_ADDR_T McastBuffer; ///< In: 434 434 } PXENV_UNDI_SET_MCAST_ADDR_T; 435 435 436 436 typedef struct { 437 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 438 IN UINT8 StationAddress[ADDR_LEN]; ///< new address to be set 437 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 438 IN UINT8 StationAddress[ADDR_LEN]; ///< new address to be set 439 439 } PXENV_UNDI_SET_STATION_ADDR_T; 440 440 441 441 typedef struct s_PXENV_UNDI_SET_PACKET_FILTER { 442 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 443 IN UINT8 Filter; ///< In: Receive filter value. 442 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 443 IN UINT8 Filter; ///< In: Receive filter value. 444 444 } PXENV_UNDI_SET_PACKET_FILTER_T; 445 445 446 446 typedef struct { 447 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 448 OUT UINT16 BaseIo; ///< Out: Adapter's Base IO 449 OUT UINT16 IntNumber; ///< Out: IRQ number 450 OUT UINT16 MaxTranUnit; ///< Out: MTU 451 OUT UINT16 HwType; ///< Out: type of protocol at hardware level 447 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 448 OUT UINT16 BaseIo; ///< Out: Adapter's Base IO 449 OUT UINT16 IntNumber; ///< Out: IRQ number 450 OUT UINT16 MaxTranUnit; ///< Out: MTU 451 OUT UINT16 HwType; ///< Out: type of protocol at hardware level 452 452 453 453 #define ETHER_TYPE 1 … … 455 455 #define IEEE_TYPE 6 456 456 #define ARCNET_TYPE 7 457 /*++ 457 /*++ 458 458 other numbers can be obtained from rfc1010 for "Assigned 459 459 Numbers". This number may not be validated by the application 460 460 and hence adding new numbers to the list should be fine at any 461 time. 461 time. 462 462 --*/ 463 OUT UINT16 HwAddrLen; ///< Out: actual length of hardware address 463 OUT UINT16 HwAddrLen; ///< Out: actual length of hardware address 464 464 OUT UINT8 CurrentNodeAddress[ADDR_LEN]; ///< Out: Current hardware address 465 465 OUT UINT8 PermNodeAddress[ADDR_LEN]; ///< Out: Permanent hardware address 466 OUT UINT16 ROMAddress; ///< Out: ROM address 467 OUT UINT16 RxBufCt; ///< Out: receive Queue length 468 OUT UINT16 TxBufCt; ///< Out: Transmit Queue length 466 OUT UINT16 ROMAddress; ///< Out: ROM address 467 OUT UINT16 RxBufCt; ///< Out: receive Queue length 468 OUT UINT16 TxBufCt; ///< Out: Transmit Queue length 469 469 } PXENV_UNDI_GET_INFORMATION_T; 470 470 471 471 typedef struct { 472 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 473 OUT UINT32 XmtGoodFrames; ///< Out: No. of good transmissions 474 OUT UINT32 RcvGoodFrames; ///< Out: No. of good frames received 475 OUT UINT32 RcvCRCErrors; ///< Out: No. of frames with CRC error 476 OUT UINT32 RcvResourceErrors; ///< Out: no. of frames discarded 472 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 473 OUT UINT32 XmtGoodFrames; ///< Out: No. of good transmissions 474 OUT UINT32 RcvGoodFrames; ///< Out: No. of good frames received 475 OUT UINT32 RcvCRCErrors; ///< Out: No. of frames with CRC error 476 OUT UINT32 RcvResourceErrors; ///< Out: no. of frames discarded 477 477 /* Out: receive Queue full */ 478 478 } PXENV_UNDI_GET_STATISTICS_T; 479 479 480 480 typedef struct { 481 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 481 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 482 482 } PXENV_UNDI_CLEAR_STATISTICS_T; 483 483 … … 491 491 492 492 typedef struct { 493 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 494 IN UINT32 InetAddr; ///< In: IP Multicast Address 495 OUT UINT8 MediaAddr[ADDR_LEN]; ///< Out: corresponding hardware 493 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 494 IN UINT32 InetAddr; ///< In: IP Multicast Address 495 OUT UINT8 MediaAddr[ADDR_LEN]; ///< Out: corresponding hardware 496 496 /* multicast address */ 497 497 } PXENV_UNDI_GET_MCAST_ADDR_T; 498 498 499 499 typedef struct { 500 OUT UINT16 Vendor_ID; ///< OUT: 501 OUT UINT16 Dev_ID; ///< OUT: 502 OUT UINT8 Base_Class; ///< OUT: 503 OUT UINT8 Sub_Class; ///< OUT: 504 OUT UINT8 Prog_Intf; ///< OUT: program interface 505 OUT UINT8 Rev; ///< OUT: Revision number 506 OUT UINT16 BusDevFunc; ///< OUT: Bus, Device & Function numbers 507 OUT UINT16 SubVendor_ID; ///< OUT: 508 OUT UINT16 SubDevice_ID; ///< OUT: 500 OUT UINT16 Vendor_ID; ///< OUT: 501 OUT UINT16 Dev_ID; ///< OUT: 502 OUT UINT8 Base_Class; ///< OUT: 503 OUT UINT8 Sub_Class; ///< OUT: 504 OUT UINT8 Prog_Intf; ///< OUT: program interface 505 OUT UINT8 Rev; ///< OUT: Revision number 506 OUT UINT16 BusDevFunc; ///< OUT: Bus, Device & Function numbers 507 OUT UINT16 SubVendor_ID; ///< OUT: 508 OUT UINT16 SubDevice_ID; ///< OUT: 509 509 } PCI_INFO_T; 510 510 511 511 typedef struct { 512 OUT UINT32 EISA_Dev_ID; ///< Out: 513 OUT UINT8 Base_Class; ///< OUT: 514 OUT UINT8 Sub_Class; ///< OUT: 515 OUT UINT8 Prog_Intf; ///< OUT: program interface 516 OUT UINT16 CardSelNum; ///< OUT: Card Selector Number 517 OUT UINT8 Reserved; ///< to make it 10 bytes 512 OUT UINT32 EISA_Dev_ID; ///< Out: 513 OUT UINT8 Base_Class; ///< OUT: 514 OUT UINT8 Sub_Class; ///< OUT: 515 OUT UINT8 Prog_Intf; ///< OUT: program interface 516 OUT UINT16 CardSelNum; ///< OUT: Card Selector Number 517 OUT UINT8 Reserved; ///< to make it 10 bytes 518 518 } PNP_INFO_T; 519 519 … … 525 525 526 526 typedef struct { 527 OUT UINT16 Status; ///< OUT: PXENV_STATUS_xxx 528 OUT UINT8 NicType; ///< OUT: 2=PCI, 3=PnP 527 OUT UINT16 Status; ///< OUT: PXENV_STATUS_xxx 528 OUT UINT8 NicType; ///< OUT: 2=PCI, 3=PnP 529 529 PCI_PNP_INFO_T PciPnpInfo; 530 530 } PXENV_UNDI_GET_NIC_TYPE_T; 531 531 532 532 typedef struct { 533 OUT UINT16 Status; ///< OUT: PXENV_STATUS_xxx 534 OUT UINT8 IfaceType[16]; ///< OUT: Type name of MAC, AsciiZ 533 OUT UINT16 Status; ///< OUT: PXENV_STATUS_xxx 534 OUT UINT8 IfaceType[16]; ///< OUT: Type name of MAC, AsciiZ 535 535 536 536 /* format. This is used by the */ … … 543 543 544 544 /* characteristic table */ 545 OUT UINT32 LinkSpeed; ///< OUT: 546 OUT UINT32 ServiceFlags; ///< OUT: as defined in NDIS Spec 2.0X 545 OUT UINT32 LinkSpeed; ///< OUT: 546 OUT UINT32 ServiceFlags; ///< OUT: as defined in NDIS Spec 2.0X 547 547 OUT UINT32 Reserved[4]; ///< OUT: will be filled with 0s till defined 548 548 } PXENV_UNDI_GET_NDIS_INFO_T; 549 549 550 550 typedef struct { 551 OUT UINT16 Status; ///< OUT: PXENV_STATUS_xxx 552 IN OUT UINT16 FuncFlag; ///< In: PXENV_UNDI_ISR_IN_xxx 551 OUT UINT16 Status; ///< OUT: PXENV_STATUS_xxx 552 IN OUT UINT16 FuncFlag; ///< In: PXENV_UNDI_ISR_IN_xxx 553 553 554 554 /* Out: PXENV_UNDI_ISR_OUT_xxx */ … … 581 581 582 582 --*/ 583 #define PXENV_UNDI_ISR_OUT_OURS 0 ///< This is our interrupt. Deal with it. 583 #define PXENV_UNDI_ISR_OUT_OURS 0 ///< This is our interrupt. Deal with it. 584 584 #define PXENV_UNDI_ISR_OUT_NOT_OURS 1 ///< This is not our interrupt. 585 585 … … 590 590 591 591 --*/ 592 #define PXENV_UNDI_ISR_OUT_DONE 0 ///< We are done processing this interrupt. 593 #define PXENV_UNDI_ISR_OUT_TRANSMIT 2 ///< We completed a transmit interrupt. 594 #define PXENV_UNDI_ISR_OUT_RECEIVE 3 ///< Get data from receive buffer. 592 #define PXENV_UNDI_ISR_OUT_DONE 0 ///< We are done processing this interrupt. 593 #define PXENV_UNDI_ISR_OUT_TRANSMIT 2 ///< We completed a transmit interrupt. 594 #define PXENV_UNDI_ISR_OUT_RECEIVE 3 ///< Get data from receive buffer. 595 595 596 596 #define PXENV_UNDI_ISR_OUT_BUSY 4 /* ? */ 597 597 598 598 typedef struct { 599 UINT16 Status; ///< Out: PXENV_STATUS_xxx 599 UINT16 Status; ///< Out: PXENV_STATUS_xxx 600 600 } PXENV_STOP_UNDI_T; 601 601 602 #define PXENV_UNDI_STARTED 1 ///< not even initialized 603 #define PXENV_UNDI_INITIALIZED 2 ///< initialized and closed (not opened) 604 #define PXENV_UNDI_OPENED 3 ///< initialized & opened 605 606 typedef struct { 607 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 602 #define PXENV_UNDI_STARTED 1 ///< not even initialized 603 #define PXENV_UNDI_INITIALIZED 2 ///< initialized and closed (not opened) 604 #define PXENV_UNDI_OPENED 3 ///< initialized & opened 605 606 typedef struct { 607 OUT UINT16 Status; ///< Out: PXENV_STATUS_xxx 608 608 UINT16 UNDI_State; 609 609 } PXENV_UNDI_GET_STATE_T; -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/PxeUndi.c
r48674 r58466 1 /** @file 2 Wrapper routines that use a PXE-enabled NIC option ROM to 3 supply internal routines for an EFI SNI (Simple Network 1 /** @file 2 Wrapper routines that use a PXE-enabled NIC option ROM to 3 supply internal routines for an EFI SNI (Simple Network 4 4 Interface) Protocol. 5 5 6 6 This file relies upon the existence of a PXE-compliant ROM 7 in memory, as defined by the Preboot Execution Environment 7 in memory, as defined by the Preboot Execution Environment 8 8 Specification (PXE), Version 2.1, located at 9 9 … … 26 26 27 27 /** 28 PXE 28 PXE 29 29 START UNDI 30 30 Op-Code: PXENV_START_UNDI (0000h) … … 55 55 [BBS] specifications. 56 56 Returned from API service 57 Status: See the PXENV_STATUS_xxx constants. 58 59 @param SimpleNetworkDevice Device instance 60 @param PxeUndiTable Point to structure which hold paramter and return value 61 for option ROM call. 62 63 @return Return value of PXE option ROM far call. 57 Status: See the PXENV_STATUS_xxx constants. 58 59 @param SimpleNetworkDevice Device instance 60 @param PxeUndiTable Point to structure which hold paramter and return value 61 for option ROM call. 62 63 @return Return value of PXE option ROM far call. 64 64 **/ 65 65 EFI_STATUS … … 78 78 79 79 /** 80 PXE 81 UNDI STARTUP 80 PXE 81 UNDI STARTUP 82 82 Op-Code: PXENV_UNDI_STARTUP (0001h) 83 83 Input: Far pointer to a PXENV_UNDI_STARTUP_T parameter structure that has been initialized by the … … 96 96 PXENV_STOP_UNDI API calls. 97 97 This service cannot be used in protected mode. 98 typedef struct 98 typedef struct 99 99 { 100 100 PXENV_STATUS Status; … … 106 106 107 107 @param SimpleNetworkDevice Device instance 108 @param PxeUndiTable Point to structure which hold paramter and return value 109 for option ROM call. 110 111 @return Return value of PXE option ROM far call. 108 @param PxeUndiTable Point to structure which hold paramter and return value 109 for option ROM call. 110 111 @return Return value of PXE option ROM far call. 112 112 **/ 113 113 EFI_STATUS … … 126 126 127 127 /** 128 PXE 128 PXE 129 129 UNDI CLEANUP 130 130 Op-Code: PXENV_UNDI_CLEANUP (0002h) … … 146 146 147 147 @param SimpleNetworkDevice Device instance 148 @param PxeUndiTable Point to structure which hold paramter and return value 149 for option ROM call. 150 151 @return Return value of PXE option ROM far call. 148 @param PxeUndiTable Point to structure which hold paramter and return value 149 for option ROM call. 150 151 @return Return value of PXE option ROM far call. 152 152 **/ 153 153 EFI_STATUS … … 166 166 167 167 /** 168 PXE 168 PXE 169 169 UNDI INITIALIZE 170 170 Op-Code: PXENV_UNDI_INITIALIZE (0003h) … … 196 196 other application interfacing to the universal NIC driver 197 197 Returned from API service 198 Status: See the PXENV_STATUS_xxx constants. 199 200 @param SimpleNetworkDevice Device instance 201 @param PxeUndiTable Point to structure which hold paramter and return value 202 for option ROM call. 203 204 @return Return value of PXE option ROM far call. 198 Status: See the PXENV_STATUS_xxx constants. 199 200 @param SimpleNetworkDevice Device instance 201 @param PxeUndiTable Point to structure which hold paramter and return value 202 for option ROM call. 203 204 @return Return value of PXE option ROM far call. 205 205 **/ 206 206 EFI_STATUS … … 220 220 /** 221 221 Wrapper routine for reset adapter. 222 223 PXE 222 223 PXE 224 224 UNDI RESET ADAPTER 225 225 Op-Code: PXENV_UNDI_RESET_ADAPTER (0004h) … … 253 253 Returned from API service 254 254 Status: See the PXENV_STATUS_xxx constants. 255 255 256 256 @param SimpleNetworkDevice Device instance. 257 @param PxeUndiTable Point to structure which hold paramter and return value 258 for option ROM call. 259 @param RxFilter Filter setting mask value for PXE recive . 260 261 @return Return value of PXE option ROM far call. 257 @param PxeUndiTable Point to structure which hold paramter and return value 258 for option ROM call. 259 @param RxFilter Filter setting mask value for PXE recive . 260 261 @return Return value of PXE option ROM far call. 262 262 **/ 263 263 EFI_STATUS … … 311 311 &PxeUndiTable->R_Mcast_Buf, 312 312 sizeof (PXENV_UNDI_MCAST_ADDR_T) 313 ); 314 313 ); 314 315 315 316 316 Status = MakePxeCall ( … … 328 328 329 329 /** 330 PXE 330 PXE 331 331 UNDI SHUTDOWN 332 332 Op-Code: PXENV_UNDI_SHUTDOWN (0005h) … … 338 338 Note: The contents of the PXENV_UNDI_STARTUP parameter structure need to be saved by the 339 339 Universal NIC Driver in case PXENV_UNDI_INITIALIZE is called again. 340 typedef struct 340 typedef struct 341 341 { 342 342 PXENV_STATUS Status; … … 346 346 Returned from API service 347 347 Status: See the PXENV_STATUS_xxx constants. 348 349 @param SimpleNetworkDevice Device instance 350 @param PxeUndiTable Point to structure which hold paramter and return value 351 for option ROM call. 352 353 @return Return value of PXE option ROM far call. 348 349 @param SimpleNetworkDevice Device instance 350 @param PxeUndiTable Point to structure which hold paramter and return value 351 for option ROM call. 352 353 @return Return value of PXE option ROM far call. 354 354 **/ 355 355 EFI_STATUS … … 368 368 369 369 /** 370 PXE 370 PXE 371 371 UNDI OPEN 372 372 Op-Code: PXENV_UNDI_OPEN (0006h) … … 400 400 Returned from API service 401 401 Status: See the PXENV_STATUS_xxx constants. 402 403 @param SimpleNetworkDevice Device instance 404 @param PxeUndiTable Point to structure which hold paramter and return value 405 for option ROM call. 406 407 @return Return value of PXE option ROM far call. 402 403 @param SimpleNetworkDevice Device instance 404 @param PxeUndiTable Point to structure which hold paramter and return value 405 for option ROM call. 406 407 @return Return value of PXE option ROM far call. 408 408 **/ 409 409 EFI_STATUS … … 422 422 423 423 /** 424 PXE 424 PXE 425 425 UNDI CLOSE 426 426 Op-Code: PXENV_UNDI_CLOSE (0007h) … … 438 438 Returned from API service 439 439 Status: See the PXENV_STATUS_xxx constants. 440 441 @param SimpleNetworkDevice Device instance 442 @param PxeUndiTable Point to structure which hold paramter and return value 443 for option ROM call. 444 445 @return Return value of PXE option ROM far call. 440 441 @param SimpleNetworkDevice Device instance 442 @param PxeUndiTable Point to structure which hold paramter and return value 443 for option ROM call. 444 445 @return Return value of PXE option ROM far call. 446 446 **/ 447 447 EFI_STATUS … … 460 460 461 461 /** 462 PXE 462 PXE 463 463 UNDI TRANSMIT PACKET 464 464 Op-Code: PXENV_UNDI_TRANSMIT (0008h) … … 530 530 DataBlock: Array of transmit data blocks. 531 531 Returned from API service 532 Status: See the PXENV_STATUS_xxx constants 533 534 @param SimpleNetworkDevice Device instance 535 @param PxeUndiTable Point to structure which hold paramter and return value 536 for option ROM call. 537 538 @return Return value of PXE option ROM far call. 532 Status: See the PXENV_STATUS_xxx constants 533 534 @param SimpleNetworkDevice Device instance 535 @param PxeUndiTable Point to structure which hold paramter and return value 536 for option ROM call. 537 538 @return Return value of PXE option ROM far call. 539 539 **/ 540 540 EFI_STATUS … … 566 566 567 567 /** 568 PXE 568 PXE 569 569 UNDI SET MULTICAST ADDRESS 570 570 Op-Code: PXENV_UNDI_SET_MCAST_ADDRESS (0009h) … … 584 584 (0004h) API. 585 585 Returned from API service 586 Status: See the PXENV_STATUS_xxx constants 587 588 @param SimpleNetworkDevice Device instance 589 @param PxeUndiTable Point to structure which hold paramter and return value 590 for option ROM call. 591 592 @return Return value of PXE option ROM far call. 586 Status: See the PXENV_STATUS_xxx constants 587 588 @param SimpleNetworkDevice Device instance 589 @param PxeUndiTable Point to structure which hold paramter and return value 590 for option ROM call. 591 592 @return Return value of PXE option ROM far call. 593 593 **/ 594 594 EFI_STATUS … … 607 607 608 608 /** 609 PXE 609 PXE 610 610 UNDI SET STATION ADDRESS 611 611 Op-Code: PXENV_UNDI_SET_STATION_ADDRESS (000Ah) … … 626 626 transmit and receive. 627 627 Returned from API service 628 Status: See the PXENV_STATUS_xxx constants. 629 630 @param SimpleNetworkDevice Device instance 631 @param PxeUndiTable Point to structure which hold paramter and return value 632 for option ROM call. 633 634 @return Return value of PXE option ROM far call. 628 Status: See the PXENV_STATUS_xxx constants. 629 630 @param SimpleNetworkDevice Device instance 631 @param PxeUndiTable Point to structure which hold paramter and return value 632 for option ROM call. 633 634 @return Return value of PXE option ROM far call. 635 635 **/ 636 636 EFI_STATUS … … 649 649 650 650 /** 651 PXE 651 PXE 652 652 UNDI SET PACKET FILTER 653 653 Op-Code: PXENV_UNDI_SET_PACKET_FILTER (000Bh) … … 667 667 (0006h) API description. 668 668 Returned from API service 669 Status: See the PXENV_STATUS_xxx constants. 670 671 @param SimpleNetworkDevice Device instance 672 @param PxeUndiTable Point to structure which hold paramter and return value 673 for option ROM call. 674 675 @return Return value of PXE option ROM far call. 669 Status: See the PXENV_STATUS_xxx constants. 670 671 @param SimpleNetworkDevice Device instance 672 @param PxeUndiTable Point to structure which hold paramter and return value 673 for option ROM call. 674 675 @return Return value of PXE option ROM far call. 676 676 **/ 677 677 EFI_STATUS … … 690 690 691 691 /** 692 PXE 692 PXE 693 693 UNDI GET INFORMATION 694 694 Op-Code: PXENV_UNDI_GET_INFORMATION (000Ch) … … 733 733 ROMAddress: Real mode ROM segment address. 734 734 RxBufCnt: Receive queue length. 735 TxBufCnt: Transmit queue length. 736 737 @param SimpleNetworkDevice Device instance 738 @param PxeUndiTable Point to structure which hold paramter and return value 739 for option ROM call. 740 741 @return Return value of PXE option ROM far call. 735 TxBufCnt: Transmit queue length. 736 737 @param SimpleNetworkDevice Device instance 738 @param PxeUndiTable Point to structure which hold paramter and return value 739 for option ROM call. 740 741 @return Return value of PXE option ROM far call. 742 742 **/ 743 743 EFI_STATUS … … 756 756 757 757 /** 758 PXE 758 PXE 759 759 UNDI GET STATISTICS 760 760 Op-Code: PXENV_UNDI_GET_STATISTICS (000Dh) … … 782 782 RcvResourceErrors: Number of frames discarded 783 783 because receive queue was full. 784 785 @param SimpleNetworkDevice Device instance 786 @param PxeUndiTable Point to structure which hold paramter and return value 787 for option ROM call. 788 789 @return Return value of PXE option ROM far call. 784 785 @param SimpleNetworkDevice Device instance 786 @param PxeUndiTable Point to structure which hold paramter and return value 787 for option ROM call. 788 789 @return Return value of PXE option ROM far call. 790 790 **/ 791 791 EFI_STATUS … … 804 804 805 805 /** 806 PXE 806 PXE 807 807 UNDI CLEAR STATISTICS 808 808 Op-Code: PXENV_UNDI_CLEAR_STATISTICS (000Eh) … … 819 819 Returned from API service 820 820 Status: See the PXENV_STATUS_xxx constants. 821 822 @param SimpleNetworkDevice Device instance 823 @param PxeUndiTable Point to structure which hold paramter and return value 824 for option ROM call. 825 826 @return Return value of PXE option ROM far call. 821 822 @param SimpleNetworkDevice Device instance 823 @param PxeUndiTable Point to structure which hold paramter and return value 824 for option ROM call. 825 826 @return Return value of PXE option ROM far call. 827 827 **/ 828 828 EFI_STATUS … … 841 841 842 842 /** 843 PXE 843 PXE 844 844 UNDI INITIATE DIAGS 845 845 Op-Code: PXENV_UNDI_INITIATE_DIAGS (000Fh) … … 856 856 N/A 857 857 Returned from API service 858 Status: See the PXENV_STATUS_xxx constants. 859 860 @param SimpleNetworkDevice Device instance 861 @param PxeUndiTable Point to structure which hold paramter and return value 862 for option ROM call. 863 864 @return Return value of PXE option ROM far call. 858 Status: See the PXENV_STATUS_xxx constants. 859 860 @param SimpleNetworkDevice Device instance 861 @param PxeUndiTable Point to structure which hold paramter and return value 862 for option ROM call. 863 864 @return Return value of PXE option ROM far call. 865 865 **/ 866 866 EFI_STATUS … … 879 879 880 880 /** 881 PXE 881 PXE 882 882 UNDI FORCE INTERRUPT 883 883 Op-Code: PXENV_UNDI_FORCE_INTERRUPT (0010h) … … 900 900 N/A 901 901 Returned from API service 902 Status: See the PXENV_STATUS_xxx constants. 903 904 @param SimpleNetworkDevice Device instance 905 @param PxeUndiTable Point to structure which hold paramter and return value 906 for option ROM call. 907 908 @return Return value of PXE option ROM far call. 902 Status: See the PXENV_STATUS_xxx constants. 903 904 @param SimpleNetworkDevice Device instance 905 @param PxeUndiTable Point to structure which hold paramter and return value 906 for option ROM call. 907 908 @return Return value of PXE option ROM far call. 909 909 **/ 910 910 EFI_STATUS … … 923 923 924 924 /** 925 PXE 925 PXE 926 926 UNDI GET MULTICAST ADDRESS 927 927 Op-Code: PXENV_UNDI_GET_MCAST_ADDRESS (0011h) … … 942 942 Status: See the PXENV_STATUS_xxx constants. 943 943 MediaAddr: MAC multicast address. 944 945 @param SimpleNetworkDevice Device instance 946 @param PxeUndiTable Point to structure which hold paramter and return value 947 for option ROM call. 948 949 @return Return value of PXE option ROM far call. 944 945 @param SimpleNetworkDevice Device instance 946 @param PxeUndiTable Point to structure which hold paramter and return value 947 for option ROM call. 948 949 @return Return value of PXE option ROM far call. 950 950 **/ 951 951 EFI_STATUS … … 964 964 965 965 /** 966 PXE 966 PXE 967 967 UNDI GET NIC TYPE 968 968 Op-Code: PXENV_UNDI_GET_NIC_TYPE (0012h) … … 1014 1014 structure. 1015 1015 Info: Information about the fields in this union can be found 1016 in the [PnP] and [PCI] specifications 1017 1018 @param SimpleNetworkDevice Device instance 1019 @param PxeUndiTable Point to structure which hold paramter and return value 1020 for option ROM call. 1021 1022 @return Return value of PXE option ROM far call. 1016 in the [PnP] and [PCI] specifications 1017 1018 @param SimpleNetworkDevice Device instance 1019 @param PxeUndiTable Point to structure which hold paramter and return value 1020 for option ROM call. 1021 1022 @return Return value of PXE option ROM far call. 1023 1023 **/ 1024 1024 EFI_STATUS … … 1037 1037 1038 1038 /** 1039 PXE 1039 PXE 1040 1040 UNDI GET IFACE INFO 1041 1041 Op-Code: PXENV_UNDI_GET_IFACE_INFO (0013h) … … 1070 1070 LinkSpeed: Defined in the NDIS 2.0 specification. 1071 1071 ServiceFlags: Defined in the NDIS 2.0 specification. 1072 Reserved: Must be zero. 1073 1074 @param SimpleNetworkDevice Device instance 1075 @param PxeUndiTable Point to structure which hold paramter and return value 1076 for option ROM call. 1077 1078 @return Return value of PXE option ROM far call. 1072 Reserved: Must be zero. 1073 1074 @param SimpleNetworkDevice Device instance 1075 @param PxeUndiTable Point to structure which hold paramter and return value 1076 for option ROM call. 1077 1078 @return Return value of PXE option ROM far call. 1079 1079 **/ 1080 1080 EFI_STATUS … … 1093 1093 1094 1094 /** 1095 PXE 1095 PXE 1096 1096 UNDI ISR 1097 1097 Op-Code: PXENV_UNDI_ISR (0014h) … … 1135 1135 NETWORK INTERFACE level and returns PXENV_UNDI_ISR_OUT_DONE in the FuncFlag. 1136 1136 IMPORTANT: It is possible for the protocol driver to be interrupted again while in the 1137 strategy routine when the UNDI re-enables interrupts. 1138 1139 @param SimpleNetworkDevice Device instance 1140 @param PxeUndiTable Point to structure which hold paramter and return value 1141 for option ROM call. 1142 1143 @return Return value of PXE option ROM far call. 1137 strategy routine when the UNDI re-enables interrupts. 1138 1139 @param SimpleNetworkDevice Device instance 1140 @param PxeUndiTable Point to structure which hold paramter and return value 1141 for option ROM call. 1142 1143 @return Return value of PXE option ROM far call. 1144 1144 **/ 1145 1145 EFI_STATUS … … 1158 1158 1159 1159 /** 1160 PXE 1160 PXE 1161 1161 STOP UNDI 1162 1162 Op-Code: PXENV_STOP_UNDI (0015h) … … 1177 1177 N/A 1178 1178 Returned from API service 1179 Status: See the PXENV_STATUS_xxx constants. 1180 1181 @param SimpleNetworkDevice Device instance 1182 @param PxeUndiTable Point to structure which hold paramter and return value 1183 for option ROM call. 1184 1185 @return Return value of PXE option ROM far call. 1179 Status: See the PXENV_STATUS_xxx constants. 1180 1181 @param SimpleNetworkDevice Device instance 1182 @param PxeUndiTable Point to structure which hold paramter and return value 1183 for option ROM call. 1184 1185 @return Return value of PXE option ROM far call. 1186 1186 **/ 1187 1187 EFI_STATUS … … 1200 1200 1201 1201 /** 1202 PXE 1202 PXE 1203 1203 UNDI GET STATE 1204 1204 Op-Code: PXENV_UNDI_GET_STATE (0015h) … … 1232 1232 Description: This API function will be called at different levels of processing the interrupt. The FuncFlag field in 1233 1233 the parameter block indicates the operation to be performed for the call. This field is filled with the 1234 status of that operation on return. 1235 1236 @param SimpleNetworkDevice Device instance 1237 @param PxeUndiTable Point to structure which hold paramter and return value 1238 for option ROM call. 1239 1240 @return Return value of PXE option ROM far call. 1234 status of that operation on return. 1235 1236 @param SimpleNetworkDevice Device instance 1237 @param PxeUndiTable Point to structure which hold paramter and return value 1238 for option ROM call. 1239 1240 @return Return value of PXE option ROM far call. 1241 1241 **/ 1242 1242 EFI_STATUS -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/Snp16Dxe.inf
r58459 r58466 24 24 INF_VERSION = 0x00010005 25 25 VERSION_STRING = 1.0 26 26 27 27 ENTRY_POINT = BiosSnp16DriverEntryPoint 28 28 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/BiosVideo.c
r58459 r58466 189 189 Node = (EFI_DEV_PATH *) RemainingDevicePath; 190 190 // 191 // Check if RemainingDevicePath is the End of Device Path Node, 191 // Check if RemainingDevicePath is the End of Device Path Node, 192 192 // if yes, return EFI_SUCCESS 193 193 // … … 296 296 &mOriginalPciAttributes 297 297 ); 298 298 299 299 if (EFI_ERROR (Status)) { 300 300 goto Done; … … 320 320 Status = EFI_UNSUPPORTED; 321 321 goto Done; 322 } 322 } 323 323 324 324 REPORT_STATUS_CODE_WITH_DEVICE_PATH ( … … 385 385 386 386 if (RemainingDevicePath != NULL) { 387 if (IsDevicePathEnd (RemainingDevicePath) && 387 if (IsDevicePathEnd (RemainingDevicePath) && 388 388 (FeaturePcdGet (PcdBiosVideoCheckVbeEnable) || FeaturePcdGet (PcdBiosVideoCheckVgaEnable))) { 389 389 // … … 510 510 ); 511 511 ASSERT_EFI_ERROR (Status); 512 512 513 513 // 514 514 // Restore original PCI attributes … … 669 669 AcpiDeviceNode.ADR = ACPI_DISPLAY_ADR (1, 0, 0, 1, 0, ACPI_ADR_DISPLAY_TYPE_VGA, 0, 0); 670 670 SetDevicePathNodeLength (&AcpiDeviceNode.Header, sizeof (ACPI_ADR_DEVICE_PATH)); 671 671 672 672 BiosVideoPrivate->GopDevicePath = AppendDevicePathNode ( 673 673 ParentDevicePath, … … 677 677 BiosVideoPrivate->GopDevicePath = AppendDevicePathNode (ParentDevicePath, RemainingDevicePath); 678 678 } 679 679 680 680 // 681 681 // Creat child handle and device path protocol firstly … … 817 817 if ((BiosVideoPrivate != NULL) && (BiosVideoPrivate->ExitBootServicesEvent != NULL)) { 818 818 gBS->CloseEvent (BiosVideoPrivate->ExitBootServicesEvent); 819 } 819 } 820 820 // 821 821 // Free private data structure … … 1273 1273 } 1274 1274 } 1275 1275 1276 1276 return HasChild; 1277 1277 } … … 1345 1345 1346 1346 ZeroMem (&ValidEdidTiming, sizeof (VESA_BIOS_EXTENSIONS_VALID_EDID_TIMING)); 1347 1347 1348 1348 // 1349 1349 // Fill in the VBE related data structures … … 1509 1509 PreferMode = 0; 1510 1510 ModeNumber = 0; 1511 1511 1512 1512 // 1513 1513 // ModeNumberPtr may be not 16-byte aligned, so ReadUnaligned16 is used to access the buffer pointed by ModeNumberPtr. … … 1637 1637 // 1638 1638 if ((BiosVideoPrivate->VbeModeInformationBlock->XResolution > HighestHorizontalResolution) || 1639 ((BiosVideoPrivate->VbeModeInformationBlock->XResolution == HighestHorizontalResolution) && 1639 ((BiosVideoPrivate->VbeModeInformationBlock->XResolution == HighestHorizontalResolution) && 1640 1640 (BiosVideoPrivate->VbeModeInformationBlock->YResolution > HighestVerticalResolution))) { 1641 1641 HighestHorizontalResolution = BiosVideoPrivate->VbeModeInformationBlock->XResolution; … … 1717 1717 // 1718 1718 ASSERT (CurrentModeData->FrameBufferSize <= (UINTN)(BiosVideoPrivate->VbeInformationBlock->TotalMemory * 64 * 1024)); 1719 1719 1720 1720 BiosVideoPrivate->ModeData = ModeBuffer; 1721 1721 } … … 2081 2081 return EFI_UNSUPPORTED; 2082 2082 } 2083 2083 2084 2084 if (ModeNumber == This->Mode->Mode) { 2085 2085 // 2086 2086 // Clear screen to black 2087 // 2087 // 2088 2088 ZeroMem (&Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); 2089 2089 BiosVideoGraphicsOutputVbeBlt ( -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/IA32/InterruptTable.S
r48674 r58466 18 18 19 19 #---------------------------------------------------------------------------- 20 # Procedure: InterruptRedirectionTemplate: Redirects interrupts 0x68-0x6F 20 # Procedure: InterruptRedirectionTemplate: Redirects interrupts 0x68-0x6F 21 21 # 22 22 # Input: None … … 25 25 # 26 26 # Prototype: VOID 27 # InterruptRedirectionTemplate ( 27 # InterruptRedirectionTemplate ( 28 28 # VOID 29 29 # ); … … 37 37 # This template must be copied into low memory, and the IDT entries 38 38 # 0x68-0x6F must be point to the low memory copy of this code. Each 39 # entry is 4 bytes long, so IDT entries 0x68-0x6F can be easily 39 # entry is 4 bytes long, so IDT entries 0x68-0x6F can be easily 40 40 # computed. 41 41 # -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/IA32/InterruptTable.asm
r48674 r58466 20 20 21 21 ;---------------------------------------------------------------------------- 22 ; Procedure: InterruptRedirectionTemplate: Redirects interrupts 0x68-0x6F 22 ; Procedure: InterruptRedirectionTemplate: Redirects interrupts 0x68-0x6F 23 23 ; 24 24 ; Input: None … … 27 27 ; 28 28 ; Prototype: VOID 29 ; InterruptRedirectionTemplate ( 29 ; InterruptRedirectionTemplate ( 30 30 ; VOID 31 31 ; ); … … 39 39 ; This template must be copied into low memory, and the IDT entries 40 40 ; 0x68-0x6F must be point to the low memory copy of this code. Each 41 ; entry is 4 bytes long, so IDT entries 0x68-0x6F can be easily 41 ; entry is 4 bytes long, so IDT entries 0x68-0x6F can be easily 42 42 ; computed. 43 43 ; -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Ipf/IpfBootSupport.c
r58459 r58466 249 249 // 250 250 // Create a new handle with gEfiCallerIdGuid to be used as the ImageHandle fore the reloaded image 251 // 251 // 252 252 NewImageHandle = NULL; 253 253 Status = gBS->InstallProtocolInterface ( -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Ipf/IpfThunk.i
-
Property svn:eol-style
set to
native
-
Property svn:eol-style
set to
-
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBbs.c
r48674 r58466 32 32 /** 33 33 Checks the state of the floppy and if media is inserted. 34 34 35 35 This routine checks the state of the floppy and if media is inserted. 36 36 There are 3 cases: -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBios.c
r58459 r58466 270 270 // 271 271 // Bugbug: need to figure out whether C/D/E/F segment should be marked as reserved memory. 272 // 272 // 273 273 DEBUG ((DEBUG_ERROR, "Failed to allocate the C/D/E/F segment Status = %r", Status)); 274 274 } … … 414 414 NewMask = 0xFFFF; 415 415 Private->Legacy8259->SetMask(Private->Legacy8259, &NewMask, NULL, NULL, NULL); 416 416 417 417 // 418 418 // Call into Legacy16 code to do an INIT … … 436 436 // 437 437 Private->Legacy8259->SetMask(Private->Legacy8259, &OldMask, NULL, NULL, NULL); 438 438 439 439 if (Regs.X.AX != 0) { 440 440 return EFI_DEVICE_ERROR; … … 652 652 653 653 PciInterfaceVersion = 0; 654 654 655 655 Reg.X.AX = 0xB101; 656 656 Reg.E.EDI = 0; … … 692 692 EFI_STATUS Status; 693 693 SMBIOS_TABLE_ENTRY_POINT *EntryPointStructure; 694 694 695 695 // 696 696 // Get SMBIOS table from EFI configuration table … … 703 703 return; 704 704 } 705 705 706 706 EntryPointStructure = (SMBIOS_TABLE_ENTRY_POINT *) mRuntimeSmbiosEntryPoint; 707 707 … … 727 727 DEBUG ((EFI_D_INFO, "Allocate memory for Smbios Entry Point Structure\n")); 728 728 } 729 730 if ((mStructureTableAddress != 0) && 729 730 if ((mStructureTableAddress != 0) && 731 731 (mStructureTablePages < (UINTN) EFI_SIZE_TO_PAGES (EntryPointStructure->TableLength))) { 732 732 // … … 738 738 DEBUG ((EFI_D_INFO, "Original size is not enough. Re-allocate the memory.\n")); 739 739 } 740 740 741 741 if (mStructureTableAddress == 0) { 742 742 // … … 754 754 if (EFI_ERROR (Status)) { 755 755 gBS->FreePages ( 756 mReserveSmbiosEntryPoint, 756 mReserveSmbiosEntryPoint, 757 757 EFI_SIZE_TO_PAGES ((UINTN) (EntryPointStructure->EntryPointLength)) 758 758 ); … … 821 821 return EFI_SECURITY_VIOLATION; 822 822 } 823 823 824 824 if (SecureBoot != NULL) { 825 825 FreePool (SecureBoot); … … 1020 1020 // 1021 1021 MemorySize = PcdGet32 (PcdLowPmmMemorySize); 1022 ASSERT ((MemorySize & 0xFFF) == 0); 1022 ASSERT ((MemorySize & 0xFFF) == 0); 1023 1023 Status = AllocateLegacyMemory ( 1024 1024 AllocateMaxAddress, … … 1060 1060 // 1061 1061 // Allocate high PMM Memory under 16 MB 1062 // 1062 // 1063 1063 Status = AllocateLegacyMemory ( 1064 1064 AllocateMaxAddress, … … 1070 1070 // 1071 1071 // If it fails, allocate high PMM Memory under 4GB 1072 // 1072 // 1073 1073 Status = AllocateLegacyMemory ( 1074 1074 AllocateMaxAddress, … … 1076 1076 EFI_SIZE_TO_PAGES (MemorySize), 1077 1077 &MemoryAddress 1078 ); 1078 ); 1079 1079 } 1080 1080 if (!EFI_ERROR (Status)) { 1081 1081 EfiToLegacy16InitTable->HiPmmMemory = (UINT32) (EFI_PHYSICAL_ADDRESS) (UINTN) MemoryAddress; 1082 1082 EfiToLegacy16InitTable->HiPmmMemorySizeInBytes = MemorySize; 1083 } 1083 } 1084 1084 1085 1085 // … … 1115 1115 // 1116 1116 Private->ThunkSeg = (UINT16) (EFI_SEGMENT (IntRedirCode)); 1117 1117 1118 1118 // 1119 1119 // Allocate reserved memory for SMBIOS table used in legacy boot if SMBIOS table exists … … 1132 1132 &InstallSmbiosEvent 1133 1133 ); 1134 ASSERT_EFI_ERROR (Status); 1134 ASSERT_EFI_ERROR (Status); 1135 1135 1136 1136 // … … 1145 1145 ); 1146 1146 Private->Csm16PciInterfaceVersion = GetPciInterfaceVersion (Private); 1147 1148 DEBUG ((EFI_D_INFO, "CSM16 PCI BIOS Interface Version: %02x.%02x\n", 1149 (UINT8) (Private->Csm16PciInterfaceVersion >> 8), 1147 1148 DEBUG ((EFI_D_INFO, "CSM16 PCI BIOS Interface Version: %02x.%02x\n", 1149 (UINT8) (Private->Csm16PciInterfaceVersion >> 8), 1150 1150 (UINT8) Private->Csm16PciInterfaceVersion 1151 1151 )); -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosInterface.h
r58459 r58466 98 98 99 99 // 100 // When we call CSM16 functions, some CSM16 use es:[offset + 0xabcd] to get data passed from CSM32, 101 // offset + 0xabcd could overflow which exceeds 0xFFFF which is invalid in real mode. 102 // So this will keep offset as small as possible to avoid offset overflow in real mode. 100 // When we call CSM16 functions, some CSM16 use es:[offset + 0xabcd] to get data passed from CSM32, 101 // offset + 0xabcd could overflow which exceeds 0xFFFF which is invalid in real mode. 102 // So this will keep offset as small as possible to avoid offset overflow in real mode. 103 103 // 104 104 #define NORMALIZE_EFI_SEGMENT(_Adr) (UINT16) (((UINTN) (_Adr)) >> 4) … … 539 539 // Timer 0, Read/Write LSB then MSB, Square wave output, binary count use. 540 540 // 541 #define TIMER0_CONTROL_WORD 0x36 541 #define TIMER0_CONTROL_WORD 0x36 542 542 543 543 #define LEGACY_BIOS_INSTANCE_SIGNATURE SIGNATURE_32 ('L', 'B', 'I', 'T') … … 551 551 552 552 // 553 // CPU Architectural Protocol 553 // CPU Architectural Protocol 554 554 // 555 555 EFI_CPU_ARCH_PROTOCOL *Cpu; 556 556 557 557 // 558 // Timer Architectural Protocol 558 // Timer Architectural Protocol 559 559 // 560 560 EFI_TIMER_ARCH_PROTOCOL *Timer; 561 BOOLEAN TimerUses8254; 562 561 BOOLEAN TimerUses8254; 562 563 563 // 564 564 // Protocol to Lock and Unlock 0xc0000 - 0xfffff … … 572 572 // 573 573 EFI_LEGACY_8259_PROTOCOL *Legacy8259; 574 574 575 575 // 576 576 // PCI Interrupt PIRQ control … … 668 668 // Indicate that whether GenericLegacyBoot is entered or not 669 669 // 670 BOOLEAN LegacyBootEntered; 670 BOOLEAN LegacyBootEntered; 671 671 672 672 // … … 1344 1344 /** 1345 1345 Checks the state of the floppy and if media is inserted. 1346 1346 1347 1347 This routine checks the state of the floppy and if media is inserted. 1348 1348 There are 3 cases: -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBootSupport.c
r58459 r58466 792 792 { 793 793 SMBIOS_TABLE_ENTRY_POINT *EntryPointStructure; 794 795 if ((mRuntimeSmbiosEntryPoint == NULL) || 796 (mReserveSmbiosEntryPoint == 0) || 794 795 if ((mRuntimeSmbiosEntryPoint == NULL) || 796 (mReserveSmbiosEntryPoint == 0) || 797 797 (mStructureTableAddress == 0)) { 798 798 return; 799 799 } 800 800 801 801 EntryPointStructure = (SMBIOS_TABLE_ENTRY_POINT *) mRuntimeSmbiosEntryPoint; 802 802 803 803 // 804 804 // Copy SMBIOS Entry Point Structure … … 809 809 EntryPointStructure->EntryPointLength 810 810 ); 811 811 812 812 // 813 813 // Copy SMBIOS Structure Table into EfiReservedMemoryType memory … … 818 818 EntryPointStructure->TableLength 819 819 ); 820 820 821 821 // 822 822 // Update TableAddress in Entry Point Structure … … 824 824 EntryPointStructure = (SMBIOS_TABLE_ENTRY_POINT *)(UINTN) mReserveSmbiosEntryPoint; 825 825 EntryPointStructure->TableAddress = (UINT32)(UINTN) mStructureTableAddress; 826 826 827 827 // 828 828 // Fixup checksums in the Entry Point Structure … … 831 831 EntryPointStructure->EntryPointStructureChecksum = 0; 832 832 833 EntryPointStructure->IntermediateChecksum = 833 EntryPointStructure->IntermediateChecksum = 834 834 CalculateCheckSum8 ( 835 (UINT8 *) EntryPointStructure + OFFSET_OF (SMBIOS_TABLE_ENTRY_POINT, IntermediateAnchorString), 835 (UINT8 *) EntryPointStructure + OFFSET_OF (SMBIOS_TABLE_ENTRY_POINT, IntermediateAnchorString), 836 836 EntryPointStructure->EntryPointLength - OFFSET_OF (SMBIOS_TABLE_ENTRY_POINT, IntermediateAnchorString) 837 837 ); … … 899 899 EfiToLegacy16BootTable->MajorVersion = EFI_TO_LEGACY_MAJOR_VERSION; 900 900 EfiToLegacy16BootTable->MinorVersion = EFI_TO_LEGACY_MINOR_VERSION; 901 901 902 902 // 903 903 // If booting to a legacy OS then force HDD drives to the appropriate … … 917 917 if (!EFI_ERROR (Status)) { 918 918 IdeController = HandleBuffer[0]; 919 } 919 } 920 920 } 921 921 // … … 1272 1272 // 1273 1273 Private->Timer->SetTimerPeriod (Private->Timer, 0); 1274 1274 1275 1275 // 1276 1276 // Save and disable interrupt of debug timer -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyIde.c
r58459 r58466 77 77 ); 78 78 if (!EFI_ERROR (Status)) { 79 IdeController = HandleBuffer[0]; 79 IdeController = HandleBuffer[0]; 80 80 // 81 81 // Force IDE drive spin up! … … 280 280 // 281 281 Status = gBS->HandleProtocol ( 282 IdeController, 283 &gEfiPciIoProtocolGuid, 282 IdeController, 283 &gEfiPciIoProtocolGuid, 284 284 (VOID **)&PciIo 285 285 ); -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyPci.c
r58459 r58466 151 151 IN EFI_HANDLE PciHandle, 152 152 IN UINT32 ShadowAddress, 153 IN UINT32 ShadowedSize, 153 IN UINT32 ShadowedSize, 154 154 IN UINT8 DiskStart, 155 155 IN UINT8 DiskEnd … … 259 259 260 260 /** 261 Find the PC-AT ROM Image in the raw PCI Option ROM. Also return the 261 Find the PC-AT ROM Image in the raw PCI Option ROM. Also return the 262 262 related information from the header. 263 263 … … 322 322 break; 323 323 } 324 324 325 325 if (Pcir->CodeType == PCI_CODE_TYPE_PCAT_IMAGE) { 326 326 Match = FALSE; … … 385 385 } 386 386 } 387 387 388 388 if ((Pcir->Indicator & 0x80) == 0x80) { 389 389 break; … … 416 416 417 417 if (OpRomRevision != NULL) { 418 // 418 // 419 419 // Optional return PCI Data Structure revision 420 420 // … … 816 816 Regs.X.BX = (UINT16) 0x1; 817 817 // 818 // 16-byte boundary alignment requirement according to 818 // 16-byte boundary alignment requirement according to 819 819 // PCI IRQ Routing Table Specification 820 820 // … … 833 833 DEBUG ((EFI_D_ERROR, "PIRQ table length insufficient - %x\n", PirqTableSize)); 834 834 } else { 835 DEBUG ((EFI_D_INFO, "PIRQ table in legacy region - %x\n", Private->Legacy16Table->IrqRoutingTablePointer)); 835 DEBUG ((EFI_D_INFO, "PIRQ table in legacy region - %x\n", Private->Legacy16Table->IrqRoutingTablePointer)); 836 836 Private->Legacy16Table->IrqRoutingTableLength = (UINT32)PirqTableSize; 837 837 CopyMem ( … … 1596 1596 &HandleCount, 1597 1597 NULL 1598 ); 1598 ); 1599 1599 if (EFI_ERROR (Status)) { 1600 1600 return EFI_UNSUPPORTED; 1601 1601 } 1602 1602 1603 1603 VgaHandle = HandleBuffer[0]; 1604 1604 … … 1700 1700 &Pci 1701 1701 ); 1702 1703 // 1704 // Only one Video OPROM can be given control in BIOS phase. If there are multiple Video devices, 1705 // one will work in legacy mode (OPROM will be given control) and 1702 1703 // 1704 // Only one Video OPROM can be given control in BIOS phase. If there are multiple Video devices, 1705 // one will work in legacy mode (OPROM will be given control) and 1706 1706 // other Video devices will work in native mode (OS driver will handle these devices). 1707 // 1708 if (IS_PCI_DISPLAY (&Pci) && Index != 0) { 1707 // 1708 if (IS_PCI_DISPLAY (&Pci) && Index != 0) { 1709 1709 continue; 1710 1710 } … … 1716 1716 continue; 1717 1717 } 1718 1718 1719 1719 // 1720 1720 // If legacy VBIOS Oprom has not been dispatched before, install legacy VBIOS here. 1721 1721 // 1722 if (IS_PCI_DISPLAY (&Pci) && Index == 0) { 1722 if (IS_PCI_DISPLAY (&Pci) && Index == 0) { 1723 1723 Status = LegacyBiosInstallVgaRom (Private); 1724 1724 // … … 2105 2105 return Status; 2106 2106 } 2107 2107 2108 2108 for (Index = 0; Index < EntryCount; Index++) { 2109 2109 if ((OpenInfoBuffer[Index].Attributes & EFI_OPEN_PROTOCOL_BY_DRIVER) != 0) { … … 2124 2124 } 2125 2125 } 2126 2126 2127 2127 // 2128 2128 // Kick off the native EFI driver … … 2315 2315 &PhysicalAddress 2316 2316 ); 2317 2317 2318 2318 if (EFI_ERROR (Status)) { 2319 2319 DEBUG ((EFI_D_ERROR, "return LegacyBiosInstallRom(%d): EFI_OUT_OF_RESOURCES (no more space for OpROM)\n", __LINE__)); … … 2378 2378 &Granularity 2379 2379 ); 2380 2380 2381 2381 DEBUG ((EFI_D_INFO, " Shadowing OpROM init/runtime/isize = %x/%x/%x\n", InitAddress, RuntimeAddress, ImageSize)); 2382 2382 … … 2452 2452 gRT->GetTime (&BootTime, NULL); 2453 2453 LocalTime = BootTime.Hour * 3600 + BootTime.Minute * 60 + BootTime.Second; 2454 2454 2455 2455 // 2456 2456 // Multiply result by 18.2 for number of ticks since midnight. … … 2460 2460 BdaPtr = (UINT32 *) ((UINTN) 0x46C); 2461 2461 *BdaPtr = LocalTime; 2462 2462 2463 2463 // 2464 2464 // Pass in handoff data … … 2467 2467 ZeroMem (&Regs, sizeof (Regs)); 2468 2468 if (PciHandle != NULL) { 2469 2469 2470 2470 Status = gBS->HandleProtocol ( 2471 2471 PciHandle, … … 2474 2474 ); 2475 2475 ASSERT_EFI_ERROR (Status); 2476 2476 2477 2477 // 2478 2478 // Enable command register. … … 2484 2484 NULL 2485 2485 ); 2486 2486 2487 2487 PciIo->GetLocation ( 2488 2488 PciIo, … … 2494 2494 DEBUG ((EFI_D_INFO, "Shadowing OpROM on the PCI device %x/%x/%x\n", Bus, Device, Function)); 2495 2495 } 2496 2496 2497 2497 mIgnoreBbsUpdateFlag = FALSE; 2498 2498 Regs.X.AX = Legacy16DispatchOprom; 2499 2499 2500 2500 // 2501 2501 // Generate DispatchOpRomTable data … … 2529 2529 Regs.X.BX = 0; 2530 2530 } 2531 2531 2532 2532 if (Private->IntThunk->DispatchOpromTable.NumberBbsEntries != (UINT8) Private->IntThunk->EfiToLegacy16BootTable.NumberBbsEntries) { 2533 2533 Private->IntThunk->EfiToLegacy16BootTable.NumberBbsEntries = (UINT8) Private->IntThunk->DispatchOpromTable.NumberBbsEntries; … … 2596 2596 2597 2597 LocalDiskEnd = (UINT8) ((*(UINT8 *) ((UINTN) 0x475)) + 0x80); 2598 2598 2599 2599 // 2600 2600 // Allow platform to perform any required actions after the … … 2665 2665 2666 2666 Status = EFI_SUCCESS; 2667 2667 2668 2668 Done: 2669 2669 if (PhysicalAddress != 0) { … … 2802 2802 if ((PciHandle != NULL) && (RomImage == NULL)) { 2803 2803 // 2804 // If PciHandle has OpRom to Execute 2804 // If PciHandle has OpRom to Execute 2805 2805 // and OpRom are all associated with Hardware 2806 2806 // … … 2948 2948 return EFI_UNSUPPORTED; 2949 2949 } 2950 2950 2951 2951 Pcir = (PCI_3_0_DATA_STRUCTURE *) 2952 2952 ((UINT8 *) LocalRomImage + ((PCI_EXPANSION_ROM_HEADER *) LocalRomImage)->PcirOffset); -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c
r48674 r58466 74 74 // 75 75 VectorBase = 0; 76 76 77 77 return InternalLegacyBiosFarCall ( 78 78 This, … … 128 128 129 129 /** 130 Provide NULL interrupt handler which is used to check 130 Provide NULL interrupt handler which is used to check 131 131 if there is more than one HW interrupt registers with the CPU AP. 132 132 … … 215 215 // 216 216 Private->Timer->SetTimerPeriod (Private->Timer, 0); 217 217 218 218 // 219 219 // Save and disable interrupt of debug timer … … 228 228 // 229 229 // Check to see if there is more than one HW interrupt registers with the CPU AP. 230 // If there is, then ASSERT() since that is not compatible with the CSM because 231 // interupts other than the Timer interrupt that was disabled above can not be 230 // If there is, then ASSERT() since that is not compatible with the CSM because 231 // interupts other than the Timer interrupt that was disabled above can not be 232 232 // handled properly from real mode. 233 233 // … … 235 235 UINTN Vector; 236 236 UINTN Count; 237 237 238 238 for (Vector = 0x20, Count = 0; Vector < 0x100; Vector++) { 239 239 Status = Private->Cpu->RegisterInterruptHandler (Private->Cpu, Vector, LegacyBiosNullInterruptHandler); … … 252 252 253 253 // 254 // If the Timer AP has enabled the 8254 timer IRQ and the current 8254 timer 255 // period is less than the CSM required rate of 54.9254, then force the 8254 254 // If the Timer AP has enabled the 8254 timer IRQ and the current 8254 timer 255 // period is less than the CSM required rate of 54.9254, then force the 8254 256 256 // PIT counter to 0, which is the CSM required rate of 54.9254 ms 257 257 // … … 259 259 SetPitCount (0); 260 260 } 261 261 262 262 if (Stack != NULL && StackSize != 0) { 263 263 // … … 324 324 // 325 325 gBS->RestoreTPL (OriginalTpl); 326 326 327 327 // 328 328 // Restore interrupt of debug timer … … 379 379 Status = Private->Legacy8259->GetVector (Private->Legacy8259, Efi8259Irq0, &TimerVector); 380 380 ASSERT_EFI_ERROR (Status); 381 381 382 382 // 383 383 // Check to see if the Timer AP has hooked the IRQ0 from the 8254 PIT 384 // 384 // 385 385 Status = Private->Cpu->RegisterInterruptHandler ( 386 Private->Cpu, 387 TimerVector, 386 Private->Cpu, 387 TimerVector, 388 388 LegacyBiosNullInterruptHandler 389 389 ); 390 390 if (Status == EFI_SUCCESS) { 391 391 // 392 // If the Timer AP has not enabled the 8254 timer IRQ, then force the 8254 PIT 392 // If the Timer AP has not enabled the 8254 timer IRQ, then force the 8254 PIT 393 393 // counter to 0, which is the CSM required rate of 54.9254 ms 394 394 // 395 395 Private->Cpu->RegisterInterruptHandler ( 396 Private->Cpu, 397 TimerVector, 396 Private->Cpu, 397 TimerVector, 398 398 NULL 399 399 ); 400 400 SetPitCount (0); 401 401 402 402 // 403 403 // Save status that the Timer AP is not using the 8254 PIT … … 415 415 ASSERT (FALSE); 416 416 } 417 417 418 418 return EFI_SUCCESS; 419 419 } -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/X64/InterruptTable.asm
r48674 r58466 18 18 19 19 ;---------------------------------------------------------------------------- 20 ; Procedure: InterruptRedirectionTemplate: Redirects interrupts 0x68-0x6F 20 ; Procedure: InterruptRedirectionTemplate: Redirects interrupts 0x68-0x6F 21 21 ; 22 22 ; Input: None … … 25 25 ; 26 26 ; Prototype: VOID 27 ; InterruptRedirectionTemplate ( 27 ; InterruptRedirectionTemplate ( 28 28 ; VOID 29 29 ; ); … … 37 37 ; This template must be copied into low memory, and the IDT entries 38 38 ; 0x68-0x6F must be point to the low memory copy of this code. Each 39 ; entry is 4 bytes long, so IDT entries 0x68-0x6F can be easily 39 ; entry is 4 bytes long, so IDT entries 0x68-0x6F can be easily 40 40 ; computed. 41 41 ; -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Include/Guid/AcpiVariableCompatibility.h
r48674 r58466 63 63 // S3 Debug extension 64 64 // 65 EFI_PHYSICAL_ADDRESS S3DebugBufferAddress; 66 EFI_PHYSICAL_ADDRESS S3ResumeNvsEntryPoint; 65 EFI_PHYSICAL_ADDRESS S3DebugBufferAddress; 66 EFI_PHYSICAL_ADDRESS S3ResumeNvsEntryPoint; 67 67 } ACPI_VARIABLE_SET_COMPATIBILITY; 68 68 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Include/Guid/BdsHii.h
r48674 r58466 1 1 /** @file 2 2 GUIDs used as HII FormSet and HII Package list GUID in BdsDxe driver. 3 3 4 4 Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 7 7 The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php. 8 http://opensource.org/licenses/bsd-license.php. 9 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Include/Guid/BdsLibHii.h
r48674 r58466 1 1 /** @file 2 2 GUID used as HII Package list GUID in GenericBdsLib module. 3 3 4 4 Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 7 7 The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php. 8 http://opensource.org/licenses/bsd-license.php. 9 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Include/Guid/BlockIoVendor.h
r48674 r58466 3 3 4 4 Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 7 7 The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php. 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 8 http://opensource.org/licenses/bsd-license.php. 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Include/Guid/CapsuleDataFile.h
r48674 r58466 3 3 4 4 Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 7 7 The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php. 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 8 http://opensource.org/licenses/bsd-license.php. 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Include/Guid/DataHubStatusCodeRecord.h
r48674 r58466 1 1 /** @file 2 2 GUID used to identify Data Hub records logged by Status Code Protocol. 3 3 4 4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 7 7 The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php. 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 8 http://opensource.org/licenses/bsd-license.php. 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 13 13 **/ -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Include/Guid/HdBootVariable.h
r48674 r58466 1 1 /** @file 2 2 GUID used as EFI Variable for the device path of Boot file on HardDevice. 3 3 4 4 Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 7 7 The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php. 8 http://opensource.org/licenses/bsd-license.php. 9 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Include/Guid/IntelFrameworkModulePkgTokenSpace.h
r48674 r58466 1 1 /** @file 2 GUID for IntelFrameworkModulePkg PCD Token Space 2 GUID for IntelFrameworkModulePkg PCD Token Space 3 3 4 4 Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 7 7 The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php. 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 8 http://opensource.org/licenses/bsd-license.php. 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 **/ -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Include/Guid/LastEnumLang.h
r48674 r58466 1 1 /** @file 2 2 GUID used as EFI variable to store platform language at last time enumeration. 3 3 4 4 Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 7 7 The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php. 8 http://opensource.org/licenses/bsd-license.php. 9 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 … … 17 17 18 18 /// 19 /// This GUID is used for Set/Get platform language into/from variable at last time enumeration 19 /// This GUID is used for Set/Get platform language into/from variable at last time enumeration 20 20 /// to ensure the enumeration will only execute once. 21 21 /// -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Include/Guid/LegacyBios.h
r48674 r58466 1 1 /** @file 2 2 Defines a Tag GUID used to mark a UEFI legacy BIOS thunk driver based 3 on legacy BIOS services and legacy option ROM. This Tag GUID must be installed on 4 the ImageHandle of any module that follows the EFI Driver Model and uses 3 on legacy BIOS services and legacy option ROM. This Tag GUID must be installed on 4 the ImageHandle of any module that follows the EFI Driver Model and uses 5 5 the Int86() or FarCall() services of the Legacy Bios Protocol to produce 6 6 a standard UEFI I/O Protocol. … … 23 23 24 24 /// 25 /// The Global ID for the Legacy BIOS GUID that must be installed onto the ImageHandle 26 /// of any module follows the EFI Driver Model and uses the Int86() or FarCall() 25 /// The Global ID for the Legacy BIOS GUID that must be installed onto the ImageHandle 26 /// of any module follows the EFI Driver Model and uses the Int86() or FarCall() 27 27 /// services of the Legacy BIOS Protocol to produce a standard UEFI I/O Protocol. 28 28 /// -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Include/Guid/LegacyDevOrder.h
r48674 r58466 4 4 5 5 Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> 6 This program and the accompanying materials are licensed and made available under 7 the terms and conditions of the BSD License that accompanies this distribution. 6 This program and the accompanying materials are licensed and made available under 7 the terms and conditions of the BSD License that accompanies this distribution. 8 8 The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php. 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 9 http://opensource.org/licenses/bsd-license.php. 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 13 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Include/Guid/TianoDecompress.h
r48674 r58466 1 1 /** @file 2 2 Tiano Custom decompress Guid definition. 3 3 4 4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 7 7 The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php. 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 8 http://opensource.org/licenses/bsd-license.php. 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 … … 17 17 18 18 /// 19 /// The Global ID used to identify a section of an FFS file of type 20 /// EFI_SECTION_GUID_DEFINED, whose contents have been compressed using 19 /// The Global ID used to identify a section of an FFS file of type 20 /// EFI_SECTION_GUID_DEFINED, whose contents have been compressed using 21 21 /// Tiano Custom compression. 22 22 /// -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Include/Library/GenericBdsLib.h
r58459 r58466 6 6 7 7 Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR> 8 This program and the accompanying materials are licensed and made available under 9 the terms and conditions of the BSD License that accompanies this distribution. 8 This program and the accompanying materials are licensed and made available under 9 the terms and conditions of the BSD License that accompanies this distribution. 10 10 The full text of the license may be found at 11 http://opensource.org/licenses/bsd-license.php. 12 13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 http://opensource.org/licenses/bsd-license.php. 12 13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 14 14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 15 15 … … 135 135 /** 136 136 This function will enumerate all possible boot devices in the system, and 137 automatically create boot options for Network, Shell, Removable BlockIo, 138 and Non-BlockIo Simplefile devices. 139 137 automatically create boot options for Network, Shell, Removable BlockIo, 138 and Non-BlockIo Simplefile devices. 139 140 140 BDS separates EFI boot options into six types: 141 1. Network - The boot option points to the SimpleNetworkProtocol device. 141 1. Network - The boot option points to the SimpleNetworkProtocol device. 142 142 Bds will try to automatically create this type of boot option during enumeration. 143 2. Shell - The boot option points to internal flash shell. 143 2. Shell - The boot option points to internal flash shell. 144 144 Bds will try to automatically create this type of boot option during enumeration. 145 145 3. Removable BlockIo - The boot option points to a removable media … … 147 147 These devices should contain a *removable* blockIo 148 148 protocol in their device handle. 149 Bds will try to automatically create this type boot option 149 Bds will try to automatically create this type boot option 150 150 when enumerate. 151 4. Fixed BlockIo - The boot option points to a Fixed blockIo device, 151 4. Fixed BlockIo - The boot option points to a Fixed blockIo device, 152 152 such as a hard disk. 153 153 These devices should contain a *fixed* blockIo 154 154 protocol in their device handle. 155 155 BDS will skip fixed blockIo devices, and not 156 automatically create boot option for them. But BDS 157 will help to delete those fixed blockIo boot options, 156 automatically create boot option for them. But BDS 157 will help to delete those fixed blockIo boot options, 158 158 whose description rules conflict with other auto-created 159 159 boot options. 160 5. Non-BlockIo Simplefile - The boot option points to a device whose handle 160 5. Non-BlockIo Simplefile - The boot option points to a device whose handle 161 161 has SimpleFileSystem Protocol, but has no blockio 162 162 protocol. These devices do not offer blockIo 163 protocol, but BDS still can get the 163 protocol, but BDS still can get the 164 164 \EFI\BOOT\boot{machinename}.EFI by SimpleFileSystem 165 165 Protocol. 166 6. File - The boot option points to a file. These boot options are usually 166 6. File - The boot option points to a file. These boot options are usually 167 167 created by the user, either manually or with an OS loader. BDS will not delete or modify 168 these boot options. 169 168 these boot options. 169 170 170 This function will enumerate all possible boot devices in the system, and 171 automatically create boot options for Network, Shell, Removable BlockIo, 171 automatically create boot options for Network, Shell, Removable BlockIo, 172 172 and Non-BlockIo Simplefile devices. 173 173 It will excute once every boot. 174 174 175 175 @param BdsBootOptionList The header of the linked list that indexed all 176 176 current boot options. 177 177 178 @retval EFI_SUCCESS Finished all the boot device enumerations and 178 @retval EFI_SUCCESS Finished all the boot device enumerations and 179 179 created the boot option based on the boot device. 180 180 181 @retval EFI_OUT_OF_RESOURCES Failed to enumerate the boot device and create 181 @retval EFI_OUT_OF_RESOURCES Failed to enumerate the boot device and create 182 182 the boot option list. 183 183 **/ … … 191 191 Build the boot option with the handle parsed in. 192 192 193 @param Handle The handle representing the device path for which 193 @param Handle The handle representing the device path for which 194 194 to create a boot option. 195 195 @param BdsBootOptionList The header of the link list that indexed all … … 284 284 @param VariableSize Returns the size of the EFI variable that was read. 285 285 286 @return Dynamically allocated memory that contains a copy 287 of the EFI variable. The caller is responsible for 286 @return Dynamically allocated memory that contains a copy 287 of the EFI variable. The caller is responsible for 288 288 freeing the buffer. 289 289 @retval NULL The variable was not read. … … 367 367 // 368 368 /** 369 This function connects all system drivers with the corresponding controllers. 369 This function connects all system drivers with the corresponding controllers. 370 370 371 371 **/ … … 408 408 409 409 /** 410 This function will connect all current system handles recursively. 411 gBS->ConnectController() service is invoked for each handle exist in system handler buffer. 410 This function will connect all current system handles recursively. 411 gBS->ConnectController() service is invoked for each handle exist in system handler buffer. 412 412 If the handle is bus type handler, all childrens also will be connected recursively by gBS->ConnectController(). 413 413 414 414 @retval EFI_SUCCESS All handles and child handles have been 415 connected. 415 connected. 416 416 @retval EFI_STATUS Return the status of gBS->LocateHandleBuffer(). 417 417 **/ … … 423 423 424 424 /** 425 This function will disconnect all current system handles. 426 gBS->DisconnectController() is invoked for each handle exists in system handle buffer. 425 This function will disconnect all current system handles. 426 gBS->DisconnectController() is invoked for each handle exists in system handle buffer. 427 427 If handle is a bus type handle, all childrens also are disconnected recursively by gBS->DisconnectController(). 428 428 429 429 @retval EFI_SUCCESS All handles have been disconnected. 430 430 @retval EFI_STATUS Error status returned by of gBS->LocateHandleBuffer(). … … 536 536 // 537 537 /** 538 Delete the instance in Multi that overlaps with Single. 538 Delete the instance in Multi that overlaps with Single. 539 539 540 540 @param Multi A pointer to a multi-instance device path data … … 564 564 structure. 565 565 566 @retval TRUE If the Single device path is contained within a 566 @retval TRUE If the Single device path is contained within a 567 567 Multi device path. 568 @retval FALSE The Single device path is not contained within a 568 @retval FALSE The Single device path is not contained within a 569 569 Multi device path. 570 570 … … 658 658 Add the legacy boot options from BBS table if they do not exist. 659 659 660 @retval EFI_SUCCESS The boot options were added successfully, 660 @retval EFI_SUCCESS The boot options were added successfully, 661 661 or they are already in boot options. 662 662 @retval EFI_NOT_FOUND No legacy boot options is found. … … 671 671 672 672 /** 673 Add the legacy boot devices from BBS table into 673 Add the legacy boot devices from BBS table into 674 674 the legacy device boot order. 675 675 … … 690 690 691 691 @param Entry The boot option is to be checked for a refreshed BBS table. 692 692 693 693 @retval EFI_SUCCESS The boot priority for BBS entries refreshed successfully. 694 694 @retval EFI_NOT_FOUND BBS entries can't be found. … … 859 859 /** 860 860 Expand a device path that starts with a hard drive media device path node to be a 861 full device path that includes the full hardware path to the device. This function enables the device to boot. 861 full device path that includes the full hardware path to the device. This function enables the device to boot. 862 862 To avoid requiring a connect on every boot, the front match is saved in a variable (the part point 863 863 to the partition node. E.g. ACPI() /PCI()/ATA()/Partition() ). … … 876 876 IN HARDDRIVE_DEVICE_PATH *HardDriveDevicePath 877 877 ); 878 878 879 879 /** 880 880 Return the bootable media handle. … … 893 893 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath 894 894 ); 895 895 896 896 897 897 /** … … 942 942 943 943 @retval BDS_EFI_MEDIA_HD_BOOT The given device path contains MEDIA_DEVICE_PATH type device path node, 944 whose subtype is MEDIA_HARDDRIVE_DP. 945 @retval BDS_EFI_MEDIA_CDROM_BOOT If given device path contains MEDIA_DEVICE_PATH type device path node, 946 whose subtype is MEDIA_CDROM_DP. 947 @retval BDS_EFI_ACPI_FLOPPY_BOOT A given device path contains ACPI_DEVICE_PATH type device path node, 948 whose HID is floppy device. 949 @retval BDS_EFI_MESSAGE_ATAPI_BOOT A given device path contains MESSAGING_DEVICE_PATH type device path node, 950 and its last device path node's subtype is MSG_ATAPI_DP. 944 whose subtype is MEDIA_HARDDRIVE_DP. 945 @retval BDS_EFI_MEDIA_CDROM_BOOT If given device path contains MEDIA_DEVICE_PATH type device path node, 946 whose subtype is MEDIA_CDROM_DP. 947 @retval BDS_EFI_ACPI_FLOPPY_BOOT A given device path contains ACPI_DEVICE_PATH type device path node, 948 whose HID is floppy device. 949 @retval BDS_EFI_MESSAGE_ATAPI_BOOT A given device path contains MESSAGING_DEVICE_PATH type device path node, 950 and its last device path node's subtype is MSG_ATAPI_DP. 951 951 @retval BDS_EFI_MESSAGE_SCSI_BOOT A given device path contains MESSAGING_DEVICE_PATH type device path node, 952 and its last device path node's subtype is MSG_SCSI_DP. 953 @retval BDS_EFI_MESSAGE_USB_DEVICE_BOOT A given device path contains MESSAGING_DEVICE_PATH type device path node, 952 and its last device path node's subtype is MSG_SCSI_DP. 953 @retval BDS_EFI_MESSAGE_USB_DEVICE_BOOT A given device path contains MESSAGING_DEVICE_PATH type device path node, 954 954 and its last device path node's subtype is MSG_USB_DP. 955 @retval BDS_EFI_MESSAGE_MISC_BOOT The device path does not contain any media device path node, and 956 its last device path node points to a message device path node. 957 @retval BDS_LEGACY_BBS_BOOT A given device path contains BBS_DEVICE_PATH type device path node. 958 @retval BDS_EFI_UNSUPPORT An EFI Removable BlockIO device path does not point to a media and message device. 955 @retval BDS_EFI_MESSAGE_MISC_BOOT The device path does not contain any media device path node, and 956 its last device path node points to a message device path node. 957 @retval BDS_LEGACY_BBS_BOOT A given device path contains BBS_DEVICE_PATH type device path node. 958 @retval BDS_EFI_UNSUPPORT An EFI Removable BlockIO device path does not point to a media and message device. 959 959 960 960 **/ … … 976 976 VOID 977 977 ); 978 978 979 979 /** 980 980 Identify a user and, if authenticated, returns the current user profile handle. 981 981 982 982 @param[out] User Points to the user profile handle. 983 983 984 984 @retval EFI_SUCCESS The user is successfully identified, or user identification 985 985 is not supported. … … 991 991 BdsLibUserIdentify ( 992 992 OUT EFI_USER_PROFILE_HANDLE *User 993 ); 993 ); 994 994 995 995 /** … … 1031 1031 1032 1032 @retval EFI_SUCCESS The specific Usb device is connected successfully. 1033 @retval EFI_INVALID_PARAMETER Invalid HostControllerPi (not 0x00, 0x20 or 0xFF) 1033 @retval EFI_INVALID_PARAMETER Invalid HostControllerPi (not 0x00, 0x20 or 0xFF) 1034 1034 or RemainingDevicePath is not the USB class device path. 1035 1035 @retval EFI_NOT_FOUND The device specified by device path is not found. … … 1042 1042 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath 1043 1043 ); 1044 1044 1045 1045 1046 1046 // … … 1099 1099 1100 1100 /** 1101 Use SystemTable ConOut to turn on video based Simple Text Out consoles. The 1101 Use SystemTable ConOut to turn on video based Simple Text Out consoles. The 1102 1102 Simple Text Out screens will now be synced up with all non-video output devices. 1103 1103 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Include/Library/PlatformBdsLib.h
r48674 r58466 1 1 /** @file 2 Platform BDS library definition. A platform can implement 2 Platform BDS library definition. A platform can implement 3 3 instances to support platform-specific behavior. 4 4 5 5 Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR> 6 This program and the accompanying materials are licensed and made available under 7 the terms and conditions of the BSD License that accompanies this distribution. 6 This program and the accompanying materials are licensed and made available under 7 the terms and conditions of the BSD License that accompanies this distribution. 8 8 The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php. 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 9 http://opensource.org/licenses/bsd-license.php. 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 13 … … 55 55 56 56 **/ 57 typedef 57 typedef 58 58 EFI_STATUS 59 59 (EFIAPI *PROCESS_CAPSULES)( … … 93 93 94 94 /** 95 Hook point for a user-provided function, for after a boot attempt fails. 95 Hook point for a user-provided function, for after a boot attempt fails. 96 96 97 97 @param Option A pointer to Boot Option that failed to boot. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Include/Protocol/IsaAcpi.h
r48674 r58466 4 4 5 5 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 6 This program and the accompanying materials are licensed and made available under 7 the terms and conditions of the BSD License that accompanies this distribution. 6 This program and the accompanying materials are licensed and made available under 7 the terms and conditions of the BSD License that accompanies this distribution. 8 8 The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php. 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 9 http://opensource.org/licenses/bsd-license.php. 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 13 … … 72 72 73 73 /// 74 /// EFI ISA ACPI resource type 74 /// EFI ISA ACPI resource type 75 75 /// 76 76 typedef enum { … … 78 78 EfiIsaAcpiResourceIo, ///< ISA I/O port resource range. 79 79 EfiIsaAcpiResourceMemory, ///< ISA MMIO resource range. 80 EfiIsaAcpiResourceDma, ///< ISA DMA resource. 80 EfiIsaAcpiResourceDma, ///< ISA DMA resource. 81 81 EfiIsaAcpiResourceInterrupt ///< ISA interrupt resource. 82 82 } EFI_ISA_ACPI_RESOURCE_TYPE; … … 113 113 This service allows all the ISA controllers on an ISA bus to be enumerated. If 114 114 Device is a pointer to a NULL value, then the first ISA controller on the ISA 115 bus is returned in Device and EFI_SUCCESS is returned. If Device is a pointer 116 to a value that was returned on a prior call to DeviceEnumerate(), then the next 115 bus is returned in Device and EFI_SUCCESS is returned. If Device is a pointer 116 to a value that was returned on a prior call to DeviceEnumerate(), then the next 117 117 ISA controller on the ISA bus is returned in Device and EFI_SUCCESS is returned. 118 If Device is a pointer to the last ISA controller on the ISA bus, then 118 If Device is a pointer to the last ISA controller on the ISA bus, then 119 119 EFI_NOT_FOUND is returned. 120 120 … … 136 136 Sets the power state of an ISA controller. 137 137 138 This services sets the power state of the ISA controller specified by Device to 139 the power state specified by OnOff. TRUE denotes on, FALSE denotes off. 138 This services sets the power state of the ISA controller specified by Device to 139 the power state specified by OnOff. TRUE denotes on, FALSE denotes off. 140 140 If the power state is sucessfully set on the ISA Controller, then 141 141 EFI_SUCCESS is returned. … … 156 156 IN BOOLEAN OnOff 157 157 ); 158 158 159 159 /** 160 160 Retrieves the current set of resources associated with an ISA controller. 161 161 162 Retrieves the set of I/O, MMIO, DMA, and interrupt resources currently 162 Retrieves the set of I/O, MMIO, DMA, and interrupt resources currently 163 163 assigned to the ISA controller specified by Device. These resources 164 164 are returned in ResourceList. … … 210 210 @param[in] This The pointer to the EFI_ISA_ACPI_PROTOCOL instance. 211 211 @param[in] Device The pointer to an ISA controller named by ACPI HID/UID. 212 @param[in] ResourceList The pointer to a resources list that must be one of the 212 @param[in] ResourceList The pointer to a resources list that must be one of the 213 213 resource lists returned by GetPosResource() for the 214 214 ISA controller specified by Device. … … 224 224 IN EFI_ISA_ACPI_DEVICE_ID *Device, 225 225 IN EFI_ISA_ACPI_RESOURCE_LIST *ResourceList 226 ); 226 ); 227 227 228 228 /** … … 244 244 IN EFI_ISA_ACPI_DEVICE_ID *Device, 245 245 IN BOOLEAN Enable 246 ); 246 ); 247 247 248 248 /** … … 262 262 IN EFI_ISA_ACPI_PROTOCOL *This, 263 263 IN EFI_ISA_ACPI_DEVICE_ID *Device 264 ); 265 266 /** 267 Initializes all the HW states required for the ISA controllers on the ISA bus 264 ); 265 266 /** 267 Initializes all the HW states required for the ISA controllers on the ISA bus 268 268 to be enumerated and managed by the rest of the services in this prorotol. 269 269 This service must be called before any of the other services in this 270 270 protocol will function as expected. 271 271 272 272 @param[in] This The pointer to the EFI_ISA_ACPI_PROTOCOL instance. 273 273 … … 284 284 /// 285 285 /// The EFI_ISA_ACPI_PROTOCOL provides the services to enumerate and manage 286 /// ISA controllers on an ISA bus. These services include the ability to initialize, 287 /// enable, disable, and manage the power state of ISA controllers. It also 288 /// includes services to query current resources, query possible resources, 286 /// ISA controllers on an ISA bus. These services include the ability to initialize, 287 /// enable, disable, and manage the power state of ISA controllers. It also 288 /// includes services to query current resources, query possible resources, 289 289 /// and assign resources to an ISA controller. 290 290 /// … … 301 301 302 302 extern EFI_GUID gEfiIsaAcpiProtocolGuid; 303 303 304 304 #endif -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Include/Protocol/IsaIo.h
r48674 r58466 1 1 /** @file 2 ISA I/O Protocol is used by ISA device drivers to perform I/O, MMIO and DMA 2 ISA I/O Protocol is used by ISA device drivers to perform I/O, MMIO and DMA 3 3 operations on the ISA controllers they manage. 4 4 5 5 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 6 This program and the accompanying materials are licensed and made available under 7 the terms and conditions of the BSD License that accompanies this distribution. 6 This program and the accompanying materials are licensed and made available under 7 the terms and conditions of the BSD License that accompanies this distribution. 8 8 The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php. 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 9 http://opensource.org/licenses/bsd-license.php. 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 13 … … 85 85 /// 86 86 /// Provides both read and write access to system memory by both the processor 87 /// and a bus master. The buffer is coherent from both the processor's and the 87 /// and a bus master. The buffer is coherent from both the processor's and the 88 88 /// bus master's point of view. 89 89 /// … … 103 103 Performs ISA I/O and MMIO Read/Write Cycles 104 104 105 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 105 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 106 106 @param[in] Width Specifies the width of the I/O or MMIO operation. 107 @param[in] Offset The offset into the ISA I/O or MMIO space to start the 108 operation. 107 @param[in] Offset The offset into the ISA I/O or MMIO space to start the 108 operation. 109 109 @param[in] Count The number of I/O or MMIO operations to perform. 110 @param[in, out] Buffer For read operations, the destination buffer to store 111 the results. For write operations, the source buffer to 112 write data from. 113 110 @param[in, out] Buffer For read operations, the destination buffer to store 111 the results. For write operations, the source buffer to 112 write data from. 113 114 114 @retval EFI_SUCCESS The data was successfully read from or written to the device. 115 115 @retval EFI_UNSUPPORTED The Offset is not valid for this device. … … 172 172 173 173 This function returns the device-specific addresses required to access system memory. 174 This function is used to map system memory for ISA DMA operations. All ISA DMA 175 operations must be performed through their mapped addresses, and such mappings must 174 This function is used to map system memory for ISA DMA operations. All ISA DMA 175 operations must be performed through their mapped addresses, and such mappings must 176 176 be freed with EFI_ISA_IO_PROTOCOL.Unmap() after the DMA operation is completed. 177 178 If the DMA operation is a single read or write data transfer through an ISA bus 179 master, then EfiIsaIoOperationBusMasterRead or EfiIsaIoOperationBusMasterWrite 177 178 If the DMA operation is a single read or write data transfer through an ISA bus 179 master, then EfiIsaIoOperationBusMasterRead or EfiIsaIoOperationBusMasterWrite 180 180 is used and the range is unmapped to complete the operation. If the DMA operation 181 is a single read or write data transfer through an ISA slave controller, then 182 EfiIsaIoOperationSlaveRead or EfiIsaIoOperationSlaveWrite is used and the range 183 is unmapped to complete the operation. 184 185 If performing a DMA read operation, all the data must be present in system memory before the Map() is performed. Similarly, 186 if performing a DMA write operation, the data must not be accessed in system 187 memory until EFI_ISA_IO_PROTOCOL.Unmap() is performed. Bus master operations that 188 require both read and write access or require multiple host device interactions 189 within the same mapped region must use EfiIsaIoOperationBusMasterCommonBuffer. 190 However, only memory allocated via the EFI_ISA_IO_PROTOCOL.AllocateBuffer() interface 191 is guaranteed to be able to be mapped for this operation type. In all mapping 181 is a single read or write data transfer through an ISA slave controller, then 182 EfiIsaIoOperationSlaveRead or EfiIsaIoOperationSlaveWrite is used and the range 183 is unmapped to complete the operation. 184 185 If performing a DMA read operation, all the data must be present in system memory before the Map() is performed. Similarly, 186 if performing a DMA write operation, the data must not be accessed in system 187 memory until EFI_ISA_IO_PROTOCOL.Unmap() is performed. Bus master operations that 188 require both read and write access or require multiple host device interactions 189 within the same mapped region must use EfiIsaIoOperationBusMasterCommonBuffer. 190 However, only memory allocated via the EFI_ISA_IO_PROTOCOL.AllocateBuffer() interface 191 is guaranteed to be able to be mapped for this operation type. In all mapping 192 192 requests the NumberOfBytes returned may be less than originally requested. It is 193 193 the caller's responsibility to make additional requests to complete the entire … … 195 195 196 196 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 197 @param[in] Operation Indicates the type of DMA (slave or bus master), 198 and if the DMA operation is going to read or 199 write to system memory. 200 @param[in] ChannelNumber The slave channel number to use for this DMA 201 operation. If Operation and ChannelAttributes 202 shows that this device performs bus mastering 203 DMA, then this field is ignored. The legal 197 @param[in] Operation Indicates the type of DMA (slave or bus master), 198 and if the DMA operation is going to read or 199 write to system memory. 200 @param[in] ChannelNumber The slave channel number to use for this DMA 201 operation. If Operation and ChannelAttributes 202 shows that this device performs bus mastering 203 DMA, then this field is ignored. The legal 204 204 range for this field is 0..7. 205 205 @param[in] ChannelAttributes A bitmask of the attributes used to configure 206 the slave DMA channel for this DMA operation. 206 the slave DMA channel for this DMA operation. 207 207 See EFI_ISA_IO_SLAVE_DMA_ATTRIBUTE_* for the 208 208 legal bit combinations. 209 209 @param[in] HostAddress The system memory address to map to the device. 210 @param[in, out] NumberOfBytes On input the number of bytes to map. On 210 @param[in, out] NumberOfBytes On input the number of bytes to map. On 211 211 output the number of bytes that were mapped. 212 @param[out] DeviceAddress The resulting map address for the bus master 213 device to use to access the hosts HostAddress. 212 @param[out] DeviceAddress The resulting map address for the bus master 213 device to use to access the hosts HostAddress. 214 214 @param[out] Mapping A returned value that must be passed to into 215 EFI_ISA_IO_PROTOCOL.Unmap() to free all the the 215 EFI_ISA_IO_PROTOCOL.Unmap() to free all the the 216 216 resources associated with this map request. 217 217 … … 240 240 Unmaps a memory region that was previously mapped with EFI_ISA_IO_PROTOCOL.Map(). 241 241 242 The EFI_ISA_IO_PROTOCOL.Map() operation is completed and any corresponding 243 resources are released. If the operation was EfiIsaIoOperationSlaveWrite 244 or EfiIsaIoOperationBusMasterWrite, the data is committed to system memory. 242 The EFI_ISA_IO_PROTOCOL.Map() operation is completed and any corresponding 243 resources are released. If the operation was EfiIsaIoOperationSlaveWrite 244 or EfiIsaIoOperationBusMasterWrite, the data is committed to system memory. 245 245 Any resources used for the mapping are freed. 246 246 … … 260 260 /** 261 261 Allocates pages that are suitable for an EfiIsaIoOperationBusMasterCommonBuffer 262 mapping. 262 mapping. 263 263 264 264 @param[in] This A pointer to the EFI_ISA_IO_PROTOCOL instance. 265 @param[in] Type The type allocation to perform. 265 @param[in] Type The type allocation to perform. 266 266 @param[in] MemoryType The type of memory to allocate. 267 267 @param[in] Pages The number of pages to allocate. … … 326 326 327 327 /// 328 /// The EFI_ISA_IO_PROTOCOL provides the basic Memory, I/O, and DMA interfaces 329 /// used to abstract accesses to ISA controllers. There is one EFI_ISA_IO_PROTOCOL 330 /// instance for each ISA controller on a ISA bus. A device driver that wishes 331 /// to manage an ISA controller in a system will have to retrieve the 328 /// The EFI_ISA_IO_PROTOCOL provides the basic Memory, I/O, and DMA interfaces 329 /// used to abstract accesses to ISA controllers. There is one EFI_ISA_IO_PROTOCOL 330 /// instance for each ISA controller on a ISA bus. A device driver that wishes 331 /// to manage an ISA controller in a system will have to retrieve the 332 332 /// ISA_PCI_IO_PROTOCOL instance associated with the ISA controller. 333 333 /// … … 351 351 UINT32 RomSize; 352 352 /// 353 /// A pointer to the in memory copy of the ROM image. The ISA Bus Driver is responsible 353 /// A pointer to the in memory copy of the ROM image. The ISA Bus Driver is responsible 354 354 /// for allocating memory for the ROM image, and copying the contents of the ROM to memory 355 355 /// during ISA Bus initialization. 356 /// 356 /// 357 357 VOID *RomImage; 358 358 }; -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Include/Protocol/OEMBadging.h
r48674 r58466 1 1 /** @file 2 The OEM Badging Protocol defines the interface to get the OEM badging 2 The OEM Badging Protocol defines the interface to get the OEM badging 3 3 image with the display attribute. This protocol can be produced based on OEM badging images. 4 4 5 5 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 6 This program and the accompanying materials are licensed and made available under 7 the terms and conditions of the BSD License that accompanies this distribution. 6 This program and the accompanying materials are licensed and made available under 7 the terms and conditions of the BSD License that accompanies this distribution. 8 8 The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php. 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 9 http://opensource.org/licenses/bsd-license.php. 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 13 … … 54 54 @param Instance The visible image instance is found. 55 55 @param Format The format of the image. Examples: BMP, JPEG. 56 @param ImageData The image data for the badge file. Currently only 57 supports the .bmp file format. 56 @param ImageData The image data for the badge file. Currently only 57 supports the .bmp file format. 58 58 @param ImageSize The size of the image returned. 59 59 @param Attribute The display attributes of the image returned. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Include/Protocol/Ps2Policy.h
r48674 r58466 3 3 4 4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 7 7 The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php. 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 8 http://opensource.org/licenses/bsd-license.php. 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 13 13 **/ -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Include/Protocol/VgaMiniPort.h
r48674 r58466 3 3 4 4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 5 This program and the accompanying materials are licensed and made available under 6 the terms and conditions of the BSD License that accompanies this distribution. 7 7 The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php. 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 8 http://opensource.org/licenses/bsd-license.php. 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 … … 31 31 /** 32 32 Sets the text display mode of a VGA controller. 33 34 Sets the text display mode of the VGA controller to the mode specified by 35 ModeNumber. A ModeNumber of 0 is a request for an 80x25 text mode. A 33 34 Sets the text display mode of the VGA controller to the mode specified by 35 ModeNumber. A ModeNumber of 0 is a request for an 80x25 text mode. A 36 36 ModeNumber of 1 is a request for an 80x50 text mode. If ModeNumber is greater 37 than MaxModeNumber, then EFI_UNSUPPORTED is returned. If the VGA controller 37 than MaxModeNumber, then EFI_UNSUPPORTED is returned. If the VGA controller 38 38 is not functioning properly, then EFI_DEVICE_ERROR is returned. If the VGA 39 controller is sucessfully set to the mode number specified by ModeNumber, then 39 controller is sucessfully set to the mode number specified by ModeNumber, then 40 40 EFI_SUCCESS is returned. 41 41 42 42 @param[in] This A pointer to the EFI_VGA_MINI_PORT_PROTOCOL instance. 43 43 @param[in] ModeNumber The requested mode number. 0 for 80x25. 1 for 80x5. … … 46 46 @retval EFI_UNSUPPORTED The mode number specified by ModeNumber is not supported. 47 47 @retval EFI_DEVICE_ERROR The device is not functioning properly. 48 48 49 49 **/ 50 50 typedef … … 70 70 UINT64 CrtcDataRegisterOffset; 71 71 /// 72 /// PCI Controller MMIO BAR index of the VGA text mode frame buffer. Typically 72 /// PCI Controller MMIO BAR index of the VGA text mode frame buffer. Typically 73 73 /// set to EFI_PCI_IO_PASS_THROUGH_BAR 74 74 /// 75 75 UINT8 VgaMemoryBar; 76 76 /// 77 /// PCI Controller I/O BAR index of the VGA CRTC address register. Typically 77 /// PCI Controller I/O BAR index of the VGA CRTC address register. Typically 78 78 /// set to EFI_PCI_IO_PASS_THROUGH_BAR 79 79 /// 80 80 UINT8 CrtcAddressRegisterBar; 81 81 /// 82 /// PCI Controller I/O BAR index of the VGA CRTC data register. Typically set 82 /// PCI Controller I/O BAR index of the VGA CRTC data register. Typically set 83 83 /// to EFI_PCI_IO_PASS_THROUGH_BAR 84 84 /// -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
-
Property svn:eol-style
set to
native
r58459 r58466 52 52 ## Include/Guid/LegacyBios.h 53 53 gEfiLegacyBiosGuid = { 0x2E3044AC, 0x879F, 0x490F, { 0x97, 0x60, 0xBB, 0xDF, 0xAF, 0x69, 0x5F, 0x50 }} 54 54 55 55 ## Include/Guid/LegacyDevOrder.h 56 56 gEfiLegacyDevOrderVariableGuid = { 0xa56074db, 0x65fe, 0x45f7, {0xbd, 0x21, 0x2d, 0x2b, 0xdd, 0x8e, 0x96, 0x52 }} … … 58 58 ## Include/Guid/CapsuleDataFile.h 59 59 gEfiUpdateDataFileGuid = { 0x283fa2ee, 0x532c, 0x484d, { 0x93, 0x83, 0x9f, 0x93, 0xb3, 0x6f, 0xb, 0x7e }} 60 60 61 61 ## Include/Guid/BlockIoVendor.h 62 62 gBlockIoVendorGuid = { 0xcf31fac5, 0xc24e, 0x11d2, {0x85, 0xf3, 0x0, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b }} 63 63 64 64 ## Include/Guid/BdsHii.h 65 65 gFrontPageFormSetGuid = { 0x9e0c30bc, 0x3f06, 0x4ba6, {0x82, 0x88, 0x9, 0x17, 0x9b, 0x85, 0x5d, 0xbe }} … … 69 69 gBootMaintFormSetGuid = { 0x642237c7, 0x35d4, 0x472d, {0x83, 0x65, 0x12, 0xe0, 0xcc, 0xf2, 0x7a, 0x22 }} 70 70 gFileExploreFormSetGuid = { 0x1f2d63e1, 0xfebd, 0x4dc7, {0x9c, 0xc5, 0xba, 0x2b, 0x1c, 0xef, 0x9c, 0x5b }} 71 71 72 72 ## Include/Guid/BdsLibHii.h 73 73 gBdsLibStringPackageGuid = { 0x3b4d9b23, 0x95ac, 0x44f6, {0x9f, 0xcd, 0xe, 0x95, 0x94, 0x58, 0x6c, 0x72 }} 74 74 75 75 ## Include/Guid/LastEnumLang.h 76 76 gLastEnumLangGuid = { 0xe8c545b, 0xa2ee, 0x470d, {0x8e, 0x26, 0xbd, 0xa1, 0xa1, 0x3c, 0xa, 0xa3 }} … … 142 142 gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPs2KbdExtendedVerification|TRUE|BOOLEAN|0x00010045 143 143 144 ## Indicates if Framework Acpi Support protocol is installed.<BR><BR> 144 ## Indicates if Framework Acpi Support protocol is installed.<BR><BR> 145 145 # TRUE - Install Framework Acpi Support protocol.<BR> 146 146 # FALSE - Doesn't install Framework Acpi Support protocol.<BR> … … 189 189 gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBootState|TRUE|BOOLEAN|0x0001002f 190 190 191 ## The number of seconds that the firmware will wait before initiating the original default boot selection. 192 # A value of 0 indicates that the default boot selection is to be initiated immediately on boot. 191 ## The number of seconds that the firmware will wait before initiating the original default boot selection. 192 # A value of 0 indicates that the default boot selection is to be initiated immediately on boot. 193 193 # The value of 0xFFFF then firmware will wait for user input before booting. 194 194 # @Prompt Boot Timeout (s) 195 195 gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0xffff|UINT16|0x40000001 196 196 197 ## Error level for hardware recorder. 197 ## Error level for hardware recorder. 198 198 # If value 0, platform does not support feature of hardware error record. 199 199 # @Prompt Error Level For Hardware Recorder … … 211 211 # @Prompt Video Horizontal Resolution of Text Setup 212 212 gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdSetupVideoHorizontalResolution|800|UINT32|0x50000001 213 213 214 214 ## Specify the video vertical resolution of text setup. 215 215 # @Prompt Video Vertical Resolution of Text Setup … … 219 219 # @Prompt Console Output Column of Text Setup 220 220 gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdSetupConOutColumn|80|UINT32|0x50000003 221 221 222 222 ## Specify the console output row of text setup. 223 223 # @Prompt Console Output Row of Text Setup … … 256 256 257 257 ## Specify memory size with bytes to reserve EBDA below 640K for OPROM. 258 # The value should be a multiple of 4KB. 258 # The value should be a multiple of 4KB. 259 259 # @Prompt Reserved EBDA Memory Size 260 260 # @Expression 0x80000001 | (gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdEbdaReservedMemorySize < 0xA0000) AND ((gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdEbdaReservedMemorySize & 0x1000) == 0) … … 262 262 263 263 ## Specify memory base address for OPROM to find free memory. 264 # Some OPROMs do not use EBDA or PMM to allocate memory for its usage, 264 # Some OPROMs do not use EBDA or PMM to allocate memory for its usage, 265 265 # instead they find the memory filled with zero from 0x20000. 266 266 # The value should be a multiple of 4KB. 267 # The range should be below the EBDA reserved range from 267 # The range should be below the EBDA reserved range from 268 268 # (CONVENTIONAL_MEMORY_TOP - Reserved EBDA Memory Size) to CONVENTIONAL_MEMORY_TOP. 269 269 gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdOpromReservedMemoryBase|0x60000|UINT32|0x3000000c 270 270 271 271 ## Specify memory size with bytes for OPROM to find free memory. 272 # The value should be a multiple of 4KB. And the range should be below the EBDA reserved range from 272 # The value should be a multiple of 4KB. And the range should be below the EBDA reserved range from 273 273 # (CONVENTIONAL_MEMORY_TOP - Reserved EBDA Memory Size) to CONVENTIONAL_MEMORY_TOP. 274 274 gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdOpromReservedMemorySize|0x28000|UINT32|0x3000000d 275 275 276 276 ## Specify memory size with page number for a pre-allocated reserved memory to be used 277 # by PEI in S3 phase. The default size 32K. When changing the value make sure the memory size 277 # by PEI in S3 phase. The default size 32K. When changing the value make sure the memory size 278 278 # is large enough to meet PEI requirement in the S3 phase. 279 279 # @Prompt Reserved S3 Boot ACPI Memory Size … … 281 281 282 282 ## Specify memory size for boot script executor stack usage in S3 phase. 283 # The default size 32K. When changing the value make sure the memory size is large enough 283 # The default size 32K. When changing the value make sure the memory size is large enough 284 284 # to meet boot script executor requirement in the S3 phase. 285 285 # @Prompt Reserved S3 Boot Script Stack ACPI Memory Size … … 291 291 # @Expression 0x80000001 | gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdEndOpromShadowAddress < 0x100000 292 292 gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdEndOpromShadowAddress|0xdffff|UINT32|0x30000008 293 293 294 294 ## Specify the low PMM (Post Memory Manager) size with bytes below 1MB. 295 295 # The value should be a multiple of 4KB. … … 297 297 # @Expression 0x80000001 | (gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLowPmmMemorySize < 0x100000) AND ((gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLowPmmMemorySize & 0x1000) == 0) 298 298 gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLowPmmMemorySize|0x10000|UINT32|0x30000009 299 299 300 300 ## Specify the high PMM (Post Memory Manager) size with bytes above 1MB. 301 301 # The value should be a multiple of 4KB. -
Property svn:eol-style
set to
-
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
r58459 r58466 5 5 # 6 6 #Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> 7 #This program and the accompanying materials are licensed and made available under 8 #the terms and conditions of the BSD License that accompanies this distribution. 7 #This program and the accompanying materials are licensed and made available under 8 #the terms and conditions of the BSD License that accompanies this distribution. 9 9 #The full text of the license may be found at 10 #http://opensource.org/licenses/bsd-license.php. 10 #http://opensource.org/licenses/bsd-license.php. 11 11 # 12 12 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 13 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 14 # 15 ## 15 ## 16 16 17 17 ################################################################################ … … 43 43 DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf 44 44 DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf 45 DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf 45 DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf 46 46 BaseLib|MdePkg/Library/BaseLib/BaseLib.inf 47 47 SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf … … 93 93 [LibraryClasses.common.DXE_RUNTIME_DRIVER] 94 94 DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf 95 95 96 96 ################################################################################ 97 97 # … … 175 175 [Components.IA32,Components.X64,Components.IPF] 176 176 IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosDxe.inf 177 177 178 178 [Components.IA32] 179 179 IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.inf … … 189 189 IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf 190 190 } 191 191 192 192 [Components.IPF] 193 193 IntelFrameworkModulePkg/Universal/CpuIoDxe/CpuIoDxe.inf { -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
r58459 r58466 1 1 /** @file 2 UEFI and Tiano Custom Decompress Library 2 UEFI and Tiano Custom Decompress Library 3 3 It will do Tiano or UEFI decompress with different verison parameter. 4 4 5 5 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 6 This program and the accompanying materials 7 are licensed and made available under the terms and conditions of the BSD License 8 which accompanies this distribution. The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 6 This program and the accompanying materials 7 are licensed and made available under the terms and conditions of the BSD License 8 which accompanies this distribution. The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 13 14 14 **/ … … 18 18 /** 19 19 Shift mBitBuf NumOfBits left. Read in NumOfBits of bits from source. 20 20 21 21 @param Sd The global scratch data 22 @param NumOfBits The number of bits to shift and read. 22 @param NumOfBits The number of bits to shift and read. 23 23 **/ 24 24 VOID … … 63 63 // 64 64 Sd->mBitCount = (UINT16) (Sd->mBitCount - NumOfBits); 65 65 66 66 // 67 67 // Copy NumOfBits of bits from mSubBitBuf into mBitBuf … … 73 73 Get NumOfBits of bits out from mBitBuf 74 74 75 Get NumOfBits of bits out from mBitBuf. Fill mBitBuf with subsequent 76 NumOfBits of bits from source. Returns NumOfBits of bits that are 75 Get NumOfBits of bits out from mBitBuf. Fill mBitBuf with subsequent 76 NumOfBits of bits from source. Returns NumOfBits of bits that are 77 77 popped out. 78 78 … … 93 93 // 94 94 // Pop NumOfBits of Bits from Left 95 // 95 // 96 96 OutBits = (UINT32) (Sd->mBitBuf >> (BITBUFSIZ - NumOfBits)); 97 97 … … 107 107 Creates Huffman Code mapping table according to code length array. 108 108 109 Creates Huffman Code mapping table for Extra Set, Char&Len Set 109 Creates Huffman Code mapping table for Extra Set, Char&Len Set 110 110 and Position Set according to code length array. 111 111 If TableBits > 16, then ASSERT (). … … 158 158 Count[BitLen[Index]]++; 159 159 } 160 160 161 161 Start[0] = 0; 162 162 Start[1] = 0; … … 174 174 175 175 JuBits = (UINT16) (16 - TableBits); 176 176 177 177 Weight[0] = 0; 178 178 for (Index = 1; Index <= TableBits; Index++) { … … 183 183 while (Index <= 16) { 184 184 Weight[Index] = (UINT16) (1U << (16 - Index)); 185 Index++; 185 Index++; 186 186 } 187 187 … … 224 224 *Pointer = Avail++; 225 225 } 226 226 227 227 if (*Pointer < (2 * NC - 1)) { 228 228 if ((Index3 & Mask) != 0) { … … 251 251 /** 252 252 Decodes a position value. 253 253 254 254 Get a position value according to Position Huffman Table. 255 255 256 256 @param Sd the global scratch data 257 257 258 258 @return The position value decoded. 259 259 **/ … … 326 326 ASSERT (nn <= NPT); 327 327 // 328 // Read Extra Set Code Length Array size 328 // Read Extra Set Code Length Array size 329 329 // 330 330 Number = (UINT16) GetBits (Sd, nbit); … … 353 353 // 354 354 // If a code length is less than 7, then it is encoded as a 3-bit 355 // value. Or it is encoded as a series of "1"s followed by a 355 // value. Or it is encoded as a series of "1"s followed by a 356 356 // terminating "0". The number of "1"s = Code length - 4. 357 357 // … … 363 363 } 364 364 } 365 365 366 366 FillBuf (Sd, (UINT16) ((CharC < 7) ? 3 : CharC - 3)); 367 367 368 368 Sd->mPTLen[Index++] = (UINT8) CharC; 369 370 // 371 // For Code&Len Set, 369 370 // 371 // For Code&Len Set, 372 372 // After the third length of the code length concatenation, 373 // a 2-bit value is used to indicated the number of consecutive 373 // a 2-bit value is used to indicated the number of consecutive 374 374 // zero lengths after the third length. 375 375 // … … 385 385 Sd->mPTLen[Index++] = 0; 386 386 } 387 387 388 388 return MakeTable (Sd, nn, Sd->mPTLen, 8, Sd->mPTTable); 389 389 } … … 391 391 /** 392 392 Reads code lengths for Char&Len Set. 393 393 394 394 Read in and decode the Char&Len Set Code Length Array, then 395 395 generate the Huffman Code mapping table for the Char&Len Set. … … 478 478 /** 479 479 Decode a character/length value. 480 480 481 481 Read one value from mBitBuf, Get one code from mBitBuf. If it is at block boundary, generates 482 482 Huffman code mapping table for Extra Set, Code&Len Set and … … 500 500 // Starting a new block 501 501 // Read BlockSize from block header 502 // 502 // 503 503 Sd->mBlockSize = (UINT16) GetBits (Sd, 16); 504 504 … … 519 519 520 520 // 521 // Read in the Position Set Code Length Arrary, 521 // Read in the Position Set Code Length Arrary, 522 522 // Generate the Huffman code mapping table for the Position Set. 523 523 // … … 557 557 /** 558 558 Decode the source data and put the resulting data into the destination buffer. 559 559 560 560 @param Sd The global scratch data 561 561 **/ … … 576 576 // 577 577 // Get one code from mBitBuf 578 // 578 // 579 579 CharC = DecodeC (Sd); 580 580 if (Sd->mBadTableFlag != 0) { … … 600 600 // 601 601 CharC = (UINT16) (CharC - (BIT8 - THRESHOLD)); 602 602 603 603 // 604 604 // Get string length … … 631 631 632 632 /** 633 Given a compressed source buffer, this function retrieves the size of 634 the uncompressed buffer and the size of the scratch buffer required 633 Given a compressed source buffer, this function retrieves the size of 634 the uncompressed buffer and the size of the scratch buffer required 635 635 to decompress the compressed source buffer. 636 636 637 Retrieves the size of the uncompressed buffer and the temporary scratch buffer 637 Retrieves the size of the uncompressed buffer and the temporary scratch buffer 638 638 required to decompress the buffer specified by Source and SourceSize. 639 639 If the size of the uncompressed buffer or the size of the scratch buffer cannot 640 be determined from the compressed data specified by Source and SourceData, 640 be determined from the compressed data specified by Source and SourceData, 641 641 then RETURN_INVALID_PARAMETER is returned. Otherwise, the size of the uncompressed 642 642 buffer is returned in DestinationSize, the size of the scratch buffer is returned 643 643 in ScratchSize, and RETURN_SUCCESS is returned. 644 This function does not have scratch buffer available to perform a thorough 644 This function does not have scratch buffer available to perform a thorough 645 645 checking of the validity of the source data. It just retrieves the "Original Size" 646 646 field from the beginning bytes of the source data and output it as DestinationSize. … … 657 657 by Source and SourceSize is decompressed.. 658 658 @param ScratchSize A pointer to the size, in bytes, of the scratch buffer that 659 is required to decompress the compressed buffer specified 659 is required to decompress the compressed buffer specified 660 660 by Source and SourceSize. 661 661 662 @retval RETURN_SUCCESS The size of the uncompressed data was returned 663 in DestinationSize and the size of the scratch 662 @retval RETURN_SUCCESS The size of the uncompressed data was returned 663 in DestinationSize and the size of the scratch 664 664 buffer was returned in ScratchSize. 665 @retval RETURN_INVALID_PARAMETER 666 The size of the uncompressed data or the size of 667 the scratch buffer cannot be determined from 668 the compressed data specified by Source 665 @retval RETURN_INVALID_PARAMETER 666 The size of the uncompressed data or the size of 667 the scratch buffer cannot be determined from 668 the compressed data specified by Source 669 669 and SourceSize. 670 670 **/ … … 705 705 This function is designed so that the decompression algorithm can be implemented 706 706 without using any memory services. As a result, this function is not allowed to 707 call any memory allocation services in its implementation. It is the caller's 707 call any memory allocation services in its implementation. It is the caller's 708 708 responsibility to allocate and free the Destination and Scratch buffers. 709 If the compressed source data specified by Source is successfully decompressed 710 into Destination, then RETURN_SUCCESS is returned. If the compressed source data 709 If the compressed source data specified by Source is successfully decompressed 710 into Destination, then RETURN_SUCCESS is returned. If the compressed source data 711 711 specified by Source is not in a valid compressed data format, 712 712 then RETURN_INVALID_PARAMETER is returned. … … 719 719 @param Destination The destination buffer to store the decompressed data 720 720 @param Scratch A temporary scratch buffer that is used to perform the decompression. 721 This is an optional parameter that may be NULL if the 721 This is an optional parameter that may be NULL if the 722 722 required scratch buffer size is 0. 723 723 @param Version 1 for UEFI Decompress algoruthm, 2 for Tiano Decompess algorithm. 724 724 725 @retval RETURN_SUCCESS Decompression completed successfully, and 725 @retval RETURN_SUCCESS Decompression completed successfully, and 726 726 the uncompressed buffer is returned in Destination. 727 @retval RETURN_INVALID_PARAMETER 728 The source buffer specified by Source is corrupted 727 @retval RETURN_INVALID_PARAMETER 728 The source buffer specified by Source is corrupted 729 729 (not in a valid compressed format). 730 730 **/ … … 816 816 This function is designed so that the decompression algorithm can be implemented 817 817 without using any memory services. As a result, this function is not allowed to 818 call any memory allocation services in its implementation. It is the caller's 818 call any memory allocation services in its implementation. It is the caller's 819 819 responsibility to allocate and free the Destination and Scratch buffers. 820 If the compressed source data specified by Source is successfully decompressed 821 into Destination, then RETURN_SUCCESS is returned. If the compressed source data 820 If the compressed source data specified by Source is successfully decompressed 821 into Destination, then RETURN_SUCCESS is returned. If the compressed source data 822 822 specified by Source is not in a valid compressed data format, 823 823 then RETURN_INVALID_PARAMETER is returned. … … 830 830 @param Destination The destination buffer to store the decompressed data 831 831 @param Scratch A temporary scratch buffer that is used to perform the decompression. 832 This is an optional parameter that may be NULL if the 832 This is an optional parameter that may be NULL if the 833 833 required scratch buffer size is 0. 834 834 835 @retval RETURN_SUCCESS Decompression completed successfully, and 835 @retval RETURN_SUCCESS Decompression completed successfully, and 836 836 the uncompressed buffer is returned in Destination. 837 @retval RETURN_INVALID_PARAMETER 838 The source buffer specified by Source is corrupted 837 @retval RETURN_INVALID_PARAMETER 838 The source buffer specified by Source is corrupted 839 839 (not in a valid compressed format). 840 840 **/ … … 854 854 size of an optional scratch buffer required to actually decode the data in a GUIDed section. 855 855 856 Examines a GUIDed section specified by InputSection. 856 Examines a GUIDed section specified by InputSection. 857 857 If GUID for InputSection does not match the GUID that this handler supports, 858 then RETURN_UNSUPPORTED is returned. 858 then RETURN_UNSUPPORTED is returned. 859 859 If the required information can not be retrieved from InputSection, 860 860 then RETURN_INVALID_PARAMETER is returned. … … 863 863 the size of an optional scratch buffer is returned in ScratchSize, and the Attributes field 864 864 from EFI_GUID_DEFINED_SECTION header of InputSection is returned in SectionAttribute. 865 865 866 866 If InputSection is NULL, then ASSERT(). 867 867 If OutputBufferSize is NULL, then ASSERT(). … … 906 906 } 907 907 // 908 // Get guid attribute of guid section. 908 // Get guid attribute of guid section. 909 909 // 910 910 *SectionAttribute = ((EFI_GUID_DEFINED_SECTION2 *) InputSection)->Attributes; … … 926 926 } 927 927 // 928 // Get guid attribute of guid section. 928 // Get guid attribute of guid section. 929 929 // 930 930 *SectionAttribute = ((EFI_GUID_DEFINED_SECTION *) InputSection)->Attributes; … … 944 944 /** 945 945 Decompress a Tiano compressed GUIDed section into a caller allocated output buffer. 946 947 Decodes the GUIDed section specified by InputSection. 948 If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned. 946 947 Decodes the GUIDed section specified by InputSection. 948 If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned. 949 949 If the data in InputSection can not be decoded, then RETURN_INVALID_PARAMETER is returned. 950 950 If the GUID of InputSection does match the GUID that this handler supports, then InputSection … … 953 953 data in InputSection, then OutputBuffer is set to point at the data in InputSection. Otherwise, 954 954 the decoded data will be placed in caller allocated buffer specified by OutputBuffer. 955 955 956 956 If InputSection is NULL, then ASSERT(). 957 957 If OutputBuffer is NULL, then ASSERT(). … … 961 961 962 962 @param[in] InputSection A pointer to a GUIDed section of an FFS formatted file. 963 @param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation. 963 @param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation. 964 964 @param[in] ScratchBuffer A caller allocated buffer that may be required by this function 965 as a scratch buffer to perform the decode operation. 966 @param[out] AuthenticationStatus 965 as a scratch buffer to perform the decode operation. 966 @param[out] AuthenticationStatus 967 967 A pointer to the authentication status of the decoded output buffer. 968 968 See the definition of authentication status in the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLibInternals.h
r48674 r58466 116 116 Creates Huffman Code mapping table according to code length array. 117 117 118 Creates Huffman Code mapping table for Extra Set, Char&Len Set 118 Creates Huffman Code mapping table for Extra Set, Char&Len Set 119 119 and Position Set according to code length array. 120 120 … … 142 142 143 143 Get a position value according to Position Huffman Table. 144 144 145 145 @param Sd the global scratch data 146 146 … … 178 178 /** 179 179 Reads code lengths for Char&Len Set. 180 180 181 181 Read in and decode the Char&Len Set Code Length Array, then 182 182 generate the Huffman Code mapping table for the Char&Len Set. … … 192 192 /** 193 193 Decode a character/length value. 194 194 195 195 Read one value from mBitBuf, Get one code from mBitBuf. If it is at block boundary, generates 196 196 Huffman code mapping table for Extra Set, Code&Len Set and -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/DxeCapsuleLib/DxeCapsuleLib.c
r58459 r58466 83 83 if (ItemNum == FmpCapsuleHeader->EmbeddedDriverCount) { 84 84 // 85 // No payload element 85 // No payload element 86 86 // 87 87 if (((UINT8 *)FmpCapsuleHeader + ItemOffsetList[ItemNum - 1]) < EndOfCapsule) { … … 124 124 125 125 /** 126 Process Firmware management protocol data capsule. 126 Process Firmware management protocol data capsule. 127 127 128 128 @param CapsuleHeader Points to a capsule header. … … 188 188 189 189 // 190 // 1. ConnectAll to ensure 191 // All the communication protocol required by driver in capsule installed 190 // 1. ConnectAll to ensure 191 // All the communication protocol required by driver in capsule installed 192 192 // All FMP protocols are installed 193 193 // … … 196 196 197 197 // 198 // 2. Try to load & start all the drivers within capsule 198 // 2. Try to load & start all the drivers within capsule 199 199 // 200 200 SetDevicePathNodeLength (&MemMapNode.Header, sizeof (MemMapNode)); … … 233 233 234 234 Status = gBS->StartImage( 235 ImageHandle, 236 &ExitDataSize, 235 ImageHandle, 236 &ExitDataSize, 237 237 NULL 238 238 ); … … 244 244 245 245 // 246 // Connnect all again to connect drivers within capsule 246 // Connnect all again to connect drivers within capsule 247 247 // 248 248 if (FmpCapsuleHeader->EmbeddedDriverCount > 0) { … … 321 321 for (Index2 = 0; Index2 < FmpImageInfoCount; Index2++) { 322 322 // 323 // Check all the payload entry in capsule payload list 323 // Check all the payload entry in capsule payload list 324 324 // 325 325 for (Index = FmpCapsuleHeader->EmbeddedDriverCount; Index < ItemNum; Index++) { -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/ReportStatusCodeLib.c
r48674 r58466 107 107 } 108 108 } 109 109 110 110 // 111 111 // A status code service is present in system, so pass in all the parameters to the service. … … 113 113 return (*mReportStatusCode) (Type, Value, Instance, (EFI_GUID *)CallerId, Data); 114 114 } 115 115 116 116 return EFI_UNSUPPORTED; 117 117 } … … 509 509 Tpl = gBS->RaiseTPL (TPL_HIGH_LEVEL); 510 510 gBS->RestoreTPL (Tpl); 511 511 512 512 StatusCodeData = NULL; 513 513 if (Tpl <= TPL_NOTIFY) { -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
r58460 r58466 418 418 419 419 FreePool (Buffer); 420 420 421 421 Buffer = NULL; 422 422 … … 579 579 } 580 580 } 581 581 582 582 // 583 583 // Skip Non-Legacy boot option 584 // 584 // 585 585 if (!BdsIsLegacyBootOption (BootOptionVar, &BbsEntry, &BbsIndex)) { 586 586 if (BootOptionVar!= NULL) { … … 789 789 Add the legacy boot options from BBS table if they do not exist. 790 790 791 @retval EFI_SUCCESS The boot options are added successfully 791 @retval EFI_SUCCESS The boot options are added successfully 792 792 or they are already in boot options. 793 793 @retval EFI_NOT_FOUND No legacy boot options is found. … … 939 939 @param BbsCount The BBS Count. 940 940 941 @retval EFI_SUCCES The buffer is created and the EFI variable named 941 @retval EFI_SUCCES The buffer is created and the EFI variable named 942 942 VAR_LEGACY_DEV_ORDER and gEfiLegacyDevOrderVariableGuid is 943 943 set correctly. … … 1030 1030 DevOrderPtr->Length = (UINT16) (sizeof (UINT16) + HDCount * sizeof (UINT16)); 1031 1031 DevOrderPtr = (LEGACY_DEV_ORDER_ENTRY *) BdsFillDevOrderBuf (BbsTable, BBS_HARDDISK, BbsCount, DevOrderPtr->Data); 1032 1032 1033 1033 DevOrderPtr->BbsType = BBS_CDROM; 1034 1034 DevOrderPtr->Length = (UINT16) (sizeof (UINT16) + CDCount * sizeof (UINT16)); 1035 1035 DevOrderPtr = (LEGACY_DEV_ORDER_ENTRY *) BdsFillDevOrderBuf (BbsTable, BBS_CDROM, BbsCount, DevOrderPtr->Data); 1036 1036 1037 1037 DevOrderPtr->BbsType = BBS_EMBED_NETWORK; 1038 1038 DevOrderPtr->Length = (UINT16) (sizeof (UINT16) + NETCount * sizeof (UINT16)); … … 1061 1061 1062 1062 /** 1063 Add the legacy boot devices from BBS table into 1063 Add the legacy boot devices from BBS table into 1064 1064 the legacy device boot order. 1065 1065 … … 1279 1279 } 1280 1280 NewNETPtr = NewPtr->Data; 1281 1281 1282 1282 // 1283 1283 // copy BEV … … 1503 1503 1504 1504 @param Entry The boot option is to be checked for refresh BBS table. 1505 1505 1506 1506 @retval EFI_SUCCESS The boot priority for BBS entries is refreshed successfully. 1507 1507 @retval EFI_NOT_FOUND BBS entries can't be found. … … 1705 1705 TPL_NOTIFY, 1706 1706 WriteBootToOsPerformanceData, 1707 NULL, 1707 NULL, 1708 1708 &LegacyBootEvent 1709 1709 ); … … 2554 2554 EFI_ERROR_CODE | EFI_ERROR_MINOR, 2555 2555 (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR) 2556 ); 2556 ); 2557 2557 goto Done; 2558 2558 } -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConnect.c
r58459 r58466 110 110 } 111 111 CopyOfDevicePath = DevicePath; 112 112 113 113 do { 114 114 // … … 123 123 return EFI_OUT_OF_RESOURCES; 124 124 } 125 125 126 126 Next = Instance; 127 127 while (!IsDevicePathEndType (Next)) { … … 204 204 205 205 /** 206 This function will connect all current system handles recursively. 207 206 This function will connect all current system handles recursively. 207 208 208 gBS->ConnectController() service is invoked for each handle exist in system handler buffer. 209 209 If the handle is bus type handler, all childrens also will be connected recursively … … 248 248 249 249 /** 250 This function will disconnect all current system handles. 251 250 This function will disconnect all current system handles. 251 252 252 gBS->DisconnectController() is invoked for each handle exists in system handle buffer. 253 253 If handle is a bus type handle, all childrens also are disconnected recursively by -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c
r58460 r58466 1359 1359 1360 1360 /** 1361 This routine adjust the memory information for different memory type and 1361 This routine adjust the memory information for different memory type and 1362 1362 save them into the variables for next boot. 1363 1363 **/ … … 1571 1571 @param VendorGuid A unique identifier for the vendor. 1572 1572 @param Attributes Attributes bitmask to set for the variable. 1573 @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, 1574 EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, or 1575 EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero 1576 causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is 1577 set, then a SetVariable() call with a DataSize of zero will not cause any change to 1578 the variable value (the timestamp associated with the variable may be updated however 1579 even if no new data value is provided,see the description of the 1580 EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not 1581 be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). 1573 @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, 1574 EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, or 1575 EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero 1576 causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is 1577 set, then a SetVariable() call with a DataSize of zero will not cause any change to 1578 the variable value (the timestamp associated with the variable may be updated however 1579 even if no new data value is provided,see the description of the 1580 EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not 1581 be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). 1582 1582 @param Data The contents for the variable. 1583 1583 … … 1591 1591 @retval EFI_WRITE_PROTECTED The variable in question is read-only. 1592 1592 @retval EFI_WRITE_PROTECTED The variable in question cannot be deleted. 1593 @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 1594 or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo 1593 @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 1594 or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo 1595 1595 does NOT pass the validation check carried out by the firmware. 1596 1596 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
r58459 r58466 1 1 ## @file 2 2 # General BDS library. 3 # 3 # 4 4 # General BDS defines and produce general interfaces for platform BDS driver including: 5 5 # 1) BDS boot policy interface; 6 6 # 2) BDS boot device connect interface; 7 7 # 3) BDS Misc interfaces for mainting boot variable, ouput string, etc. 8 # 8 # 9 9 # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> 10 10 # This program and the accompanying materials … … 12 12 # which accompanies this distribution. The full text of the license may be found at 13 13 # http://opensource.org/licenses/bsd-license.php 14 # 14 # 15 15 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 16 16 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 17 # 17 # 18 18 ## 19 19 … … 25 25 MODULE_TYPE = DXE_DRIVER 26 26 VERSION_STRING = 1.0 27 LIBRARY_CLASS = GenericBdsLib|DXE_DRIVER DXE_RUNTIME_DRIVER UEFI_APPLICATION 27 LIBRARY_CLASS = GenericBdsLib|DXE_DRIVER DXE_RUNTIME_DRIVER UEFI_APPLICATION 28 28 CONSTRUCTOR = GenericBdsLibConstructor 29 29 … … 45 45 String.c 46 46 GenericBdsStrings.uni 47 47 48 48 [Packages] 49 49 MdePkg/MdePkg.dec … … 77 77 ## SOMETIMES_CONSUMES ## Variable:L"MemoryTypeInformation" 78 78 ## SOMETIMES_PRODUCES ## Variable:L"MemoryTypeInformation" 79 gEfiMemoryTypeInformationGuid 79 gEfiMemoryTypeInformationGuid 80 80 ## SOMETIMES_CONSUMES ## Variable:L"BootXXXX" # Boot option variable 81 81 ## SOMETIMES_PRODUCES ## Variable:L"BootXXXX" # Boot option variable … … 141 141 142 142 # 143 # [BootMode] 143 # [BootMode] 144 144 # RECOVERY_FULL ## SOMETIMES_CONSUMES # Memory Type Information variable 145 145 # -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsStrings.uni
-
Property svn:mime-type
changed from
application/octet-stream
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
-
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h
r58459 r58466 134 134 135 135 /** 136 This routine adjust the memory information for different memory type and 136 This routine adjust the memory information for different memory type and 137 137 save them into the variables for next boot. 138 138 **/ … … 152 152 153 153 **/ 154 BOOLEAN 154 BOOLEAN 155 155 ValidateOption ( 156 156 UINT8 *Variable, … … 167 167 @param VendorGuid A unique identifier for the vendor. 168 168 @param Attributes Attributes bitmask to set for the variable. 169 @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, 170 EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, or 171 EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero 172 causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is 173 set, then a SetVariable() call with a DataSize of zero will not cause any change to 174 the variable value (the timestamp associated with the variable may be updated however 175 even if no new data value is provided,see the description of the 176 EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not 177 be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). 169 @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, 170 EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, or 171 EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero 172 causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is 173 set, then a SetVariable() call with a DataSize of zero will not cause any change to 174 the variable value (the timestamp associated with the variable may be updated however 175 even if no new data value is provided,see the description of the 176 EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not 177 be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). 178 178 @param Data The contents for the variable. 179 179 … … 187 187 @retval EFI_WRITE_PROTECTED The variable in question is read-only. 188 188 @retval EFI_WRITE_PROTECTED The variable in question cannot be deleted. 189 @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 190 or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo 189 @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 190 or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo 191 191 does NOT pass the validation check carried out by the firmware. 192 192 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c
r58459 r58466 188 188 189 189 Freq = GetPerformanceCounterProperties (&StartValue, &EndValue); 190 190 191 191 Freq = DivU64x32 (Freq, 1000); 192 192 … … 252 252 PerfEntriesAsDxeHandle = AllocateZeroPool (NumPerfEntries * sizeof (BOOLEAN)); 253 253 ASSERT (PerfEntriesAsDxeHandle != NULL); 254 254 255 255 // 256 256 // Get DXE drivers performance -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/F86GuidedSectionExtraction.c
r58464 r58466 1 1 /** @file 2 LZMA Decompress GUIDed Section Extraction Library, which produces LZMA custom 2 LZMA Decompress GUIDed Section Extraction Library, which produces LZMA custom 3 3 decompression algorithm with the converter for the different arch code. 4 4 It wraps Lzma decompress interfaces to GUIDed Section Extraction interfaces … … 23 23 size of an scratch buffer required to actually decode the data in a GUIDed section. 24 24 25 Examines a GUIDed section specified by InputSection. 25 Examines a GUIDed section specified by InputSection. 26 26 If GUID for InputSection does not match the GUID that this handler supports, 27 then RETURN_UNSUPPORTED is returned. 27 then RETURN_UNSUPPORTED is returned. 28 28 If the required information can not be retrieved from InputSection, 29 29 then RETURN_INVALID_PARAMETER is returned. … … 32 32 the size of an optional scratch buffer is returned in ScratchSize, and the Attributes field 33 33 from EFI_GUID_DEFINED_SECTION header of InputSection is returned in SectionAttribute. 34 34 35 35 If InputSection is NULL, then ASSERT(). 36 36 If OutputBufferSize is NULL, then ASSERT(). … … 101 101 /** 102 102 Decompress a LZAM compressed GUIDed section into a caller allocated output buffer. 103 104 Decodes the GUIDed section specified by InputSection. 105 If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned. 103 104 Decodes the GUIDed section specified by InputSection. 105 If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned. 106 106 If the data in InputSection can not be decoded, then RETURN_INVALID_PARAMETER is returned. 107 107 If the GUID of InputSection does match the GUID that this handler supports, then InputSection … … 110 110 data in InputSection, then OutputBuffer is set to point at the data in InputSection. Otherwise, 111 111 the decoded data will be placed in caller allocated buffer specified by OutputBuffer. 112 112 113 113 If InputSection is NULL, then ASSERT(). 114 114 If OutputBuffer is NULL, then ASSERT(). … … 118 118 119 119 @param[in] InputSection A pointer to a GUIDed section of an FFS formatted file. 120 @param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation. 120 @param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation. 121 121 @param[out] ScratchBuffer A caller allocated buffer that may be required by this function 122 as a scratch buffer to perform the decode operation. 123 @param[out] AuthenticationStatus 122 as a scratch buffer to perform the decode operation. 123 @param[out] AuthenticationStatus 124 124 A pointer to the authentication status of the decoded output buffer. 125 125 See the definition of authentication status in the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI … … 148 148 UINT32 OutputBufferSize; 149 149 UINT32 ScratchBufferSize; 150 150 151 151 ASSERT (OutputBuffer != NULL); 152 152 ASSERT (InputSection != NULL); … … 179 179 180 180 // 181 // After decompress, the data need to be converted to the raw data. 181 // After decompress, the data need to be converted to the raw data. 182 182 // 183 183 if (!EFI_ERROR (Status)) { … … 188 188 &ScratchBufferSize 189 189 ); 190 190 191 191 if (!EFI_ERROR (Status)) { 192 192 x86_Convert_Init(X86State); … … 194 194 } 195 195 } 196 196 197 197 return Status; 198 198 } -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/GuidedSectionExtraction.c
r48674 r58466 21 21 size of an scratch buffer required to actually decode the data in a GUIDed section. 22 22 23 Examines a GUIDed section specified by InputSection. 23 Examines a GUIDed section specified by InputSection. 24 24 If GUID for InputSection does not match the GUID that this handler supports, 25 then RETURN_UNSUPPORTED is returned. 25 then RETURN_UNSUPPORTED is returned. 26 26 If the required information can not be retrieved from InputSection, 27 27 then RETURN_INVALID_PARAMETER is returned. … … 30 30 the size of an optional scratch buffer is returned in ScratchSize, and the Attributes field 31 31 from EFI_GUID_DEFINED_SECTION header of InputSection is returned in SectionAttribute. 32 32 33 33 If InputSection is NULL, then ASSERT(). 34 34 If OutputBufferSize is NULL, then ASSERT(). … … 99 99 /** 100 100 Decompress a LZAM compressed GUIDed section into a caller allocated output buffer. 101 102 Decodes the GUIDed section specified by InputSection. 103 If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned. 101 102 Decodes the GUIDed section specified by InputSection. 103 If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned. 104 104 If the data in InputSection can not be decoded, then RETURN_INVALID_PARAMETER is returned. 105 105 If the GUID of InputSection does match the GUID that this handler supports, then InputSection … … 108 108 data in InputSection, then OutputBuffer is set to point at the data in InputSection. Otherwise, 109 109 the decoded data will be placed in caller allocated buffer specified by OutputBuffer. 110 110 111 111 If InputSection is NULL, then ASSERT(). 112 112 If OutputBuffer is NULL, then ASSERT(). … … 116 116 117 117 @param[in] InputSection A pointer to a GUIDed section of an FFS formatted file. 118 @param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation. 118 @param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation. 119 119 @param[out] ScratchBuffer A caller allocated buffer that may be required by this function 120 as a scratch buffer to perform the decode operation. 121 @param[out] AuthenticationStatus 120 as a scratch buffer to perform the decode operation. 121 @param[out] AuthenticationStatus 122 122 A pointer to the authentication status of the decoded output buffer. 123 123 See the definition of authentication status in the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI … … 197 197 LzmaGuidedSectionGetInfo, 198 198 LzmaGuidedSectionExtraction 199 ); 199 ); 200 200 } 201 201 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaArchCustomDecompressLib.inf
r58464 r58466 44 44 Sdk/C/LzHash.h 45 45 Sdk/C/LzmaDec.h 46 Sdk/C/Types.h 46 Sdk/C/Types.h 47 47 UefiLzma.h 48 48 LzmaDecompressLibInternal.h -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
r58459 r58466 43 43 Sdk/C/LzHash.h 44 44 Sdk/C/LzmaDec.h 45 Sdk/C/Types.h 45 Sdk/C/Types.h 46 46 GuidedSectionExtraction.c 47 47 UefiLzma.h -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaDecompress.c
r48674 r58466 106 106 107 107 /** 108 Given a Lzma compressed source buffer, this function retrieves the size of 109 the uncompressed buffer and the size of the scratch buffer required 108 Given a Lzma compressed source buffer, this function retrieves the size of 109 the uncompressed buffer and the size of the scratch buffer required 110 110 to decompress the compressed source buffer. 111 111 112 Retrieves the size of the uncompressed buffer and the temporary scratch buffer 112 Retrieves the size of the uncompressed buffer and the temporary scratch buffer 113 113 required to decompress the buffer specified by Source and SourceSize. 114 The size of the uncompressed buffer is returned in DestinationSize, 114 The size of the uncompressed buffer is returned in DestinationSize, 115 115 the size of the scratch buffer is returned in ScratchSize, and RETURN_SUCCESS is returned. 116 This function does not have scratch buffer available to perform a thorough 116 This function does not have scratch buffer available to perform a thorough 117 117 checking of the validity of the source data. It just retrieves the "Original Size" 118 118 field from the LZMA_HEADER_SIZE beginning bytes of the source data and output it as DestinationSize. … … 127 127 by Source and SourceSize is decompressed. 128 128 @param ScratchSize A pointer to the size, in bytes, of the scratch buffer that 129 is required to decompress the compressed buffer specified 129 is required to decompress the compressed buffer specified 130 130 by Source and SourceSize. 131 131 132 @retval RETURN_SUCCESS The size of the uncompressed data was returned 133 in DestinationSize and the size of the scratch 132 @retval RETURN_SUCCESS The size of the uncompressed data was returned 133 in DestinationSize and the size of the scratch 134 134 buffer was returned in ScratchSize. 135 135 … … 159 159 160 160 Extracts decompressed data to its original form. 161 If the compressed source data specified by Source is successfully decompressed 162 into Destination, then RETURN_SUCCESS is returned. If the compressed source data 161 If the compressed source data specified by Source is successfully decompressed 162 into Destination, then RETURN_SUCCESS is returned. If the compressed source data 163 163 specified by Source is not in a valid compressed data format, 164 164 then RETURN_INVALID_PARAMETER is returned. … … 168 168 @param Destination The destination buffer to store the decompressed data 169 169 @param Scratch A temporary scratch buffer that is used to perform the decompression. 170 This is an optional parameter that may be NULL if the 170 This is an optional parameter that may be NULL if the 171 171 required scratch buffer size is 0. 172 173 @retval RETURN_SUCCESS Decompression completed successfully, and 172 173 @retval RETURN_SUCCESS Decompression completed successfully, and 174 174 the uncompressed buffer is returned in Destination. 175 @retval RETURN_INVALID_PARAMETER 176 The source buffer specified by Source is corrupted 175 @retval RETURN_INVALID_PARAMETER 176 The source buffer specified by Source is corrupted 177 177 (not in a valid compressed format). 178 178 **/ … … 196 196 AllocFuncs.Buffer = Scratch; 197 197 AllocFuncs.BufferSize = SCRATCH_BUFFER_REQUEST_SIZE; 198 198 199 199 DecodedBufSize = (SizeT)GetDecodedSizeOfBuf((UINT8*)Source); 200 200 EncodedDataSize = (SizeT) (SourceSize - LZMA_HEADER_SIZE); -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaDecompressLibInternal.h
r48674 r58466 24 24 25 25 /** 26 Given a Lzma compressed source buffer, this function retrieves the size of 27 the uncompressed buffer and the size of the scratch buffer required 26 Given a Lzma compressed source buffer, this function retrieves the size of 27 the uncompressed buffer and the size of the scratch buffer required 28 28 to decompress the compressed source buffer. 29 29 30 Retrieves the size of the uncompressed buffer and the temporary scratch buffer 30 Retrieves the size of the uncompressed buffer and the temporary scratch buffer 31 31 required to decompress the buffer specified by Source and SourceSize. 32 The size of the uncompressed buffer is returned in DestinationSize, 32 The size of the uncompressed buffer is returned in DestinationSize, 33 33 the size of the scratch buffer is returned in ScratchSize, and RETURN_SUCCESS is returned. 34 This function does not have scratch buffer available to perform a thorough 34 This function does not have scratch buffer available to perform a thorough 35 35 checking of the validity of the source data. It just retrieves the "Original Size" 36 36 field from the LZMA_HEADER_SIZE beginning bytes of the source data and output it as DestinationSize. … … 45 45 by Source and SourceSize is decompressed. 46 46 @param ScratchSize A pointer to the size, in bytes, of the scratch buffer that 47 is required to decompress the compressed buffer specified 47 is required to decompress the compressed buffer specified 48 48 by Source and SourceSize. 49 49 50 @retval RETURN_SUCCESS The size of the uncompressed data was returned 51 in DestinationSize and the size of the scratch 50 @retval RETURN_SUCCESS The size of the uncompressed data was returned 51 in DestinationSize and the size of the scratch 52 52 buffer was returned in ScratchSize. 53 53 … … 66 66 67 67 Extracts decompressed data to its original form. 68 If the compressed source data specified by Source is successfully decompressed 69 into Destination, then RETURN_SUCCESS is returned. If the compressed source data 68 If the compressed source data specified by Source is successfully decompressed 69 into Destination, then RETURN_SUCCESS is returned. If the compressed source data 70 70 specified by Source is not in a valid compressed data format, 71 71 then RETURN_INVALID_PARAMETER is returned. … … 75 75 @param Destination The destination buffer to store the decompressed data 76 76 @param Scratch A temporary scratch buffer that is used to perform the decompression. 77 This is an optional parameter that may be NULL if the 77 This is an optional parameter that may be NULL if the 78 78 required scratch buffer size is 0. 79 80 @retval RETURN_SUCCESS Decompression completed successfully, and 79 80 @retval RETURN_SUCCESS Decompression completed successfully, and 81 81 the uncompressed buffer is returned in Destination. 82 @retval RETURN_INVALID_PARAMETER 83 The source buffer specified by Source is corrupted 82 @retval RETURN_INVALID_PARAMETER 83 The source buffer specified by Source is corrupted 84 84 (not in a valid compressed format). 85 85 **/ -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/Bra.h
r58464 r58466 10 10 These functions convert relative addresses to absolute addresses 11 11 in CALL instructions to increase the compression ratio. 12 12 13 13 In: 14 14 data - data buffer … … 17 17 state - state variable for x86 converter 18 18 encoding - 0 (for decoding), 1 (for encoding) 19 19 20 20 Out: 21 21 state - state variable for x86 converter … … 24 24 The number of processed bytes. If you call these functions with multiple calls, 25 25 you must start next call with first byte after block of processed bytes. 26 26 27 27 Type Endian Alignment LookAhead 28 28 29 29 x86 little 1 4 30 30 ARMT little 2 2 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/LzFind.c
r48674 r58466 522 522 delta2 = p->pos - p->hash[hash2Value]; 523 523 curMatch = p->hash[kFix3HashSize + hashValue]; 524 524 525 525 p->hash[hash2Value] = 526 526 p->hash[kFix3HashSize + hashValue] = p->pos; … … 556 556 delta3 = p->pos - p->hash[kFix3HashSize + hash3Value]; 557 557 curMatch = p->hash[kFix4HashSize + hashValue]; 558 558 559 559 p->hash[ hash2Value] = 560 560 p->hash[kFix3HashSize + hash3Value] = -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/LzmaDec.c
r48674 r58466 167 167 SizeT dicBufSize = p->dicBufSize; 168 168 SizeT dicPos = p->dicPos; 169 169 170 170 UInt32 processedPos = p->processedPos; 171 171 UInt32 checkDicSize = p->checkDicSize; … … 351 351 NORMALIZE 352 352 range >>= 1; 353 353 354 354 { 355 355 UInt32 t; … … 749 749 (*srcLen) = 0; 750 750 LzmaDec_WriteRem(p, dicLimit); 751 751 752 752 *status = LZMA_STATUS_NOT_SPECIFIED; 753 753 … … 795 795 if (p->needInitState) 796 796 LzmaDec_InitStateReal(p); 797 797 798 798 if (p->tempBufSize == 0) 799 799 { … … 926 926 UInt32 dicSize; 927 927 Byte d; 928 928 929 929 if (size < LZMA_PROPS_SIZE) 930 930 return SZ_ERROR_UNSUPPORTED; 931 931 else 932 932 dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24); 933 933 934 934 if (dicSize < LZMA_DIC_MIN) 935 935 dicSize = LZMA_DIC_MIN; … … 1013 1013 1014 1014 LzmaDec_Init(&p); 1015 1015 1016 1016 *srcLen = inSize; 1017 1017 res = LzmaDec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status); -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/LzmaDec.h
r48674 r58466 127 127 SZ_ERROR_UNSUPPORTED - Unsupported properties 128 128 */ 129 129 130 130 SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc); 131 131 void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc); … … 156 156 157 157 /* LzmaDec_DecodeToDic 158 158 159 159 The decoding to internal dictionary buffer (CLzmaDec::dic). 160 160 You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!! -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/history.txt
r48674 r58466 15 15 ------------------------- 16 16 - The bug in ANSI-C LZMA Decoder was fixed: 17 If encoded stream was corrupted, decoder could access memory 17 If encoded stream was corrupted, decoder could access memory 18 18 outside of allocated range. 19 19 - Some changes in ANSI-C 7z Decoder interfaces. … … 29 29 ------------------------- 30 30 - The bug was fixed: 31 LZMA Encoder in fast compression mode could access memory outside of 31 LZMA Encoder in fast compression mode could access memory outside of 32 32 allocated range in some rare cases. 33 33 … … 42 42 4.57 2007-12-12 43 43 ------------------------- 44 - Speed optimizations in Ñ++ LZMA Decoder. 44 - Speed optimizations in Ñ++ LZMA Decoder. 45 45 - Small changes for more compatibility with some C/C++ compilers. 46 46 … … 52 52 - now it supports files larger than 4 GB. 53 53 - now it supports "Last Write Time" field for files. 54 - C++ code for .7z archives compressing/decompressing from 7-zip 54 - C++ code for .7z archives compressing/decompressing from 7-zip 55 55 was included to LZMA SDK. 56 56 57 57 58 58 4.43 2006-06-04 59 59 ------------------------- 60 60 - Small changes for more compatibility with some C/C++ compilers. 61 61 62 62 63 63 4.42 2006-05-15 64 64 ------------------------- 65 65 - Small changes in .h files in ANSI-C version. 66 66 67 67 68 68 4.39 beta 2006-04-14 69 69 ------------------------- 70 70 - The bug in versions 4.33b:4.38b was fixed: 71 C++ version of LZMA encoder could not correctly compress 71 C++ version of LZMA encoder could not correctly compress 72 72 files larger than 2 GB with HC4 match finder (-mfhc4). 73 73 74 74 75 75 4.37 beta 2005-04-06 76 76 ------------------------- 77 - Fixes in C++ code: code could no be compiled if _NO_EXCEPTIONS was defined. 77 - Fixes in C++ code: code could no be compiled if _NO_EXCEPTIONS was defined. 78 78 79 79 … … 81 81 ------------------------- 82 82 - The bug was fixed in C++ version of LZMA Decoder: 83 If encoded stream was corrupted, decoder could access memory 83 If encoded stream was corrupted, decoder could access memory 84 84 outside of allocated range. 85 85 … … 152 152 4.17 2005-04-18 153 153 ------------------------- 154 - New example for RAM->RAM compressing/decompressing: 154 - New example for RAM->RAM compressing/decompressing: 155 155 LZMA + BCJ (filter for x86 code): 156 156 - LzmaRam.h … … 163 163 4.16 2005-03-29 164 164 ------------------------- 165 - The bug was fixed in LzmaDecode.c (ANSI-C LZMA Decoder): 165 - The bug was fixed in LzmaDecode.c (ANSI-C LZMA Decoder): 166 166 If _LZMA_OUT_READ was defined, and if encoded stream was corrupted, 167 167 decoder could access memory outside of allocated range. 168 168 - Speed optimization of ANSI-C LZMA Decoder (now it's about 20% faster). 169 Old version of LZMA Decoder now is in file LzmaDecodeSize.c. 169 Old version of LZMA Decoder now is in file LzmaDecodeSize.c. 170 170 LzmaDecodeSize.c can provide slightly smaller code than LzmaDecode.c 171 171 - Small speed optimization in LZMA C++ code … … 182 182 4.05 2004-08-25 183 183 ------------------------- 184 - Source code of filters for x86, IA-64, ARM, ARM-Thumb 184 - Source code of filters for x86, IA-64, ARM, ARM-Thumb 185 185 and PowerPC code was included to SDK 186 186 - Some internal minor changes … … 194 194 4.03 2004-06-18 195 195 ------------------------- 196 - "Benchmark" command was added. It measures compressing 197 and decompressing speed and shows rating values. 196 - "Benchmark" command was added. It measures compressing 197 and decompressing speed and shows rating values. 198 198 Also it checks hardware errors. 199 199 … … 224 224 HISTORY of the LZMA 225 225 ------------------- 226 2001-2008: Improvements to LZMA compressing/decompressing code, 226 2001-2008: Improvements to LZMA compressing/decompressing code, 227 227 keeping compatibility with original LZMA format 228 228 1996-2001: Development of LZMA compression format … … 232 232 2001-08-30: LZMA compression was added to 7-Zip 233 233 1999-01-02: First version of 7-Zip was released 234 234 235 235 236 236 End of document -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/lzma.txt
r48674 r58466 2 2 ------------- 3 3 4 LZMA SDK provides the documentation, samples, header files, libraries, 4 LZMA SDK provides the documentation, samples, header files, libraries, 5 5 and tools you need to develop applications that use LZMA compression. 6 6 7 7 LZMA is default and general compression method of 7z format 8 in 7-Zip compression program (www.7-zip.org). LZMA provides high 8 in 7-Zip compression program (www.7-zip.org). LZMA provides high 9 9 compression ratio and very fast decompression. 10 10 11 LZMA is an improved version of famous LZ77 compression algorithm. 11 LZMA is an improved version of famous LZ77 compression algorithm. 12 12 It was improved in way of maximum increasing of compression ratio, 13 keeping high decompression speed and low memory requirements for 13 keeping high decompression speed and low memory requirements for 14 14 decompressing. 15 15 … … 31 31 32 32 33 UNIX/Linux version 33 UNIX/Linux version 34 34 ------------------ 35 35 To compile C++ version of file->file LZMA encoding, go to directory 36 C++/7zip/Compress/LZMA_Alone 36 C++/7zip/Compress/LZMA_Alone 37 37 and call make to recompile it: 38 38 make -f makefile.gcc clean all 39 39 40 40 In some UNIX/Linux versions you must compile LZMA with static libraries. 41 To compile with static libraries, you can use 41 To compile with static libraries, you can use 42 42 LIB = -lm -static 43 43 … … 60 60 Alloc.* - Memory allocation functions 61 61 Bra*.* - Filters for x86, IA-64, ARM, ARM-Thumb, PowerPC and SPARC code 62 LzFind.* - Match finder for LZ (LZMA) encoders 62 LzFind.* - Match finder for LZ (LZMA) encoders 63 63 LzFindMt.* - Match finder for LZ (LZMA) encoders for multithreading encoding 64 64 LzHash.h - Additional file for LZ match finder … … 70 70 71 71 LzmaLib - LZMA Library (.DLL for Windows) 72 72 73 73 LzmaUtil - LZMA Utility (file->file LZMA encoder/decoder). 74 74 … … 99 99 100 100 Bundles - Modules that are bundles of other modules 101 101 102 102 Alone7z - 7zr.exe: Standalone version of 7z.exe that supports only 7z/LZMA/BCJ/BCJ2 103 103 Format7zR - 7zr.dll: Reduced version of 7za.dll: extracting/compressing to 7z/LZMA/BCJ/BCJ2 … … 105 105 106 106 UI - User Interface files 107 107 108 108 Client7z - Test application for 7za.dll, 7zr.dll, 7zxr.dll 109 109 Common - Common UI files … … 140 140 - Variable dictionary size (up to 1 GB) 141 141 - Estimated compressing speed: about 2 MB/s on 2 GHz CPU 142 - Estimated decompressing speed: 142 - Estimated decompressing speed: 143 143 - 20-30 MB/s on 2 GHz Core 2 or AMD Athlon 64 144 144 - 1-2 MB/s on 200 MHz ARM, MIPS, PowerPC or other simple RISC … … 146 146 - Small code size for decompressing: 5-8 KB 147 147 148 LZMA decoder uses only integer operations and can be 148 LZMA decoder uses only integer operations and can be 149 149 implemented in any modern 32-bit CPU (or on 16-bit CPU with some conditions). 150 150 … … 155 155 156 156 The speed of LZMA decompressing mostly depends from CPU speed. 157 Memory speed has no big meaning. But if your CPU has small data cache, 157 Memory speed has no big meaning. But if your CPU has small data cache, 158 158 overall weight of memory speed will slightly increase. 159 159 … … 171 171 d: decode file 172 172 173 b: Benchmark. There are two tests: compressing and decompressing 174 with LZMA method. Benchmark shows rating in MIPS (million 175 instructions per second). Rating value is calculated from 173 b: Benchmark. There are two tests: compressing and decompressing 174 with LZMA method. Benchmark shows rating in MIPS (million 175 instructions per second). Rating value is calculated from 176 176 measured speed and it is normalized with Intel's Core 2 results. 177 Also Benchmark checks possible hardware errors (RAM 177 Also Benchmark checks possible hardware errors (RAM 178 178 errors in most cases). Benchmark uses these settings: 179 (-a1, -d21, -fb32, -mfbt4). You can change only -d parameter. 179 (-a1, -d21, -fb32, -mfbt4). You can change only -d parameter. 180 180 Also you can change the number of iterations. Example for 30 iterations: 181 181 LZMA b 30 … … 183 183 184 184 <Switches> 185 185 186 186 187 187 -a{N}: set compression mode 0 = fast, 1 = normal … … 190 190 d{N}: Sets Dictionary size - [0, 30], default: 23 (8MB) 191 191 The maximum value for dictionary size is 1 GB = 2^30 bytes. 192 Dictionary size is calculated as DictionarySize = 2^N bytes. 193 For decompressing file compressed by LZMA method with dictionary 192 Dictionary size is calculated as DictionarySize = 2^N bytes. 193 For decompressing file compressed by LZMA method with dictionary 194 194 size D = 2^N you need about D bytes of memory (RAM). 195 195 196 196 -fb{N}: set number of fast bytes - [5, 273], default: 128 197 Usually big number gives a little bit better compression ratio 197 Usually big number gives a little bit better compression ratio 198 198 and slower compression process. 199 199 … … 202 202 203 203 -lp{N}: set number of literal pos bits - [0, 4], default: 0 204 lp switch is intended for periodical data when period is 205 equal 2^N. For example, for 32-bit (4 bytes) 206 periodical data you can use lp=2. Often it's better to set lc0, 204 lp switch is intended for periodical data when period is 205 equal 2^N. For example, for 32-bit (4 bytes) 206 periodical data you can use lp=2. Often it's better to set lc0, 207 207 if you change lp switch. 208 208 209 209 -pb{N}: set number of pos bits - [0, 4], default: 2 210 pb switch is intended for periodical data 210 pb switch is intended for periodical data 211 211 when period is equal 2^N. 212 212 213 -mf{MF_ID}: set Match Finder. Default: bt4. 214 Algorithms from hc* group doesn't provide good compression 215 ratio, but they often works pretty fast in combination with 213 -mf{MF_ID}: set Match Finder. Default: bt4. 214 Algorithms from hc* group doesn't provide good compression 215 ratio, but they often works pretty fast in combination with 216 216 fast mode (-a0). 217 217 218 Memory requirements depend from dictionary size 219 (parameter "d" in table below). 218 Memory requirements depend from dictionary size 219 (parameter "d" in table below). 220 220 221 221 MF_ID Memory Description … … 226 226 hc4 d * 7.5 + 4MB Hash Chain with 4 bytes hashing. 227 227 228 -eos: write End Of Stream marker. By default LZMA doesn't write 229 eos marker, since LZMA decoder knows uncompressed size 228 -eos: write End Of Stream marker. By default LZMA doesn't write 229 eos marker, since LZMA decoder knows uncompressed size 230 230 stored in .lzma file header. 231 231 … … 236 236 Examples: 237 237 238 1) LZMA e file.bin file.lzma -d16 -lc0 239 240 compresses file.bin to file.lzma with 64 KB dictionary (2^16=64K) 241 and 0 literal context bits. -lc0 allows to reduce memory requirements 238 1) LZMA e file.bin file.lzma -d16 -lc0 239 240 compresses file.bin to file.lzma with 64 KB dictionary (2^16=64K) 241 and 0 literal context bits. -lc0 allows to reduce memory requirements 242 242 for decompression. 243 243 … … 245 245 2) LZMA e file.bin file.lzma -lc0 -lp2 246 246 247 compresses file.bin to file.lzma with settings suitable 247 compresses file.bin to file.lzma with settings suitable 248 248 for 32-bit periodical data (for example, ARM or MIPS code). 249 249 … … 259 259 --------------- 260 260 261 To increase the compression ratio for LZMA compressing it's desirable 261 To increase the compression ratio for LZMA compressing it's desirable 262 262 to have aligned data (if it's possible) and also it's desirable to locate 263 data in such order, where code is grouped in one place and data is 263 data in such order, where code is grouped in one place and data is 264 264 grouped in other place (it's better than such mixing: code, data, code, 265 265 data, ...). … … 269 269 ------- 270 270 You can increase the compression ratio for some data types, using 271 special filters before compressing. For example, it's possible to 272 increase the compression ratio on 5-10% for code for those CPU ISAs: 271 special filters before compressing. For example, it's possible to 272 increase the compression ratio on 5-10% for code for those CPU ISAs: 273 273 x86, IA-64, ARM, ARM-Thumb, PowerPC, SPARC. 274 274 275 275 You can find C source code of such filters in C/Bra*.* files 276 276 277 You can check the compression ratio gain of these filters with such 277 You can check the compression ratio gain of these filters with such 278 278 7-Zip commands (example for ARM code): 279 279 No filter: … … 281 281 282 282 With filter for little-endian ARM code: 283 7z a a2.7z a.bin -m0=arm -m1=lzma 283 7z a a2.7z a.bin -m0=arm -m1=lzma 284 284 285 285 It works in such manner: … … 289 289 Compressing and decompressing speed of such filters is very high, 290 290 so it will not increase decompressing time too much. 291 Moreover, it reduces decompression time for LZMA_decoding, 291 Moreover, it reduces decompression time for LZMA_decoding, 292 292 since compression ratio with filtering is higher. 293 293 294 These filters convert CALL (calling procedure) instructions 295 from relative offsets to absolute addresses, so such data becomes more 294 These filters convert CALL (calling procedure) instructions 295 from relative offsets to absolute addresses, so such data becomes more 296 296 compressible. 297 297 … … 323 323 ------------------------------------- 324 324 325 Stack usage of LZMA decoding function for local variables is not 325 Stack usage of LZMA decoding function for local variables is not 326 326 larger than 200-400 bytes. 327 327 … … 356 356 - Input buffer: compressed size 357 357 - Output buffer: uncompressed size 358 - LZMA Internal Structures: state_size (16 KB for default settings) 358 - LZMA Internal Structures: state_size (16 KB for default settings) 359 359 360 360 Interface: 361 361 int LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, 362 const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, 362 const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, 363 363 ELzmaStatus *status, ISzAlloc *alloc); 364 In: 364 In: 365 365 dest - output data 366 366 destLen - output data size … … 372 372 LZMA_FINISH_ANY - Decode just destLen bytes. 373 373 LZMA_FINISH_END - Stream must be finished after (*destLen). 374 You can use LZMA_FINISH_END, when you know that 375 current output buffer covers last bytes of stream. 374 You can use LZMA_FINISH_END, when you know that 375 current output buffer covers last bytes of stream. 376 376 alloc - Memory allocator. 377 377 378 Out: 379 destLen - processed output size 380 srcLen - processed input size 378 Out: 379 destLen - processed output size 380 srcLen - processed input size 381 381 382 382 Output: … … 384 384 status: 385 385 LZMA_STATUS_FINISHED_WITH_MARK 386 LZMA_STATUS_NOT_FINISHED 386 LZMA_STATUS_NOT_FINISHED 387 387 LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK 388 388 SZ_ERROR_DATA - Data error … … 397 397 1) Check Result and "status" variable. 398 398 2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize. 399 3) Check that output(srcLen) = compressedSize, if you know real compressedSize. 400 You must use correct finish mode in that case. */ 399 3) Check that output(srcLen) = compressedSize, if you know real compressedSize. 400 You must use correct finish mode in that case. */ 401 401 402 402 … … 404 404 ---------------------------------------------------- 405 405 406 When to use: file->file decompressing 406 When to use: file->file decompressing 407 407 Compile files: LzmaDec.h + LzmaDec.c + Types.h 408 408 … … 410 410 - Buffer for input stream: any size (for example, 16 KB) 411 411 - Buffer for output stream: any size (for example, 16 KB) 412 - LZMA Internal Structures: state_size (16 KB for default settings) 412 - LZMA Internal Structures: state_size (16 KB for default settings) 413 413 - LZMA dictionary (dictionary size is encoded in LZMA properties header) 414 414 … … 430 430 for (;;) 431 431 { 432 ... 433 int res = LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, 432 ... 433 int res = LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, 434 434 const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode); 435 435 ... … … 456 456 2) allocBig - for big arrays. 457 457 458 For example, you can use Large RAM Pages (2 MB) in allocBig allocator for 459 better compression speed. Note that Windows has bad implementation for 460 Large RAM Pages. 458 For example, you can use Large RAM Pages (2 MB) in allocBig allocator for 459 better compression speed. Note that Windows has bad implementation for 460 Large RAM Pages. 461 461 It's OK to use same allocator for alloc and allocBig. 462 462 … … 465 465 -------------------------------------- 466 466 467 Check C/LzmaUtil/LzmaUtil.c as example, 468 469 When to use: file->file decompressing 467 Check C/LzmaUtil/LzmaUtil.c as example, 468 469 When to use: file->file decompressing 470 470 471 471 1) you must implement callback structures for interfaces: … … 521 521 522 522 6) Call encoding function: 523 res = LzmaEnc_Encode(enc, &outStream.funcTable, &inStream.funcTable, 523 res = LzmaEnc_Encode(enc, &outStream.funcTable, &inStream.funcTable, 524 524 NULL, &g_Alloc, &g_Alloc); 525 525 … … 538 538 539 539 HRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, 540 CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, 540 CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, 541 541 ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig); 542 542 543 543 Return code: 544 544 SZ_OK - OK 545 SZ_ERROR_MEM - Memory allocation error 545 SZ_ERROR_MEM - Memory allocation error 546 546 SZ_ERROR_PARAM - Incorrect paramater 547 547 SZ_ERROR_OUTPUT_EOF - output buffer overflow … … 555 555 _LZMA_SIZE_OPT - Enable some optimizations in LZMA Decoder to get smaller executable code. 556 556 557 _LZMA_PROB32 - It can increase the speed on some 32-bit CPUs, but memory usage for 557 _LZMA_PROB32 - It can increase the speed on some 32-bit CPUs, but memory usage for 558 558 some structures will be doubled in that case. 559 559 … … 563 563 564 564 565 C++ LZMA Encoder/Decoder 565 C++ LZMA Encoder/Decoder 566 566 ~~~~~~~~~~~~~~~~~~~~~~~~ 567 C++ LZMA code use COM-like interfaces. So if you want to use it, 567 C++ LZMA code use COM-like interfaces. So if you want to use it, 568 568 you can study basics of COM/OLE. 569 569 C++ LZMA code is just wrapper over ANSI-C code. … … 583 583 return p; 584 584 } 585 If you use MSCV that throws exception for "new" operator, you can compile without 586 "NewHandler.cpp". So standard exception will be used. Actually some code of 585 If you use MSCV that throws exception for "new" operator, you can compile without 586 "NewHandler.cpp". So standard exception will be used. Actually some code of 587 587 7-Zip catches any exception in internal code and converts it to HRESULT code. 588 588 So you don't need to catch CNewException, if you call COM interfaces of 7-Zip. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
r58459 r58466 31 31 Prints a debug message to the debug output device if the specified error level is enabled. 32 32 33 If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function 34 GetDebugPrintErrorLevel (), then print the message specified by Format and the 33 If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function 34 GetDebugPrintErrorLevel (), then print the message specified by Format and the 35 35 associated variable argument list to the debug output device. 36 36 … … 42 42 @param ErrorLevel The error level of the debug message. 43 43 @param Format Format string for the debug message to print. 44 @param ... Variable argument list whose contents are accessed 44 @param ... Variable argument list whose contents are accessed 45 45 based on the format string specified by Format. 46 46 … … 76 76 // 77 77 // Compute the total size of the record. 78 // Note that the passing-in format string and variable parameters will be constructed to 78 // Note that the passing-in format string and variable parameters will be constructed to 79 79 // the following layout: 80 80 // … … 166 166 // 167 167 // Make no output if Format string terminates unexpectedly when 168 // looking up for flag, width, precision and type. 168 // looking up for flag, width, precision and type. 169 169 // 170 170 Format--; … … 176 176 break; 177 177 } 178 178 179 179 // 180 180 // Pack variable arguments into the storage area following EFI_DEBUG_INFO. … … 199 199 // 200 200 // If the converted BASE_LIST is larger than the 12 * sizeof (UINT64) allocated bytes, then ASSERT() 201 // This indicates that the DEBUG() macro is passing in more argument than can be handled by 201 // This indicates that the DEBUG() macro is passing in more argument than can be handled by 202 202 // the EFI_DEBUG_INFO record 203 203 // … … 229 229 230 230 /** 231 Prints an assert message containing a filename, line number, and description. 231 Prints an assert message containing a filename, line number, and description. 232 232 This may be followed by a breakpoint or a dead loop. 233 233 234 234 Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n" 235 to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of 236 PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if 237 DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then 238 CpuDeadLoop() is called. If neither of these bits are set, then this function 235 to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of 236 PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if 237 DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then 238 CpuDeadLoop() is called. If neither of these bits are set, then this function 239 239 returns immediately after the message is printed to the debug output device. 240 240 DebugAssert() must actively prevent recursion. If DebugAssert() is called while … … 277 277 if (HeaderSize + FileNameSize + DescriptionSize > sizeof (Buffer)) { 278 278 // 279 // FileName + Description is too long to be filled into buffer. 279 // FileName + Description is too long to be filled into buffer. 280 280 // 281 281 if (HeaderSize + FileNameSize < sizeof (Buffer)) { 282 282 // 283 // Description has enough buffer to be truncated. 283 // Description has enough buffer to be truncated. 284 284 // 285 285 DescriptionSize = sizeof (Buffer) - HeaderSize - FileNameSize; … … 293 293 } 294 294 } 295 295 296 296 // 297 297 // Fill in EFI_DEBUG_ASSERT_DATA … … 339 339 Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer. 340 340 341 This function fills Length bytes of Buffer with the value specified by 341 This function fills Length bytes of Buffer with the value specified by 342 342 PcdDebugClearMemoryValue, and returns Buffer. 343 343 344 344 If Buffer is NULL, then ASSERT(). 345 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 345 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 346 346 347 347 @param Buffer Pointer to the target buffer to be filled with PcdDebugClearMemoryValue. 348 @param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. 348 @param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. 349 349 350 350 @return Buffer Pointer to the target buffer filled with PcdDebugClearMemoryValue. … … 367 367 Returns TRUE if ASSERT() macros are enabled. 368 368 369 This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of 369 This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of 370 370 PcdDebugProperyMask is set. Otherwise FALSE is returned. 371 371 … … 384 384 385 385 386 /** 386 /** 387 387 Returns TRUE if DEBUG() macros are enabled. 388 388 389 This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of 389 This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of 390 390 PcdDebugProperyMask is set. Otherwise FALSE is returned. 391 391 … … 404 404 405 405 406 /** 406 /** 407 407 Returns TRUE if DEBUG_CODE() macros are enabled. 408 408 409 This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of 409 This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of 410 410 PcdDebugProperyMask is set. Otherwise FALSE is returned. 411 411 … … 424 424 425 425 426 /** 426 /** 427 427 Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled. 428 428 429 This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of 429 This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of 430 430 PcdDebugProperyMask is set. Otherwise FALSE is returned. 431 431 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
r58459 r58466 37 37 MdePkg/MdePkg.dec 38 38 MdeModulePkg/MdeModulePkg.dec 39 39 40 40 [LibraryClasses] 41 41 PcdLib -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/PeiRecoveryLib/PeiRecoveryLib.c
r48674 r58466 4 4 This library instance is no longer used and module using this library 5 5 class should update to directly locate EFI_PEI_RECOVERY_MODULE_PPI defined 6 in PI 1.2 specification. 6 in PI 1.2 specification. 7 7 8 8 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> … … 25 25 /** 26 26 Calling this function causes the system do recovery. 27 27 28 28 @retval EFI_SUCESS Sucess to do recovery. 29 29 @retval Others Fail to do recovery. … … 37 37 EFI_STATUS Status; 38 38 EFI_PEI_RECOVERY_MODULE_PPI *PeiRecovery; 39 39 40 40 Status = PeiServicesLocatePpi ( 41 41 &gEfiPeiRecoveryModulePpiGuid, -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/PeiRecoveryLib/PeiRecoveryLib.inf
r58459 r58466 4 4 # This library instance is no longer used and module using this library 5 5 # class should update to directly locate EFI_PEI_RECOVERY_MODULE_PPI defined 6 # in PI 1.2 specification. 6 # in PI 1.2 specification. 7 7 # 8 8 # Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> … … 47 47 [Ppis] 48 48 gEfiPeiRecoveryModulePpiGuid ## CONSUMES 49 49 50 50 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.c
r48674 r58466 1 1 /** @file 2 This library provides API to invoke the S3 resume vector in the APCI Table in S3 resume mode. 2 This library provides API to invoke the S3 resume vector in the APCI Table in S3 resume mode. 3 3 4 4 This library instance is no longer used and module using this library 5 5 class should update to directly locate EFI_PEI_S3_RESUME_PPI defined 6 in PI 1.2 specification. 6 in PI 1.2 specification. 7 7 8 8 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> … … 26 26 /** 27 27 This function is responsible for calling the S3 resume vector in the ACPI Tables. 28 28 29 29 @retval EFI_SUCESS Success to restore config from S3. 30 30 @retval Others Fail to restore config from S3. … … 38 38 EFI_STATUS Status; 39 39 EFI_PEI_S3_RESUME_PPI *S3Resume; 40 40 41 41 Status = PeiServicesLocatePpi ( 42 42 &gEfiPeiS3ResumePpiGuid, … … 47 47 ASSERT_EFI_ERROR (Status); 48 48 49 return S3Resume->S3RestoreConfig ((EFI_PEI_SERVICES **) GetPeiServicesTablePointer()); 49 return S3Resume->S3RestoreConfig ((EFI_PEI_SERVICES **) GetPeiServicesTablePointer()); 50 50 } 51 51 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.inf
r58459 r58466 4 4 # This library instance is no longer used and module using this library 5 5 # class should update to directly locate EFI_PEI_S3_RESUME_PPI defined 6 # in PI 1.2 specification. 6 # in PI 1.2 specification. 7 7 # 8 8 # Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/PlatformBdsLibNull/PlatformBdsLibNull.inf
r58459 r58466 1 1 ## @file 2 2 # NULL implementation for PlatformBdsLib library class interfaces. 3 # 3 # 4 4 # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 # This program and the accompanying materials … … 7 7 # which accompanies this distribution. The full text of the license may be found at 8 8 # http://opensource.org/licenses/bsd-license.php 9 # 9 # 10 10 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 11 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 # 12 # 13 13 ## 14 14 … … 20 20 MODULE_TYPE = DXE_DRIVER 21 21 VERSION_STRING = 1.0 22 LIBRARY_CLASS = PlatformBdsLib|DXE_DRIVER 22 LIBRARY_CLASS = PlatformBdsLib|DXE_DRIVER 23 23 24 24 # … … 37 37 MdeModulePkg/MdeModulePkg.dec 38 38 IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec 39 39 40 40 [LibraryClasses] 41 41 BaseLib -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/SmmRuntimeDxeReportStatusCodeLibFramework.inf
r58459 r58466 26 26 VERSION_STRING = 1.0 27 27 LIBRARY_CLASS = ReportStatusCodeLib|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER 28 28 29 29 CONSTRUCTOR = ReportStatusCodeLibConstruct 30 30 DESTRUCTOR = ReportStatusCodeLibDestruct -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/SmmRuntimeDxeSupport.c
r48674 r58466 27 27 /** 28 28 Locates and caches SMM Status Code Protocol. 29 29 30 30 **/ 31 31 VOID … … 44 44 /** 45 45 Report status code via SMM Status Code Protocol. 46 46 47 47 @param Type Indicates the type of status code being reported. 48 @param Value Describes the current status of a hardware or software entity. 49 This included information about the class and subclass that is used to classify the entity 50 as well as an operation. For progress codes, the operation is the current activity. 51 For error codes, it is the exception. For debug codes, it is not defined at this time. 52 @param Instance The enumeration of a hardware or software entity within the system. 53 A system may contain multiple entities that match a class/subclass pairing. 54 The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, 48 @param Value Describes the current status of a hardware or software entity. 49 This included information about the class and subclass that is used to classify the entity 50 as well as an operation. For progress codes, the operation is the current activity. 51 For error codes, it is the exception. For debug codes, it is not defined at this time. 52 @param Instance The enumeration of a hardware or software entity within the system. 53 A system may contain multiple entities that match a class/subclass pairing. 54 The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, 55 55 not meaningful, or not relevant. Valid instance numbers start with 1. 56 @param CallerId This optional parameter may be used to identify the caller. 57 This parameter allows the status code driver to apply different rules to different callers. 56 @param CallerId This optional parameter may be used to identify the caller. 57 This parameter allows the status code driver to apply different rules to different callers. 58 58 @param Data This optional parameter may be used to pass additional data 59 59 60 60 @retval EFI_SUCCESS Always return EFI_SUCCESS. 61 61 … … 157 157 } 158 158 } 159 159 160 160 // 161 161 // A status code service is present in system, so pass in all the parameters to the service. … … 163 163 return (*mReportStatusCode) (Type, Value, Instance, (EFI_GUID *)CallerId, Data); 164 164 } 165 165 166 166 return EFI_UNSUPPORTED; 167 167 } … … 221 221 @param ImageHandle The firmware allocated handle for the EFI image. 222 222 @param SystemTable A pointer to the EFI System Table. 223 223 224 224 @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. 225 225 … … 243 243 Status = mSmmBase->SmmAllocatePool ( 244 244 mSmmBase, 245 EfiRuntimeServicesData, 246 sizeof (EFI_STATUS_CODE_DATA) + EFI_STATUS_CODE_DATA_MAX_SIZE, 245 EfiRuntimeServicesData, 246 sizeof (EFI_STATUS_CODE_DATA) + EFI_STATUS_CODE_DATA_MAX_SIZE, 247 247 (VOID **) &mStatusCodeData 248 248 ); … … 258 258 // 259 259 // Library should not use the gRT directly, for it may be converted by other library instance. 260 // 260 // 261 261 mInternalRT = gRT; 262 262 mInSmm = FALSE; … … 266 266 // 267 267 // Cache the report status code service 268 // 268 // 269 269 mReportStatusCode = InternalGetReportStatusCode (); 270 270 271 271 // 272 272 // Register notify function for EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 273 // 273 // 274 274 Status = gBS->CreateEventEx ( 275 275 EVT_NOTIFY_SIGNAL, … … 284 284 // 285 285 // Register notify function for EVT_SIGNAL_EXIT_BOOT_SERVICES 286 // 286 // 287 287 Status = gBS->CreateEventEx ( 288 288 EVT_NOTIFY_SIGNAL, … … 300 300 /** 301 301 The destructor function of SMM Runtime DXE Report Status Code Lib. 302 302 303 303 The destructor function frees memory allocated by constructor, and closes related events. 304 It will ASSERT() if that related operation fails and it will always return EFI_SUCCESS. 304 It will ASSERT() if that related operation fails and it will always return EFI_SUCCESS. 305 305 306 306 @param ImageHandle The firmware allocated handle for the EFI image. 307 307 @param SystemTable A pointer to the EFI System Table. 308 308 309 309 @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. 310 310 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3Save.c
r58459 r58466 69 69 @param MemoryType Memory type of memory to allocate. 70 70 @param Size Size of memory to allocate. 71 71 72 72 @return Allocated address for output. 73 73 … … 127 127 128 128 EntryCount = (Rsdt->Length - sizeof (EFI_ACPI_DESCRIPTION_HEADER)) / sizeof(UINT32); 129 129 130 130 EntryPtr = (UINT32 *)(Rsdt + 1); 131 131 for (Index = 0; Index < EntryCount; Index ++, EntryPtr ++) { … … 135 135 } 136 136 } 137 137 138 138 return NULL; 139 139 } … … 166 166 167 167 EntryCount = (Xsdt->Length - sizeof (EFI_ACPI_DESCRIPTION_HEADER)) / sizeof(UINT64); 168 168 169 169 BasePtr = (UINTN)(Xsdt + 1); 170 170 for (Index = 0; Index < EntryCount; Index ++) { … … 175 175 } 176 176 } 177 177 178 178 return NULL; 179 179 } … … 183 183 184 184 @param Fadt FADT table pointer 185 185 186 186 @return Facs table pointer. 187 187 **/ … … 213 213 /** 214 214 To find Facs in Acpi tables. 215 216 To find Firmware ACPI control strutcure in Acpi Tables since the S3 waking vector is stored 215 216 To find Firmware ACPI control strutcure in Acpi Tables since the S3 waking vector is stored 217 217 in the table. 218 218 219 219 @param AcpiTableGuid The guid used to find ACPI table in UEFI ConfigurationTable. 220 220 221 221 @return Facs table pointer. 222 222 **/ … … 282 282 /** 283 283 To find Facs in Acpi tables. 284 285 To find Firmware ACPI control strutcure in Acpi Tables since the S3 waking vector is stored 284 285 To find Firmware ACPI control strutcure in Acpi Tables since the S3 waking vector is stored 286 286 in the table. 287 287 288 288 @return Facs table pointer. 289 289 **/ … … 306 306 Allocates and fills in the Page Directory and Page Table Entries to 307 307 establish a 1:1 Virtual to Physical mapping. 308 If BootScriptExector driver will run in 64-bit mode, this function will establish the 1:1 308 If BootScriptExector driver will run in 64-bit mode, this function will establish the 1:1 309 309 virtual to physical mapping page table. 310 If BootScriptExector driver will not run in 64-bit mode, this function will do nothing. 311 312 @return the 1:1 Virtual to Physical identity mapping page table base address. 310 If BootScriptExector driver will not run in 64-bit mode, this function will do nothing. 311 312 @return the 1:1 Virtual to Physical identity mapping page table base address. 313 313 314 314 **/ … … 317 317 VOID 318 318 ) 319 { 319 { 320 320 if (FeaturePcdGet (PcdDxeIplSwitchToLongMode)) { 321 321 UINT32 RegEax; … … 343 343 } 344 344 } 345 345 346 346 // 347 347 // Get physical address bits supported. … … 359 359 } 360 360 } 361 361 362 362 // 363 363 // IA-32e paging translates 48-bit linear addresses to 52-bit physical addresses. … … 367 367 PhysicalAddressBits = 48; 368 368 } 369 369 370 370 // 371 371 // Calculate the table entries needed. … … 378 378 NumberOfPdpEntriesNeeded = 512; 379 379 } 380 380 381 381 // 382 382 // We need calculate whole page size then allocate once, because S3 restore page table does not know each page in Nvs. … … 388 388 } 389 389 DEBUG ((EFI_D_ERROR, "TotalPageTableSize - %x pages\n", TotalPageTableSize)); 390 390 391 391 // 392 392 // By architecture only one PageMapLevel4 exists - so lets allocate storage for it. … … 394 394 S3NvsPageTableAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateMemoryBelow4G (EfiReservedMemoryType, EFI_PAGES_TO_SIZE(TotalPageTableSize)); 395 395 ASSERT (S3NvsPageTableAddress != 0); 396 PcdSet64 (PcdIdentifyMappingPageTablePtr, S3NvsPageTableAddress); 396 PcdSet64 (PcdIdentifyMappingPageTablePtr, S3NvsPageTableAddress); 397 397 return S3NvsPageTableAddress; 398 398 } … … 401 401 // If DXE is running 32-bit mode, no need to establish page table. 402 402 // 403 return (EFI_PHYSICAL_ADDRESS) 0; 404 } 405 } 406 407 /** 408 Gets the buffer of legacy memory below 1 MB 403 return (EFI_PHYSICAL_ADDRESS) 0; 404 } 405 } 406 407 /** 408 Gets the buffer of legacy memory below 1 MB 409 409 This function is to get the buffer in legacy memory below 1MB that is required during S3 resume. 410 410 … … 433 433 /** 434 434 Prepares all information that is needed in the S3 resume boot path. 435 436 Allocate the resources or prepare informations and save in ACPI variable set for S3 resume boot path 437 435 436 Allocate the resources or prepare informations and save in ACPI variable set for S3 resume boot path 437 438 438 @param This A pointer to the EFI_ACPI_S3_SAVE_PROTOCOL instance. 439 439 @param LegacyMemoryAddress The base address of legacy memory. … … 547 547 /** 548 548 The Driver Entry Point. 549 549 550 550 The function is the driver Entry point which will produce AcpiS3SaveProtocol. 551 551 552 552 @param ImageHandle A handle for the image that is initializing this driver 553 553 @param SystemTable A pointer to the EFI system table -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3Save.h
r58459 r58466 1 1 /** @file 2 This is an implementation of the ACPI S3 Save protocol. This is defined in 2 This is an implementation of the ACPI S3 Save protocol. This is defined in 3 3 S3 boot path specification 0.9. 4 4 … … 20 20 21 21 /** 22 Gets the buffer of legacy memory below 1 MB 22 Gets the buffer of legacy memory below 1 MB 23 23 This function is to get the buffer in legacy memory below 1MB that is required during S3 resume. 24 24 … … 39 39 /** 40 40 Prepares all information that is needed in the S3 resume boot path. 41 42 Allocate the resources or prepare informations and save in ACPI variable set for S3 resume boot path 43 41 42 Allocate the resources or prepare informations and save in ACPI variable set for S3 resume boot path 43 44 44 @param This A pointer to the EFI_ACPI_S3_SAVE_PROTOCOL instance. 45 45 @param LegacyMemoryAddress The base address of legacy memory. … … 55 55 S3Ready ( 56 56 IN EFI_ACPI_S3_SAVE_PROTOCOL *This, 57 IN VOID *LegacyMemoryAddress 57 IN VOID *LegacyMemoryAddress 58 58 ); 59 59 #endif -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3SaveDxe.inf
r58459 r58466 85 85 # 86 86 # Note: the extra dependency of gEfiMpServiceProtocolGuid is to ensure that ACPI variable is set by MpDxe driver before 87 # AcpiS3SaveDxe module is executed. 87 # AcpiS3SaveDxe module is executed. 88 88 # 89 89 gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid AND gEfiMpServiceProtocolGuid -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiVariableThunkPlatform.c
r58459 r58466 26 26 EFI_PHYSICAL_ADDRESS VideoOpromAddress; 27 27 UINT32 VideoOpromSize; 28 EFI_PHYSICAL_ADDRESS S3DebugBufferAddress; 29 EFI_PHYSICAL_ADDRESS S3ResumeNvsEntryPoint; 28 EFI_PHYSICAL_ADDRESS S3DebugBufferAddress; 29 EFI_PHYSICAL_ADDRESS S3ResumeNvsEntryPoint; 30 30 } ACPI_VARIABLE_SET_COMPATIBILITY; 31 31 … … 56 56 @param MemoryType Memory type of memory to allocate. 57 57 @param Size Size of memory to allocate. 58 58 59 59 @return Allocated address for output. 60 60 … … 170 170 if (!EFI_ERROR (Status)) { 171 171 // 172 // On ECP platform, if framework CPU drivers are in use, The compatible version of ACPI variable set 173 // should be produced by CPU driver. 172 // On ECP platform, if framework CPU drivers are in use, The compatible version of ACPI variable set 173 // should be produced by CPU driver. 174 174 // 175 175 VarSize = sizeof (mAcpiVariableSetCompatibility); … … 187 187 } else { 188 188 // 189 // Allocate/initialize the compatible version of Acpi Variable Set since Framework chipset/platform 189 // Allocate/initialize the compatible version of Acpi Variable Set since Framework chipset/platform 190 190 // driver need this variable. ACPI_GLOBAL_VARIABLE variable is not used in runtime phase, 191 191 // so RT attribute is not needed for it. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupport.c
r48674 r58466 1 1 /** @file 2 This is an implementation of the ACPI Support protocol. This is defined in 2 This is an implementation of the ACPI Support protocol. This is defined in 3 3 the Tiano ACPI External Product Specification, revision 0.3.6. 4 4 … … 27 27 28 28 /** 29 Entry point of the ACPI support driver. This function creates and initializes an instance of the ACPI Support 29 Entry point of the ACPI support driver. This function creates and initializes an instance of the ACPI Support 30 30 Protocol and installs it on a new handle. 31 31 32 32 @param ImageHandle A handle for the image that is initializing this driver 33 @param SystemTable A pointer to the EFI system table 33 @param SystemTable A pointer to the EFI system table 34 34 35 35 @retval EFI_SUCCESS Driver initialized successfully 36 @retval EFI_LOAD_ERROR Failed to Initialize or has been loaded 36 @retval EFI_LOAD_ERROR Failed to Initialize or has been loaded 37 37 @retval EFI_OUT_OF_RESOURCES Could not allocate needed resources 38 38 **/ … … 86 86 ); 87 87 ASSERT_EFI_ERROR (Status); 88 } 88 } 89 89 90 90 return Status; -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupport.h
r58459 r58466 132 132 EFI_ACPI_SUPPORT_SIGNATURE \ 133 133 ) 134 134 135 135 /** 136 Constructor for the ACPI support protocol. 137 136 Constructor for the ACPI support protocol. 137 138 138 Constructor for the ACPI support protocol to initializes instance data. 139 139 140 140 @param AcpiSupportInstance Instance to construct 141 141 … … 148 148 ); 149 149 /** 150 Entry point of the ACPI support driver. This function creates and initializes an instance of the ACPI Support 150 Entry point of the ACPI support driver. This function creates and initializes an instance of the ACPI Support 151 151 Protocol and installs it on a new handle. 152 152 153 153 @param ImageHandle A handle for the image that is initializing this driver 154 @param SystemTable A pointer to the EFI system table 154 @param SystemTable A pointer to the EFI system table 155 155 156 156 @retval EFI_SUCCESS Driver initialized successfully 157 @retval EFI_LOAD_ERROR Failed to Initialize or has been loaded 157 @retval EFI_LOAD_ERROR Failed to Initialize or has been loaded 158 158 @retval EFI_OUT_OF_RESOURCES Could not allocate needed resources 159 159 **/ -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportAcpiSupportProtocol.c
r58459 r58466 20 20 #include "AcpiSupport.h" 21 21 // 22 // The maximum number of tables that pre-allocated. 22 // The maximum number of tables that pre-allocated. 23 23 // 24 UINTN mEfiAcpiMaxNumTables = EFI_ACPI_MAX_NUM_TABLES; 24 UINTN mEfiAcpiMaxNumTables = EFI_ACPI_MAX_NUM_TABLES; 25 25 /** 26 26 This function adds an ACPI table to the table list. It will detect FACS and … … 92 92 93 93 /** 94 This function returns a table specified by an index if it exists. 95 96 The function returns a buffer containing the table that the caller must free. 97 The function also returns a handle used to identify the table for update or 94 This function returns a table specified by an index if it exists. 95 96 The function returns a buffer containing the table that the caller must free. 97 The function also returns a handle used to identify the table for update or 98 98 deletion using the SetAcpiTable function. 99 99 … … 166 166 /** 167 167 This function adds, removes, or updates ACPI tables. If the address is not 168 null and the handle value is null, the table is added. If both the address and 168 null and the handle value is null, the table is added. If both the address and 169 169 handle are not null, the table at handle is updated with the table at address. 170 170 If the address is null and the handle is not, the table at handle is deleted. … … 372 372 373 373 @return EFI_SUCCESS The table was successfully inserted. 374 @return EFI_INVALID_PARAMETER Either AcpiTableBuffer is NULL, TableKey is NULL, or AcpiTableBufferSize 374 @return EFI_INVALID_PARAMETER Either AcpiTableBuffer is NULL, TableKey is NULL, or AcpiTableBufferSize 375 375 and the size field embedded in the ACPI table pointed to by AcpiTableBuffer 376 376 are not in sync. … … 428 428 } 429 429 FreePool (AcpiTableBufferConst); 430 430 431 431 return Status; 432 432 } … … 501 501 UINT64 CurrentData; 502 502 503 CopyMem (&TempPrivateData, AcpiSupportInstance, sizeof (EFI_ACPI_SUPPORT_INSTANCE)); 503 CopyMem (&TempPrivateData, AcpiSupportInstance, sizeof (EFI_ACPI_SUPPORT_INSTANCE)); 504 504 // 505 505 // Enlarge the max table number from mEfiAcpiMaxNumTables to mEfiAcpiMaxNumTables + EFI_ACPI_MAX_NUM_TABLES … … 539 539 Pointer = (UINT8 *) (UINTN) PageAddress; 540 540 ZeroMem (Pointer, TotalSize); 541 541 542 542 AcpiSupportInstance->Rsdt1 = (EFI_ACPI_DESCRIPTION_HEADER *) Pointer; 543 543 Pointer += (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + NewMaxTableNumber * sizeof (UINT32)); … … 555 555 556 556 // 557 // copy the original Rsdt1, Rsdt3 and Xsdt structure to new buffer 558 // 559 CopyMem (AcpiSupportInstance->Rsdt1, TempPrivateData.Rsdt1, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32))); 560 CopyMem (AcpiSupportInstance->Rsdt3, TempPrivateData.Rsdt3, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32))); 557 // copy the original Rsdt1, Rsdt3 and Xsdt structure to new buffer 558 // 559 CopyMem (AcpiSupportInstance->Rsdt1, TempPrivateData.Rsdt1, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32))); 560 CopyMem (AcpiSupportInstance->Rsdt3, TempPrivateData.Rsdt3, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32))); 561 561 CopyMem (AcpiSupportInstance->Xsdt, TempPrivateData.Xsdt, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT64))); 562 562 563 563 // 564 564 // Calculate orignal ACPI table buffer size … … 571 571 mEfiAcpiMaxNumTables * sizeof (UINT64); 572 572 gBS->FreePages ((EFI_PHYSICAL_ADDRESS)(UINTN)TempPrivateData.Rsdt1, EFI_SIZE_TO_PAGES (TotalSize)); 573 573 574 574 // 575 575 // Update the Max ACPI table number 576 // 576 // 577 577 mEfiAcpiMaxNumTables = NewMaxTableNumber; 578 578 return EFI_SUCCESS; … … 651 651 // Allocation memory type depends on the type of the table 652 652 // 653 if ((CurrentTableSignature == EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE) || 653 if ((CurrentTableSignature == EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE) || 654 654 (CurrentTableSignature == EFI_ACPI_4_0_UEFI_ACPI_DATA_TABLE_SIGNATURE)) { 655 655 // … … 779 779 // 780 780 // Update pointers in FADT. If tables don't exist this will put NULL pointers there. 781 // Note: If the FIRMWARE_CTRL is non-zero, then X_FIRMWARE_CTRL must be zero, and 781 // Note: If the FIRMWARE_CTRL is non-zero, then X_FIRMWARE_CTRL must be zero, and 782 782 // vice-versa. 783 783 // … … 914 914 if (AcpiSupportInstance->Fadt3 != NULL) { 915 915 // 916 // Note: If the FIRMWARE_CTRL is non-zero, then X_FIRMWARE_CTRL must be zero, and 916 // Note: If the FIRMWARE_CTRL is non-zero, then X_FIRMWARE_CTRL must be zero, and 917 917 // vice-versa. 918 918 // … … 985 985 } 986 986 } 987 987 988 988 if ((Version & EFI_ACPI_TABLE_VERSION_2_0) != 0 || 989 989 (Version & EFI_ACPI_TABLE_VERSION_3_0) != 0) { … … 1015 1015 ); 1016 1016 } 1017 } 1017 } 1018 1018 // 1019 1019 // Checksum the table … … 1095 1095 Status = ReallocateAcpiTableBuffer (AcpiSupportInstance); 1096 1096 ASSERT_EFI_ERROR (Status); 1097 } 1097 } 1098 1098 // 1099 1099 // At this time, it is assumed that RSDT and XSDT maintain parallel lists of tables. … … 1160 1160 @param Handle Table to find. 1161 1161 @param TableList Table list to search 1162 @param Table Pointer to table found. 1162 @param Table Pointer to table found. 1163 1163 1164 1164 @return EFI_SUCCESS The function completed successfully. … … 1208 1208 For Acpi 2.0 tables, pass in both Rsdt and Xsdt. 1209 1209 1210 @param Table Pointer to table found. 1210 @param Table Pointer to table found. 1211 1211 @param NumberOfTableEntries Current number of table entries in the RSDT/XSDT 1212 1212 @param Rsdt Pointer to the RSDT to remove from … … 1418 1418 if (Version & EFI_ACPI_TABLE_VERSION_2_0 & Table->Version) { 1419 1419 Table->Version = Table->Version &~EFI_ACPI_TABLE_VERSION_2_0; 1420 } 1420 } 1421 1421 if (Version & EFI_ACPI_TABLE_VERSION_3_0 & Table->Version) { 1422 1422 Table->Version = Table->Version &~EFI_ACPI_TABLE_VERSION_3_0; 1423 1423 } 1424 1424 1425 1425 // 1426 1426 // Remove from Rsdt and Xsdt. We don't care about the return value … … 1436 1436 ); 1437 1437 } 1438 } 1438 } 1439 1439 // 1440 1440 // Free the table, clean up any dependent tables and our private data pointers. … … 1496 1496 ); 1497 1497 } 1498 } 1498 } 1499 1499 break; 1500 1500 … … 1521 1521 } 1522 1522 1523 1523 1524 1524 if ((Version & EFI_ACPI_TABLE_VERSION_2_0) != 0 || 1525 1525 (Version & EFI_ACPI_TABLE_VERSION_3_0) != 0) { … … 1734 1734 Checksum) 1735 1735 ); 1736 1736 1737 1737 return EFI_SUCCESS; 1738 1738 } 1739 /** 1739 /** 1740 1740 Constructor for the ACPI support protocol to initializes instance data. 1741 1741 1742 1742 @param AcpiSupportInstance Instance to construct 1743 1743 … … 1770 1770 AcpiSupportInstance->AcpiTableProtocol.InstallAcpiTable = InstallAcpiTable; 1771 1771 AcpiSupportInstance->AcpiTableProtocol.UninstallAcpiTable = UninstallAcpiTable; 1772 1772 1773 1773 // 1774 1774 // Create RSDP table -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportDxe.inf
r58459 r58466 2 2 # Acpi Support Dirver to install Framework Acpi Support Protocol. 3 3 # 4 # This driver initializes ACPI support protocol instance data structure and intstall 4 # This driver initializes ACPI support protocol instance data structure and intstall 5 5 # ACPI support protocol to provide Get, Set and Publish Table services. 6 6 # -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/Bds.h
r58459 r58466 200 200 @param VendorGuid A unique identifier for the vendor. 201 201 @param Attributes Attributes bitmask to set for the variable. 202 @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, 203 EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, or 204 EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero 205 causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is 206 set, then a SetVariable() call with a DataSize of zero will not cause any change to 207 the variable value (the timestamp associated with the variable may be updated however 208 even if no new data value is provided,see the description of the 209 EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not 210 be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). 202 @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, 203 EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, or 204 EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero 205 causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is 206 set, then a SetVariable() call with a DataSize of zero will not cause any change to 207 the variable value (the timestamp associated with the variable may be updated however 208 even if no new data value is provided,see the description of the 209 EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not 210 be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). 211 211 @param Data The contents for the variable. 212 212 … … 220 220 @retval EFI_WRITE_PROTECTED The variable in question is read-only. 221 221 @retval EFI_WRITE_PROTECTED The variable in question cannot be deleted. 222 @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 223 or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo 222 @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 223 or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo 224 224 does NOT pass the validation check carried out by the firmware. 225 225 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
r58459 r58466 2 2 # BDSDxe module is core driver for BDS phase. 3 3 # 4 # When DxeCore dispatching all DXE driver, this module will produce architecture protocol 4 # When DxeCore dispatching all DXE driver, this module will produce architecture protocol 5 5 # gEfiBdsArchProtocolGuid. After DxeCore finish dispatching, DxeCore will invoke Entry 6 6 # interface of protocol gEfiBdsArchProtocolGuid, then BDS phase is entered. 7 7 # 8 # Generally, this module take reposiblity to connect all necessary devices for platform boot, 8 # Generally, this module take reposiblity to connect all necessary devices for platform boot, 9 9 # these boot device path are hold in PlatformBdsLib library instance produced by platform. 10 10 # For legacy boot, BDS will transfer control to legacy BIOS after legacy boot device is select. 11 # For EFI boot, BDS will load boot loader file EFI\BOOT\BOOTIA32.EFI, EFI\BOOT\BOOTX64.EFI, 11 # For EFI boot, BDS will load boot loader file EFI\BOOT\BOOTIA32.EFI, EFI\BOOT\BOOTX64.EFI, 12 12 # EFI\BOOT\BOOTIA64.EFI file from selected boot device and transfer control to boot loader. 13 13 # 14 14 # BDSDxe also maintain the UI for "Boot Manager, Boot Maintaince Manager, Device Manager" which 15 15 # is used for user to configure boot option or maintain hardware device. 16 # 16 # 17 17 # Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR> 18 18 # This program and the accompanying materials … … 20 20 # which accompanies this distribution. The full text of the license may be found at 21 21 # http://opensource.org/licenses/bsd-license.php 22 # 22 # 23 23 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 24 24 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 25 # 25 # 26 26 ## 27 27 … … 32 32 FILE_GUID = FC5C7020-1A48-4198-9BE2-EAD5ABC8CF2F 33 33 MODULE_TYPE = DXE_DRIVER 34 VERSION_STRING = 1.0 34 VERSION_STRING = 1.0 35 35 ENTRY_POINT = BdsInitialize 36 36 … … 92 92 IntelFrameworkPkg/IntelFrameworkPkg.dec 93 93 IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec 94 94 95 95 [LibraryClasses] 96 96 DevicePathLib … … 113 113 PcdLib 114 114 UefiHiiServicesLib 115 115 116 116 [Guids] 117 117 ## SOMETIMES_PRODUCES ## Variable:L"BootXXXX" # Boot option variable … … 171 171 ## CONSUMES 172 172 ## NOTIFY 173 gEfiSimpleTextInputExProtocolGuid 173 gEfiSimpleTextInputExProtocolGuid 174 174 gEfiHiiConfigAccessProtocolGuid ## SOMETIMES_PRODUCES 175 175 gEfiFormBrowser2ProtocolGuid ## CONSUMES … … 202 202 ## PRODUCES 203 203 gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBootState 204 gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor ## CONSUMES 204 gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor ## CONSUMES 205 205 gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision ## CONSUMES 206 206 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution ## PRODUCES … … 221 221 222 222 # 223 # [BootMode] 223 # [BootMode] 224 224 # FLASH_UPDATE ## SOMETIMES_CONSUMES # Update Capsule Image 225 225 # -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
r58459 r58466 198 198 199 199 // 200 // When we didn't have chance to build boot option variables in the first 200 // When we didn't have chance to build boot option variables in the first 201 201 // full configuration boot (e.g.: Reset in the first page or in Device Manager), 202 202 // we have no boot options in the following mini configuration boot. … … 279 279 // 280 280 BdsSetConsoleMode (FALSE); 281 281 282 282 // 283 283 // All the driver options should have been processed since … … 344 344 /** 345 345 346 Validate input console variable data. 346 Validate input console variable data. 347 347 348 348 If found the device path is not a valid device path, remove the variable. 349 349 350 350 @param VariableName Input console variable name. 351 351 … … 365 365 &VariableSize 366 366 ); 367 if ((DevicePath != NULL) && !IsDevicePathValid (DevicePath, VariableSize)) { 367 if ((DevicePath != NULL) && !IsDevicePathValid (DevicePath, VariableSize)) { 368 368 Status = gRT->SetVariable ( 369 369 VariableName, … … 382 382 /** 383 383 384 Formalize Bds global variables. 384 Formalize Bds global variables. 385 385 386 386 1. For ConIn/ConOut/ConErr, if found the device path is not a valid device path, remove the variable. 387 2. For OsIndicationsSupported, Create a BS/RT/UINT64 variable to report caps 387 2. For OsIndicationsSupported, Create a BS/RT/UINT64 variable to report caps 388 388 3. Delete OsIndications variable if it is not NV/BS/RT UINT64 389 389 Item 3 is used to solve case when OS corrupts OsIndications. Here simply delete this NV variable. 390 391 **/ 392 VOID 390 391 **/ 392 VOID 393 393 BdsFormalizeEfiGlobalVariable ( 394 394 VOID … … 400 400 UINTN DataSize; 401 401 UINT32 Attributes; 402 402 403 403 // 404 404 // Validate Console variable. … … 678 678 @param VendorGuid A unique identifier for the vendor. 679 679 @param Attributes Attributes bitmask to set for the variable. 680 @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, 681 EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, or 682 EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero 683 causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is 684 set, then a SetVariable() call with a DataSize of zero will not cause any change to 685 the variable value (the timestamp associated with the variable may be updated however 686 even if no new data value is provided,see the description of the 687 EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not 688 be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). 680 @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, 681 EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, or 682 EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero 683 causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is 684 set, then a SetVariable() call with a DataSize of zero will not cause any change to 685 the variable value (the timestamp associated with the variable may be updated however 686 even if no new data value is provided,see the description of the 687 EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not 688 be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). 689 689 @param Data The contents for the variable. 690 690 … … 698 698 @retval EFI_WRITE_PROTECTED The variable in question is read-only. 699 699 @retval EFI_WRITE_PROTECTED The variable in question cannot be deleted. 700 @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 701 or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo 700 @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 701 or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo 702 702 does NOT pass the validation check carried out by the firmware. 703 703 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c
r58459 r58466 54 54 UINTN Index; 55 55 UINTN StartPosition; 56 56 57 57 BDS_COMMON_OPTION *BootOption; 58 58 59 59 CHAR16 OptionName[sizeof ("Boot####")]; 60 60 UINT16 *BbsIndexArray; … … 83 83 84 84 for (Index = 0; Index < BootOrderSize / sizeof (UINT16); Index++) { 85 85 86 86 UnicodeSPrint (OptionName, sizeof (OptionName), L"Boot%04x", BootOrder[Index]); 87 87 InitializeListHead (&List); 88 88 BootOption = BdsLibVariableToOption (&List, OptionName); 89 89 ASSERT (BootOption != NULL); 90 90 91 91 if ((DevicePathType (BootOption->DevicePath) == BBS_DEVICE_PATH) && 92 92 (DevicePathSubType (BootOption->DevicePath) == BBS_BBS_DP)) { … … 120 120 StartPosition = MIN (StartPosition, Index); 121 121 NewBootOption[DevOrderCount] = BootOrder[Index]; 122 122 123 123 if ((DevOrder[DevOrderCount] & 0xFF00) == 0xFF00) { 124 124 (*DisBootOption)[*DisBootOptionCount] = BootOrder[Index]; … … 157 157 Group the legacy boot options in the BootOption. 158 158 159 The routine assumes the boot options in the beginning that covers all the device 159 The routine assumes the boot options in the beginning that covers all the device 160 160 types are ordered properly and re-position the following boot options just after 161 161 the corresponding boot options with the same device type. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.h
r58459 r58466 40 40 Group the legacy boot options in the BootOption. 41 41 42 The routine assumes the boot options in the beginning that covers all the device 42 The routine assumes the boot options in the beginning that covers all the device 43 43 types are ordered properly and re-position the following boot options just after 44 44 the corresponding boot options with the same device type. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Bm.vfr
-
Property svn:eol-style
set to
native
r58459 r58466 1 1 ///** @file 2 // 2 // 3 3 // Boot Maintenance Utility Formset 4 // 4 // 5 5 // Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR> 6 6 // This program and the accompanying materials … … 8 8 // which accompanies this distribution. The full text of the license may be found at 9 9 // http://opensource.org/licenses/bsd-license.php 10 // 10 // 11 11 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 12 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 // 13 // 14 14 //**/ 15 15 -
Property svn:eol-style
set to
-
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BmLib.c
r58459 r58466 147 147 @param VarName A Null-terminated Unicode string that is 148 148 the name of the vendor's variable. 149 149 150 150 @param VarGuid A unique identifier for the vendor. 151 151 … … 362 362 363 363 /** 364 Get a string from the Data Hub record based on 364 Get a string from the Data Hub record based on 365 365 a device path. 366 366 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Bmstring.uni
-
Property svn:mime-type
changed from
application/octet-stream
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
-
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
r58459 r58466 44 44 END_DEVICE_PATH_TYPE, 45 45 END_ENTIRE_DEVICE_PATH_SUBTYPE, 46 { 46 { 47 47 (UINT8) (END_DEVICE_PATH_LENGTH), 48 48 (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8) … … 66 66 END_DEVICE_PATH_TYPE, 67 67 END_ENTIRE_DEVICE_PATH_SUBTYPE, 68 { 68 { 69 69 (UINT8) (END_DEVICE_PATH_LENGTH), 70 70 (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8) … … 144 144 // 145 145 // Initialize data which located in Console Options Menu 146 // 147 GetConsoleOutMode (CallbackData); 146 // 147 GetConsoleOutMode (CallbackData); 148 148 GetConsoleInCheck (CallbackData); 149 149 GetConsoleOutCheck (CallbackData); … … 315 315 @param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. 316 316 @param[in] Configuration A null-terminated Unicode string in 317 <ConfigString> format. 317 <ConfigString> format. 318 318 @param[out] Progress A pointer to a string filled in with the 319 319 offset of the most recent '&' before the … … 325 325 326 326 @retval EFI_SUCCESS The results have been distributed or are 327 awaiting distribution. 327 awaiting distribution. 328 328 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the 329 329 parts of the results that must be … … 353 353 BM_MENU_ENTRY *NewMenuEntry; 354 354 BM_LOAD_CONTEXT *NewLoadContext; 355 UINT16 Index; 355 UINT16 Index; 356 356 BOOLEAN TerminalAttChange; 357 BMM_CALLBACK_DATA *Private; 357 BMM_CALLBACK_DATA *Private; 358 358 359 359 if (Progress == NULL) { … … 375 375 376 376 Status = gBS->LocateProtocol ( 377 &gEfiHiiConfigRoutingProtocolGuid, 378 NULL, 377 &gEfiHiiConfigRoutingProtocolGuid, 378 NULL, 379 379 (VOID**) &ConfigRouting 380 380 ); … … 402 402 ASSERT_EFI_ERROR (Status); 403 403 // 404 // Compare new and old BMM configuration data and only do action for modified item to 404 // Compare new and old BMM configuration data and only do action for modified item to 405 405 // avoid setting unnecessary non-volatile variable 406 406 // … … 430 430 431 431 // 432 // Change for "delete boot option" page need update NewBmmData->BootOptionOrder, so process 432 // Change for "delete boot option" page need update NewBmmData->BootOptionOrder, so process 433 433 // NewBmmData->BootOptionOrder before NewBmmData->BootOptionDel 434 434 // 435 if (CompareMem (NewBmmData->BootOptionOrder, OldBmmData->BootOptionOrder, sizeof (NewBmmData->BootOptionOrder)) != 0) { 435 if (CompareMem (NewBmmData->BootOptionOrder, OldBmmData->BootOptionOrder, sizeof (NewBmmData->BootOptionOrder)) != 0) { 436 436 Status = Var_UpdateBootOrder (Private); 437 437 } 438 438 439 439 // 440 // Change for "delete driver option" page need update NewBmmData->DriverOptionOrder, so process 440 // Change for "delete driver option" page need update NewBmmData->DriverOptionOrder, so process 441 441 // NewBmmData->DriverOptionOrder before NewBmmData->DriverOptionDel 442 442 // 443 if (CompareMem (NewBmmData->DriverOptionOrder, OldBmmData->DriverOptionOrder, sizeof (NewBmmData->DriverOptionOrder)) != 0) { 443 if (CompareMem (NewBmmData->DriverOptionOrder, OldBmmData->DriverOptionOrder, sizeof (NewBmmData->DriverOptionOrder)) != 0) { 444 444 Status = Var_UpdateDriverOrder (Private); 445 445 } … … 448 448 // Check data which located in Boot Options Menu and save the settings if need 449 449 // 450 if (CompareMem (NewBmmData->BootOptionDel, OldBmmData->BootOptionDel, sizeof (NewBmmData->BootOptionDel)) != 0) { 451 for (Index = 0; 452 ((Index < BootOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->BootOptionDel) / sizeof (NewBmmData->BootOptionDel[0])))); 450 if (CompareMem (NewBmmData->BootOptionDel, OldBmmData->BootOptionDel, sizeof (NewBmmData->BootOptionDel)) != 0) { 451 for (Index = 0; 452 ((Index < BootOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->BootOptionDel) / sizeof (NewBmmData->BootOptionDel[0])))); 453 453 Index ++) { 454 454 NewMenuEntry = BOpt_GetMenuEntry (&BootOptionMenu, Index); … … 465 465 // Check data which located in Driver Options Menu and save the settings if need 466 466 // 467 if (CompareMem (NewBmmData->DriverOptionDel, OldBmmData->DriverOptionDel, sizeof (NewBmmData->DriverOptionDel)) != 0) { 468 for (Index = 0; 469 ((Index < DriverOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->DriverOptionDel) / sizeof (NewBmmData->DriverOptionDel[0])))); 467 if (CompareMem (NewBmmData->DriverOptionDel, OldBmmData->DriverOptionDel, sizeof (NewBmmData->DriverOptionDel)) != 0) { 468 for (Index = 0; 469 ((Index < DriverOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->DriverOptionDel) / sizeof (NewBmmData->DriverOptionDel[0])))); 470 470 Index++) { 471 471 NewMenuEntry = BOpt_GetMenuEntry (&DriverOptionMenu, Index); … … 491 491 // Bugbug: code not exit in UiApp but in IntelFrameworkModulePkg, need do more check. 492 492 // 493 Private->BmmOldFakeNVData.BootTimeOut = NewBmmData->BootTimeOut; 493 Private->BmmOldFakeNVData.BootTimeOut = NewBmmData->BootTimeOut; 494 494 } 495 495 … … 498 498 } 499 499 500 if (CompareMem (&NewBmmData->ConsoleOutMode, &OldBmmData->ConsoleOutMode, sizeof (NewBmmData->ConsoleOutMode)) != 0) { 500 if (CompareMem (&NewBmmData->ConsoleOutMode, &OldBmmData->ConsoleOutMode, sizeof (NewBmmData->ConsoleOutMode)) != 0) { 501 501 Var_UpdateConMode (Private); 502 502 } … … 571 571 } 572 572 573 if (CompareMem (NewBmmData->ConsoleErrCheck, OldBmmData->ConsoleErrCheck, sizeof (NewBmmData->ConsoleErrCheck)) != 0) { 573 if (CompareMem (NewBmmData->ConsoleErrCheck, OldBmmData->ConsoleErrCheck, sizeof (NewBmmData->ConsoleErrCheck)) != 0) { 574 574 for (Index = 0; Index < ConsoleErrMenu.MenuNumber; Index++) { 575 575 NewMenuEntry = BOpt_GetMenuEntry (&ConsoleErrMenu, Index); … … 601 601 RefreshUpdateData (); 602 602 mStartLabel->Number = FORM_BOOT_LEGACY_DEVICE_ID; 603 603 604 604 // 605 605 // If LegacyBios Protocol is installed, add 3 tags about legacy boot option … … 650 650 FORM_SET_BEV_ORDER_ID 651 651 ); 652 652 653 653 HiiUpdateForm ( 654 654 mBmmCallbackInfo->BmmHiiHandle, … … 658 658 mEndOpCodeHandle // LABEL_END 659 659 ); 660 660 661 661 return EFI_SUCCESS; 662 662 } … … 701 701 UINTN Bit; 702 702 UINT16 NewValuePos; 703 UINT16 Index3; 703 UINT16 Index3; 704 704 UINT16 Index2; 705 705 UINT16 Index; … … 718 718 InitializeLegacyBootOption (); 719 719 } 720 720 721 721 return EFI_SUCCESS; 722 722 } 723 723 724 if (Action != EFI_BROWSER_ACTION_CHANGING && Action != EFI_BROWSER_ACTION_CHANGED) { 724 if (Action != EFI_BROWSER_ACTION_CHANGING && Action != EFI_BROWSER_ACTION_CHANGED) { 725 725 // 726 726 // All other action return unsupported. … … 728 728 return EFI_UNSUPPORTED; 729 729 } 730 730 731 731 Status = EFI_SUCCESS; 732 732 OldValue = 0; … … 748 748 return EFI_INVALID_PARAMETER; 749 749 } 750 750 751 751 UpdatePageId (Private, QuestionId); 752 752 … … 1022 1022 DiscardChangeHandler (Private, CurrentFakeNVMap); 1023 1023 *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT; 1024 break; 1024 break; 1025 1025 1026 1026 case FORM_RESET: … … 1122 1122 1123 1123 Status = EFI_SUCCESS; 1124 BmmCallbackInfo = mBmmCallbackInfo; 1124 BmmCallbackInfo = mBmmCallbackInfo; 1125 1125 1126 1126 BmmCallbackInfo->BmmPreviousPageId = FORM_MAIN_ID; … … 1132 1132 // Reinstall String packages to include more new strings. 1133 1133 // 1134 1134 1135 1135 // 1136 1136 // String package size … … 1139 1139 1140 1140 // 1141 // Add the length of the Package List Header and the terminating Package Header 1141 // Add the length of the Package List Header and the terminating Package Header 1142 1142 // 1143 1143 Length += sizeof (EFI_HII_PACKAGE_LIST_HEADER) + sizeof (EFI_HII_PACKAGE_HEADER); 1144 1144 1145 1145 // 1146 1146 // Allocate the storage for the entire Package List … … 1161 1161 1162 1162 // 1163 // Copy String Data into Package list. 1163 // Copy String Data into Package list. 1164 1164 // 1165 1165 Data = (UINT8 *)(PackageListHeader + 1); 1166 1166 Length = ReadUnaligned32 ((UINT32 *) BdsDxeStrings) - sizeof (UINT32); 1167 1167 CopyMem (Data, (UINT8 *) BdsDxeStrings + sizeof (UINT32), Length); 1168 1168 1169 1169 // 1170 1170 // Add End type HII package. … … 1179 1179 CopyGuid (&PackageListHeader->PackageListGuid, &gBootMaintFormSetGuid); 1180 1180 Status = gHiiDatabase->UpdatePackageList (gHiiDatabase, BmmCallbackInfo->BmmHiiHandle, PackageListHeader); 1181 1181 1182 1182 // 1183 1183 // Update String package for FE. … … 1185 1185 CopyGuid (&PackageListHeader->PackageListGuid, &gFileExploreFormSetGuid); 1186 1186 Status = gHiiDatabase->UpdatePackageList (gHiiDatabase, BmmCallbackInfo->FeHiiHandle, PackageListHeader); 1187 1187 1188 1188 FreePool (PackageListHeader); 1189 1189 … … 1227 1227 CreateMenuStringToken (BmmCallbackInfo, BmmCallbackInfo->BmmHiiHandle, &TerminalMenu); 1228 1228 CreateMenuStringToken (BmmCallbackInfo, BmmCallbackInfo->BmmHiiHandle, &DriverMenu); 1229 1229 1230 1230 InitializeBmmConfig (BmmCallbackInfo); 1231 1231 … … 1239 1239 // 1240 1240 CleanUpStringDepository (); 1241 1241 1242 1242 FreeAllMenu (); 1243 1243 … … 1545 1545 EFI_STATUS Status; 1546 1546 UINT8 *Ptr; 1547 1547 1548 1548 // 1549 1549 // Create CallbackData structures for Driver Callback … … 1553 1553 return EFI_OUT_OF_RESOURCES; 1554 1554 } 1555 1555 1556 1556 // 1557 1557 // Create LoadOption in BmmCallbackInfo for Driver Callback … … 1634 1634 ); 1635 1635 ASSERT (BmmCallbackInfo->FeHiiHandle != NULL); 1636 1636 1637 1637 mBmmCallbackInfo = BmmCallbackInfo; 1638 1639 return EFI_SUCCESS; 1638 1639 return EFI_SUCCESS; 1640 1640 } 1641 1641 … … 1684 1684 FreePool (BmmCallbackInfo); 1685 1685 1686 mBmmCallbackInfo = NULL; 1687 1686 mBmmCallbackInfo = NULL; 1687 1688 1688 return; 1689 1689 } -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.h
r58459 r58466 474 474 @return EFI_SUCESS The functin completes successfully. 475 475 @retval EFI_OUT_OF_RESOURCES Not enough memory to compete the operation. 476 476 477 477 478 478 **/ … … 718 718 /** 719 719 Update the multi-instance device path of Terminal Device based on 720 the global TerminalMenu. If ChangeTernimal is TRUE, the terminal 720 the global TerminalMenu. If ChangeTernimal is TRUE, the terminal 721 721 device path in the Terminal Device in TerminalMenu is also updated. 722 722 723 723 @param DevicePath The multi-instance device path. 724 @param ChangeTerminal TRUE, then device path in the Terminal Device 724 @param ChangeTerminal TRUE, then device path in the Terminal Device 725 725 in TerminalMenu is also updated; FALSE, no update. 726 726 … … 738 738 // 739 739 /** 740 This function create a currently loaded Boot Option from 741 the BMM. It then appends this Boot Option to the end of 740 This function create a currently loaded Boot Option from 741 the BMM. It then appends this Boot Option to the end of 742 742 the "BootOrder" list. It also append this Boot Opotion to the end 743 743 of BootOptionMenu. … … 761 761 make sure BootOrder is in valid state. 762 762 763 @retval EFI_SUCCESS If all boot load option EFI Variables corresponding to 763 @retval EFI_SUCCESS If all boot load option EFI Variables corresponding to 764 764 BM_LOAD_CONTEXT marked for deletion is deleted 765 @return Others If failed to update the "BootOrder" variable after deletion. 765 @return Others If failed to update the "BootOrder" variable after deletion. 766 766 767 767 **/ … … 787 787 788 788 /** 789 This function create a currently loaded Drive Option from 790 the BMM. It then appends this Driver Option to the end of 789 This function create a currently loaded Drive Option from 790 the BMM. It then appends this Driver Option to the end of 791 791 the "DriverOrder" list. It append this Driver Opotion to the end 792 792 of DriverOptionMenu. … … 877 877 878 878 /** 879 Update the device path of "ConOut", "ConIn" and "ErrOut" based on the new BaudRate, Data Bits, 879 Update the device path of "ConOut", "ConIn" and "ErrOut" based on the new BaudRate, Data Bits, 880 880 parity and stop Bits set. 881 881 … … 887 887 888 888 /** 889 This function update the "BootNext" EFI Variable. If there is no "BootNex" specified in BMM, 889 This function update the "BootNext" EFI Variable. If there is no "BootNex" specified in BMM, 890 890 this EFI Variable is deleted. 891 891 It also update the BMM context data specified the "BootNext" value. … … 903 903 904 904 /** 905 This function update the "BootOrder" EFI Variable based on BMM Formset's NV map. It then refresh 905 This function update the "BootOrder" EFI Variable based on BMM Formset's NV map. It then refresh 906 906 BootOptionMenu with the new "BootOrder" list. 907 907 … … 981 981 /** 982 982 Clean up the dynamic opcode at label and form specified by 983 both LabelId. 983 both LabelId. 984 984 985 985 @param LabelId It is both the Form ID and Label ID for … … 1178 1178 @param VarName A Null-terminated Unicode string that is 1179 1179 the name of the vendor's variable. 1180 1180 1181 1181 @param VarGuid A unique identifier for the vendor. 1182 1182 … … 1243 1243 1244 1244 /** 1245 Get a string from the Data Hub record based on 1245 Get a string from the Data Hub record based on 1246 1246 a device path. 1247 1247 … … 1451 1451 @param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. 1452 1452 @param[in] Configuration A null-terminated Unicode string in 1453 <ConfigString> format. 1453 <ConfigString> format. 1454 1454 @param[out] Progress A pointer to a string filled in with the 1455 1455 offset of the most recent '&' before the … … 1461 1461 1462 1462 @retval EFI_SUCCESS The results have been distributed or are 1463 awaiting distribution. 1463 awaiting distribution. 1464 1464 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the 1465 1465 parts of the results that must be … … 1514 1514 1515 1515 /** 1516 Get option number according to Boot#### and BootOrder variable. 1516 Get option number according to Boot#### and BootOrder variable. 1517 1517 The value is saved as #### + 1. 1518 1518 1519 1519 @param CallbackData The BMM context data. 1520 1520 **/ 1521 VOID 1521 VOID 1522 1522 GetBootOrder ( 1523 1523 IN BMM_CALLBACK_DATA *CallbackData … … 1528 1528 1529 1529 @param CallbackData The BMM context data. 1530 1531 **/ 1532 VOID 1530 1531 **/ 1532 VOID 1533 1533 GetDriverOrder ( 1534 1534 IN BMM_CALLBACK_DATA *CallbackData … … 1563 1563 IN BMM_CALLBACK_DATA *CallbackData 1564 1564 ); 1565 1565 1566 1566 /** 1567 1567 … … 1571 1571 @param CallbackData The BMM context data. 1572 1572 1573 **/ 1574 VOID 1573 **/ 1574 VOID 1575 1575 GetConsoleInCheck ( 1576 1576 IN BMM_CALLBACK_DATA *CallbackData 1577 1577 ); 1578 1578 1579 1579 /** 1580 1580 … … 1584 1584 @param CallbackData The BMM context data. 1585 1585 1586 **/ 1587 VOID 1586 **/ 1587 VOID 1588 1588 GetConsoleOutCheck ( 1589 1589 IN BMM_CALLBACK_DATA *CallbackData … … 1597 1597 @param CallbackData The BMM context data. 1598 1598 1599 **/ 1600 VOID 1599 **/ 1600 VOID 1601 1601 GetConsoleErrCheck ( 1602 1602 IN BMM_CALLBACK_DATA *CallbackData … … 1610 1610 @param CallbackData The BMM context data. 1611 1611 1612 **/ 1613 VOID 1612 **/ 1613 VOID 1614 1614 GetTerminalAttribute ( 1615 1615 IN BMM_CALLBACK_DATA *CallbackData -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootOption.c
r58459 r58466 877 877 UINTN MenuCount; 878 878 UINT8 *Ptr; 879 879 880 880 MenuCount = 0; 881 881 BootOrderListSize = 0; … … 898 898 return EFI_NOT_FOUND; 899 899 } 900 900 901 901 // 902 902 // Get the BootNext from the Var … … 1012 1012 NewLoadContext->FilePathListLength = *(UINT16 *) LoadOptionPtr; 1013 1013 LoadOptionPtr += sizeof (UINT16); 1014 1014 1015 1015 StringSize = StrSize((UINT16*)LoadOptionPtr); 1016 1016 … … 1018 1018 ASSERT (NewLoadContext->Description != NULL); 1019 1019 StrCpy (NewLoadContext->Description, (UINT16*)LoadOptionPtr); 1020 1020 1021 1021 ASSERT (NewLoadContext->Description != NULL); 1022 1022 NewMenuEntry->DisplayString = NewLoadContext->Description; … … 1104 1104 ASSERT (Str != NULL); 1105 1105 1106 TmpStr = AllocateZeroPool (Size1 + Size2 + sizeof (CHAR16)); 1106 TmpStr = AllocateZeroPool (Size1 + Size2 + sizeof (CHAR16)); 1107 1107 ASSERT (TmpStr != NULL); 1108 1108 … … 1125 1125 1126 1126 // 1127 // Use TmpStr as a backup, as StrCpy in BaseLib does not handle copy of two strings 1127 // Use TmpStr as a backup, as StrCpy in BaseLib does not handle copy of two strings 1128 1128 // that overlap. 1129 1129 // … … 1137 1137 1138 1138 // 1139 // Use TmpStr as a backup, as StrCpy in BaseLib does not handle copy of two strings 1139 // Use TmpStr as a backup, as StrCpy in BaseLib does not handle copy of two strings 1140 1140 // that overlap. 1141 1141 // … … 1151 1151 1152 1152 FreePool (TmpStr); 1153 1153 1154 1154 return Str; 1155 1155 } … … 1502 1502 return EFI_NOT_FOUND; 1503 1503 } 1504 1504 1505 1505 for (Index = 0; Index < DriverOrderListSize / sizeof (UINT16); Index++) { 1506 1506 UnicodeSPrint ( … … 1681 1681 UINTN OptionIndex; 1682 1682 UINT16 PageIdList[5]; 1683 UINTN PageNum; 1683 UINTN PageNum; 1684 1684 UINTN VarSize; 1685 UINT8 *VarData; 1686 UINT8 *WorkingVarData; 1685 UINT8 *VarData; 1686 UINT8 *WorkingVarData; 1687 1687 LEGACY_DEV_ORDER_ENTRY *DevOrder; 1688 UINT16 VarDevOrder; 1689 UINT8 *DisMap; 1688 UINT16 VarDevOrder; 1689 UINT8 *DisMap; 1690 1690 BM_MENU_OPTION *OptionMenu; 1691 1691 BBS_TYPE BbsType; 1692 1692 UINT8 *LegacyOrder; 1693 UINT8 *OldData; 1693 UINT8 *OldData; 1694 1694 UINTN Pos; 1695 1695 UINTN Bit; 1696 1696 1697 1697 ASSERT (CallbackData != NULL); 1698 1698 … … 1716 1716 for (Index = 0; Index < PageNum; Index++) { 1717 1717 switch (PageIdList[Index]) { 1718 1718 1719 1719 case FORM_SET_FD_ORDER_ID: 1720 1720 OptionMenu = (BM_MENU_OPTION *) &LegacyFDMenu; … … 1730 1730 OldData = CallbackData->BmmOldFakeNVData.LegacyHD; 1731 1731 break; 1732 1732 1733 1733 case FORM_SET_CD_ORDER_ID: 1734 1734 OptionMenu = (BM_MENU_OPTION *) &LegacyCDMenu; … … 1737 1737 OldData = CallbackData->BmmOldFakeNVData.LegacyCD; 1738 1738 break; 1739 1739 1740 1740 case FORM_SET_NET_ORDER_ID: 1741 1741 OptionMenu = (BM_MENU_OPTION *) &LegacyNETMenu; … … 1753 1753 break; 1754 1754 } 1755 1755 1756 1756 if (NULL != VarData) { 1757 1757 WorkingVarData = VarData; … … 1761 1761 break; 1762 1762 } 1763 1763 1764 1764 WorkingVarData = (UINT8 *)((UINTN)WorkingVarData + sizeof (BBS_TYPE)); 1765 1765 WorkingVarData += *(UINT16 *) WorkingVarData; 1766 1766 DevOrder = (LEGACY_DEV_ORDER_ENTRY *) WorkingVarData; 1767 } 1767 } 1768 1768 for (OptionIndex = 0; OptionIndex < OptionMenu->MenuNumber; OptionIndex++) { 1769 1769 VarDevOrder = *(UINT16 *) ((UINTN) DevOrder + sizeof (BBS_TYPE) + sizeof (UINT16) + OptionIndex * sizeof (UINT16)); … … 1776 1776 LegacyOrder[OptionIndex] = (UINT8) (VarDevOrder & 0xFF); 1777 1777 } 1778 } 1778 } 1779 1779 CopyMem (OldData, LegacyOrder, 100); 1780 1780 } 1781 } 1781 } 1782 1782 } 1783 1783 … … 1786 1786 1787 1787 @param CallbackData The BMM context data. 1788 1788 1789 1789 **/ 1790 1790 VOID -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c
r58459 r58466 33 33 34 34 @param[in] FlowControl The device path node to be checked. 35 35 36 36 @retval TRUE It's the Flow Control node. 37 37 @retval FALSE It's not. … … 86 86 /** 87 87 Update the multi-instance device path of Terminal Device based on 88 the global TerminalMenu. If ChangeTernimal is TRUE, the terminal 88 the global TerminalMenu. If ChangeTernimal is TRUE, the terminal 89 89 device path in the Terminal Device in TerminalMenu is also updated. 90 90 91 91 @param DevicePath The multi-instance device path. 92 @param ChangeTerminal TRUE, then device path in the Terminal Device 92 @param ChangeTerminal TRUE, then device path in the Terminal Device 93 93 in TerminalMenu is also updated; FALSE, no update. 94 94 … … 761 761 762 762 @retval EFI_UNSUPPORTED The type passed in is not in the 3 types defined. 763 @retval EFI_NOT_FOUND If the EFI Variable defined in UEFI spec with name "ConOutDev", 763 @retval EFI_NOT_FOUND If the EFI Variable defined in UEFI spec with name "ConOutDev", 764 764 "ConInDev" or "ConErrDev" doesn't exists. 765 765 @retval EFI_OUT_OF_RESOURCES Not enough resource to complete the operations. … … 1058 1058 @param CallbackData The BMM context data. 1059 1059 1060 **/ 1061 VOID 1060 **/ 1061 VOID 1062 1062 GetConsoleInCheck ( 1063 1063 IN BMM_CALLBACK_DATA *CallbackData … … 1065 1065 { 1066 1066 UINT16 Index; 1067 BM_MENU_ENTRY *NewMenuEntry; 1067 BM_MENU_ENTRY *NewMenuEntry; 1068 1068 UINT8 *ConInCheck; 1069 1069 BM_CONSOLE_CONTEXT *NewConsoleContext; 1070 1070 1071 1071 ASSERT (CallbackData != NULL); 1072 1072 1073 1073 ConInCheck = &CallbackData->BmmFakeNvData.ConsoleInCheck[0]; 1074 1074 for (Index = 0; ((Index < ConsoleInpMenu.MenuNumber) && \ 1075 (Index < MAX_MENU_NUMBER)) ; Index++) { 1075 (Index < MAX_MENU_NUMBER)) ; Index++) { 1076 1076 NewMenuEntry = BOpt_GetMenuEntry (&ConsoleInpMenu, Index); 1077 NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext; 1077 NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext; 1078 1078 ConInCheck[Index] = NewConsoleContext->IsActive; 1079 1079 } … … 1087 1087 @param CallbackData The BMM context data. 1088 1088 1089 **/ 1090 VOID 1089 **/ 1090 VOID 1091 1091 GetConsoleOutCheck ( 1092 1092 IN BMM_CALLBACK_DATA *CallbackData … … 1094 1094 { 1095 1095 UINT16 Index; 1096 BM_MENU_ENTRY *NewMenuEntry; 1096 BM_MENU_ENTRY *NewMenuEntry; 1097 1097 UINT8 *ConOutCheck; 1098 1098 BM_CONSOLE_CONTEXT *NewConsoleContext; 1099 1099 1100 1100 ASSERT (CallbackData != NULL); 1101 1101 ConOutCheck = &CallbackData->BmmFakeNvData.ConsoleOutCheck[0]; 1102 1102 for (Index = 0; ((Index < ConsoleOutMenu.MenuNumber) && \ 1103 (Index < MAX_MENU_NUMBER)) ; Index++) { 1103 (Index < MAX_MENU_NUMBER)) ; Index++) { 1104 1104 NewMenuEntry = BOpt_GetMenuEntry (&ConsoleOutMenu, Index); 1105 NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext; 1105 NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext; 1106 1106 ConOutCheck[Index] = NewConsoleContext->IsActive; 1107 1107 } 1108 1108 } 1109 1109 1110 1110 /** 1111 1111 … … 1115 1115 @param CallbackData The BMM context data. 1116 1116 1117 **/ 1118 VOID 1117 **/ 1118 VOID 1119 1119 GetConsoleErrCheck ( 1120 1120 IN BMM_CALLBACK_DATA *CallbackData … … 1122 1122 { 1123 1123 UINT16 Index; 1124 BM_MENU_ENTRY *NewMenuEntry; 1124 BM_MENU_ENTRY *NewMenuEntry; 1125 1125 UINT8 *ConErrCheck; 1126 1126 BM_CONSOLE_CONTEXT *NewConsoleContext; 1127 1127 1128 1128 ASSERT (CallbackData != NULL); 1129 1129 ConErrCheck = &CallbackData->BmmFakeNvData.ConsoleErrCheck[0]; 1130 1130 for (Index = 0; ((Index < ConsoleErrMenu.MenuNumber) && \ 1131 (Index < MAX_MENU_NUMBER)) ; Index++) { 1131 (Index < MAX_MENU_NUMBER)) ; Index++) { 1132 1132 NewMenuEntry = BOpt_GetMenuEntry (&ConsoleErrMenu, Index); 1133 NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext; 1133 NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext; 1134 1134 ConErrCheck[Index] = NewConsoleContext->IsActive; 1135 1135 } … … 1143 1143 @param CallbackData The BMM context data. 1144 1144 1145 **/ 1146 VOID 1145 **/ 1146 VOID 1147 1147 GetTerminalAttribute ( 1148 1148 IN BMM_CALLBACK_DATA *CallbackData … … 1151 1151 BMM_FAKE_NV_DATA *CurrentFakeNVMap; 1152 1152 BM_MENU_ENTRY *NewMenuEntry; 1153 BM_TERMINAL_CONTEXT *NewTerminalContext; 1154 UINT16 TerminalIndex; 1153 BM_TERMINAL_CONTEXT *NewTerminalContext; 1154 UINT16 TerminalIndex; 1155 1155 UINT8 AttributeIndex; 1156 1156 1157 1157 ASSERT (CallbackData != NULL); 1158 1159 CurrentFakeNVMap = &CallbackData->BmmFakeNvData; 1158 1159 CurrentFakeNVMap = &CallbackData->BmmFakeNvData; 1160 1160 for (TerminalIndex = 0; ((TerminalIndex < TerminalMenu.MenuNumber) && \ 1161 (TerminalIndex < MAX_MENU_NUMBER)); TerminalIndex++) { 1161 (TerminalIndex < MAX_MENU_NUMBER)); TerminalIndex++) { 1162 1162 NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, TerminalIndex); 1163 1163 NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext; … … 1173 1173 break; 1174 1174 } 1175 } 1176 1175 } 1176 1177 1177 for (AttributeIndex = 0; AttributeIndex < sizeof (ParityList) / sizeof (ParityList[0]); AttributeIndex++) { 1178 1178 if (NewTerminalContext->Parity == (UINT64) (ParityList[AttributeIndex].Value)) { … … 1180 1180 break; 1181 1181 } 1182 } 1183 1182 } 1183 1184 1184 for (AttributeIndex = 0; AttributeIndex < sizeof (StopBitsList) / sizeof (StopBitsList[0]); AttributeIndex++) { 1185 1185 if (NewTerminalContext->StopBits == (UINT64) (StopBitsList[AttributeIndex].Value)) { … … 1187 1187 break; 1188 1188 } 1189 } 1189 } 1190 1190 CurrentFakeNVMap->COMBaudRate[TerminalIndex] = NewTerminalContext->BaudRateIndex; 1191 1191 CurrentFakeNVMap->COMDataRate[TerminalIndex] = NewTerminalContext->DataBitsIndex; 1192 1192 CurrentFakeNVMap->COMStopBits[TerminalIndex] = NewTerminalContext->StopBitsIndex; 1193 CurrentFakeNVMap->COMParity[TerminalIndex] = NewTerminalContext->ParityIndex; 1193 CurrentFakeNVMap->COMParity[TerminalIndex] = NewTerminalContext->ParityIndex; 1194 1194 CurrentFakeNVMap->COMTerminalType[TerminalIndex] = NewTerminalContext->TerminalType; 1195 1195 CurrentFakeNVMap->COMFlowControl[TerminalIndex] = NewTerminalContext->FlowControl; 1196 } 1197 } 1198 1196 } 1197 } 1198 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FE.vfr
-
Property svn:eol-style
set to
native
r58459 r58466 1 1 ///** @file 2 // 2 // 3 3 // File Explorer Formset 4 // 4 // 5 5 // Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR> 6 6 // This program and the accompanying materials … … 8 8 // which accompanies this distribution. The full text of the license may be found at 9 9 // http://opensource.org/licenses/bsd-license.php 10 // 10 // 11 11 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 12 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 // 13 // 14 14 //**/ 15 15 -
Property svn:eol-style
set to
-
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c
r58459 r58466 237 237 @param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. 238 238 @param[in] Configuration A null-terminated Unicode string in 239 <ConfigString> format. 239 <ConfigString> format. 240 240 @param[out] Progress A pointer to a string filled in with the 241 241 offset of the most recent '&' before the … … 247 247 248 248 @retval EFI_SUCCESS The results have been distributed or are 249 awaiting distribution. 249 awaiting distribution. 250 250 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the 251 251 parts of the results that must be … … 290 290 291 291 Status = gBS->LocateProtocol ( 292 &gEfiHiiConfigRoutingProtocolGuid, 293 NULL, 292 &gEfiHiiConfigRoutingProtocolGuid, 293 NULL, 294 294 (VOID**) &ConfigRouting 295 295 ); … … 394 394 return EFI_UNSUPPORTED; 395 395 } 396 396 397 397 Status = EFI_SUCCESS; 398 398 Private = FE_CALLBACK_DATA_FROM_THIS (This); … … 408 408 return EFI_INVALID_PARAMETER; 409 409 } 410 410 411 411 if (QuestionId == KEY_VALUE_SAVE_AND_EXIT_BOOT) { 412 412 NvRamMap->BootOptionChanged = FALSE; … … 452 452 return EFI_INVALID_PARAMETER; 453 453 } 454 454 455 455 if (QuestionId >= FILE_OPTION_GOTO_OFFSET) { 456 456 // -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
r58459 r58466 26 26 // 27 27 // Free current updated date 28 // 28 // 29 29 if (mStartOpCodeHandle != NULL) { 30 30 HiiFreeOpCodeHandle (mStartOpCodeHandle); … … 47 47 Add a "Go back to main page" tag in front of the form when there are no 48 48 "Apply changes" and "Discard changes" tags in the end of the form. 49 49 50 50 @param CallbackData The BMM context data. 51 51 … … 132 132 133 133 /** 134 Clean up the dynamic opcode at label and form specified by both LabelId. 134 Clean up the dynamic opcode at label and form specified by both LabelId. 135 135 136 136 @param LabelId It is both the Form ID and Label ID for opcode deletion. … … 346 346 347 347 CreateMenuStringToken (CallbackData, CallbackData->BmmHiiHandle, &DriverOptionMenu); 348 348 349 349 ASSERT (DriverOptionMenu.MenuNumber <= (sizeof (CallbackData->BmmFakeNvData.DriverOptionDel) / sizeof (CallbackData->BmmFakeNvData.DriverOptionDel[0]))); 350 350 for (Index = 0; Index < DriverOptionMenu.MenuNumber; Index++) { … … 381 381 382 382 /** 383 Prepare the page to allow user to add description for 383 Prepare the page to allow user to add description for 384 384 a Driver Option. 385 385 … … 554 554 555 555 CreateMenuStringToken (CallbackData, CallbackData->BmmHiiHandle, OptionMenu); 556 556 557 557 OptionOrder = NULL; 558 558 QuestionId = 0; 559 559 VarOffset = 0; 560 switch (UpdatePageId) { 560 switch (UpdatePageId) { 561 561 562 562 case FORM_BOOT_CHG_ID: … … 573 573 VarOffset = DRIVER_OPTION_ORDER_VAR_OFFSET; 574 574 break; 575 } 575 } 576 576 ASSERT (OptionOrder != NULL); 577 577 578 578 OptionsOpCodeHandle = HiiAllocateOpCodeHandle (); 579 579 ASSERT (OptionsOpCodeHandle != NULL); 580 580 581 581 NewMenuEntry = NULL; 582 582 for (OptionIndex = 0; (OptionIndex < MAX_MENU_NUMBER && OptionOrder[OptionIndex] != 0); OptionIndex++) { … … 600 600 } 601 601 } 602 602 603 603 if (OptionMenu->MenuNumber > 0) { 604 HiiCreateOrderedListOpCode ( 605 mStartOpCodeHandle, // Container for dynamic created opcodes 606 QuestionId, // Question ID 607 VARSTORE_ID_BOOT_MAINT, // VarStore ID 608 VarOffset, // Offset in Buffer Storage 609 STRING_TOKEN (STR_CHANGE_ORDER), // Question prompt text 610 STRING_TOKEN (STR_CHANGE_ORDER), // Question help text 611 0, // Question flag 604 HiiCreateOrderedListOpCode ( 605 mStartOpCodeHandle, // Container for dynamic created opcodes 606 QuestionId, // Question ID 607 VARSTORE_ID_BOOT_MAINT, // VarStore ID 608 VarOffset, // Offset in Buffer Storage 609 STRING_TOKEN (STR_CHANGE_ORDER), // Question prompt text 610 STRING_TOKEN (STR_CHANGE_ORDER), // Question help text 611 0, // Question flag 612 612 0, // Ordered list flag, e.g. EFI_IFR_UNIQUE_SET 613 EFI_IFR_TYPE_NUM_SIZE_32, // Data type of Question value 614 100, // Maximum container 615 OptionsOpCodeHandle, // Option Opcode list 616 NULL // Default Opcode is NULL 613 EFI_IFR_TYPE_NUM_SIZE_32, // Data type of Question value 614 100, // Maximum container 615 OptionsOpCodeHandle, // Option Opcode list 616 NULL // Default Opcode is NULL 617 617 ); 618 618 } … … 693 693 Index 694 694 ); 695 } 695 } 696 696 697 697 HiiCreateOneOfOpCode ( … … 752 752 DefaultOpCodeHandle 753 753 ); 754 754 755 755 HiiFreeOpCodeHandle (DefaultOpCodeHandle); 756 756 … … 827 827 continue; 828 828 } 829 829 830 830 // 831 831 // Build mode string Column x Row … … 940 940 NULL 941 941 ); 942 942 943 943 HiiFreeOpCodeHandle (OptionsOpCodeHandle); 944 944 OptionsOpCodeHandle = HiiAllocateOpCodeHandle (); -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/Variable.c
r58459 r58466 20 20 make sure BootOrder is in valid state. 21 21 22 @retval EFI_SUCCESS If all boot load option EFI Variables corresponding to 22 @retval EFI_SUCCESS If all boot load option EFI Variables corresponding to 23 23 BM_LOAD_CONTEXT marked for deletion is deleted. 24 24 @retval EFI_NOT_FOUND If can not find the boot option want to be deleted. 25 @return Others If failed to update the "BootOrder" variable after deletion. 25 @return Others If failed to update the "BootOrder" variable after deletion. 26 26 27 27 **/ … … 87 87 88 88 89 89 90 90 91 91 @retval EFI_SUCCESS The boot order is updated successfully. … … 314 314 315 315 /** 316 Update the device path of "ConOut", "ConIn" and "ErrOut" 316 Update the device path of "ConOut", "ConIn" and "ErrOut" 317 317 based on the new BaudRate, Data Bits, parity and Stop Bits 318 318 set. … … 384 384 This function clear the EFI variable defined by ConsoleName and 385 385 gEfiGlobalVariableGuid. It then build the multi-instance device 386 path by appending the device path of the Console (In/Out/Err) instance 386 path by appending the device path of the Console (In/Out/Err) instance 387 387 in ConsoleMenu. Then it scan all corresponding console device by 388 388 scanning Terminal (built from device supporting Serial I/O instances) … … 448 448 Vendor.Header.Type = MESSAGING_DEVICE_PATH; 449 449 Vendor.Header.SubType = MSG_VENDOR_DP; 450 450 451 451 ASSERT (NewTerminalContext->TerminalType < (sizeof (TerminalTypeGuid) / sizeof (TerminalTypeGuid[0]))); 452 452 CopyMem ( … … 521 521 522 522 @retval EFI_SUCCESS The function complete successfully. 523 @return The EFI variable can not be saved. See gRT->SetVariable for detail return information. 523 @return The EFI variable can not be saved. See gRT->SetVariable for detail return information. 524 524 **/ 525 525 EFI_STATUS … … 532 532 533 533 /** 534 This function create a currently loaded Drive Option from 535 the BMM. It then appends this Driver Option to the end of 534 This function create a currently loaded Drive Option from 535 the BMM. It then appends this Driver Option to the end of 536 536 the "DriverOrder" list. It append this Driver Opotion to the end 537 537 of DriverOptionMenu. … … 727 727 728 728 /** 729 This function create a currently loaded Boot Option from 730 the BMM. It then appends this Boot Option to the end of 729 This function create a currently loaded Boot Option from 730 the BMM. It then appends this Boot Option to the end of 731 731 the "BootOrder" list. It also append this Boot Opotion to the end 732 732 of BootOptionMenu. … … 908 908 909 909 /** 910 This function update the "BootNext" EFI Variable. If there is 910 This function update the "BootNext" EFI Variable. If there is 911 911 no "BootNext" specified in BMM, this EFI Variable is deleted. 912 912 It also update the BMM context data specified the "BootNext" … … 916 916 917 917 @retval EFI_SUCCESS The function complete successfully. 918 @return The EFI variable can be saved. See gRT->SetVariable 918 @return The EFI variable can be saved. See gRT->SetVariable 919 919 for detail return information. 920 920 … … 1102 1102 // 1103 1103 ASSERT_EFI_ERROR (Status); 1104 1104 1105 1105 BOpt_FreeMenu (&DriverOptionMenu); 1106 1106 BOpt_GetDriverOptions (CallbackData); -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.c
r58459 r58466 45 45 END_DEVICE_PATH_TYPE, 46 46 END_ENTIRE_DEVICE_PATH_SUBTYPE, 47 { 47 { 48 48 (UINT8) (END_DEVICE_PATH_LENGTH), 49 49 (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8) … … 188 188 /** 189 189 This function invokes Boot Manager. If all devices have not a chance to be connected, 190 the connect all will be triggered. It then enumerate all boot options. If 190 the connect all will be triggered. It then enumerate all boot options. If 191 191 a boot option from the Boot Manager page is selected, Boot Manager will boot 192 192 from this boot option. 193 193 194 194 **/ 195 195 VOID … … 295 295 HiiCreateEndOpCode (StartOpCodeHandle); 296 296 } 297 297 298 298 if (IsLegacyOption && DeviceType != ((BBS_BBS_DEVICE_PATH *) Option->DevicePath)->DeviceType) { 299 299 if (NeedEndOp) { … … 315 315 316 316 ASSERT (Option->Description != NULL); 317 317 318 318 Token = HiiSetString (HiiHandle, 0, Option->Description, NULL); 319 319 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.h
r48674 r58466 91 91 /** 92 92 This function invokes Boot Manager. If all devices have not a chance to be connected, 93 the connect all will be triggered. It then enumerate all boot options. If 93 the connect all will be triggered. It then enumerate all boot options. If 94 94 a boot option from the Boot Manager page is selected, Boot Manager will boot 95 95 from this boot option. 96 96 97 97 **/ 98 98 VOID -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManagerStrings.uni
-
Property svn:mime-type
changed from
application/octet-stream
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
-
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManagerVfr.Vfr
-
Property svn:eol-style
set to
native
r48674 r58466 1 1 ///** @file 2 // 2 // 3 3 // Browser formset. 4 // 4 // 5 5 // Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR> 6 6 // This program and the accompanying materials … … 8 8 // which accompanies this distribution. The full text of the license may be found at 9 9 // http://opensource.org/licenses/bsd-license.php 10 // 10 // 11 11 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 12 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 // 13 // 14 14 //**/ 15 15 -
Property svn:eol-style
set to
-
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/Capsules.c
r58459 r58466 52 52 VOID **CapsulePtr; 53 53 VOID **CapsulePtrCache; 54 EFI_GUID *CapsuleGuidCache; 54 EFI_GUID *CapsuleGuidCache; 55 55 BOOLEAN NeedReset; 56 56 … … 71 71 return EFI_INVALID_PARAMETER; 72 72 } 73 73 74 74 Status = EFI_SUCCESS; 75 75 // … … 81 81 HobPointer.Raw = GET_NEXT_HOB (HobPointer); 82 82 } 83 83 84 84 if (CapsuleTotalNumber == 0) { 85 85 // … … 93 93 return EFI_SUCCESS; 94 94 } 95 95 96 96 // 97 97 // Init temp Capsule Data table. … … 103 103 CapsuleGuidCache = (EFI_GUID *) AllocateZeroPool (sizeof (EFI_GUID) * CapsuleTotalNumber); 104 104 ASSERT (CapsuleGuidCache != NULL); 105 105 106 106 // 107 107 // Find all capsule images from hob … … 120 120 // 121 121 // Capsules who have CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE always are used for operating 122 // System to have information persist across a system reset. EFI System Table must 122 // System to have information persist across a system reset. EFI System Table must 123 123 // point to an array of capsules that contains the same CapsuleGuid value. And agents 124 // searching for this type capsule will look in EFI System Table and search for the 124 // searching for this type capsule will look in EFI System Table and search for the 125 125 // capsule's Guid and associated pointer to retrieve the data. Two steps below describes 126 // how to sorting the capsules by the unique guid and install the array to EFI System Table. 127 // Firstly, Loop for all coalesced capsules, record unique CapsuleGuids and cache them in an 126 // how to sorting the capsules by the unique guid and install the array to EFI System Table. 127 // Firstly, Loop for all coalesced capsules, record unique CapsuleGuids and cache them in an 128 128 // array for later sorting capsules by CapsuleGuid. 129 129 // … … 133 133 // 134 134 // For each capsule, we compare it with known CapsuleGuid in the CacheArray. 135 // If already has the Guid, skip it. Whereas, record it in the CacheArray as 135 // If already has the Guid, skip it. Whereas, record it in the CacheArray as 136 136 // an additional one. 137 137 // … … 160 160 CacheIndex = 0; 161 161 while (CacheIndex < CacheNumber) { 162 CapsuleNumber = 0; 162 CapsuleNumber = 0; 163 163 for (Index = 0; Index < CapsuleTotalNumber; Index++) { 164 164 CapsuleHeader = (EFI_CAPSULE_HEADER*) CapsulePtr [Index]; … … 173 173 } 174 174 if (CapsuleNumber != 0) { 175 Size = sizeof(EFI_CAPSULE_TABLE) + (CapsuleNumber - 1) * sizeof(VOID*); 175 Size = sizeof(EFI_CAPSULE_TABLE) + (CapsuleNumber - 1) * sizeof(VOID*); 176 176 CapsuleTable = AllocateRuntimePool (Size); 177 177 ASSERT (CapsuleTable != NULL); … … 186 186 // 187 187 // Besides ones with CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE flag, all capsules left are 188 // recognized by platform with CapsuleGuid. For general platform driver, UpdateFlash 188 // recognized by platform with CapsuleGuid. For general platform driver, UpdateFlash 189 189 // type is commonly supported, so here only deal with encapsuled FVs capsule. Additional 190 190 // type capsule transaction could be extended. It depends on platform policy. … … 221 221 222 222 PlatformBdsLockNonUpdatableFlash (); 223 223 224 224 // 225 225 // Free the allocated temp memory space. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.c
r58459 r58466 44 44 // Which form Id need to be show. 45 45 // 46 EFI_FORM_ID mNextShowFormId = DEVICE_MANAGER_FORM_ID; 46 EFI_FORM_ID mNextShowFormId = DEVICE_MANAGER_FORM_ID; 47 47 48 48 // … … 75 75 END_DEVICE_PATH_TYPE, 76 76 END_ENTIRE_DEVICE_PATH_SUBTYPE, 77 { 77 { 78 78 (UINT8) (END_DEVICE_PATH_LENGTH), 79 79 (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8) … … 97 97 END_DEVICE_PATH_TYPE, 98 98 END_ENTIRE_DEVICE_PATH_SUBTYPE, 99 { 99 { 100 100 (UINT8) (END_DEVICE_PATH_LENGTH), 101 101 (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8) … … 241 241 242 242 ASSERT (Handle != NULL); 243 ASSERT (SetupClassGuid != NULL); 243 ASSERT (SetupClassGuid != NULL); 244 244 ASSERT (FormSetTitle != NULL); 245 245 ASSERT (FormSetHelp != NULL); … … 264 264 // 265 265 ASSERT (Status == EFI_BUFFER_TOO_SMALL); 266 266 267 267 HiiPackageList = AllocatePool (BufferSize); 268 268 ASSERT (HiiPackageList != NULL); … … 327 327 } 328 328 } 329 329 330 330 // 331 331 // Go to next package … … 342 342 Get the mac address string from the device path. 343 343 if the device path has the vlan, get the vanid also. 344 345 @param MacAddressNode Device path begin with mac address 344 345 @param MacAddressNode Device path begin with mac address 346 346 @param PBuffer Output string buffer contain mac address. 347 347 348 348 **/ 349 BOOLEAN 349 BOOLEAN 350 350 GetMacAddressString( 351 351 IN MAC_ADDR_DEVICE_PATH *MacAddressNode, … … 383 383 StrCpy(String, L"MAC:"); 384 384 String += 4; 385 385 386 386 // 387 387 // Convert the MAC address into a unicode string. … … 394 394 } 395 395 } 396 396 397 397 // 398 398 // If VLAN is configured, it will need extra 5 characters like "\0005". … … 429 429 @return Other values if failed to Add the item. 430 430 **/ 431 BOOLEAN 431 BOOLEAN 432 432 AddIdToMacDeviceList ( 433 433 IN EFI_STRING MacAddrString … … 471 471 TempDeviceList = (MENU_INFO_ITEM *)AllocatePool (sizeof (MENU_INFO_ITEM) * mMacDeviceList.MaxListLen); 472 472 } 473 473 474 474 if (TempDeviceList == NULL) { 475 475 return FALSE; 476 476 } 477 TempDeviceList[mMacDeviceList.CurListLen].PromptId = PromptId; 477 TempDeviceList[mMacDeviceList.CurListLen].PromptId = PromptId; 478 478 TempDeviceList[mMacDeviceList.CurListLen].QuestionId = (EFI_QUESTION_ID) (mMacDeviceList.CurListLen + NETWORK_DEVICE_LIST_KEY_OFFSET); 479 479 480 480 if (mMacDeviceList.CurListLen > 0) { 481 481 FreePool(mMacDeviceList.NodeList); 482 482 } 483 483 484 484 mMacDeviceList.NodeList = TempDeviceList; 485 485 } … … 498 498 @param *Node Input device which need to be check. 499 499 @param *NeedAddItem Whether need to add the menu in the network device list. 500 500 501 501 @retval TRUE Has mac address device path. 502 @retval FALSE NOT Has mac address device path. 502 @retval FALSE NOT Has mac address device path. 503 503 504 504 **/ … … 512 512 CHAR16 *Buffer; 513 513 BOOLEAN ReturnVal; 514 514 515 515 ASSERT (Node != NULL); 516 516 *NeedAddItem = FALSE; … … 527 527 (DevicePathSubType (DevicePath) == MSG_MAC_ADDR_DP)) { 528 528 ReturnVal = TRUE; 529 529 530 530 if (DEVICE_MANAGER_FORM_ID == mNextShowFormId) { 531 531 *NeedAddItem = TRUE; 532 532 break; 533 } 534 533 } 534 535 535 if (!GetMacAddressString((MAC_ADDR_DEVICE_PATH*)DevicePath, &Buffer)) { 536 536 break; … … 546 546 if (NETWORK_DEVICE_LIST_FORM_ID == mNextShowFormId) { 547 547 // 548 // Same handle may has two network child handle, so the questionid 548 // Same handle may has two network child handle, so the questionid 549 549 // has the offset of SAME_HANDLE_KEY_OFFSET. 550 550 // … … 554 554 break; 555 555 } 556 } 556 } 557 557 DevicePath = NextDevicePathNode (DevicePath); 558 558 } … … 575 575 576 576 **/ 577 BOOLEAN 577 BOOLEAN 578 578 IsNeedAddNetworkMenu ( 579 579 IN EFI_HII_HANDLE Handle, … … 583 583 EFI_STATUS Status; 584 584 UINTN EntryCount; 585 UINTN Index; 585 UINTN Index; 586 586 EFI_HANDLE DriverHandle; 587 587 EFI_HANDLE ControllerHandle; … … 612 612 TmpDevicePath = DevicePath; 613 613 614 // 614 // 615 615 // Check whether this device path include mac address device path. 616 // If this path has mac address path, get the value whether need 616 // If this path has mac address path, get the value whether need 617 617 // add this info to the menu and return. 618 618 // Else check more about the child handle devcie path. … … 636 636 637 637 if (!IsDevicePathEnd (TmpDevicePath)) { 638 return FALSE; 638 return FALSE; 639 639 } 640 640 … … 675 675 } 676 676 677 // 677 // 678 678 // Check whether this device path include mac address device path. 679 679 // … … 695 695 // 696 696 // If need to update other form, return whether need to add to the menu. 697 // 697 // 698 698 goto Done; 699 699 } … … 704 704 Done: 705 705 if (OpenInfoBuffer != NULL) { 706 FreePool (OpenInfoBuffer); 707 } 708 return IsNeedAdd; 706 FreePool (OpenInfoBuffer); 707 } 708 return IsNeedAdd; 709 709 } 710 710 … … 736 736 @param GuidLists The input form set guid lists. 737 737 @param ArrayCount The input array count, new array will be arraycount + 1 size. 738 @param Offset The current used HiiHandle's Offset. 738 @param Offset The current used HiiHandle's Offset. 739 739 @param FormSetGuid The new found formset guid. 740 740 … … 780 780 This function create the dynamic content for device manager. It includes 781 781 section header for all class of devices, one-of opcode to set VBIOS. 782 782 783 783 @retval EFI_SUCCESS Operation is successful. 784 784 @return Other values if failed to clean up the dynamic content from HII … … 870 870 NewStringTitle = AllocatePool (NewStringLen); 871 871 UnicodeSPrint (NewStringTitle, NewStringLen, L"%s %s", String, mSelectedMacAddrString); 872 HiiSetString (HiiHandle, STRING_TOKEN (STR_FORM_NETWORK_DEVICE_TITLE), NewStringTitle, NULL); 872 HiiSetString (HiiHandle, STRING_TOKEN (STR_FORM_NETWORK_DEVICE_TITLE), NewStringTitle, NULL); 873 873 FreePool (String); 874 874 FreePool (NewStringTitle); … … 928 928 929 929 // 930 // One HiiHandle has more than one formset can be shown, 930 // One HiiHandle has more than one formset can be shown, 931 931 // Insert a new pair of HiiHandle + Guid to the HiiHandles and GuidLists list. 932 // 932 // 933 933 if (SkipCount > 0) { 934 934 AdjustArrayData (&HiiHandles, &GuidLists, HandleNum, Index + 1, FormSetGuid); … … 955 955 // 956 956 // Network device process 957 // 957 // 958 958 if (IsNeedAddNetworkMenu (HiiHandles[Index], &AddItemCount)) { 959 959 if (mNextShowFormId == DEVICE_MANAGER_FORM_ID) { … … 1002 1002 } else { 1003 1003 // 1004 // 1004 // 1005 1005 // Not network device process, only need to show at device manger form. 1006 1006 // … … 1115 1115 1116 1116 // 1117 // Driver Health item chose. 1117 // Driver Health item chose. 1118 1118 // 1119 1119 if (gCallbackKey == DEVICE_MANAGER_KEY_DRIVER_HEALTH) { … … 1224 1224 1225 1225 /** 1226 Collect and display the platform's driver health relative information, allow user to do interactive 1226 Collect and display the platform's driver health relative information, allow user to do interactive 1227 1227 operation while the platform is unhealthy. 1228 1228 1229 This function display a form which divided into two parts. The one list all modules which has installed 1229 This function display a form which divided into two parts. The one list all modules which has installed 1230 1230 driver health protocol. The list usually contain driver name, controller name, and it's health info. 1231 1231 While the driver name can't be retrieved, will use device path as backup. The other part of the form provide … … 1238 1238 ) 1239 1239 { 1240 EFI_STATUS Status; 1240 EFI_STATUS Status; 1241 1241 EFI_HII_HANDLE HiiHandle; 1242 1242 EFI_BROWSER_ACTION_REQUEST ActionRequest; … … 1265 1265 1266 1266 Index = 0; 1267 DriverHealthInfo = NULL; 1267 DriverHealthInfo = NULL; 1268 1268 DriverDevicePath = NULL; 1269 1269 IsControllerNameEmpty = FALSE; … … 1339 1339 Link = GetFirstNode (&DriverHealthList); 1340 1340 1341 while (!IsNull (&DriverHealthList, Link)) { 1342 DriverHealthInfo = DEVICE_MANAGER_HEALTH_INFO_FROM_LINK (Link); 1341 while (!IsNull (&DriverHealthList, Link)) { 1342 DriverHealthInfo = DEVICE_MANAGER_HEALTH_INFO_FROM_LINK (Link); 1343 1343 1344 1344 Status = DriverHealthGetDriverName (DriverHealthInfo->DriverHandle, &DriverName); … … 1353 1353 1354 1354 Status = DriverHealthGetControllerName ( 1355 DriverHealthInfo->DriverHandle, 1356 DriverHealthInfo->ControllerHandle, 1357 DriverHealthInfo->ChildHandle, 1355 DriverHealthInfo->DriverHandle, 1356 DriverHealthInfo->ControllerHandle, 1357 DriverHealthInfo->ChildHandle, 1358 1358 &ControllerName 1359 1359 ); … … 1366 1366 IsControllerNameEmpty = TRUE; 1367 1367 } 1368 1368 1369 1369 // 1370 1370 // Add the message of the Module itself provided after the string item. … … 1372 1372 if ((DriverHealthInfo->MessageList != NULL) && (DriverHealthInfo->MessageList->StringId != 0)) { 1373 1373 TmpString = HiiGetString ( 1374 DriverHealthInfo->MessageList->HiiHandle, 1375 DriverHealthInfo->MessageList->StringId, 1374 DriverHealthInfo->MessageList->HiiHandle, 1375 DriverHealthInfo->MessageList->StringId, 1376 1376 NULL 1377 1377 ); 1378 1378 ASSERT (TmpString != NULL); 1379 1379 1380 1380 StringSize += StrLen (L" ") * sizeof(CHAR16); 1381 1381 StringSize += StrLen (TmpString) * sizeof(CHAR16); … … 1383 1383 String = (EFI_STRING) AllocateZeroPool (StringSize); 1384 1384 ASSERT (String != NULL); 1385 1385 1386 1386 StrnCpy (String, DriverName, StringSize / sizeof(CHAR16)); 1387 1387 if (!IsControllerNameEmpty) { … … 1392 1392 StrnCat (String, L" ", StringSize / sizeof(CHAR16) - StrLen(String) - 1); 1393 1393 StrnCat (String, TmpString, StringSize / sizeof(CHAR16) - StrLen(String) - 1); 1394 1394 1395 1395 } else { 1396 1396 // … … 1423 1423 String = (EFI_STRING) AllocateZeroPool (StringSize); 1424 1424 ASSERT (String != NULL); 1425 1425 1426 1426 StrnCpy (String, DriverName, StringSize / sizeof(CHAR16)); 1427 1427 if (!IsControllerNameEmpty) { … … 1451 1451 Link = GetNextNode (&DriverHealthList, Link); 1452 1452 } 1453 1453 1454 1454 // 1455 1455 // Add End Opcode for Subtitle 1456 // 1456 // 1457 1457 HiiCreateEndOpCode (StartOpCodeHandle); 1458 1458 1459 1459 HiiCreateSubTitleOpCode (StartOpCodeHandleRepair, STRING_TOKEN (STR_DRIVER_HEALTH_REPAIR_ALL), 0, 0, 1); 1460 TokenHelp = HiiSetString (HiiHandle, 0, GetStringById( STRING_TOKEN (STR_DH_REPAIR_ALL_HELP)), NULL); 1460 TokenHelp = HiiSetString (HiiHandle, 0, GetStringById( STRING_TOKEN (STR_DH_REPAIR_ALL_HELP)), NULL); 1461 1461 1462 1462 if (PlaformHealthStatusCheck ()) { … … 1528 1528 // a target to display. 1529 1529 // Process the diver health status states here. 1530 // 1530 // 1531 1531 if (gCallbackKey >= DRIVER_HEALTH_KEY_OFFSET && gCallbackKey != DRIVER_HEALTH_REPAIR_ALL_KEY) { 1532 1532 ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE; … … 1539 1539 // Got the item relative node in the List 1540 1540 // 1541 if (Index == (gCallbackKey - DRIVER_HEALTH_KEY_OFFSET)) { 1541 if (Index == (gCallbackKey - DRIVER_HEALTH_KEY_OFFSET)) { 1542 1542 DriverHealthInfo = DEVICE_MANAGER_HEALTH_INFO_FROM_LINK (Link); 1543 1543 // … … 1547 1547 ProcessSingleControllerHealth ( 1548 1548 DriverHealthInfo->DriverHealth, 1549 DriverHealthInfo->ControllerHandle, 1549 DriverHealthInfo->ControllerHandle, 1550 1550 DriverHealthInfo->ChildHandle, 1551 1551 DriverHealthInfo->HealthStatus, … … 1566 1566 EnableResetRequired (); 1567 1567 } 1568 1569 // 1570 // Force return to the form of Driver Health in Device Manager 1568 1569 // 1570 // Force return to the form of Driver Health in Device Manager 1571 1571 // 1572 1572 gCallbackKey = DRIVER_HEALTH_RETURN_KEY; … … 1578 1578 if (gCallbackKey == DRIVER_HEALTH_REPAIR_ALL_KEY) { 1579 1579 ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE; 1580 1580 1581 1581 PlatformRepairAll (&DriverHealthList); 1582 1582 1583 1583 gCallbackKey = DRIVER_HEALTH_RETURN_KEY; 1584 1584 } 1585 1585 1586 1586 // 1587 1587 // Remove driver health packagelist from HII database. … … 1602 1602 FreePool(DriverHealthInfo->MessageList); 1603 1603 FreePool (DriverHealthInfo); 1604 } 1604 } 1605 1605 } 1606 1606 1607 1607 HiiFreeOpCodeHandle (StartOpCodeHandle); 1608 HiiFreeOpCodeHandle (EndOpCodeHandle); 1608 HiiFreeOpCodeHandle (EndOpCodeHandle); 1609 1609 HiiFreeOpCodeHandle (StartOpCodeHandleRepair); 1610 HiiFreeOpCodeHandle (EndOpCodeHandleRepair); 1610 HiiFreeOpCodeHandle (EndOpCodeHandleRepair); 1611 1611 1612 1612 if (gCallbackKey == DRIVER_HEALTH_RETURN_KEY) { … … 1626 1626 contoller's health state. 1627 1627 1628 @param DriverHealthList A Pointer to the list contain all of the platform driver health information. 1628 @param DriverHealthList A Pointer to the list contain all of the platform driver health information. 1629 1629 @param DriverHandle The handle of driver. 1630 1630 @param ControllerHandle The class guid specifies which form set will be displayed. 1631 @param ChildHandle The handle of the child controller to retrieve the health 1632 status on. This is an optional parameter that may be NULL. 1631 @param ChildHandle The handle of the child controller to retrieve the health 1632 status on. This is an optional parameter that may be NULL. 1633 1633 @param DriverHealth A pointer to the EFI_DRIVER_HEALTH_PROTOCOL instance. 1634 1634 @param HealthStatus The health status of the controller. … … 1727 1727 } 1728 1728 1729 DriverHealthInfo->Signature = DEVICE_MANAGER_DRIVER_HEALTH_INFO_SIGNATURE; 1729 DriverHealthInfo->Signature = DEVICE_MANAGER_DRIVER_HEALTH_INFO_SIGNATURE; 1730 1730 DriverHealthInfo->DriverHandle = DriverHandle; 1731 1731 DriverHealthInfo->ControllerHandle = ControllerHandle; … … 1742 1742 1743 1743 /** 1744 Collects all the EFI Driver Health Protocols currently present in the EFI Handle Database, 1745 and queries each EFI Driver Health Protocol to determine if one or more of the controllers 1746 managed by each EFI Driver Health Protocol instance are not healthy. 1744 Collects all the EFI Driver Health Protocols currently present in the EFI Handle Database, 1745 and queries each EFI Driver Health Protocol to determine if one or more of the controllers 1746 managed by each EFI Driver Health Protocol instance are not healthy. 1747 1747 1748 1748 @param DriverHealthList A Pointer to the list contain all of the platform driver health 1749 information. 1749 information. 1750 1750 1751 1751 @retval EFI_NOT_FOUND No controller in the platform install Driver Health Protocol. … … 1759 1759 ) 1760 1760 { 1761 EFI_STATUS Status; 1761 EFI_STATUS Status; 1762 1762 UINTN NumHandles; 1763 1763 EFI_HANDLE *DriverHealthHandles; … … 1769 1769 UINTN ControllerIndex; 1770 1770 UINTN ChildIndex; 1771 1771 1772 1772 // 1773 1773 // Initialize local variables … … 1797 1797 if (EFI_ERROR (Status) || DriverHealthHandles == NULL) { 1798 1798 // 1799 // If the list of Driver Health Protocol handles can not be retrieved, then 1799 // If the list of Driver Health Protocol handles can not be retrieved, then 1800 1800 // return EFI_OUT_OF_RESOURCES 1801 1801 // … … 1818 1818 // Retrieve the Driver Health Protocol from DriverHandle 1819 1819 // 1820 Status = gBS->HandleProtocol ( 1820 Status = gBS->HandleProtocol ( 1821 1821 DriverHealthHandles[DriverHealthIndex], 1822 1822 &gEfiDriverHealthProtocolGuid, … … 1845 1845 1846 1846 // 1847 // If all the controllers managed by this Driver Health Protocol are healthy, then skip to the next 1847 // If all the controllers managed by this Driver Health Protocol are healthy, then skip to the next 1848 1848 // Driver Health Protocol handle 1849 1849 // … … 1869 1869 if (EFI_ERROR (Status) || Handles == NULL) { 1870 1870 // 1871 // If all the handles in the handle database can not be retrieved, then 1871 // If all the handles in the handle database can not be retrieved, then 1872 1872 // return EFI_OUT_OF_RESOURCES 1873 1873 // … … 1946 1946 1947 1947 /** 1948 Check the healthy status of the platform, this function will return immediately while found one driver 1948 Check the healthy status of the platform, this function will return immediately while found one driver 1949 1949 in the platform are not healthy. 1950 1950 … … 1989 1989 // 1990 1990 // Assume all modules are healthy. 1991 // 1991 // 1992 1992 AllHealthy = TRUE; 1993 1993 … … 1995 1995 // Found one or more Handles. 1996 1996 // 1997 if (!EFI_ERROR (Status)) { 1997 if (!EFI_ERROR (Status)) { 1998 1998 for (Index = 0; Index < NoHandles; Index++) { 1999 1999 Status = gBS->HandleProtocol ( … … 2020 2020 // Return immediately one driver's status not in healthy. 2021 2021 // 2022 return FALSE; 2022 return FALSE; 2023 2023 } 2024 2024 } … … 2029 2029 2030 2030 /** 2031 Processes a single controller using the EFI Driver Health Protocol associated with 2031 Processes a single controller using the EFI Driver Health Protocol associated with 2032 2032 that controller. This algorithm continues to query the GetHealthStatus() service until 2033 one of the legal terminal states of the EFI Driver Health Protocol is reached. This may 2033 one of the legal terminal states of the EFI Driver Health Protocol is reached. This may 2034 2034 require the processing of HII Messages, HII Form, and invocation of repair operations. 2035 2035 2036 2036 @param DriverHealth A pointer to the EFI_DRIVER_HEALTH_PROTOCOL instance. 2037 2037 @param ControllerHandle The class guid specifies which form set will be displayed. 2038 @param ChildHandle The handle of the child controller to retrieve the health 2039 status on. This is an optional parameter that may be NULL. 2038 @param ChildHandle The handle of the child controller to retrieve the health 2039 status on. This is an optional parameter that may be NULL. 2040 2040 @param HealthStatus The health status of the controller. 2041 @param MessageList An array of warning or error messages associated 2042 with the controller specified by ControllerHandle and 2041 @param MessageList An array of warning or error messages associated 2042 with the controller specified by ControllerHandle and 2043 2043 ChildHandle. This is an optional parameter that may be NULL. 2044 @param FormHiiHandle The HII handle for an HII form associated with the 2044 @param FormHiiHandle The HII handle for an HII form associated with the 2045 2045 controller specified by ControllerHandle and ChildHandle. 2046 2046 @param RebootRequired Indicate whether a reboot is required to repair the controller. … … 2059 2059 EFI_STATUS Status; 2060 2060 EFI_DRIVER_HEALTH_STATUS LocalHealthStatus; 2061 2061 2062 2062 LocalHealthStatus = HealthStatus; 2063 2063 // 2064 2064 // If the module need to be repaired or reconfiguration, will process it until 2065 // reach a terminal status. The status from EfiDriverHealthStatusRepairRequired after repair 2065 // reach a terminal status. The status from EfiDriverHealthStatusRepairRequired after repair 2066 2066 // will be in (Health, Failed, Configuration Required). 2067 2067 // … … 2078 2078 } 2079 2079 // 2080 // Via a form of the driver need to do configuration provided to process of status in 2080 // Via a form of the driver need to do configuration provided to process of status in 2081 2081 // EfiDriverHealthStatusConfigurationRequired. The status after configuration should be in 2082 // (Healthy, Reboot Required, Failed, Reconnect Required, Repair Required). 2082 // (Healthy, Reboot Required, Failed, Reconnect Required, Repair Required). 2083 2083 // 2084 2084 if (LocalHealthStatus == EfiDriverHealthStatusConfigurationRequired) { … … 2114 2114 if (*MessageList != NULL) { 2115 2115 ProcessMessages (*MessageList); 2116 } 2117 } 2118 2116 } 2117 } 2118 2119 2119 // 2120 2120 // Health status in {Healthy, Failed} may also have Messages need to process … … 2131 2131 *RebootRequired = TRUE; 2132 2132 } 2133 2133 2134 2134 // 2135 2135 // Do reconnect if need. … … 2152 2152 Reports the progress of a repair operation. 2153 2153 2154 @param[in] Value A value between 0 and Limit that identifies the current 2154 @param[in] Value A value between 0 and Limit that identifies the current 2155 2155 progress of the repair operation. 2156 2156 2157 2157 @param[in] Limit The maximum value of Value for the current repair operation. 2158 For example, a driver that wants to specify progress in 2158 For example, a driver that wants to specify progress in 2159 2159 percent would use a Limit value of 100. 2160 2160 … … 2184 2184 service of the EFI Driver Health Protocol 2185 2185 2186 @param MessageList The MessageList point to messages need to processed. 2186 @param MessageList The MessageList point to messages need to processed. 2187 2187 2188 2188 **/ … … 2206 2206 if (MessageString != NULL) { 2207 2207 // 2208 // User can customize the output. Just simply print out the MessageString like below. 2208 // User can customize the output. Just simply print out the MessageString like below. 2209 2209 // Also can use the HiiHandle to display message on the front page. 2210 // 2210 // 2211 2211 // Print(L"%s\n",MessageString); 2212 2212 // gBS->Stall (100000); … … 2220 2220 2221 2221 This function is the main entry for user choose "Repair All" in the front page. 2222 It will try to do recovery job till all the driver health protocol installed modules 2222 It will try to do recovery job till all the driver health protocol installed modules 2223 2223 reach a terminal state. 2224 2224 … … 2231 2231 IN LIST_ENTRY *DriverHealthList 2232 2232 ) 2233 { 2233 { 2234 2234 DRIVER_HEALTH_INFO *DriverHealthInfo; 2235 2235 LIST_ENTRY *Link; … … 2250 2250 ASSERT (DriverHealthInfo != NULL); 2251 2251 2252 ProcessSingleControllerHealth ( 2252 ProcessSingleControllerHealth ( 2253 2253 DriverHealthInfo->DriverHealth, 2254 2254 DriverHealthInfo->ControllerHandle, … … 2268 2268 /** 2269 2269 2270 Select the best matching language according to front page policy for best user experience. 2271 2272 This function supports both ISO 639-2 and RFC 4646 language codes, but language 2273 code types may not be mixed in a single call to this function. 2270 Select the best matching language according to front page policy for best user experience. 2271 2272 This function supports both ISO 639-2 and RFC 4646 language codes, but language 2273 code types may not be mixed in a single call to this function. 2274 2274 2275 2275 @param SupportedLanguages A pointer to a Null-terminated ASCII string that 2276 contains a set of language codes in the format 2276 contains a set of language codes in the format 2277 2277 specified by Iso639Language. 2278 2278 @param Iso639Language If TRUE, then all language codes are assumed to be … … 2281 2281 2282 2282 @retval NULL The best matching language could not be found in SupportedLanguages. 2283 @retval NULL There are not enough resources available to return the best matching 2283 @retval NULL There are not enough resources available to return the best matching 2284 2284 language. 2285 @retval Other A pointer to a Null-terminated ASCII string that is the best matching 2285 @retval Other A pointer to a Null-terminated ASCII string that is the best matching 2286 2286 language in SupportedLanguages. 2287 2287 **/ … … 2321 2321 @param DriverBindingHandle The handle on which the Component Name (2) protocol instance is retrieved. 2322 2322 @param ComponentName A pointer to the Component Name (2) protocol interface. 2323 @param SupportedLanguage The best suitable language that matches the SupportedLangues interface for the 2323 @param SupportedLanguage The best suitable language that matches the SupportedLangues interface for the 2324 2324 located Component Name (2) instance. 2325 2325 … … 2398 2398 2399 2399 // 2400 // Retrieve Component Name (2) protocol instance on the driver binding handle and 2401 // find the best language this instance supports. 2400 // Retrieve Component Name (2) protocol instance on the driver binding handle and 2401 // find the best language this instance supports. 2402 2402 // 2403 2403 Status = GetComponentNameWorker ( … … 2410 2410 return Status; 2411 2411 } 2412 2412 2413 2413 // 2414 2414 // Get the driver name from Component Name (2) protocol instance on the driver binging handle. … … 2420 2420 ); 2421 2421 FreePool (BestLanguage); 2422 2422 2423 2423 return Status; 2424 2424 } … … 2429 2429 in turn. It first tries UEFI 2.0 Component Name 2 protocol interface and try to get the driver name. 2430 2430 If the attempt fails, it then gets the driver name from EFI 1.1 Component Name protocol for backward 2431 compatibility support. 2431 compatibility support. 2432 2432 2433 2433 @param DriverBindingHandle The handle on which the Component Name (2) protocol instance is retrieved. … … 2470 2470 in turn. It first tries UEFI 2.0 Component Name 2 protocol interface and try to get the controller name. 2471 2471 If the attempt fails, it then gets the controller name from EFI 1.1 Component Name protocol for backward 2472 compatibility support. 2472 compatibility support. 2473 2473 2474 2474 @param ProtocolGuid A pointer to an EFI_GUID. It points to Component Name (2) protocol GUID. … … 2503 2503 2504 2504 // 2505 // Retrieve Component Name (2) protocol instance on the driver binding handle and 2506 // find the best language this instance supports. 2505 // Retrieve Component Name (2) protocol instance on the driver binding handle and 2506 // find the best language this instance supports. 2507 2507 // 2508 2508 Status = GetComponentNameWorker ( … … 2534 2534 2535 2535 This function gets controller name from Component Name 2 protocol interface and Component Name protocol interface 2536 in turn. It first tries UEFI 2.0 Component Name 2 protocol interface and try to get the controller name. 2536 in turn. It first tries UEFI 2.0 Component Name 2 protocol interface and try to get the controller name. 2537 2537 If the attempt fails, it then gets the controller name from EFI 1.1 Component Name protocol for backward 2538 compatibility support. 2538 compatibility support. 2539 2539 2540 2540 @param DriverBindingHandle The handle on which the Component Name (2) protocol instance is retrieved. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManager.h
r58459 r58466 76 76 EFI_DRIVER_HEALTH_PROTOCOL *DriverHealth; 77 77 /// 78 /// Driver health messages of the specify Driver 78 /// Driver health messages of the specify Driver 79 79 /// 80 80 EFI_DRIVER_HEALTH_HII_MESSAGE *MessageList; … … 193 193 This function create the dynamic content for device manager. It includes 194 194 section header for all class of devices, one-of opcode to set VBIOS. 195 195 196 196 @retval EFI_SUCCESS Operation is successful. 197 197 @retval Other values if failed to clean up the dynamic content from HII … … 211 211 contoller's health state. 212 212 213 @param DriverHealthList A Pointer to the list contain all of the platform driver health information. 213 @param DriverHealthList A Pointer to the list contain all of the platform driver health information. 214 214 @param DriverHandle The handle of driver. 215 215 @param ControllerHandle The class guid specifies which form set will be displayed. 216 @param ChildHandle The handle of the child controller to retrieve the health 217 status on. This is an optional parameter that may be NULL. 216 @param ChildHandle The handle of the child controller to retrieve the health 217 status on. This is an optional parameter that may be NULL. 218 218 @param DriverHealth A pointer to the EFI_DRIVER_HEALTH_PROTOCOL instance. 219 219 @param HealthStatus The health status of the controller. … … 238 238 239 239 /** 240 Collects all the EFI Driver Health Protocols currently present in the EFI Handle Database, 241 and queries each EFI Driver Health Protocol to determine if one or more of the controllers 242 managed by each EFI Driver Health Protocol instance are not healthy. 240 Collects all the EFI Driver Health Protocols currently present in the EFI Handle Database, 241 and queries each EFI Driver Health Protocol to determine if one or more of the controllers 242 managed by each EFI Driver Health Protocol instance are not healthy. 243 243 244 244 @param DriverHealthList A Pointer to the list contain all of the platform driver health … … 256 256 257 257 /** 258 Check the healthy status of the platform, this function will return immediately while found one driver 258 Check the healthy status of the platform, this function will return immediately while found one driver 259 259 in the platform are not healthy. 260 260 … … 272 272 273 273 This function is the main entry for user choose "Repair All" in the front page. 274 It will try to do recovery job till all the driver health protocol installed modules 274 It will try to do recovery job till all the driver health protocol installed modules 275 275 reach a terminal state. 276 276 … … 285 285 286 286 /** 287 Processes a single controller using the EFI Driver Health Protocol associated with 287 Processes a single controller using the EFI Driver Health Protocol associated with 288 288 that controller. This algorithm continues to query the GetHealthStatus() service until 289 one of the legal terminal states of the EFI Driver Health Protocol is reached. This may 289 one of the legal terminal states of the EFI Driver Health Protocol is reached. This may 290 290 require the processing of HII Messages, HII Form, and invocation of repair operations. 291 291 292 292 @param DriverHealth A pointer to the EFI_DRIVER_HEALTH_PROTOCOL instance. 293 293 @param ControllerHandle The class guid specifies which form set will be displayed. 294 @param ChildHandle The handle of the child controller to retrieve the health 295 status on. This is an optional parameter that may be NULL. 294 @param ChildHandle The handle of the child controller to retrieve the health 295 status on. This is an optional parameter that may be NULL. 296 296 @param HealthStatus The health status of the controller. 297 @param MessageList An array of warning or error messages associated 298 with the controller specified by ControllerHandle and 297 @param MessageList An array of warning or error messages associated 298 with the controller specified by ControllerHandle and 299 299 ChildHandle. This is an optional parameter that may be NULL. 300 @param FormHiiHandle The HII handle for an HII form associated with the 300 @param FormHiiHandle The HII handle for an HII form associated with the 301 301 controller specified by ControllerHandle and ChildHandle. 302 302 @param RebootRequired Indicate whether a reboot is required to repair the controller. … … 316 316 Reports the progress of a repair operation. 317 317 318 @param[in] Value A value between 0 and Limit that identifies the current 318 @param[in] Value A value between 0 and Limit that identifies the current 319 319 progress of the repair operation. 320 320 321 321 @param[in] Limit The maximum value of Value for the current repair operation. 322 For example, a driver that wants to specify progress in 322 For example, a driver that wants to specify progress in 323 323 percent would use a Limit value of 100. 324 324 … … 337 337 service of the EFI Driver Health Protocol 338 338 339 @param MessageList The MessageList point to messages need to processed. 339 @param MessageList The MessageList point to messages need to processed. 340 340 341 341 **/ … … 347 347 348 348 /** 349 Collect and display the platform's driver health relative information, allow user to do interactive 349 Collect and display the platform's driver health relative information, allow user to do interactive 350 350 operation while the platform is unhealthy. 351 351 352 This function display a form which divided into two parts. The one list all modules which has installed 352 This function display a form which divided into two parts. The one list all modules which has installed 353 353 driver health protocol. The list usually contain driver name, controller name, and it's health info. 354 354 While the driver name can't be retrieved, will use device path as backup. The other part of the form provide … … 363 363 /** 364 364 365 Select the best matching language according to front page policy for best user experience. 366 367 This function supports both ISO 639-2 and RFC 4646 language codes, but language 368 code types may not be mixed in a single call to this function. 365 Select the best matching language according to front page policy for best user experience. 366 367 This function supports both ISO 639-2 and RFC 4646 language codes, but language 368 code types may not be mixed in a single call to this function. 369 369 370 370 @param SupportedLanguages A pointer to a Null-terminated ASCII string that 371 contains a set of language codes in the format 371 contains a set of language codes in the format 372 372 specified by Iso639Language. 373 373 @param Iso639Language If TRUE, then all language codes are assumed to be … … 376 376 377 377 @retval NULL The best matching language could not be found in SupportedLanguages. 378 @retval NULL There are not enough resources available to return the best matching 378 @retval NULL There are not enough resources available to return the best matching 379 379 language. 380 @retval Other A pointer to a Null-terminated ASCII string that is the best matching 380 @retval Other A pointer to a Null-terminated ASCII string that is the best matching 381 381 language in SupportedLanguages. 382 382 **/ … … 395 395 @param DriverBindingHandle The handle on which the Component Name (2) protocol instance is retrieved. 396 396 @param ComponentName A pointer to the Component Name (2) protocol interface. 397 @param SupportedLanguage The best suitable language that matches the SupportedLangues interface for the 397 @param SupportedLanguage The best suitable language that matches the SupportedLangues interface for the 398 398 located Component Name (2) instance. 399 399 … … 441 441 in turn. It first tries UEFI 2.0 Component Name 2 protocol interface and try to get the driver name. 442 442 If the attempt fails, it then gets the driver name from EFI 1.1 Component Name protocol for backward 443 compatibility support. 443 compatibility support. 444 444 445 445 @param DriverBindingHandle The handle on which the Component Name (2) protocol instance is retrieved. … … 463 463 in turn. It first tries UEFI 2.0 Component Name 2 protocol interface and try to get the controller name. 464 464 If the attempt fails, it then gets the controller name from EFI 1.1 Component Name protocol for backward 465 compatibility support. 465 compatibility support. 466 466 467 467 @param ProtocolGuid A pointer to an EFI_GUID. It points to Component Name (2) protocol GUID. … … 493 493 /** 494 494 This function gets controller name from Component Name 2 protocol interface and Component Name protocol interface 495 in turn. It first tries UEFI 2.0 Component Name 2 protocol interface and try to get the controller name. 495 in turn. It first tries UEFI 2.0 Component Name 2 protocol interface and try to get the controller name. 496 496 If the attempt fails, it then gets the controller name from EFI 1.1 Component Name protocol for backward 497 compatibility support. 497 compatibility support. 498 498 499 499 @param DriverBindingHandle The handle on which the Component Name (2) protocol instance is retrieved. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManagerStrings.uni
-
Property svn:mime-type
changed from
application/octet-stream
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
-
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DeviceManagerVfr.Vfr
-
Property svn:eol-style
set to
native
r48674 r58466 1 1 ///** @file 2 // 2 // 3 3 // Device Manager formset. 4 // 4 // 5 5 // Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR> 6 6 // This program and the accompanying materials … … 8 8 // which accompanies this distribution. The full text of the license may be found at 9 9 // http://opensource.org/licenses/bsd-license.php 10 // 10 // 11 11 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 12 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 // 13 // 14 14 //**/ 15 15 … … 60 60 label LABEL_DEVICES_LIST; 61 61 label LABEL_END; 62 62 63 63 subtitle text = STRING_TOKEN(STR_EMPTY_STRING); 64 64 65 65 label LABEL_VBIOS; 66 66 label LABEL_END; 67 67 68 68 subtitle text = STRING_TOKEN(STR_EMPTY_STRING); 69 69 subtitle text = STRING_TOKEN(STR_EXIT_STRING); -
Property svn:eol-style
set to
-
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/DeviceMngr/DriverHealthVfr.Vfr
-
Property svn:eol-style
set to
native
r48674 r58466 1 1 ///** @file 2 // 2 // 3 3 // Driver Health formset. 4 // 4 // 5 5 // Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR> 6 6 // This program and the accompanying materials … … 8 8 // which accompanies this distribution. The full text of the license may be found at 9 9 // http://opensource.org/licenses/bsd-license.php 10 // 10 // 11 11 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 12 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 // 13 // 14 14 //**/ 15 15 … … 21 21 help = STRING_TOKEN(STR_EMPTY_STRING), 22 22 classguid = DRIVER_HEALTH_FORMSET_GUID, 23 23 24 24 form formid = DRIVER_HEALTH_FORM_ID, 25 25 title = STRING_TOKEN(STR_DH_BANNER); 26 26 27 27 label LABEL_DRIVER_HEALTH; 28 label LABEL_DRIVER_HEALTH_END; 29 28 label LABEL_DRIVER_HEALTH_END; 29 30 30 subtitle text = STRING_TOKEN(STR_LAST_STRING); 31 31 label LABEL_DRIVER_HEALTH_REAPIR_ALL; 32 32 label LABEL_DRIVER_HEALTH_REAPIR_ALL_END; 33 33 34 34 subtitle text = STRING_TOKEN(STR_LAST_STRING); 35 35 subtitle text = STRING_TOKEN(STR_HELP_FOOTER); 36 subtitle text = STRING_TOKEN(STR_LAST_STRING); 37 endform; 36 subtitle text = STRING_TOKEN(STR_LAST_STRING); 37 endform; 38 38 endformset; -
Property svn:eol-style
set to
-
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
r58459 r58466 190 190 return EFI_UNSUPPORTED; 191 191 } 192 192 193 193 gCallbackKey = QuestionId; 194 194 … … 211 211 // 212 212 Lang = AllocatePool (AsciiStrSize (mLanguageString)); 213 ASSERT (Lang != NULL); 213 ASSERT (Lang != NULL); 214 214 215 215 Index = 0; … … 280 280 } 281 281 282 return EFI_SUCCESS; 282 return EFI_SUCCESS; 283 283 } 284 284 … … 415 415 // 416 416 // Count the language list number. 417 // 417 // 418 418 LangCode = mLanguageString; 419 419 Lang = AllocatePool (AsciiStrSize (mLanguageString)); … … 759 759 FreePool (NewString); 760 760 Find[0] = TRUE; 761 } 761 } 762 762 763 763 if (Record->Type == EFI_SMBIOS_TYPE_SYSTEM_INFORMATION) { … … 770 770 Find[1] = TRUE; 771 771 } 772 772 773 773 if (Record->Type == EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION) { 774 774 Type4Record = (SMBIOS_TABLE_TYPE4 *) Record; … … 779 779 FreePool (NewString); 780 780 Find[2] = TRUE; 781 } 781 } 782 782 783 783 if (Record->Type == EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION) { … … 788 788 FreePool (NewString); 789 789 Find[3] = TRUE; 790 } 790 } 791 791 792 792 if ( Record->Type == EFI_SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS ) { … … 799 799 HiiSetString (gFrontPagePrivate.HiiHandle, TokenToUpdate, NewString, NULL); 800 800 FreePool (NewString); 801 Find[4] = TRUE; 801 Find[4] = TRUE; 802 802 } 803 803 } while ( !(Find[0] && Find[1] && Find[2] && Find[3] && Find[4])); … … 901 901 SetMem (&Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0x0); 902 902 SetMem (&Color, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), 0xff); 903 903 904 904 TmpStr = GetStringById (STRING_TOKEN (STR_START_BOOT_OPTION)); 905 905 … … 912 912 } 913 913 } 914 914 915 915 916 916 TimeoutRemain = TimeoutDefault; … … 923 923 } 924 924 TimeoutRemain--; 925 925 926 926 if (!FeaturePcdGet(PcdBootlogoOnlyEnable)) { 927 927 // … … 940 940 } 941 941 } 942 942 943 943 if (TmpStr != NULL) { 944 944 gBS->FreePool (TmpStr); … … 991 991 { 992 992 EFI_STATUS Status; 993 EFI_STATUS StatusHotkey; 993 EFI_STATUS StatusHotkey; 994 994 EFI_BOOT_LOGO_PROTOCOL *BootLogo; 995 995 EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput; … … 1014 1014 if (!mModeInitialized) { 1015 1015 // 1016 // After the console is ready, get current video resolution 1016 // After the console is ready, get current video resolution 1017 1017 // and text mode before launching setup at first time. 1018 1018 // … … 1025 1025 GraphicsOutput = NULL; 1026 1026 } 1027 1027 1028 1028 Status = gBS->HandleProtocol ( 1029 1029 gST->ConsoleOutHandle, … … 1033 1033 if (EFI_ERROR (Status)) { 1034 1034 SimpleTextOut = NULL; 1035 } 1035 } 1036 1036 1037 1037 if (GraphicsOutput != NULL) { … … 1056 1056 // 1057 1057 // Get user defined text mode for setup. 1058 // 1058 // 1059 1059 mSetupHorizontalResolution = PcdGet32 (PcdSetupVideoHorizontalResolution); 1060 mSetupVerticalResolution = PcdGet32 (PcdSetupVideoVerticalResolution); 1060 mSetupVerticalResolution = PcdGet32 (PcdSetupVideoVerticalResolution); 1061 1061 mSetupTextModeColumn = PcdGet32 (PcdSetupConOutColumn); 1062 1062 mSetupTextModeRow = PcdGet32 (PcdSetupConOutRow); … … 1085 1085 // 1086 1086 // Clear EFI_OS_INDICATIONS_BOOT_TO_FW_UI to acknowledge OS 1087 // 1087 // 1088 1088 OsIndication &= ~((UINT64)EFI_OS_INDICATIONS_BOOT_TO_FW_UI); 1089 1089 Status = gRT->SetVariable ( … … 1122 1122 // 1123 1123 // Ensure screen is clear when switch Console from Graphics mode to Text mode 1124 // Skip it in normal boot 1124 // Skip it in normal boot 1125 1125 // 1126 1126 gST->ConOut->EnableCursor (gST->ConOut, TRUE); … … 1146 1146 1147 1147 // 1148 // Install BM HiiPackages. 1149 // Keep BootMaint HiiPackage, so that it can be covered by global setting. 1148 // Install BM HiiPackages. 1149 // Keep BootMaint HiiPackage, so that it can be covered by global setting. 1150 1150 // 1151 1151 InitBMPackage (); … … 1157 1157 // 1158 1158 BdsSetConsoleMode (TRUE); 1159 1159 1160 1160 InitializeFrontPage (FALSE); 1161 1161 … … 1266 1266 /** 1267 1267 This function will change video resolution and text mode 1268 according to defined setup mode or defined boot mode 1269 1270 @param IsSetupMode Indicate mode is changed to setup mode or boot mode. 1268 according to defined setup mode or defined boot mode 1269 1270 @param IsSetupMode Indicate mode is changed to setup mode or boot mode. 1271 1271 1272 1272 @retval EFI_SUCCESS Mode is changed successfully. … … 1296 1296 UINTN Index; 1297 1297 UINTN CurrentColumn; 1298 UINTN CurrentRow; 1298 UINTN CurrentRow; 1299 1299 1300 1300 MaxGopMode = 0; … … 1302 1302 1303 1303 // 1304 // Get current video resolution and text mode 1304 // Get current video resolution and text mode 1305 1305 // 1306 1306 Status = gBS->HandleProtocol ( … … 1320 1320 if (EFI_ERROR (Status)) { 1321 1321 SimpleTextOut = NULL; 1322 } 1322 } 1323 1323 1324 1324 if ((GraphicsOutput == NULL) || (SimpleTextOut == NULL)) { … … 1341 1341 NewVerticalResolution = mBootVerticalResolution; 1342 1342 NewColumns = mBootTextModeColumn; 1343 NewRows = mBootTextModeRow; 1344 } 1345 1343 NewRows = mBootTextModeRow; 1344 } 1345 1346 1346 if (GraphicsOutput != NULL) { 1347 1347 MaxGopMode = GraphicsOutput->Mode->MaxMode; 1348 } 1348 } 1349 1349 1350 1350 if (SimpleTextOut != NULL) { … … 1444 1444 PcdSet32 (PcdConOutColumn, NewColumns); 1445 1445 PcdSet32 (PcdConOutRow, NewRows); 1446 1447 1446 1447 1448 1448 // 1449 1449 // Video mode is changed, so restart graphics console driver and higher level driver. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.h
r58459 r58466 237 237 /** 238 238 This function will change video resolution and text mode 239 according to defined setup mode or defined boot mode 240 241 @param IsSetupMode Indicate mode is changed to setup mode or boot mode. 239 according to defined setup mode or defined boot mode 240 241 @param IsSetupMode Indicate mode is changed to setup mode or boot mode. 242 242 243 243 @retval EFI_SUCCESS Mode is changed successfully. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPageStrings.uni
-
Property svn:mime-type
changed from
application/octet-stream
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
-
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPageVfr.Vfr
-
Property svn:eol-style
set to
native
r58459 r58466 1 1 ///** @file 2 // 2 // 3 3 // Browser formset. 4 // 4 // 5 5 // Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR> 6 6 // This program and the accompanying materials … … 8 8 // which accompanies this distribution. The full text of the license may be found at 9 9 // http://opensource.org/licenses/bsd-license.php 10 // 10 // 11 11 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 12 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 // 13 // 14 14 //**/ 15 15 -
Property svn:eol-style
set to
-
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.c
r58459 r58466 74 74 VOID 75 75 ) 76 { 76 { 77 77 EFI_STATUS Status; 78 78 UINTN ExitDataSize; … … 81 81 if (mHotkeyBootOption == NULL) { 82 82 return EFI_NOT_FOUND; 83 } 84 83 } 84 85 85 BdsLibConnectDevicePath (mHotkeyBootOption->DevicePath); 86 86 … … 163 163 if ((KeyData->Key.ScanCode == HotkeyData->Key.ScanCode) && 164 164 (KeyData->Key.UnicodeChar == HotkeyData->Key.UnicodeChar) && 165 (((KeyData->KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) != 0) ? 165 (((KeyData->KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) != 0) ? 166 166 (KeyData->KeyState.KeyShiftState == HotkeyData->KeyState.KeyShiftState) : TRUE 167 167 ) … … 422 422 { 423 423 UINTN Index; 424 424 425 425 if (!CompareGuid (Guid, &gEfiGlobalVariableGuid) || 426 426 (StrSize (Name) != sizeof (L"Key####")) || -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/HwErrRecSupport.c
r58459 r58466 29 29 EFI_STATUS Status; 30 30 UINT16 HardwareErrorRecordLevel; 31 31 32 32 HardwareErrorRecordLevel = PcdGet16 (PcdHardwareErrorRecordLevel); 33 33 34 34 if (HardwareErrorRecordLevel != 0) { 35 35 // -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/Language.c
r58459 r58466 344 344 IN CHAR8 *Lang, 345 345 IN BOOLEAN Iso639Language 346 ) 346 ) 347 347 { 348 348 UINTN Index; … … 376 376 // 377 377 for (CompareLength = 0; SupportedLang[CompareLength] != '\0' && SupportedLang[CompareLength] != ';'; CompareLength++); 378 379 if ((CompareLength == LanguageLength) && 378 379 if ((CompareLength == LanguageLength) && 380 380 (AsciiStrnCmp (Lang, SupportedLang, CompareLength) == 0)) { 381 381 // … … 405 405 IN CHAR16 *LangName, 406 406 IN CHAR8 *SupportedLang, 407 IN CHAR8 *DefaultLang, 407 IN CHAR8 *DefaultLang, 408 408 IN BOOLEAN Iso639Language 409 409 ) -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/MemoryTest.c
r58459 r58466 283 283 return EFI_SUCCESS; 284 284 } 285 285 286 286 if (!FeaturePcdGet(PcdBootlogoOnlyEnable)) { 287 287 TmpStr = GetStringById (STRING_TOKEN (STR_ESC_TO_SKIP_MEM_TEST)); … … 311 311 ASSERT (0); 312 312 } 313 313 314 314 if (!FeaturePcdGet(PcdBootlogoOnlyEnable)) { 315 315 TempData = (UINT32) DivU64x32 (TotalMemorySize, 16); … … 403 403 (UINTN) PreviousValue 404 404 ); 405 405 406 406 } else { 407 407 DEBUG ((EFI_D_INFO, "%d bytes of system memory tested OK\r\n", TotalMemorySize)); 408 408 } 409 409 410 410 FreePool (Pos); 411 411 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/BdsDxe/Strings.uni
-
Property svn:mime-type
changed from
application/octet-stream
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
-
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/ComponentName.c
r48674 r58466 1 1 /** @file 2 UEFI Component Name(2) protocol implementation for VGA Class Driver. 2 UEFI Component Name(2) protocol implementation for VGA Class Driver. 3 3 4 4 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 13 13 **/ -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClass.c
r48674 r58466 3 3 4 4 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 13 13 **/ … … 311 311 @param ImageHandle The firmware allocated handle for the EFI image. 312 312 @param SystemTable A pointer to the EFI System Table. 313 313 314 314 @retval EFI_SUCCESS The entry point is executed successfully. 315 315 … … 342 342 /** 343 343 Internal worker function to program CRTC register via PCI I/O Protocol. 344 344 345 345 @param VgaClassDev device instance object 346 346 @param Address Address of register to write … … 376 376 /** 377 377 Internal worker function to set cursor's position to VgaClass device 378 378 379 379 @param VgaClassDev Private data structure for device instance. 380 380 @param Column Colomn of position to set cursor to. 381 381 @param Row Row of position to set cursor to. 382 382 @param MaxColumn Max value of column. 383 383 384 384 **/ 385 385 VOID … … 462 462 /** 463 463 Internal worker function to check whether input value is an ASCII char. 464 464 465 465 @param Char Character to check. 466 466 … … 483 483 /** 484 484 Internal worker function to check whether input value is a unicode control char. 485 485 486 486 @param Char Character to check. 487 487 … … 713 713 /** 714 714 Starts the device controller. 715 715 716 716 This function implments EFI_DRIVER_BINDING_PROTOCOL.Stop(). 717 717 It stops this driver on Controller. Support stoping any child handles … … 799 799 It resets the text output device hardware. The cursor position is set to (0, 0), 800 800 and the screen is cleared to the default background color for the output device. 801 801 802 802 @param This Pointer to EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL instance. 803 803 @param ExtendedVerification Indicates that the driver may perform a more exhaustive … … 838 838 /** 839 839 Writes a Unicode string to the output device. 840 840 841 841 This function implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.OutputString(). 842 842 It writes a Unicode string to the output device. This is the most basic output mechanism … … 978 978 /** 979 979 Verifies that all characters in a Unicode string can be output to the target device. 980 980 981 981 This function implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.TestString(). 982 982 It verifies that all characters in a Unicode string can be output to the target device. … … 1010 1010 /** 1011 1011 Clears the output device(s) display to the currently selected background color. 1012 1012 1013 1013 This function implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.ClearScreen(). 1014 1014 The ClearScreen() function clears the output device(s) display to the currently … … 1016 1016 1017 1017 @param This Pointer to EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL instance. 1018 1018 1019 1019 @retval EFI_SUCESS The operation completed successfully. 1020 1020 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. … … 1064 1064 /** 1065 1065 Sets the background and foreground colors for theOutputString() and ClearScreen() functions. 1066 1066 1067 1067 This function implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.SetAttribute(). 1068 1068 It sets the background and foreground colors for the OutputString() and ClearScreen() functions. … … 1075 1075 Bits 0..3 are the foreground color, 1076 1076 and bits 4..6 are the background color. 1077 1077 1078 1078 @retval EFI_SUCCESS The requested attributes were set. 1079 1079 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. … … 1097 1097 /** 1098 1098 Sets the current coordinates of the cursor position. 1099 1099 1100 1100 This function implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.SetCursorPosition(). 1101 1101 It sets the current coordinates of the cursor position. 1102 1102 The upper left corner of the screen is defined as coordinate (0, 0). 1103 1103 1104 1104 @param This Pointer to EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL instance. 1105 1105 @param Column Column of position to set the cursor to. 1106 1106 @param Row Row of position to set the cursor to. 1107 1107 1108 1108 @retval EFI_SUCCESS The operation completed successfully. 1109 1109 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. … … 1151 1151 /** 1152 1152 Makes the cursor visible or invisible. 1153 1153 1154 1154 This function implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.EnableCursor(). 1155 1155 It makes the cursor visible or invisible. … … 1158 1158 @param Visible If TRUE, the cursor is set to be visible. 1159 1159 If FALSE, the cursor is set to be invisible. 1160 1160 1161 1161 @retval EFI_SUCESS The operation completed successfully. 1162 1162 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request or the … … 1209 1209 @param Columns Columen in current mode number 1210 1210 @param Rows Row in current mode number. 1211 1211 1212 1212 @retval EFI_SUCCESS The requested mode information was returned. 1213 1213 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. … … 1252 1252 /** 1253 1253 Sets the output device(s) to a specified mode. 1254 1254 1255 1255 This function implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.QueryMode(). 1256 1256 It sets the output device(s) to the requested mode. … … 1260 1260 @param This Pointer to EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL instance. 1261 1261 @param ModeNumber The text mode to set. 1262 1262 1263 1263 @retval EFI_SUCCESS The requested text mode was set. 1264 1264 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClass.h
r48674 r58466 3 3 4 4 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 13 13 **/ … … 133 133 /** 134 134 Starts the device controller. 135 135 136 136 This function implments EFI_DRIVER_BINDING_PROTOCOL.Stop(). 137 137 It stops this driver on Controller. Support stoping any child handles … … 279 279 It resets the text output device hardware. The cursor position is set to (0, 0), 280 280 and the screen is cleared to the default background color for the output device. 281 281 282 282 @param This Pointer to EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL instance. 283 283 @param ExtendedVerification Indicates that the driver may perform a more exhaustive … … 297 297 /** 298 298 Writes a Unicode string to the output device. 299 299 300 300 This function implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.OutputString(). 301 301 It writes a Unicode string to the output device. This is the most basic output mechanism … … 320 320 /** 321 321 Verifies that all characters in a Unicode string can be output to the target device. 322 322 323 323 This function implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.TestString(). 324 324 It verifies that all characters in a Unicode string can be output to the target device. … … 341 341 /** 342 342 Clears the output device(s) display to the currently selected background color. 343 343 344 344 This function implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.ClearScreen(). 345 345 The ClearScreen() function clears the output device(s) display to the currently … … 347 347 348 348 @param This Pointer to EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL instance. 349 349 350 350 @retval EFI_SUCESS The operation completed successfully. 351 351 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. … … 361 361 /** 362 362 Sets the background and foreground colors for theOutputString() and ClearScreen() functions. 363 363 364 364 This function implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.SetAttribute(). 365 365 It sets the background and foreground colors for the OutputString() and ClearScreen() functions. … … 372 372 Bits 0..3 are the foreground color, 373 373 and bits 4..6 are the background color. 374 374 375 375 @retval EFI_SUCCESS The requested attributes were set. 376 376 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. … … 386 386 /** 387 387 Sets the current coordinates of the cursor position. 388 388 389 389 This function implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.SetCursorPosition(). 390 390 It sets the current coordinates of the cursor position. 391 391 The upper left corner of the screen is defined as coordinate (0, 0). 392 392 393 393 @param This Pointer to EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL instance. 394 394 @param Column Column of position to set the cursor to. 395 395 @param Row Row of position to set the cursor to. 396 396 397 397 @retval EFI_SUCCESS The operation completed successfully. 398 398 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. … … 411 411 /** 412 412 Makes the cursor visible or invisible. 413 413 414 414 This function implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.EnableCursor(). 415 415 It makes the cursor visible or invisible. … … 418 418 @param Visible If TRUE, the cursor is set to be visible. 419 419 If FALSE, the cursor is set to be invisible. 420 420 421 421 @retval EFI_SUCESS The operation completed successfully. 422 422 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request or the … … 444 444 @param Columns Columen in current mode number 445 445 @param Rows Row in current mode number. 446 446 447 447 @retval EFI_SUCCESS The requested mode information was returned. 448 448 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. … … 461 461 /** 462 462 Sets the output device(s) to a specified mode. 463 463 464 464 This function implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.QueryMode(). 465 465 It sets the output device(s) to the requested mode. … … 469 469 @param This Pointer to EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL instance. 470 470 @param ModeNumber The text mode to set. 471 471 472 472 @retval EFI_SUCCESS The requested text mode was set. 473 473 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/Console/VgaClassDxe/VgaClassDxe.inf
r58459 r58466 4 4 # Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 # 6 # This program and the accompanying materials 7 # are licensed and made available under the terms and conditions of the BSD License 8 # which accompanies this distribution. The full text of the license may be found at 9 # http://opensource.org/licenses/bsd-license.php 10 # 11 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 6 # This program and the accompanying materials 7 # are licensed and made available under the terms and conditions of the BSD License 8 # which accompanies this distribution. The full text of the license may be found at 9 # http://opensource.org/licenses/bsd-license.php 10 # 11 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 13 # 14 14 # … … 29 29 # VALID_ARCHITECTURES = IA32 X64 IPF EBC 30 30 # 31 # DRIVER_BINDING = gVgaClassDriverBinding 31 # DRIVER_BINDING = gVgaClassDriverBinding 32 32 # COMPONENT_NAME = gVgaClassComponentName 33 # COMPONENT_NAME2 = gVgaClassComponentName2 33 # COMPONENT_NAME2 = gVgaClassComponentName2 34 34 # 35 35 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/CpuIoDxe/CpuIo.c
r58459 r58466 3 3 4 4 Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 13 13 **/ … … 73 73 Check parameters to a CPU I/O Protocol service request. 74 74 75 The I/O operations are carried out exactly as requested. The caller is responsible 76 for satisfying any alignment and I/O width restrictions that a PI System on a 77 platform might require. For example on some platforms, width requests of 78 EfiCpuIoWidthUint64 do not work. Misaligned buffers, on the other hand, will 75 The I/O operations are carried out exactly as requested. The caller is responsible 76 for satisfying any alignment and I/O width restrictions that a PI System on a 77 platform might require. For example on some platforms, width requests of 78 EfiCpuIoWidthUint64 do not work. Misaligned buffers, on the other hand, will 79 79 be handled by the driver. 80 80 81 81 @param[in] MmioOperation TRUE for an MMIO operation, FALSE for I/O Port operation. 82 82 @param[in] Width Signifies the width of the I/O or Memory operation. 83 @param[in] Address The base address of the I/O operation. 84 @param[in] Count The number of I/O operations to perform. The number of 83 @param[in] Address The base address of the I/O operation. 84 @param[in] Count The number of I/O operations to perform. The number of 85 85 bytes moved is Width size * Count, starting at Address. 86 86 @param[in] Buffer For read operations, the destination buffer to store the results. … … 91 91 @retval EFI_INVALID_PARAMETER Buffer is NULL. 92 92 @retval EFI_UNSUPPORTED The Buffer is not aligned for the given Width. 93 @retval EFI_UNSUPPORTED The address range specified by Address, Width, 93 @retval EFI_UNSUPPORTED The address range specified by Address, Width, 94 94 and Count is not valid for this PI system. 95 95 … … 136 136 return EFI_INVALID_PARAMETER; 137 137 } 138 138 139 139 // 140 140 // Check to see if Address is aligned … … 145 145 146 146 // 147 // Check to see if any address associated with this transfer exceeds the maximum 147 // Check to see if any address associated with this transfer exceeds the maximum 148 148 // allowed address. The maximum address implied by the parameters passed in is 149 149 // Address + Size * Count. If the following condition is met, then the transfer … … 152 152 // Address + Size * Count > (MmioOperation ? MAX_ADDRESS : MAX_IO_PORT_ADDRESS) + 1 153 153 // 154 // Since MAX_ADDRESS can be the maximum integer value supported by the CPU and Count 154 // Since MAX_ADDRESS can be the maximum integer value supported by the CPU and Count 155 155 // can also be the maximum integer value supported by the CPU, this range 156 156 // check must be adjusted to avoid all overflow conditions. 157 // 158 // The following form of the range check is equivalent but assumes that 157 // 158 // The following form of the range check is equivalent but assumes that 159 159 // MAX_ADDRESS and MAX_IO_PORT_ADDRESS are of the form (2^n - 1). 160 160 // … … 164 164 return EFI_UNSUPPORTED; 165 165 } 166 } else { 166 } else { 167 167 MaxCount = RShiftU64 (Limit, Width); 168 168 if (MaxCount < (Count - 1)) { … … 188 188 Reads memory-mapped registers. 189 189 190 The I/O operations are carried out exactly as requested. The caller is responsible 191 for satisfying any alignment and I/O width restrictions that a PI System on a 192 platform might require. For example on some platforms, width requests of 193 EfiCpuIoWidthUint64 do not work. Misaligned buffers, on the other hand, will 190 The I/O operations are carried out exactly as requested. The caller is responsible 191 for satisfying any alignment and I/O width restrictions that a PI System on a 192 platform might require. For example on some platforms, width requests of 193 EfiCpuIoWidthUint64 do not work. Misaligned buffers, on the other hand, will 194 194 be handled by the driver. 195 196 If Width is EfiCpuIoWidthUint8, EfiCpuIoWidthUint16, EfiCpuIoWidthUint32, 197 or EfiCpuIoWidthUint64, then both Address and Buffer are incremented for 195 196 If Width is EfiCpuIoWidthUint8, EfiCpuIoWidthUint16, EfiCpuIoWidthUint32, 197 or EfiCpuIoWidthUint64, then both Address and Buffer are incremented for 198 198 each of the Count operations that is performed. 199 200 If Width is EfiCpuIoWidthFifoUint8, EfiCpuIoWidthFifoUint16, 201 EfiCpuIoWidthFifoUint32, or EfiCpuIoWidthFifoUint64, then only Buffer is 202 incremented for each of the Count operations that is performed. The read or 199 200 If Width is EfiCpuIoWidthFifoUint8, EfiCpuIoWidthFifoUint16, 201 EfiCpuIoWidthFifoUint32, or EfiCpuIoWidthFifoUint64, then only Buffer is 202 incremented for each of the Count operations that is performed. The read or 203 203 write operation is performed Count times on the same Address. 204 205 If Width is EfiCpuIoWidthFillUint8, EfiCpuIoWidthFillUint16, 206 EfiCpuIoWidthFillUint32, or EfiCpuIoWidthFillUint64, then only Address is 207 incremented for each of the Count operations that is performed. The read or 204 205 If Width is EfiCpuIoWidthFillUint8, EfiCpuIoWidthFillUint16, 206 EfiCpuIoWidthFillUint32, or EfiCpuIoWidthFillUint64, then only Address is 207 incremented for each of the Count operations that is performed. The read or 208 208 write operation is performed Count times from the first element of Buffer. 209 209 210 210 @param[in] This A pointer to the EFI_CPU_IO_PROTOCOL instance. 211 211 @param[in] Width Signifies the width of the I/O or Memory operation. 212 @param[in] Address The base address of the I/O operation. 213 @param[in] Count The number of I/O operations to perform. The number of 212 @param[in] Address The base address of the I/O operation. 213 @param[in] Count The number of I/O operations to perform. The number of 214 214 bytes moved is Width size * Count, starting at Address. 215 215 @param[out] Buffer For read operations, the destination buffer to store the results. … … 220 220 @retval EFI_INVALID_PARAMETER Buffer is NULL. 221 221 @retval EFI_UNSUPPORTED The Buffer is not aligned for the given Width. 222 @retval EFI_UNSUPPORTED The address range specified by Address, Width, 222 @retval EFI_UNSUPPORTED The address range specified by Address, Width, 223 223 and Count is not valid for this PI system. 224 224 … … 268 268 Writes memory-mapped registers. 269 269 270 The I/O operations are carried out exactly as requested. The caller is responsible 271 for satisfying any alignment and I/O width restrictions that a PI System on a 272 platform might require. For example on some platforms, width requests of 273 EfiCpuIoWidthUint64 do not work. Misaligned buffers, on the other hand, will 270 The I/O operations are carried out exactly as requested. The caller is responsible 271 for satisfying any alignment and I/O width restrictions that a PI System on a 272 platform might require. For example on some platforms, width requests of 273 EfiCpuIoWidthUint64 do not work. Misaligned buffers, on the other hand, will 274 274 be handled by the driver. 275 276 If Width is EfiCpuIoWidthUint8, EfiCpuIoWidthUint16, EfiCpuIoWidthUint32, 277 or EfiCpuIoWidthUint64, then both Address and Buffer are incremented for 275 276 If Width is EfiCpuIoWidthUint8, EfiCpuIoWidthUint16, EfiCpuIoWidthUint32, 277 or EfiCpuIoWidthUint64, then both Address and Buffer are incremented for 278 278 each of the Count operations that is performed. 279 280 If Width is EfiCpuIoWidthFifoUint8, EfiCpuIoWidthFifoUint16, 281 EfiCpuIoWidthFifoUint32, or EfiCpuIoWidthFifoUint64, then only Buffer is 282 incremented for each of the Count operations that is performed. The read or 279 280 If Width is EfiCpuIoWidthFifoUint8, EfiCpuIoWidthFifoUint16, 281 EfiCpuIoWidthFifoUint32, or EfiCpuIoWidthFifoUint64, then only Buffer is 282 incremented for each of the Count operations that is performed. The read or 283 283 write operation is performed Count times on the same Address. 284 285 If Width is EfiCpuIoWidthFillUint8, EfiCpuIoWidthFillUint16, 286 EfiCpuIoWidthFillUint32, or EfiCpuIoWidthFillUint64, then only Address is 287 incremented for each of the Count operations that is performed. The read or 284 285 If Width is EfiCpuIoWidthFillUint8, EfiCpuIoWidthFillUint16, 286 EfiCpuIoWidthFillUint32, or EfiCpuIoWidthFillUint64, then only Address is 287 incremented for each of the Count operations that is performed. The read or 288 288 write operation is performed Count times from the first element of Buffer. 289 289 290 290 @param[in] This A pointer to the EFI_CPU_IO_PROTOCOL instance. 291 291 @param[in] Width Signifies the width of the I/O or Memory operation. 292 @param[in] Address The base address of the I/O operation. 293 @param[in] Count The number of I/O operations to perform. The number of 292 @param[in] Address The base address of the I/O operation. 293 @param[in] Count The number of I/O operations to perform. The number of 294 294 bytes moved is Width size * Count, starting at Address. 295 295 @param[in] Buffer For read operations, the destination buffer to store the results. … … 300 300 @retval EFI_INVALID_PARAMETER Buffer is NULL. 301 301 @retval EFI_UNSUPPORTED The Buffer is not aligned for the given Width. 302 @retval EFI_UNSUPPORTED The address range specified by Address, Width, 302 @retval EFI_UNSUPPORTED The address range specified by Address, Width, 303 303 and Count is not valid for this PI system. 304 304 … … 348 348 Reads I/O registers. 349 349 350 The I/O operations are carried out exactly as requested. The caller is responsible 351 for satisfying any alignment and I/O width restrictions that a PI System on a 352 platform might require. For example on some platforms, width requests of 353 EfiCpuIoWidthUint64 do not work. Misaligned buffers, on the other hand, will 350 The I/O operations are carried out exactly as requested. The caller is responsible 351 for satisfying any alignment and I/O width restrictions that a PI System on a 352 platform might require. For example on some platforms, width requests of 353 EfiCpuIoWidthUint64 do not work. Misaligned buffers, on the other hand, will 354 354 be handled by the driver. 355 356 If Width is EfiCpuIoWidthUint8, EfiCpuIoWidthUint16, EfiCpuIoWidthUint32, 357 or EfiCpuIoWidthUint64, then both Address and Buffer are incremented for 355 356 If Width is EfiCpuIoWidthUint8, EfiCpuIoWidthUint16, EfiCpuIoWidthUint32, 357 or EfiCpuIoWidthUint64, then both Address and Buffer are incremented for 358 358 each of the Count operations that is performed. 359 360 If Width is EfiCpuIoWidthFifoUint8, EfiCpuIoWidthFifoUint16, 361 EfiCpuIoWidthFifoUint32, or EfiCpuIoWidthFifoUint64, then only Buffer is 362 incremented for each of the Count operations that is performed. The read or 359 360 If Width is EfiCpuIoWidthFifoUint8, EfiCpuIoWidthFifoUint16, 361 EfiCpuIoWidthFifoUint32, or EfiCpuIoWidthFifoUint64, then only Buffer is 362 incremented for each of the Count operations that is performed. The read or 363 363 write operation is performed Count times on the same Address. 364 365 If Width is EfiCpuIoWidthFillUint8, EfiCpuIoWidthFillUint16, 366 EfiCpuIoWidthFillUint32, or EfiCpuIoWidthFillUint64, then only Address is 367 incremented for each of the Count operations that is performed. The read or 364 365 If Width is EfiCpuIoWidthFillUint8, EfiCpuIoWidthFillUint16, 366 EfiCpuIoWidthFillUint32, or EfiCpuIoWidthFillUint64, then only Address is 367 incremented for each of the Count operations that is performed. The read or 368 368 write operation is performed Count times from the first element of Buffer. 369 369 370 370 @param[in] This A pointer to the EFI_CPU_IO_PROTOCOL instance. 371 371 @param[in] Width Signifies the width of the I/O or Memory operation. 372 @param[in] Address The base address of the I/O operation. 373 @param[in] Count The number of I/O operations to perform. The number of 372 @param[in] Address The base address of the I/O operation. 373 @param[in] Count The number of I/O operations to perform. The number of 374 374 bytes moved is Width size * Count, starting at Address. 375 375 @param[out] Buffer For read operations, the destination buffer to store the results. … … 380 380 @retval EFI_INVALID_PARAMETER Buffer is NULL. 381 381 @retval EFI_UNSUPPORTED The Buffer is not aligned for the given Width. 382 @retval EFI_UNSUPPORTED The address range specified by Address, Width, 382 @retval EFI_UNSUPPORTED The address range specified by Address, Width, 383 383 and Count is not valid for this PI system. 384 384 … … 427 427 Write I/O registers. 428 428 429 The I/O operations are carried out exactly as requested. The caller is responsible 430 for satisfying any alignment and I/O width restrictions that a PI System on a 431 platform might require. For example on some platforms, width requests of 432 EfiCpuIoWidthUint64 do not work. Misaligned buffers, on the other hand, will 429 The I/O operations are carried out exactly as requested. The caller is responsible 430 for satisfying any alignment and I/O width restrictions that a PI System on a 431 platform might require. For example on some platforms, width requests of 432 EfiCpuIoWidthUint64 do not work. Misaligned buffers, on the other hand, will 433 433 be handled by the driver. 434 435 If Width is EfiCpuIoWidthUint8, EfiCpuIoWidthUint16, EfiCpuIoWidthUint32, 436 or EfiCpuIoWidthUint64, then both Address and Buffer are incremented for 434 435 If Width is EfiCpuIoWidthUint8, EfiCpuIoWidthUint16, EfiCpuIoWidthUint32, 436 or EfiCpuIoWidthUint64, then both Address and Buffer are incremented for 437 437 each of the Count operations that is performed. 438 439 If Width is EfiCpuIoWidthFifoUint8, EfiCpuIoWidthFifoUint16, 440 EfiCpuIoWidthFifoUint32, or EfiCpuIoWidthFifoUint64, then only Buffer is 441 incremented for each of the Count operations that is performed. The read or 438 439 If Width is EfiCpuIoWidthFifoUint8, EfiCpuIoWidthFifoUint16, 440 EfiCpuIoWidthFifoUint32, or EfiCpuIoWidthFifoUint64, then only Buffer is 441 incremented for each of the Count operations that is performed. The read or 442 442 write operation is performed Count times on the same Address. 443 444 If Width is EfiCpuIoWidthFillUint8, EfiCpuIoWidthFillUint16, 445 EfiCpuIoWidthFillUint32, or EfiCpuIoWidthFillUint64, then only Address is 446 incremented for each of the Count operations that is performed. The read or 443 444 If Width is EfiCpuIoWidthFillUint8, EfiCpuIoWidthFillUint16, 445 EfiCpuIoWidthFillUint32, or EfiCpuIoWidthFillUint64, then only Address is 446 incremented for each of the Count operations that is performed. The read or 447 447 write operation is performed Count times from the first element of Buffer. 448 448 449 449 @param[in] This A pointer to the EFI_CPU_IO_PROTOCOL instance. 450 450 @param[in] Width Signifies the width of the I/O or Memory operation. 451 @param[in] Address The base address of the I/O operation. 452 @param[in] Count The number of I/O operations to perform. The number of 451 @param[in] Address The base address of the I/O operation. 452 @param[in] Count The number of I/O operations to perform. The number of 453 453 bytes moved is Width size * Count, starting at Address. 454 454 @param[in] Buffer For read operations, the destination buffer to store the results. … … 459 459 @retval EFI_INVALID_PARAMETER Buffer is NULL. 460 460 @retval EFI_UNSUPPORTED The Buffer is not aligned for the given Width. 461 @retval EFI_UNSUPPORTED The address range specified by Address, Width, 461 @retval EFI_UNSUPPORTED The address range specified by Address, Width, 462 462 and Count is not valid for this PI system. 463 463 464 464 **/ 465 465 EFI_STATUS … … 502 502 } 503 503 } 504 504 505 505 return EFI_SUCCESS; 506 506 } … … 509 509 The user Entry Point for module CpuIo. The user code starts with this function. 510 510 511 @param[in] ImageHandle The firmware allocated handle for the EFI image. 511 @param[in] ImageHandle The firmware allocated handle for the EFI image. 512 512 @param[in] SystemTable A pointer to the EFI System Table. 513 513 514 514 @retval EFI_SUCCESS The entry point is executed successfully. 515 515 @retval other Some error occurs when executing this entry point. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/CpuIoDxe/CpuIo.h
r48674 r58466 31 31 Reads memory-mapped registers. 32 32 33 The I/O operations are carried out exactly as requested. The caller is responsible 34 for satisfying any alignment and I/O width restrictions that a PI System on a 35 platform might require. For example on some platforms, width requests of 36 EfiCpuIoWidthUint64 do not work. Misaligned buffers, on the other hand, will 37 be handled by the driver. 38 39 If Width is EfiCpuIoWidthUint8, EfiCpuIoWidthUint16, EfiCpuIoWidthUint32, 40 or EfiCpuIoWidthUint64, then both Address and Buffer are incremented for 41 each of the Count operations that is performed. 42 43 If Width is EfiCpuIoWidthFifoUint8, EfiCpuIoWidthFifoUint16, 44 EfiCpuIoWidthFifoUint32, or EfiCpuIoWidthFifoUint64, then only Buffer is 45 incremented for each of the Count operations that is performed. The read or 46 write operation is performed Count times on the same Address. 47 48 If Width is EfiCpuIoWidthFillUint8, EfiCpuIoWidthFillUint16, 49 EfiCpuIoWidthFillUint32, or EfiCpuIoWidthFillUint64, then only Address is 50 incremented for each of the Count operations that is performed. The read or 51 write operation is performed Count times from the first element of Buffer. 52 53 @param[in] This A pointer to the EFI_CPU_IO_PROTOCOL instance. 54 @param[in] Width Signifies the width of the I/O or Memory operation. 55 @param[in] Address The base address of the I/O operation. 56 @param[in] Count The number of I/O operations to perform. The number of 33 The I/O operations are carried out exactly as requested. The caller is responsible 34 for satisfying any alignment and I/O width restrictions that a PI System on a 35 platform might require. For example on some platforms, width requests of 36 EfiCpuIoWidthUint64 do not work. Misaligned buffers, on the other hand, will 37 be handled by the driver. 38 39 If Width is EfiCpuIoWidthUint8, EfiCpuIoWidthUint16, EfiCpuIoWidthUint32, 40 or EfiCpuIoWidthUint64, then both Address and Buffer are incremented for 41 each of the Count operations that is performed. 42 43 If Width is EfiCpuIoWidthFifoUint8, EfiCpuIoWidthFifoUint16, 44 EfiCpuIoWidthFifoUint32, or EfiCpuIoWidthFifoUint64, then only Buffer is 45 incremented for each of the Count operations that is performed. The read or 46 write operation is performed Count times on the same Address. 47 48 If Width is EfiCpuIoWidthFillUint8, EfiCpuIoWidthFillUint16, 49 EfiCpuIoWidthFillUint32, or EfiCpuIoWidthFillUint64, then only Address is 50 incremented for each of the Count operations that is performed. The read or 51 write operation is performed Count times from the first element of Buffer. 52 53 @param[in] This A pointer to the EFI_CPU_IO_PROTOCOL instance. 54 @param[in] Width Signifies the width of the I/O or Memory operation. 55 @param[in] Address The base address of the I/O operation. 56 @param[in] Count The number of I/O operations to perform. The number of 57 57 bytes moved is Width size * Count, starting at Address. 58 58 @param[out] Buffer For read operations, the destination buffer to store the results. … … 63 63 @retval EFI_INVALID_PARAMETER Buffer is NULL. 64 64 @retval EFI_UNSUPPORTED The Buffer is not aligned for the given Width. 65 @retval EFI_UNSUPPORTED The address range specified by Address, Width, 65 @retval EFI_UNSUPPORTED The address range specified by Address, Width, 66 66 and Count is not valid for this PI system. 67 67 … … 80 80 Writes memory-mapped registers. 81 81 82 The I/O operations are carried out exactly as requested. The caller is responsible 83 for satisfying any alignment and I/O width restrictions that a PI System on a 84 platform might require. For example on some platforms, width requests of 85 EfiCpuIoWidthUint64 do not work. Misaligned buffers, on the other hand, will 86 be handled by the driver. 87 88 If Width is EfiCpuIoWidthUint8, EfiCpuIoWidthUint16, EfiCpuIoWidthUint32, 89 or EfiCpuIoWidthUint64, then both Address and Buffer are incremented for 90 each of the Count operations that is performed. 91 92 If Width is EfiCpuIoWidthFifoUint8, EfiCpuIoWidthFifoUint16, 93 EfiCpuIoWidthFifoUint32, or EfiCpuIoWidthFifoUint64, then only Buffer is 94 incremented for each of the Count operations that is performed. The read or 95 write operation is performed Count times on the same Address. 96 97 If Width is EfiCpuIoWidthFillUint8, EfiCpuIoWidthFillUint16, 98 EfiCpuIoWidthFillUint32, or EfiCpuIoWidthFillUint64, then only Address is 99 incremented for each of the Count operations that is performed. The read or 100 write operation is performed Count times from the first element of Buffer. 101 102 @param[in] This A pointer to the EFI_CPU_IO_PROTOCOL instance. 103 @param[in] Width Signifies the width of the I/O or Memory operation. 104 @param[in] Address The base address of the I/O operation. 105 @param[in] Count The number of I/O operations to perform. The number of 82 The I/O operations are carried out exactly as requested. The caller is responsible 83 for satisfying any alignment and I/O width restrictions that a PI System on a 84 platform might require. For example on some platforms, width requests of 85 EfiCpuIoWidthUint64 do not work. Misaligned buffers, on the other hand, will 86 be handled by the driver. 87 88 If Width is EfiCpuIoWidthUint8, EfiCpuIoWidthUint16, EfiCpuIoWidthUint32, 89 or EfiCpuIoWidthUint64, then both Address and Buffer are incremented for 90 each of the Count operations that is performed. 91 92 If Width is EfiCpuIoWidthFifoUint8, EfiCpuIoWidthFifoUint16, 93 EfiCpuIoWidthFifoUint32, or EfiCpuIoWidthFifoUint64, then only Buffer is 94 incremented for each of the Count operations that is performed. The read or 95 write operation is performed Count times on the same Address. 96 97 If Width is EfiCpuIoWidthFillUint8, EfiCpuIoWidthFillUint16, 98 EfiCpuIoWidthFillUint32, or EfiCpuIoWidthFillUint64, then only Address is 99 incremented for each of the Count operations that is performed. The read or 100 write operation is performed Count times from the first element of Buffer. 101 102 @param[in] This A pointer to the EFI_CPU_IO_PROTOCOL instance. 103 @param[in] Width Signifies the width of the I/O or Memory operation. 104 @param[in] Address The base address of the I/O operation. 105 @param[in] Count The number of I/O operations to perform. The number of 106 106 bytes moved is Width size * Count, starting at Address. 107 107 @param[in] Buffer For read operations, the destination buffer to store the results. … … 112 112 @retval EFI_INVALID_PARAMETER Buffer is NULL. 113 113 @retval EFI_UNSUPPORTED The Buffer is not aligned for the given Width. 114 @retval EFI_UNSUPPORTED The address range specified by Address, Width, 114 @retval EFI_UNSUPPORTED The address range specified by Address, Width, 115 115 and Count is not valid for this PI system. 116 116 … … 129 129 Reads I/O registers. 130 130 131 The I/O operations are carried out exactly as requested. The caller is responsible 132 for satisfying any alignment and I/O width restrictions that a PI System on a 133 platform might require. For example on some platforms, width requests of 134 EfiCpuIoWidthUint64 do not work. Misaligned buffers, on the other hand, will 135 be handled by the driver. 136 137 If Width is EfiCpuIoWidthUint8, EfiCpuIoWidthUint16, EfiCpuIoWidthUint32, 138 or EfiCpuIoWidthUint64, then both Address and Buffer are incremented for 139 each of the Count operations that is performed. 140 141 If Width is EfiCpuIoWidthFifoUint8, EfiCpuIoWidthFifoUint16, 142 EfiCpuIoWidthFifoUint32, or EfiCpuIoWidthFifoUint64, then only Buffer is 143 incremented for each of the Count operations that is performed. The read or 144 write operation is performed Count times on the same Address. 145 146 If Width is EfiCpuIoWidthFillUint8, EfiCpuIoWidthFillUint16, 147 EfiCpuIoWidthFillUint32, or EfiCpuIoWidthFillUint64, then only Address is 148 incremented for each of the Count operations that is performed. The read or 149 write operation is performed Count times from the first element of Buffer. 150 151 @param[in] This A pointer to the EFI_CPU_IO_PROTOCOL instance. 152 @param[in] Width Signifies the width of the I/O or Memory operation. 153 @param[in] Address The base address of the I/O operation. 154 @param[in] Count The number of I/O operations to perform. The number of 131 The I/O operations are carried out exactly as requested. The caller is responsible 132 for satisfying any alignment and I/O width restrictions that a PI System on a 133 platform might require. For example on some platforms, width requests of 134 EfiCpuIoWidthUint64 do not work. Misaligned buffers, on the other hand, will 135 be handled by the driver. 136 137 If Width is EfiCpuIoWidthUint8, EfiCpuIoWidthUint16, EfiCpuIoWidthUint32, 138 or EfiCpuIoWidthUint64, then both Address and Buffer are incremented for 139 each of the Count operations that is performed. 140 141 If Width is EfiCpuIoWidthFifoUint8, EfiCpuIoWidthFifoUint16, 142 EfiCpuIoWidthFifoUint32, or EfiCpuIoWidthFifoUint64, then only Buffer is 143 incremented for each of the Count operations that is performed. The read or 144 write operation is performed Count times on the same Address. 145 146 If Width is EfiCpuIoWidthFillUint8, EfiCpuIoWidthFillUint16, 147 EfiCpuIoWidthFillUint32, or EfiCpuIoWidthFillUint64, then only Address is 148 incremented for each of the Count operations that is performed. The read or 149 write operation is performed Count times from the first element of Buffer. 150 151 @param[in] This A pointer to the EFI_CPU_IO_PROTOCOL instance. 152 @param[in] Width Signifies the width of the I/O or Memory operation. 153 @param[in] Address The base address of the I/O operation. 154 @param[in] Count The number of I/O operations to perform. The number of 155 155 bytes moved is Width size * Count, starting at Address. 156 156 @param[out] Buffer For read operations, the destination buffer to store the results. … … 161 161 @retval EFI_INVALID_PARAMETER Buffer is NULL. 162 162 @retval EFI_UNSUPPORTED The Buffer is not aligned for the given Width. 163 @retval EFI_UNSUPPORTED The address range specified by Address, Width, 163 @retval EFI_UNSUPPORTED The address range specified by Address, Width, 164 164 and Count is not valid for this PI system. 165 165 … … 178 178 Write I/O registers. 179 179 180 The I/O operations are carried out exactly as requested. The caller is responsible 181 for satisfying any alignment and I/O width restrictions that a PI System on a 182 platform might require. For example on some platforms, width requests of 183 EfiCpuIoWidthUint64 do not work. Misaligned buffers, on the other hand, will 184 be handled by the driver. 185 186 If Width is EfiCpuIoWidthUint8, EfiCpuIoWidthUint16, EfiCpuIoWidthUint32, 187 or EfiCpuIoWidthUint64, then both Address and Buffer are incremented for 188 each of the Count operations that is performed. 189 190 If Width is EfiCpuIoWidthFifoUint8, EfiCpuIoWidthFifoUint16, 191 EfiCpuIoWidthFifoUint32, or EfiCpuIoWidthFifoUint64, then only Buffer is 192 incremented for each of the Count operations that is performed. The read or 193 write operation is performed Count times on the same Address. 194 195 If Width is EfiCpuIoWidthFillUint8, EfiCpuIoWidthFillUint16, 196 EfiCpuIoWidthFillUint32, or EfiCpuIoWidthFillUint64, then only Address is 197 incremented for each of the Count operations that is performed. The read or 198 write operation is performed Count times from the first element of Buffer. 199 200 @param[in] This A pointer to the EFI_CPU_IO_PROTOCOL instance. 201 @param[in] Width Signifies the width of the I/O or Memory operation. 202 @param[in] Address The base address of the I/O operation. 203 @param[in] Count The number of I/O operations to perform. The number of 180 The I/O operations are carried out exactly as requested. The caller is responsible 181 for satisfying any alignment and I/O width restrictions that a PI System on a 182 platform might require. For example on some platforms, width requests of 183 EfiCpuIoWidthUint64 do not work. Misaligned buffers, on the other hand, will 184 be handled by the driver. 185 186 If Width is EfiCpuIoWidthUint8, EfiCpuIoWidthUint16, EfiCpuIoWidthUint32, 187 or EfiCpuIoWidthUint64, then both Address and Buffer are incremented for 188 each of the Count operations that is performed. 189 190 If Width is EfiCpuIoWidthFifoUint8, EfiCpuIoWidthFifoUint16, 191 EfiCpuIoWidthFifoUint32, or EfiCpuIoWidthFifoUint64, then only Buffer is 192 incremented for each of the Count operations that is performed. The read or 193 write operation is performed Count times on the same Address. 194 195 If Width is EfiCpuIoWidthFillUint8, EfiCpuIoWidthFillUint16, 196 EfiCpuIoWidthFillUint32, or EfiCpuIoWidthFillUint64, then only Address is 197 incremented for each of the Count operations that is performed. The read or 198 write operation is performed Count times from the first element of Buffer. 199 200 @param[in] This A pointer to the EFI_CPU_IO_PROTOCOL instance. 201 @param[in] Width Signifies the width of the I/O or Memory operation. 202 @param[in] Address The base address of the I/O operation. 203 @param[in] Count The number of I/O operations to perform. The number of 204 204 bytes moved is Width size * Count, starting at Address. 205 205 @param[in] Buffer For read operations, the destination buffer to store the results. … … 210 210 @retval EFI_INVALID_PARAMETER Buffer is NULL. 211 211 @retval EFI_UNSUPPORTED The Buffer is not aligned for the given Width. 212 @retval EFI_UNSUPPORTED The address range specified by Address, Width, 213 and Count is not valid for this PI system. 214 212 @retval EFI_UNSUPPORTED The address range specified by Address, Width, 213 and Count is not valid for this PI system. 214 215 215 **/ 216 216 EFI_STATUS -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.c
r48674 r58466 2 2 This code produces the Data Hub protocol. It preloads the data hub 3 3 with status information copied in from PEI HOBs. 4 4 5 5 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 6 This program and the accompanying materials 7 are licensed and made available under the terms and conditions of the BSD License 8 which accompanies this distribution. The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 6 This program and the accompanying materials 7 are licensed and made available under the terms and conditions of the BSD License 8 which accompanies this distribution. The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 13 14 14 **/ … … 35 35 36 36 @retval EFI_SUCCESS If data was logged 37 @retval EFI_OUT_OF_RESOURCES If data was not logged due to lack of system 37 @retval EFI_OUT_OF_RESOURCES If data was not logged due to lack of system 38 38 resources. 39 39 **/ … … 71 71 RecordSize = sizeof (EFI_DATA_RECORD_HEADER) + RawDataSize; 72 72 TotalSize = sizeof (EFI_DATA_ENTRY) + RecordSize; 73 73 74 74 // 75 75 // First try to get log time at TPL level <= TPL_CALLBACK. … … 142 142 FilterEntry = FILTER_ENTRY_FROM_LINK (Link); 143 143 if (((FilterEntry->ClassFilter & DataRecordClass) != 0) && 144 (CompareGuid (&FilterEntry->FilterDataRecordGuid, &gZeroGuid) || 144 (CompareGuid (&FilterEntry->FilterDataRecordGuid, &gZeroGuid) || 145 145 CompareGuid (&FilterEntry->FilterDataRecordGuid, DataRecordGuid))) { 146 146 gBS->SignalEvent (FilterEntry->Event); … … 152 152 153 153 /** 154 Search the Head doubly linked list for the passed in MTC. Return the 154 Search the Head doubly linked list for the passed in MTC. Return the 155 155 matching element in Head and the MTC on the next entry. 156 156 … … 160 160 @param PtrCurrentMTC On IN contians MTC to search for. On OUT contians next 161 161 MTC in the data log list or zero if at end of the list. 162 162 163 163 @retval EFI_DATA_LOG_ENTRY Return pointer to data log data from Head list. 164 164 @retval NULL If no data record exists. … … 258 258 259 259 Get a previously logged data record and the MonotonicCount for the next 260 availible Record. This allows all records or all records later 260 availible Record. This allows all records or all records later 261 261 than a give MonotonicCount to be returned. If an optional FilterDriverEvent 262 is passed in with a MonotonicCout of zero return the first record 263 not yet read by the filter driver. If FilterDriverEvent is NULL and 262 is passed in with a MonotonicCout of zero return the first record 263 not yet read by the filter driver. If FilterDriverEvent is NULL and 264 264 MonotonicCount is zero return the first data record. 265 265 … … 268 268 return the first record. On output, contains the next 269 269 record to availible. Zero indicates no more records. 270 @param FilterDriverEvent If FilterDriverEvent is not passed in a MonotonicCount 271 of zero, it means to return the first data record. 272 If FilterDriverEvent is passed in, then a MonotonicCount 273 of zero means to return the first data not yet read by 270 @param FilterDriverEvent If FilterDriverEvent is not passed in a MonotonicCount 271 of zero, it means to return the first data record. 272 If FilterDriverEvent is passed in, then a MonotonicCount 273 of zero means to return the first data not yet read by 274 274 FilterDriverEvent. 275 @param Record Returns a dynamically allocated memory buffer with a data 275 @param Record Returns a dynamically allocated memory buffer with a data 276 276 record that matches MonotonicCount. 277 277 … … 315 315 return EFI_SUCCESS; 316 316 } 317 317 318 318 // 319 319 // For events the beginning is the last unread record. This info is … … 335 335 // 336 336 // Retrieve the next record or the first record. 337 // 338 if (*MonotonicCount != 0 || FilterDriver->GetNextMonotonicCount == 0) { 337 // 338 if (*MonotonicCount != 0 || FilterDriver->GetNextMonotonicCount == 0) { 339 339 *Record = GetNextDataRecord (&Private->DataListHead, ClassFilter, MonotonicCount); 340 340 if (*Record == NULL) { 341 341 return EFI_NOT_FOUND; 342 342 } 343 343 344 344 if (*MonotonicCount != 0) { 345 345 // 346 // If this was not the last record then update the count associated with the filter 346 // If this was not the last record then update the count associated with the filter 347 347 // 348 348 FilterDriver->GetNextMonotonicCount = *MonotonicCount; … … 355 355 return EFI_SUCCESS; 356 356 } 357 358 // 359 // This is a request to read the first record that has not been read yet. 357 358 // 359 // This is a request to read the first record that has not been read yet. 360 360 // Set MonotoicCount to the last record successfuly read 361 361 // 362 362 *MonotonicCount = FilterDriver->GetNextMonotonicCount; 363 363 364 364 // 365 365 // Retrieve the last record successfuly read again, but do not return it since … … 370 370 return EFI_NOT_FOUND; 371 371 } 372 372 373 373 if (*MonotonicCount != 0) { 374 374 // 375 // Update the count associated with the filter 375 // Update the count associated with the filter 376 376 // 377 377 FilterDriver->GetNextMonotonicCount = *MonotonicCount; 378 378 379 379 // 380 // Retrieve the record after the last record successfuly read 381 // 380 // Retrieve the record after the last record successfuly read 381 // 382 382 *Record = GetNextDataRecord (&Private->DataListHead, ClassFilter, MonotonicCount); 383 383 if (*Record == NULL) { … … 385 385 } 386 386 } 387 387 388 388 return EFI_SUCCESS; 389 389 } 390 390 391 391 /** 392 This function registers the data hub filter driver that is represented 392 This function registers the data hub filter driver that is represented 393 393 by FilterEvent. Only one instance of each FilterEvent can be registered. 394 After the FilterEvent is registered, it will be signaled so it can sync 395 with data records that have been recorded prior to the FilterEvent being 394 After the FilterEvent is registered, it will be signaled so it can sync 395 with data records that have been recorded prior to the FilterEvent being 396 396 registered. 397 397 398 398 @param This Pointer to The EFI_DATA_HUB_PROTOCOL instance. 399 @param FilterEvent The EFI_EVENT to signal whenever data that matches 399 @param FilterEvent The EFI_EVENT to signal whenever data that matches 400 400 FilterClass is logged in the system. 401 @param FilterTpl The maximum EFI_TPL at which FilterEvent can be 402 signaled. It is strongly recommended that you use the 401 @param FilterTpl The maximum EFI_TPL at which FilterEvent can be 402 signaled. It is strongly recommended that you use the 403 403 lowest EFI_TPL possible. 404 @param FilterClass FilterEvent will be signaled whenever a bit in 405 EFI_DATA_RECORD_HEADER.DataRecordClass is also set in 406 FilterClass. If FilterClass is zero, no class-based 404 @param FilterClass FilterEvent will be signaled whenever a bit in 405 EFI_DATA_RECORD_HEADER.DataRecordClass is also set in 406 FilterClass. If FilterClass is zero, no class-based 407 407 filtering will be performed. 408 @param FilterDataRecordGuid FilterEvent will be signaled whenever FilterDataRecordGuid 409 matches EFI_DATA_RECORD_HEADER.DataRecordGuid. If 410 FilterDataRecordGuid is NULL, then no GUID-based filtering 411 will be performed. 408 @param FilterDataRecordGuid FilterEvent will be signaled whenever FilterDataRecordGuid 409 matches EFI_DATA_RECORD_HEADER.DataRecordGuid. If 410 FilterDataRecordGuid is NULL, then no GUID-based filtering 411 will be performed. 412 412 413 413 @retval EFI_SUCCESS The filter driver event was registered. 414 @retval EFI_ALREADY_STARTED FilterEvent was previously registered and cannot be 414 @retval EFI_ALREADY_STARTED FilterEvent was previously registered and cannot be 415 415 registered again. 416 @retval EFI_OUT_OF_RESOURCES The filter driver event was not registered due to lack of 416 @retval EFI_OUT_OF_RESOURCES The filter driver event was not registered due to lack of 417 417 system resources. 418 418 … … 483 483 484 484 /** 485 Remove a Filter Driver, so it no longer gets called when data 485 Remove a Filter Driver, so it no longer gets called when data 486 486 information is logged. 487 487 488 488 @param This Protocol instance structure 489 489 490 @param FilterEvent Event that represents a filter driver that is to be 490 @param FilterEvent Event that represents a filter driver that is to be 491 491 Unregistered. 492 492 … … 529 529 530 530 /** 531 Driver's Entry point routine that install Driver to produce Data Hub protocol. 531 Driver's Entry point routine that install Driver to produce Data Hub protocol. 532 532 533 533 @param ImageHandle Module's image handle -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.h
r48674 r58466 1 1 /** @file 2 This code supports a the private implementation 2 This code supports a the private implementation 3 3 of the Data Hub protocol 4 4 5 5 Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> 6 This program and the accompanying materials 7 are licensed and made available under the terms and conditions of the BSD License 8 which accompanies this distribution. The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 6 This program and the accompanying materials 7 are licensed and made available under the terms and conditions of the BSD License 8 which accompanies this distribution. The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 13 14 14 **/ -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf
r58459 r58466 21 21 # drivers to be aware of all reporting formats. 22 22 # For more information, please ref http://www.intel.com/technology/framework/ 23 # 23 # 24 24 # Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 25 25 # -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/DataHubStdErrDxe/DataHubStdErr.c
r48674 r58466 66 66 return ; 67 67 } 68 68 69 69 // 70 70 // Mtc of zero means return the next record that has not been read by the -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/FirmwareVolume/FwVolDxe/FwPadFile.c
r48674 r58466 220 220 /** 221 221 Fill pad file header within firmware cache. 222 222 223 223 @param PadFileHeader The start of the Pad File Buffer. 224 224 @param PadFileLength The length of the pad file including the header. … … 265 265 /** 266 266 Create entire FFS file. 267 267 268 268 @param FileHeader Starting Address of a Buffer that hold the FFS File image. 269 269 @param FfsFileBuffer The source buffer that contains the File Data. … … 663 663 @param PadSize The array of leading pad file size for each FFS File 664 664 @param FfsBuffer The array of Ffs Buffer pointer. 665 @param FileData The array of EFI_FV_WRITE_FILE_DATA structure, 665 @param FileData The array of EFI_FV_WRITE_FILE_DATA structure, 666 666 used to get name, attributes, type, etc. 667 667 … … 869 869 @param PadSize The array of leading pad file size for each FFS File 870 870 @param FfsBuffer The array of Ffs Buffer pointer. 871 @param FileData The array of EFI_FV_WRITE_FILE_DATA structure, 871 @param FileData The array of EFI_FV_WRITE_FILE_DATA structure, 872 872 used to get name, attributes, type, etc. 873 873 … … 994 994 @param FvDevice Firmware Volume Device. 995 995 @param NumOfFiles Total File number to be written. 996 @param FileData The array of EFI_FV_WRITE_FILE_DATA structure, 996 @param FileData The array of EFI_FV_WRITE_FILE_DATA structure, 997 997 used to get name, attributes, type, etc 998 998 @param FileOperation The array of operation for each file. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/FirmwareVolume/FwVolDxe/FwVol.c
r58459 r58466 207 207 if (FvDevice->Fv.ParentHandle != NULL) { 208 208 // 209 // By Parent Handle, find out the FV image file and section(in another firmware volume) where the firmware volume came from 209 // By Parent Handle, find out the FV image file and section(in another firmware volume) where the firmware volume came from 210 210 // 211 211 Status = gBS->HandleProtocol (FvDevice->Fv.ParentHandle, &gEfiFirmwareVolume2ProtocolGuid, (VOID **) &ParentFvProtocol); … … 748 748 FreePool (FvDevice); 749 749 } 750 750 751 751 DEBUG ((EFI_D_INFO, "Reinstall FV protocol as writable - %r\n", Status)); 752 752 ASSERT_EFI_ERROR (Status); … … 766 766 FreePool (FvDevice); 767 767 } 768 768 769 769 DEBUG ((EFI_D_INFO, "Install FV protocol as writable - %r\n", Status)); 770 770 ASSERT_EFI_ERROR (Status); … … 781 781 return EFI_SUCCESS; 782 782 } 783 783 784 784 // 785 785 // No FV protocol install/reinstall successfully. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/FirmwareVolume/FwVolDxe/FwVolAttrib.c
r48674 r58466 66 66 modified and the firmware volume 67 67 settings are not changed. 68 68 69 69 @retval EFI_SUCCESS The requested firmware volume attributes 70 70 were set and the resulting -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/FirmwareVolume/FwVolDxe/FwVolDriver.h
r58459 r58466 129 129 modified and the firmware volume 130 130 settings are not changed. 131 131 132 132 @retval EFI_SUCCESS The requested firmware volume attributes 133 133 were set and the resulting … … 596 596 @param FvDevice Firmware Volume Device. 597 597 @param NumOfFiles Total File number to be written. 598 @param FileData The array of EFI_FV_WRITE_FILE_DATA structure, 598 @param FileData The array of EFI_FV_WRITE_FILE_DATA structure, 599 599 used to get name, attributes, type, etc 600 600 @param FileOperation The array of operation for each file. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/FirmwareVolume/FwVolDxe/FwVolWrite.c
r48674 r58466 676 676 UINTN WriteLength; 677 677 UINT8 *TmpBuffer; 678 678 679 679 LOffset = 0; 680 680 RemainingLength = CalculateRemainingLength (FvDevice, Offset, &Lba, &LOffset); … … 1429 1429 if (FileData[Index1].Type == EFI_FV_FILETYPE_FFS_PAD) { 1430 1430 // 1431 // According to PI spec, on EFI_FV_FILETYPE_FFS_PAD: 1432 // "Standard firmware file system services will not return the handle of any pad files, 1431 // According to PI spec, on EFI_FV_FILETYPE_FFS_PAD: 1432 // "Standard firmware file system services will not return the handle of any pad files, 1433 1433 // nor will they permit explicit creation of such files." 1434 1434 // -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/FirmwareVolume/UpdateDriverDxe/ParseUpdateProfile.c
r48674 r58466 623 623 624 624 /** 625 Convert the input value to a ascii string, 625 Convert the input value to a ascii string, 626 626 and concatenates this string to the input string. 627 627 … … 788 788 /** 789 789 Pre process config data buffer into Section entry list and Comment entry list. 790 790 791 791 @param DataBuffer Config raw file buffer. 792 792 @param BufferSize Size of raw buffer. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/FirmwareVolume/UpdateDriverDxe/UpdateDispatcher.c
r58459 r58466 23 23 /** 24 24 Update the whole FV, or certain files in the FV. 25 25 26 26 @param ConfigData Pointer to the config data on updating file. 27 27 @param ImageBuffer Image buffer to be updated. … … 90 90 Status = FvbProtocol->GetAttributes (FvbProtocol, &Attributes); 91 91 if (EFI_ERROR (Status) || ((Attributes & EFI_FVB2_WRITE_STATUS) == 0)) { 92 continue; 92 continue; 93 93 } 94 94 … … 198 198 FreePool (TmpStr); 199 199 } 200 200 201 201 // 202 202 // Locate all Fvb protocol … … 243 243 Status = FvbProtocol->GetAttributes (FvbProtocol, &Attributes); 244 244 if (EFI_ERROR (Status) || ((Attributes & EFI_FVB2_WRITE_STATUS) == 0)) { 245 continue; 245 continue; 246 246 } 247 247 … … 327 327 return Status; 328 328 } 329 329 330 330 // 331 331 // Check if we are done with the update … … 541 541 // 542 542 // FvAlignment must be greater than or equal to 8 bytes of the minimum FFS alignment value. 543 // 543 // 544 544 if (FvAlignment < 8) { 545 545 FvAlignment = 8; … … 584 584 Find the image in the same FV and program it in a target Firmware Volume device. 585 585 After update image, it will reset system and no return. 586 586 587 587 @param ImageHandle A handle for the image that is initializing this driver 588 588 @param SystemTable A pointer to the EFI system table … … 603 603 EFI_FIRMWARE_VOLUME2_PROTOCOL *FwVolProtocol; 604 604 EFI_FIRMWARE_VOLUME2_PROTOCOL *DataFwVolProtocol; 605 MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FwVolFilePathNode; 605 MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FwVolFilePathNode; 606 606 MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *AlignedDevPathNode; 607 607 EFI_DEVICE_PATH_PROTOCOL *FilePathNode; … … 816 816 ); 817 817 // 818 // Shall updates be serialized so that if an update is not successfully completed, 818 // Shall updates be serialized so that if an update is not successfully completed, 819 819 // the remaining updates won't be performed. 820 820 // -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/FirmwareVolume/UpdateDriverDxe/UpdateDriverDxe.inf
r58459 r58466 2 2 # Update Driver for Capulse update. 3 3 # 4 # This driver is intended to be put in a capsule (FV). If all goes well, 5 # then it should be dispatched from the capsule FV, then find the image 4 # This driver is intended to be put in a capsule (FV). If all goes well, 5 # then it should be dispatched from the capsule FV, then find the image 6 6 # in the same FV and program it in a target Firmware Volume device. 7 7 # -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/FirmwareVolume/UpdateDriverDxe/UpdateStrings.uni
-
Property svn:mime-type
changed from
application/octet-stream
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
-
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/LegacyRegionDxe/LegacyRegion.c
r48674 r58466 2 2 Produces the Legacy Region Protocol. 3 3 4 This generic implementation of the Legacy Region Protocol does not actually 5 perform any lock/unlock operations. This module may be used on platforms 6 that do not provide HW locking of the legacy memory regions. It can also 4 This generic implementation of the Legacy Region Protocol does not actually 5 perform any lock/unlock operations. This module may be used on platforms 6 that do not provide HW locking of the legacy memory regions. It can also 7 7 be used as a template driver for implementing the Legacy Region Protocol on 8 8 a platform that does support HW locking of the legacy memory regions. … … 136 136 The user Entry Point for module LegacyRegionDxe. The user code starts with this function. 137 137 138 @param[in] ImageHandle The firmware allocated handle for the EFI image. 138 @param[in] ImageHandle The firmware allocated handle for the EFI image. 139 139 @param[in] SystemTable A pointer to the EFI System Table. 140 140 141 141 @retval EFI_SUCCESS The entry point is executed successfully. 142 142 @retval other Some error occurs when executing this entry point. … … 151 151 { 152 152 EFI_STATUS Status; 153 153 154 154 // 155 155 // Make sure the Legacy Region Protocol is not already installed in the system 156 156 // 157 157 ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiLegacyRegionProtocolGuid); 158 158 159 159 // 160 160 // Install the protocol on a new handle. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/LegacyRegionDxe/LegacyRegionDxe.inf
r58459 r58466 2 2 # Produces Framework Legacy Region Protocol. 3 3 # 4 # This generic implementation of the Legacy Region Protocol does not actually 5 # perform any lock/unlock operations. This module may be used on platforms 6 # that do not provide HW locking of the legacy memory regions. It can also 4 # This generic implementation of the Legacy Region Protocol does not actually 5 # perform any lock/unlock operations. This module may be used on platforms 6 # that do not provide HW locking of the legacy memory regions. It can also 7 7 # be used as a template driver for implementing the Legacy Region Protocol on 8 8 # a platform that does support HW locking of the legacy memory regions. … … 13 13 # which accompanies this distribution. The full text of the license may be found at 14 14 # http://opensource.org/licenses/bsd-license.php 15 # 15 # 16 16 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 17 17 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/SectionExtractionDxe/SectionExtraction.c
r58459 r58466 1 1 /** @file 2 2 Section Extraction Protocol implementation. 3 3 4 4 Stream database is implemented as a linked list of section streams, 5 5 where each stream contains a linked list of children, which may be leaves or 6 encapsulations. 7 6 encapsulations. 7 8 8 Children that are encapsulations generate new stream entries 9 when they are created. Streams can also be created by calls to 9 when they are created. Streams can also be created by calls to 10 10 SEP->OpenSectionStream(). 11 11 12 12 The database is only created far enough to return the requested data from 13 13 any given stream, or to determine that the requested data is not found. 14 14 15 15 If a GUIDed encapsulation is encountered, there are three possiblilites. 16 16 17 17 1) A support protocol is found, in which the stream is simply processed with 18 18 the support protocol. 19 19 20 20 2) A support protocol is not found, but the data is available to be read 21 21 without processing. In this case, the database is built up through the 22 22 recursions to return the data, and a RPN event is set that will enable 23 23 the stream in question to be refreshed if and when the required section 24 extraction protocol is published.This insures the AuthenticationStatus 24 extraction protocol is published.This insures the AuthenticationStatus 25 25 does not become stale in the cache. 26 26 27 27 3) A support protocol is not found, and the data is not available to be read 28 28 without it. This results in EFI_PROTOCOL_ERROR. … … 78 78 EFI_GUID *EncapsulationGuid; 79 79 // 80 // If the section REQUIRES an extraction protocol, register for RPN 80 // If the section REQUIRES an extraction protocol, register for RPN 81 81 // when the required GUIDed extraction protocol becomes available. 82 82 // … … 158 158 section. 159 159 160 160 161 161 @retval EFI_SUCCESS Section was retrieved successfully 162 @retval EFI_PROTOCOL_ERROR A GUID defined section was encountered in the section 162 @retval EFI_PROTOCOL_ERROR A GUID defined section was encountered in the section 163 163 stream with its EFI_GUIDED_SECTION_PROCESSING_REQUIRED 164 bit set, but there was no corresponding GUIDed Section 165 Extraction Protocol in the handle database. *Buffer is 164 bit set, but there was no corresponding GUIDed Section 165 Extraction Protocol in the handle database. *Buffer is 166 166 unmodified. 167 167 @retval EFI_NOT_FOUND An error was encountered when parsing the SectionStream. 168 This indicates the SectionStream is not correctly 168 This indicates the SectionStream is not correctly 169 169 formatted. 170 170 @retval EFI_NOT_FOUND The requested section does not exist. 171 @retval EFI_OUT_OF_RESOURCES The system has insufficient resources to process the 171 @retval EFI_OUT_OF_RESOURCES The system has insufficient resources to process the 172 172 request. 173 173 @retval EFI_INVALID_PARAMETER The SectionStreamHandle does not exist. 174 @retval EFI_WARN_TOO_SMALL The size of the caller allocated input buffer is 175 insufficient to contain the requested section. The 174 @retval EFI_WARN_TOO_SMALL The size of the caller allocated input buffer is 175 insufficient to contain the requested section. The 176 176 input buffer is filled and contents are section contents 177 177 are truncated. … … 219 219 EFI_HANDLE mSectionExtractionHandle = NULL; 220 220 221 EFI_SECTION_EXTRACTION_PROTOCOL mSectionExtraction = { 222 OpenSectionStream, 223 GetSection, 221 EFI_SECTION_EXTRACTION_PROTOCOL mSectionExtraction = { 222 OpenSectionStream, 223 GetSection, 224 224 CloseSectionStream 225 225 }; 226 226 227 227 /** 228 Entry point of the section extraction code. Initializes an instance of the 228 Entry point of the section extraction code. Initializes an instance of the 229 229 section extraction interface and installs it on a new handle. 230 230 231 231 @param ImageHandle A handle for the image that is initializing this driver 232 @param SystemTable A pointer to the EFI system table 232 @param SystemTable A pointer to the EFI system table 233 233 234 234 @retval EFI_SUCCESS Driver initialized successfully … … 282 282 TotalLength = 0; 283 283 SectionHeader = (EFI_COMMON_SECTION_HEADER *)SectionStream; 284 284 285 285 while (TotalLength < SectionStreamLength) { 286 286 if (IS_SECTION2 (SectionHeader)) { … … 292 292 293 293 if (TotalLength == SectionStreamLength) { 294 return TRUE; 294 return TRUE; 295 295 } 296 296 … … 299 299 // 300 300 SectionHeader = (EFI_COMMON_SECTION_HEADER *) ((UINT8 *) SectionHeader + SectionLength); 301 301 302 302 // 303 303 // Figure out where the next section begins … … 332 332 IN VOID *SectionStream, 333 333 IN BOOLEAN AllocateBuffer, 334 IN UINT32 AuthenticationStatus, 334 IN UINT32 AuthenticationStatus, 335 335 OUT UINTN *SectionStreamHandle 336 336 ) … … 338 338 FRAMEWORK_SECTION_STREAM_NODE *NewStream; 339 339 EFI_TPL OldTpl; 340 340 341 341 // 342 342 // Allocate a new stream … … 346 346 return EFI_OUT_OF_RESOURCES; 347 347 } 348 349 if (AllocateBuffer) { 348 349 if (AllocateBuffer) { 350 350 // 351 351 // if we're here, we're double buffering, allocate the buffer and copy the … … 353 353 // 354 354 if (SectionStreamLength > 0) { 355 NewStream->StreamBuffer = AllocatePool (SectionStreamLength); 355 NewStream->StreamBuffer = AllocatePool (SectionStreamLength); 356 356 if (NewStream->StreamBuffer == NULL) { 357 357 FreePool (NewStream); … … 376 376 NewStream->StreamBuffer = SectionStream; 377 377 } 378 378 379 379 // 380 380 // Initialize the rest of the section stream … … 385 385 InitializeListHead (&NewStream->Children); 386 386 NewStream->AuthenticationStatus = AuthenticationStatus; 387 387 388 388 // 389 389 // Add new stream to stream list … … 394 394 395 395 *SectionStreamHandle = NewStream->StreamHandle; 396 396 397 397 return EFI_SUCCESS; 398 398 } … … 429 429 return EFI_INVALID_PARAMETER; 430 430 } 431 432 return OpenSectionStreamEx ( 433 SectionStreamLength, 431 432 return OpenSectionStreamEx ( 433 SectionStreamLength, 434 434 SectionStream, 435 435 TRUE, … … 461 461 { 462 462 EFI_GUID_DEFINED_SECTION *GuidedSection; 463 463 464 464 if (SearchType == EFI_SECTION_ALL) { 465 465 return TRUE; … … 550 550 @return TRUE The GuidedSectionGuid could be identified, and the pointer to 551 551 the Guided Section Extraction Protocol will be returned to *GuidedSectionExtraction. 552 @return FALSE The GuidedSectionGuid could not be identified, or 552 @return FALSE The GuidedSectionGuid could not be identified, or 553 553 the Guided Section Extraction Protocol has not been installed yet. 554 554 … … 589 589 590 590 /** 591 RPN callback function. 591 RPN callback function. 592 592 1. Initialize the section stream when the GUIDED_SECTION_EXTRACTION_PROTOCOL is installed. 593 593 2. Removes a stale section stream and re-initializes it with an updated AuthenticationStatus. … … 612 612 UINT32 AuthenticationStatus; 613 613 RPN_EVENT_CONTEXT *Context; 614 614 615 615 Context = RpnContext; 616 616 Status = EFI_SUCCESS; … … 620 620 if (!EFI_ERROR (Status)) { 621 621 // 622 // The stream is not initialized, open it. 622 // The stream is not initialized, open it. 623 623 // Or the stream closed successfully, so re-open the stream with correct AuthenticationStatus. 624 624 // 625 626 GuidedHeader = (EFI_GUID_DEFINED_SECTION *) 625 626 GuidedHeader = (EFI_GUID_DEFINED_SECTION *) 627 627 (Context->ParentStream->StreamBuffer + Context->ChildNode->OffsetInStream); 628 628 ASSERT (GuidedHeader->CommonHeader.Type == EFI_SECTION_GUID_DEFINED); 629 629 630 630 if (!VerifyGuidedSectionGuid (Context->ChildNode->EncapsulationGuid, &GuidedExtraction)) { 631 631 return; … … 659 659 // it. 660 660 // 661 661 662 662 gBS->CloseEvent (Event); 663 663 Context->ChildNode->Event = NULL; 664 664 FreePool (Context); 665 } 665 } 666 666 667 667 /** … … 680 680 { 681 681 RPN_EVENT_CONTEXT *Context; 682 682 683 683 // 684 684 // Allocate new event structure and context … … 686 686 Context = AllocatePool (sizeof (RPN_EVENT_CONTEXT)); 687 687 ASSERT (Context != NULL); 688 688 689 689 Context->ChildNode = ChildNode; 690 690 Context->ParentStream = ParentStream; 691 691 692 692 Context->ChildNode->Event = CreateProtocolNotifyEvent ( 693 693 Context->ChildNode->EncapsulationGuid, … … 741 741 UINT8 CompressionType; 742 742 UINT16 GuidedSectionAttributes; 743 743 744 744 FRAMEWORK_SECTION_CHILD_NODE *Node; 745 745 … … 754 754 return EFI_OUT_OF_RESOURCES; 755 755 } 756 756 757 757 // 758 758 // Now initialize it … … 768 768 Node->EncapsulatedStreamHandle = NULL_STREAM_HANDLE; 769 769 Node->EncapsulationGuid = NULL; 770 770 771 771 // 772 772 // If it's an encapsulating section, then create the new section stream also … … 806 806 return EFI_OUT_OF_RESOURCES; 807 807 } 808 808 809 809 if (CompressionType == EFI_NOT_COMPRESSED) { 810 810 // … … 815 815 // 816 816 // Only support the EFI_SATNDARD_COMPRESSION algorithm. 817 // 817 // 818 818 819 819 // … … 821 821 // 822 822 Status = gBS->LocateProtocol (&gEfiDecompressProtocolGuid, NULL, (VOID **)&Decompress); 823 823 824 824 ASSERT_EFI_ERROR (Status); 825 825 826 826 Status = Decompress->GetInfo ( 827 827 Decompress, … … 856 856 ScratchSize 857 857 ); 858 FreePool (ScratchBuffer); 858 FreePool (ScratchBuffer); 859 859 if (EFI_ERROR (Status)) { 860 860 FreePool (Node); … … 867 867 NewStreamBufferSize = 0; 868 868 } 869 869 870 870 Status = OpenSectionStreamEx ( 871 871 NewStreamBufferSize, … … 907 907 return EFI_PROTOCOL_ERROR; 908 908 } 909 909 910 910 // 911 // Make sure we initialize the new stream with the correct 911 // Make sure we initialize the new stream with the correct 912 912 // authentication status for both aggregate and local status fields. 913 913 // … … 924 924 AuthenticationStatus = Stream->AuthenticationStatus; 925 925 } 926 926 927 927 Status = OpenSectionStreamEx ( 928 928 NewStreamBufferSize, … … 943 943 if ((GuidedSectionAttributes & EFI_GUIDED_SECTION_PROCESSING_REQUIRED) == EFI_GUIDED_SECTION_PROCESSING_REQUIRED) { 944 944 // 945 // If the section REQUIRES an extraction protocol, register for RPN 946 // when the required GUIDed extraction protocol becomes available. 945 // If the section REQUIRES an extraction protocol, register for RPN 946 // when the required GUIDed extraction protocol becomes available. 947 947 // 948 948 AuthenticationStatus = 0; … … 955 955 if ((GuidedSectionAttributes & EFI_GUIDED_SECTION_AUTH_STATUS_VALID) == EFI_GUIDED_SECTION_AUTH_STATUS_VALID) { 956 956 // 957 // The local status of the new stream is contained in 957 // The local status of the new stream is contained in 958 958 // AuthenticaionStatus. This value needs to be ORed into the 959 959 // Aggregate bits also... 960 960 // 961 961 962 962 // 963 963 // Clear out and initialize the local status … … 970 970 AuthenticationStatus |= AuthenticationStatus >> 16; 971 971 } 972 972 973 973 if (IS_SECTION2 (GuidedHeader)) { 974 974 Status = OpenSectionStreamEx ( … … 994 994 } 995 995 } 996 997 if ((AuthenticationStatus & EFI_LOCAL_AUTH_STATUS_ALL) == 996 997 if ((AuthenticationStatus & EFI_LOCAL_AUTH_STATUS_ALL) == 998 998 (EFI_LOCAL_AUTH_STATUS_IMAGE_SIGNED | EFI_LOCAL_AUTH_STATUS_NOT_TESTED)) { 999 999 // … … 1005 1005 CreateGuidedExtractionRpnEvent (Stream, Node); 1006 1006 } 1007 1007 1008 1008 break; 1009 1009 1010 1010 default: 1011 1011 1012 1012 // 1013 1013 // Nothing to do if it's a leaf … … 1015 1015 break; 1016 1016 } 1017 1017 1018 1018 // 1019 1019 // Last, add the new child node to the stream … … 1065 1065 EFI_STATUS ErrorStatus; 1066 1066 EFI_STATUS Status; 1067 1067 1068 1068 CurrentChildNode = NULL; 1069 1069 ErrorStatus = EFI_NOT_FOUND; 1070 1070 1071 1071 if (SourceStream->StreamLength == 0) { 1072 1072 return EFI_NOT_FOUND; 1073 1073 } 1074 1075 if (IsListEmpty (&SourceStream->Children) && 1074 1075 if (IsListEmpty (&SourceStream->Children) && 1076 1076 SourceStream->StreamLength >= sizeof (EFI_COMMON_SECTION_HEADER)) { 1077 1077 // … … 1087 1087 } 1088 1088 } 1089 1089 1090 1090 // 1091 1091 // At least one child has been parsed out of the section stream. So, walk … … 1114 1114 } 1115 1115 } 1116 1116 1117 1117 if (CurrentChildNode->EncapsulatedStreamHandle != NULL_STREAM_HANDLE) { 1118 1118 // … … 1148 1148 ErrorStatus = EFI_PROTOCOL_ERROR; 1149 1149 } 1150 1150 1151 1151 if (!IsNodeAtEnd (&SourceStream->Children, &CurrentChildNode->Link)) { 1152 1152 // … … 1200 1200 OUT FRAMEWORK_SECTION_STREAM_NODE **FoundStream 1201 1201 ) 1202 { 1202 { 1203 1203 FRAMEWORK_SECTION_STREAM_NODE *StreamNode; 1204 1204 1205 1205 if (!IsListEmpty (&mStreamRoot)) { 1206 1206 StreamNode = STREAM_NODE_FROM_LINK (GetFirstNode (&mStreamRoot)); … … 1216 1216 } 1217 1217 } 1218 1218 1219 1219 return EFI_NOT_FOUND; 1220 1220 } 1221 1221 1222 1222 /** 1223 1223 SEP member function. Retrieves requested section from section stream. … … 1243 1243 section. 1244 1244 1245 1245 1246 1246 @retval EFI_SUCCESS Section was retrieved successfully 1247 @retval EFI_PROTOCOL_ERROR A GUID defined section was encountered in the section 1247 @retval EFI_PROTOCOL_ERROR A GUID defined section was encountered in the section 1248 1248 stream with its EFI_GUIDED_SECTION_PROCESSING_REQUIRED 1249 bit set, but there was no corresponding GUIDed Section 1250 Extraction Protocol in the handle database. *Buffer is 1249 bit set, but there was no corresponding GUIDed Section 1250 Extraction Protocol in the handle database. *Buffer is 1251 1251 unmodified. 1252 1252 @retval EFI_NOT_FOUND An error was encountered when parsing the SectionStream. 1253 This indicates the SectionStream is not correctly 1253 This indicates the SectionStream is not correctly 1254 1254 formatted. 1255 1255 @retval EFI_NOT_FOUND The requested section does not exist. 1256 @retval EFI_OUT_OF_RESOURCES The system has insufficient resources to process the 1256 @retval EFI_OUT_OF_RESOURCES The system has insufficient resources to process the 1257 1257 request. 1258 1258 @retval EFI_INVALID_PARAMETER The SectionStreamHandle does not exist. 1259 @retval EFI_WARN_TOO_SMALL The size of the caller allocated input buffer is 1260 insufficient to contain the requested section. The 1259 @retval EFI_WARN_TOO_SMALL The size of the caller allocated input buffer is 1260 insufficient to contain the requested section. The 1261 1261 input buffer is filled and contents are section contents 1262 1262 are truncated. … … 1287 1287 UINTN SectionSize; 1288 1288 EFI_COMMON_SECTION_HEADER *Section; 1289 1289 1290 1290 1291 1291 OldTpl = gBS->RaiseTPL (TPL_NOTIFY); 1292 1292 Instance = SectionInstance + 1; 1293 1293 ChildStreamNode = NULL; 1294 1294 1295 1295 // 1296 1296 // Locate target stream … … 1301 1301 goto GetSection_Done; 1302 1302 } 1303 1303 1304 1304 // 1305 1305 // Found the stream, now locate and return the appropriate section … … 1317 1317 // 1318 1318 Status = FindChildNode ( 1319 StreamNode, 1320 *SectionType, 1321 &Instance, 1319 StreamNode, 1320 *SectionType, 1321 &Instance, 1322 1322 SectionDefinitionGuid, 1323 1323 &ChildNode, 1324 &ChildStreamNode, 1324 &ChildStreamNode, 1325 1325 &ExtractedAuthenticationStatus 1326 1326 ); … … 1340 1340 } 1341 1341 *AuthenticationStatus = ExtractedAuthenticationStatus; 1342 } 1343 1344 SectionSize = CopySize; 1342 } 1343 1344 SectionSize = CopySize; 1345 1345 if (*Buffer != NULL) { 1346 1346 // … … 1363 1363 CopyMem (*Buffer, CopyBuffer, CopySize); 1364 1364 *BufferSize = SectionSize; 1365 1365 1366 1366 GetSection_Done: 1367 1367 gBS->RestoreTPL (OldTpl); … … 1385 1385 // 1386 1386 RemoveEntryList (&ChildNode->Link); 1387 1387 1388 1388 if (ChildNode->EncapsulatedStreamHandle != NULL_STREAM_HANDLE) { 1389 1389 // … … 1402 1402 // 1403 1403 FreePool (ChildNode); 1404 } 1404 } 1405 1405 1406 1406 /** … … 1428 1428 LIST_ENTRY *Link; 1429 1429 FRAMEWORK_SECTION_CHILD_NODE *ChildNode; 1430 1430 1431 1431 OldTpl = gBS->RaiseTPL (TPL_NOTIFY); 1432 1432 1433 1433 // 1434 1434 // Locate target stream … … 1451 1451 Status = EFI_INVALID_PARAMETER; 1452 1452 } 1453 1453 1454 1454 gBS->RestoreTPL (OldTpl); 1455 1455 return Status; -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxe.inf
r58459 r58466 5 5 # where each stream contains a linked list of children, which may be leaves or 6 6 # encapsulations. Encapsulation section will further generate new section stream entries. 7 # 7 # 8 8 # Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 9 9 # This program and the accompanying materials … … 11 11 # which accompanies this distribution. The full text of the license may be found at 12 12 # http://opensource.org/licenses/bsd-license.php 13 # 13 # 14 14 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 15 15 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 16 # 16 # 17 17 ## 18 18 … … 24 24 MODULE_TYPE = DXE_DRIVER 25 25 VERSION_STRING = 1.0 26 ENTRY_POINT = SectionExtractionEntryPoint 26 ENTRY_POINT = SectionExtractionEntryPoint 27 27 28 28 # The following information is for reference only and not required by the build tools. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/StatusCode/DatahubStatusCodeHandlerDxe/DataHubStatusCodeWorker.c
r48674 r58466 63 63 // 64 64 // Memory management should work at <=TPL_NOTIFY 65 // 65 // 66 66 gBS->RestoreTPL (CurrentTpl); 67 67 return NULL; … … 133 133 /** 134 134 Release given record and return it to free record buffer. 135 135 136 136 @param RecordData Pointer to the record to release. 137 137 … … 349 349 350 350 Status = gBS->LocateProtocol ( 351 &gEfiDataHubProtocolGuid, 352 NULL, 351 &gEfiDataHubProtocolGuid, 352 NULL, 353 353 (VOID **) &mDataHubProtocol 354 354 ); -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/StatusCode/DatahubStatusCodeHandlerDxe/DatahubStatusCodeHandlerDxe.c
r48674 r58466 46 46 @param ImageHandle The firmware allocated handle for the EFI image. 47 47 @param SystemTable A pointer to the EFI System Table. 48 48 49 49 @retval EFI_SUCCESS The entry point is executed successfully. 50 50 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/StatusCode/DatahubStatusCodeHandlerDxe/DatahubStatusCodeHandlerDxe.inf
r58459 r58466 20 20 FILE_GUID = 863D214F-0920-437B-8CAD-88EA83A24E97 21 21 MODULE_TYPE = DXE_DRIVER 22 VERSION_STRING = 1.0 22 VERSION_STRING = 1.0 23 23 ENTRY_POINT = DatahubStatusCodeHandlerDxeEntry 24 24 … … 33 33 DatahubStatusCodeHandlerDxe.c 34 34 DataHubStatusCodeWorker.c 35 35 36 36 [Packages] 37 37 MdePkg/MdePkg.dec … … 39 39 IntelFrameworkPkg/IntelFrameworkPkg.dec 40 40 IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec 41 41 42 42 [LibraryClasses] 43 43 BaseLib … … 51 51 SynchronizationLib 52 52 BaseMemoryLib 53 53 54 54 [Guids] 55 55 gEfiEventExitBootServicesGuid ## CONSUMES ## Event 56 56 gEfiDataHubStatusCodeRecordGuid ## PRODUCES ## UNDEFINED # DataRecord Guid 57 57 gEfiStatusCodeDataTypeDebugGuid ## SOMETIMES_PRODUCES ## UNDEFINED # Record data type 58 58 59 59 [Protocols] 60 60 gEfiRscHandlerProtocolGuid ## CONSUMES -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/StatusCode/Pei/MemoryStausCodeWorker.c
r48674 r58466 82 82 83 83 // 84 // Find GUID'ed HOBs to locate current record buffer. 84 // Find GUID'ed HOBs to locate current record buffer. 85 85 // 86 86 Hob.Raw = GetFirstGuidHob (&gMemoryStatusCodeRecordGuid); -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/StatusCode/Pei/StatusCodePei.c
r48674 r58466 96 96 /** 97 97 Entry point of Status Code PEIM. 98 98 99 99 This function is the entry point of this Status Code PEIM. 100 100 It initializes supported status code devices according to PCD settings, -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/DataHubStatusCodeWorker.c
r48674 r58466 63 63 // 64 64 // Memory management should work at <=TPL_NOTIFY 65 // 65 // 66 66 gBS->RestoreTPL (CurrentTpl); 67 67 return NULL; … … 133 133 /** 134 134 Release given record and return it to free record buffer. 135 135 136 136 @param RecordData Pointer to the record to release. 137 137 … … 213 213 } 214 214 } 215 215 216 216 Record = AcquireRecordBuffer (); 217 217 if (Record == NULL) { … … 363 363 364 364 Status = gBS->LocateProtocol ( 365 &gEfiDataHubProtocolGuid, 366 NULL, 365 &gEfiDataHubProtocolGuid, 366 NULL, 367 367 (VOID **) &mDataHubProtocol 368 368 ); -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/RtMemoryStatusCodeWorker.c
r48674 r58466 3 3 4 4 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 13 13 **/ … … 19 19 /** 20 20 Initialize runtime memory status code table as initialization for runtime memory status code worker 21 21 22 22 @retval EFI_SUCCESS Runtime memory status code table successfully initialized. 23 23 … … 39 39 mRtMemoryStatusCodeTable->RecordIndex = 0; 40 40 mRtMemoryStatusCodeTable->NumberOfRecords = 0; 41 mRtMemoryStatusCodeTable->MaxRecordsNumber = 41 mRtMemoryStatusCodeTable->MaxRecordsNumber = 42 42 (PcdGet16 (PcdStatusCodeMemorySize) * 1024) / sizeof (MEMORY_STATUSCODE_RECORD); 43 43 … … 47 47 48 48 /** 49 Report status code into runtime memory. If the runtime pool is full, roll back to the 49 Report status code into runtime memory. If the runtime pool is full, roll back to the 50 50 first record and overwrite it. 51 51 52 52 @param CodeType Indicates the type of status code being reported. 53 53 @param Value Describes the current status of a hardware or software entity. … … 56 56 @param Instance The enumeration of a hardware or software entity within 57 57 the system. Valid instance numbers start with 1. 58 58 59 59 @retval EFI_SUCCESS Status code successfully recorded in runtime memory status code table. 60 60 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/SerialStatusCodeWorker.c
r58459 r58466 3 3 4 4 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 5 This program and the accompanying materials 6 are licensed and made available under the terms and conditions of the BSD License 7 which accompanies this distribution. The full text of the license may be found at 8 http://opensource.org/licenses/bsd-license.php 9 10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 12 13 13 **/ … … 17 17 /** 18 18 Convert status code value and extended data to readable ASCII string, send string to serial I/O device. 19 19 20 20 @param CodeType Indicates the type of status code being reported. 21 21 @param Value Describes the current status of a hardware or software entity. … … 73 73 // 74 74 CharCount = AsciiBSPrint ( 75 Buffer, 76 sizeof (Buffer), 77 Format, 75 Buffer, 76 sizeof (Buffer), 77 Format, 78 78 Marker 79 79 ); … … 83 83 // 84 84 CharCount = AsciiSPrint ( 85 Buffer, 86 sizeof (Buffer), 87 "ERROR: C%08x:V%08x I%x", 88 CodeType, 89 Value, 85 Buffer, 86 sizeof (Buffer), 87 "ERROR: C%08x:V%08x I%x", 88 CodeType, 89 Value, 90 90 Instance 91 91 ); 92 92 93 93 if (CallerId != NULL) { 94 94 CharCount += AsciiSPrint ( … … 119 119 // 120 120 CharCount = AsciiSPrint ( 121 Buffer, 122 sizeof (Buffer), 123 "PROGRESS CODE: V%08x I%x\n\r", 124 Value, 121 Buffer, 122 sizeof (Buffer), 123 "PROGRESS CODE: V%08x I%x\n\r", 124 Value, 125 125 Instance 126 126 ); … … 142 142 // 143 143 CharCount = AsciiSPrint ( 144 Buffer, 145 sizeof (Buffer), 146 "Undefined: C%08x:V%08x I%x\n\r", 147 CodeType, 148 Value, 144 Buffer, 145 sizeof (Buffer), 146 "Undefined: C%08x:V%08x I%x\n\r", 147 CodeType, 148 Value, 149 149 Instance 150 150 ); -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.c
r48674 r58466 39 39 @param ImageHandle The firmware allocated handle for the EFI image. 40 40 @param SystemTable A pointer to the EFI System Table. 41 41 42 42 @retval EFI_SUCCESS The entry point is executed successfully. 43 43 … … 193 193 194 194 /** 195 Dispatch initialization request to sub status code devices based on 195 Dispatch initialization request to sub status code devices based on 196 196 customized feature flags. 197 197 198 198 **/ 199 199 VOID … … 237 237 238 238 // 239 // Replay Status code which saved in GUID'ed HOB to all supported devices. 239 // Replay Status code which saved in GUID'ed HOB to all supported devices. 240 240 // 241 241 if (FeaturePcdGet (PcdStatusCodeReplayIn)) { 242 // 243 // Journal GUID'ed HOBs to find all record entry, if found, 242 // 243 // Journal GUID'ed HOBs to find all record entry, if found, 244 244 // then output record to support replay device. 245 245 // -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.h
r48674 r58466 97 97 98 98 /** 99 Dispatch initialization request to sub status code devices based on 99 Dispatch initialization request to sub status code devices based on 100 100 customized feature flags. 101 101 102 102 **/ 103 103 VOID … … 109 109 /** 110 110 Locates Serial I/O Protocol as initialization for serial status code worker. 111 111 112 112 @retval EFI_SUCCESS Serial I/O Protocol is successfully located. 113 113 … … 121 121 /** 122 122 Convert status code value and extended data to readable ASCII string, send string to serial I/O device. 123 123 124 124 @param CodeType Indicates the type of status code being reported. 125 125 @param Value Describes the current status of a hardware or software entity. … … 149 149 /** 150 150 Initialize runtime memory status code table as initialization for runtime memory status code worker 151 151 152 152 @retval EFI_SUCCESS Runtime memory status code table successfully initialized. 153 153 … … 159 159 160 160 /** 161 Report status code into runtime memory. If the runtime pool is full, roll back to the 161 Report status code into runtime memory. If the runtime pool is full, roll back to the 162 162 first record and overwrite it. 163 163 164 164 @param CodeType Indicates the type of status code being reported. 165 165 @param Value Describes the current status of a hardware or software entity. … … 168 168 @param Instance The enumeration of a hardware or software entity within 169 169 the system. Valid instance numbers start with 1. 170 170 171 171 @retval EFI_SUCCESS Status code successfully recorded in runtime memory status code table. 172 172
Note:
See TracChangeset
for help on using the changeset viewer.