1/* 2 * Copyright 2006, Marcus Overhagen. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 7#include "pci_private.h" 8#include "arch_cpu.h" 9 10 11status_t 12pci_io_init() 13{ 14 // nothing to do on x86 hardware 15 return B_OK; 16} 17 18 19uint8 20pci_read_io_8(int mapped_io_addr) 21{ 22 return in8(mapped_io_addr); 23} 24 25 26void 27pci_write_io_8(int mapped_io_addr, uint8 value) 28{ 29 out8(value, mapped_io_addr); 30} 31 32 33uint16 34pci_read_io_16(int mapped_io_addr) 35{ 36 return in16(mapped_io_addr); 37} 38 39 40void 41pci_write_io_16(int mapped_io_addr, uint16 value) 42{ 43 out16(value, mapped_io_addr); 44} 45 46 47uint32 48pci_read_io_32(int mapped_io_addr) 49{ 50 return in32(mapped_io_addr); 51} 52 53 54void 55pci_write_io_32(int mapped_io_addr, uint32 value) 56{ 57 out32(value, mapped_io_addr); 58} 59