From: Kevin O'Connor Date: Sun, 24 Feb 2013 02:33:36 +0000 (-0500) Subject: Minor - introduce numeric defines for the IVT offset of hw irqs. X-Git-Tag: rel-1.7.3~57 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f465e1ec1b01826100c92b890487a2ab09bfe2c1;p=seabios.git Minor - introduce numeric defines for the IVT offset of hw irqs. Signed-off-by: Kevin O'Connor --- diff --git a/src/pic.c b/src/pic.c index 669d670..3e96bb3 100644 --- a/src/pic.c +++ b/src/pic.c @@ -33,7 +33,7 @@ void pic_setup(void) { dprintf(3, "init pic\n"); - set_pics(0x08, 0x70); + set_pics(BIOS_HWIRQ0_VECTOR, BIOS_HWIRQ8_VECTOR); } // Handler for otherwise unused hardware irqs. diff --git a/src/pic.h b/src/pic.h index 0ea5622..92cb870 100644 --- a/src/pic.h +++ b/src/pic.h @@ -22,6 +22,9 @@ #define PIC2_IRQ13 (1<<5) #define PIC2_IRQ14 (1<<6) +#define BIOS_HWIRQ0_VECTOR 0x08 +#define BIOS_HWIRQ8_VECTOR 0x70 + static inline void eoi_pic1(void) { @@ -83,10 +86,10 @@ enable_hwirq(int hwirq, struct segoff_s func) int vector; if (hwirq < 8) { unmask_pic1(1 << hwirq); - vector = 0x08 + hwirq; + vector = BIOS_HWIRQ0_VECTOR + hwirq; } else { unmask_pic2(1 << (hwirq - 8)); - vector = 0x70 + hwirq - 8; + vector = BIOS_HWIRQ8_VECTOR + hwirq - 8; } SET_IVT(vector, func); } diff --git a/src/post.c b/src/post.c index 44bb0b0..4d3262f 100644 --- a/src/post.c +++ b/src/post.c @@ -47,9 +47,9 @@ ivt_init(void) SET_IVT(i, FUNC16(entry_iret_official)); // Initialize all hw vectors to a default hw handler. - for (i=0x08; i<=0x0f; i++) + for (i=BIOS_HWIRQ0_VECTOR; i