Expand description
x86 architecture support.
Re-exportsΒ§
pub use cpuid::adjust_cpuid;
pub use cpuid::CpuIdContext;
ModulesΒ§
- bzimage πLoader for bzImage-format Linux kernels as described in https://www.kernel.org/doc/Documentation/x86/boot.txt
- fdt π
- gdb πx86 architecture gdb debugging support.
- gdt π
- mpspec π
- msr_index π
- Multiboot specification 0.6.96 definitions
StructsΒ§
- The wrapper for CPUID call functions.
- E820Entry π
- PciRootOSC π
- A single entry to be inserted in the bootparam
setup_data
linked list. - Collection of SetupData entries to be inserted in the bootparam
setup_data
linked list. - setup_data_hdr π
EnumsΒ§
- E820Type π
ConstantsΒ§
- BIOS_MAX_SIZE π
- CMDLINE_MAX_SIZE π
- CMDLINE_OFFSET π
- DEFAULT_PCI_MEM_END π
- GB π
- HIGH_MMIO_MAX_END π
- KB π
- MB π
- MEM_32BIT_GAP_SIZE π
- RESERVED_MEM_SIZE π
- SETUP_DATA_END π
- SETUP_DATA_START π
- SETUP_DTB π
- SETUP_RNG_SEED π
- X86_64_FDT_MAX_SIZE π
FunctionsΒ§
- add_e820_entry πAdd an e820 region to the e820 map.
- 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 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.
- find_setup_data πFind the first
setup_data_hdr
with the given type in guest memory and return its address. - Generate a memory map in INT 0x15 AX=0xE820 format.
- 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.