mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 21:57:55 +00:00
parent
74734b7dd9
commit
b696439a67
@ -115,11 +115,9 @@ namespace Genode { namespace Trait {
|
||||
template <unsigned long _ACCESS_WIDTH>
|
||||
struct Genode::Register
|
||||
{
|
||||
enum {
|
||||
ACCESS_WIDTH = _ACCESS_WIDTH,
|
||||
ACCESS_WIDTH_LOG2 = Trait::Uint_width<ACCESS_WIDTH>::WIDTH_LOG2,
|
||||
BITFIELD_WIDTH = ACCESS_WIDTH,
|
||||
};
|
||||
static constexpr size_t ACCESS_WIDTH = _ACCESS_WIDTH;
|
||||
static constexpr size_t ACCESS_WIDTH_LOG2 = Trait::Uint_width<ACCESS_WIDTH>::WIDTH_LOG2;
|
||||
static constexpr size_t BITFIELD_WIDTH = ACCESS_WIDTH;
|
||||
|
||||
typedef typename Trait::Uint_width<ACCESS_WIDTH>::Type access_t;
|
||||
|
||||
@ -228,12 +226,12 @@ struct Genode::Bitset_2
|
||||
{
|
||||
typedef _BITS_0 Bits_0;
|
||||
typedef _BITS_1 Bits_1;
|
||||
enum {
|
||||
WIDTH = Bits_0::BITFIELD_WIDTH +
|
||||
Bits_1::BITFIELD_WIDTH,
|
||||
BITFIELD_WIDTH = WIDTH,
|
||||
ACCESS_WIDTH = Trait::Raise_to_uint_width<WIDTH>::WIDTH,
|
||||
};
|
||||
|
||||
static constexpr size_t WIDTH = Bits_0::BITFIELD_WIDTH +
|
||||
Bits_1::BITFIELD_WIDTH;
|
||||
static constexpr size_t BITFIELD_WIDTH = WIDTH;
|
||||
static constexpr size_t ACCESS_WIDTH = Trait::Raise_to_uint_width<WIDTH>::WIDTH;
|
||||
|
||||
typedef typename Trait::Uint_width<ACCESS_WIDTH>::Type access_t;
|
||||
typedef Bitset_2<Bits_0, Bits_1> Bitset_2_base;
|
||||
|
||||
@ -297,13 +295,13 @@ struct Genode::Bitset_3
|
||||
typedef _BITS_1 Bits_1;
|
||||
typedef _BITS_2 Bits_2;
|
||||
typedef Bitset_2<Bits_0, Bits_1> Bits_0_1;
|
||||
enum {
|
||||
WIDTH = Bits_0::BITFIELD_WIDTH +
|
||||
Bits_1::BITFIELD_WIDTH +
|
||||
Bits_2::BITFIELD_WIDTH,
|
||||
BITFIELD_WIDTH = WIDTH,
|
||||
ACCESS_WIDTH = Trait::Raise_to_uint_width<WIDTH>::WIDTH,
|
||||
};
|
||||
|
||||
static constexpr size_t WIDTH = Bits_0::BITFIELD_WIDTH +
|
||||
Bits_1::BITFIELD_WIDTH +
|
||||
Bits_2::BITFIELD_WIDTH;
|
||||
static constexpr size_t BITFIELD_WIDTH = WIDTH;
|
||||
static constexpr size_t ACCESS_WIDTH = Trait::Raise_to_uint_width<WIDTH>::WIDTH;
|
||||
|
||||
typedef typename Trait::Uint_width<ACCESS_WIDTH>::Type access_t;
|
||||
typedef Bitset_3<Bits_0, Bits_1, Bits_2> Bitset_3_base;
|
||||
|
||||
|
@ -637,11 +637,11 @@ class Genode::Register_set : Noncopyable
|
||||
typedef typename T::Bitset_3_base::Bits_1 Bits_1;
|
||||
typedef typename T::Bitset_3_base::Bits_2 Bits_2;
|
||||
typedef typename T::Bitset_3_base::access_t access_t;
|
||||
enum {
|
||||
BITS_0_WIDTH = Bits_0::BITFIELD_WIDTH,
|
||||
BITS_1_WIDTH = Bits_1::BITFIELD_WIDTH,
|
||||
V1_SHIFT = BITS_0_WIDTH + BITS_1_WIDTH,
|
||||
};
|
||||
|
||||
static constexpr size_t BITS_0_WIDTH = Bits_0::BITFIELD_WIDTH;
|
||||
static constexpr size_t BITS_1_WIDTH = Bits_1::BITFIELD_WIDTH;
|
||||
static constexpr size_t V1_SHIFT = BITS_0_WIDTH + BITS_1_WIDTH;
|
||||
|
||||
access_t const v0 = read<Bitset_2<Bits_0, Bits_1> >();
|
||||
access_t const v1 = read<Bits_2>();
|
||||
return v0 | (v1 << V1_SHIFT);
|
||||
|
@ -472,10 +472,8 @@ struct Igd::Device
|
||||
template <typename CONTEXT>
|
||||
struct Engine
|
||||
{
|
||||
enum {
|
||||
CONTEXT_PAGES = CONTEXT::CONTEXT_PAGES,
|
||||
RING_PAGES = CONTEXT::RING_PAGES,
|
||||
};
|
||||
static constexpr size_t CONTEXT_PAGES = CONTEXT::CONTEXT_PAGES;
|
||||
static constexpr size_t RING_PAGES = CONTEXT::RING_PAGES;
|
||||
|
||||
Ggtt_map_memory ctx; /* context memory */
|
||||
Ggtt_map_memory ring; /* ring memory */
|
||||
|
Loading…
Reference in New Issue
Block a user