@@ -42,6 +42,8 @@
#define CRAT_OEMTABLEID_LENGTH 8
#define CRAT_RESERVED_LENGTH 6
+#define CRAT_OEMID_64BIT_MASK ((1ULL << (CRAT_OEMID_LENGTH * 8)) - 1)
+
struct crat_header {
uint32_t signature;
uint32_t length;
@@ -467,10 +467,10 @@ static int kfd_parse_crat_table(void *crat_image)
if (!top_dev) {
kfd_release_live_view();
return -ENOMEM;
+ }
}
-}
- sys_props.platform_id = *((uint64_t *)crat_table->oem_id);
+ sys_props.platform_id = (*((uint64_t *)crat_table->oem_id)) & CRAT_OEMID_64BIT_MASK;
sys_props.platform_oem = *((uint64_t *)crat_table->oem_table_id);
sys_props.platform_rev = crat_table->revision;