()
| 116 | } |
| 117 | |
| 118 | pub fn init() { |
| 119 | use x86_64::instructions::segmentation::{Segment, CS, DS}; |
| 120 | use x86_64::instructions::tables::load_tss; |
| 121 | |
| 122 | GDT.0.load(); |
| 123 | unsafe { |
| 124 | CS::set_reg(GDT.1.code_selector); |
| 125 | DS::set_reg(GDT.1.data_selector); |
| 126 | load_tss(GDT.1.tss_selector); |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | pub fn get_kernel_segments() -> (SegmentSelector, SegmentSelector) { |
| 131 | (GDT.1.code_selector, GDT.1.data_selector) |
nothing calls this directly
no outgoing calls
no test coverage detected