uefi stuff
This commit is contained in:
parent
6d74772961
commit
fde952a383
21
ableos/Cargo.lock
generated
21
ableos/Cargo.lock
generated
|
@ -53,6 +53,7 @@ dependencies = [
|
|||
"vga",
|
||||
"volatile 0.2.7",
|
||||
"wasmi",
|
||||
"x86",
|
||||
"x86_64",
|
||||
"y-compositor-protocol",
|
||||
]
|
||||
|
@ -419,6 +420,15 @@ version = "0.6.3"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
|
||||
|
||||
[[package]]
|
||||
name = "raw-cpuid"
|
||||
version = "10.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "929f54e29691d4e6a9cc558479de70db7aa3d98cd6fe7ab86d7507aa2886b9d2"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rdrand"
|
||||
version = "0.8.1"
|
||||
|
@ -739,6 +749,17 @@ dependencies = [
|
|||
"parity-wasm",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "x86"
|
||||
version = "0.46.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6297379090b1be212a2d59dd57708c99b42b4bcbeee2ce6fb80babbe7b63e89a"
|
||||
dependencies = [
|
||||
"bit_field",
|
||||
"bitflags",
|
||||
"raw-cpuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "x86_64"
|
||||
version = "0.14.7"
|
||||
|
|
|
@ -50,6 +50,7 @@ log = "*"
|
|||
pretty-hex = "0.2.1"
|
||||
unicode-width = "0.1.7"
|
||||
picorand = "*"
|
||||
x86 = "*"
|
||||
# watson = "0.4"
|
||||
|
||||
[dependencies.rdrand]
|
||||
|
|
|
@ -73,6 +73,16 @@ fn main(_handle: Handle, mut system_table: SystemTable<Boot>) -> Status {
|
|||
warn!("UEFI Graphics Output Protocol is not supported");
|
||||
}
|
||||
|
||||
use uefi::proto::pi::mp::MpServices;
|
||||
if let Ok(mp) = system_table.boot_services().locate_protocol::<MpServices>() {
|
||||
let mp = mp.expect("Warnings encountered while opening GOP");
|
||||
let mp = unsafe { &mut *mp.get() };
|
||||
|
||||
info!("Found MP Services");
|
||||
// info!("{:?}", mp.get_number_of_processors().unwrap_success());
|
||||
// info!("{:?}", mp.get_processor_info(0).unwrap_success());
|
||||
}
|
||||
|
||||
// */
|
||||
// exit boot services
|
||||
kernel_main();
|
||||
|
@ -166,3 +176,5 @@ pub fn file_system() -> Result<SimpleFileSystem, Status> {
|
|||
|
||||
|
||||
*/
|
||||
|
||||
pub fn mp_handle() {}
|
||||
|
|
|
@ -51,7 +51,9 @@ pub fn kernel_main() -> ! {
|
|||
vterm0.set_cursor_position(60, 40);
|
||||
vterm0.characters[0][0].character = 'a';
|
||||
|
||||
// start_facepalm();
|
||||
//
|
||||
|
||||
start_facepalm();
|
||||
sloop()
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,10 @@ fn main() -> anyhow::Result<()> {
|
|||
MachineType::Uefi86 => {
|
||||
xshell::cmd!("cargo build --release --target=x86_64-unknown-uefi").run()?;
|
||||
|
||||
xshell::cmd!("uefi-run -b src/arch/uefi_86/firmware/OVMF-pure-efi.fd target/x86_64-unknown-uefi/release/ableos.efi").run()?;
|
||||
xshell::cmd!(
|
||||
"uefi-run -b src/arch/uefi_86/firmware/OVMF-pure-efi.fd target/x86_64-unknown-uefi/release/ableos.efi"
|
||||
)
|
||||
.run()?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue