Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,11 @@ jobs:
run: cargo semver-checks check-release -p bootloader_api
- name: Check semver
run: cargo semver-checks check-release

typos:
name: Check typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: cargo install typos-cli --locked
- run: typos
4 changes: 2 additions & 2 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ See our [migration guides](docs/migration/README.md) for details.

# 0.8.2

- Change the way the kernel entry point is called to honor alignement ABI ([#81](https://github.com/rust-osdev/bootloader/pull/81))
- Change the way the kernel entry point is called to honor alignment ABI ([#81](https://github.com/rust-osdev/bootloader/pull/81))

# 0.8.1

Expand Down Expand Up @@ -276,7 +276,7 @@ See our [migration guides](docs/migration/README.md) for details.

- The level 4 page table is only recursively mapped if the `recursive_page_table` feature is enabled.
- Rename `BootInfo::p4_table_addr` to `BootInfo::recursive_page_table_addr` (only present if the cargo feature is enabled)
- Remove `From<PhysFrameRange>` implemenations for x86_64 `FrameRange`
- Remove `From<PhysFrameRange>` implementations for x86_64 `FrameRange`
- This only works when the versions align, so it is not a good general solution.
- Remove unimplemented `BootInfo::package` field.
- Make `BootInfo` non-exhaustive so that we can add additional fields later.
Expand Down
4 changes: 4 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[default.extend-words]
inout = "inout"
rela = "rela"
hda = "hda"
4 changes: 2 additions & 2 deletions common/src/entropy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fn get_random_64(rd_rand: RdRand) -> Option<u64> {

/// Gather entropy by reading the current time with the `RDTSC` instruction if it's available.
///
/// This function doesn't provide particulary good entropy, but it's better than nothing.
/// This function doesn't provide particularly good entropy, but it's better than nothing.
fn tsc_entropy() -> [u8; 32] {
let mut entropy = [0; 32];

Expand All @@ -77,7 +77,7 @@ fn tsc_entropy() -> [u8; 32] {

/// Gather entropy by reading the current count of PIT channel 1-3.
///
/// This function doesn't provide particulary good entropy, but it's always available.
/// This function doesn't provide particularly good entropy, but it's always available.
fn pit_entropy() -> [u8; 32] {
let mut entropy = [0; 32];

Expand Down
2 changes: 1 addition & 1 deletion common/src/legacy_memory_region.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ where
/// Converts this type to a boot info memory map.
///
/// The memory map is placed in the given `regions` slice. The length of the given slice
/// must be at least the value returned by [`len`] pluse 1.
/// must be at least the value returned by [`len`] plus 1.
///
/// The return slice is a subslice of `regions`, shortened to the actual number of regions.
pub fn construct_memory_map(
Expand Down
12 changes: 6 additions & 6 deletions common/src/load_kernel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ where
let mem_size = segment.mem_size();
let file_size = segment.file_size();

// calculate virual memory region that must be zeroed
// calculate virtual memory region that must be zeroed
let zero_start = virt_start_addr + file_size;
let zero_end = virt_start_addr + mem_size;

Expand Down Expand Up @@ -297,7 +297,7 @@ where
///
/// Panics if a page is not mapped in `self.page_table`.
fn copy_from(&self, addr: VirtAddr, buf: &mut [u8]) {
// We can't know for sure that contigous virtual address are contigous
// We can't know for sure that contiguous virtual address are contiguous
// in physical memory, so we iterate of the pages spanning the
// addresses, translate them to frames and copy the data.

Expand Down Expand Up @@ -334,7 +334,7 @@ where
let start_phys_addr = phys_addr.start_address() + start_offset_in_frame;

// These are the offsets from the start address. These correspond
// to the destionation indices in `buf`.
// to the destination indices in `buf`.
let start_offset_in_buf = Step::steps_between(&addr, &start_copy_address).unwrap();

// Calculate the source slice.
Expand Down Expand Up @@ -364,7 +364,7 @@ where
///
/// Panics if a page is not mapped in `self.page_table`.
unsafe fn copy_to(&mut self, addr: VirtAddr, buf: &[u8]) {
// We can't know for sure that contigous virtual address are contigous
// We can't know for sure that contiguous virtual address are contiguous
// in physical memory, so we iterate of the pages spanning the
// addresses, translate them to frames and copy the data.

Expand Down Expand Up @@ -401,7 +401,7 @@ where
let start_phys_addr = phys_addr.start_address() + start_offset_in_frame;

// These are the offsets from the start address. These correspond
// to the destionation indices in `buf`.
// to the destination indices in `buf`.
let start_offset_in_buf = Step::steps_between(&addr, &start_copy_address).unwrap();

// Calculate the source slice.
Expand Down Expand Up @@ -639,7 +639,7 @@ where
// by a Load segment.
check_is_in_load(elf_file, rela.get_offset())?;

// Calculate the destionation of the relocation.
// Calculate the destination of the relocation.
let addr = self.virtual_address_offset + rela.get_offset();
let addr = VirtAddr::new(addr);

Expand Down
4 changes: 2 additions & 2 deletions src/disk_image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ pub enum DiskImageError {
/// An unexpected I/O error occurred
#[error("I/O error: {message}:\n{error}")]
Io {
/// Desciption of the failed I/O operation
/// Description of the failed I/O operation
message: &'static str,
/// The I/O error that occured
/// The I/O error that occurred
error: io::Error,
},
}
Expand Down