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

Bump Rust toolchain #115

Merged
merged 7 commits into from
Mar 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
File renamed without changes.
661 changes: 361 additions & 300 deletions Cargo.lock

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions crates/sel4-initialize-tls/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,17 @@ impl TlsReservationLayout {
}
} else if cfg!(target_arch = "x86_64") {
let tcb_size = 2 * mem::size_of::<usize>(); // could probably get away with just 1x word size
let thread_pointer_offset = segment_layout
.size()
.next_multiple_of(segment_layout.align());
Self {
footprint: Layout::from_size_align(
segment_layout.size() + tcb_size,
thread_pointer_offset + tcb_size,
segment_layout.align(),
)
.unwrap(),
segment_offset: 0,
thread_pointer_offset: segment_layout.size(),
thread_pointer_offset,
}
} else {
unreachable!();
Expand Down
4 changes: 2 additions & 2 deletions crates/sel4-initialize-tls/src/on_stack/reserve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ cfg_if! {
common_asm!(),
r#"
mov r10, rsp
sub r10, rdi // rdi: segment_size
and r10, rsi // rsi: segment_align_down_mask
sub r10, rdi // rdi: reservation_size
and r10, rsi // rsi: reservation_align_down_mask
mov rax, r10 // save reservation_start for later
and r10, ~(16 - 1) // align stack
mov rsp, r10
Expand Down
2 changes: 1 addition & 1 deletion hacking/kani/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ RUN set -eux; \
USER $UID

# Optimize by matching rust-toolchain.toml
ENV DEFAULT_TOOLCHAIN=nightly-2024-01-06
ENV DEFAULT_TOOLCHAIN=nightly-2024-03-09

RUN curl -sSf -L https://sh.rustup.rs | \
bash -s -- -y --no-modify-path --default-toolchain $DEFAULT_TOOLCHAIN
Expand Down
4 changes: 2 additions & 2 deletions hacking/nix/scope/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ let

rustToolchainParams = {
channel = "nightly";
date = "2024-01-06";
sha256 = "sha256-f/bfc14czb37QltdurN3BOFER6MxOpHOB82lI7Pj9ys=";
date = "2024-03-09";
sha256 = "sha256-0npjLjvxhiQcBh+W9URwg0BQN7CuItPEtsRAgOb6/1o=";
};

mkRustToolchain = target: fenix.targets.${target}.toolchainOf rustToolchainParams;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ in mkTask {

features = [ "deflate" ];

extraProfile = {
opt-level = 1; # TODO bug on 2 and 3
};

layers = [
crateUtils.defaultIntermediateLayer
{
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
#

[toolchain]
channel = "nightly-2024-01-06"
channel = "nightly-2024-03-09"
components = [ "rustfmt", "rust-src", "rustc-dev", "llvm-tools-preview" ]
1 change: 1 addition & 0 deletions support/targets/aarch64-sel4-microkit-minimal.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"arch": "aarch64",
"crt-objects-fallback": "false",
"data-layout": "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128",
"description": null,
"disable-redzone": true,
"eh-frame-header": false,
"env": "sel4",
Expand Down
1 change: 1 addition & 0 deletions support/targets/aarch64-sel4-microkit.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"arch": "aarch64",
"crt-objects-fallback": "false",
"data-layout": "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128",
"description": null,
"disable-redzone": true,
"env": "sel4",
"exe-suffix": ".elf",
Expand Down
1 change: 1 addition & 0 deletions support/targets/aarch64-sel4-minimal.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"arch": "aarch64",
"crt-objects-fallback": "false",
"data-layout": "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128",
"description": null,
"disable-redzone": true,
"eh-frame-header": false,
"env": "sel4",
Expand Down
1 change: 1 addition & 0 deletions support/targets/aarch64-sel4.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"arch": "aarch64",
"crt-objects-fallback": "false",
"data-layout": "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128",
"description": null,
"disable-redzone": true,
"env": "sel4",
"exe-suffix": ".elf",
Expand Down
1 change: 1 addition & 0 deletions support/targets/armv7a-sel4-minimal.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"c-enum-min-bits": 8,
"crt-objects-fallback": "false",
"data-layout": "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64",
"description": null,
"disable-redzone": true,
"eh-frame-header": false,
"emit-debug-gdb-scripts": false,
Expand Down
1 change: 1 addition & 0 deletions support/targets/armv7a-sel4.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"c-enum-min-bits": 8,
"crt-objects-fallback": "false",
"data-layout": "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64",
"description": null,
"disable-redzone": true,
"emit-debug-gdb-scripts": false,
"env": "sel4",
Expand Down
1 change: 1 addition & 0 deletions support/targets/riscv32imac-sel4-minimal.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"cpu": "generic-rv32",
"crt-objects-fallback": "false",
"data-layout": "e-m:e-p:32:32-i64:64-n32-S128",
"description": null,
"eh-frame-header": false,
"emit-debug-gdb-scripts": false,
"env": "sel4",
Expand Down
1 change: 1 addition & 0 deletions support/targets/riscv32imac-sel4.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"cpu": "generic-rv32",
"crt-objects-fallback": "false",
"data-layout": "e-m:e-p:32:32-i64:64-n32-S128",
"description": null,
"emit-debug-gdb-scripts": false,
"env": "sel4",
"exe-suffix": ".elf",
Expand Down
1 change: 1 addition & 0 deletions support/targets/riscv32imafc-sel4-minimal.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"cpu": "generic-rv32",
"crt-objects-fallback": "false",
"data-layout": "e-m:e-p:32:32-i64:64-n32-S128",
"description": null,
"eh-frame-header": false,
"emit-debug-gdb-scripts": false,
"env": "sel4",
Expand Down
1 change: 1 addition & 0 deletions support/targets/riscv32imafc-sel4.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"cpu": "generic-rv32",
"crt-objects-fallback": "false",
"data-layout": "e-m:e-p:32:32-i64:64-n32-S128",
"description": null,
"emit-debug-gdb-scripts": false,
"env": "sel4",
"exe-suffix": ".elf",
Expand Down
1 change: 1 addition & 0 deletions support/targets/riscv64gc-sel4-minimal.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"cpu": "generic-rv64",
"crt-objects-fallback": "false",
"data-layout": "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128",
"description": null,
"eh-frame-header": false,
"emit-debug-gdb-scripts": false,
"env": "sel4",
Expand Down
1 change: 1 addition & 0 deletions support/targets/riscv64gc-sel4.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"cpu": "generic-rv64",
"crt-objects-fallback": "false",
"data-layout": "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128",
"description": null,
"emit-debug-gdb-scripts": false,
"env": "sel4",
"exe-suffix": ".elf",
Expand Down
1 change: 1 addition & 0 deletions support/targets/riscv64imac-sel4-minimal.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"cpu": "generic-rv64",
"crt-objects-fallback": "false",
"data-layout": "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128",
"description": null,
"eh-frame-header": false,
"emit-debug-gdb-scripts": false,
"env": "sel4",
Expand Down
1 change: 1 addition & 0 deletions support/targets/riscv64imac-sel4.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"cpu": "generic-rv64",
"crt-objects-fallback": "false",
"data-layout": "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128",
"description": null,
"emit-debug-gdb-scripts": false,
"env": "sel4",
"exe-suffix": ".elf",
Expand Down
3 changes: 2 additions & 1 deletion support/targets/x86_64-sel4-minimal.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"code-model": "small",
"cpu": "x86-64",
"crt-objects-fallback": "false",
"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",
"description": null,
"disable-redzone": true,
"eh-frame-header": false,
"env": "sel4",
Expand Down
3 changes: 2 additions & 1 deletion support/targets/x86_64-sel4.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"code-model": "small",
"cpu": "x86-64",
"crt-objects-fallback": "false",
"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",
"description": null,
"disable-redzone": true,
"env": "sel4",
"exe-suffix": ".elf",
Expand Down
Loading