Files
opensbi/firmware/payloads/test_main.c
Damien Le Moal 42283461d3 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>
2019-01-21 09:58:33 +05:30

32 lines
538 B
C

/*
* 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();
}