Crate polished_x86_commands

Crate polished_x86_commands 

Source
Expand description

§x86_commands: Architecture-Specific Low-Level x86_64 Operations

This crate provides direct access to low-level x86/x86_64 hardware commands, intended for use in OS kernels, bootloaders, or other bare-metal environments. All functions are highly architecture-specific and use inline assembly to interact with hardware directly. These commands are not portable and will only work on x86-family CPUs.

§Architecture-Specific Notes

  • All functions in this crate assume an x86 or x86_64 environment. They use I/O port instructions (in, out) and other CPU-specific features that are not available on other architectures (such as ARM, RISC-V, etc).
  • Attempting to use these functions on non-x86 hardware will result in a compile-time or runtime error.
  • These routines are typically only safe to use in kernel or bootloader code, not in userspace or general application code.

§Example Usage

use polished_x86_commands::disable_pic;
disable_pic();

This will mask all interrupts from the legacy Programmable Interrupt Controller (PIC), which is a common step in modern x86_64 kernels that use the APIC instead.

Functions§

disable_pic
Disables the legacy Programmable Interrupt Controller (PIC) on x86/x86_64 systems.