This commit is contained in:
刘可亮
2024-09-03 11:16:08 +08:00
parent cf270df8d6
commit 803cac77d5
2931 changed files with 614364 additions and 31222 deletions

View File

@@ -1,8 +1,11 @@
/*
* Copyright (C) 2020 ArtInChip Technology Co.,Ltd
* Copyright (C) 2023-2024 ArtInChip Technology Co.,Ltd
*
* SPDX-License-Identifier: Apache-2.0
*
* Author: Dehuang Wu <dehuang.wu@artinchip.com>
*/
#include <rtconfig.h>
#define LREG ld
#define SREG sd
#define REGBYTES 8
@@ -11,6 +14,9 @@
#define SYM_SIZE 0x18
.extern boot_params_stash
#ifndef AIC_BOOTLOADER
.extern boot_arg
#endif
.global save_boot_params
.type save_boot_params, %function
@@ -38,5 +44,20 @@ save_boot_params:
SREG s11, REGBYTES * 19(t0)
SREG sp, REGBYTES * 20(t0)
SREG ra, REGBYTES * 21(t0)
#ifndef AIC_BOOTLOADER
beqz a1, 2f
/* copy boot_arg from SPL to OS */
la t0, boot_arg
mv t1, a1
/* boot_arg size is 256 bytes */
addi t2, t1, 0xFF
1:
LREG t3, (t1)
SREG t3, (t0)
addi t0, t0, REGBYTES
addi t1, t1, REGBYTES
bltu t1, t2, 1b
2:
#endif
j save_boot_params_ret