Skip to content

Commit 7fd82b3

Browse files
Update CHANGELOG.md
1 parent d166ec0 commit 7fd82b3

File tree

1 file changed

+281
-1
lines changed

1 file changed

+281
-1
lines changed

CHANGELOG.md

Lines changed: 281 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,283 @@
1-
### [Unreleased]
1+
# Change Log
22

3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
6+
and this project adheres to [Semantic Versioning](http://semver.org/).
7+
8+
## [Unreleased]
9+
10+
## [v0.15.0] - 2025-09-08
11+
12+
### Added
313
- Added DCSR (Debug Control and Status Register) CSR support for the RISC-V
14+
- New convenience `try_new` and `new` associated functions for `Mtvec` and `Stvec`.
15+
- New methods and functions for enabling core interrupts in the `mie` and `sie` registers
16+
using the `riscv_pac::CoreInterruptNumber` trait.
17+
- New `riscv::interrupt::{is_interrupt_enabled, disable_interrupt, enable_interrupt}` functions.
18+
- New methods and functions for dealing with pending interrupts in `mip` and `sip` registers
19+
using the `riscv_pac::CoreInterruptNumber` trait.
20+
- New `riscv::interrupt::is_interrupt_pending` function.
21+
- New `riscv::register::xip::clear_pending` atomic function for `mip` and `sip` registers.
22+
This function is marked as `unsafe`, as its availability depends both on the target chip
23+
and the target interrupt source.
24+
- Add `mseccfg` CSR
25+
- Add `mseccfgh` CSR
26+
27+
### Changed
28+
29+
- Use `cfg(any(target_arch = "riscv32", target_arch = "riscv64"))` instead of `cfg(riscv)`.
30+
- `riscv::pac_enum(unsafe CoreInterrupt)` now locates the vector table at the `.trap.vector`
31+
section instead of `.trap`.
32+
- Allow all bits to be set in Mcause::from_bits on 64-bit targets.
33+
34+
### Removed
35+
36+
- Removed custom build script, as `cfg(riscv)` is no longer necessary.
37+
- All the fields of `Mip` and `Sip` CSR proxies are now read-only. This change is motivated
38+
to avoid clearing unwanted interrupts triggered between CSR reads and CSR writes.
39+
40+
## [v0.14.0] - 2025-06-10
41+
42+
### Added
43+
44+
- CSR helper macro `write_composite_csr` for writing 64-bit CSRs on 32-bit targets.
45+
- Write utilities for `mcycle`, `minstret`
46+
- Add `senvcfg` CSR
47+
- Add `scontext` CSR
48+
- Add `mconfigptr` CSR
49+
- Bump MSRV to 1.67.0 for `log` to `ilog` name change
50+
- Add `mtval2` CSR
51+
52+
### Changed
53+
54+
- Simplify `riscv::interrupt::machine::nested`
55+
56+
## [v0.13.0] - 2025-02-18
57+
58+
### Added
59+
60+
- CSR helper macro to check for platform implementation
61+
62+
### Changed
63+
64+
- Make all CSR writes `unsafe` by default (#209)
65+
- Use `RISCV_MTVEC_ALIGN` to control the alignment constraint of the vector table
66+
- Simplify register macros with `cfg` field
67+
- Align assembly functions with `cortex-m`
68+
- Use CSR helper macros to define `marchid` register
69+
- Re-use `try_*` functions in `mcountinhibit`
70+
- Use CSR helper macros to define `mcause` register
71+
- Use CSR helper macros to define `medeleg` register
72+
- Use CSR helper macros to define `mideleg` register
73+
- Use CSR helper macros to define `mcounteren` register
74+
- Use CSR helper macros to define `mie` register
75+
- Use CSR helper macros to define `mimpid` register
76+
- Use CSR helper macros to define `misa` register
77+
- Use CSR helper macros to define `mip` register
78+
- Use CSR helper macros to define `mstatus` register
79+
- Use CSR helper macros to define `mstatush` register
80+
- Use CSR helper macros to define `mtvec` register
81+
- Use CSR helper macros to define `mtvendorid` register
82+
- Use CSR helper macros to define `satp` register
83+
- Use CSR helper macros to define `pmpcfgx` field types
84+
- Use CSR helper macros to define `scause` field types
85+
- Use CSR helper macros to define `sie` register
86+
- Use CSR helper macros to define `scounteren` field types
87+
- Use CSR helper macros to define `sip` register
88+
- Use CSR helper macros to define `sstatus` field types
89+
- Use CSR helper macros to define `stvec` field types
90+
- Add remaining `pmpcfg` CSRs from RISC-V privileged spec
91+
92+
## [v0.12.1] - 2024-10-20
93+
94+
### Changed
95+
96+
- Update critical-section to 1.2.0
97+
98+
## [v0.12.0] - 2024-10-19
99+
100+
### Added
101+
102+
- `riscv-macros` crate for `riscv-pac` enums.
103+
- Bump MSRV to 1.61.
104+
- Implementation of `riscv-pac` traits for `Interrupt` and `Exception` enums.
105+
- Tests for the `riscv-pac` trait implementations of `Interrupt` and `Exception` enums.
106+
- Add `Mcause::from(usize)` for use in unit tests
107+
- Add `Mstatus::from(usize)` for use in unit tests
108+
- Add `Mstatus.bits()`
109+
- Add `Eq` and `PartialEq` for `pmpcfgx::{Range, Permission}`
110+
- Add `Mstatus::update_*` helpers to manipulate Mstatus values without touching
111+
the CSR
112+
- Export `riscv::register::macros` module macros for external use
113+
- Add `riscv::register::mcountinhibit` module for `mcountinhibit` CSR
114+
- Add `Mcounteren` in-memory update functions
115+
- Add `Mstatus` vector extension support
116+
- Add fallible counterparts to all functions that `panic`
117+
- Add `riscv-pac` as a dependency
118+
- Add CSR-defining macros to create in-memory types
119+
120+
### Fixed
121+
122+
- Fixed `sip::set_ssoft` and `sip::clear_ssoft` using wrong address
123+
- Fixed assignment in `mstatus` unit tests.
124+
- delay implementation does not use binary labels in inline assembly.
125+
126+
## [v0.11.1] - 2024-02-15
127+
128+
### Changed
129+
130+
- Made `asm::wfi`, `fence`, `fence_i` and `sfence` safe (ie, removed `unsafe` from their definitions)
131+
- Made `cfg` variable selection more robust for custom targets
132+
133+
## [v0.11.0] - 2024-01-14
134+
135+
### Added
136+
137+
- Add `asm::ecall()`, a wrapper for implementing an `ecall` instruction
138+
- Add `nested` function for nested ISRs in `interrupt::machine` and `interrupt::supervisor`
139+
- `s-mode` feature for reexporting `interrupt::machine` or `interrupt::supervisor` to `interrupt`
140+
- Support for supervisor-level interrupts in `interrupt::supervisor`
141+
- Add CI workflow to check that CHANGELOG.md file has been modified in PRs
142+
- Add `read_csr_as_rv32`, `set_rv32`, and `clear_rv32` macros
143+
- Add `mstatus::uxl` and `mstatus::sxl`
144+
- Add `mstatus::ube`, `mstatus::sbe`, and `mstatus::mbe` endianness bit fields
145+
- Add `mstatush` registers (RISCV-32 only)
146+
- Add `asm::fence()`, a wrapper for implementing a `fence` instruction
147+
- Add `asm::fence_i()`, a wrapper for implementing a `fence.i` instruction
148+
- Add `TryFrom` implementation for `mcause::{Interrupt, Exception}` and `scause::{Interrupt, Exception}`
149+
150+
### Changed
151+
152+
- Cargo workspace for riscv and riscv-rt
153+
- Update `embedded-hal` dependency to v1.0.0 (bumps MSRV to 1.60)
154+
- `misa::MXL` renamed to `misa::XLEN`
155+
- Removed `bit_field` dependency
156+
- CI actions updated. They now use `checkout@v3` and `dtolnay/rust-toolchain`.
157+
- `mcause::{Interrupt, Exception}` and `scause::{Interrupt, Exception}` now implement `From` trait for `usize`
158+
- Set safety of `asm::nop` and `asm::delay` functions to safe.
159+
160+
### Fixed
161+
162+
- Fix `scause::Exception` missing `LoadMisaligned`
163+
- Fix `scause::Exception` missing `SupervisorEnvCall`
164+
- Removed user-level interrupts from `mcause::Interrupt` and `scause::Interrupt`
165+
- Removed user-level interrupts from `mstatus`
166+
- Removed machine environment call delegation from `medeleg`
167+
- Removed user-level interrupts from machine and supervisor mode interrupt-related registers.
168+
169+
### Removed
170+
171+
- User mode registers removed, as they are no longer supported in RISC-V
172+
- FCSR register operations removed to avoid UB (#148)
173+
174+
## [v0.10.1] - 2023-01-18
175+
176+
### Fixed
177+
178+
- Fix implementation for `SingleHartCriticalSection`
179+
180+
## [v0.10.0] - 2022-11-09
181+
182+
### Added
183+
184+
- `critical-section-single-hart` feature which provides an implementation for the `critical_section` crate for single-hart systems, based on disabling all interrupts.
185+
186+
## [v0.9.0] - 2022-10-06
187+
188+
### Fixed
189+
190+
- Fix `asm::delay()` to ensure count register is always reloaded
191+
- Fix reading marchid and mimpid (#107)
192+
193+
### Removed
194+
- `set_msoft`, `clear_msoft`, `set_mtimer` and `clear_mtimer` removed as part of fixing issue #62
195+
196+
## [v0.8.0] - 2022-04-20
197+
198+
### Added
199+
200+
- Add `#[cfg(riscv32)]` to `pmpcfg1` and `pmpcfg3` modules
201+
- Add enums `Range`, `Permission` for PMP configuration
202+
- Add `set_pmp()` and `clear_pmp()` functions to pmpcfg(x) modules
203+
- Add struct `Pmpcsr` and is returned from `pmpcfgx::read()`
204+
- Add `singleton!` macro
205+
- Add delay structure and methods using embedded-hal traits and `mcycle` register
206+
- Add `asm::delay()` function for assembly-based busy-loops
207+
- Add `asm::nop()`, a wrapper for implementing a `nop` instruction
208+
- Add missing `#[inline]` attribute to register reads, type conversations and `interrupt::free`
209+
210+
### Changed
211+
212+
- Use new `asm!` instead of `llvm_asm!`
213+
- Change `pmpcfgx::read()` macro to `read_csr_as!()` from `read_csr_as_usize!()`
214+
- Inline assembly is now always used
215+
- Update Minimum Supported Rust Version to 1.59
216+
217+
### Fixed
218+
219+
- Fix `sfence.vma` operand order
220+
221+
### Removed
222+
223+
- Remove `inline-asm` feature which is now always enabled
224+
225+
## [v0.7.0] - 2021-07-29
226+
227+
### Added
228+
229+
- Add `medeleg` register
230+
- Add `cycle[h]`, `instret[h]` and `mcounteren`
231+
- Add additional binaries for floating-point ABIs
232+
- Add support for `mxr`
233+
- Add support for `mprv`
234+
235+
### Changed
236+
237+
- Fix `scause::set`
238+
- Various formatting and comment fixes
239+
- Update `bare-metal` to `v1.0.0` removing `Nr` trait
240+
- Build targets on `docs.rs` are now RISC-V targets other than default ones
241+
242+
## [v0.6.0] - 2020-06-20
243+
244+
### Changed
245+
246+
- `Mtvec::trap_mode()`, `Stvec::trap_mode()` and `Utvec::trap_mode()` functions now return `Option<TrapMode>` (breaking change)
247+
- Updated Minimum Supported Rust Version to 1.42.0
248+
- Use `llvm_asm!` instead of `asm!`
249+
250+
### Removed
251+
252+
- vexriscv-specific registers were moved to the `vexriscv` crate
253+
254+
## [v0.5.6] - 2020-03-14
255+
256+
### Added
257+
258+
- Added vexriscv-specific registers
259+
260+
## [v0.5.5] - 2020-02-28
261+
262+
### Added
263+
264+
- Added `riscv32i-unknown-none-elf` target support
265+
- Added user trap setup and handling registers
266+
- Added write methods for the `mip` and `satp` registers
267+
- Added `mideleg` register
268+
- Added Changelog
269+
270+
### Changed
271+
272+
- Fixed MSRV by restricting the upper bound of `bare-metal` version
273+
- Added DCSR (Debug Control and Status Register) CSR support for the RISC-V
274+
275+
[Unreleased]: https://github.com/rust-embedded/riscv/compare/v0.10.1...HEAD
276+
[v0.10.1]: https://github.com/rust-embedded/riscv/compare/v0.10.0...v0.10.1
277+
[v0.10.0]: https://github.com/rust-embedded/riscv/compare/v0.9.0...v0.10.0
278+
[v0.9.0]: https://github.com/rust-embedded/riscv/compare/v0.8.0...v0.9.0
279+
[v0.8.0]: https://github.com/rust-embedded/riscv/compare/v0.7.0...v0.8.0
280+
[v0.7.0]: https://github.com/rust-embedded/riscv/compare/v0.6.0...v0.7.0
281+
[v0.6.0]: https://github.com/rust-embedded/riscv/compare/v0.5.6...v0.6.0
282+
[v0.5.6]: https://github.com/rust-embedded/riscv/compare/v0.5.5...v0.5.6
283+
[v0.5.5]: https://github.com/rust-embedded/riscv/compare/v0.5.4...v0.5.5u

0 commit comments

Comments
 (0)