alsa.audio: add debug logs
[AROS.git] / workbench / tools / ShowConfig / cpu_arm.c
blobc29cff32de8f8b6e25f7c83021b5238c2e7b2aa9
1 #include <resources/processor.h>
2 #include <proto/processor.h>
4 #include <stdio.h>
6 #include "cpuspecific.h"
8 #ifdef __arm__
10 /* First byte of these strings is implementer ID */
11 static const char *vendors[] =
13 "\x41" "ARM Ltd",
14 "\x44" "Digital Equipment Corp",
15 "\x4D" "Freescale Semiconductor",
16 "\x51" "Qualcomm",
17 "\x56" "Marvell Inc",
18 "\x69" "Intel Corporation",
19 NULL
22 #define FLAGS_NUM 5
24 static const char *features[] =
26 "VFP",
27 "VFPv3",
28 "Neon",
29 "Thumb",
30 "ThumbEE"
33 void PrintCPUSpecificInfo(ULONG i, APTR ProcessorBase)
35 BOOL found;
36 ULONG vendor = 0;
37 ULONG part = 0;
38 ULONG version = 0;
39 BOOL flags[FLAGS_NUM];
40 struct TagItem tags [FLAGS_NUM + 5] =
42 {GCIT_SelectedProcessor , i },
43 {GCIT_Model , (IPTR)&part },
44 {GCIT_Version , (IPTR)&version },
45 {GCIT_Vendor , (IPTR)&vendor },
46 {GCIT_SupportsVFP , (IPTR)&flags[0 ]},
47 {GCIT_SupportsVFPv3 , (IPTR)&flags[1 ]},
48 {GCIT_SupportsNeon , (IPTR)&flags[2 ]},
49 {GCIT_SupportsThumb , (IPTR)&flags[3 ]},
50 {GCIT_SupportsThumbEE , (IPTR)&flags[4 ]},
51 {TAG_DONE , 0 }
54 GetCPUInfo(tags);
56 found = FALSE;
57 for (i = 0; vendors[i]; i++)
59 const char *name = vendors[i];
61 if (name[0] == vendor)
63 printf("\t\t%s", &name[1]);
64 found = TRUE;
65 break;
69 if (!found)
70 printf("\t\tUnknown vendor (0x%X)", vendor);
72 printf(" 0x%X revision %d variant %d\n", part, ARM_REVISION(version), ARM_VARIANT(version));
74 printf("\t\tFeatures: ");
76 found = FALSE;
77 for (i = 0; i < FLAGS_NUM; i++)
80 if (flags[i])
82 found = TRUE;
83 printf("%s ", features[i]);
87 if (!found)
88 printf("None");
89 printf("\n");
92 #endif