Skip to content
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
487 changes: 322 additions & 165 deletions Cargo.lock

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions components/axplat_crates/examples/hello-kernel/linker_x86_64.lds
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
ENTRY(_start)
SECTIONS
{
. = 0xffff800000200000;
_skernel = .;

.text : ALIGN(4K) {
_stext = .;
*(.text.boot)
*(.text .text.*)
_etext = .;
}

.rodata : ALIGN(4K) {
_srodata = .;
*(.rodata .rodata.*)
_erodata = .;
}

.data : ALIGN(4K) {
_sdata = .;
*(.data .data.*)
*(.got .got.*)
}

. = ALIGN(4K);
_percpu_start = .;
_percpu_end = _percpu_start + SIZEOF(.percpu);
.percpu 0x0 : AT(_percpu_start) {
_percpu_load_start = .;
*(.percpu .percpu.*)
_percpu_load_end = .;
. = _percpu_load_start + ALIGN(64) * 1;
}
. = _percpu_end;
_edata = .;

.bss : AT(.) ALIGN(4K) {
*(.bss.stack)
. = ALIGN(4K);
_sbss = .;
*(.bss .bss.*)
*(COMMON)
_ebss = .;
}

_ekernel = .;

/DISCARD/ : {
*(.comment)
}
}
52 changes: 52 additions & 0 deletions components/axplat_crates/examples/irq-kernel/linker_x86_64.lds
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
ENTRY(_start)
SECTIONS
{
. = 0xffff800000200000;
_skernel = .;

.text : ALIGN(4K) {
_stext = .;
*(.text.boot)
*(.text .text.*)
_etext = .;
}

.rodata : ALIGN(4K) {
_srodata = .;
*(.rodata .rodata.*)
_erodata = .;
}

.data : ALIGN(4K) {
_sdata = .;
*(.data .data.*)
*(.got .got.*)
}

. = ALIGN(4K);
_percpu_start = .;
_percpu_end = _percpu_start + SIZEOF(.percpu);
.percpu 0x0 : AT(_percpu_start) {
_percpu_load_start = .;
*(.percpu .percpu.*)
_percpu_load_end = .;
. = _percpu_load_start + ALIGN(64) * 1;
}
. = _percpu_end;
_edata = .;

.bss : AT(.) ALIGN(4K) {
*(.bss.stack)
. = ALIGN(4K);
_sbss = .;
*(.bss .bss.*)
*(COMMON)
_ebss = .;
}

_ekernel = .;

/DISCARD/ : {
*(.comment)
}
}
52 changes: 52 additions & 0 deletions components/axplat_crates/examples/smp-kernel/linker_x86_64.lds
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
ENTRY(_start)
SECTIONS
{
. = 0xffff800000200000;
_skernel = .;

.text : ALIGN(4K) {
_stext = .;
*(.text.boot)
*(.text .text.*)
_etext = .;
}

.rodata : ALIGN(4K) {
_srodata = .;
*(.rodata .rodata.*)
_erodata = .;
}

.data : ALIGN(4K) {
_sdata = .;
*(.data .data.*)
*(.got .got.*)
}

. = ALIGN(4K);
_percpu_start = .;
_percpu_end = _percpu_start + SIZEOF(.percpu);
.percpu 0x0 : AT(_percpu_start) {
_percpu_load_start = .;
*(.percpu .percpu.*)
_percpu_load_end = .;
. = _percpu_load_start + ALIGN(64) * 1;
}
. = _percpu_end;
_edata = .;

.bss : AT(.) ALIGN(4K) {
*(.bss.stack)
. = ALIGN(4K);
_sbss = .;
*(.bss .bss.*)
*(COMMON)
_ebss = .;
}

_ekernel = .;

/DISCARD/ : {
*(.comment)
}
}
1 change: 1 addition & 0 deletions os/StarryOS/kernel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ ax-ipi = { workspace = true }
static-keys = "0.8"
ddebug = "0.5"
kprobe = "0.5"
kmod-loader = "0.2"
some-serial = { workspace = true, optional = true }
sg200x-bsp = { workspace = true, optional = true }
# 0.9 to match sg200x-bsp's internal tock-registers; cannot use workspace (0.10)
Expand Down
2 changes: 1 addition & 1 deletion os/StarryOS/kernel/src/ebpf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ impl BpfVm {
let class = insn.class();
if class == bpf_insn::BPF_JMP || class == bpf_insn::BPF_JMP32 {
let op = insn.code & 0xf0;
if op != bpf_insn::BPF_EXIT && op != bpf_insn::BPF_CALL_OP {
if op != bpf_insn::BPF_EXIT && op != 0x80 {
let target = pc as isize + 1 + insn.off as isize;
if target < 0 || target as usize >= insns.len() {
warn!("bpf verifier: jump out of bounds at pc={pc} target={target}");
Expand Down
Loading