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_PPC_ARCH_PLATFORM_H
6#define _KERNEL_PPC_ARCH_PLATFORM_H
7
8#include <arch/platform.h>
9
10struct real_time_data;
11
12enum ppc_platform_type {
13	PPC_PLATFORM_OPEN_FIRMWARE = 0,
14};
15
16namespace BPrivate {
17
18class PPCPlatform {
19public:
20	PPCPlatform(ppc_platform_type platformType);
21	virtual ~PPCPlatform();
22
23	static PPCPlatform *Default();
24
25	inline ppc_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
41private:
42	ppc_platform_type	fPlatformType;
43};
44
45}	// namespace BPrivate
46
47using BPrivate::PPCPlatform;
48
49
50#endif	// _KERNEL_PPC_ARCH_PLATFORM_H
51