/// Sets-up a default GDT table conform to the format expecte by x86-64 bit mode.
Sets-up a default GDT table conform to the format expecte by x86-64 bit mode.
Sets - up a default GDT table conform to the format expecte by x86 - 64 bit mode .
fn default() -> Self {
        GdtTable {
            null: Descriptor::NULL,
            code_kernel: DescriptorBuilder::code_descriptor(0, 0, CodeSegmentType::ExecuteRead)
                .present()
                .dpl(Ring::Ring0)
                .limit_granularity_4kb()
                .l()
                .finish(),
            stack_kernel: DescriptorBuilder::data_descriptor(0, 0, DataSegmentType::ReadWrite)
                .present()
                .dpl(Ring::Ring0)
                .limit_granularity_4kb()
                .finish(),
            code_user: DescriptorBuilder::code_descriptor(0, 0, CodeSegmentType::ExecuteRead)
                .present()
                .limit_granularity_4kb()
                .l()
                .dpl(Ring::Ring3)
                .finish(),
            stack_user: DescriptorBuilder::data_descriptor(0, 0, DataSegmentType::ReadWrite)
                .present()
                .limit_granularity_4kb()
                .dpl(Ring::Ring3)
                .finish(),
            tss_segment: Descriptor64::NULL,
        }
    }
fn default ( ) -> Self { GdtTable { null : Descriptor :: NULL , code_kernel : DescriptorBuilder :: code_descriptor ( 0 , 0 , CodeSegmentType :: ExecuteRead ) . present ( ) . dpl ( Ring :: Ring0 ) . limit_granularity_4kb ( ) . l ( ) . finish ( ) , stack_kernel : DescriptorBuilder :: data_descriptor ( 0 , 0 , DataSegmentType :: ReadWrite ) . present ( ) . dpl ( Ring :: Ring0 ) . limit_granularity_4kb ( ) . finish ( ) , code_user : DescriptorBuilder :: code_descriptor ( 0 , 0 , CodeSegmentType :: ExecuteRead ) . present ( ) . limit_granularity_4kb ( ) . l ( ) . dpl ( Ring :: Ring3 ) . finish ( ) , stack_user : DescriptorBuilder :: data_descriptor ( 0 , 0 , DataSegmentType :: ReadWrite ) . present ( ) . limit_granularity_4kb ( ) . dpl ( Ring :: Ring3 ) . finish ( ) , tss_segment : Descriptor64 :: NULL , } }
Sets-up a default GDT table conform to the format expecte by x86-64 bit mode.
Sets - up a default GDT table conform to the format expecte by x86 - 64 bit mode .