27 KiB
27 KiB
Unreleased
0.15.1 – 2024-03-19
New Features
Fixes
Other Improvements
0.15.0 – 2024-03-04
Breaking changes
- replace software_interrupt! macro with generic function
- Use SegmentSelector in InterruptStackFrame
- add
InvalidStarSegmentSelectors
error - add
PcidTooBig
error - implement
Index<u8>
for IDT instead ofIndex<usize>
- change
cpu_flags
's type toRFlags
- fix
load_tss
andGlobalDescriptorTable
- add an immutable getter for the level 4 page table
- make
Cr2::read
return a result - remove
external_asm
andinline_asm
features - Allow the GDT to be of any length
- Remove software_interrupt! macro
- Remove usize trait impls
- Remove deprecated functions/flags
- VirtAddr improvements
- Add structures::gdt::Entry type
- Allow GDT to be loaded with shared reference
- seal off the
PageSize
trait - idt: Fixup Options structure and cleanup set_handler_fn
New Features
Fixes
Other Improvements
0.14.12 – 2023-02-09
New Features
Fixes
Other Improvements
0.14.11 – 2022-09-15
New Features
- Add missing IDT entries #CP and #HV`
- Adding next_higher_level to PageLevelIndex
- Adding
is_empty
to PageTable - Add
Descriptor::tss_segment_unchecked
- Add the
iretq
function to theInterruptStackFrameValue
struct. - add
flush_broadcast
andtlbsync
functions
Fixes
- Change Star::write() to use checked subtractions
- add workaround for recursive page tables with recursive index 511
- Fix off-by-one in documentation
- Fix misc doc typos
- add compiler fences to enable and disable
Other Improvements
- set repr to transparent for various types
- Remove unused
doc_cfg
feature - Enable
doc_auto_cfg
ondocs.rs
builds - Add Descriptor::dpl const method and use it in GDT construction
- Bump bitflags to 2.3.2
- Add
inline
attribute to segment functions
0.14.10 – 2022-07-10
New Features
- Add
registers::debug
- Provide null segment selector as associated constant on
SegmentSelector
- Add getters for the page table frame mapping
Fixes
Other Improvements
0.14.9 - 2022-03-31
New Features
- Address in
VirtAddrNotValid
andPhysAddrNotValid
is now public (#340).- This field now contains the whole invalid address (#347).
- Remove all uses of external assembly (#343)
external_asm
andinline_asm
features are deprecated and now have no effect.instructions
feature (on by default) now requires Rust 1.59- Specific MSRV now noted in
README
(#355)
- Implement
core::iter::Step
forVirtAddr
andPage
(#342)- This trait is only available on nightly.
- Gated behind
step_trait
feature flag
- Add
UCet
andSCet
registers (#349) - Use
rustversion
to mark certain functionsconst fn
on Rust 1.61 (#353) Entry::handler_addr()
is now public (#354)- Increase packed structure alignment (#362)
- Make more address methods
const fn
(#369)VirtAddr::as_ptr()
VirtAddr::as_mut_ptr()
PhysAddr::new()
PhysAddr::try_new()
Bug fixes and Documentation
- Fixed overflow bug in PageRangeInclusive (#351)
- Remove stabilized
const_fn_fn_ptr_basics
andconst_fn_trait_bound
features (#352) - Don't set
nomem
inload_tss
(#358) - Correctly initialize TSS's IOPB to be empty (#357)
- Improve
GlobalDescriptorTable::add_entry
error handling (#361) - Update
tss_segment
documentation (#366)
0.14.8 – 2022-02-03
0.14.7 – 2021-12-18
- fix: build error on the latest nightly (#329)
- add
set_general_handler
macro (#285) - Derive common traits for number, range and enum types (#315)
- Add the VMM Communication Exception (
#VC
) to theInterruptDescriptorTable
(#313) - fix: enable manipulation of
InterruptStackFrame
(#312) - fix docs for
page_table_index
(#318) - Remove redundant alignment check (#314)
- fix(idt): fix panic messages for
index
and#VC
(#321) - remove
const_assert!
in favor of std'sassert!
(#326) - Move bootloader integration test to separate CI job (#330)
0.14.6 – 2021-09-20
- New
registers::segmentation
module (#309), containing:instructions::segmentation::{Segment, Segment64, CS, DS, ES, FS, GS, SS}
structures::gdt::SegmentSelector
- Old locations still re-export all the types, so this is not a breaking change.
- Fixes build so that
cargo doc --no-default-features
succeeds.
0.14.5 – 2021-09-04
- Add
ExceptionVector
enum and additional flags toPageFaultErrorCode
(#303) - Add
clean_up
andclean_up_with_filter
methods to deallocate unused page tables (#264) - Rename some XCr0 and CR4 flags (#275)
- Expose
MapperFlush::new
andMapperFlushAll::new
constructor functions (#296) - Use
#[cfg(doc)]
instead of docs.rs-specific cfg flag (#287) - Some documentation updates:
- Update
bit_field
dependency (#306)
0.14.4 – 2021-07-19
- Add
instructions::tables::sgdt
(#279) - Improve control register bits (#273)
- Add
Cr0
bits:EXTENSION_TYPE
(ET) - Add
Cr4
bits:KEY_LOCKER
(KL)CONTROL_FLOW_ENFORCEMENT
(CET)PROTECTION_KEY_SUPERVISOR
(PKS)
- Add
XCr0
bits:BNDREG
,BNDCSR
,OPMASK
,ZMM_HI256
,HI16_ZMM
- Add consistency checks for
XCr0
bits
- Add
- Add
SelectorErrorCode
for parsing interrupt error codes from#TS
,#NP
,#SS
, and#GP
(#274) - Make
addr::{align_up, align_down}
const (#270) - Make
structures::idt
available on stable Rust (#271)- Use dummy types for the
HandlerFunc
s if the"abi_x86_interrupt"
feature is disabled - Add unsafe
set_handler_addr
that just takes aVirtAddr
- Use dummy types for the
- Add common abstractions for x86 Segments (#258)
- Add
SS
,CS
,DS
,ES
,FS
,GS
marker types - Add
Segment
trait for reading/writing the segment register - Add
Segment64
trait for reading/writing the segment base - Add
GS::swap()
- Deprecate the corresponding free functions:
cs
,set_cs
swap_gs
load_{ss,ds,es,fs,gs}
{wr,rd}{fs,gs}base
- Add
- Bug fixes:
0.14.3 – 2021-05-14
- Make the following types aliases of the new
PortGeneric
type (#248):Port<T> = PortGeneric<T, ReadWriteAccess>
PortReadOnly<T> = PortGeneric<T, ReadOnlyAccess>
PortWriteOnly<T> = PortGeneric<T, WriteOnlyAccess>
- The following methods no longer require the
nightly
feature to beconst fn
s (#255):PageTable::new
GlobalDescriptorTable::from_raw_slice
MappedFrame::{start_address, size}
Page<Size4KiB>::p1_index
- Add
Debug
implementation forInterruptDescriptorTable
(#253)- Improve
Debug
implementations forEntry
andEntryOptions
- Improve
0.14.2 – 2021-05-13
- Multiple improvements to assembly code (#251)
- Added
external_asm
implementations forbochs_breakpoint
andXCr0
- Updated
options
forasm!
blocks (to improve performance) - Updated docs to use
doc_cfg
- Added
0.14.1 – 2021-05-06
- Use new
const_fn_trait_bound
feature to fix build on latest nightly (#250)- Attention: The
const_fn
feature now requires at least Rust nightly2021-05-06
.
- Attention: The
- Add support for
sidt
instruction (#246) - Fix Debug and PartialEq implementations for IDT entry type (#249)
- Looser trait bounds for Port types (#247)
0.14.0 – 2021-04-11
- Breaking: Take the interrupt stack frame by value (not by reference) #242
- Breaking: Change
InterruptStackFrame::as_mut
to return aVolatile<_>
wrapper #242
0.13.5 – 2021-04-01
- Add support for
XCR0
register (#239)
0.13.4 – 2021-03-27
- Implement more fmt traits for addr types (#237)
0.13.3 – 2021-03-16
- Implement
Clone
forPageTable
(#236)
0.13.2 – 2021-02-02
- Fix build on latest nightly: The feature
const_in_array_repeat_expressions
was removed (#230)
0.13.1 – 2020-12-29
- PCID support instructions ([#169])(https://github.com/rust-osdev/x86_64/pull/169))
0.13.0 – 2020-12-28
- Breaking: Also return flags for
MapperAllSizes::translate()
(#207) - Breaking: Restructure the
TranslateResult
type and create separateTranslate
trait (#211) - Breaking: Rename
PhysToVirt
trait toPageTableFrameMapping
(#214) - Breaking: Use custom error types instead of
()
(#199) - Breaking: Remove deprecated items
UnusedPhysFrame
ExceptionStackFrame
VirtAddr::new_unchecked
interrupts::enable_interrupts_and_hlt
- Breaking: Make
DescriptorTablePointer::base
aVirtAddr
(#215) - Breaking: Change return type of
read_rip
toVirtAddr
(#216) - Breaking: Make writing the RFLAGS register unsafe (#219)
- Breaking: Remove
PortReadWrite
trait, which is no longer needed (#217) - Relaxe
Sized
requirement forFrameAllocator
inMapper::map_to
(204)
0.12.4 – 2020-12-28
- Fix bad conversion from llvm_asm! to asm! (#218)
- GDT: Add
load_unchecked
,from_raw_slice
, andas_raw_slice
(#210)
0.12.3 – 2020-10-31
- Use
asm!
instead of perma-unstablellvm_asm!
macro (#165) - Make
GlobalDescriptorTable::add_entry
a const fn (#191) - Rename
enable_interrupts_and_hlt
toenable_and_hlt
(#206) - Provide functions for accessing the underlying L4 table for mapper types (#184)
- Remove Trait constraint for
Port::new()
(#188)
0.12.2 – 2020-09-29
- Add additional
DescriptorFlags
and aliases compatible withsyscall
/sysenter
(#181) - Fix (another) build error on latest nightly (#186)
0.12.1 – 2020-09-24
- Fix build error on latest nightly (#182)
0.12.0 – 2020-09-23
- Breaking: Decouple instructions into a separate feature flag (#179)
- Gates the
instructions
module by a newinstructions
feature (enabled by default). - Rename the
stable
feature toexternal_asm
PageTable::new
is no longer aconst fn
on stable (i.e. without thenightly
feature)
- Gates the
0.11.8 – 2020-09-23
- Add
VirtAddr::is_null
(#180)
0.11.7 – 2020-09-11
- Fix const_item_mutation warnings added in latest Rust nightly (#178)
0.11.6 – 2020-09-11 (yanked)
- (accidental empty release)
0.11.5 – 2020-09-03
- Don't rely on promotion of
PageTableEntry::new
inside aconst fn
(#175)
0.11.4 – 2020-09-01
- Add a function for the
nop
instruction (#174)
0.11.3 – 2020-09-01
- (accidental release, yanked)
0.11.2 – 2020-08-13
- Add rdfsbase, rdgsbase, wrfsbase, wrgsbase (#172)
0.11.1
- Export
PhysAddrNotValid
andVirtAddrNotValid
error types (#163)
0.11.0
- Breaking: Handle parent table flags in Mapper methods (#114)
0.10.3
- Fix: Inclusive ranges is_empty() comparison (#156)
0.10.2
- Nightly Breakage: Use
llvm_asm!
instead of deprecatedasm!
macro (#151) - Return the correct RPL from GDT::add_entry() (#153)
0.10.1
- Add InterruptDescriptorTable::load_unsafe (#137)
0.10.0
- Breaking: Make
map_to
andupdate_flags
unsafe (#135) - Breaking: Make
FrameDeallocator::deallocate_frame
unsafe (#146) - Breaking: Don't pass small trivially copyable types by reference (#147)
- Various improvements to VirtAddr and PhysAddr (#141)
- Among other things, this renamed the
VirtAddr::new_unchecked
function tonew_truncate
.
- Among other things, this renamed the
- Add
const_fn!{}
macro to make functions const without duplication (#144)- Also makes some more functions
const
.
- Also makes some more functions
- Add
{PhysFrame,Page}::from_start_address_unchecked
(#142) - Use
#[inline]
everywhere (#145) - In
VirtAddr::new_truncate
, use shift instead of mul and div (#143) - Use
Self::new()
inInterruptDescriptorTable::reset()
(#148)
0.9.6
- Add an enable_interrupts_and_hlt function that executes
sti; hlt
(#138) - Fix some clippy warnings (#130)
- Resolve remaining clippy warnings and add clippy job to CI (#132)
0.9.5
- Add
#[inline]
attribute to small functions (#129)
0.9.4
- asm: add target_env = "musl" to pickup the underscore asm names (#128)
0.9.3
- Enable usage with non-nightly rust (#127)
0.9.2
- Remove the
cast
dependency (#124)
0.9.1
- Improve PageTableIndex and PageOffset (#122)
0.9.0
- Breaking: Return the UnusedPhysFrame on MapToError::PageAlreadyMapped (#118)
- Add User Mode registers (#119)
0.8.3
0.8.2
- Add support for cr4 control register (#111)
0.8.1
- Fix: Add required reexport for new UnusedPhysFrame type (#110)
0.8.0
- Breaking: Replace
ux
dependency with custom wrapper structs (#91) - Breaking: Add new UnsafePhysFrame type and use it in Mapper::map_to (#89)
- Breaking: Rename divide_by_zero field of interrupt descriptor table to divide_error (#108)
- Breaking: Introduce new diverging handler functions for double faults and machine check exceptions (#109)
- Possibly Breaking: Make Mapper trait object safe by adding
Self: Sized
bounds on generic functions (#84)
0.7.7
- Add
slice
andslice_mut
methods to IDT (#95)
0.7.6
- Use repr C to suppress not-ffi-safe when used with extern handler functions (#94)
0.7.5
- Add FsBase and GsBase register support (#87)
0.7.4
- Remove raw-cpuid dependency and use rdrand intrinsics (#85)
- Update integration tests to use new testing framework (#86)
0.7.3
- Add a new
OffsetPageTable
mapper type (#83)
0.7.2
- Add
instructions::bochs_breakpoint
andregisters::read_rip
functions (#79) - Mark all single instruction functions as
#[inline]
(#79) - Update GDT docs, add user_data_segment function and WRITABLE flag (#78)
- Reexport MappedPageTable on non-x86_64 platforms too (#82)
0.7.1
- Add ring-3 flag to GDT descriptor (#77)
0.7.0
- Breaking:
Port::read
andPortReadOnly::read
now take&mut self
instead of&self
(#76).
0.6.0
- Breaking: Make the
FrameAllocator
unsafe to implement. This way, we can force the implementer to guarantee that all frame allocators are valid. See #69 for more information.
0.5.5
- Use
cast
crate instead of less generalusize_conversions
crate.
0.5.4
- Update dependencies to latest versions (fix #67)
0.5.3
- Add
PortReadOnly
andPortWriteOnly
types ininstructions::port
module (#66).
0.5.2
- Update documentation of
MappedPageTable
: Require that passedlevel_4_table
is valid.
0.5.1
- Add
PageTable::{iter, iter_mut}
functions to iterate over page table entries.
0.5.0
Breaking
- The
random
module is now a submodule of theinstructions
module. - The
structures::paging
module was split into several submodules:- The
NotGiantPageSize
,PageRange
, andPageRangeInclusive
types were moved to a newpage
submodule. - The
PhysFrameRange
andPhysFrameRangeInclusive
types were moved to a newframe
submodule. - The
FrameError
andPageTableEntry
types were moved to a newpage_table
submodule. - The
MapperFlush
,MapToError
,UnmapError
, andFlagUpdateError
types were moved to a newmapper
submodule.
- The
- The
structures::paging
module received the following changes:- The
Mapper::translate_page
function now returns aResult
with a newTranslateError
error type. - The
NotRecursivelyMapped
error type was removed.
- The
- The
instructions::int3
function was moved into theinstructions::interrupts
module. - Removed some old deprecated functions.
- Made modifications of the interrupt stack frame unsafe by introducing a new wrapper type and an unsafe
as_mut
method.
Other
- Added a new
structures::paging::MapperAllSizes
trait with generic translation methods and implement it forMappedPageTable
andRecursivePageTable
. - Added a new
structures::paging::MappedPageTable
type that implements theMapper
andMapperAllSizes
traits. - Added a
software_interrupt
macro to invoke arbitraryint x
instructions. - Renamed the
ExceptionStackFrame
type toInterruptStackFrame
.
0.4.2
- Add
RdRand::get_u{16, 32, 64}
methods - Deprecate
RdRand::get
because it does not check for failure - Make
RdRand
Copy
0.4.1
- Add support for the RdRand instruction (random number generation)
0.4.0
Breaking
- Make
Mapper::map_to
andMapper::identity_map
unsafe because it is possible to break memory safety by passing invalid arguments. - Rename
FrameAllocator::alloc
toallocate_frame
andFrameDeallocator::dealloc
todeallocate_frame
. - Remove
From<os_bootinfo::FrameRange>
implementation forPhysFrameRange
- The
os_bootinfo
crate is no longer used by thebootloader
crate. - It is not possible to provide an implementation for all
os_bootinfo
versions.
- The
Other
- Update to 2018 edition
0.3.6
- Add a
SIZE
constant to thePage
type - Add two interrupt tests to the
testing
sub-crate