pub const fn pack_selector(index: u16, table: DTType, rpl: Privilege) -> Selector {
    let mut res = 0;
    res = mask_assign(res as u64, rpl as u64, 0, 0, 2) as u16;
    res = mask_assign(res as u64, table as u64, 2, 0, 1) as u16;
    res = mask_assign(res as u64, index as u64, 3, 0, 13) as u16;
    res
}
/// Pack attributes of a selector into the hardcoded selector.
/// Note that **index is the entry index in 8-byte array**.
/// RPL here is is used for overriding CPL to prevent an privileged application from 
/// requesing restricted resource on behalf a lower privileged application.
/// When requestion resource with a selector, we always compare MAX(CPL, RPL) with
/// DPL to decide whether to grant access.
/// For more information, see *Intel Developer Manual Vol. 3A 3-7 3.4.2 Segment Selectors*
Pack attributes of a selector into the hardcoded selector.
Note that **index is the entry index in 8-byte array**.
RPL here is is used for overriding CPL to prevent an privileged application from
requesing restricted resource on behalf a lower privileged application.
When requestion resource with a selector, we always compare MAX(CPL, RPL) with
DPL to decide whether to grant access.
For more information, see *Intel Developer Manual Vol. 3A 3-7 3.4.2 Segment Selectors
Pack attributes of a selector into the hardcoded selector . Note that ** index is the entry index in 8 - byte array ** . RPL here is is used for overriding CPL to prevent an privileged application from requesing restricted resource on behalf a lower privileged application . When requestion resource with a selector we always compare MAX ( CPL RPL ) with DPL to decide whether to grant access . For more information see * Intel Developer Manual Vol . 3A 3 - 7 3 . 4 . 2 Segment Selectors
pub const fn pack_selector(index: u16, table: DTType, rpl: Privilege) -> Selector {
    let mut res = 0;
    res = mask_assign(res as u64, rpl as u64, 0, 0, 2) as u16;
    res = mask_assign(res as u64, table as u64, 2, 0, 1) as u16;
    res = mask_assign(res as u64, index as u64, 3, 0, 13) as u16;
    res
}
pub const fn pack_selector ( index : u16 , table : DTType , rpl : Privilege ) -> Selector { let mut res = 0 ; res = mask_assign ( res as u64 , rpl as u64 , 0 , 0 , 2 ) as u16 ; res = mask_assign ( res as u64 , table as u64 , 2 , 0 , 1 ) as u16 ; res = mask_assign ( res as u64 , index as u64 , 3 , 0 , 13 ) as u16 ; res }
Pack attributes of a selector into the hardcoded selector.
Pack attributes of a selector into the hardcoded selector .
index
u16
table
DTType
rpl
Privilege