20 #include "pedigree/kernel/processor/IoPort.h" 21 #include "pedigree/kernel/processor/Processor.h" 25 #if defined(ADDITIONAL_CHECKS) 31 asm volatile(
"inb %%dx, %%al" :
"=a"(value) :
"dN"(
m_IoPort + offset));
36 #if defined(ADDITIONAL_CHECKS) 37 if ((offset + 1) >=
m_Size)
42 asm volatile(
"inw %%dx, %%ax" :
"=a"(value) :
"dN"(
m_IoPort + offset));
47 #if defined(ADDITIONAL_CHECKS) 48 if ((offset + 3) >=
m_Size)
53 asm volatile(
"in %%dx, %%eax" :
"=a"(value) :
"dN"(
m_IoPort + offset));
65 #if defined(ADDITIONAL_CHECKS) 70 asm volatile(
"outb %%al, %%dx" ::
"dN"(
m_IoPort + offset),
"a"(value));
74 #if defined(ADDITIONAL_CHECKS) 75 if ((offset + 1) >=
m_Size)
79 asm volatile(
"outw %%ax, %%dx" ::
"dN"(
m_IoPort + offset),
"a"(value));
83 #if defined(ADDITIONAL_CHECKS) 88 asm volatile(
"out %%eax, %%dx" ::
"dN"(
m_IoPort + offset),
"a"(value));
virtual void write16(uint16_t value, size_t offset=0)
virtual uint64_t read64(size_t offset=0)
virtual uint8_t read8(size_t offset=0)
virtual void write32(uint32_t value, size_t offset=0)
virtual uint16_t read16(size_t offset=0)
virtual void write64(uint64_t value, size_t offset=0)
virtual uint32_t read32(size_t offset=0)
virtual void write8(uint8_t value, size_t offset=0)