summaryrefslogtreecommitdiff
path: root/src/x86_pci.h
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2018-11-03 21:48:34 -0400
committerDamien Zammit <damien@zamaudio.com>2018-11-09 05:19:21 -0500
commit1d5adf4ebf63e38afd4636437e96fd28fb1c8a33 (patch)
tree64b77bf28ad0604712c9580b46d7ffd1f4b7a7d9 /src/x86_pci.h
parentd479f9541092b67186b2e471d20f21d8b2e28e6c (diff)
Add ability to read non-VGA roms and refactor Joan's codehurd-pciarbiter
Diffstat (limited to 'src/x86_pci.h')
-rw-r--r--src/x86_pci.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/x86_pci.h b/src/x86_pci.h
index 2e00ba6..c441442 100644
--- a/src/x86_pci.h
+++ b/src/x86_pci.h
@@ -1,4 +1,5 @@
/*
+ * Copyright (c) 2017 Joan Lledó
* Copyright (c) 2009, 2012 Samuel Thibault
* Heavily inspired from the freebsd, netbsd, and openbsd backends
* (C) Copyright Eric Anholt 2006
@@ -47,8 +48,20 @@
#define PCIS_DISPLAY_VGA 0x00
#define PCI_HDRTYPE 0x0E
+#define PCI_HDRTYPE_DEVICE 0x00
+#define PCI_HDRTYPE_BRIDGE 0x01
+#define PCI_HDRTYPE_CARDBUS 0x02
#define PCI_IRQ 0x3C
+#define PCI_BAR_ADDR_0 0x10
+#define PCI_XROMBAR_ADDR_00 0x30
+#define PCI_XROMBAR_ADDR_01 0x38
+
+#define PCI_COMMAND 0x04
+#define PCI_SECONDARY_BUS 0x19
+
+#define PCI_CONFIG_SIZE 256
+
int x86_enable_io(void);
int x86_disable_io(void);
void pci_system_x86_destroy(void);