2 Copyright © 2013-2015, The AROS Development Team. All rights reserved.
7 #include <aros/debug.h>
9 #include <proto/exec.h>
10 #include <proto/kernel.h>
11 #include <aros/symbolsets.h>
13 #include <resources/processor.h>
15 #include "processor_intern.h"
16 #include "processor_arch_intern.h"
20 LONG
Processor_Init(struct ProcessorBase
* ProcessorBase
)
22 struct ARMProcessorInformation
**sysprocs
;
25 D(bug("[processor.ARM] :%s()\n", __PRETTY_FUNCTION__
));
27 sysprocs
= AllocVec(ProcessorBase
->cpucount
* sizeof(APTR
), MEMF_ANY
| MEMF_CLEAR
);
28 if ((ProcessorBase
->Private1
= sysprocs
) == NULL
)
31 for (i
= 0; i
< ProcessorBase
->cpucount
; i
++)
33 sysprocs
[i
] = AllocMem(sizeof(struct ARMProcessorInformation
), MEMF_CLEAR
);
36 #if defined(__AROSEXEC_SMP__)
39 NewCreateTask(TASKTAG_AFFINITY
, KrnGetCPUMask(i
) },
41 TASKTAG_PC
, ReadProcessorInformation
,
42 TASKTAG_ARG1
, sysprocs
[i
],
49 ReadProcessorInformation(sysprocs
[i
]);
53 bug("[processor.ARM] Processor Details -:\n");
54 for (i
= 0; i
< ProcessorBase
->cpucount
; i
++)
56 bug("[processor.ARM] ");
57 if (ProcessorBase
->cpucount
> 1)
59 if (sysprocs
[i
]->FamilyString
)
61 bug("%s ARM%s Processor Core\n", sysprocs
[i
]->Vendor
, sysprocs
[i
]->FamilyString
);
65 bug("%s ARM Processor Core (unknown family)\n", sysprocs
[i
]->Vendor
);
68 if (sysprocs
[i
]->Features1
& FEATF_FPU_VFP4
)
70 bug("[processor.ARM] VFPv4 Co-Processor\n");
72 else if (sysprocs
[i
]->Features1
& FEATF_FPU_VFP3_16
)
74 bug("[processor.ARM] VFPv3 [16Double] Co-Processor\n");
76 else if (sysprocs
[i
]->Features1
& FEATF_FPU_VFP3
)
78 bug("[processor.ARM] VFPv3 Co-Processor\n");
80 else if (sysprocs
[i
]->Features1
& FEATF_FPU_VFP2
)
82 bug("[processor.ARM] VFPv2 Co-Processor\n");
86 bug("[processor.ARM] VFPv1 Co-Processor\n");
89 if (sysprocs
[i
]->Features1
& FEATF_NEON
)
91 bug("[processor.ARM] NEON SIMD Extensions\n");
94 bug("[processor.ARM] Cache Info:\n");
95 bug("[processor.ARM] L1 Data : %dKb\n", sysprocs
[i
]->L1DataCacheSize
);
96 bug("[processor.ARM] L1 Instr. : %dKb\n", sysprocs
[i
]->L1InstructionCacheSize
);
103 ADD2INITLIB(Processor_Init
, 1);