iPXE
|
Go to the source code of this file.
Data Structures | |
struct | idtr32 |
A 32-bit interrupt descriptor table register. More... | |
struct | idtr64 |
A 64-bit interrupt descriptor table register. More... | |
struct | interrupt32_descriptor |
A 32-bit interrupt descriptor table entry. More... | |
struct | interrupt64_descriptor |
A 64-bit interrupt descriptor table entry. More... | |
struct | interrupt_vector |
An interrupt vector. More... | |
struct | interrupt_frame32 |
32-bit interrupt wrapper stack frame More... | |
struct | interrupt_frame64 |
64-bit interrupt wrapper stack frame More... | |
struct | page_table |
A page table. More... | |
Macros | |
#define | VIRTUAL_CS 0x08 |
#define | VIRTUAL_DS 0x10 |
#define | PHYSICAL_CS 0x18 |
#define | PHYSICAL_DS 0x20 |
#define | REAL_CS 0x28 |
#define | REAL_DS 0x30 |
#define | P2R_DS 0x38 |
#define | LONG_CS 0x40 |
#define | VIRTUAL(address) (address) |
#define | UACCESS_PREFIX_librm __librm_ |
#define | VIRT_CALL(function) |
Call C function from real-mode code. More... | |
#define | __data16(variable) |
#define | __data16_array(variable, array) |
#define | __bss16(variable) |
#define | __bss16_array(variable, array) |
#define | __text16(variable) |
#define | __text16_array(variable, array) |
#define | __use_data16(variable) |
#define | __use_text16(variable) |
#define | __from_data16(pointer) |
#define | __from_text16(pointer) |
#define | rm_cs __use_text16 ( rm_cs ) |
#define | rm_ds __use_text16 ( rm_ds ) |
#define | CODE_DEFAULT ".code32" |
#define | STACK_DEFAULT "l" |
#define | LINE_SYMBOL _S2 ( OBJECT ) "__line_" _S2 ( __LINE__ ) "__%=:" |
#define | TEXT16_CODE(asm_code_str) |
#define | REAL_CODE(asm_code_str) |
#define | PHYS_CODE(asm_code_str) |
#define | NUM_INT 256 |
Number of interrupts. More... | |
#define | IDTE_PRESENT 0x80 |
Interrupt descriptor is present. More... | |
#define | IDTE_TYPE_IRQ32 0x0e |
Interrupt descriptor 32-bit interrupt gate type. More... | |
#define | IDTE_TYPE_IRQ64 0x0e |
Interrupt descriptor 64-bit interrupt gate type. More... | |
#define | PUSH_INSN 0x50 |
"push %eax" instruction More... | |
#define | MOVB_INSN 0xb0 |
"movb" instruction More... | |
#define | JMP_INSN 0xe9 |
"jmp" instruction More... | |
#define | IO_PAGE_SIZE 0x200000UL |
I/O page size. More... | |
#define | IO_BASE ( ( void * ) 0x100000000ULL ) |
I/O page base address. More... | |
#define | sipi __use_text16 ( sipi ) |
#define | sipi_ds __use_text16 ( sipi_ds ) |
Enumerations | |
enum | page_flags { PAGE_P = 0x01, PAGE_RW = 0x02, PAGE_US = 0x04, PAGE_PWT = 0x08, PAGE_PCD = 0x10, PAGE_PS = 0x80, PAGE_LAST = 0x800 } |
Page flags. More... | |
#define VIRT_CALL | ( | function | ) |
Call C function from real-mode code.
function | C function |
#define __data16 | ( | variable | ) |
#define __data16_array | ( | variable, | |
array | |||
) |
#define __bss16 | ( | variable | ) |
#define __bss16_array | ( | variable, | |
array | |||
) |
#define __text16 | ( | variable | ) |
#define __text16_array | ( | variable, | |
array | |||
) |
#define __use_data16 | ( | variable | ) |
#define __use_text16 | ( | variable | ) |
#define __from_data16 | ( | pointer | ) |
#define __from_text16 | ( | pointer | ) |
#define rm_cs __use_text16 ( rm_cs ) |
#define rm_ds __use_text16 ( rm_ds ) |
#define LINE_SYMBOL _S2 ( OBJECT ) "__line_" _S2 ( __LINE__ ) "__%=:" |
#define TEXT16_CODE | ( | asm_code_str | ) |
#define REAL_CODE | ( | asm_code_str | ) |
#define PHYS_CODE | ( | asm_code_str | ) |
#define IDTE_TYPE_IRQ32 0x0e |
#define IDTE_TYPE_IRQ64 0x0e |
#define IO_PAGE_SIZE 0x200000UL |
#define IO_BASE ( ( void * ) 0x100000000ULL ) |
#define sipi __use_text16 ( sipi ) |
#define sipi_ds __use_text16 ( sipi_ds ) |
enum page_flags |
Page flags.
Definition at line 439 of file librm.h.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Convert physical address to user pointer.
phys_addr | Physical address |
userptr | User pointer |
Definition at line 92 of file librm.h.
References virt_offset.
|
inlinestatic |
Convert user buffer to physical address.
userptr | User pointer |
offset | Offset from user pointer |
phys_addr | Physical address |
if | ( | (sizeof(physaddr_t) > sizeof(uint32_t)) &&(addr<=0xffffffffUL) | ) |
return | ( | addr+ | virt_offset | ) |
|
inlinestatic |
Definition at line 131 of file librm.h.
References addr, and trivial_virt_to_user().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Allocate space on the real-mode stack and copy data there from a user buffer.
data | User buffer |
size | Size of stack data |
sp | New value of real-mode stack pointer |
Definition at line 68 of file librm_mgmt.c.
References data, memcpy_user(), real_to_user(), rm_sp, rm_ss, and size.
Referenced by com32_cfarcall().
Deallocate space on the real-mode stack, optionally copying back data to a user buffer.
data | User buffer |
size | Size of stack data |
Definition at line 83 of file librm_mgmt.c.
References data, memcpy_user(), real_to_user(), rm_sp, rm_ss, and size.
Referenced by com32_cfarcall().
struct idtr32 __attribute__ | ( | (packed) | ) |
void set_interrupt_vector | ( | unsigned int | intr, |
void * | vector | ||
) |
Set interrupt vector.
intr | Interrupt number |
vector | Interrupt vector, or NULL to disable |
Definition at line 97 of file librm_mgmt.c.
References addr, interrupt32_descriptor::attr, interrupt64_descriptor::attr, interrupt32_descriptor::high, interrupt64_descriptor::high, idt32, idt64, IDTE_PRESENT, IDTE_TYPE_IRQ32, IDTE_TYPE_IRQ64, intr, LONG_CS, interrupt32_descriptor::low, interrupt64_descriptor::low, interrupt64_descriptor::mid, interrupt32_descriptor::segment, interrupt64_descriptor::segment, vector, and VIRTUAL_CS.
Referenced by gdbmach_init(), and init_idt().
char __text16_array | ( | sipi | ) |
Startup IPI real-mode handler.
Set up startup IPI handler.
vector | Startup IPI vector |
handler | Protected-mode startup IPI handler physical address |
regs | Initial register state |
Definition at line 415 of file librm_mgmt.c.
References copy_to_real, memcpy(), regs, rm_ds, sipi, sipi_ds, sipi_handler, sipi_len, sipi_regs, and vector.
Referenced by bios_mp_start_all().
const unsigned long virt_offset |
Referenced by UACCESS_INLINE().
uint32_t offset |
__always_inline off_t userptr_t subtrahend |
Definition at line 147 of file librm.h.
Referenced by bigint_subtract_sample(), weierstrass_exec(), x25519_reduce_by(), and x25519_subtract().
static __always_inline void off_t dest_off |
Definition at line 152 of file librm.h.
Referenced by copy_to_real(), and copy_to_real_libkir().
__always_inline void off_t userptr_t src |
static __always_inline void off_t userptr_t off_t src_off |
Definition at line 152 of file librm.h.
Referenced by copy_from_real(), and copy_from_real_libkir().
__always_inline off_t off_t int size_t len |
__always_inline int off_t first_off |
__always_inline int off_t userptr_t second |
Definition at line 166 of file librm.h.
Referenced by asn1_generalized_time(), bigint_swap_sample(), dns_compare(), memcmp(), memswap(), strcasecmp(), strcmp(), strncasecmp(), strncmp(), uristrcmp(), vmbus_consume(), vmbus_dump_channel(), and vmbus_produce().
static __always_inline off_t off_t int c |
Definition at line 173 of file librm.h.
Referenced by _printw_handler(), _wgetc(), _wputc(), a3c90x_hw_start(), ansiesc_process(), ansiscr_putc(), arbel_fill_mlx_send_wqe(), ath5k_eeprom_read_pcal_info_5112(), ath5k_hw_post(), ath5k_hw_rf2425_channel(), ath5k_hw_rf5112_channel(), ath9k_hw_getnf(), cpio_max(), cpio_name_len(), cputchar(), dns_encode(), efi_printf_sputc(), eth_probe(), ftp_check_string(), ftp_control_deliver(), hermon_fill_eth_send_wqe(), hermon_fill_mlx_send_wqe(), hermon_fill_nop_send_wqe(), hermon_fill_rc_send_wqe(), hermon_fill_ud_send_wqe(), http_token(), kbd_getc(), linux_args_parse(), md4_digest(), md5_digest(), memsetw(), mschapv2_password_hash(), ne_probe(), ntlm_append_string(), ntlm_key(), peerdist_discovery_reply_values(), png_paeth_predictor(), png_pixels_pass(), print_user_string(), printf_putchar(), printf_sputc(), reparse_options(), sha1_digest(), sha256_digest(), sha512_digest(), syslog_fix_name(), uri_character_escaped(), uri_decode(), uri_encode(), wgetch(), wgetnstr(), and x25519_step().
char* const text16 |
uint16_t rm_sp |
Referenced by copy_user_to_rm_stack(), and remove_user_from_rm_stack().
uint16_t rm_ss |
Referenced by copy_user_to_rm_stack(), and remove_user_from_rm_stack().
uint16_t limit |
Limit.
Definition at line 250 of file librm.h.
Referenced by ath9k_hw_get_nf_limits(), ath9k_hw_nf_sanitize(), ath9k_hw_set_txpowerlimit(), ath9k_hw_update_nfcal_hist_buffer(), jme_process_receive(), jme_refill_rx_ring(), mac_address_from_string_specs(), multiboot_add_modules(), multiboot_build_memmap(), pci_backup(), pci_restore(), pcibridge_probe(), pciea_bar_size(), tg3_bmcr_reset(), tg3_reset_hw(), tg3_rings_reset(), and tg3_wait_macro_done().
uint16_t base |
Base.
Base address.
Definition at line 252 of file librm.h.
Referenced by bigint_mod_exp_raw(), bigint_mod_exp_sample(), bios_mp_start_all(), deflate_init(), ecam_access(), efi_file_varlen(), efi_local_open_path(), efi_pxe_arp(), efi_pxe_dhcp(), efi_pxe_discover(), efi_pxe_mtftp(), efi_pxe_set_ip_filter(), efi_pxe_set_packets(), efi_pxe_set_parameters(), efi_pxe_set_station_ip(), efi_pxe_start(), efi_pxe_stop(), efi_pxe_udp_read(), efi_pxe_udp_write(), elliptic_multiply(), ena_set_base(), eth_probe(), gma_read32(), gve_admin_enable(), hvm_cpuid_base(), icplus_set_base(), init_eheap(), intelxl_init_admin(), pci_msix_control(), pci_msix_dump(), pci_msix_ioremap(), pci_msix_map(), pcibridge_probe(), pciea_bar_start(), qib7322_create_send_bufs(), skge_qset(), skge_ring_alloc(), smscusb_mii_read(), smscusb_mii_wait(), smscusb_mii_write(), strtoul(), strtoul_pre(), strtoull(), uri_resolve_okx(), virtio_pci_map_capability(), weierstrass_multiply(), x25519_curve_multiply(), x25519_key(), x25519_key_okx(), x25519_ladder(), and x25519_step().
uint16_t segment |
Code segment.
Definition at line 252 of file librm.h.
Referenced by call_bootsector(), check_bios_interrupts(), ehci_ctrl_reachable(), peerblk_done(), peerblk_expired(), peerblk_open(), peerdisc_close(), peerdisc_create(), peerdisc_destroy(), peerdisc_discovered(), peerdisc_expired(), peerdisc_find(), peerdisc_free(), peerdisc_open(), peerdisc_socket_rx(), peerdist_info_block(), peerdist_info_block_okx(), peerdist_info_segment(), peerdist_info_segment_hash(), peerdist_info_segment_okx(), peerdist_info_test_exec(), peerdist_info_v1_block(), peerdist_info_v1_segment(), peerdist_info_v2_block(), peerdist_info_v2_segment(), peermux_step(), prep_segment(), print_user_string(), and real_to_user().
uint8_t unused |
Unused.
Definition at line 254 of file librm.h.
Referenced by asn1_bit_string(), find_dhcp_option_with_encap(), tls_send_certificate_verify(), and tls_send_client_key_exchange_pubkey().
uint8_t attr |
Type and attributes.
Definition at line 256 of file librm.h.
Referenced by ehci_endpoint_capabilities(), ehci_endpoint_characteristics(), ehci_schedule_add(), ehci_schedule_del(), uhci_schedule_add(), uhci_schedule_del(), and usbio_endpoint_open().
uint32_t high |
uint16_t mid |
Middle 16 bits of address.
Definition at line 258 of file librm.h.
Referenced by peerblk_raw_rx(), and prep_segment().
uint8_t jmp |
uint32_t esp |
Definition at line 249 of file librm.h.
Referenced by interrupt_dump().
uint64_t ss |
Definition at line 250 of file librm.h.
Referenced by ath9k_hw_get_gain_boundaries_pdadcs(), and memsetw().
uint32_t fs |
Definition at line 252 of file librm.h.
Referenced by efi_block_root(), and efi_local_open_root().
uint32_t ds |
Definition at line 254 of file librm.h.
Referenced by ar9002_hw_clr11n_aggr(), ar9002_hw_fill_txdesc(), ar9002_hw_get_desc_link(), ar9002_hw_proc_txdesc(), ar9002_hw_set11n_aggr_first(), ar9002_hw_set11n_aggr_last(), ar9002_hw_set11n_aggr_middle(), ar9002_hw_set11n_ratescenario(), ar9002_hw_set11n_txdesc(), ar9002_hw_set_clrdmask(), ar9002_hw_set_desc_link(), ar9003_hw_clr11n_aggr(), ar9003_hw_fill_txdesc(), ar9003_hw_get_desc_link(), ar9003_hw_set11n_aggr_first(), ar9003_hw_set11n_aggr_last(), ar9003_hw_set11n_aggr_middle(), ar9003_hw_set11n_ratescenario(), ar9003_hw_set11n_txdesc(), ar9003_hw_set_clrdmask(), ar9003_hw_set_desc_link(), ar9003_hw_set_paprd_txdesc(), ath5k_desc_alloc(), ath5k_handle_rx(), ath5k_rxbuf_setup(), ath5k_tx_processq(), ath5k_txbuf_setup(), ath9k_hw_clr11n_aggr(), ath9k_hw_filltxdesc(), ath9k_hw_get_desc_link(), ath9k_hw_rxprocdesc(), ath9k_hw_set11n_aggr_first(), ath9k_hw_set11n_aggr_last(), ath9k_hw_set11n_aggr_middle(), ath9k_hw_set11n_ratescenario(), ath9k_hw_set11n_txdesc(), ath9k_hw_set_clrdmask(), ath9k_hw_set_desc_link(), ath9k_hw_setuprxdesc(), ath9k_hw_txprocdesc(), ath_descdma_setup(), ath_get_next_rx_buf(), ath_rx_buf_link(), ath_tx_processq(), ath_tx_setup_buffer(), hermon_fill_eth_send_wqe(), hermon_fill_mlx_send_wqe(), hermon_fill_nop_send_wqe(), hermon_fill_rc_send_wqe(), hermon_fill_ud_send_wqe(), and shomron_fill_eth_send_wqe().
uint64_t cs |
Definition at line 263 of file librm.h.
Referenced by __attribute__(), linda_ib_epb_mod_reg(), and strpbrk().
uint64_t rsp |
Definition at line 267 of file librm.h.
Referenced by eap_rx_identity(), eap_tx_response(), ena_admin(), ena_create_cq(), ena_create_sq(), ena_destroy_cq(), ena_destroy_sq(), ena_get_device_attributes(), ena_get_stats(), ena_set_aenq_config(), ena_set_host_attributes(), fcp_rsp_response_data(), fcp_rsp_response_data_len(), fcp_rsp_sense_data(), fcp_rsp_sense_data_len(), fcpcmd_recv_rsp(), http_digest_authenticate(), http_format_digest_auth(), http_format_ntlm_auth(), http_ntlm_authenticate(), http_parse_ntlm_auth(), iscsi_rx_scsi_response(), iscsi_scsi_done(), peerblk_retrieval_open(), srp_rsp(), srp_rsp_response_data(), srp_rsp_response_data_len(), srp_rsp_sense_data(), and srp_rsp_sense_data_len().
struct page_table __attribute__ |
struct page_table io_pages |
The I/O space page table.
Referenced by ioremap_pages(), and iounmap_pages().
char sipi_len[] |
Length of startup IPI real-mode handler.
Referenced by setup_sipi().
uint32_t sipi_handler |
Startup IPI protected-mode handler (physical address)
Referenced by setup_sipi().
struct i386_regs sipi_regs |