Compare commits
No commits in common. "master" and "master" have entirely different histories.
42
flake.lock
generated
42
flake.lock
generated
@ -11,11 +11,11 @@
|
||||
"src-pythonparser": "src-pythonparser"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1739435991,
|
||||
"narHash": "sha256-mmS2XPIh9EeUGvJQYmlHV0k/UCYmQ0HFmhhETKW/t2k=",
|
||||
"lastModified": 1734418848,
|
||||
"narHash": "sha256-FiK84edtdmpJ3FUA58XAUmDDp4oVPgupmf1CcgJ6rC0=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "77029874364ff8493081e8000ef964c9ba1ca965",
|
||||
"revCount": 9155,
|
||||
"rev": "366bb0fc59dbe4d5f544908b0f3e31f8eb19f7c1",
|
||||
"revCount": 9121,
|
||||
"type": "git",
|
||||
"url": "https://github.com/m-labs/artiq.git"
|
||||
},
|
||||
@ -37,11 +37,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734270714,
|
||||
"narHash": "sha256-7bzGn/hXLIsLQHGQsvo+uoIFUrw9DjXSlMC449BY4ME=",
|
||||
"lastModified": 1720768567,
|
||||
"narHash": "sha256-3VoK7o5MtHtbHLrc6Pv+eQWFtaz5Gd/YWyV5TD3c5Ss=",
|
||||
"owner": "m-labs",
|
||||
"repo": "artiq-comtools",
|
||||
"rev": "7e3152314af8f5987370e33b347b2ec2697567ed",
|
||||
"rev": "f93570d8f2ed5a3cfb3e1c16ab00f2540551e994",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -70,11 +70,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1739214665,
|
||||
"narHash": "sha256-26L8VAu3/1YRxS8MHgBOyOM8xALdo6N0I04PgorE7UM=",
|
||||
"lastModified": 1733940404,
|
||||
"narHash": "sha256-Pj39hSoUA86ZePPF/UXiYHHM7hMIkios8TYG29kQT4g=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "64e75cd44acf21c7933d61d7721e812eac1b5a0a",
|
||||
"rev": "5d67ea6b4b63378b9c13be21e2ec9d1afc921713",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -158,11 +158,11 @@
|
||||
"src-migen": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1738906518,
|
||||
"narHash": "sha256-GproDJowtcgbccsT+I0mObzFhE483shcS8MSszKXwlc=",
|
||||
"lastModified": 1727677091,
|
||||
"narHash": "sha256-Zg3SQnTwMM/VkOGKogbPyuCC2NhLy8HB2SPEUWWNgCU=",
|
||||
"owner": "m-labs",
|
||||
"repo": "migen",
|
||||
"rev": "2828df54594673653a641ab551caf6c6b1bfeee5",
|
||||
"rev": "c19ae9f8ae162ffe2d310a92bfce53ac2a821bc8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -174,11 +174,11 @@
|
||||
"src-misoc": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1739428011,
|
||||
"narHash": "sha256-ymvkR6ldCp+Kj29YGnaVuoM9Vi2GNxaqPlK0DWOCcgQ=",
|
||||
"lastModified": 1729234629,
|
||||
"narHash": "sha256-TLsTCXV5AC2xh+bS7EhBVBKqdqIU3eKrnlWcFF9LtAM=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "47a3d8096dfae234599fd5406807cf2d92b6a351",
|
||||
"revCount": 2473,
|
||||
"rev": "6085a312bca26adeca6584e37d08c8ba2e1d6e38",
|
||||
"revCount": 2460,
|
||||
"submodules": true,
|
||||
"type": "git",
|
||||
"url": "https://github.com/m-labs/misoc.git"
|
||||
@ -229,11 +229,11 @@
|
||||
"rust-overlay": "rust-overlay_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1739437497,
|
||||
"narHash": "sha256-hqsma8ZGBwAcr0OJBcqZLlT8EuhcCW7aYe96Nz153Bs=",
|
||||
"lastModified": 1734668221,
|
||||
"narHash": "sha256-X0U2yPmlsD3VLBZQyfWv8qw04Qn0qFWIONJUPPigB0U=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "1c3912e34e43f087a8427509dfb3785b04b6a33e",
|
||||
"revCount": 679,
|
||||
"rev": "213529cf7a50aa1b2d9ffdf575e3e38202ff9bd6",
|
||||
"revCount": 666,
|
||||
"type": "git",
|
||||
"url": "https://git.m-labs.hk/m-labs/zynq-rs"
|
||||
},
|
||||
|
12
flake.nix
12
flake.nix
@ -135,13 +135,13 @@
|
||||
pkgs.gnumake
|
||||
(pkgs.python3.withPackages(ps: [ ps.jsonschema artiqpkgs.migen migen-axi artiqpkgs.misoc artiqpkgs.artiq ]))
|
||||
zynqpkgs.cargo-xbuild
|
||||
pkgs.llvmPackages_14.llvm
|
||||
pkgs.llvmPackages_14.clang-unwrapped
|
||||
pkgs.llvmPackages_13.llvm
|
||||
pkgs.llvmPackages_13.clang-unwrapped
|
||||
];
|
||||
buildPhase = ''
|
||||
export ZYNQ_REV=${zynqRev}
|
||||
export XARGO_RUST_SRC="${rust}/lib/rustlib/src/rust/library"
|
||||
export CLANG_EXTRA_INCLUDE_DIR="${pkgs.llvmPackages_14.clang-unwrapped.lib}/lib/clang/14.0.6/include"
|
||||
export CLANG_EXTRA_INCLUDE_DIR="${pkgs.llvmPackages_13.clang-unwrapped.lib}/lib/clang/13.0.1/include"
|
||||
export CARGO_HOME=$(mktemp -d cargo-home.XXX)
|
||||
export ZYNQ_RS=${zynq-rs}
|
||||
make TARGET=${target} GWARGS="${if json == null then "-V ${variant}" else json}" ${fwtype}
|
||||
@ -376,8 +376,8 @@
|
||||
name = "artiq-zynq-dev-shell";
|
||||
buildInputs = with pkgs; [
|
||||
rust
|
||||
llvmPackages_14.llvm
|
||||
llvmPackages_14.clang-unwrapped
|
||||
llvmPackages_13.llvm
|
||||
llvmPackages_13.clang-unwrapped
|
||||
gnumake
|
||||
cacert
|
||||
zynqpkgs.cargo-xbuild
|
||||
@ -392,7 +392,7 @@
|
||||
];
|
||||
ZYNQ_REV="${zynqRev}";
|
||||
XARGO_RUST_SRC = "${rust}/lib/rustlib/src/rust/library";
|
||||
CLANG_EXTRA_INCLUDE_DIR = "${pkgs.llvmPackages_14.clang-unwrapped.lib}/lib/clang/14.0.6/include";
|
||||
CLANG_EXTRA_INCLUDE_DIR = "${pkgs.llvmPackages_13.clang-unwrapped.lib}/lib/clang/13.0.1/include";
|
||||
ZYNQ_RS = "${zynq-rs}";
|
||||
OPENOCD_ZYNQ = "${zynq-rs}/openocd";
|
||||
SZL = "${zynqpkgs.szl}";
|
||||
|
@ -1,6 +1,7 @@
|
||||
[target.armv7-none-eabihf]
|
||||
rustflags = [
|
||||
"-C", "link-arg=-Tlink.x",
|
||||
"-C", "target-feature=a9,armv7-a,neon",
|
||||
"-C", "target-cpu=cortex-a9",
|
||||
]
|
||||
|
||||
|
4
src/Cargo.lock
generated
4
src/Cargo.lock
generated
@ -82,9 +82,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "compiler_builtins"
|
||||
version = "0.1.70"
|
||||
version = "0.1.49"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "80873f979f0a344a4ade87c2f70d9ccf5720b83b10c97ec7cd745895d021e85a"
|
||||
checksum = "20b1438ef42c655665a8ab2c1c6d605a305f031d38d9be689ddfef41a20f3aa2"
|
||||
|
||||
[[package]]
|
||||
name = "core_io"
|
||||
|
@ -4,7 +4,7 @@
|
||||
"emit-debug-gdb-scripts": false,
|
||||
"env": "",
|
||||
"executables": true,
|
||||
"features": "+v7,+vfp3,-d32,+thumb2,+neon,+a9,+armv7-a",
|
||||
"features": "+v7,+vfp3,-d32,+thumb2,-neon",
|
||||
"is-builtin": false,
|
||||
"linker": "rust-lld",
|
||||
"linker-flavor": "ld.lld",
|
||||
|
@ -1,4 +1,4 @@
|
||||
use core::{arch::asm, slice};
|
||||
use core::slice;
|
||||
|
||||
use core_io::{Error as IoError, ErrorKind as IoErrorKind};
|
||||
use crc;
|
||||
@ -39,7 +39,6 @@ pub fn copy_work_buffer(src: *mut u32, dst: *mut u32, len: isize) {
|
||||
// fix for artiq-zynq#344
|
||||
unsafe {
|
||||
for i in 0..(len / 4) {
|
||||
asm!("", options(preserves_flags, nostack, readonly));
|
||||
*dst.offset(i) = *src.offset(i);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,3 @@
|
||||
use core::arch::asm;
|
||||
|
||||
use libboard_zynq::{println, stdio};
|
||||
use libcortex_a9::{interrupt_handler, regs::MPIDR};
|
||||
use libregister::RegisterR;
|
||||
|
@ -1,6 +1,7 @@
|
||||
#![no_std]
|
||||
#![feature(never_type)]
|
||||
#![feature(naked_functions)]
|
||||
#![feature(asm)]
|
||||
|
||||
extern crate core_io;
|
||||
extern crate crc;
|
||||
|
@ -85,7 +85,7 @@ unsafe fn get_ttype_entry(
|
||||
encoding | DW_EH_PE_pcrel,
|
||||
ttype_base,
|
||||
)
|
||||
.map(|v| (v != 0).then(|| v as *const u8))
|
||||
.map(|v| (v != ttype_base).then(|| v as *const u8))
|
||||
}
|
||||
|
||||
pub unsafe fn find_eh_action(
|
||||
@ -275,11 +275,6 @@ unsafe fn read_encoded_pointer_with_base(reader: &mut DwarfReader, encoding: u8,
|
||||
_ => return Err(()),
|
||||
};
|
||||
|
||||
if result == 0 {
|
||||
// null is just encoded as 0, even if a relative encoding is used for the table.
|
||||
return Ok(0);
|
||||
}
|
||||
|
||||
result += if (encoding & 0x70) == DW_EH_PE_pcrel {
|
||||
original_ptr as usize
|
||||
} else {
|
||||
|
@ -1,5 +1,6 @@
|
||||
#![no_std]
|
||||
#![feature(never_type)]
|
||||
#![feature(asm)]
|
||||
|
||||
#[cfg(feature = "alloc")]
|
||||
extern crate alloc;
|
||||
|
@ -1,5 +1,4 @@
|
||||
use core::{arch::asm,
|
||||
sync::atomic::{AtomicBool, Ordering}};
|
||||
use core::sync::atomic::{AtomicBool, Ordering};
|
||||
|
||||
use libboard_zynq::{gic, mpcore, println, stdio};
|
||||
use libcortex_a9::{asm, interrupt_handler, notify_spin_lock, regs::MPIDR, spin_lock_yield};
|
||||
|
@ -8,7 +8,7 @@ use dyld::{self, elf::EXIDX_Entry, Library};
|
||||
use libboard_zynq::{gic, mpcore};
|
||||
use libcortex_a9::{asm::{dsb, isb},
|
||||
cache::{bpiall, dcci_slice, iciallu},
|
||||
sync_channel};
|
||||
enable_fpu, sync_channel};
|
||||
use libsupport_zynq::ram;
|
||||
use log::{debug, error, info};
|
||||
|
||||
@ -25,14 +25,12 @@ extern "C" {
|
||||
}
|
||||
|
||||
unsafe fn attribute_writeback(typeinfo: *const ()) {
|
||||
#[repr(C)]
|
||||
struct Attr {
|
||||
offset: usize,
|
||||
tag: CSlice<'static, u8>,
|
||||
name: CSlice<'static, u8>,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
struct Type {
|
||||
attributes: *const *const Attr,
|
||||
objects: *const *const (),
|
||||
@ -128,6 +126,7 @@ impl KernelImage {
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn main_core1() {
|
||||
enable_fpu();
|
||||
debug!("Core1 started");
|
||||
|
||||
ram::init_alloc_core1();
|
||||
|
@ -1,8 +1,10 @@
|
||||
#![no_std]
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(c_variadic)]
|
||||
#![feature(const_btree_new)]
|
||||
#![feature(inline_const)]
|
||||
#![feature(naked_functions)]
|
||||
#![feature(asm)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate alloc;
|
||||
|
@ -4,7 +4,6 @@
|
||||
#![feature(alloc_error_handler)]
|
||||
#![feature(const_btree_new)]
|
||||
#![feature(panic_info_message)]
|
||||
#![feature(lang_items)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate alloc;
|
||||
|
@ -71,7 +71,3 @@ fn soft_panic(info: &core::panic::PanicInfo) -> ! {
|
||||
};
|
||||
soft_panic_main(timer, cfg);
|
||||
}
|
||||
|
||||
#[lang = "eh_personality"]
|
||||
#[no_mangle]
|
||||
pub extern "C" fn rust_eh_personality() {}
|
||||
|
@ -411,32 +411,29 @@ pub mod drtio {
|
||||
}
|
||||
Ok(Packet::DestinationOkReply) => (),
|
||||
Ok(Packet::DestinationSequenceErrorReply { channel }) => {
|
||||
let global_ch = ((destination as u32) << 16) | channel as u32;
|
||||
error!(
|
||||
"[DEST#{}] RTIO sequence error involving channel 0x{:04x}:{}",
|
||||
destination,
|
||||
channel,
|
||||
resolve_channel_name(global_ch)
|
||||
resolve_channel_name(channel as u32)
|
||||
);
|
||||
unsafe { SEEN_ASYNC_ERRORS |= ASYNC_ERROR_SEQUENCE_ERROR };
|
||||
}
|
||||
Ok(Packet::DestinationCollisionReply { channel }) => {
|
||||
let global_ch = ((destination as u32) << 16) | channel as u32;
|
||||
error!(
|
||||
"[DEST#{}] RTIO collision involving channel 0x{:04x}:{}",
|
||||
destination,
|
||||
channel,
|
||||
resolve_channel_name(global_ch)
|
||||
resolve_channel_name(channel as u32)
|
||||
);
|
||||
unsafe { SEEN_ASYNC_ERRORS |= ASYNC_ERROR_COLLISION };
|
||||
}
|
||||
Ok(Packet::DestinationBusyReply { channel }) => {
|
||||
let global_ch = ((destination as u32) << 16) | channel as u32;
|
||||
error!(
|
||||
"[DEST#{}] RTIO busy error involving channel 0x{:04x}:{}",
|
||||
destination,
|
||||
channel,
|
||||
resolve_channel_name(global_ch)
|
||||
resolve_channel_name(channel as u32)
|
||||
);
|
||||
unsafe { SEEN_ASYNC_ERRORS |= ASYNC_ERROR_BUSY };
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ fn_single_line = false
|
||||
where_single_line = true
|
||||
imports_indent = "Visual"
|
||||
imports_layout = "Mixed"
|
||||
imports_granularity = "Crate"
|
||||
merge_imports = true
|
||||
group_imports = "StdExternalCrate"
|
||||
reorder_imports = true
|
||||
reorder_modules = true
|
||||
@ -54,7 +54,7 @@ use_field_init_shorthand = false
|
||||
force_explicit_abi = true
|
||||
condense_wildcard_suffixes = false
|
||||
color = "Auto"
|
||||
required_version = "1.4.38"
|
||||
required_version = "1.4.37"
|
||||
unstable_features = false
|
||||
disable_all_formatting = false
|
||||
skip_children = false
|
||||
|
@ -1,7 +1,6 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
#![feature(alloc_error_handler, never_type, panic_info_message)]
|
||||
#![feature(lang_items)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
@ -1811,7 +1810,3 @@ pub fn panic_fmt(info: &core::panic::PanicInfo) -> ! {
|
||||
|
||||
loop {}
|
||||
}
|
||||
|
||||
#[lang = "eh_personality"]
|
||||
#[no_mangle]
|
||||
pub extern "C" fn rust_eh_personality() {}
|
||||
|
Loading…
Reference in New Issue
Block a user