config: fix build with external compiler by passing the sysroot where needed
[AROS.git] / arch / m68k-all / kernel / platform_init.c
blob9995d28111a2af5eaaa6525a3725695dc310605c
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #define __KERNEL_NOLIBBASE__
8 #include <aros/multiboot.h>
9 #include <aros/symbolsets.h>
10 #include <asm/cpu.h>
11 #include <exec/lists.h>
12 #include <proto/exec.h>
14 #include <inttypes.h>
16 #include "kernel_base.h"
17 #include "kernel_debug.h"
18 #include "kernel_intern.h"
20 static int Platform_Init(struct KernelBase *LIBBASE)
22 struct PlatformData *pd;
24 pd = AllocMem(sizeof(struct PlatformData), MEMF_PUBLIC|MEMF_CLEAR);
25 if (!pd)
26 return FALSE;
28 LIBBASE->kb_PlatformData = pd;
30 if (SysBase->AttnFlags & AFF_68060)
31 pd->mmu_type = MMU060;
32 else if (SysBase->AttnFlags & AFF_68040)
33 pd->mmu_type = MMU040;
34 else if (SysBase->AttnFlags & AFF_68030)
35 pd->mmu_type = MMU030;
37 return TRUE;
40 ADD2INITLIB(Platform_Init, 10)