mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
[libcpu] Add CPU_FEATURE_WRN
The new CPU_FEATURE_WRN macro in the cpu features list will cause the kernel to emit a warning but not panic if the feature is missing.
This commit is contained in:
@@ -54,6 +54,10 @@ cpu_validate(cpu_data *c)
|
||||
#define CPU_FEATURE_OPT(name, ...) \
|
||||
log::verbose(logs::boot, " Flag %11s: %s", #name, features[cpu::feature::name] ? "yes" : "no");
|
||||
|
||||
#define CPU_FEATURE_WRN(name, feat_leaf, feat_sub, regname, bit) \
|
||||
log::verbose(logs::boot, " Flag %11s: %s", #name, features[cpu::feature::name] ? "yes" : "no"); \
|
||||
if (!features[cpu::feature::name]) log::warn(logs::boot, "Missing cpu feature %s but continuing", #name);
|
||||
|
||||
#define CPU_FEATURE_REQ(name, feat_leaf, feat_sub, regname, bit) \
|
||||
log::verbose(logs::boot, " Flag %11s: %s", #name, features[cpu::feature::name] ? "yes" : "no"); \
|
||||
kassert(features[cpu::feature::name], "Missing required CPU feature " #name );
|
||||
|
||||
Reference in New Issue
Block a user