hw & rpi: provide Pic::MAX_INTERRUPT_ID

fix #1160
This commit is contained in:
Martin Stein 2014-04-29 12:46:36 +02:00 committed by Christian Helmuth
parent f53e4ff8f5
commit 8d145bd80c

View File

@ -25,6 +25,12 @@ namespace Kernel
{ {
class Pic : Genode::Mmio class Pic : Genode::Mmio
{ {
public:
enum { MAX_INTERRUPT_ID = 64 };
private:
struct Irq_pending_basic : Register<0x0, 32> struct Irq_pending_basic : Register<0x0, 32>
{ {
struct Timer : Bitfield<0, 1> { }; struct Timer : Bitfield<0, 1> { };
@ -42,8 +48,6 @@ namespace Kernel
struct Irq_disable_gpu_2 : Register<0x20, 32> { }; struct Irq_disable_gpu_2 : Register<0x20, 32> { };
struct Irq_disable_basic : Register<0x24, 32> { }; struct Irq_disable_basic : Register<0x24, 32> { };
private:
typedef Genode::uint32_t uint32_t; typedef Genode::uint32_t uint32_t;
/** /**
@ -76,7 +80,7 @@ namespace Kernel
} }
/* search for lowest set bit in pending masks */ /* search for lowest set bit in pending masks */
for (unsigned i = 0; i < 64; i++) { for (unsigned i = 0; i < MAX_INTERRUPT_ID; i++) {
if (!_is_pending(i, p1, p2)) if (!_is_pending(i, p1, p2))
continue; continue;