diff options
| author | Aleksa Vuckovic <aleksa@vuckovic.cc> | 2023-03-06 01:59:33 +0100 |
|---|---|---|
| committer | Aleksa Vuckovic <aleksa@vuckovic.cc> | 2023-03-06 01:59:33 +0100 |
| commit | bd0616e6e76d5b56414a6c77131a9bb63cf5e985 (patch) | |
| tree | 406836fba0660df3dc5666d2c1e341d118553f68 /kernel/include/mcfg.h | |
| parent | fbc2cc52c8a38c3c63a34f5547ba7c4209a667ac (diff) | |
parsing pcie MCFG table
Diffstat (limited to 'kernel/include/mcfg.h')
| -rw-r--r-- | kernel/include/mcfg.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/kernel/include/mcfg.h b/kernel/include/mcfg.h new file mode 100644 index 0000000..9f062c0 --- /dev/null +++ b/kernel/include/mcfg.h @@ -0,0 +1,31 @@ +#ifndef MCFG_H +#define MCFG_H + +#include <types.h> + +struct config_space_mcfgt { + uint64_t base_addr; + uint16_t pci_seg_group; + uint8_t start_pci_bus; + uint8_t end_pci_bus; + uint32_t reserved; +} __attribute__((packed)); +typedef struct config_space_mcfgt config_space_mcfgt; + +struct MCFGT { + uint32_t signature; + uint32_t length; + uint8_t revision; + uint8_t checksum; + uint8_t oem_id[6]; + uint64_t oem_table_id; + uint32_t oem_table_revision; + uint32_t creator_id; + uint32_t creator_revision; + uint64_t reserved; +} __attribute__((packed)); +typedef struct MCFGT MCFGT; + +void read_mcfgt(void); + +#endif |
