Reorganized the boot platform dependencies in the kernel a bit.
Basically the architecture specific code is now responsible to init and make use of the platform specific code, now. The reason being that we have only one kernel per platform and thus cannot decide at compile time, which platform to use (if any). The PPC implementation features an abstract base class PPCPlatform (implemented for all supported platforms) through which platform support is provided. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15824 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
* Copyright 2005, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _KERNEL_PLATFORM_H
|
||||
#define _KERNEL_PLATFORM_H
|
||||
#ifndef _KERNEL_ARCH_PLATFORM_H
|
||||
#define _KERNEL_ARCH_PLATFORM_H
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
@@ -13,12 +13,12 @@ struct kernel_args;
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
status_t platform_init(struct kernel_args *kernelArgs);
|
||||
status_t platform_init_post_vm(struct kernel_args *kernelArgs);
|
||||
status_t arch_platform_init(struct kernel_args *kernelArgs);
|
||||
status_t arch_platform_init_post_vm(struct kernel_args *kernelArgs);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
|
||||
#endif // _KERNEL_PLATFORM_H
|
||||
#endif // _KERNEL_ARCH_PLATFORM_H
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright 2006, Ingo Weinhold <[email protected]>.
|
||||
* 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>
|
||||
|
||||
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 char SerialDebugGetChar() = 0;
|
||||
virtual void SerialDebugPutChar(char c) = 0;
|
||||
};
|
||||
|
||||
} // namespace BPrivate
|
||||
|
||||
using BPrivate::PPCPlatform;
|
||||
|
||||
|
||||
#endif // _KERNEL_PPC_ARCH_PLATFORM_H
|
||||
Reference in New Issue
Block a user