Updated rustc for fast memcpy #120
|
@ -20,7 +20,7 @@ let
|
|||
name = "firmware";
|
||||
|
||||
src = ./src;
|
||||
cargoSha256 = "0cvz5zvrr9mkh2r7wcadrrb3rlcyrv32r578g7hlqpy8ldvma8g5";
|
||||
cargoSha256 = "11qxy008hb5nsir1qrh42zp8idfmc33lvc4xq9gfgj88zw6qh3d3";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.gnumake
|
||||
|
|
|
@ -49,14 +49,14 @@ checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
|
|||
|
||||
[[package]]
|
||||
name = "compiler_builtins"
|
||||
version = "0.1.35"
|
||||
version = "0.1.39"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e3fcd8aba10d17504c87ef12d4f62ef404c6a4703d16682a9eb5543e6cf24455"
|
||||
checksum = "3748f82c7d366a0b4950257d19db685d4958d2fa27c6d164a3f069fec42b748b"
|
||||
|
||||
[[package]]
|
||||
name = "core_io"
|
||||
version = "0.1.20200410"
|
||||
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#966e43e14ed26e883a2de03d56cedde964283269"
|
||||
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#4aa252546f3559c9060ce731943372ad30d16eef"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
@ -186,7 +186,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "libasync"
|
||||
version = "0.0.0"
|
||||
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#966e43e14ed26e883a2de03d56cedde964283269"
|
||||
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#4aa252546f3559c9060ce731943372ad30d16eef"
|
||||
dependencies = [
|
||||
"embedded-hal",
|
||||
"libcortex_a9",
|
||||
|
@ -198,7 +198,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "libboard_zynq"
|
||||
version = "0.0.0"
|
||||
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#966e43e14ed26e883a2de03d56cedde964283269"
|
||||
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#4aa252546f3559c9060ce731943372ad30d16eef"
|
||||
dependencies = [
|
||||
"bit_field",
|
||||
"embedded-hal",
|
||||
|
@ -223,7 +223,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "libconfig"
|
||||
version = "0.1.0"
|
||||
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#966e43e14ed26e883a2de03d56cedde964283269"
|
||||
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#4aa252546f3559c9060ce731943372ad30d16eef"
|
||||
dependencies = [
|
||||
"core_io",
|
||||
"fatfs",
|
||||
|
@ -234,7 +234,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "libcortex_a9"
|
||||
version = "0.0.0"
|
||||
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#966e43e14ed26e883a2de03d56cedde964283269"
|
||||
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#4aa252546f3559c9060ce731943372ad30d16eef"
|
||||
dependencies = [
|
||||
"bit_field",
|
||||
"libregister",
|
||||
|
@ -250,7 +250,7 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a"
|
|||
[[package]]
|
||||
name = "libregister"
|
||||
version = "0.0.0"
|
||||
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#966e43e14ed26e883a2de03d56cedde964283269"
|
||||
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#4aa252546f3559c9060ce731943372ad30d16eef"
|
||||
dependencies = [
|
||||
"bit_field",
|
||||
"vcell",
|
||||
|
@ -260,8 +260,9 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "libsupport_zynq"
|
||||
version = "0.0.0"
|
||||
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#966e43e14ed26e883a2de03d56cedde964283269"
|
||||
source = "git+https://git.m-labs.hk/M-Labs/zynq-rs.git#4aa252546f3559c9060ce731943372ad30d16eef"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"compiler_builtins",
|
||||
"libboard_zynq",
|
||||
"libcortex_a9",
|
||||
|
|
|
@ -3,7 +3,7 @@ use core::{
|
|||
mem,
|
||||
slice,
|
||||
};
|
||||
use alloc::alloc::{alloc_zeroed, dealloc, Layout, LayoutErr};
|
||||
use alloc::alloc::{alloc_zeroed, dealloc, Layout, LayoutError};
|
||||
use super::{
|
||||
elf::*,
|
||||
Error,
|
||||
|
@ -27,7 +27,7 @@ pub struct Image {
|
|||
}
|
||||
|
||||
impl Image {
|
||||
pub fn new(size: usize, align: usize) -> Result<Self, LayoutErr> {
|
||||
pub fn new(size: usize, align: usize) -> Result<Self, LayoutError> {
|
||||
let layout = Layout::from_size_align(size, align)?;
|
||||
let data = unsafe {
|
||||
let ptr = alloc_zeroed(layout);
|
||||
|
|
|
@ -16,7 +16,6 @@ static CORE1_RESTART: AtomicBool = AtomicBool::new(false);
|
|||
|
||||
#[link_section = ".text.boot"]
|
||||
#[no_mangle]
|
||||
#[naked]
|
||||
pub unsafe extern "C" fn IRQ() {
|
||||
if MPIDR.read().cpu_id() == 1 {
|
||||
let mpcore = mpcore::RegisterBlock::mpcore();
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#![feature(c_variadic)]
|
||||
#![feature(const_btree_new)]
|
||||
#![feature(const_in_array_repeat_expressions)]
|
||||
#![feature(naked_functions)]
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ async unsafe fn recv_value<F>(stream: &TcpStream, tag: Tag<'async_recursion>, da
|
|||
}
|
||||
Tag::List(it) => {
|
||||
#[repr(C)]
|
||||
struct List { elements: *mut (), length: u32 };
|
||||
struct List { elements: *mut (), length: u32 }
|
||||
consume_value!(List, |ptr| {
|
||||
let length = proto_async::read_i32(stream).await? as usize;
|
||||
(*ptr).length = length as u32;
|
||||
|
@ -228,7 +228,7 @@ unsafe fn send_value<W>(writer: &mut W, tag: Tag, data: &mut *const ())
|
|||
}
|
||||
Tag::List(it) => {
|
||||
#[repr(C)]
|
||||
struct List { elements: *const (), length: u32 };
|
||||
struct List { elements: *const (), length: u32 }
|
||||
consume_value!(List, |ptr| {
|
||||
let length = (*ptr).length as isize;
|
||||
writer.write_u32((*ptr).length)?;
|
||||
|
@ -336,7 +336,7 @@ unsafe fn send_value<W>(writer: &mut W, tag: Tag, data: &mut *const ())
|
|||
}
|
||||
Tag::Keyword(it) => {
|
||||
#[repr(C)]
|
||||
struct Keyword<'a> { name: CSlice<'a, u8> };
|
||||
struct Keyword<'a> { name: CSlice<'a, u8> }
|
||||
consume_value!(Keyword, |ptr| {
|
||||
writer.write_string(str::from_utf8((*ptr).name.as_ref()).unwrap())?;
|
||||
let tag = it.clone().next().expect("truncated tag");
|
||||
|
@ -348,7 +348,7 @@ unsafe fn send_value<W>(writer: &mut W, tag: Tag, data: &mut *const ())
|
|||
}
|
||||
Tag::Object => {
|
||||
#[repr(C)]
|
||||
struct Object { id: u32 };
|
||||
struct Object { id: u32 }
|
||||
consume_value!(*const Object, |ptr|
|
||||
writer.write_u32((**ptr).id))
|
||||
}
|
||||
|
|
|
@ -3,6 +3,6 @@ let
|
|||
in
|
||||
pkgs.fetchgit {
|
||||
url = "https://git.m-labs.hk/M-Labs/zynq-rs.git";
|
||||
rev = "b4d91e7904423b6477eb1f25b8cc3940e197e9c2";
|
||||
sha256 = "0g77s9jmbyxzkpnn2rs2sya5ia2admgkn74kzl2h1n4nckfk2nn6";
|
||||
rev = "4aa252546f3559c9060ce731943372ad30d16eef";
|
||||
sha256 = "0q9b75w6mbnsyyryainng27glxwhis325bmpv4bvzm7r9almsvks";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue