summaryrefslogtreecommitdiff
path: root/src/arch/x86/x86_traits.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/x86_traits.hh')
-rw-r--r--src/arch/x86/x86_traits.hh12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/arch/x86/x86_traits.hh b/src/arch/x86/x86_traits.hh
index d605ce218..f46279c81 100644
--- a/src/arch/x86/x86_traits.hh
+++ b/src/arch/x86/x86_traits.hh
@@ -90,6 +90,18 @@ namespace X86ISA
const Addr PhysAddrPrefixIO = ULL(0x8000000000000000);
const Addr PhysAddrPrefixPciConfig = ULL(0xC000000000000000);
+
+ static inline Addr
+ x86IOAddress(const uint32_t port)
+ {
+ return PhysAddrPrefixIO | port;
+ }
+
+ static inline Addr
+ x86PciConfigAddress(const uint32_t addr)
+ {
+ return PhysAddrPrefixPciConfig | addr;
+ }
}
#endif //__ARCH_X86_X86TRAITS_HH__