Skip to content

Commit

Permalink
Rename to aarch64-cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-richter committed Nov 6, 2022
1 parent 2c496c1 commit a81e344
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 37 deletions.
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "cortex-a"
version = "8.1.0"
name = "aarch64-cpu"
version = "9.0.0"
authors = ["Andre Richter <[email protected]>"]
description = "Low level access to Cortex-A processors"
homepage = "https://github.com/rust-embedded/cortex-a"
repository = "https://github.com/rust-embedded/cortex-a"
description = "Low level access to processors using the AArch64 execution state"
homepage = "https://github.com/rust-embedded/aarch64-cpu"
repository = "https://github.com/rust-embedded/aarch64-cpu"
readme = "README.md"
keywords = ["arm", "aarch64", "cortex-a", "register"]
keywords = ["arm", "aarch64", "cpu", "register"]
categories = ["embedded", "hardware-support", "no-std"]
license = "MIT/Apache-2.0"
edition = "2018"
Expand Down
22 changes: 9 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
[![crates.io](https://img.shields.io/crates/d/cortex-a.svg)](https://crates.io/crates/cortex-a)
[![crates.io](https://img.shields.io/crates/v/cortex-a.svg)](https://crates.io/crates/cortex-a)
[![crates.io](https://img.shields.io/crates/d/aarch64-cpu.svg)](https://crates.io/crates/aarch64-cpu)
[![crates.io](https://img.shields.io/crates/v/aarch64-cpu.svg)](https://crates.io/crates/aarch64-cpu)

# cortex-a
# aarch64-cpu

Low level access to Cortex-A processors.

## Currently Supported Execution States

- [x] AArch64
- [ ] AArch32
Low level access to processors using the AArch64 execution state.

## Minimum Supported Rust Version

Expand All @@ -18,14 +13,14 @@ register access module is not available.
## Usage

Please note that for using this crate's [register definitions](src/registers) (as provided by
`cortex_a::registers::*`), you need to also include
`aarch64_cpu::registers::*`), you need to also include
[`tock-registers`](https://crates.io/crates/tock-registers) in your project. This is because the
`interface` traits provided by `tock-registers` are implemented by this crate. You should include
the same version of `tock-registers` as is being used by this crate to ensure sane
interoperatbility.

For example, in the following snippet, `X.Y.Z` should be the same version of `tock-registers` that
is mentioned in `cortex-a`'s [`Cargo.toml`](Cargo.toml#L27).
is mentioned in `aarch64-cpu`'s [`Cargo.toml`](Cargo.toml#L27).

```toml
[package]
Expand All @@ -35,7 +30,7 @@ name = "Your embedded project"

[dependencies]
tock-registers = "X.Y.Z"
cortex-a = "A.B.C" # <-- Includes tock-registers itself.
aarch64-cpu = "A.B.C" # <-- Includes tock-registers itself.
```

### Example
Expand All @@ -44,7 +39,7 @@ Check out https://github.com/rust-embedded/rust-raspberrypi-OS-tutorials for usa
below is a snippet of `rust-raspberrypi-OS-tutorials`'s early boot code.

```rust
use cortex_a::{asm, registers::*};
use aarch64_cpu::{asm, registers::*};
use tock_registers::interfaces::Writeable; // <-- Trait needed to use `write()` and `set()`.

// Some parts omitted for brevity.
Expand All @@ -70,6 +65,7 @@ unsafe fn prepare_el2_to_el1_transition(
+ SPSR_EL2::F::Masked
+ SPSR_EL2::M::EL1h,
);
}
```

## Disclaimer
Expand Down
2 changes: 1 addition & 1 deletion src/asm/random.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use core::arch::asm;
/// # Example
///
/// ```no_run
/// use cortex_a::asm::random::ArmRng;
/// use aarch64_cpu::asm::random::ArmRng;
/// if let Some(rng) = ArmRng::new() {
/// let rand_num = rng.rndr();
/// }
Expand Down
26 changes: 9 additions & 17 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,24 @@
// Author(s):
// - Andre Richter <[email protected]>

//! Low level access to Cortex-A processors.
//!
//! ## Currently Supported Execution States
//!
//! - [x] AArch64
//! - [ ] AArch32
//! Low level access to processors using the AArch64 execution state.
//!
//! ## Minimum Supported Rust Version
//!
//! Requires a recent nightly of Rust.
//! Requires a recent nightly of Rust if the (default) `nightly` feature is enabled. Without this
//! the register access module is not available.
//!
//! ## Usage
//!
//! Please note that for using this crate's [register definitions](src/registers) (as provided by
//! `cortex_a::registers::*`), you need to also include
//! `aarch64_cpu::registers::*`), you need to also include
//! [`tock-registers`](https://crates.io/crates/tock-registers) in your project. This is because the
//! `interface` traits provided by `tock-registers` are implemented by this crate. You should
//! include the same version of `tock-registers` as is being used by this crate to ensure sane
//! interoperatbility.
//!
//! For example, in the following snippet, `X.Y.Z` should be the same version of `tock-registers`
//! that is mentioned in `cortex-a`'s [`Cargo.toml`](Cargo.toml).
//! that is mentioned in `aarch64-cpu`'s [`Cargo.toml`](Cargo.toml#L27).
//!
//! ```toml
//! [package]
Expand All @@ -36,20 +32,16 @@
//!
//! [dependencies]
//! tock-registers = "X.Y.Z"
//! cortex-a = "A.B.C" # <-- Includes tock-registers itself.
//! aarch64-cpu = "A.B.C" # <-- Includes tock-registers itself.
//! ```
//!
//! ### Example
//!
//! Check out
//! [rust-raspberrypi-OS-tutorials](https://github.com/rust-embedded/rust-raspberrypi-OS-tutorials)
//! for usage examples. Listed below is a snippet of `rust-raspberrypi-OS-tutorials`'s early boot
//! code.
//! Check out https://github.com/rust-embedded/rust-raspberrypi-OS-tutorials for usage examples.
//! Listed below is a snippet of `rust-raspberrypi-OS-tutorials`'s early boot code.
//!
//! ```rust
//! # #[cfg(feature = "nightly")]
//! use cortex_a::{asm, registers::*};
//! # #[cfg(feature = "nightly")]
//! use aarch64_cpu::{asm, registers::*};
//! use tock_registers::interfaces::Writeable; // <-- Trait needed to use `write()` and `set()`.
//!
//! // Some parts omitted for brevity.
Expand Down

0 comments on commit a81e344

Please sign in to comment.