Update dependencies
This commit is contained in:
parent
8441821993
commit
01c8fc37cd
11 changed files with 50 additions and 44 deletions
4
build.sh
4
build.sh
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
rm -rf img
|
||||
mkdir -p img/boot/efi/boot
|
||||
cd lib/acpica-build && make -j4 && cd ../..
|
||||
|
|
28
kernel/Cargo.lock
generated
28
kernel/Cargo.lock
generated
|
@ -19,9 +19,9 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
|
|||
|
||||
[[package]]
|
||||
name = "bindgen"
|
||||
version = "0.70.0"
|
||||
version = "0.70.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e0127a1da21afb5adaae26910922c3f7afd3d329ba1a1b98a0884cab4907a251"
|
||||
checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cexpr",
|
||||
|
@ -39,9 +39,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "bitfield"
|
||||
version = "0.16.1"
|
||||
version = "0.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d5acf59e2452f0c4b968b15ce4b9468f57b45f7733b919d68b19fcc39264bfb8"
|
||||
checksum = "f798d2d157e547aa99aab0967df39edd0b70307312b6f8bd2848e6abe40896e0"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
|
@ -136,9 +136,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.156"
|
||||
version = "0.2.158"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a5f43f184355eefb8d17fc948dbecf6c13be3c141f20d834ae842193a448c72a"
|
||||
checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
|
@ -199,9 +199,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "prettyplease"
|
||||
version = "0.2.20"
|
||||
version = "0.2.22"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e"
|
||||
checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"syn",
|
||||
|
@ -218,9 +218,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.36"
|
||||
version = "1.0.37"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
|
||||
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
@ -298,9 +298,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.74"
|
||||
version = "2.0.77"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7"
|
||||
checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -315,9 +315,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
|
|||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.12"
|
||||
version = "1.0.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
|
||||
checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
|
|
|
@ -11,4 +11,4 @@ log = "0.4.22"
|
|||
spin = "0.9.8"
|
||||
|
||||
[build-dependencies]
|
||||
bindgen = "0.70.0"
|
||||
bindgen = "0.70.1"
|
||||
|
|
4
lib/kernel-common/Cargo.lock
generated
4
lib/kernel-common/Cargo.lock
generated
|
@ -4,9 +4,9 @@ version = 3
|
|||
|
||||
[[package]]
|
||||
name = "bitfield"
|
||||
version = "0.16.1"
|
||||
version = "0.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d5acf59e2452f0c4b968b15ce4b9468f57b45f7733b919d68b19fcc39264bfb8"
|
||||
checksum = "f798d2d157e547aa99aab0967df39edd0b70307312b6f8bd2848e6abe40896e0"
|
||||
|
||||
[[package]]
|
||||
name = "kernel-common"
|
||||
|
|
|
@ -4,5 +4,5 @@ version = "0.0.1"
|
|||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
bitfield = "0.16.1"
|
||||
bitfield = "0.17.0"
|
||||
log = "0.4.22"
|
||||
|
|
30
loader/Cargo.lock
generated
30
loader/Cargo.lock
generated
|
@ -16,9 +16,9 @@ checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61"
|
|||
|
||||
[[package]]
|
||||
name = "bitfield"
|
||||
version = "0.16.1"
|
||||
version = "0.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d5acf59e2452f0c4b968b15ce4b9468f57b45f7733b919d68b19fcc39264bfb8"
|
||||
checksum = "f798d2d157e547aa99aab0967df39edd0b70307312b6f8bd2848e6abe40896e0"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
|
@ -94,9 +94,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.36"
|
||||
version = "1.0.37"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
|
||||
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
@ -123,9 +123,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.74"
|
||||
version = "2.0.77"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7"
|
||||
checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -143,9 +143,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "uefi"
|
||||
version = "0.30.0"
|
||||
version = "0.31.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c937815260747b061aaa63a0f721d350a5740b72f166c5a4180226aa6fa204b9"
|
||||
checksum = "920793ff1148ab68a07ab0b2b866870886cd1e5c0b1b94f451d66158d0ff1a77"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cfg-if",
|
||||
|
@ -159,20 +159,20 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "uefi-macros"
|
||||
version = "0.14.0"
|
||||
version = "0.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4f345e42323c05e41e29e409505f5f8e0df7b5743340215d60344dbd79b729f4"
|
||||
checksum = "b0732e421268a2d6d53c95c3c0f4496ccc5c08aa7381458c677153d5d77ce39e"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.74",
|
||||
"syn 2.0.77",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uefi-raw"
|
||||
version = "0.6.0"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "29a70d0f6b34cbeb4e5cd492b442bf9679a838fbb010551c4a3e3b9e25e316a8"
|
||||
checksum = "7e537b93f83150df09588ca6658e881b2784e8b5f9588f1c7b72a85b72ea71ce"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"ptr_meta",
|
||||
|
@ -187,6 +187,6 @@ checksum = "ab14ea9660d240e7865ce9d54ecdbd1cd9fa5802ae6f4512f093c7907e921533"
|
|||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.12"
|
||||
version = "1.0.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
|
||||
checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
|
||||
|
|
|
@ -8,4 +8,4 @@ elf = {version = "0.7.4", default-features = false}
|
|||
kernel-common = {path = "../lib/kernel-common"}
|
||||
log = "0.4.22"
|
||||
static-alloc = "0.2.5"
|
||||
uefi = "0.30.0"
|
||||
uefi = "0.31.0"
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
use kernel_common::loader_struct::{LoaderStruct, LoaderStructMemoryRegion, LOADER_STRUCT_MAGIC};
|
||||
use uefi::table::boot::{MemoryMap, MemoryType};
|
||||
use uefi::{
|
||||
mem::memory_map::{MemoryMap, MemoryMapOwned},
|
||||
table::boot::MemoryType,
|
||||
};
|
||||
|
||||
pub fn generate_loader_struct(memory_map: &MemoryMap, phys_start: u64, heap_start: u64, rsdp_address: u64) -> LoaderStruct {
|
||||
pub fn generate_loader_struct(memory_map: &MemoryMapOwned, phys_start: u64, heap_start: u64, rsdp_address: u64) -> LoaderStruct {
|
||||
let mut loader_struct = LoaderStruct {
|
||||
magic: LOADER_STRUCT_MAGIC,
|
||||
phys_kernel_start: phys_start,
|
||||
|
|
|
@ -36,10 +36,10 @@ static ALLOC: Bump<[u8; 8 * 1024 * 1024]> = Bump::uninit();
|
|||
const KERNEL: &[u8] = include_bytes!("../../kernel/target/x86_64-unknown-none/release/kernel");
|
||||
|
||||
#[entry]
|
||||
fn main(image_handle: Handle, mut system_table: SystemTable<Boot>) -> Status {
|
||||
fn main(image_handle: Handle, system_table: SystemTable<Boot>) -> Status {
|
||||
init_logger();
|
||||
info!("Starting bootloader...");
|
||||
uefi::helpers::init(&mut system_table).unwrap();
|
||||
uefi::helpers::init().unwrap();
|
||||
let (kernel_start, kernel_entry) = load_kernel(KERNEL, &system_table);
|
||||
let heap_start = system_table
|
||||
.boot_services()
|
||||
|
|
|
@ -2,7 +2,10 @@ use core::arch::asm;
|
|||
|
||||
use alloc::boxed::Box;
|
||||
use kernel_common::paging::{load_cr3, PageEntry, PageTable, KERNEL_HEAP_INITIAL_SIZE, KERNEL_HEAP_START};
|
||||
use uefi::table::boot::{MemoryMap, MemoryType};
|
||||
use uefi::{
|
||||
mem::memory_map::{MemoryMap, MemoryMapOwned},
|
||||
table::boot::MemoryType,
|
||||
};
|
||||
|
||||
fn get_table_entry(table: &mut PageTable, i: usize) -> &mut PageTable {
|
||||
if table.entries_virt[i].is_none() {
|
||||
|
@ -32,7 +35,7 @@ pub fn map(pml4: &mut PageTable, virt: u64, phys: u64, write: bool, exec: bool)
|
|||
table.entries_phys[table_i].set_execute_disable(!exec as u64);
|
||||
table.entries_phys[table_i].set_present(1);
|
||||
}
|
||||
pub fn setup_paging(memory_map: &MemoryMap, heap_start: u64) -> &mut PageTable {
|
||||
pub fn setup_paging(memory_map: &MemoryMapOwned, heap_start: u64) -> &mut PageTable {
|
||||
const NONE: Option<Box<PageTable>> = None;
|
||||
let pml4 = Box::leak(Box::new(PageTable {
|
||||
entries_phys: [PageEntry(0); 512],
|
||||
|
|
4
qemu.sh
4
qemu.sh
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# shellcheck disable=SC2068
|
||||
set -e
|
||||
set -euo pipefail
|
||||
./build.sh
|
||||
qemu-system-x86_64 -M q35 -accel kvm -cpu qemu64,+rdrand -m 256M -L /usr/share/OVMF -bios OVMF_CODE.fd -drive file=img/os.img,format=raw $@
|
||||
|
|
Loading…
Add table
Reference in a new issue