Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/arm64/cpu_feat.c
| Show All 26 Lines | |||||
| #include <sys/param.h> | #include <sys/param.h> | ||||
| #include <sys/systm.h> | #include <sys/systm.h> | ||||
| #include <sys/kernel.h> | #include <sys/kernel.h> | ||||
| #include <machine/cpu.h> | #include <machine/cpu.h> | ||||
| #include <machine/cpu_feat.h> | #include <machine/cpu_feat.h> | ||||
| SYSCTL_NODE(_hw, OID_AUTO, feat, CTLFLAG_RD, 0, "CPU features/errata"); | |||||
| /* TODO: Make this a list if we ever grow a callback other than smccc_errata */ | /* TODO: Make this a list if we ever grow a callback other than smccc_errata */ | ||||
| static cpu_feat_errata_check_fn cpu_feat_check_cb = NULL; | static cpu_feat_errata_check_fn cpu_feat_check_cb = NULL; | ||||
| void | void | ||||
| enable_cpu_feat(uint32_t stage) | enable_cpu_feat(uint32_t stage) | ||||
| { | { | ||||
| struct cpu_feat **featp, *feat; | struct cpu_feat **featp, *feat; | ||||
| uint32_t midr; | uint32_t midr; | ||||
| ▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | if (errata_status == ERRATA_AFFECTED && | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* Shouldn't be possible */ | /* Shouldn't be possible */ | ||||
| MPASS(errata_status != ERRATA_UNKNOWN); | MPASS(errata_status != ERRATA_UNKNOWN); | ||||
| feat->feat_enable(feat, errata_status, errata_list, | if (feat->feat_enable(feat, errata_status, errata_list, | ||||
| errata_count); | errata_count)) | ||||
| feat->feat_enabled = true; | |||||
| } | } | ||||
| } | } | ||||
| static void | static void | ||||
| enable_cpu_feat_after_dev(void *dummy __unused) | enable_cpu_feat_after_dev(void *dummy __unused) | ||||
| { | { | ||||
| MPASS(PCPU_GET(cpuid) == 0); | MPASS(PCPU_GET(cpuid) == 0); | ||||
| enable_cpu_feat(CPU_FEAT_AFTER_DEV); | enable_cpu_feat(CPU_FEAT_AFTER_DEV); | ||||
| Show All 10 Lines | |||||