Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adapt data layout to match LLVM's #420

Merged
merged 8 commits into from
Feb 16, 2024
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: 4 additions & 0 deletions bios/stage-4/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
let memory_map: &mut [E820MemoryRegion] = unsafe {
core::slice::from_raw_parts_mut(
info.memory_map_addr as *mut _,
info.memory_map_len.try_into().unwrap(),

Check warning on line 31 in bios/stage-4/src/main.rs

View workflow job for this annotation

GitHub Actions / Clippy

use of a fallible conversion when an infallible one could be used
)
};

Expand Down Expand Up @@ -262,6 +262,10 @@
#[derive(Clone)]
struct IdentityMapped;
impl AcpiHandler for IdentityMapped {
// TODO FIXME: This inline(never) annotation is required. Without it,
// LLVM replaces the `search_for_on_bios` call below with a `ud2`
// instruction. See https://github.com/rust-osdev/bootloader/issues/425
#[inline(never)]
unsafe fn map_physical_region<T>(
&self,
physical_address: usize,
Expand Down
2 changes: 1 addition & 1 deletion i386-code16-boot-sector.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"arch": "x86",
"cpu": "i386",
"data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128",
"data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128",
"dynamic-linking": false,
"executables": true,
"linker-flavor": "ld.lld",
Expand Down
2 changes: 1 addition & 1 deletion i386-code16-stage-2.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"arch": "x86",
"cpu": "i386",
"data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128",
"data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128",
"dynamic-linking": false,
"executables": true,
"linker-flavor": "ld.lld",
Expand Down
2 changes: 1 addition & 1 deletion i686-stage-3.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"arch": "x86",
"cpu": "i386",
"data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128",
"data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128",
"dynamic-linking": false,
"executables": true,
"linker-flavor": "ld.lld",
Expand Down
2 changes: 1 addition & 1 deletion x86_64-stage-4.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"arch": "x86_64",
"code-model": "kernel",
"cpu": "x86-64",
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128",
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128",
"disable-redzone": true,
"features": "-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-3dnow,-3dnowa,-avx,-avx2,+soft-float",
"linker": "rust-lld",
Expand Down
Loading