Go to the documentation of this file.
18 #ifndef __LIBARCH_ARMIO_H
19 #define __LIBARCH_ARMIO_H
50 asm volatile(
"str %[data], [%[reg]]"
51 : : [reg]
"r"(addr), [data]
"r"(data));
67 asm volatile(
"ldr %[data], [%[reg]]"
68 : [data]
"=r"(data) : [reg]
"r"(addr));
82 for (
Size i = 0; i < count; i+=
sizeof(
u32))
84 *(
u32 *)(((
u8 *)buf) + i) =
read(addr + i);
97 for (
Size i = 0; i < count; i+=
sizeof(
u32))
111 volatile u32 current =
read(addr);
113 write(addr, current);
124 volatile u32 current =
read(addr);
126 write(addr, current);
void read(Address addr, Size count, void *buf) const
Read a number of 32-bit values.
Input/Output operations specific to the ARM architecture.
Address m_base
memory I/O base offset is added to each I/O address.
void write(u32 reg, u32 data)
write to memory mapped I/O register
unsigned long Address
A memory address.
void unset(Address addr, u32 data)
Unset bits in memory mapped register.
unsigned int u32
Unsigned 32-bit number.
unsigned int Size
Any sane size indicator cannot go negative.
u32 read(u32 reg) const
read from memory mapped I/O register
unsigned char u8
Unsigned 8-bit number.
void set(Address addr, u32 data)
Set bits in memory mapped register.
void write(Address addr, Size count, const void *buf)
Write a number of 32-bit values.
void dmb()
Data Memory Barrier.