From d175be464e7ea79559db11180777c7463124385d Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Tue, 10 Mar 2009 06:21:52 +0000 Subject: [PATCH] Fix a buglet in revision 189401: when restoring a 64-bit BAR, write the upper 32-bits in the adjacent bar. The consequences of the buglet were severe enough though: a machine check. --- sys/dev/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 8804840af67..d90cd6ac3ac 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -3464,7 +3464,7 @@ pci_alloc_map(device_t dev, device_t child, int type, int *rid, */ pci_write_config(child, *rid, map, 4); if (maprange == 64) - pci_write_config(child, *rid + 4, map, 4); + pci_write_config(child, *rid + 4, map >> 32, 4); pci_write_config(child, PCIR_COMMAND, cmd, 2); /* Ignore a BAR with a base of 0. */