From cd420b05ec15e8093289744810a9f6c561801588 Mon Sep 17 00:00:00 2001 From: Adrian-Ken Rueegsegger Date: Wed, 24 Feb 2016 14:28:20 +0100 Subject: [PATCH] hw_x86_64_muen: Use Bitset template for MSI address handle Use Bitset_2 to represent MSI address handle which renders the Msi_handle type unnecessary. --- .../src/core/spec/x86_64/muen/platform_support.cc | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/repos/base-hw/src/core/spec/x86_64/muen/platform_support.cc b/repos/base-hw/src/core/spec/x86_64/muen/platform_support.cc index c974939af7..e7bbb04d07 100644 --- a/repos/base-hw/src/core/spec/x86_64/muen/platform_support.cc +++ b/repos/base-hw/src/core/spec/x86_64/muen/platform_support.cc @@ -35,28 +35,22 @@ struct Mmconf_address : Register<64> return Sid::get(addr - PCI_CONFIG_BASE); } }; -struct Msi_handle : Register<16> -{ - struct Bits_0 : Bitfield<0, 15> { }; - struct Bits_1 : Bitfield<15, 1> { }; -}; - struct Msi_address : Register<32> { enum { BASE = 0xfee00010 }; struct Bits_0 : Bitfield<5, 15> { }; struct Bits_1 : Bitfield<2, 1> { }; + struct Handle : Bitset_2 { }; /** * Return MSI address register value for given handle to enable Interrupt * Requests in Remappable Format, see VT-d specification section 5.1.2.2. */ - static access_t to_msi_addr(Msi_handle::access_t const handle) + static access_t to_msi_addr(Msi_address::Handle::access_t const handle) { access_t addr = BASE; - Bits_0::set(addr, Msi_handle::Bits_0::get(handle)); - Bits_1::set(addr, Msi_handle::Bits_1::get(handle)); + Handle::set(addr, handle); return addr; } };