Crate x86_64

Source
Expand description

x86 architecture support.

Re-exportsΒ§

pub use cpuid::adjust_cpuid;
pub use cpuid::CpuIdContext;

ModulesΒ§

acpi
bootparam
bzimage πŸ”’
Loader for bzImage-format Linux kernels as described in https://www.kernel.org/doc/Documentation/x86/boot.txt
cpuid
fdt πŸ”’
gdb πŸ”’
x86 architecture gdb debugging support.
gdt πŸ”’
interrupts
mpspec πŸ”’
mptable
msr_index πŸ”’
multiboot_spec
Multiboot specification 0.6.96 definitions
regs
smbios

StructsΒ§

ArchMemoryLayout
CpuIdCall
The wrapper for CPUID call functions.
E820Entry πŸ”’
PciRootOSC πŸ”’
SetupData
A single entry to be inserted in the bootparam setup_data linked list.
SetupDataEntries
Collection of SetupData entries to be inserted in the bootparam setup_data linked list.
X8664arch
setup_data_hdr πŸ”’

EnumsΒ§

CpuManufacturer
CpuMode
E820Type πŸ”’
Error
HybridSupportError
KernelType
MsrError
SetupDataType

ConstantsΒ§

ACPI_HI_RSDP_WINDOW_BASE πŸ”’
BIOS_MAX_SIZE πŸ”’
BOOT_STACK_POINTER
CMDLINE_MAX_SIZE πŸ”’
CMDLINE_OFFSET πŸ”’
DEFAULT_PCIE_CFG_MMIO_END πŸ”’
DEFAULT_PCIE_CFG_MMIO_SIZE πŸ”’
DEFAULT_PCIE_CFG_MMIO_START πŸ”’
DEFAULT_PCI_MEM_END πŸ”’
FIRST_ADDR_PAST_32BITS πŸ”’
GB πŸ”’
HIGH_MMIO_MAX_END πŸ”’
KB πŸ”’
KERNEL_32BIT_ENTRY_OFFSET
KERNEL_64BIT_ENTRY_OFFSET
KERNEL_START_OFFSET
MB πŸ”’
MEM_32BIT_GAP_SIZE πŸ”’
MULTIBOOT_INFO_OFFSET
MULTIBOOT_INFO_SIZE
OSC_STATUS_UNSUPPORT_UUID πŸ”’
PCI_HB_OSC_CONTROL_PCIE_AER πŸ”’
PCI_HB_OSC_CONTROL_PCIE_CAP πŸ”’
PCI_HB_OSC_CONTROL_PCIE_HP πŸ”’
PCI_HB_OSC_CONTROL_PCIE_PME πŸ”’
PCI_HB_OSC_CONTROL_SHPC_HP πŸ”’
PROTECTED_VM_FW_MAX_SIZE πŸ”’
PROTECTED_VM_FW_START πŸ”’
RESERVED_MEM_SIZE πŸ”’
SETUP_DATA_END πŸ”’
SETUP_DATA_START πŸ”’
SETUP_DTB πŸ”’
SETUP_RNG_SEED πŸ”’
X86_64_FDT_MAX_SIZE πŸ”’
X86_64_IRQ_BASE
X86_64_SCI_IRQ
X86_64_SERIAL_1_3_IRQ πŸ”’
X86_64_SERIAL_2_4_IRQ πŸ”’
ZERO_PAGE_OFFSET

FunctionsΒ§

add_e820_entry πŸ”’
Add an e820 region to the e820 map.
append_multiboot_info πŸ”’
arch_memory_regions
Returns a Vec of the valid memory addresses. These should be used to configure the GuestMemory structure for the platform. For x86_64 all addresses are valid from the start of the kernel except a carve out at the end of 32bit address space.
bios_start πŸ”’
The x86 reset vector for i386+ and x86_64 puts the processor into an β€œunreal mode” where it can access the last 1 MB of the 32-bit address space in 16-bit mode, and starts the instruction pointer at the effective physical address 0xFFFF_FFF0.
check_host_hybrid_support
Check if host supports hybrid CPU feature. The check include: 1. Check if CPUID.1AH exists. CPUID.1AH is hybrid information enumeration leaf. 2. Check if CPUID.07H.00H:EDX[bit 15] sets. This bit means the processor is identified as a hybrid part. 3. Check if CPUID.1AH:EAX sets. The hybrid core type is set in EAX.
configure_boot_params πŸ”’
configure_multiboot_info πŸ”’
create_arch_memory_layout
find_setup_data πŸ”’
Find the first setup_data_hdr with the given type in guest memory and return its address.
generate_e820_memory_map πŸ”’
Generate a memory map in INT 0x15 AX=0xE820 format.
get_cpu_manufacturer
identity_map_addr_start πŸ”’
setup_data_rng_seed πŸ”’
Generate a SETUP_RNG_SEED SetupData with random seed data.
tss_addr_end πŸ”’
tss_addr_start πŸ”’
write_setup_data πŸ”’
Write setup_data entries in guest memory and link them together with the next field.

Type AliasesΒ§

Result