|
| 1 | +/* |
| 2 | +Copyright 2025 The Hyperlight Authors. |
| 3 | +
|
| 4 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +you may not use this file except in compliance with the License. |
| 6 | +You may obtain a copy of the License at |
| 7 | +
|
| 8 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +
|
| 10 | +Unless required by applicable law or agreed to in writing, software |
| 11 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +See the License for the specific language governing permissions and |
| 14 | +limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +// This file is just dummy definitions at the moment, in order to |
| 18 | +// allow compiling the guest for real mode boot scenarios. |
| 19 | + |
| 20 | +use crate::vmem::{BasicMapping, Mapping, TableOps}; |
| 21 | + |
| 22 | +pub const PAGE_SIZE: usize = 4096; |
| 23 | +pub const PAGE_TABLE_SIZE: usize = 4096; |
| 24 | +pub type PageTableEntry = u32; |
| 25 | +pub type VirtAddr = u32; |
| 26 | +pub type PhysAddr = u32; |
| 27 | + |
| 28 | +#[allow(clippy::missing_safety_doc)] |
| 29 | +pub unsafe fn map<Op: TableOps>(_op: &Op, _mapping: Mapping) { |
| 30 | + panic!("vmem::map: i686 guests do not support booting the full hyperlight guest kernel"); |
| 31 | +} |
| 32 | + |
| 33 | +#[allow(clippy::missing_safety_doc)] |
| 34 | +pub unsafe fn virt_to_phys<Op: TableOps>(_op: &Op, _address: u64) -> Option<(u64, BasicMapping)> { |
| 35 | + panic!( |
| 36 | + "vmem::virt_to_phys: i686 guests do not support booting the full hyperlight guest kernel" |
| 37 | + ); |
| 38 | +} |
0 commit comments