pvmfw: Expect proper CPU compatible "arm,armv8"

Crosvm was previously using the wrong compatible string. As it got
fixed, pvmfw needs to expect the new (proper) value during validation
and DT parsing.

Bug: 335470851
Test: TH # needs to share topic with corresponding crosvm patch
Change-Id: I17becbe57ec9aa6b22d48744f04a58299cf9e4c6
diff --git a/pvmfw/platform.dts b/pvmfw/platform.dts
index e63e42f..237b1cb 100644
--- a/pvmfw/platform.dts
+++ b/pvmfw/platform.dts
@@ -82,7 +82,7 @@
 
 		cpu0: cpu@0 {
 			device_type = "cpu";
-			compatible = "arm,arm-v8";
+			compatible = "arm,armv8";
 			enable-method = "psci";
 			reg = <0x0>;
 			capacity-dmips-mhz = <PLACEHOLDER>;
@@ -114,7 +114,7 @@
 		};
 		cpu1: cpu@1 {
 			device_type = "cpu";
-			compatible = "arm,arm-v8";
+			compatible = "arm,armv8";
 			enable-method = "psci";
 			reg = <0x1>;
 			capacity-dmips-mhz = <PLACEHOLDER>;
@@ -146,7 +146,7 @@
 		};
 		cpu2: cpu@2 {
 			device_type = "cpu";
-			compatible = "arm,arm-v8";
+			compatible = "arm,armv8";
 			enable-method = "psci";
 			reg = <0x2>;
 			capacity-dmips-mhz = <PLACEHOLDER>;
@@ -178,7 +178,7 @@
 		};
 		cpu3: cpu@3 {
 			device_type = "cpu";
-			compatible = "arm,arm-v8";
+			compatible = "arm,armv8";
 			enable-method = "psci";
 			reg = <0x3>;
 			capacity-dmips-mhz = <PLACEHOLDER>;
@@ -210,7 +210,7 @@
 		};
 		cpu4: cpu@4 {
 			device_type = "cpu";
-			compatible = "arm,arm-v8";
+			compatible = "arm,armv8";
 			enable-method = "psci";
 			reg = <0x4>;
 			capacity-dmips-mhz = <PLACEHOLDER>;
@@ -242,7 +242,7 @@
 		};
 		cpu5: cpu@5 {
 			device_type = "cpu";
-			compatible = "arm,arm-v8";
+			compatible = "arm,armv8";
 			enable-method = "psci";
 			reg = <0x5>;
 			capacity-dmips-mhz = <PLACEHOLDER>;
@@ -274,7 +274,7 @@
 		};
 		cpu6: cpu@6 {
 			device_type = "cpu";
-			compatible = "arm,arm-v8";
+			compatible = "arm,armv8";
 			enable-method = "psci";
 			reg = <0x6>;
 			capacity-dmips-mhz = <PLACEHOLDER>;
@@ -306,7 +306,7 @@
 		};
 		cpu7: cpu@7 {
 			device_type = "cpu";
-			compatible = "arm,arm-v8";
+			compatible = "arm,armv8";
 			enable-method = "psci";
 			reg = <0x7>;
 			capacity-dmips-mhz = <PLACEHOLDER>;
@@ -338,7 +338,7 @@
 		};
 		cpu8: cpu@8 {
 			device_type = "cpu";
-			compatible = "arm,arm-v8";
+			compatible = "arm,armv8";
 			enable-method = "psci";
 			reg = <0x8>;
 			capacity-dmips-mhz = <PLACEHOLDER>;
@@ -370,7 +370,7 @@
 		};
 		cpu9: cpu@9 {
 			device_type = "cpu";
-			compatible = "arm,arm-v8";
+			compatible = "arm,armv8";
 			enable-method = "psci";
 			reg = <0x9>;
 			capacity-dmips-mhz = <PLACEHOLDER>;
@@ -402,7 +402,7 @@
 		};
 		cpu10: cpu@a {
 			device_type = "cpu";
-			compatible = "arm,arm-v8";
+			compatible = "arm,armv8";
 			enable-method = "psci";
 			reg = <0xa>;
 			capacity-dmips-mhz = <PLACEHOLDER>;
@@ -434,7 +434,7 @@
 		};
 		cpu11: cpu@b {
 			device_type = "cpu";
-			compatible = "arm,arm-v8";
+			compatible = "arm,armv8";
 			enable-method = "psci";
 			reg = <0xb>;
 			capacity-dmips-mhz = <PLACEHOLDER>;
@@ -466,7 +466,7 @@
 		};
 		cpu12: cpu@c {
 			device_type = "cpu";
-			compatible = "arm,arm-v8";
+			compatible = "arm,armv8";
 			enable-method = "psci";
 			reg = <0xc>;
 			capacity-dmips-mhz = <PLACEHOLDER>;
@@ -498,7 +498,7 @@
 		};
 		cpu13: cpu@d {
 			device_type = "cpu";
-			compatible = "arm,arm-v8";
+			compatible = "arm,armv8";
 			enable-method = "psci";
 			reg = <0xd>;
 			capacity-dmips-mhz = <PLACEHOLDER>;
@@ -530,7 +530,7 @@
 		};
 		cpu14: cpu@e {
 			device_type = "cpu";
-			compatible = "arm,arm-v8";
+			compatible = "arm,armv8";
 			enable-method = "psci";
 			reg = <0xe>;
 			capacity-dmips-mhz = <PLACEHOLDER>;
@@ -562,7 +562,7 @@
 		};
 		cpu15: cpu@f {
 			device_type = "cpu";
-			compatible = "arm,arm-v8";
+			compatible = "arm,armv8";
 			enable-method = "psci";
 			reg = <0xf>;
 			capacity-dmips-mhz = <PLACEHOLDER>;
diff --git a/pvmfw/src/fdt.rs b/pvmfw/src/fdt.rs
index d847ca2..4d282a1 100644
--- a/pvmfw/src/fdt.rs
+++ b/pvmfw/src/fdt.rs
@@ -262,7 +262,7 @@
     let cpu_map = read_cpu_map_from(fdt)?;
     let mut topology: CpuTopology = Default::default();
 
-    let mut cpu_nodes = fdt.compatible_nodes(cstr!("arm,arm-v8"))?;
+    let mut cpu_nodes = fdt.compatible_nodes(cstr!("arm,armv8"))?;
     for (idx, cpu) in cpu_nodes.by_ref().take(cpus.capacity()).enumerate() {
         let cpu_capacity = cpu.getprop_u32(cstr!("capacity-dmips-mhz"))?;
         let opp_phandle = cpu.getprop_u32(cstr!("operating-points-v2"))?;
@@ -380,7 +380,7 @@
     cpus: &[CpuInfo],
     topology: &Option<CpuTopology>,
 ) -> libfdt::Result<()> {
-    const COMPAT: &CStr = cstr!("arm,arm-v8");
+    const COMPAT: &CStr = cstr!("arm,armv8");
     let mut cpu_phandles = Vec::new();
     for (idx, cpu) in cpus.iter().enumerate() {
         let mut cur = get_nth_compatible(fdt, idx, COMPAT)?.ok_or(FdtError::NoSpace)?;
diff --git a/pvmfw/testdata/test_crosvm_dt_base.dtsi b/pvmfw/testdata/test_crosvm_dt_base.dtsi
index 10d7e6d..7d1161a 100644
--- a/pvmfw/testdata/test_crosvm_dt_base.dtsi
+++ b/pvmfw/testdata/test_crosvm_dt_base.dtsi
@@ -50,7 +50,7 @@
 
 		cpu@0 {
 			device_type = "cpu";
-			compatible = "arm,arm-v8";
+			compatible = "arm,armv8";
 			enable-method = "psci";
 			reg = <0x00>;
 		};