Skip to content
This repository has been archived by the owner on Feb 16, 2025. It is now read-only.

Add invalid parma error for ipi ext #32

Merged
merged 13 commits into from
Dec 4, 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
26 changes: 13 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ args = ["clean"]

[tasks.prototyper-nemu-build]
command = "cargo"
args = ["build", "-prustsbi-prototyper", "--release", "--features=nemu,payload"]
args = ["build", "-prustsbi-prototyper", "--release", "--target", "riscv64imac-unknown-none-elf", "-Zbuild-std=core", "--features=nemu,payload"]
env = {"RUSTFLAGS"="-C relocation-model=pie -C link-arg=-pie" }

[tasks.prototyper-nemu]
command = "rust-objcopy"
Expand Down
53 changes: 6 additions & 47 deletions prototyper/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ fn main() {
println!("cargo:rustc-link-search={}", out.display());
}

#[cfg(feature = "payload")]
const LINKER_SCRIPT: &[u8] = b"OUTPUT_ARCH(riscv)
ENTRY(_start)
SECTIONS {
. = 0x80000000;
sbi_start = .;
.text : ALIGN(8) {
*(.text.entry)
*(.text .text.*)
Expand All @@ -34,6 +34,7 @@ SECTIONS {
*(.rela*)
__rel_dyn_end = .;
}

erodata = .;
.data : ALIGN(8) {
sdata = .;
Expand All @@ -53,56 +54,14 @@ SECTIONS {
/DISCARD/ : {
*(.eh_frame)
}

. = ALIGN(8);
sbi_end = .;

.text 0x80100000 : ALIGN(8) {
*(.fw_fdt)
}
.text 0x80200000 : ALIGN(8) {
*(.payload)
}
}";

#[cfg(not(feature = "payload"))]
const LINKER_SCRIPT: &[u8] = b"OUTPUT_ARCH(riscv)
ENTRY(_start)
SECTIONS {
. = 0x80000000;
.text : ALIGN(8) {
*(.text.entry)
*(.text .text.*)
}
.rodata : ALIGN(8) {
srodata = .;
*(.rodata .rodata.*)
*(.srodata .srodata.*)
. = ALIGN(8);
}
.dynsym : ALIGN(8) {
*(.dynsym)
}
.rela.dyn : ALIGN(8) {
__rel_dyn_start = .;
*(.rela*)
__rel_dyn_end = .;
}

erodata = .;

.data : ALIGN(8) {
sdata = .;
*(.data .data.*)
*(.sdata .sdata.*)
. = ALIGN(8);
edata = .;
}
sidata = LOADADDR(.data);
.bss (NOLOAD) : ALIGN(8) {
*(.bss.uninit)
sbss = .;
*(.bss .bss.*)
*(.sbss .sbss.*)
ebss = .;
}
/DISCARD/ : {
*(.eh_frame)
}
}";
Loading