|
iPXE
|
iPXE I/O API for x86 More...
Go to the source code of this file.
Macros | |
| #define | PIO_THRESHOLD 0x10000 |
| Threshold for port I/O-mapped addresses. | |
| #define | X86_IOREADX(_api_func, _suffix, _type) |
| Read from I/O-mapped or memory-mapped device. | |
| #define | X86_IOWRITEX(_api_func, _suffix, _type) |
| Write to I/O-mapped or memory-mapped device. | |
iPXE I/O API for x86
Definition in file x86_io.c.
| #define PIO_THRESHOLD 0x10000 |
Threshold for port I/O-mapped addresses.
On x86, port I/O instructions (inb/outb/etc) can take only an 8-bit or 16-bit address (in dx). All I/O ports must therefore have a value in the first 64kB of the address space.
Virtual addresses below 64kB can never be MMIO addresses:
We therefore know that any (virtual) address returned by ioremap() must be outside the first 64kB of the address space. We can therefore use this as a threshold to determine whether a given address is a port I/O address or an MMIO address.
| #define X86_IOREADX | ( | _api_func, | |
| _suffix, | |||
| _type ) |
Read from I/O-mapped or memory-mapped device.
| io_addr | I/O address |
| data | Value read |
Definition at line 69 of file x86_io.c.
| #define X86_IOWRITEX | ( | _api_func, | |
| _suffix, | |||
| _type ) |
Write to I/O-mapped or memory-mapped device.
| data | Value to write |
| io_addr | I/O address |
Definition at line 87 of file x86_io.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
Read 64-bit qword from memory-mapped device.
| io_addr | I/O address |
| data | Value read |
This routine uses MMX instructions.
Definition at line 107 of file x86_io.c.
References __asm__(), __unused, __volatile__(), and data.
Referenced by PROVIDE_IOAPI().
Write 64-bit qword to memory-mapped device.
| data | Value to write |
| io_addr | I/O address |
This routine uses MMX instructions.
Definition at line 128 of file x86_io.c.
References __asm__(), __unused, __volatile__(), and data.
Referenced by PROVIDE_IOAPI().
| PROVIDE_IOAPI_INLINE | ( | x86 | , |
| phys_to_bus | ) |
References phys_to_bus().
| PROVIDE_IOAPI_INLINE | ( | x86 | , |
| bus_to_phys | ) |
References bus_to_phys().
| PROVIDE_IOAPI | ( | x86 | , |
| readq | , | ||
| i386_readq | ) |
References i386_readq(), and readq.
| PROVIDE_IOAPI | ( | x86 | , |
| writeq | , | ||
| i386_writeq | ) |
References i386_writeq(), and writeq.