xref: /haiku/src/system/kernel/arch/arm/arch_system_info.cpp (revision b671e9bbdbd10268a042b4f4cc4317ccd03d105e)
1 /*
2  * Copyright 2007, Haiku Inc. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  * 		François Revol <revol@free.fr>
7  *
8  * Copyright 2006, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
9  * All rights reserved. Distributed under the terms of the MIT License.
10  */
11 
12 #include <OS.h>
13 
14 #include <arch_cpu.h>
15 //#include <arch_platform.h>
16 #include <arch/system_info.h>
17 #include <boot/kernel_args.h>
18 
19 
20 static uint64 sCPUClockFrequency;
21 static uint64 sBusClockFrequency;
22 static enum cpu_types sCPUType;
23 static uint16 sCPURevision;
24 
25 status_t
26 arch_get_system_info(system_info *info, size_t size)
27 {
28 	info->cpu_type = sCPUType;
29 	info->cpu_revision = sCPURevision;
30 
31 	info->cpu_clock_speed = sCPUClockFrequency;
32 	info->bus_clock_speed = sBusClockFrequency;
33 
34 //	info->platform_type = M68KPlatform::Default()->PlatformType();
35 
36 	return B_OK;
37 }
38 
39 
40 status_t
41 arch_system_info_init(struct kernel_args *args)
42 {
43 
44 	int i;
45 
46 	sCPUClockFrequency = args->arch_args.cpu_frequency;
47 	sBusClockFrequency = args->arch_args.bus_frequency;
48 
49 	sCPURevision = args->arch_args.cpu_type; //XXX
50 #warning ARM:WRITEME
51 //	sCPUType = B_CPU_M68K;
52 
53 	return B_OK;
54 }
55