mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 23:41:23 +01:00
payload: rename dummy payload to test payload
Use a more neutral term more representative of this payload intent. Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
This commit is contained in:

committed by
Anup Patel

parent
868ad0b0e5
commit
42283461d3
31
firmware/payloads/test_main.c
Normal file
31
firmware/payloads/test_main.c
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Western Digital Corporation or its affiliates.
|
||||
*
|
||||
* Authors:
|
||||
* Anup Patel <anup.patel@wdc.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <sbi/sbi_ecall_interface.h>
|
||||
|
||||
#define wfi() \
|
||||
do { \
|
||||
__asm__ __volatile__ ("wfi" ::: "memory"); \
|
||||
} while (0)
|
||||
|
||||
static void sbi_puts(const char *str)
|
||||
{
|
||||
while (*str) {
|
||||
SBI_ECALL_1(SBI_ECALL_CONSOLE_PUTCHAR, *str);
|
||||
str++;
|
||||
}
|
||||
}
|
||||
|
||||
void test_main(unsigned long a0, unsigned long a1)
|
||||
{
|
||||
sbi_puts("\nTest payload running\n");
|
||||
|
||||
while (1)
|
||||
wfi();
|
||||
}
|
Reference in New Issue
Block a user