Changeset View
Changeset View
Standalone View
Standalone View
stand/powerpc/ofw/cas.c
Show All 23 Lines | |||||
*/ | */ | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include <openfirm.h> | #include <openfirm.h> | ||||
#include <stand.h> | #include <stand.h> | ||||
#include <sys/endian.h> | |||||
/* #define CAS_DEBUG */ | /* #define CAS_DEBUG */ | ||||
#ifdef CAS_DEBUG | #ifdef CAS_DEBUG | ||||
#define DPRINTF(fmt, ...) printf(fmt, ## __VA_ARGS__) | #define DPRINTF(fmt, ...) printf(fmt, ## __VA_ARGS__) | ||||
#else | #else | ||||
#define DPRINTF(fmt, ...) do { ; } while (0) | #define DPRINTF(fmt, ...) do { ; } while (0) | ||||
#endif | #endif | ||||
/* PVR */ | /* PVR */ | ||||
▲ Show 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | static struct ibm_arch_vec { | ||||
uint8_t num_opts; | uint8_t num_opts; | ||||
struct opt_vec_ignore vec1; | struct opt_vec_ignore vec1; | ||||
struct opt_vec_ignore vec2; | struct opt_vec_ignore vec2; | ||||
struct opt_vec_ignore vec3; | struct opt_vec_ignore vec3; | ||||
struct opt_vec4 vec4; | struct opt_vec4 vec4; | ||||
struct opt_vec5 vec5; | struct opt_vec5 vec5; | ||||
} __packed ibm_arch_vec = { | } __packed ibm_arch_vec = { | ||||
/* pvr_list */ { | /* pvr_list */ { | ||||
{ PVR_CPU_MASK, PVR_CPU_P8 }, /* POWER8 */ | { htobe32(PVR_CPU_MASK), htobe32(PVR_CPU_P8) }, | ||||
{ PVR_CPU_MASK, PVR_CPU_P8E }, /* POWER8E */ | { htobe32(PVR_CPU_MASK), htobe32(PVR_CPU_P8E) }, | ||||
{ PVR_CPU_MASK, PVR_CPU_P8NVL }, /* POWER8NVL */ | { htobe32(PVR_CPU_MASK), htobe32(PVR_CPU_P8NVL) }, | ||||
{ PVR_CPU_MASK, PVR_CPU_P9 }, /* POWER9 */ | { htobe32(PVR_CPU_MASK), htobe32(PVR_CPU_P9) }, | ||||
{ PVR_ISA_MASK, PVR_ISA_207 }, /* All ISA 2.07 */ | { htobe32(PVR_ISA_MASK), htobe32(PVR_ISA_207) }, | ||||
{ PVR_ISA_MASK, PVR_ISA_300 }, /* All ISA 3.00 */ | { htobe32(PVR_ISA_MASK), htobe32(PVR_ISA_300) }, | ||||
{ 0, 0xffffffffu } /* terminator */ | { 0, 0xffffffffu } /* terminator */ | ||||
}, | }, | ||||
4, /* num_opts (4 actually means 5 option vectors) */ | 4, /* num_opts (4 actually means 5 option vectors) */ | ||||
{ OV_IGN_LEN, OV_IGN }, /* OV1 */ | { OV_IGN_LEN, OV_IGN }, /* OV1 */ | ||||
{ OV_IGN_LEN, OV_IGN }, /* OV2 */ | { OV_IGN_LEN, OV_IGN }, /* OV2 */ | ||||
{ OV_IGN_LEN, OV_IGN }, /* OV3 */ | { OV_IGN_LEN, OV_IGN }, /* OV3 */ | ||||
/* OV4 (can't be ignored) */ { | /* OV4 (can't be ignored) */ { | ||||
sizeof(struct opt_vec4) - 2, /* length (n-2) */ | sizeof(struct opt_vec4) - 2, /* length (n-2) */ | ||||
▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines |