mirror of
https://gitlab.os-k.eu/os-k-team/os-k.git
synced 2023-08-25 14:03:10 +02:00
WIP: get PCI config base address from MCFG table
This commit is contained in:
parent
44781b1eaa
commit
ee3ad3b3fa
@ -196,6 +196,23 @@ struct FADT_t
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
struct SDT_MCFG_t {
|
||||
char signature[4];
|
||||
uint length;
|
||||
uchar revision;
|
||||
uchar checksum;
|
||||
char OEMID[6];
|
||||
char OEMTableID[8];
|
||||
uint OEMRevision;
|
||||
uint creatorID;
|
||||
uint creatorRevision;
|
||||
uint sdtEntry;
|
||||
|
||||
ulong PCIConfigBaseAddress;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
void IoInitAcpi(void);
|
||||
|
||||
SDTHeader_t *IoGetAcpiTable(ulong id);
|
||||
|
@ -29,8 +29,10 @@
|
||||
|
||||
void pciGetDevice(ushort vendorID, ushort deviceID, int deviceType)
|
||||
{
|
||||
if(IoGetAcpiTable(SDT_MCFG) == NULL)
|
||||
struct SDT_MCFG_t *MCFG_table = (struct SDT_MCFG_t*)IoGetAcpiTable(SDT_MCFG);
|
||||
if(MCFG_table == NULL)
|
||||
{
|
||||
KernLog("Unable to access PCI configuration : MCFG table not reachable\n");
|
||||
}
|
||||
KernLog("PCI Config Base address = %ld", MCFG_table->PCIConfigBaseAddress);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user