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_cpu_defs.h>
16#include <arch_kernel.h>
17#include <arch_system_info.h>
18
19#include <string.h>
20
21
22//#define TRACE_CPU
23#ifdef TRACE_CPU
24# define TRACE(x...) dprintf(x)
25#else
26# define TRACE(x...) ;
27#endif
28
29
30//	#pragma mark -
31
32
33extern "C" void
34cpu_init()
35{
36	gKernelArgs.num_cpus = 1;
37
38	SstatusReg status{.val = Sstatus()};
39	status.fs = extStatusInitial; // enable FPU
40	status.xs = extStatusOff;
41	SetSstatus(status.val);
42}
43
44
45extern "C" void
46platform_load_ucode(BootVolume& volume)
47{
48	// we have no ucode
49}
50