20 #ifndef KERNEL_PROCESSOR_IOPORT_H 21 #define KERNEL_PROCESSOR_IOPORT_H 23 #include "pedigree/kernel/compiler.h" 24 #include "pedigree/kernel/processor/IoBase.h" 25 #include "pedigree/kernel/processor/types.h" 30 #if !defined(KERNEL_PROCESSOR_NO_PORT_IO) 45 virtual size_t size()
const;
46 virtual uint8_t
read8(
size_t offset = 0);
47 virtual uint16_t
read16(
size_t offset = 0);
48 virtual uint32_t
read32(
size_t offset = 0);
50 virtual uint64_t
read64(
size_t offset = 0);
52 virtual void write8(uint8_t value,
size_t offset = 0);
53 virtual void write16(uint16_t value,
size_t offset = 0);
54 virtual void write32(uint32_t value,
size_t offset = 0);
56 virtual void write64(uint64_t value,
size_t offset = 0);
58 virtual operator bool()
const;
61 io_port_t base()
const;
64 const char *name()
const;
71 bool allocate(io_port_t ioPort,
size_t size);
IoBase & operator=(const IoBase &)
virtual size_t size() const =0
virtual void write8(uint8_t value, size_t offset=0)=0
virtual uint64_t read64(size_t offset=0)=0
virtual uint16_t read16(size_t offset=0)=0
Abstrace base class for hardware I/O capabilities.
virtual void write16(uint16_t value, size_t offset=0)=0
virtual uint32_t read32(size_t offset=0)=0
virtual uint8_t read8(size_t offset=0)=0
virtual void write64(uint64_t value, size_t offset=0)=0
virtual void write32(uint32_t value, size_t offset=0)=0