acpica update. (NicJA)
[AROS.git] / arch / m68k-all / kernel / platform_init.c
blobe7cdc20b328e721d864f85a740cf85f6a45aabe4
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;
29 if (SysBase->AttnFlags & AFF_68080)
30 pd->mmu_type = 0;
31 else if (SysBase->AttnFlags & AFF_68060)
32 pd->mmu_type = MMU060;
33 else if (SysBase->AttnFlags & AFF_68040)
34 pd->mmu_type = MMU040;
35 else if (SysBase->AttnFlags & AFF_68030)
36 pd->mmu_type = MMU030;
38 return TRUE;
41 ADD2INITLIB(Platform_Init, 10)