summaryrefslogtreecommitdiff
path: root/sys/src/cmd/vmx
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2020-11-02 01:01:48 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2020-11-02 01:01:48 +0100
commit2063019560c6a3154e6ef0e6e9f24d70c8ba09da (patch)
tree85f199f17e11178cc2d7d4141c4510fe0f89d38d /sys/src/cmd/vmx
parentd75d842cf576cb4785f89c5f5b73a4f73170001b (diff)
vmx: mask out bits 0:2 and 24:30 of pci CONFIG_ADDRESS on read
These bits are reserved, and by the specification, must return zero on read. This is also used by plan 9 for detecting config mode #1.
Diffstat (limited to 'sys/src/cmd/vmx')
-rw-r--r--sys/src/cmd/vmx/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/vmx/pci.c b/sys/src/cmd/vmx/pci.c
index 80dc7aba9..2575f4cec 100644
--- a/sys/src/cmd/vmx/pci.c
+++ b/sys/src/cmd/vmx/pci.c
@@ -237,7 +237,7 @@ pciio(int isin, u16int port, u32int val, int sz, void *)
switch(isin << 16 | port){
case 0x0cf8: cfgaddr = val; return 0;
- case 0x10cf8: return cfgaddr;
+ case 0x10cf8: return cfgaddr & ~0x7f000003;
case 0xcfc: case 0xcfd: case 0xcfe: case 0xcff:
val <<= 8 * (port & 3);
mask = -1UL >> 32 - 8 * sz << 8 * (port & 3);