mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:07:46 +00:00
PCI: Enable LogStream output for addresses
This commit is contained in:
parent
032ce1948e
commit
8639ee2640
3 changed files with 8 additions and 2 deletions
|
@ -27,6 +27,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Function.h>
|
||||
#include <AK/LogStream.h>
|
||||
#include <AK/Types.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
@ -129,6 +130,11 @@ namespace PCI {
|
|||
u8 m_function { 0 };
|
||||
};
|
||||
|
||||
inline const LogStream& operator<<(const LogStream& stream, const Address value)
|
||||
{
|
||||
return stream << "PCI [" << String::format("%w", value.seg()) << ":" << String::format("%b", value.bus()) << ":" << String::format("%b", value.slot()) << "." << String::format("%b", value.function()) << "]";
|
||||
}
|
||||
|
||||
struct ChangeableAddress : public Address {
|
||||
ChangeableAddress()
|
||||
: Address(0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue