diff --git a/headers/private/kernel/arch/ppc/arch_platform.h b/headers/private/kernel/arch/ppc/arch_platform.h index f87c02e36a..d4550cda52 100644 --- a/headers/private/kernel/arch/ppc/arch_platform.h +++ b/headers/private/kernel/arch/ppc/arch_platform.h @@ -9,15 +9,21 @@ struct real_time_data; +enum ppc_platform_type { + PPC_PLATFORM_OPEN_FIRMWARE = 0, +}; + namespace BPrivate { class PPCPlatform { public: - PPCPlatform(); + PPCPlatform(ppc_platform_type platformType); virtual ~PPCPlatform(); static PPCPlatform *Default(); + inline ppc_platform_type PlatformType() const { return fPlatformType; } + 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; @@ -31,6 +37,9 @@ public: virtual uint32 GetHardwareRTC() = 0; virtual void ShutDown(bool reboot) = 0; + +private: + ppc_platform_type fPlatformType; }; } // namespace BPrivate diff --git a/src/system/kernel/arch/ppc/arch_platform.cpp b/src/system/kernel/arch/ppc/arch_platform.cpp index 6833341645..022d51038d 100644 --- a/src/system/kernel/arch/ppc/arch_platform.cpp +++ b/src/system/kernel/arch/ppc/arch_platform.cpp @@ -19,7 +19,8 @@ static PPCPlatform *sPPCPlatform; // constructor -PPCPlatform::PPCPlatform() +PPCPlatform::PPCPlatform(ppc_platform_type platformType) + : fPlatformType(platformType) { } @@ -93,7 +94,8 @@ debug_command_of_enter(int argc, char **argv) // constructor PPCOpenFirmware::PPCOpenFirmware() - : fInput(-1), + : PPCPlatform(PPC_PLATFORM_OPEN_FIRMWARE), + fInput(-1), fOutput(-1), fRTC(-1) {