mirror of
https://gitee.com/Vancouver2017/luban-lite-t3e-pro.git
synced 2025-12-16 03:18:54 +00:00
V1.0.6
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user