Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
rustup target add ${{ matrix.target }}
- name: Build
run: |
cargo build --target ${{ matrix.target }} --features "serde, defmt"
cargo build --target ${{ matrix.target }} --features "serde, defmt, check-asm"
cargo build --target ${{ matrix.target }} --no-default-features

build-versatileab:
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
rustup component add rust-src --toolchain nightly
- name: Build
run: |
cargo build --target ${{ matrix.target }} -Zbuild-std=core
cargo build --target ${{ matrix.target }} -Zbuild-std=core --features "serde, defmt, check-asm"
cargo build --target ${{ matrix.target }} -Zbuild-std=core --no-default-features

# Gather all the above build jobs together for the purposes of getting an overall pass-fail
Expand Down
8 changes: 4 additions & 4 deletions aarch32-cpu/src/pmsav7.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl Mpu {
return None;
}
register::Rgnr::write(register::Rgnr(idx as u32));
let base = register::Irbar::read().0;
let base = register::Irbar::read().0 as *mut u8;
let rsr = register::Irsr::read();
let racr = register::Iracr::read();

Expand Down Expand Up @@ -85,7 +85,7 @@ impl Mpu {
return None;
}
register::Rgnr::write(register::Rgnr(idx as u32));
let base = register::Drbar::read().0;
let base = register::Drbar::read().0 as *mut u8;
let rsr = register::Drsr::read();
let racr = register::Dracr::read();

