Skip to main content

arch_x86/
lib.rs

1// Copyright 2026 The Fuchsia Authors
2//
3// Use of this source code is governed by a MIT-style
4// license that can be found in the LICENSE file or at
5// https://opensource.org/licenses/MIT
6
7#![no_std]
8
9/// Architecture-specific saved normal mode state for x86_64.
10///
11/// Saves the normal mode `fs_base` and `gs_base` MSR values across restricted mode entry.
12#[repr(C)]
13#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
14pub struct ArchSavedNormalState {
15    pub normal_fs_base: u64,
16    pub normal_gs_base: u64,
17}
18
19const _: () = {
20    assert!(core::mem::size_of::<ArchSavedNormalState>() == 16);
21    assert!(core::mem::align_of::<ArchSavedNormalState>() == 8);
22};