//
// Copyright (C) 2008 Kevin O'Connor <kevin@koconnor.net>
//
-// This file may be distributed under the terms of the GNU GPLv3 license.
+// This file may be distributed under the terms of the GNU LGPLv3 license.
#ifndef __IOPORT_H
#define __IOPORT_H
-#include "types.h" // u8
-
#define PORT_DMA_ADDR_2 0x0004
#define PORT_DMA_CNT_2 0x0005
#define PORT_DMA1_MASK_REG 0x000a
#define PORT_A20 0x0092
#define PORT_PIC2_CMD 0x00a0
#define PORT_PIC2_DATA 0x00a1
+#define PORT_SMI_CMD 0x00b2
+#define PORT_SMI_STATUS 0x00b3
#define PORT_DMA2_MASK_REG 0x00d4
#define PORT_DMA2_MODE_REG 0x00d6
#define PORT_DMA2_MASTER_CLEAR 0x00da
#define PORT_BIOS_DEBUG 0x0402
#define PORT_QEMU_CFG_CTL 0x0510
#define PORT_QEMU_CFG_DATA 0x0511
+#define PORT_ACPI_PM_BASE 0xb000
+#define PORT_SMB_BASE 0xb100
#define PORT_BIOS_APM 0x8900
-// PORT_KBD_CTRLB bitdefs
-#define KBD_REFRESH (1<<4)
+// PORT_A20 bitdefs
+#define A20_ENABLE_BIT 0x02
+#ifndef __ASSEMBLY__
+
+#include "types.h" // u8
static inline void outb(u8 value, u16 port) {
__asm__ __volatile__("outb %b0, %w1" : : "a"(value), "Nd"(port));
: "+c"(count), "+S"(data) : "d"(port) : "memory");
}
+#endif // !__ASSEMBLY__
+
#endif // ioport.h