File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -324,6 +324,7 @@ FF_MAYBE_UNUSED static void detectArmSoc(FFCPUResult* cpu)
324324 if (cpu -> name .length > 0 )
325325 return ;
326326
327+ // device-vendor,device-model\0soc-vendor,soc-model\0
327328 char content [64 ];
328329 ssize_t length = ffReadFileData ("/proc/device-tree/compatible" , sizeof (content ), content );
329330 if (length <= 2 ) return ;
@@ -335,12 +336,7 @@ FF_MAYBE_UNUSED static void detectArmSoc(FFCPUResult* cpu)
335336 if (ffStrStartsWith (modelName , "apple,t" ))
336337 {
337338 // https://elixir.bootlin.com/linux/v6.11-rc7/source/arch/arm64/boot/dts/apple
338- // In Asahi Linux, reading /proc/device-tree/compatible gives
339- // information on the device model. It consists of 3 NUL terminated
340- // strings, the second of which gives the actual SoC model. But it
341- // is not the marketing name, i.e. for M2 there is "apple,t8112" in
342- // the compatible string.
343- const char * code = modelName + strlen ("qcom,sc" );
339+ const char * code = modelName + strlen ("apple,t" );
344340 uint32_t deviceId = (uint32_t ) strtoul (code , NULL , 10 );
345341 ffStrbufSetStatic (& cpu -> name , ffCPUAppleCodeToName (deviceId ));
346342 if (!cpu -> name .length )
You can’t perform that action at this time.
0 commit comments