Update raw-cpuid

This commit is contained in:
Jeremy Soller
2022-03-01 18:12:06 -07:00
parent d234df37c9
commit ae3bdea4bc
3 changed files with 10 additions and 11 deletions

8
Cargo.lock generated
View File

@@ -75,7 +75,7 @@ dependencies = [
"linked_list_allocator 0.9.0",
"log",
"memoffset",
"raw-cpuid 8.1.2",
"raw-cpuid 10.2.0",
"redox_syscall",
"rmm",
"rustc-cfg",
@@ -149,13 +149,11 @@ dependencies = [
[[package]]
name = "raw-cpuid"
version = "8.1.2"
version = "10.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fdf7d9dbd43f3d81d94a49c1c3df73cc2b3827995147e6cf7f89d4ec5483e73"
checksum = "929f54e29691d4e6a9cc558479de70db7aa3d98cd6fe7ab86d7507aa2886b9d2"
dependencies = [
"bitflags",
"cc",
"rustc_version",
]
[[package]]

View File

@@ -38,7 +38,7 @@ byteorder = { version = "1", default-features = false }
fdt = { git = "https://gitlab.redox-os.org/thomhuds/fdt.git", default-features = false }
[target.'cfg(target_arch = "x86_64")'.dependencies]
raw-cpuid = "8.0.0"
raw-cpuid = "10.2.0"
x86 = { version = "0.32.0", default-features = false }
[features]

View File

@@ -11,10 +11,8 @@ pub fn cpu_info<W: Write>(w: &mut W) -> Result {
writeln!(w, "Vendor: {}", info.as_string())?;
}
if let Some(info) = cpuid.get_extended_function_info() {
if let Some(brand) = info.processor_brand_string() {
writeln!(w, "Model: {}", brand)?;
}
if let Some(brand) = cpuid.get_processor_brand_string() {
writeln!(w, "Model: {}", brand.as_str())?;
}
if let Some(info) = cpuid.get_processor_frequency_info() {
@@ -92,7 +90,7 @@ pub fn cpu_info<W: Write>(w: &mut W) -> Result {
if info.has_rdrand() { write!(w, " rdrand")? };
}
if let Some(info) = cpuid.get_extended_function_info() {
if let Some(info) = cpuid.get_extended_processor_and_feature_identifiers() {
if info.has_64bit_mode() { write!(w, " lm")? };
if info.has_rdtscp() { write!(w, " rdtscp")? };
if info.has_1gib_pages() { write!(w, " pdpe1gb")? };
@@ -101,6 +99,9 @@ pub fn cpu_info<W: Write>(w: &mut W) -> Result {
if info.has_prefetchw() { write!(w, " prefetchw")? };
if info.has_lzcnt() { write!(w, " lzcnt")? };
if info.has_lahf_sahf() { write!(w, " lahf_lm")? };
}
if let Some(info) = cpuid.get_advanced_power_mgmt_info() {
if info.has_invariant_tsc() { write!(w, " constant_tsc")? };
}