xref: /kvm-unit-tests/lib/riscv/asm/setup.h (revision 71f7db53297d39b7d9b779d6ecbd49f0d8da1dfc)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #ifndef _ASMRISCV_SETUP_H_
3 #define _ASMRISCV_SETUP_H_
4 #include <libcflat.h>
5 #include <asm/processor.h>
6 
7 #define NR_CPUS 256
8 extern struct thread_info cpus[NR_CPUS];
9 extern int nr_cpus;
10 extern uint64_t timebase_frequency;
11 int hartid_to_cpu(unsigned long hartid);
12 
13 void io_init(void);
14 void setup(const void *fdt, phys_addr_t freemem_start);
15 
16 #ifdef CONFIG_EFI
17 #include <efi.h>
18 efi_status_t setup_efi(efi_bootinfo_t *efi_bootinfo);
19 #endif
20 
21 #endif /* _ASMRISCV_SETUP_H_ */
22