x86/registers/
ring.rs

1// Licensed under the Apache License, Version 2.0 or the MIT License.
2// SPDX-License-Identifier: Apache-2.0 OR MIT
3// Copyright Tock Contributors 2025.
4
5// This is inspired and adapted for Tock from the [x86](https://github.com/gz/rust-x86) crate.
6
7/// x86 Protection levels
8/// # Note
9/// This should not contain values larger than 2 bits, otherwise
10/// segment descriptor code needs to be adjusted accordingly.
11#[derive(Copy, Clone, Debug, Eq, PartialEq)]
12#[repr(u8)]
13pub enum Ring {
14    Ring0 = 0b00,
15    Ring1 = 0b01,
16    Ring2 = 0b10,
17    Ring3 = 0b11,
18}