vfs: check userland buffers before reading them.
[haiku.git] / src / add-ons / kernel / bus_managers / pci / arch / x86 / pci_io.cpp
blobe62f9a2c4a85dc365d3e82f7726285c2452a4523
1 /*
2 * Copyright 2006, Marcus Overhagen. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
7 #include "pci_private.h"
8 #include "arch_cpu.h"
11 status_t
12 pci_io_init()
14 // nothing to do on x86 hardware
15 return B_OK;
19 uint8
20 pci_read_io_8(int mapped_io_addr)
22 return in8(mapped_io_addr);
26 void
27 pci_write_io_8(int mapped_io_addr, uint8 value)
29 out8(value, mapped_io_addr);
33 uint16
34 pci_read_io_16(int mapped_io_addr)
36 return in16(mapped_io_addr);
40 void
41 pci_write_io_16(int mapped_io_addr, uint16 value)
43 out16(value, mapped_io_addr);
47 uint32
48 pci_read_io_32(int mapped_io_addr)
50 return in32(mapped_io_addr);
54 void
55 pci_write_io_32(int mapped_io_addr, uint32 value)
57 out32(value, mapped_io_addr);