Skip to content

Commit

Permalink
Merge pull request #420 from tsatke/patch-1
Browse files Browse the repository at this point in the history
adapt data layout to match LLVM's
  • Loading branch information
phil-opp authored Feb 16, 2024
2 parents 2e9fe88 + 2ebe789 commit bc8c554
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions bios/stage-4/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@ fn detect_rsdp() -> Option<PhysAddr> {
#[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

0 comments on commit bc8c554

Please sign in to comment.