1 #include <resources/processor.h>
2 #include <proto/processor.h>
7 #include "cpuspecific.h"
11 /* First byte of these strings is implementer ID */
12 static const char *vendors
[] =
15 "\x44" "Digital Equipment Corp",
16 "\x4D" "Freescale Semiconductor",
19 "\x69" "Intel Corporation",
25 static const char *features
[] =
34 void PrintCPUSpecificInfo(char *buffer
, LONG bufsize
, ULONG i
, APTR ProcessorBase
)
37 char *bufptr
= buffer
;
43 BOOL flags
[FLAGS_NUM
];
44 struct TagItem tags
[FLAGS_NUM
+ 5] =
46 {GCIT_SelectedProcessor
, i
},
47 {GCIT_Model
, (IPTR
)&part
},
48 {GCIT_Version
, (IPTR
)&version
},
49 {GCIT_Vendor
, (IPTR
)&vendor
},
50 {GCIT_SupportsVFP
, (IPTR
)&flags
[0 ]},
51 {GCIT_SupportsVFPv3
, (IPTR
)&flags
[1 ]},
52 {GCIT_SupportsNeon
, (IPTR
)&flags
[2 ]},
53 {GCIT_SupportsThumb
, (IPTR
)&flags
[3 ]},
54 {GCIT_SupportsThumbEE
, (IPTR
)&flags
[4 ]},
61 for (i
= 0; vendors
[i
]; i
++)
63 const char *name
= vendors
[i
];
65 if (name
[0] == vendor
)
67 snprintf(bufptr
, bufsize
, "%s", &name
[1]);
68 slen
= strlen(bufptr
);
79 snprintf(bufptr
, bufsize
, "Unknown vendor (0x%X)", vendor
);
80 slen
= strlen(bufptr
);
85 snprintf(bufptr
, bufsize
, "0x%X revision %d variant %d\n",
86 part
, ARM_REVISION(version
), ARM_VARIANT(version
));
87 slen
= strlen(bufptr
);
95 for (i
= 0; bufsize
> 1 && i
< FLAGS_NUM
; i
++)
101 snprintf(bufptr
, bufsize
, "%s ", features
[i
]);
102 slen
= strlen(bufptr
);
112 sprintf(bufptr
, "None");
113 slen
= strlen(bufptr
);
117 sprintf(bufptr
, "\n");