Expand Down Expand Up @@ -120,7 +120,7 @@ impl Mpu {
if !region.size.is_aligned(region.base) {
return Err(Error::UnalignedRegion(region.base));
}
register::Irbar::write(register::Irbar(region.base));
register::Irbar::write(register::Irbar(region.base as u32));
register::Irsr::write({
let mut out = register::Irsr::new_with_raw_value(0);
out.set_enabled(region.enabled);
Expand All @@ -145,7 +145,7 @@ impl Mpu {
return Err(Error::UnalignedRegion(region.base));
}
register::Rgnr::write(register::Rgnr(idx as u32));
register::Drbar::write(register::Drbar(region.base));
register::Drbar::write(register::Drbar(region.base as u32));
register::Drsr::write({
let mut out = register::Drsr::new_with_raw_value(0);
out.set_enabled(region.enabled);
Expand Down
5 changes: 5 additions & 0 deletions aarch32-cpu/src/register/actlr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,27 @@ use crate::register::{SysReg, SysRegRead, SysRegWrite};
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Actlr(pub u32);

impl SysReg for Actlr {
const CP: u32 = 15;
const CRN: u32 = 1;
const OP1: u32 = 0;
const CRM: u32 = 0;
const OP2: u32 = 1;
}

impl crate::register::SysRegRead for Actlr {}

impl Actlr {
#[inline]
/// Reads ACTLR (*Auxiliary Control Register*)
pub fn read() -> Actlr {
unsafe { Self(<Self as SysRegRead>::read_raw()) }
}
}

impl crate::register::SysRegWrite for Actlr {}

impl Actlr {
#[inline]
/// Writes ACTLR (*Auxiliary Control Register*)
Expand Down
5 changes: 5 additions & 0 deletions aarch32-cpu/src/register/actlr2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,27 @@ use crate::register::{SysReg, SysRegRead, SysRegWrite};
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Actlr2(pub u32);

impl SysReg for Actlr2 {
const CP: u32 = 15;
const CRN: u32 = 1;
const OP1: u32 = 0;
const CRM: u32 = 0;
const OP2: u32 = 3;
}

impl crate::register::SysRegRead for Actlr2 {}

impl Actlr2 {
#[inline]
/// Reads ACTLR2 (*Auxiliary Control Register 2*)
pub fn read() -> Actlr2 {
unsafe { Self(<Self as SysRegRead>::read_raw()) }
}
}

impl crate::register::SysRegWrite for Actlr2 {}

impl Actlr2 {
#[inline]
/// Writes ACTLR2 (*Auxiliary Control Register 2*)
Expand Down
5 changes: 5 additions & 0 deletions aarch32-cpu/src/register/adfsr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,27 @@ use crate::register::{SysReg, SysRegRead, SysRegWrite};
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Adfsr(pub u32);

impl SysReg for Adfsr {
const CP: u32 = 15;
const CRN: u32 = 5;
const OP1: u32 = 0;
const CRM: u32 = 1;
const OP2: u32 = 0;
}

impl crate::register::SysRegRead for Adfsr {}

impl Adfsr {
#[inline]
/// Reads ADFSR (*Auxiliary Data Fault Status Register*)
pub fn read() -> Adfsr {
unsafe { Self(<Self as SysRegRead>::read_raw()) }
}
}

impl crate::register::SysRegWrite for Adfsr {}

impl Adfsr {
#[inline]
/// Writes ADFSR (*Auxiliary Data Fault Status Register*)
Expand Down
3 changes: 3 additions & 0 deletions aarch32-cpu/src/register/aidr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ use crate::register::{SysReg, SysRegRead};
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Aidr(pub u32);

impl SysReg for Aidr {
const CP: u32 = 15;
const CRN: u32 = 0;
const OP1: u32 = 1;
const CRM: u32 = 0;
const OP2: u32 = 7;
}

impl crate::register::SysRegRead for Aidr {}

impl Aidr {
#[inline]
/// Reads AIDR (*Auxiliary ID Register*)
Expand Down
5 changes: 5 additions & 0 deletions aarch32-cpu/src/register/aifsr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,27 @@ use crate::register::{SysReg, SysRegRead, SysRegWrite};
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Aifsr(pub u32);

impl SysReg for Aifsr {
const CP: u32 = 15;
const CRN: u32 = 5;
const OP1: u32 = 0;
const CRM: u32 = 1;
const OP2: u32 = 1;
}

impl crate::register::SysRegRead for Aifsr {}

impl Aifsr {
#[inline]
/// Reads AIFSR (*Auxiliary Instruction Fault Status Register*)
pub fn read() -> Aifsr {
unsafe { Self(<Self as SysRegRead>::read_raw()) }
}
}

impl crate::register::SysRegWrite for Aifsr {}

impl Aifsr {
#[inline]
/// Writes AIFSR (*Auxiliary Instruction Fault Status Register*)
Expand Down
5 changes: 5 additions & 0 deletions aarch32-cpu/src/register/amair0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,27 @@ use crate::register::{SysReg, SysRegRead, SysRegWrite};
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Amair0(pub u32);

impl SysReg for Amair0 {
const CP: u32 = 15;
const CRN: u32 = 10;
const OP1: u32 = 0;
const CRM: u32 = 3;
const OP2: u32 = 0;
}

impl crate::register::SysRegRead for Amair0 {}

impl Amair0 {
#[inline]
/// Reads AMAIR0 (*Auxiliary Memory Attribute Indirection Register 0*)
pub fn read() -> Amair0 {
unsafe { Self(<Self as SysRegRead>::read_raw()) }
}
}

impl crate::register::SysRegWrite for Amair0 {}

impl Amair0 {
#[inline]
/// Writes AMAIR0 (*Auxiliary Memory Attribute Indirection Register 0*)
Expand Down
5 changes: 5 additions & 0 deletions aarch32-cpu/src/register/amair1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,27 @@ use crate::register::{SysReg, SysRegRead, SysRegWrite};
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Amair1(pub u32);

impl SysReg for Amair1 {
const CP: u32 = 15;
const CRN: u32 = 10;
const OP1: u32 = 0;
const CRM: u32 = 3;
const OP2: u32 = 1;
}

impl crate::register::SysRegRead for Amair1 {}

impl Amair1 {
#[inline]
/// Reads AMAIR1 (*Auxiliary Memory Attribute Indirection Register 1*)
pub fn read() -> Amair1 {
unsafe { Self(<Self as SysRegRead>::read_raw()) }
}
}

impl crate::register::SysRegWrite for Amair1 {}

impl Amair1 {
#[inline]
/// Writes AMAIR1 (*Auxiliary Memory Attribute Indirection Register 1*)
Expand Down
1 change: 1 addition & 0 deletions aarch32-cpu/src/register/armv8r/cntfrq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use crate::register::{SysReg, SysRegRead, SysRegWrite};
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Cntfrq(pub u32);

impl SysReg for Cntfrq {
const CP: u32 = 15;
const CRN: u32 = 14;
Expand Down
1 change: 1 addition & 0 deletions aarch32-cpu/src/register/armv8r/cntp_ctl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ impl SysReg for CntpCtl {
const CRM: u32 = 2;
const OP2: u32 = 1;
}

impl SysRegRead for CntpCtl {}

impl CntpCtl {
Expand Down
1 change: 1 addition & 0 deletions aarch32-cpu/src/register/armv8r/cntp_tval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use crate::register::{SysReg, SysRegRead, SysRegWrite};
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct CntpTval(pub u32);

impl SysReg for CntpTval {
const CP: u32 = 15;
const CRN: u32 = 14;
Expand Down
5 changes: 5 additions & 0 deletions aarch32-cpu/src/register/armv8r/cntv_tval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,27 @@ use crate::register::{SysReg, SysRegRead, SysRegWrite};
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct CntvTval(pub u32);

impl SysReg for CntvTval {
const CP: u32 = 15;
const CRN: u32 = 14;
const OP1: u32 = 0;
const CRM: u32 = 3;
const OP2: u32 = 0;
}

impl crate::register::SysRegRead for CntvTval {}

impl CntvTval {
#[inline]
/// Reads CNTV_TVAL (*Virtual Counter-timer TimerValue Register*)
pub fn read() -> CntvTval {
unsafe { Self(<Self as SysRegRead>::read_raw()) }
}
}

impl crate::register::SysRegWrite for CntvTval {}

impl CntvTval {
#[inline]
/// Writes CNTV_TVAL (*Virtual Counter-timer TimerValue Register*)
Expand Down
5 changes: 5 additions & 0 deletions aarch32-cpu/src/register/armv8r/hacr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,27 @@ use crate::register::{SysReg, SysRegRead, SysRegWrite};
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Hacr(pub u32);

impl SysReg for Hacr {
const CP: u32 = 15;
const CRN: u32 = 1;
const OP1: u32 = 4;
const CRM: u32 = 1;
const OP2: u32 = 7;
}

impl crate::register::SysRegRead for Hacr {}

impl Hacr {
#[inline]
/// Reads HACR (*Hyp Auxiliary Configuration Register*)
pub fn read() -> Hacr {
unsafe { Self(<Self as SysRegRead>::read_raw()) }
}
}

impl crate::register::SysRegWrite for Hacr {}

impl Hacr {
#[inline]
/// Writes HACR (*Hyp Auxiliary Configuration Register*)
Expand Down
5 changes: 5 additions & 0 deletions aarch32-cpu/src/register/armv8r/hactlr2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,27 @@ use crate::register::{SysReg, SysRegRead, SysRegWrite};
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Hactlr2(pub u32);

impl SysReg for Hactlr2 {
const CP: u32 = 15;
const CRN: u32 = 1;
const OP1: u32 = 4;
const CRM: u32 = 0;
const OP2: u32 = 3;
}

impl crate::register::SysRegRead for Hactlr2 {}

impl Hactlr2 {
#[inline]
/// Reads HACTLR2 (*Hyp Auxiliary Control Register 2*)
pub fn read() -> Hactlr2 {
unsafe { Self(<Self as SysRegRead>::read_raw()) }
}
}

impl crate::register::SysRegWrite for Hactlr2 {}

impl Hactlr2 {
#[inline]
/// Writes HACTLR2 (*Hyp Auxiliary Control Register 2*)
Expand Down
5 changes: 5 additions & 0 deletions aarch32-cpu/src/register/armv8r/hadfsr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,27 @@ use crate::register::{SysReg, SysRegRead, SysRegWrite};
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Hadfsr(pub u32);

impl SysReg for Hadfsr {
const CP: u32 = 15;
const CRN: u32 = 5;
const OP1: u32 = 4;
const CRM: u32 = 1;
const OP2: u32 = 0;
}

impl crate::register::SysRegRead for Hadfsr {}

impl Hadfsr {
#[inline]
/// Reads HADFSR (*Hyp Auxiliary Data Fault Status Register*)
pub fn read() -> Hadfsr {
unsafe { Self(<Self as SysRegRead>::read_raw()) }
}
}

impl crate::register::SysRegWrite for Hadfsr {}

impl Hadfsr {
#[inline]
/// Writes HADFSR (*Hyp Auxiliary Data Fault Status Register*)
Expand Down
Loading