Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/pci/vga_pci.c
Show First 20 Lines • Show All 166 Lines • ▼ Show 20 Lines | vga_pci_map_bios(device_t dev, size_t *size) | ||||
struct vga_resource *vr; | struct vga_resource *vr; | ||||
struct resource *res; | struct resource *res; | ||||
device_t pcib; | device_t pcib; | ||||
uint32_t rom_addr; | uint32_t rom_addr; | ||||
uint16_t config; | uint16_t config; | ||||
volatile unsigned char *bios; | volatile unsigned char *bios; | ||||
int i, rid, found; | int i, rid, found; | ||||
#if defined(__amd64__) || defined(__i386__) | // #if defined(__amd64__) || defined(__i386__) | ||||
if (vga_pci_is_boot_display(dev)) { | // if (vga_pci_is_boot_display(dev)) { | ||||
/* | // /* | ||||
* On x86, the System BIOS copy the default display | // * On x86, the System BIOS copy the default display | ||||
* device's Video BIOS at a fixed location in system | // * device's Video BIOS at a fixed location in system | ||||
* memory (0xC0000, 128 kBytes long) at boot time. | // * memory (0xC0000, 128 kBytes long) at boot time. | ||||
* | // * | ||||
* We use this copy for the default boot device, because | // * We use this copy for the default boot device, because | ||||
* the original ROM may not be valid after boot. | // * the original ROM may not be valid after boot. | ||||
*/ | // */ | ||||
*size = VGA_PCI_BIOS_SHADOW_SIZE; | // *size = VGA_PCI_BIOS_SHADOW_SIZE; | ||||
return (pmap_mapbios(VGA_PCI_BIOS_SHADOW_ADDR, *size)); | // return (pmap_mapbios(VGA_PCI_BIOS_SHADOW_ADDR, *size)); | ||||
} | // } | ||||
#endif | // #endif | ||||
pcib = device_get_parent(device_get_parent(dev)); | pcib = device_get_parent(device_get_parent(dev)); | ||||
if (device_get_devclass(device_get_parent(pcib)) == | if (device_get_devclass(device_get_parent(pcib)) == | ||||
devclass_find("pci")) { | devclass_find("pci")) { | ||||
/* | /* | ||||
* The parent bridge is a PCI-to-PCI bridge: check the | * The parent bridge is a PCI-to-PCI bridge: check the | ||||
* value of the "VGA Enable" bit. | * value of the "VGA Enable" bit. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 598 Lines • Show Last 20 Lines |