mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/riscv: initialize .bss section
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Bobby Eshleman <bobbyeshleman@gmail.com>
This commit is contained in:
1 parent
537ed7a41b
commit
cfa0409f7c
2 files changed
+17
No files matched your search
@@ -1,3 +1,4 @@
|
|||||||
|
#include <asm/asm.h>
|
||||||
#include <asm/riscv_encoding.h>
|
#include <asm/riscv_encoding.h>
|
||||||
|
|
||||||
.section .text.header, "ax", %progbits
|
.section .text.header, "ax", %progbits
|
||||||
@@ -18,6 +19,14 @@ ENTRY(start)
|
|||||||
li t0, SSTATUS_FS
|
li t0, SSTATUS_FS
|
||||||
csrc CSR_SSTATUS, t0
|
csrc CSR_SSTATUS, t0
|
||||||
|
|
||||||
|
/* Clear the BSS */
|
||||||
|
la t3, __bss_start
|
||||||
|
la t4, __bss_end
|
||||||
|
.L_clear_bss:
|
||||||
|
REG_S zero, (t3)
|
||||||
|
add t3, t3, __SIZEOF_POINTER__
|
||||||
|
bltu t3, t4, .L_clear_bss
|
||||||
|
|
||||||
la sp, cpu0_boot_stack
|
la sp, cpu0_boot_stack
|
||||||
li t0, STACK_SIZE
|
li t0, STACK_SIZE
|
||||||
add sp, sp, t0
|
add sp, sp, t0
|
||||||
|
|||||||
@@ -7,6 +7,14 @@
|
|||||||
unsigned char __initdata cpu0_boot_stack[STACK_SIZE]
|
unsigned char __initdata cpu0_boot_stack[STACK_SIZE]
|
||||||
__aligned(STACK_SIZE);
|
__aligned(STACK_SIZE);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* To be sure that .bss isn't zero. It will simplify code of
|
||||||
|
* .bss initialization.
|
||||||
|
* TODO:
|
||||||
|
* To be deleted when the first real .bss user appears
|
||||||
|
*/
|
||||||
|
int dummy_bss __attribute__((unused));
|
||||||
|
|
||||||
void __init noreturn start_xen(unsigned long bootcpu_id,
|
void __init noreturn start_xen(unsigned long bootcpu_id,
|
||||||
paddr_t dtb_addr)
|
paddr_t dtb_addr)
|
||||||
{
|
{
|
||||||
|
|||||||