Skip to content

Commit 41833a6

Browse files
authored
Merge pull request #211 from abachmann/deprecated_segmentation
use set_reg method of CS, DS, ES and SS segment structs
2 parents e8dc356 + b2266f3 commit 41833a6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/binary/gdt.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use x86_64::{
2-
instructions::segmentation,
2+
instructions::segmentation::{Segment, CS, DS, ES, SS},
33
structures::{
44
gdt::{Descriptor, GlobalDescriptorTable},
55
paging::PhysFrame,
@@ -24,9 +24,9 @@ pub fn create_and_load(frame: PhysFrame) {
2424

2525
gdt.load();
2626
unsafe {
27-
segmentation::set_cs(code_selector);
28-
segmentation::load_ds(data_selector);
29-
segmentation::load_es(data_selector);
30-
segmentation::load_ss(data_selector);
27+
CS::set_reg(code_selector);
28+
DS::set_reg(data_selector);
29+
ES::set_reg(data_selector);
30+
SS::set_reg(data_selector);
3131
}
3232
}

0 commit comments

Comments
 (0)