In pci_alloc_map(), restore the original value of the BAR for
the duration of the function. The device we would otherwise have left in an useless state may just as well be the low-level console. When booting verbose, we do need it addressable if we want to avoid a MCA. Approved by: re (kensmith)
This commit is contained in:
parent
24face5416
commit
7f67bed625
@ -3265,6 +3265,14 @@ pci_alloc_map(device_t dev, device_t child, int type, int *rid,
|
||||
map |= (pci_addr_t)pci_read_config(child, *rid + 4, 4) << 32;
|
||||
if (pci_mapbase(testval) == 0)
|
||||
goto out;
|
||||
|
||||
/*
|
||||
* Restore the original value of the BAR. We may have reprogrammed
|
||||
* the BAR of the low-level console device and when booting verbose,
|
||||
* we need the console device addressable.
|
||||
*/
|
||||
pci_write_config(child, *rid, map, 4);
|
||||
|
||||
if (PCI_BAR_MEM(testval)) {
|
||||
if (type != SYS_RES_MEMORY) {
|
||||
if (bootverbose)
|
||||
|
Loading…
x
Reference in New Issue
Block a user