From 90faeb6fa22be3c152e3f458adac48393c2f00b3 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 6 May 2020 22:16:34 +0800 Subject: [PATCH] use new core1 startup mechanism --- default.nix | 2 +- src/Cargo.lock | 10 +++++----- src/runtime/src/kernel.rs | 2 +- src/szl/src/main.rs | 8 +++----- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/default.nix b/default.nix index faf890e..a910560 100644 --- a/default.nix +++ b/default.nix @@ -15,7 +15,7 @@ in version = "0.1.0"; src = ./src; - cargoSha256 = "1b40w3ycc0hx6hahxgz935vv01q1lirbrn4cb4k0r3dmgzvsdk6l"; + cargoSha256 = "0pa5m7pwpiyd1agfgfhywd8dkm6pbjx76nca4dngpw77h893c5bc"; nativeBuildInputs = [ pkgs.gnumake diff --git a/src/Cargo.lock b/src/Cargo.lock index ecaef5a..6d631ce 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -153,7 +153,7 @@ dependencies = [ [[package]] name = "libasync" version = "0.0.0" -source = "git+https://git.m-labs.hk/M-Labs/zc706.git#ce844f1b026b15f77432de0e24942ff220add283" +source = "git+https://git.m-labs.hk/M-Labs/zc706.git#4e1f46b3e232609b7bc8d818f60ce07fa769d93b" dependencies = [ "embedded-hal", "libcortex_a9", @@ -165,7 +165,7 @@ dependencies = [ [[package]] name = "libboard_zynq" version = "0.0.0" -source = "git+https://git.m-labs.hk/M-Labs/zc706.git#ce844f1b026b15f77432de0e24942ff220add283" +source = "git+https://git.m-labs.hk/M-Labs/zc706.git#4e1f46b3e232609b7bc8d818f60ce07fa769d93b" dependencies = [ "bit_field", "embedded-hal", @@ -181,7 +181,7 @@ dependencies = [ [[package]] name = "libcortex_a9" version = "0.0.0" -source = "git+https://git.m-labs.hk/M-Labs/zc706.git#ce844f1b026b15f77432de0e24942ff220add283" +source = "git+https://git.m-labs.hk/M-Labs/zc706.git#4e1f46b3e232609b7bc8d818f60ce07fa769d93b" dependencies = [ "bit_field", "libregister", @@ -190,7 +190,7 @@ dependencies = [ [[package]] name = "libregister" version = "0.0.0" -source = "git+https://git.m-labs.hk/M-Labs/zc706.git#ce844f1b026b15f77432de0e24942ff220add283" +source = "git+https://git.m-labs.hk/M-Labs/zc706.git#4e1f46b3e232609b7bc8d818f60ce07fa769d93b" dependencies = [ "bit_field", "vcell", @@ -200,7 +200,7 @@ dependencies = [ [[package]] name = "libsupport_zynq" version = "0.0.0" -source = "git+https://git.m-labs.hk/M-Labs/zc706.git#ce844f1b026b15f77432de0e24942ff220add283" +source = "git+https://git.m-labs.hk/M-Labs/zc706.git#4e1f46b3e232609b7bc8d818f60ce07fa769d93b" dependencies = [ "compiler_builtins", "libboard_zynq", diff --git a/src/runtime/src/kernel.rs b/src/runtime/src/kernel.rs index 2d6b3e2..d031ef5 100644 --- a/src/runtime/src/kernel.rs +++ b/src/runtime/src/kernel.rs @@ -28,7 +28,7 @@ pub struct Control { impl Control { pub fn start() -> Self { - let core1 = Core1::start(); + let core1 = Core1::start(true); let (core0_tx, core1_rx) = sync_channel(4); let (core1_tx, core0_rx) = sync_channel(4); diff --git a/src/szl/src/main.rs b/src/szl/src/main.rs index 4f7f187..52e92c4 100644 --- a/src/szl/src/main.rs +++ b/src/szl/src/main.rs @@ -12,7 +12,7 @@ use libboard_zynq::{ logger, timer::GlobalTimer, }; -use libsupport_zynq::boot; +use libsupport_zynq as _; extern "C" { @@ -48,7 +48,7 @@ pub fn main_core0() { if result < 0 { error!("decompression failed"); } else { - boot::Core1::start(); + // Start core0 only, for compatibility with FSBL. info!("executing payload"); unsafe { (mem::transmute::<*mut u8, fn()>(ddr.ptr::()))(); @@ -60,7 +60,5 @@ pub fn main_core0() { #[no_mangle] pub fn main_core1() { - unsafe { - (mem::transmute::(0x00100000))(); - } + panic!("core1 started but should not have"); }