diff options
author | Nathan Ringo <nathan@remexre.com> | 2024-08-27 00:19:53 -0500 |
---|---|---|
committer | Nathan Ringo <nathan@remexre.com> | 2024-08-27 00:19:53 -0500 |
commit | f988949d7e57f005fba0dbc14491ed9b065c2e36 (patch) | |
tree | 43669191f1af8c3be057d15186266f33b8dddbff /boards/qemu-virt/qemu-virt.s | |
parent | d10960f7fc664189f70fb634581958a4a1fd99fa (diff) |
[boards/qemu-virt] Adds a canary for stack overflow.
Diffstat (limited to 'boards/qemu-virt/qemu-virt.s')
-rw-r--r-- | boards/qemu-virt/qemu-virt.s | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/boards/qemu-virt/qemu-virt.s b/boards/qemu-virt/qemu-virt.s index b9544be..c7e7642 100644 --- a/boards/qemu-virt/qemu-virt.s +++ b/boards/qemu-virt/qemu-virt.s @@ -19,6 +19,11 @@ _start: ## Set up hart0's stack. la sp, hart0_initial_stack_top + ## Write a canary to hart0's stack. + li t0, 0xdead0bad0defaced + la t1, hart0_initial_stack + sd t0, (t1) + ## Put the address of the DeviceTree into the first argument position ## for hart0_boot. c.mv a0, a1 |