|
5 | 5 | use crate::legacy_memory_region::{LegacyFrameAllocator, LegacyMemoryRegion};
|
6 | 6 | use bootloader_api::{
|
7 | 7 | config::Mapping,
|
8 |
| - info::{FrameBuffer, FrameBufferInfo, MemoryRegion, TlsTemplate}, |
| 8 | + info::{FrameBuffer, FrameBufferInfo, MemoryRegion, TlsTemplate, Optional}, |
9 | 9 | BootInfo, BootloaderConfig,
|
10 | 10 | };
|
11 | 11 | use bootloader_boot_config::{BootConfig, LevelFilter};
|
@@ -72,14 +72,18 @@ fn convert_level(level: LevelFilter) -> log::LevelFilter {
|
72 | 72 | }
|
73 | 73 |
|
74 | 74 | /// Required system information that should be queried from the BIOS or UEFI firmware.
|
75 |
| -#[derive(Debug, Copy, Clone)] |
| 75 | +#[derive(Debug)] |
76 | 76 | pub struct SystemInfo {
|
77 | 77 | /// Information about the (still unmapped) framebuffer.
|
78 | 78 | pub framebuffer: Option<RawFrameBufferInfo>,
|
79 | 79 | /// Address of the _Root System Description Pointer_ structure of the ACPI standard.
|
80 | 80 | pub rsdp_addr: Option<PhysAddr>,
|
81 | 81 | pub ramdisk_addr: Option<u64>,
|
82 | 82 | pub ramdisk_len: u64,
|
| 83 | + |
| 84 | + /// UEFI runtime table address (on a UEFI system) |
| 85 | + // #[cfg(target_os = "uefi")] |
| 86 | + pub rt_table_addr: Option<u64>, |
83 | 87 | }
|
84 | 88 |
|
85 | 89 | /// The physical address of the framebuffer and information about the framebuffer.
|
@@ -551,6 +555,11 @@ where
|
551 | 555 | info.kernel_len = mappings.kernel_slice_len as _;
|
552 | 556 | info.kernel_image_offset = mappings.kernel_image_offset.as_u64();
|
553 | 557 | info._test_sentinel = boot_config._test_sentinel;
|
| 558 | + info.rt_table_addr = if let Some(addr) = system_info.rt_table_addr { |
| 559 | + Optional::Some(addr) |
| 560 | + } else { |
| 561 | + Optional::None |
| 562 | + }; |
554 | 563 | info
|
555 | 564 | });
|
556 | 565 |
|
|
0 commit comments