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

Commit

Permalink
Merge pull request #32 from woshiluo/ipi_error
Browse files Browse the repository at this point in the history
Add invalid parma error for ipi ext
  • Loading branch information
guttatus authored Dec 4, 2024
2 parents eb2f8bb + 943f5dc commit 5494737
Show file tree
Hide file tree
Showing 16 changed files with 537 additions and 306 deletions.
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

0 comments on commit 5494737

Please sign in to comment.