xref: /haiku/src/system/boot/platform/riscv/cpu.cpp (revision af435dd1c9460acc910170b4f82f44bfd3f557c9)
1 /*
2  * Copyright 2004-2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 
7 #include "cpu.h"
8 
9 #include <OS.h>
10 #include <boot/platform.h>
11 #include <boot/stdio.h>
12 #include <boot/kernel_args.h>
13 #include <boot/stage2.h>
14 #include <arch/cpu.h>
15 #include <arch_kernel.h>
16 #include <arch_system_info.h>
17 
18 #include <string.h>
19 
20 
21 //#define TRACE_CPU
22 #ifdef TRACE_CPU
23 # define TRACE(x...) dprintf(x)
24 #else
25 # define TRACE(x...) ;
26 #endif
27 
28 
29 //	#pragma mark -
30 
31 
32 extern "C" void
33 cpu_init()
34 {
35 	gKernelArgs.num_cpus = 1;
36 
37 	// enable FPU
38 	MstatusReg status(Mstatus());
39 	status.fs = extStatusInitial;
40 	SetMstatus(status.val);
41 }
42 
43 
44 extern "C" void
45 platform_load_ucode(BootVolume& volume)
46 {
47 	// we have no ucode
48 }
49