Added 8259 PIC support

This commit is contained in:
Jozef Nagy
2023-11-26 10:31:31 +01:00
parent 96a19d23b3
commit 1c031e8be9
8 changed files with 197 additions and 0 deletions

View File

@@ -43,4 +43,8 @@ VOID
HlIoPortOutShort(IN USHORT Port,
IN USHORT Value);
XTCDECL
VOID
HlIoPortWait(VOID);
#endif /* __XTDK_AMD64_HLFUNCS_H */

View File

@@ -90,6 +90,25 @@
#define COMPORT_REG_MSR 0x06 /* Modem Status Register */
#define COMPORT_REG_SR 0x07 /* Scratch Register */
/* 8259 PIC ports */
#define PIC_MASTER_COMMAND 0xA0
#define PIC_MASTER_DATA 0xA1
#define PIC_SLAVE_COMMAND 0x20
#define PIC_SLAVE_DATA 0x21
/* 8259 PIC commands */
#define PIC_ICW1_ICW4 0x01 /* Indicates that ICW4 will be present */
#define PIC_ICW1_SINGLE 0x02 /* Single (cascade) mode */
#define PIC_ICW1_INTERVAL4 0x04 /* Call address interva l 4 (8) */
#define PIC_ICW1_LEVEL 0x08 /* Level triggered (edge) mode */
#define PIC_ICW1_INIT 0x10 /* Initialization - required! */
#define PIC_ICW4_8086 0x01 /* 8086/88 (MCS-80/85) mode */
#define PIC_ICW4_AUTO 0x02 /* Auto (normal) EOI */
#define PIC_ICW4_BUF_MASTER 0x0C /* Buffered mode/master */
#define PIC_ICW4_BUF_SLAVE 0x08 /* Buffered mode/slave */
#define PIC_ICW4_SFNM 0x10 /* Special fully nested (not) */
/* APIC Register Address Map */
typedef enum _APIC_REGISTER
{

View File

@@ -43,4 +43,8 @@ VOID
HlIoPortOutShort(IN USHORT Port,
IN USHORT Value);
XTCDECL
VOID
HlIoPortWait(VOID);
#endif /* __XTDK_I686_HLFUNCS_H */