Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
fruhland committed Oct 11, 2024
1 parent b982a60 commit d64e1d6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 14 deletions.
36 changes: 24 additions & 12 deletions towboot/src/boot/config_tables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use alloc::collections::BTreeSet;
use alloc::slice;
use alloc::vec::Vec;

use log::{debug, warn};
use log::{debug, info, warn};
use multiboot12::information::InfoBuilder;
use acpi::rsdp::Rsdp;
use smbioslib::{SMBiosEntryPoint32, SMBiosEntryPoint64};
Expand Down Expand Up @@ -39,17 +39,29 @@ pub(super) fn parse_for_multiboot(info_builder: &mut InfoBuilder) {

handled_guids.insert(table.guid);
match table.guid {
ACPI_GUID => handle_acpi(&table, info_builder),
ACPI2_GUID => handle_acpi(&table, info_builder),
DEBUG_IMAGE_INFO_GUID => debug!("ignoring image debug info"),
DXE_SERVICES_GUID => debug!("ignoring dxe services table"),
HAND_OFF_BLOCK_LIST_GUID => debug!("ignoring hand-off block list"),
LZMA_COMPRESS_GUID => debug!("ignoring lzma filesystem"),
MEMORY_STATUS_CODE_RECORD_GUID => debug!("ignoring early memory info"),
MEMORY_TYPE_INFORMATION_GUID => debug!("ignoring early memory info"),
SMBIOS_GUID => handle_smbios(&table, info_builder),
SMBIOS3_GUID => handle_smbios(&table, info_builder),
guid => debug!("ignoring table {guid}"),
ACPI_GUID => {
info!("ACPI {}", table.guid);
handle_acpi(&table, info_builder)
},
ACPI2_GUID => {
info!("ACPIv2 {}", table.guid);
handle_acpi(&table, info_builder)
},
DEBUG_IMAGE_INFO_GUID => info!("ignoring image debug info {}", table.guid),
DXE_SERVICES_GUID => info!("ignoring dxe services table {}", table.guid),
HAND_OFF_BLOCK_LIST_GUID => info!("ignoring hand-off block list {}", table.guid),
LZMA_COMPRESS_GUID => info!("ignoring lzma filesystem {}", table.guid),
MEMORY_STATUS_CODE_RECORD_GUID => info!("ignoring early memory info {}", table.guid),
MEMORY_TYPE_INFORMATION_GUID => info!("ignoring early memory info {}", table.guid),
SMBIOS_GUID => {
info!("SMBIOS {}", table.guid);
handle_smbios(&table, info_builder)
},
SMBIOS3_GUID => {
info!("SMBIOSv3 {}", table.guid);
handle_smbios(&table, info_builder)
},
guid => info!("ignoring table {guid}"),
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions towboot/src/boot/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,13 +434,15 @@ impl EntryPoint {
/// Jump to the loaded kernel.
/// This requires everything else to be ready and won't return.
fn jump(self, signature: u32, info: Vec<u8>) -> ! {

Check warning on line 436 in towboot/src/boot/mod.rs

View workflow job for this annotation

GitHub Actions / test

unused variable: `signature`

Check warning on line 436 in towboot/src/boot/mod.rs

View workflow job for this annotation

GitHub Actions / test

unused variable: `info`
if let Self::Uefi(entry_address) = self {
loop {}

/*if let Self::Uefi(entry_address) = self {
self.jump_uefi(entry_address, signature, info)
} else if let Self::Multiboot(entry_address) = self {
self.jump_multiboot(entry_address, signature, info)
} else {
panic!("invalid entry point")
}
}*/
}

/// Jump to the loaded kernel, UEFI-style, eg. just passing the information.
Expand Down

0 comments on commit d64e1d6

Please sign in to comment.