lib: Add documentation for sbi_init() API
This patch adds doxygen style documentation for sbi_init() API. Signed-off-by: Anup Patel <anup.patel@wdc.com>
This commit is contained in:
parent
5ef104062d
commit
5f097cbf07
|
@ -14,6 +14,6 @@
|
|||
|
||||
struct sbi_scratch;
|
||||
|
||||
void __attribute__((noreturn)) sbi_init(struct sbi_scratch *scratch);
|
||||
void __noreturn sbi_init(struct sbi_scratch *scratch);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -27,8 +27,7 @@ static const char *logo =
|
|||
" | |\n"
|
||||
" |_|\n";
|
||||
|
||||
static void __attribute__((noreturn)) init_coldboot(struct sbi_scratch *scratch,
|
||||
u32 hartid)
|
||||
static void __noreturn init_coldboot(struct sbi_scratch *scratch, u32 hartid)
|
||||
{
|
||||
int rc;
|
||||
char str[64];
|
||||
|
@ -93,8 +92,7 @@ static void __attribute__((noreturn)) init_coldboot(struct sbi_scratch *scratch,
|
|||
scratch->next_addr, scratch->next_mode);
|
||||
}
|
||||
|
||||
static void __attribute__((noreturn)) init_warmboot(struct sbi_scratch *scratch,
|
||||
u32 hartid)
|
||||
static void __noreturn init_warmboot(struct sbi_scratch *scratch, u32 hartid)
|
||||
{
|
||||
int rc;
|
||||
struct sbi_platform *plat = sbi_platform_ptr(scratch);
|
||||
|
@ -141,7 +139,18 @@ static void __attribute__((noreturn)) init_warmboot(struct sbi_scratch *scratch,
|
|||
|
||||
static atomic_t coldboot_lottery = ATOMIC_INITIALIZER(0);
|
||||
|
||||
void __attribute__((noreturn)) sbi_init(struct sbi_scratch *scratch)
|
||||
/**
|
||||
* Initialize OpenSBI library for current HART and jump to next
|
||||
* booting stage.
|
||||
*
|
||||
* The function expects following:
|
||||
* 1. The 'mscratch' CSR is pointing to sbi_scratch of current HART
|
||||
* 2. Stack pointer (SP) is setup for current HART
|
||||
* 3. All interrupts are disabled in MIE CSR except MSIP
|
||||
*
|
||||
* @param scratch pointer to sbi_scratch of current HART
|
||||
*/
|
||||
void __noreturn sbi_init(struct sbi_scratch *scratch)
|
||||
{
|
||||
bool coldboot = FALSE;
|
||||
u32 hartid = sbi_current_hartid();
|
||||
|
|
Loading…
Reference in New Issue