Changeset 58466 in vbox for trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/IsaAcpiDxe
- Timestamp:
- Oct 29, 2015 4:30:44 AM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 5 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/PcAtChipsetPkg/IsaAcpiDxe/ComponentName.c
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 … … 220 220 Language, 221 221 This->SupportedLanguages, 222 mPcatIsaAcpiDriverNameTable, 222 mPcatIsaAcpiDriverNameTable, 223 223 DriverName, 224 224 (BOOLEAN)(This == &gPcatIsaAcpiComponentName) -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.c
r58459 r58466 3 3 4 4 Copyright (c) 2006 - 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 … … 147 147 Enumerate the ISA devices on the ISA bus. 148 148 149 @param Device Point to device ID instance 149 @param Device Point to device ID instance 150 150 @param IsaAcpiDevice On return, point to resource data for Isa device 151 151 @param NextIsaAcpiDevice On return, point to resource data for next Isa device … … 168 168 } else { 169 169 for(Index = 0; gPcatIsaAcpiDeviceList[Index].ResourceItem != NULL; Index++) { 170 if (Device->HID == gPcatIsaAcpiDeviceList[Index].Device.HID && 170 if (Device->HID == gPcatIsaAcpiDeviceList[Index].Device.HID && 171 171 Device->UID == gPcatIsaAcpiDeviceList[Index].Device.UID ) { 172 172 break; … … 189 189 190 190 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL 191 @param Device Point to device ID instance 191 @param Device Point to device ID instance 192 192 193 193 @retval EFI_NOT_FOUND Can not found the next Isa device. … … 218 218 219 219 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL 220 @param Device Point to device ID instance 220 @param Device Point to device ID instance 221 221 @param OnOff TRUE for setting isa device power on, 222 222 FALSE for setting isa device power off … … 233 233 { 234 234 return EFI_SUCCESS; 235 } 235 } 236 236 237 237 /** … … 239 239 240 240 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL 241 @param Device Point to device ID instance 241 @param Device Point to device ID instance 242 242 @param ResourceList On return, point to resources instances for given isa device 243 243 … … 249 249 IsaGetCurrentResource ( 250 250 IN EFI_ISA_ACPI_PROTOCOL *This, 251 IN EFI_ISA_ACPI_DEVICE_ID *Device, 251 IN EFI_ISA_ACPI_DEVICE_ID *Device, 252 252 OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList 253 253 ) … … 262 262 /** 263 263 Get possible resource for the specific ISA device. 264 265 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL 266 @param Device Point to device ID instance 264 265 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL 266 @param Device Point to device ID instance 267 267 @param ResourceList On return, point to resources instances for given isa device 268 268 … … 273 273 IsaGetPossibleResource ( 274 274 IN EFI_ISA_ACPI_PROTOCOL *This, 275 IN EFI_ISA_ACPI_DEVICE_ID *Device, 275 IN EFI_ISA_ACPI_DEVICE_ID *Device, 276 276 OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList 277 277 ) … … 284 284 285 285 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL 286 @param Device Point to device ID instance 286 @param Device Point to device ID instance 287 287 @param ResourceList Point to resources instances for given isa device 288 288 … … 294 294 IsaSetResource ( 295 295 IN EFI_ISA_ACPI_PROTOCOL *This, 296 IN EFI_ISA_ACPI_DEVICE_ID *Device, 296 IN EFI_ISA_ACPI_DEVICE_ID *Device, 297 297 IN EFI_ISA_ACPI_RESOURCE_LIST *ResourceList 298 298 ) … … 300 300 return EFI_SUCCESS; 301 301 } 302 302 303 303 /** 304 304 Enable/Disable the specific ISA device. 305 305 306 306 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL 307 @param Device Point to device ID instance 307 @param Device Point to device ID instance 308 308 @param Enable Enable/Disable 309 309 … … 319 319 ) 320 320 { 321 return EFI_SUCCESS; 321 return EFI_SUCCESS; 322 322 } 323 323 … … 326 326 327 327 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL 328 @param Device Point to device ID instance 328 @param Device Point to device ID instance 329 329 330 330 @return EFI_SUCESS Success to initialize. … … 354 354 IsaInterfaceInit ( 355 355 IN EFI_ISA_ACPI_PROTOCOL *This 356 ) 357 { 358 return EFI_SUCCESS; 359 } 356 ) 357 { 358 return EFI_SUCCESS; 359 } -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c
r58459 r58466 43 43 { 44 44 return EfiLibInstallDriverBindingComponentName2 ( 45 ImageHandle, 46 SystemTable, 45 ImageHandle, 46 SystemTable, 47 47 &gPcatIsaAcpiDriverBinding, 48 48 ImageHandle, … … 55 55 ControllerDriver Protocol Method 56 56 57 @param This Driver Binding protocol instance pointer. 57 @param This Driver Binding protocol instance pointer. 58 58 @param Controller Handle of device to test. 59 59 @param RemainingDevicePath Optional parameter use to pick a specific child … … 81 81 // 82 82 // Get PciIo protocol instance 83 // 83 // 84 84 Status = gBS->OpenProtocol ( 85 Controller, 86 &gEfiPciIoProtocolGuid, 85 Controller, 86 &gEfiPciIoProtocolGuid, 87 87 (VOID**)&PciIo, 88 88 This->DriverBindingHandle, … … 98 98 EfiPciIoWidthUint32, 99 99 0, 100 sizeof(Pci) / sizeof(UINT32), 100 sizeof(Pci) / sizeof(UINT32), 101 101 &Pci); 102 102 … … 110 110 if (Pci.Hdr.ClassCode[1] == PCI_CLASS_BRIDGE_ISA) { 111 111 Status = EFI_SUCCESS; 112 } 112 } 113 113 114 114 // 115 115 // See if this is an Intel PCI to ISA bridge in Positive Decode Mode 116 116 // 117 if (Pci.Hdr.ClassCode[1] == PCI_CLASS_BRIDGE_ISA_PDECODE && 117 if (Pci.Hdr.ClassCode[1] == PCI_CLASS_BRIDGE_ISA_PDECODE && 118 118 Pci.Hdr.VendorId == 0x8086 ) { 119 119 // 120 // See if this is on Function #0 to avoid false positives on 121 // PCI_CLASS_BRIDGE_OTHER that has the same value as 120 // See if this is on Function #0 to avoid false positives on 121 // PCI_CLASS_BRIDGE_OTHER that has the same value as 122 122 // PCI_CLASS_BRIDGE_ISA_PDECODE 123 123 // 124 124 Status = PciIo->GetLocation ( 125 PciIo, 126 &SegmentNumber, 127 &BusNumber, 128 &DeviceNumber, 125 PciIo, 126 &SegmentNumber, 127 &BusNumber, 128 &DeviceNumber, 129 129 &FunctionNumber 130 130 ); … … 135 135 } 136 136 } 137 } 137 } 138 138 } 139 139 } 140 140 141 141 gBS->CloseProtocol ( 142 Controller, 143 &gEfiPciIoProtocolGuid, 144 This->DriverBindingHandle, 145 Controller 142 Controller, 143 &gEfiPciIoProtocolGuid, 144 This->DriverBindingHandle, 145 Controller 146 146 ); 147 147 148 148 return Status; 149 149 } … … 183 183 PciIo = NULL; 184 184 Status = gBS->OpenProtocol ( 185 Controller, 186 &gEfiPciIoProtocolGuid, 185 Controller, 186 &gEfiPciIoProtocolGuid, 187 187 (VOID**)&PciIo, 188 This->DriverBindingHandle, 189 Controller, 190 EFI_OPEN_PROTOCOL_BY_DRIVER 188 This->DriverBindingHandle, 189 Controller, 190 EFI_OPEN_PROTOCOL_BY_DRIVER 191 191 ); 192 192 if (EFI_ERROR (Status)) { … … 211 211 Status = EFI_UNSUPPORTED; 212 212 goto Done; 213 } 213 } 214 214 215 215 Enabled = TRUE; 216 216 Status = PciIo->Attributes ( 217 PciIo, 218 EfiPciIoAttributeOperationEnable, 219 EFI_PCI_DEVICE_ENABLE | Supports | EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO, 220 NULL 217 PciIo, 218 EfiPciIoAttributeOperationEnable, 219 EFI_PCI_DEVICE_ENABLE | Supports | EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO, 220 NULL 221 221 ); 222 222 if (EFI_ERROR (Status)) { 223 223 goto Done; 224 224 } 225 225 226 226 // 227 227 // Allocate memory for the PCAT ISA ACPI Device structure … … 248 248 // 249 249 InitializePcatIsaAcpiDeviceList (); 250 250 251 251 // 252 252 // IsaAcpi interface … … 260 260 (PcatIsaAcpiDev->IsaAcpi).InitDevice = IsaInitDevice; 261 261 (PcatIsaAcpiDev->IsaAcpi).InterfaceInit = IsaInterfaceInit; 262 262 263 263 // 264 264 // Install the ISA ACPI Protocol interface … … 274 274 if (PciIo != NULL && Enabled) { 275 275 PciIo->Attributes ( 276 PciIo, 277 EfiPciIoAttributeOperationDisable, 276 PciIo, 277 EfiPciIoAttributeOperationDisable, 278 278 EFI_PCI_DEVICE_ENABLE | Supports | EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO, 279 NULL 279 NULL 280 280 ); 281 281 } 282 282 gBS->CloseProtocol ( 283 Controller, 284 &gEfiPciIoProtocolGuid, 285 This->DriverBindingHandle, 283 Controller, 284 &gEfiPciIoProtocolGuid, 285 This->DriverBindingHandle, 286 286 Controller 287 287 ); … … 291 291 return Status; 292 292 } 293 293 294 294 return EFI_SUCCESS; 295 295 } … … 323 323 PCAT_ISA_ACPI_DEV *PcatIsaAcpiDev; 324 324 UINT64 Supports; 325 325 326 326 // 327 327 // Get the ISA ACPI Protocol Interface 328 // 328 // 329 329 Status = gBS->OpenProtocol ( 330 Controller, 331 &gEfiIsaAcpiProtocolGuid, 330 Controller, 331 &gEfiIsaAcpiProtocolGuid, 332 332 (VOID**)&IsaAcpi, 333 This->DriverBindingHandle, 334 Controller, 333 This->DriverBindingHandle, 334 Controller, 335 335 EFI_OPEN_PROTOCOL_GET_PROTOCOL 336 336 ); … … 360 360 361 361 PcatIsaAcpiDev->PciIo->Attributes ( 362 PcatIsaAcpiDev->PciIo, 363 EfiPciIoAttributeOperationDisable, 362 PcatIsaAcpiDev->PciIo, 363 EfiPciIoAttributeOperationDisable, 364 364 EFI_PCI_DEVICE_ENABLE | Supports | EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO, 365 NULL 365 NULL 366 366 ); 367 367 368 368 // 369 369 // Uninstall protocol interface: EFI_ISA_ACPI_PROTOCOL … … 378 378 379 379 gBS->CloseProtocol ( 380 Controller, 381 &gEfiPciIoProtocolGuid, 382 This->DriverBindingHandle, 380 Controller, 381 &gEfiPciIoProtocolGuid, 382 This->DriverBindingHandle, 383 383 Controller 384 384 ); 385 385 386 386 gBS->FreePool (PcatIsaAcpiDev); 387 387 388 388 return EFI_SUCCESS; 389 389 } -
trunk/src/VBox/Devices/EFI/Firmware/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.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 **/ … … 41 41 typedef struct { 42 42 UINTN Signature; 43 EFI_HANDLE Handle; 43 EFI_HANDLE Handle; 44 44 EFI_ISA_ACPI_PROTOCOL IsaAcpi; 45 45 EFI_PCI_IO_PROTOCOL *PciIo; … … 64 64 ControllerDriver Protocol Method 65 65 66 @param This Driver Binding protocol instance pointer. 66 @param This Driver Binding protocol instance pointer. 67 67 @param Controller Handle of device to test. 68 68 @param RemainingDevicePath Optional parameter use to pick a specific child … … 131 131 132 132 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL 133 @param Device Point to device ID instance 133 @param Device Point to device ID instance 134 134 135 135 @retval EFI_NOT_FOUND Can not found the next Isa device. … … 149 149 150 150 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL 151 @param Device Point to device ID instance 151 @param Device Point to device ID instance 152 152 @param OnOff TRUE for setting isa device power on, 153 153 FALSE for setting isa device power off … … 162 162 IN BOOLEAN OnOff 163 163 ); 164 164 165 165 /** 166 166 Get current resource for the specific ISA device. 167 167 168 168 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL 169 @param Device Point to device ID instance 169 @param Device Point to device ID instance 170 170 @param ResourceList On return, point to resources instances for given isa device 171 171 … … 180 180 OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList 181 181 ); 182 182 183 183 /** 184 184 Get possible resource for the specific ISA device. 185 186 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL 187 @param Device Point to device ID instance 185 186 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL 187 @param Device Point to device ID instance 188 188 @param ResourceList On return, point to resources instances for given isa device 189 189 … … 194 194 IsaGetPossibleResource ( 195 195 IN EFI_ISA_ACPI_PROTOCOL *This, 196 IN EFI_ISA_ACPI_DEVICE_ID *Device, 196 IN EFI_ISA_ACPI_DEVICE_ID *Device, 197 197 OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList 198 198 ); 199 199 200 200 /** 201 201 Set resource for the specific ISA device. 202 202 203 203 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL 204 @param Device Point to device ID instance 204 @param Device Point to device ID instance 205 205 @param ResourceList Point to resources instances for given isa device 206 206 … … 215 215 IN EFI_ISA_ACPI_RESOURCE_LIST *ResourceList 216 216 ); 217 217 218 218 /** 219 219 Enable/Disable the specific ISA device. 220 220 221 221 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL 222 @param Device Point to device ID instance 222 @param Device Point to device ID instance 223 223 @param Enable Enable/Disable 224 224 … … 238 238 239 239 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL 240 @param Device Point to device ID instance 240 @param Device Point to device ID instance 241 241 242 242 @return EFI_SUCESS Success to initialize. … … 249 249 IN EFI_ISA_ACPI_DEVICE_ID *Device 250 250 ); 251 251 252 252 /** 253 253 Initialize the ISA interface. … … 262 262 IsaInterfaceInit ( 263 263 IN EFI_ISA_ACPI_PROTOCOL *This 264 ); 264 ); 265 265 266 266 /**
Note:
See TracChangeset
for help on using the changeset viewer.