Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pipeline {
}
stage('Run unit tests') {
steps {
sh "scripts/dev_cli.sh --local tests --unit"
sh "scripts/dev_cli.sh tests --unit"
}
}
}
Expand Down
4 changes: 0 additions & 4 deletions scripts/dev_cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,6 @@ ensure_latest_ctr() {

$DOCKER_RUNTIME pull --platform "$PLATFORM" "$CTR_IMAGE"

if [ $? -ne 0 ]; then
build_container
fi

ok_or_die "Error pulling container image. Aborting."
fi
}
Expand Down
15 changes: 11 additions & 4 deletions src/efi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ static mut CT: [efi::ConfigurationTable; MAX_CT_ENTRIES] = [efi::ConfigurationTa
vendor_table: null_mut(),
}; MAX_CT_ENTRIES];

// RHF string in UCS-2
const FIRMWARE_STRING: [u16; 4] = [0x0052, 0x0048, 0x0046, 0x0000];

static mut ST: efi::SystemTable = efi::SystemTable {
hdr: efi::TableHeader {
signature: efi::SYSTEM_TABLE_SIGNATURE,
Expand All @@ -173,7 +176,7 @@ static mut ST: efi::SystemTable = efi::SystemTable {
crc32: 0, // TODO
reserved: 0,
},
firmware_vendor: null_mut(), // TODO,
firmware_vendor: FIRMWARE_STRING.as_ptr() as *mut u16,
firmware_revision: 0,
console_in_handle: console::STDIN_HANDLE,
con_in: null_mut(),
Expand Down Expand Up @@ -880,9 +883,13 @@ pub extern "efiapi" fn calculate_crc32(_: *mut c_void, _: usize, _: *mut u32) ->
Status::UNSUPPORTED
}

pub extern "efiapi" fn copy_mem(_: *mut c_void, _: *mut c_void, _: usize) {}
pub extern "efiapi" fn copy_mem(dst: *mut c_void, src: *mut c_void, count: usize) {
unsafe { core::ptr::copy(src as *const u8, dst as *mut u8, count) }
}

pub extern "efiapi" fn set_mem(_: *mut c_void, _: usize, _: u8) {}
pub extern "efiapi" fn set_mem(dst: *mut c_void, count: usize, val: u8) {
unsafe { core::ptr::write_bytes(dst as *mut u8, val, count) }
}

pub extern "efiapi" fn create_event_ex(
_: u32,
Expand Down Expand Up @@ -917,7 +924,7 @@ fn extract_path(device_path: &DevicePathProtocol, path: &mut [u8]) {
}

const PAGE_SIZE: u64 = 4096;
const HEAP_SIZE: usize = 256 * 1024 * 1024;
const HEAP_SIZE: usize = 2 << 20; /* 2MiB */

// Populate allocator from E820, fixed ranges for the firmware and the loaded binary.
fn populate_allocator(info: &dyn bootinfo::Info, image_address: u64, image_size: u64) {
Expand Down