1
0
Fork 0

Compare commits

..

14 Commits

5 changed files with 31 additions and 30 deletions

46
Cargo.lock generated
View File

@ -4,9 +4,9 @@ version = 3
[[package]]
name = "bit_field"
version = "0.10.2"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61"
checksum = "dcb6dd1c2376d2e096796e234a70e17e94cc2d5d54ff8ce42b28cef1d0d359a4"
[[package]]
name = "bitflags"
@ -22,18 +22,21 @@ checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
[[package]]
name = "byteorder"
version = "1.5.0"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
[[package]]
name = "cc"
version = "1.1.24"
version = "1.0.73"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "812acba72f0a070b003d3697490d2b55b837230ae7c6c6497f05cc2ddbb8d938"
dependencies = [
"shlex",
]
checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "compiler_builtins"
@ -79,7 +82,7 @@ version = "0.0.0"
dependencies = [
"embedded-hal",
"libcortex_a9",
"nb 1.1.0",
"nb 1.0.0",
"pin-utils",
"smoltcp",
]
@ -148,9 +151,12 @@ checksum = "822add9edb1860698b79522510da17bef885171f75aa395cff099d770c609c24"
[[package]]
name = "log"
version = "0.4.22"
version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
dependencies = [
"cfg-if",
]
[[package]]
name = "managed"
@ -164,14 +170,14 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "801d31da0513b6ec5214e9bf433a77966320625a37860f910be265be6e18d06f"
dependencies = [
"nb 1.1.0",
"nb 1.0.0",
]
[[package]]
name = "nb"
version = "1.1.0"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d5439c4ad607c3c23abf66de8c8bf57ba8adcd1f129e699851a6e43935d339d"
checksum = "546c37ac5d9e56f55e73b677106873d9d9f5190605e41a856503623648488cae"
[[package]]
name = "pin-utils"
@ -185,12 +191,6 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd7a31eed1591dcbc95d92ad7161908e72f4677f8fabf2a32ca49b4237cbf211"
[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "smoltcp"
version = "0.7.5"
@ -230,9 +230,9 @@ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
[[package]]
name = "volatile-register"
version = "0.2.2"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de437e2a6208b014ab52972a27e59b33fa2920d3e00fe05026167a1c509d19cc"
checksum = "9ee8f19f9d74293faf70901bc20ad067dc1ad390d2cbf1e3f75f721ffee908b6"
dependencies = [
"vcell",
]

View File

@ -73,7 +73,7 @@ fn read_to_end<'a>(file: &mut File<'a>, buffer: &mut Vec<u8>) -> Result<'a, ()>
fn read_to_string<'a>(file: &mut File<'a>) -> Result<'a, String> {
let mut buffer: Vec<u8> = Vec::new();
read_to_end(file, &mut buffer);
read_to_end(file, &mut buffer)?;
Ok(String::from_utf8(buffer)?)
}

View File

@ -172,7 +172,6 @@ impl<'a, T> Iterator for Receiver<'a, T> where T: Clone {
#[macro_export]
/// Macro for initializing the sync_channel with static buffer and indexes.
/// Note that this requires `#![feature(const_in_array_repeat_expressions)]`
macro_rules! sync_channel {
($t: ty, $cap: expr) => {
{

View File

@ -1,6 +1,6 @@
use core::{
ops::{Deref, DerefMut},
mem::{align_of, size_of},
ops::{Deref, DerefMut}
};
use alloc::alloc::{dealloc, Layout, LayoutError};
use crate::mmu::{L1_PAGE_SIZE, L1Table};
@ -20,6 +20,7 @@ impl<T> UncachedSlice<T> {
let layout = Layout::from_size_align(size, align)?;
let ptr = unsafe { alloc::alloc::alloc(layout).cast::<T>() };
let start = ptr as usize;
assert_eq!(start & (L1_PAGE_SIZE - 1), 0);
for page_start in (start..(start + size)).step_by(L1_PAGE_SIZE) {
// non-shareable device
@ -30,6 +31,7 @@ impl<T> UncachedSlice<T> {
l1_section.bufferable = false;
});
}
let slice = unsafe { core::slice::from_raw_parts_mut(ptr, len) };
// initialize
for e in slice.iter_mut() {

View File

@ -120,13 +120,13 @@ pub fn main_core0() {
slcr::BootModePins::Jtag => netboot::netboot(
&mut bootgen_file,
config,
addr_of_mut!(__runtime_start).cast(),
addr_of_mut!(__runtime_start) as *mut u8,
max_len,
),
slcr::BootModePins::SdCard => {
if boot_sd(
&mut bootgen_file,
addr_of_mut!(__runtime_start).cast(),
addr_of_mut!(__runtime_start) as *mut u8,
max_len,
)
.is_err()
@ -136,7 +136,7 @@ pub fn main_core0() {
netboot::netboot(
&mut bootgen_file,
config,
addr_of_mut!(__runtime_start).cast(),
addr_of_mut!(__runtime_start) as *mut u8,
max_len,
)
}
@ -147,7 +147,7 @@ pub fn main_core0() {
netboot::netboot(
&mut bootgen_file,
config,
addr_of_mut!(__runtime_start).cast(),
addr_of_mut!(__runtime_start) as *mut u8,
max_len,
)
}