{"id":128423,"date":"2025-04-09T11:29:35","date_gmt":"2025-04-09T02:29:35","guid":{"rendered":"https:\/\/softantenna.com\/blog\/?p=128423"},"modified":"2025-04-09T11:29:35","modified_gmt":"2025-04-09T02:29:35","slug":"asahi-linux-m4","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/asahi-linux-m4\/","title":{"rendered":"Asahi Linux\u304cM4\u3078\u306e\u5bfe\u5fdc\u3067\u300c\u304b\u306a\u308a\u53b3\u3057\u3044\u300d\u554f\u984c\u306b\u3076\u3061\u5f53\u305f\u308b"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2024\/10\/Apple-Mac-mini-front-facing-ports.jpg\" alt=\"\" width=\"1280\" height=\"720\" class=\"aligncenter size-full wp-image-126106\" \/><\/p>\n<p>Asahi Linux\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u3001Apple\u30b7\u30ea\u30b3\u30f3\u642d\u8f09Mac\u3067Linux\u3092\u52d5\u4f5c\u3055\u305b\u308b\u4e8b\u3092\u76ee\u6307\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u307e\u3067M1\u3001M2\u30c1\u30c3\u30d7\u306e\u30b5\u30dd\u30fc\u30c8\u306b\u306f\u6210\u529f\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3001M4\u30c1\u30c3\u30d7\u3067\u306f\u4e88\u671f\u305b\u306c\u969c\u5bb3\u306b\u76f4\u9762\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3057\u305f(<a href=\"https:\/\/appleinsider.com\/articles\/25\/04\/08\/asahi-linux-m4-support-hits-a-roadblock-because-of-apple-silicon-changes\/\">AppleInsider<\/a>)\u3002<\/p>\n<p>\u4e3b\u306a\u554f\u984c\u306f\u3001Apple\u304cM4\u3067\u5c0e\u5165\u3057\u305f\u5909\u66f4\u306b\u3088\u308a\u3001m1n1\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u30fc(\u8d85\u5c0f\u578b\u306e\u30d6\u30fc\u30c8\u30ed\u30fc\u30c0\u30fc&\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc)\u304c\u6b63\u3057\u304f\u6a5f\u80fd\u3057\u306a\u3044\u3053\u3068\u3068\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u7279\u306b\u3001Apple\u306eSPTM(Secure Page Table Monitor)\u304cGL2\u30ec\u30b8\u30b9\u30bf\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001Linux\u306e\u30da\u30fc\u30b8\u30c6\u30fc\u30d6\u30eb\u3092\u9069\u5207\u306b\u7ba1\u7406\u3059\u308b\u3053\u3068\u304c\u56f0\u96e3\u306b\u306a\u3063\u3066\u304a\u308a\u3001\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc\u4e0a\u3067XNU\u3092\u52d5\u4f5c\u3055\u305b\u308b\u5834\u5408\u306b\u3082\u554f\u984c\u3092\u5f15\u304d\u8d77\u3053\u3057\u3066\u3044\u308b\u3068\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u958b\u767a\u8005\u306eSven Peter\u6c0f\u306f\u3001\u3053\u306e\u969c\u5bb3\u3092\u300c<strong>\u304b\u306a\u308a\u53b3\u3057\u3044<\/strong>\u300d\u3068<a href=\"http:\/\/xn--hyrsocial-hj4h.treehouse.systems\/@sven\/114278224116678776\">\u8ff0\u3079\u3066<\/a>\u3044\u307e\u3059\u304c\u3001XNU\u306e\u4f8b\u5916\u30cf\u30f3\u30c9\u30e9\u3084\u30da\u30fc\u30b8\u30c6\u30fc\u30d6\u30eb\u30b3\u30fc\u30c9\u3092\u30cf\u30a4\u30b8\u30e3\u30c3\u30af\u3059\u308b\u3053\u3068\u3067\u89e3\u6c7a\u3067\u304d\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3068\u3082\u793a\u5506\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<blockquote><p>\nLooks like M4 support for #asahilinux is going be rather painful. We\u2019re still focusing on upstreaming M1\/M2 support but other people have been trying to bring up m1n1 on M4 and it looks like a few things changed:<\/p>\n<p>#asahilinux \u306b\u304a\u3051\u308b M4 \u30b5\u30dd\u30fc\u30c8\u306f\u3001\u304b\u306a\u308a\u5384\u4ecb\u306a\u3082\u306e\u306b\u306a\u308a\u305d\u3046\u3067\u3059\u3002\u79c1\u305f\u3061\u306f\u307e\u3060 M1\/M2 \u306e\u30b5\u30dd\u30fc\u30c8\u3092\u30a2\u30c3\u30d7\u30b9\u30c8\u30ea\u30fc\u30e0\u306b\u9001\u308b\u3053\u3068\u306b\u6ce8\u529b\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u4ed6\u306e\u4eba\u305f\u3061\u304c M4 \u4e0a\u3067 m1n1 \u3092\u7acb\u3061\u4e0a\u3052\u3088\u3046\u3068\u3057\u3066\u3044\u3066\u3001\u3044\u304f\u3064\u304b\u5909\u66f4\u304c\u3042\u3063\u305f\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>When configuring a macho boot object we now get dropped into an environment where Apple\u2019s SPTM is running in GL2 and we are supposed to talk to it from EL2 with MMU already enabled to setup pagetables. This neither works for Linux nor for running XNU under our hypervisor to reverse engineer the new hardware.<\/p>\n<p>macho\u30d6\u30fc\u30c8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u69cb\u6210\u3059\u308b\u3068\u3001Apple\u306eSPTM\u304cGL2\u3067\u52d5\u4f5c\u3057\u3066\u3044\u308b\u74b0\u5883\u306b\u5165\u308c\u3089\u308c\u3001MMU(\u30e1\u30e2\u30ea\u7ba1\u7406\u30e6\u30cb\u30c3\u30c8)\u304c\u3059\u3067\u306b\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u72b6\u614b\u306e EL2 \u304b\u3089\u30da\u30fc\u30b8\u30c6\u30fc\u30d6\u30eb\u3092\u8a2d\u5b9a\u3059\u308b\u3088\u3046\u6c42\u3081\u3089\u308c\u307e\u3059\u3002\u3053\u308c\u306f Linux \u306b\u3068\u3063\u3066\u3082\u3001\u79c1\u305f\u3061\u306e\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc\u4e0b\u3067 XNU \u3092\u52d5\u304b\u3057\u3066\u65b0\u3057\u3044\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u3092\u30ea\u30d0\u30fc\u30b9\u30a8\u30f3\u30b8\u30cb\u30a2\u30ea\u30f3\u30b0\u3059\u308b\u306b\u3082\u3001\u3046\u307e\u304f\u3044\u304d\u307e\u305b\u3093\u3002<\/p>\n<p>When configuring a raw boot object we\u2019re dropped into EL2 with GL2 and most (all?) Apple specific extensions disabled. This is totally fine for Linux but we can\u2019t run XNU under our hypervisor that we use to reverse engineer the hardware in this state. This also seems to be broken for >=15.2 right now because it probably isn\u2019t very well tested<\/p>\n<p>raw \u30d6\u30fc\u30c8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u69cb\u6210\u3059\u308b\u3068\u3001GL2 \u4ed8\u304d\u306e EL2 \u306b\u5165\u308a\u307e\u3059\u304c\u3001Apple \u72ec\u81ea\u306e\u62e1\u5f35\u304c\u307b\u3068\u3093\u3069\uff08\u5168\u90e8\uff1f\uff09\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3053\u306e\u72b6\u614b\u306a\u3089 Linux \u3092\u52d5\u304b\u3059\u5206\u306b\u306f\u5168\u304f\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u79c1\u305f\u3061\u304c\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u306e\u30ea\u30d0\u30fc\u30b9\u30a8\u30f3\u30b8\u30cb\u30a2\u30ea\u30f3\u30b0\u306b\u4f7f\u3063\u3066\u3044\u308b\u30cf\u30a4\u30d1\u30fc\u30d0\u30a4\u30b6\u30fc\u4e0b\u3067 XNU \u3092\u52d5\u304b\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u3055\u3089\u306b\u3001\u3053\u308c\u306f\u73fe\u5728\u30d0\u30fc\u30b8\u30e7\u30f3 15.2 \u4ee5\u4e0a\u3067\u306f\u58ca\u308c\u3066\u3044\u308b\u3088\u3046\u3067\u3001\u304a\u305d\u3089\u304f\u3042\u307e\u308a\u30c6\u30b9\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u306e\u304c\u539f\u56e0\u3068\u601d\u308f\u308c\u307e\u3059 <\/p>\n<\/blockquote>\n<p>\u73fe\u5728\u306e\u3068\u3053\u308d\u3001M4\u3078\u306e\u5bfe\u5fdc\u6642\u671f\u306f\u672a\u5b9a\u3067\u3059\u304c\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u5f15\u304d\u7d9a\u304dM1\u3068M2\u306e\u30b5\u30dd\u30fc\u30c8\u3092\u5f37\u5316\u3057\u3064\u3064\u3001M4\u3078\u306e\u5bfe\u5fdc\u7b56\u3092\u6a21\u7d22\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>M4\u30c1\u30c3\u30d7\u3078\u5bfe\u5fdc\u3067\u304d\u306a\u3044\u3068\u306a\u308c\u3070\u3001M4\u3060\u3051\u3067\u306a\u304f\u305d\u306e\u5f8c\u7d99\u30c1\u30c3\u30d7\u3078\u306e\u5bfe\u5fdc\u3082\u602a\u3057\u304f\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u7d99\u7d9a\u306e\u305f\u3081\u306b\u306fM4\u30c1\u30c3\u30d7\u3078\u306e\u5bfe\u5fdc\u306f\u306a\u3093\u3068\u3057\u3066\u3082\u6210\u3057\u9042\u3052\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u8ab2\u984c\u3068\u306a\u308a\u305d\u3046\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Asahi Linux\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u3001Apple\u30b7\u30ea\u30b3\u30f3\u642d\u8f09Mac\u3067Linux\u3092\u52d5\u4f5c\u3055\u305b\u308b\u4e8b\u3092\u76ee\u6307\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u307e\u3067M1\u3001M2\u30c1\u30c3\u30d7\u306e\u30b5\u30dd\u30fc\u30c8\u306b\u306f\u6210\u529f\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3001M4\u30c1\u30c3\u30d7\u3067\u306f\u4e88\u671f\u305b\u306c\u969c\u5bb3\u306b\u76f4\u9762\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":126106,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[4],"tags":[4530,4725],"class_list":["post-128423","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mac","tag-asahi","tag-m4"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/128423","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=128423"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/128423\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/126106"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=128423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=128423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=128423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}