diff options
author | José Pekkarinen <jose.pekkarinen@nokia.com> | 2016-05-18 13:18:31 +0300 |
---|---|---|
committer | José Pekkarinen <jose.pekkarinen@nokia.com> | 2016-05-18 13:42:15 +0300 |
commit | 437fd90c0250dee670290f9b714253671a990160 (patch) | |
tree | b871786c360704244a07411c69fb58da9ead4a06 /qemu/roms/ipxe/src/arch/i386/include/pic8259.h | |
parent | 5bbd6fe9b8bab2a93e548c5a53b032d1939eec05 (diff) |
These changes are the raw update to qemu-2.6.
Collission happened in the following patches:
migration: do cleanup operation after completion(738df5b9)
Bug fix.(1750c932f86)
kvmclock: add a new function to update env->tsc.(b52baab2)
The code provided by the patches was already in the upstreamed
version.
Change-Id: I3cc11841a6a76ae20887b2e245710199e1ea7f9a
Signed-off-by: José Pekkarinen <jose.pekkarinen@nokia.com>
Diffstat (limited to 'qemu/roms/ipxe/src/arch/i386/include/pic8259.h')
-rw-r--r-- | qemu/roms/ipxe/src/arch/i386/include/pic8259.h | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/qemu/roms/ipxe/src/arch/i386/include/pic8259.h b/qemu/roms/ipxe/src/arch/i386/include/pic8259.h deleted file mode 100644 index a07e97d30..000000000 --- a/qemu/roms/ipxe/src/arch/i386/include/pic8259.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Basic support for controlling the 8259 Programmable Interrupt Controllers. - * - * Initially written by Michael Brown (mcb30). - */ - -FILE_LICENCE ( GPL2_OR_LATER ); - -#ifndef PIC8259_H -#define PIC8259_H - -#include <ipxe/io.h> - -/* For segoff_t */ -#include "realmode.h" - -#define IRQ_PIC_CUTOFF 8 - -/* 8259 register locations */ -#define PIC1_ICW1 0x20 -#define PIC1_OCW2 0x20 -#define PIC1_OCW3 0x20 -#define PIC1_ICR 0x20 -#define PIC1_IRR 0x20 -#define PIC1_ISR 0x20 -#define PIC1_ICW2 0x21 -#define PIC1_ICW3 0x21 -#define PIC1_ICW4 0x21 -#define PIC1_IMR 0x21 -#define PIC2_ICW1 0xa0 -#define PIC2_OCW2 0xa0 -#define PIC2_OCW3 0xa0 -#define PIC2_ICR 0xa0 -#define PIC2_IRR 0xa0 -#define PIC2_ISR 0xa0 -#define PIC2_ICW2 0xa1 -#define PIC2_ICW3 0xa1 -#define PIC2_ICW4 0xa1 -#define PIC2_IMR 0xa1 - -/* Register command values */ -#define OCW3_ID 0x08 -#define OCW3_READ_IRR 0x03 -#define OCW3_READ_ISR 0x02 -#define ICR_EOI_NON_SPECIFIC 0x20 -#define ICR_EOI_NOP 0x40 -#define ICR_EOI_SPECIFIC 0x60 -#define ICR_EOI_SET_PRIORITY 0xc0 - -/* Macros to enable/disable IRQs */ -#define IMR_REG(x) ( (x) < IRQ_PIC_CUTOFF ? PIC1_IMR : PIC2_IMR ) -#define IMR_BIT(x) ( 1 << ( (x) % IRQ_PIC_CUTOFF ) ) -#define irq_enabled(x) ( ( inb ( IMR_REG(x) ) & IMR_BIT(x) ) == 0 ) -#define enable_irq(x) outb ( inb( IMR_REG(x) ) & ~IMR_BIT(x), IMR_REG(x) ) -#define disable_irq(x) outb ( inb( IMR_REG(x) ) | IMR_BIT(x), IMR_REG(x) ) - -/* Macros for acknowledging IRQs */ -#define ICR_REG( irq ) ( (irq) < IRQ_PIC_CUTOFF ? PIC1_ICR : PIC2_ICR ) -#define ICR_VALUE( irq ) ( (irq) % IRQ_PIC_CUTOFF ) -#define CHAINED_IRQ 2 - -/* Utility macros to convert IRQ numbers to INT numbers and INT vectors */ -#define IRQ_INT( irq ) ( ( ( (irq) - IRQ_PIC_CUTOFF ) ^ 0x70 ) & 0x7f ) - -/* Other constants */ -#define IRQ_MAX 15 -#define IRQ_NONE -1U - -/* Function prototypes - */ -void send_eoi ( unsigned int irq ); - -#endif /* PIC8259_H */ |