1 /* SPDX-License-Identifier: GPL-2.0-only */
8 /* Functions in this file are unimplemented by default. Tests are expected to implement
9 mocks for these functions, if tests will call functions using functions listed below. */
11 uint8_t readb(volatile const void *_a
);
12 uint16_t readw(volatile const void *_a
);
13 uint32_t readl(volatile const void *_a
);
15 void writeb(uint8_t _v
, volatile void *_a
);
16 void writew(uint16_t _v
, volatile void *_a
);
17 void writel(uint32_t _v
, volatile void *_a
);
19 uint8_t read8(volatile const void *addr
);
20 uint16_t read16(volatile const void *addr
);
21 uint32_t read32(volatile const void *addr
);
22 uint64_t read64(volatile const void *addr
);
24 void write8(volatile void *addr
, uint8_t val
);
25 void write16(volatile void *addr
, uint16_t val
);
26 void write32(volatile void *addr
, uint32_t val
);
27 void write64(volatile void *addr
, uint64_t val
);
29 /* x86 I/O functions */
30 unsigned int inl(int port
);
31 unsigned short inw(int port
);
32 unsigned char inb(int port
);
34 void outl(unsigned int val
, int port
);
35 void outw(unsigned short val
, int port
);
36 void outb(unsigned char val
, int port
);
38 void outsl(int port
, const void *addr
, unsigned long count
);
39 void outsw(int port
, const void *addr
, unsigned long count
);
40 void outsb(int port
, const void *addr
, unsigned long count
);
42 void insl(int port
, void *addr
, unsigned long count
);
43 void insw(int port
, void *addr
, unsigned long count
);
44 void insb(int port
, void *addr
, unsigned long count
);
46 #endif /* _ARCH_IO_H */