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);
|
void IoInitAcpi(void);
|
||||||
|
|
||||||
SDTHeader_t *IoGetAcpiTable(ulong id);
|
SDTHeader_t *IoGetAcpiTable(ulong id);
|
||||||
|
|
|
@ -29,8 +29,10 @@
|
||||||
|
|
||||||
void pciGetDevice(ushort vendorID, ushort deviceID, int deviceType)
|
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("Unable to access PCI configuration : MCFG table not reachable\n");
|
||||||
}
|
}
|
||||||
|
KernLog("PCI Config Base address = %ld", MCFG_table->PCIConfigBaseAddress);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue