xref: /haiku/headers/private/kernel/arch/sparc/arch_platform.h (revision 1f52c921e27aa442370e1bd4adc021acf2b78b64)
1 /*
2  * Copyright 2006, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
3  * All rights reserved. Distributed under the terms of the MIT License.
4  */
5 #ifndef _KERNEL_SPARC_ARCH_PLATFORM_H
6 #define _KERNEL_SPARC_ARCH_PLATFORM_H
7 
8 #include <arch/platform.h>
9 
10 struct real_time_data;
11 
12 enum sparc_platform_type {
13 	PPC_PLATFORM_OPEN_FIRMWARE = 0,
14 };
15 
16 namespace BPrivate {
17 
18 class SparcPlatform {
19 public:
20 	SparcPlatform(sparc_platform_type platformType);
21 	virtual ~SparcPlatform();
22 
23 	static SparcPlatform *Default();
24 
25 	inline sparc_platform_type PlatformType() const	{ return fPlatformType; }
26 
27 	virtual status_t Init(struct kernel_args *kernelArgs) = 0;
28 	virtual status_t InitSerialDebug(struct kernel_args *kernelArgs) = 0;
29 	virtual status_t InitPostVM(struct kernel_args *kernelArgs) = 0;
30 	virtual status_t InitRTC(struct kernel_args *kernelArgs,
31 		struct real_time_data *data) = 0;
32 
33 	virtual char SerialDebugGetChar() = 0;
34 	virtual void SerialDebugPutChar(char c) = 0;
35 
36 	virtual	void SetHardwareRTC(uint32 seconds) = 0;
37 	virtual	uint32 GetHardwareRTC() = 0;
38 
39 	virtual	void ShutDown(bool reboot) = 0;
40 
41 private:
42 	sparc_platform_type	fPlatformType;
43 };
44 
45 }	// namespace BPrivate
46 
47 using BPrivate::SparcPlatform;
48 
49 
50 #endif	// _KERNEL_SPARC_ARCH_PLATFORM_H
51