From 540273b23af1ba660daac4ebe1a7651b4b4fea35 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 14 Jan 2024 21:55:24 +0100 Subject: [PATCH] And reverted io.c, since the stuff was Pentium-only anyway, so pointless. --- src/io.c | 66 -------------------------------------------------------- 1 file changed, 66 deletions(-) diff --git a/src/io.c b/src/io.c index 6e4f190e58..0e68049c36 100644 --- a/src/io.c +++ b/src/io.c @@ -279,60 +279,6 @@ io_handler_interleaved(int set, uint16_t base, int size, io_handler_common(set, base, size, inb, inw, inl, outb, outw, outl, priv, 2); } -extern int trap; -/* Set trap for I/O address breakpoints. */ -void -io_debug_check_addr(uint16_t addr) -{ - int i = 0; - int set_trap = 0; - - /* Do nothing on 486+. */ - if (is486) - return; - - if (!(dr[7] & 0xFF)) - return; - - if (!(cr4 & 0x8)) - return; /* No I/O debug trap. */ - - for (i = 0; i < 4; i++) { - uint16_t dr_addr = dr[i] & 0xFFFF; - int breakpoint_enabled = !!(dr[7] & (0x3 << (2 * i))); - int len_type_pair = ((dr[7] >> 16) & (0xF << (4 * i))) >> (4 * i); - if (!breakpoint_enabled) - continue; - if ((len_type_pair & 3) != 2) - continue; - - switch ((len_type_pair >> 2) & 3) - { - case 0x00: - if (dr_addr == addr) { - set_trap = 1; - dr[6] |= (1 << i); - } - break; - case 0x01: - if ((dr_addr & ~1) == addr || ((dr_addr & ~1) + 1) == (addr + 1)) { - set_trap = 1; - dr[6] |= (1 << i); - } - break; - case 0x03: - dr_addr &= ~3; - if (addr >= dr_addr && addr < (dr_addr + 4)) { - set_trap = 1; - dr[6] |= (1 << i); - } - break; - } - } - if (set_trap) - trap |= 4; -} - uint8_t inb(uint16_t port) { @@ -344,8 +290,6 @@ inb(uint16_t port) int qfound = 0; #endif - io_debug_check_addr(port); - if ((pci_flags & FLAG_CONFIG_IO_ON) && (port >= pci_base) && (port < (pci_base + pci_size))) { ret = pci_read(port, NULL); found = 1; @@ -406,8 +350,6 @@ outb(uint16_t port, uint8_t val) int qfound = 0; #endif - io_debug_check_addr(port); - if ((pci_flags & FLAG_CONFIG_IO_ON) && (port >= pci_base) && (port < (pci_base + pci_size))) { pci_write(port, val, NULL); found = 1; @@ -460,8 +402,6 @@ inw(uint16_t port) #endif uint8_t ret8[2]; - io_debug_check_addr(port); - if ((pci_flags & FLAG_CONFIG_IO_ON) && (port >= pci_base) && (port < (pci_base + pci_size))) { ret = pci_readw(port, NULL); found = 2; @@ -534,8 +474,6 @@ outw(uint16_t port, uint16_t val) int qfound = 0; #endif - io_debug_check_addr(port); - if ((pci_flags & FLAG_CONFIG_IO_ON) && (port >= pci_base) && (port < (pci_base + pci_size))) { pci_writew(port, val, NULL); found = 2; @@ -604,8 +542,6 @@ inl(uint16_t port) int qfound = 0; #endif - io_debug_check_addr(port); - if ((pci_flags & FLAG_CONFIG_IO_ON) && (port >= pci_base) && (port < (pci_base + pci_size))) { ret = pci_readl(port, NULL); found = 4; @@ -710,8 +646,6 @@ outl(uint16_t port, uint32_t val) #endif int i = 0; - io_debug_check_addr(port); - if ((pci_flags & FLAG_CONFIG_IO_ON) && (port >= pci_base) && (port < (pci_base + pci_size))) { pci_writel(port, val, NULL); found = 4;