prism2.device: Compiler delint
[AROS.git] / arch / x86-all / processor / processor_init.c
blob231ccd97362e3437c13c465ef2bdca18a6f1fb80
1 /*
2 Copyright © 2010-2011, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/debug.h>
8 #include <proto/exec.h>
9 #include <proto/kernel.h>
10 #include <aros/symbolsets.h>
12 #include "processor_intern.h"
13 #include "processor_arch_intern.h"
15 LONG Processor_Init(struct ProcessorBase * ProcessorBase)
17 struct X86ProcessorInformation **sysprocs;
18 unsigned int i;
20 D(bug("[processor.x86] :%s()\n", __PRETTY_FUNCTION__));
22 sysprocs = AllocVec(ProcessorBase->cpucount * sizeof(APTR), MEMF_ANY | MEMF_CLEAR);
23 if (sysprocs == NULL)
24 return FALSE;
26 for (i = 0; i < ProcessorBase->cpucount; i++)
28 sysprocs[i] = AllocMem(sizeof(struct X86ProcessorInformation), MEMF_CLEAR);
29 if (!sysprocs[i])
30 return FALSE;
33 ProcessorBase->Private1 = sysprocs;
35 /* Boot CPU is number 0. Fill in its data. */
36 ReadProcessorInformation(sysprocs[0]);
38 return TRUE;
41 ADD2INITLIB(Processor_Init, 1);