Skip to content

stdlib/bitfieldView source ↗

bitfield

59 items · generated by scribe fromstdlib/bitfield.fd· synced 2026-11-15

stdlib/bitfield59 items

Contents

bit

pub fn bit(value: i64, pos: i64) -> i64 {

Parameters:

  • value: i64
  • pos: i64

Returns: i64

Defined at line 26


set_bit

pub fn set_bit(value: i64, pos: i64) -> i64 {

Parameters:

  • value: i64
  • pos: i64

Returns: i64

Defined at line 31


clear_bit

pub fn clear_bit(value: i64, pos: i64) -> i64 {

Parameters:

  • value: i64
  • pos: i64

Returns: i64

Defined at line 36


toggle_bit

pub fn toggle_bit(value: i64, pos: i64) -> i64 {

Parameters:

  • value: i64
  • pos: i64

Returns: i64

Defined at line 41


write_bit

pub fn write_bit(value: i64, pos: i64, bit_val: i64) -> i64 {

Parameters:

  • value: i64
  • pos: i64
  • bit_val: i64

Returns: i64

Defined at line 46


get

pub fn get(value: i64, offset: i64, width: i64) -> i64 {

Parameters:

  • value: i64
  • offset: i64
  • width: i64

Returns: i64

Defined at line 59


set

pub fn set(value: i64, offset: i64, width: i64, field_val: i64) -> i64 {

Parameters:

  • value: i64
  • offset: i64
  • width: i64
  • field_val: i64

Returns: i64

Defined at line 67


CR0_PE:

pub const CR0_PE: i64 = 0;  // Protection Enable

Defined at line 78


CR0_MP:

pub const CR0_MP: i64 = 1;  // Monitor coProcessor

Defined at line 79


CR0_EM:

pub const CR0_EM: i64 = 2;  // Emulation

Defined at line 80


CR0_TS:

pub const CR0_TS: i64 = 3;  // Task Switched

Defined at line 81


CR0_ET:

pub const CR0_ET: i64 = 4;  // Extension Type

Defined at line 82


CR0_NE:

pub const CR0_NE: i64 = 5;  // Numeric Error

Defined at line 83


CR0_WP:

pub const CR0_WP: i64 = 16;  // Write Protect

Defined at line 84


CR0_AM:

pub const CR0_AM: i64 = 18;  // Alignment Mask

Defined at line 85


CR0_NW:

pub const CR0_NW: i64 = 29;  // Not Write-through

Defined at line 86


CR0_CD:

pub const CR0_CD: i64 = 30;  // Cache Disable

Defined at line 87


CR0_PG:

pub const CR0_PG: i64 = 31;  // Paging Enable

Defined at line 88


CR4_VME:

pub const CR4_VME: i64 = 0;  // Virtual 8086 Mode Extensions

Defined at line 91


CR4_PVI:

pub const CR4_PVI: i64 = 1;  // Protected-Mode Virtual Interrupts

Defined at line 92


CR4_TSD:

pub const CR4_TSD: i64 = 2;  // Time Stamp Disable

Defined at line 93


CR4_DE:

pub const CR4_DE: i64 = 3;  // Debugging Extensions

Defined at line 94


CR4_PSE:

pub const CR4_PSE: i64 = 4;  // Page Size Extension

Defined at line 95


CR4_PAE:

pub const CR4_PAE: i64 = 5;  // Physical Address Extension

Defined at line 96


CR4_MCE:

pub const CR4_MCE: i64 = 6;  // Machine Check Enable

Defined at line 97


CR4_PGE:

pub const CR4_PGE: i64 = 7;  // Page Global Enable

Defined at line 98


CR4_PCE:

pub const CR4_PCE: i64 = 8;  // Performance Counter Enable

Defined at line 99


CR4_OSFXSR:

pub const CR4_OSFXSR: i64 = 9;  // OS FXSAVE/FXRSTOR Support

Defined at line 100


CR4_OSXMMEXCPT:

pub const CR4_OSXMMEXCPT: i64 = 10;  // OS XMM Exception Support

Defined at line 101


CR4_SMEP:

pub const CR4_SMEP: i64 = 20;  // Supervisor Mode Execution Prevention

Defined at line 102


CR4_SMAP:

pub const CR4_SMAP: i64 = 21;  // Supervisor Mode Access Prevention

Defined at line 103


EFER_SCE:

pub const EFER_SCE: i64 = 0;  // System Call Extensions

Defined at line 106


EFER_LME:

pub const EFER_LME: i64 = 8;  // Long Mode Enable

Defined at line 107


EFER_LMA:

pub const EFER_LMA: i64 = 10;  // Long Mode Active

Defined at line 108


EFER_NXE:

pub const EFER_NXE: i64 = 11;  // No-Execute Enable

Defined at line 109


EFER_SVME:

pub const EFER_SVME: i64 = 12;  // Secure Virtual Machine Enable

Defined at line 110


PTE_PRESENT:

pub const PTE_PRESENT: i64 = 0;  // Present bit

Defined at line 114


PTE_WRITABLE:

pub const PTE_WRITABLE: i64 = 1;  // Read/Write bit

Defined at line 115


PTE_USER:

pub const PTE_USER: i64 = 2;  // User/Supervisor bit

Defined at line 116


PTE_WRITE_THROUGH:

pub const PTE_WRITE_THROUGH: i64 = 3;  // Page-level Write-Through

Defined at line 117


PTE_CACHE_DISABLE:

pub const PTE_CACHE_DISABLE: i64 = 4;  // Page-level Cache Disable

Defined at line 118


PTE_ACCESSED:

pub const PTE_ACCESSED: i64 = 5;  // Accessed bit

Defined at line 119


PTE_DIRTY:

pub const PTE_DIRTY: i64 = 6;  // Dirty bit

Defined at line 120


PTE_HUGE:

pub const PTE_HUGE: i64 = 7;  // Huge page (PS bit)

Defined at line 121


PTE_GLOBAL:

pub const PTE_GLOBAL: i64 = 8;  // Global page

Defined at line 122


PTE_NX:

pub const PTE_NX: i64 = 63;  // No-Execute bit (in PAE mode)

Defined at line 123


GDT_PRESENT:

pub const GDT_PRESENT: i64 = 7;  // Present bit (bit 7 of access byte)

Defined at line 128


GDT_DPL:

pub const GDT_DPL: i64 = 5;  // Descriptor Privilege Level (bits 5-6)

Defined at line 129


GDT_S:

pub const GDT_S: i64 = 4;  // Descriptor type (1 = code/data)

Defined at line 130


GDT_EXECUTABLE:

pub const GDT_EXECUTABLE: i64 = 3;  // Executable (1 = code, 0 = data)

Defined at line 131


GDT_DC:

pub const GDT_DC: i64 = 2;  // Direction/Conforming

Defined at line 132


GDT_RW:

pub const GDT_RW: i64 = 1;  // Read/Write

Defined at line 133


GDT_ACCESSED:

pub const GDT_ACCESSED: i64 = 0;  // Accessed bit

Defined at line 134


GDT_GRANULARITY:

pub const GDT_GRANULARITY: i64 = 7;  // Granularity (1 = 4KB)

Defined at line 137


GDT_DB:

pub const GDT_DB: i64 = 6;  // Default operation size (1 = 32-bit)

Defined at line 138


GDT_L:

pub const GDT_L: i64 = 5;  // Long mode (1 = 64-bit)

Defined at line 139


GDT_AVL:

pub const GDT_AVL: i64 = 4;  // Available for use by system

Defined at line 140


IDT_TASK_GATE:

pub const IDT_TASK_GATE: i64 = 0x5; pub const IDT_INT_GATE_16: i64 = 0x6; pub const IDT_TRAP_GATE_16: i64 = 0x7; pub const IDT_INT_GATE_32: i64 = 0xE; pub const IDT_TRAP_GATE_32: i64 = 0xF;

Defined at line 145


IDT_PRESENT:

pub const IDT_PRESENT: i64 = 7;

Defined at line 147


Generated by scribe, the Fides documentation generator