1 /* 2 * Copyright 2007, François Revol, revol@free.fr. 3 * Distributed under the terms of the MIT License. 4 * 5 * Copyright 2006, Ingo Weinhold <bonefish@cs.tu-berlin.de>. 6 * All rights reserved. Distributed under the terms of the MIT License. 7 */ 8 9 #include <arch_platform.h> 10 11 #include <new> 12 13 #include <KernelExport.h> 14 15 #include <boot/kernel_args.h> 16 //#include <platform/openfirmware/openfirmware.h> 17 #include <real_time_clock.h> 18 #include <util/kernel_cpp.h> 19 20 21 static M68KPlatform *sM68KPlatform; 22 23 24 // constructor M68KPlatform(m68k_platform_type platformType)25M68KPlatform::M68KPlatform(m68k_platform_type platformType) 26 : fPlatformType(platformType) 27 { 28 } 29 30 // destructor ~M68KPlatform()31M68KPlatform::~M68KPlatform() 32 { 33 } 34 35 // Default 36 M68KPlatform * Default()37M68KPlatform::Default() 38 { 39 return sM68KPlatform; 40 } 41 42 43 // # pragma mark - 44 45 46 status_t arch_platform_init(struct kernel_args * kernelArgs)47arch_platform_init(struct kernel_args *kernelArgs) 48 { 49 // only Atari supported for now 50 switch (kernelArgs->arch_args.platform) { 51 #if 0 52 case M68K_PLATFORM_AMIGA: 53 sM68KPlatform = instanciate_m68k_platform_amiga(); 54 break; 55 #endif 56 case M68K_PLATFORM_ATARI: 57 sM68KPlatform = instanciate_m68k_platform_atari(); 58 break; 59 #if 0 60 case M68K_PLATFORM_MAC: 61 sM68KPlatform = instanciate_m68k_platform_mac(); 62 break; 63 case M68K_PLATFORM_NEXT: 64 sM68KPlatform = instanciate_m68k_platform_next(); 65 break; 66 #endif 67 default: 68 panic("unknown platform d\n", kernelArgs->arch_args.platform); 69 } 70 71 return sM68KPlatform->Init(kernelArgs); 72 } 73 74 75 status_t arch_platform_init_post_vm(struct kernel_args * kernelArgs)76arch_platform_init_post_vm(struct kernel_args *kernelArgs) 77 { 78 return sM68KPlatform->InitPostVM(kernelArgs); 79 } 80 81 82 status_t arch_platform_init_post_thread(struct kernel_args * kernelArgs)83arch_platform_init_post_thread(struct kernel_args *kernelArgs) 84 { 85 return B_OK; 86 } 87