Add a debugger command to refresh the cached pci_infos from PCI config space.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41363 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
#include "util/kernel_cpp.h"
|
#include "util/kernel_cpp.h"
|
||||||
#include "pci_fixup.h"
|
#include "pci_fixup.h"
|
||||||
|
#include "pci_info.h"
|
||||||
#include "pci_private.h"
|
#include "pci_private.h"
|
||||||
#include "pci.h"
|
#include "pci.h"
|
||||||
|
|
||||||
@@ -414,6 +415,15 @@ pcistatus(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
pcirefresh(int argc, char **argv)
|
||||||
|
{
|
||||||
|
gPCI->RefreshDeviceInfo();
|
||||||
|
pci_print_info();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark bus manager init/uninit
|
// #pragma mark bus manager init/uninit
|
||||||
|
|
||||||
|
|
||||||
@@ -450,6 +460,7 @@ pci_init(void)
|
|||||||
gPCI->InitBus();
|
gPCI->InitBus();
|
||||||
|
|
||||||
add_debugger_command("pcistatus", &pcistatus, "dump and clear pci device status registers");
|
add_debugger_command("pcistatus", &pcistatus, "dump and clear pci device status registers");
|
||||||
|
add_debugger_command("pcirefresh", &pcirefresh, "refresh and print all pci_info");
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
@@ -1319,6 +1330,16 @@ PCI::_ReadHeaderInfo(PCIDev *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
PCI::RefreshDeviceInfo()
|
||||||
|
{
|
||||||
|
if (fRootBus == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_RefreshDeviceInfo(fRootBus);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PCI::_RefreshDeviceInfo(PCIBus *bus)
|
PCI::_RefreshDeviceInfo(PCIBus *bus)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -103,6 +103,8 @@ public:
|
|||||||
|
|
||||||
void ClearDeviceStatus(PCIBus *bus, bool dumpStatus);
|
void ClearDeviceStatus(PCIBus *bus, bool dumpStatus);
|
||||||
|
|
||||||
|
void RefreshDeviceInfo();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void _EnumerateBus(int domain, uint8 bus,
|
void _EnumerateBus(int domain, uint8 bus,
|
||||||
uint8 *subordinateBus = NULL);
|
uint8 *subordinateBus = NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user