mirror of
https://review.haiku-os.org/haiku
synced 2025-01-22 06:16:03 +01:00
e55e1a0e66
device in the Open Firmware implementation of boot loader and pass its path to the kernel, where it's opened and used for getting/setting the real time. The expensive atomic_*64() on PPC 32-bit make things a bit more complicated. Moreover, missing 64 bit multiplication and division instructions won't really allow system_time() to be anywhere near as fast as on x86. :-/ git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15837 a95241bf-73f2-0310-859d-f6bbb57e9c96
40 lines
955 B
C++
40 lines
955 B
C++
/*
|
|
* Copyright 2006, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
|
|
* All rights reserved. Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _KERNEL_PPC_ARCH_PLATFORM_H
|
|
#define _KERNEL_PPC_ARCH_PLATFORM_H
|
|
|
|
#include <arch/platform.h>
|
|
|
|
struct real_time_data;
|
|
|
|
namespace BPrivate {
|
|
|
|
class PPCPlatform {
|
|
public:
|
|
PPCPlatform();
|
|
virtual ~PPCPlatform();
|
|
|
|
static PPCPlatform *Default();
|
|
|
|
virtual status_t Init(struct kernel_args *kernelArgs) = 0;
|
|
virtual status_t InitSerialDebug(struct kernel_args *kernelArgs) = 0;
|
|
virtual status_t InitPostVM(struct kernel_args *kernelArgs) = 0;
|
|
virtual status_t InitRTC(struct kernel_args *kernelArgs,
|
|
struct real_time_data *data) = 0;
|
|
|
|
virtual char SerialDebugGetChar() = 0;
|
|
virtual void SerialDebugPutChar(char c) = 0;
|
|
|
|
virtual void SetHardwareRTC(uint32 seconds) = 0;
|
|
virtual uint32 GetHardwareRTC() = 0;
|
|
};
|
|
|
|
} // namespace BPrivate
|
|
|
|
using BPrivate::PPCPlatform;
|
|
|
|
|
|
#endif // _KERNEL_PPC_ARCH_PLATFORM_H
|