mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 06:17:35 +00:00
Kernel: Simplify PCI messages on initialization
This commit is contained in:
parent
871d450b93
commit
caa7a6c2fb
2 changed files with 5 additions and 2 deletions
|
@ -83,7 +83,10 @@ struct ID {
|
||||||
return vendor_id != other.vendor_id || device_id != other.device_id;
|
return vendor_id != other.vendor_id || device_id != other.device_id;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
inline const LogStream& operator<<(const LogStream& stream, const ID value)
|
||||||
|
{
|
||||||
|
return stream << "(" << String::format("%w", value.vendor_id) << ":" << String::format("%w", value.device_id) << ")";
|
||||||
|
}
|
||||||
struct Address {
|
struct Address {
|
||||||
public:
|
public:
|
||||||
Address() {}
|
Address() {}
|
||||||
|
|
|
@ -60,7 +60,7 @@ void initialize()
|
||||||
IOAccess::initialize();
|
IOAccess::initialize();
|
||||||
|
|
||||||
enumerate_all([&](const Address& address, ID id) {
|
enumerate_all([&](const Address& address, ID id) {
|
||||||
klog() << "PCI: Device @ " << String::format("%w", address.seg()) << ":" << String::format("%b", address.bus()) << ":" << String::format("%b", address.slot()) << "." << String::format("%d", address.function()) << " [" << String::format("%w", id.vendor_id) << ":" << String::format("%w", id.device_id) << "]";
|
klog() << address << " " << id;
|
||||||
E1000NetworkAdapter::detect(address);
|
E1000NetworkAdapter::detect(address);
|
||||||
RTL8139NetworkAdapter::detect(address);
|
RTL8139NetworkAdapter::detect(address);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue