const MSR_IA32_APIC_BASE
pub const MSR_IA32_APIC_BASE = 0x1BPurpose
Extended system registers, GDT/TSS, MSR, FPU/SSE, Per-CPU GS/FS, SMAP, and cross-arch primitives.
#core/archFreestanding architecture and CPU control instructions. Extended system registers, GDT/TSS, MSR, FPU/SSE, Per-CPU GS/FS, SMAP, and cross-arch primitives.
const MSR_IA32_APIC_BASEpub const MSR_IA32_APIC_BASE = 0x1BExtended system registers, GDT/TSS, MSR, FPU/SSE, Per-CPU GS/FS, SMAP, and cross-arch primitives.
const MSR_IA32_EFERpub const MSR_IA32_EFER = 0xC0000080Constant MSR_IA32_EFER, defining protocol or algorithm parameters.
const MSR_IA32_STARpub const MSR_IA32_STAR = 0xC0000081Constant MSR_IA32_STAR, defining protocol or algorithm parameters.
const MSR_IA32_LSTARpub const MSR_IA32_LSTAR = 0xC0000082Constant MSR_IA32_LSTAR, defining protocol or algorithm parameters.
const MSR_IA32_FMASKpub const MSR_IA32_FMASK = 0xC0000084Constant MSR_IA32_FMASK, defining protocol or algorithm parameters.
const MSR_IA32_FS_BASEpub const MSR_IA32_FS_BASE = 0xC0000100Constant MSR_IA32_FS_BASE, defining protocol or algorithm parameters.
const MSR_IA32_GS_BASEpub const MSR_IA32_GS_BASE = 0xC0000101Constant MSR_IA32_GS_BASE, defining protocol or algorithm parameters.
const MSR_IA32_KERNEL_GS_BASEpub const MSR_IA32_KERNEL_GS_BASE = 0xC0000102Constant MSR_IA32_KERNEL_GS_BASE, defining protocol or algorithm parameters.
const IDT_FLAG_PRESENTpub const IDT_FLAG_PRESENT = 0x80IDT Type and Attribute Flags
const IDT_FLAG_RING0pub const IDT_FLAG_RING0 = 0x00Constant IDT_FLAG_RING0, defining protocol or algorithm parameters.
const IDT_FLAG_RING3pub const IDT_FLAG_RING3 = 0x60Constant IDT_FLAG_RING3, defining protocol or algorithm parameters.
const IDT_GATE_INTERRUPTpub const IDT_GATE_INTERRUPT = 0x0EConstant IDT_GATE_INTERRUPT, defining protocol or algorithm parameters.
const IDT_GATE_TRAPpub const IDT_GATE_TRAP = 0x0FConstant IDT_GATE_TRAP, defining protocol or algorithm parameters.
const IDT_ATTR_INT32pub const IDT_ATTR_INT32 = 0x8EConstant IDT_ATTR_INT32, defining protocol or algorithm parameters.
const IDT_ATTR_TRAP32pub const IDT_ATTR_TRAP32 = 0x8FConstant IDT_ATTR_TRAP32, defining protocol or algorithm parameters.
const IDT_ATTR_USER_INT32pub const IDT_ATTR_USER_INT32 = 0xEEConstant IDT_ATTR_USER_INT32, defining protocol or algorithm parameters.
const PIC1_CMDpub const PIC1_CMD = 0x208259A Programmable Interrupt Controller (PIC) definitions
const PIC1_DATApub const PIC1_DATA = 0x21Constant PIC1_DATA, defining protocol or algorithm parameters.
const PIC2_CMDpub const PIC2_CMD = 0xA0Constant PIC2_CMD, defining protocol or algorithm parameters.
const PIC2_DATApub const PIC2_DATA = 0xA1Constant PIC2_DATA, defining protocol or algorithm parameters.
const PIC_EOIpub const PIC_EOI = 0x20Constant PIC_EOI, defining protocol or algorithm parameters.
const PIT_CHANNEL0pub const PIT_CHANNEL0 = 0x408254 Programmable Interval Timer (PIT) definitions
const PIT_COMMANDpub const PIT_COMMAND = 0x43Constant PIT_COMMAND, defining protocol or algorithm parameters.
const PIT_BASE_FREQpub const PIT_BASE_FREQ = 1193182Constant PIT_BASE_FREQ, defining protocol or algorithm parameters.
const LAPIC_DEFAULT_BASEpub const LAPIC_DEFAULT_BASE = 0xFEE00000x86_64 Local APIC MMIO definitions and helpers
const LAPIC_REG_IDpub const LAPIC_REG_ID = 0x020Constant LAPIC_REG_ID, defining protocol or algorithm parameters.
const LAPIC_REG_VERpub const LAPIC_REG_VER = 0x030Constant LAPIC_REG_VER, defining protocol or algorithm parameters.
const LAPIC_REG_TPRpub const LAPIC_REG_TPR = 0x080Constant LAPIC_REG_TPR, defining protocol or algorithm parameters.
const LAPIC_REG_EOIpub const LAPIC_REG_EOI = 0x0B0Constant LAPIC_REG_EOI, defining protocol or algorithm parameters.
const LAPIC_REG_SVRpub const LAPIC_REG_SVR = 0x0F0Constant LAPIC_REG_SVR, defining protocol or algorithm parameters.
const LAPIC_REG_ICR_LOWpub const LAPIC_REG_ICR_LOW = 0x300Constant LAPIC_REG_ICR_LOW, defining protocol or algorithm parameters.
const LAPIC_REG_ICR_HIGHpub const LAPIC_REG_ICR_HIGH = 0x310Constant LAPIC_REG_ICR_HIGH, defining protocol or algorithm parameters.
const LAPIC_REG_LVT_TIMERpub const LAPIC_REG_LVT_TIMER = 0x320Constant LAPIC_REG_LVT_TIMER, defining protocol or algorithm parameters.
const LAPIC_REG_TIMER_INITpub const LAPIC_REG_TIMER_INIT = 0x380Constant LAPIC_REG_TIMER_INIT, defining protocol or algorithm parameters.
const LAPIC_REG_TIMER_CURpub const LAPIC_REG_TIMER_CUR = 0x390Constant LAPIC_REG_TIMER_CUR, defining protocol or algorithm parameters.
const LAPIC_REG_TIMER_DIVpub const LAPIC_REG_TIMER_DIV = 0x3E0Constant LAPIC_REG_TIMER_DIV, defining protocol or algorithm parameters.
const LAPIC_ICR_DELIV_FIXEDpub const LAPIC_ICR_DELIV_FIXED = 0x000Local APIC ICR / SMP / Timer helpers
const LAPIC_ICR_DELIV_INITpub const LAPIC_ICR_DELIV_INIT = 0x500Constant LAPIC_ICR_DELIV_INIT, defining protocol or algorithm parameters.
const LAPIC_ICR_DELIV_STARTUPpub const LAPIC_ICR_DELIV_STARTUP = 0x600Constant LAPIC_ICR_DELIV_STARTUP, defining protocol or algorithm parameters.
const LAPIC_ICR_PENDINGpub const LAPIC_ICR_PENDING = 0x1000Constant LAPIC_ICR_PENDING, defining protocol or algorithm parameters.
const LAPIC_ICR_LEVEL_ASSERTpub const LAPIC_ICR_LEVEL_ASSERT = 0x4000Constant LAPIC_ICR_LEVEL_ASSERT, defining protocol or algorithm parameters.
const LAPIC_TIMER_MASKEDpub const LAPIC_TIMER_MASKED = 0x10000Constant LAPIC_TIMER_MASKED, defining protocol or algorithm parameters.
const LAPIC_TIMER_PERIODICpub const LAPIC_TIMER_PERIODIC = 0x20000Constant LAPIC_TIMER_PERIODIC, defining protocol or algorithm parameters.
const IOAPIC_DEFAULT_BASEpub const IOAPIC_DEFAULT_BASE = 0xFEC00000x86_64 I/O APIC MMIO definitions and helpers
const IOAPIC_REGSELpub const IOAPIC_REGSEL = 0x00Constant IOAPIC_REGSEL, defining protocol or algorithm parameters.
const IOAPIC_IOWINpub const IOAPIC_IOWIN = 0x10Constant IOAPIC_IOWIN, defining protocol or algorithm parameters.
const IOAPIC_REG_IDpub const IOAPIC_REG_ID = 0x00Constant IOAPIC_REG_ID, defining protocol or algorithm parameters.
const IOAPIC_REG_VERpub const IOAPIC_REG_VER = 0x01Constant IOAPIC_REG_VER, defining protocol or algorithm parameters.
const IOAPIC_REG_REDTBLpub const IOAPIC_REG_REDTBL = 0x10Constant IOAPIC_REG_REDTBL, defining protocol or algorithm parameters.
const GICD_CTLRpub const GICD_CTLR = 0x000ARM64 GICv2 Distributor (GICD) & CPU Interface (GICC) + Generic Timer helpers
const GICD_ISENABLERpub const GICD_ISENABLER = 0x100Constant GICD_ISENABLER, defining protocol or algorithm parameters.
const GICD_ITARGETSRpub const GICD_ITARGETSR = 0x800Constant GICD_ITARGETSR, defining protocol or algorithm parameters.
const GICC_CTLRpub const GICC_CTLR = 0x000Constant GICC_CTLR, defining protocol or algorithm parameters.
const GICC_PMRpub const GICC_PMR = 0x004Constant GICC_PMR, defining protocol or algorithm parameters.
const GICC_IARpub const GICC_IAR = 0x00CConstant GICC_IAR, defining protocol or algorithm parameters.
const GICC_EOIRpub const GICC_EOIR = 0x010Constant GICC_EOIR, defining protocol or algorithm parameters.
const HPET_REG_GCAP_IDpub const HPET_REG_GCAP_ID = 0x000x86_64 HPET (High Precision Event Timer) MMIO helpers
const HPET_REG_GEN_CONFpub const HPET_REG_GEN_CONF = 0x010Constant HPET_REG_GEN_CONF, defining protocol or algorithm parameters.
const HPET_REG_MAIN_CNTpub const HPET_REG_MAIN_CNT = 0x0F0Constant HPET_REG_MAIN_CNT, defining protocol or algorithm parameters.
const PSCI_VERSIONpub const PSCI_VERSION = 0x84000000Constant PSCI_VERSION, defining protocol or algorithm parameters.
const PSCI_SYSTEM_OFFpub const PSCI_SYSTEM_OFF = 0x84000008Constant PSCI_SYSTEM_OFF, defining protocol or algorithm parameters.
const PSCI_SYSTEM_RESETpub const PSCI_SYSTEM_RESET = 0x84000009Constant PSCI_SYSTEM_RESET, defining protocol or algorithm parameters.
const PSCI_CPU_ON_64pub const PSCI_CPU_ON_64 = 0xC4000003Constant PSCI_CPU_ON_64, defining protocol or algorithm parameters.
const SBI_EXT_BASEpub const SBI_EXT_BASE = 0x10Constant SBI_EXT_BASE, defining protocol or algorithm parameters.
const SBI_EXT_TIMEpub const SBI_EXT_TIME = 0x54494D45Constant SBI_EXT_TIME, defining protocol or algorithm parameters.
const SBI_EXT_IPIpub const SBI_EXT_IPI = 0x735049Constant SBI_EXT_IPI, defining protocol or algorithm parameters.
const SBI_EXT_HSMpub const SBI_EXT_HSM = 0x48534DConstant SBI_EXT_HSM, defining protocol or algorithm parameters.
const SBI_EXT_SRSTpub const SBI_EXT_SRST = 0x53525354Constant SBI_EXT_SRST, defining protocol or algorithm parameters.
const CR4_PAEpub const CR4_PAE = 0x20x86_64 CR4 control register bitmasks
const CR4_PGEpub const CR4_PGE = 0x80Constant CR4_PGE, defining protocol or algorithm parameters.
const CR4_OSFXSRpub const CR4_OSFXSR = 0x200Constant CR4_OSFXSR, defining protocol or algorithm parameters.
const CR4_OSXMMEXCPTpub const CR4_OSXMMEXCPT = 0x400Constant CR4_OSXMMEXCPT, defining protocol or algorithm parameters.
const CR4_UMIPpub const CR4_UMIP = 0x800Constant CR4_UMIP, defining protocol or algorithm parameters.
const CR4_FSGSBASEpub const CR4_FSGSBASE = 0x10000Constant CR4_FSGSBASE, defining protocol or algorithm parameters.
const CR4_PCIDEpub const CR4_PCIDE = 0x20000Constant CR4_PCIDE, defining protocol or algorithm parameters.
const CR4_OSXSAVEpub const CR4_OSXSAVE = 0x40000Constant CR4_OSXSAVE, defining protocol or algorithm parameters.
const CR4_SMEPpub const CR4_SMEP = 0x100000Constant CR4_SMEP, defining protocol or algorithm parameters.
const CR4_SMAPpub const CR4_SMAP = 0x200000Constant CR4_SMAP, defining protocol or algorithm parameters.
const MSR_IA32_X2APIC_IDpub const MSR_IA32_X2APIC_ID = 0x802x86_64 x2APIC MSR constants and helpers
const MSR_IA32_X2APIC_SVRpub const MSR_IA32_X2APIC_SVR = 0x80FConstant MSR_IA32_X2APIC_SVR, defining protocol or algorithm parameters.
const MSR_IA32_X2APIC_EOIpub const MSR_IA32_X2APIC_EOI = 0x80BConstant MSR_IA32_X2APIC_EOI, defining protocol or algorithm parameters.
const MSR_IA32_X2APIC_ICRpub const MSR_IA32_X2APIC_ICR = 0x830Constant MSR_IA32_X2APIC_ICR, defining protocol or algorithm parameters.
const CR0_PEpub const CR0_PE = 1 << 0x86_64 CR0, EFER, and CPUID feature bitmasks + security enable helpers
const CR0_MPpub const CR0_MP = 1 << 1Constant CR0_MP, defining protocol or algorithm parameters.
const CR0_EMpub const CR0_EM = 1 << 2Constant CR0_EM, defining protocol or algorithm parameters.
const CR0_WPpub const CR0_WP = 1 << 16Constant CR0_WP, defining protocol or algorithm parameters.
const CR0_PGpub const CR0_PG = 0x80000000Constant CR0_PG, defining protocol or algorithm parameters.
const EFER_SCEpub const EFER_SCE = 1 << 0Constant EFER_SCE, defining protocol or algorithm parameters.
const EFER_LMEpub const EFER_LME = 1 << 8Constant EFER_LME, defining protocol or algorithm parameters.
const EFER_NXEpub const EFER_NXE = 1 << 11Constant EFER_NXE, defining protocol or algorithm parameters.
const CPUID_FEAT_EBX_SMEPpub const CPUID_FEAT_EBX_SMEP = 1 << 7Constant CPUID_FEAT_EBX_SMEP, defining protocol or algorithm parameters.
const CPUID_FEAT_EBX_SMAPpub const CPUID_FEAT_EBX_SMAP = 1 << 20Constant CPUID_FEAT_EBX_SMAP, defining protocol or algorithm parameters.
const GICD_CTLR_ARE_NSpub const GICD_CTLR_ARE_NS = 0x10ARM64 GICv3 Distributor (GICD) & Redistributor (GICR) MMIO helpers
const GICD_CTLR_ENABLE_GRP1NSpub const GICD_CTLR_ENABLE_GRP1NS = 0x02Constant GICD_CTLR_ENABLE_GRP1NS, defining protocol or algorithm parameters.
const GICR_WAKERpub const GICR_WAKER = 0x0014Constant GICR_WAKER, defining protocol or algorithm parameters.
const GICR_IGROUPR0pub const GICR_IGROUPR0 = 0x0080Constant GICR_IGROUPR0, defining protocol or algorithm parameters.
const GICR_ISENABLER0pub const GICR_ISENABLER0 = 0x0100Constant GICR_ISENABLER0, defining protocol or algorithm parameters.
const GICR_IPRIORITYRpub const GICR_IPRIORITYR = 0x0400Constant GICR_IPRIORITYR, defining protocol or algorithm parameters.
const RV64_SIE_STIEpub const RV64_SIE_STIE = 0x20u64RISC-V 64 S-mode timer & interrupt enable constants and helpers
const RV64_SSTATUS_SIEpub const RV64_SSTATUS_SIE = 0x2u64Constant RV64_SSTATUS_SIE, defining protocol or algorithm parameters.
clipub fn cli()Execute cli.
No arguments are required.
This call does not return a value.
stipub fn sti()Execute sti.
No arguments are required.
This call does not return a value.
irq_disablepub fn irq_disable()Irq disable.
No arguments are required.
This call does not return a value.
irq_enablepub fn irq_enable()Irq enable.
No arguments are required.
This call does not return a value.
haltpub fn halt()Execute halt.
No arguments are required.
This call does not return a value.
pausepub fn pause()Execute pause.
No arguments are required.
This call does not return a value.
cpu_relaxpub fn cpu_relax()Cpu relax.
No arguments are required.
This call does not return a value.
wfipub fn wfi()Execute wfi.
No arguments are required.
This call does not return a value.
fencepub fn fence()Execute fence.
No arguments are required.
This call does not return a value.
mbpub fn mb()Execute mb.
No arguments are required.
This call does not return a value.
rmbpub fn rmb()Execute rmb.
No arguments are required.
This call does not return a value.
wmbpub fn wmb()Execute wmb.
No arguments are required.
This call does not return a value.
compiler_fencepub fn compiler_fence()Compiler fence.
No arguments are required.
This call does not return a value.
struct GdtPointerpub struct GdtPointer {
pub limit u16
pub base u64
}Structure encapsulating limit, base.
limit u16base u64struct CpuidResultpub struct CpuidResult {
pub eax u32
pub ebx u32
pub ecx u32
pub edx u32
}Structure encapsulating eax, ebx, ecx, edx.
eax u32ebx u32ecx u32edx u32syscall0pub fn syscall0(nr u64) u64Execute syscall0.
nr u64u64 — a value of this type
syscall1pub fn syscall1(nr u64, a0 u64) u64Execute syscall1.
nr u64a0 u64u64 — a value of this type
syscall2pub fn syscall2(nr u64, a0 u64, a1 u64) u64Execute syscall2.
nr u64a0 u64a1 u64u64 — a value of this type
syscall3pub fn syscall3(nr u64, a0 u64, a1 u64, a2 u64) u64Execute syscall3.
nr u64a0 u64a1 u64a2 u64u64 — a value of this type
struct IdtEntrypub struct IdtEntry {
pub offset_low u16
pub selector u16
pub ist u8
pub type_attr u8
pub offset_mid u16
pub offset_high u32
pub zero u32
}Structure encapsulating offset_low, selector, ist, type_attr, offset_mid.
offset_low u16selector u16ist u8type_attr u8offset_mid u16offset_high u32zero u32struct IdtPointerpub struct IdtPointer {
pub limit u16
pub base u64
}Structure encapsulating limit, base.
limit u16base u64($&IdtEntry) set_gatepub fn (e $&IdtEntry) set_gate(handler u64, selector u16, attr u8)Operation on $&IdtEntry: set gate.
e $&IdtEntryIdtEntry instance used by this call (exclusive borrow).handler u64selector u16attr u8This call does not return a value.
pic_remappub fn pic_remap(offset1 u8, offset2 u8)Pic remap.
offset1 u8offset2 u8This call does not return a value.
pic_unmaskpub fn pic_unmask(irq u8)Pic unmask.
irq u8This call does not return a value.
pic_maskpub fn pic_mask(irq u8)Pic mask.
irq u8This call does not return a value.
pic_eoipub fn pic_eoi(irq u8)Pic eoi.
irq u8This call does not return a value.
pic_disablepub fn pic_disable()Pic disable.
No arguments are required.
This call does not return a value.
pit_initpub fn pit_init(freq_hz u32)Pit init.
freq_hz u32This call does not return a value.
lapic_basepub fn lapic_base() u64Lapic base name.
No arguments are required.
u64 — a value of this type
lapic_readpub fn lapic_read(base u64, reg u32) u32Lapic read.
base u64reg u32u32 — a value of this type
lapic_writepub fn lapic_write(base u64, reg u32, val u32)Lapic write.
base u64reg u32val u32This call does not return a value.
lapic_idpub fn lapic_id(base u64) u32Lapic id.
base u64u32 — a value of this type
lapic_versionpub fn lapic_version(base u64) u32Lapic version.
base u64u32 — a value of this type
lapic_eoipub fn lapic_eoi(base u64)Lapic eoi.
base u64This call does not return a value.
lapic_enablepub fn lapic_enable(base u64, spurious_vec u8)Lapic enable.
base u64spurious_vec u8This call does not return a value.
lapic_icr_waitpub fn lapic_icr_wait(base u64)Lapic icr wait.
base u64This call does not return a value.
lapic_send_initpub fn lapic_send_init(base u64, dest_apic_id u8)Lapic send init.
base u64dest_apic_id u8This call does not return a value.
lapic_send_sipipub fn lapic_send_sipi(base u64, dest_apic_id u8, vector_page u8)Lapic send sipi.
base u64dest_apic_id u8vector_page u8This call does not return a value.
lapic_send_ipipub fn lapic_send_ipi(base u64, dest_apic_id u8, vector u8)Lapic send ipi.
base u64dest_apic_id u8vector u8This call does not return a value.
lapic_timer_initpub fn lapic_timer_init(base u64, vector u8, div_val u32, init_count u32, periodic bool)Lapic timer init.
base u64vector u8div_val u32init_count u32periodic boolThis call does not return a value.
ioapic_readpub fn ioapic_read(base u64, reg u32) u32Ioapic read.
base u64reg u32u32 — a value of this type
ioapic_writepub fn ioapic_write(base u64, reg u32, val u32)Ioapic write.
base u64reg u32val u32This call does not return a value.
ioapic_versionpub fn ioapic_version(base u64) u32Ioapic version.
base u64u32 — a value of this type
ioapic_max_redirpub fn ioapic_max_redir(base u64) u32Ioapic max redir.
base u64u32 — a value of this type
ioapic_set_irqpub fn ioapic_set_irq(base u64, irq u8, vector u8, dest_apic_id u8, flags u32)Ioapic set irq.
base u64irq u8vector u8dest_apic_id u8flags u32This call does not return a value.
gicv2_init_distpub fn gicv2_init_dist(gicd_base u64)Gicv2 init dist.
gicd_base u64This call does not return a value.
gicv2_init_cpupub fn gicv2_init_cpu(gicc_base u64)Gicv2 init cpu.
gicc_base u64This call does not return a value.
gicv2_enable_irqpub fn gicv2_enable_irq(gicd_base u64, irq u32, cpu_mask u8)Gicv2 enable irq.
gicd_base u64irq u32cpu_mask u8This call does not return a value.
gicv2_ackpub fn gicv2_ack(gicc_base u64) u32Gicv2 ack.
gicc_base u64u32 — a value of this type
gicv2_eoipub fn gicv2_eoi(gicc_base u64, iar u32)Gicv2 eoi.
gicc_base u64iar u32This call does not return a value.
plic_set_prioritypub fn plic_set_priority(plic_base u64, irq u32, prio u32)RISC-V PLIC & CLINT MMIO helpers (QEMU virt layout)
plic_base u64irq u32prio u32This call does not return a value.
plic_enable_irqpub fn plic_enable_irq(plic_base u64, context u32, irq u32)Plic enable irq.
plic_base u64context u32irq u32This call does not return a value.
plic_set_thresholdpub fn plic_set_threshold(plic_base u64, context u32, thresh u32)Plic set threshold.
plic_base u64context u32thresh u32This call does not return a value.
plic_claimpub fn plic_claim(plic_base u64, context u32) u32Plic claim.
plic_base u64context u32u32 — a value of this type
plic_completepub fn plic_complete(plic_base u64, context u32, irq u32)Plic complete.
plic_base u64context u32irq u32This call does not return a value.
clint_mtimepub fn clint_mtime(clint_base u64) u64Clint mtime.
clint_base u64u64 — a value of this type
clint_set_mtimecmppub fn clint_set_mtimecmp(clint_base u64, hart u32, val u64)Clint set mtimecmp.
clint_base u64hart u32val u64This call does not return a value.
hpet_period_fspub fn hpet_period_fs(base u64) u64Hpet period fs.
base u64u64 — a value of this type
hpet_enablepub fn hpet_enable(base u64)Hpet enable.
base u64This call does not return a value.
hpet_counterpub fn hpet_counter(base u64) u64Hpet counter.
base u64u64 — a value of this type
hpet_ticks_to_nspub fn hpet_ticks_to_ns(ticks u64, period_fs u64) u64Hpet ticks to ns.
ticks u64period_fs u64u64 — a value of this type
struct SmpBootDescpub struct SmpBootDesc {
pub stack_top u64
pub entry_fn u64
pub arg u64
}Structure encapsulating stack_top, entry_fn, arg.
stack_top u64entry_fn u64arg u64psci_versionpub fn psci_version() u32Psci version.
No arguments are required.
u32 — a value of this type
psci_cpu_onpub fn psci_cpu_on(target_mpidr u64, entry_addr u64, ctx_id u64) u64Psci cpu on.
target_mpidr u64entry_addr u64ctx_id u64u64 — a value of this type
psci_cpu_on_descpub fn psci_cpu_on_desc(target_mpidr u64, desc *raw SmpBootDesc) u64Psci cpu on desc.
target_mpidr u64desc *raw SmpBootDescu64 — a value of this type
psci_system_offpub fn psci_system_off()Psci system off.
No arguments are required.
This call does not return a value.
psci_system_resetpub fn psci_system_reset()Psci system reset.
No arguments are required.
This call does not return a value.
sbi_spec_versionpub fn sbi_spec_version() i64Sbi spec version.
No arguments are required.
i64 — a value of this type
sbi_set_timerpub fn sbi_set_timer(stime u64) i64Sbi set timer.
stime u64i64 — a value of this type
sbi_send_ipipub fn sbi_send_ipi(hart_mask u64, hart_mask_base u64) i64Sbi send ipi.
hart_mask u64hart_mask_base u64i64 — a value of this type
sbi_hart_startpub fn sbi_hart_start(hartid u64, start_addr u64, opaque u64) i64Sbi hart start.
hartid u64start_addr u64opaque u64i64 — a value of this type
sbi_hart_get_statuspub fn sbi_hart_get_status(hartid u64) i64Sbi hart get status.
hartid u64i64 — a value of this type
sbi_hart_start_descpub fn sbi_hart_start_desc(hartid u64, desc *raw SmpBootDesc) i64Sbi hart start desc.
hartid u64desc *raw SmpBootDesci64 — a value of this type
sbi_shutdownpub fn sbi_shutdown()Sbi shutdown.
No arguments are required.
This call does not return a value.
x2apic_enablepub fn x2apic_enable()X2apic enable.
No arguments are required.
This call does not return a value.
x2apic_idpub fn x2apic_id() u32X2apic id.
No arguments are required.
u32 — a value of this type
x2apic_eoipub fn x2apic_eoi()X2apic eoi.
No arguments are required.
This call does not return a value.
x2apic_send_ipipub fn x2apic_send_ipi(dest_id u32, vector u8)X2apic send ipi.
dest_id u32vector u8This call does not return a value.
tsc_calibrate_khzpub fn tsc_calibrate_khz(hpet_base u64) u64Tsc calibrate khz.
hpet_base u64u64 — a value of this type
enable_cr0_wppub fn enable_cr0_wp()Enable cr0 wp.
No arguments are required.
This call does not return a value.
enable_cr4_smeppub fn enable_cr4_smep()Enable cr4 smep.
No arguments are required.
This call does not return a value.
enable_cr4_smappub fn enable_cr4_smap()Enable cr4 smap.
No arguments are required.
This call does not return a value.
enable_efer_nxepub fn enable_efer_nxe()Enable efer nxe.
No arguments are required.
This call does not return a value.
gicv3_init_cpupub fn gicv3_init_cpu()Gicv3 init cpu.
No arguments are required.
This call does not return a value.
gicv3_config_sgi_ppipub fn gicv3_config_sgi_ppi(gicr_sgi_base u64, intid u32, prio u8)Gicv3 config sgi ppi.
gicr_sgi_base u64intid u32prio u8This call does not return a value.
gicv3_ackpub fn gicv3_ack() u32Gicv3 ack.
No arguments are required.
u32 — a value of this type
gicv3_eoipub fn gicv3_eoi(iar u32)Gicv3 eoi.
iar u32This call does not return a value.
gicv3_init_distpub fn gicv3_init_dist(gicd_base u64)Gicv3 init dist.
gicd_base u64This call does not return a value.
gicv3_wake_redistpub fn gicv3_wake_redist(gicr_rd_base u64) boolGicv3 wake redist.
gicr_rd_base u64bool — true or false
gicv3_enable_sgi_ppipub fn gicv3_enable_sgi_ppi(gicr_sgi_base u64, intid u32)Gicv3 enable sgi ppi.
gicr_sgi_base u64intid u32This call does not return a value.
gicv3_enable_spipub fn gicv3_enable_spi(gicd_base u64, irq u32)Gicv3 enable spi.
gicd_base u64irq u32This call does not return a value.
arm64_timer_enablepub fn arm64_timer_enable()ARM64 Generic Physical Timer (CNTP) and VBAR_EL1 IRQ vector helpers
No arguments are required.
This call does not return a value.
arm64_timer_disablepub fn arm64_timer_disable()Arm64 timer disable.
No arguments are required.
This call does not return a value.
struct Arm64TrapDispatchpub struct Arm64TrapDispatch {
pub handler u64
pub user_data u64
}Structure encapsulating handler, user_data.
handler u64user_data u64struct Rv64TrapDispatchpub struct Rv64TrapDispatch {
pub kernel_sp u64
pub handler u64
pub scratch_t0 u64
pub user_data u64
}Structure encapsulating kernel_sp, handler, scratch_t0, user_data.
kernel_sp u64handler u64scratch_t0 u64user_data u64arm64_trap_entry_addrpub fn arm64_trap_entry_addr() u64Arm64 trap entry address.
No arguments are required.
u64 — a value of this type
rv64_trap_entry_addrpub fn rv64_trap_entry_addr() u64Rv64 trap entry address.
No arguments are required.
u64 — a value of this type
arm64_vbar_install_irqpub fn arm64_vbar_install_irq(vbar_buf *raw u8, irq_handler u64) boolArm64 vbar install irq.
vbar_buf *raw u8irq_handler u64bool — true or false
arm64_vbar_install_fullpub fn arm64_vbar_install_full(vbar_buf *raw u8, sync_entry u64, irq_entry u64) boolInstall full EL1 exception vector table routing Synchronous (0x000/0x200/0x400) and IRQ (0x080/0x280/0x480) vectors to sync_entry and irq_entry respectively.
vbar_buf *raw u8sync_entry u64irq_entry u64bool — true or false
rv64_enable_s_timer_irqpub fn rv64_enable_s_timer_irq()Rv64 enable s timer irq.
No arguments are required.
This call does not return a value.
rv64_disable_s_timer_irqpub fn rv64_disable_s_timer_irq()Rv64 disable s timer irq.
No arguments are required.
This call does not return a value.