/// Reload all segment selectors (typically this has to be done
/// after a new GDT is installed).
///
/// # Safety
/// Potential to crash the system if the GDT is malformed.
Reload all segment selectors (typically this has to be done
after a new GDT is installed).
Reload all segment selectors ( typically this has to be done after a new GDT is installed ) .
unsafe fn reload_segment_selectors() {
        load_ds(SegmentSelector::new(0, Ring::Ring0));
        load_es(SegmentSelector::new(0, Ring::Ring0));
        load_fs(SegmentSelector::new(0, Ring::Ring0));
        load_gs(SegmentSelector::new(0, Ring::Ring0));
        load_cs(GdtTable::kernel_cs_selector());
        load_ss(GdtTable::kernel_ss_selector());
        load_tr(GdtTable::tss_selector());
        trace!("Re-loaded segment selectors.");
    }
unsafe fn reload_segment_selectors ( ) { load_ds ( SegmentSelector :: new ( 0 , Ring :: Ring0 ) ) ; load_es ( SegmentSelector :: new ( 0 , Ring :: Ring0 ) ) ; load_fs ( SegmentSelector :: new ( 0 , Ring :: Ring0 ) ) ; load_gs ( SegmentSelector :: new ( 0 , Ring :: Ring0 ) ) ; load_cs ( GdtTable :: kernel_cs_selector ( ) ) ; load_ss ( GdtTable :: kernel_ss_selector ( ) ) ; load_tr ( GdtTable :: tss_selector ( ) ) ; trace ! ( " " ) ; }
Reload all segment selectors (typically this has to be done
after a new GDT is installed).
Reload all segment selectors ( typically this has to be done after a new GDT is installed ) .
safety
Potential to crash the system if the GDT is malformed.
Potential to crash the system if the GDT is malformed .