#
…

2022-02-21

00:20al3xtjames has quit [Quit: Ping timeout (120 seconds)]
00:20al3xtjames has joined #asahi-dev
00:52axboe_ has joined #asahi-dev
00:56axboe_ is now known as axboe
01:14off^ has joined #asahi-dev
02:38chadmed has quit [Ping timeout: 480 seconds]
03:24PhilippvK has joined #asahi-dev
03:27phiologe has quit [Ping timeout: 480 seconds]
03:38kov has quit [Quit: Coyote finally caught me]
03:38kov has joined #asahi-dev
04:04axboe has quit [Quit: Lost terminal]
04:07axboe has joined #asahi-dev
04:41hays has quit [Remote host closed the connection]
04:57chadmed has joined #asahi-dev
05:55marcankettenis: u-boot currently maps all physical RAM, right?
05:55marcanthat's not good :(
05:55marcanit needs to map only valid RAM
05:56marcanotherwise CPU speculation can trigger SErrors, I just got one such failure under the HV
05:57marcanhm, wait, I do see it trying to adjust the memmap?
05:59marcaner... translation is not yet enabled, how did this happen?
06:03marcanmaybe the way I map things in the HV upgrades untranslated to allow speculation?
06:23marcansigh, okay, the magic ARM "don't speculate in untranslated mode" stuff doesn't apply with EL2 translation enabled I guess
07:41marcankettenis: pushed some misc video things to u-boot:releng/misc
07:42marcanand pushed a bunch of m1n1 changes to add a RELEASE=1 build mode, which disables the text console by default unless a fallback to proxy occurs, or unless verbose boot mode is set (nvram boot-args=-v and disable nvram restrictions in bputil)
07:42marcanif verbose mode *is* set then it also adds a 5-second proxy attempt timeout before launching payloads; you need to enumerate USB *and* open the device (either is fine) to break out of the timeout
07:42marcanmaz: I think that should cover your use case?
07:43as400[m]marcan: I'm also getting u-boot memory errors from time to time on mbp 14.
07:43marcanas400[m]: on the hypervisor?
07:45as400[m]No, bare metal.
07:49as400[m]marcan: it seems like nobody else getting them. So they might be specific to j314s.
07:50marcanI got one on j314s, but it was under the HV and I think explainable by what I just fixed in m1n1
07:50willemml has joined #asahi-dev
07:53as400[m]marcan: for me it seems like errors went away when I changed from extlinux booting to systemd boot. Last 10, or so, boots with systemd were ok. Will report if this happens again.
07:55the_lanetly_052 has joined #asahi-dev
08:03j`eymarcan: u-boot stream? ^_^
08:04marcannot today, probably tomorrow, though there isn't that much to do in u-boot... so probably mostly like installer/releng
08:08kettenismarcan: no u-boot only maps available RAM
08:08marcanyeah, I saw that
08:08marcanit was a HV problem
08:08marcanapparently there's no way for a guest to invoke the magic speculation restriction rules that would normally happen for bare metal with no translation
08:09marcanso now the HV explicitly unmaps the TZ carveouts for stage 2 as it already does for stage 1 for the same reason
08:11mpsI'm keeping u-boot patches for terminus fonts, took video patches from u-boot mailing list and added terminus 12x24
08:11marcanah, I might want that, the font is tiny :)
08:12marcanthough ideally it would select at runtime depending on display density... which isn't specified in the DT right now
08:13mpsthere you can enable 16x32 terminus
08:13marcanhm, but it's a static choice... might have to see about making it dynamic somehow...
08:14mpsyes, but I don't have time to 'learn' from source how to detect size at runtime
08:14j`eynow marcan knows the pain of watching his stream with those tiny fonts :P
08:15marcanhey, I usually zoom in my editor!
08:15j`eyyes thanks, it's fine now!
08:16mpsand here is the my patch for 12x24 terminus on top of previous one above http://ix.io/3Qg9
08:16mpslooks fine for me on MBP display
08:17mpsand I even created same for kernel
08:20j`eymarcan: I think #ifdef EARLY_PROXY in src/main should be #ifdef EARLY_PROXY_TIMEOUT
08:20j`eyotherwise its always compiled out
08:21marcanforce pushed :p
08:21j`eyand why does it only do it if theres no display?
08:21sventsk tsk
08:22marcanj`ey: if there *is* a console
08:22marcanthat field in boot_args is kind of backwards
08:22marcanI guess it's supposed to mean "graphical display" (as opposed to text)
08:28jannauno dpi or HiDPI/Retina property in the simple-framebuffer dt-bindings
08:29j`eymarcan: sorry still a bit confused, what will need to make it such that this if condition is true https://github.com/AsahiLinux/m1n1/blob/main/src/main.c#L64
08:30svenj`ey: add -v to bootargs i think
08:30marcanj`ey: 16:41:31 <@marcan> [...] (nvram boot-args=-v and disable nvram restrictions in bputil)
08:31sventhat variable actually means something like "display enabled" which is true if "verbose boot is disabled"
08:31marcanyou can also just pass -v to chainload
08:31marcanit does the right thing
08:32marcan(or '' to disable it if it was enabled already)
08:32j`eyohh I assumed that was going to need some strstr(cmdline, "-v") or whatever!
08:32marcaniBoot does that
08:33j`eycool, got it
08:39the_lanetly_052 has quit [Ping timeout: 480 seconds]
08:41ketteniswe should probably bug apritzel about that font diff
08:42ketteniswon't make 2022.04, but maybe it can be ready for 2022.07
08:43kettenisit makes sense to do some customization in what we ship with the Asahi installer
08:44kettenisalthough CONFIG_NO_FB_CLEAR and CONFIG_SYS_WHITE_ON_BLACK are probably candidates for upstreaming anyway
08:47mazmarcan: the timeout stuff looks good to me.
08:59mazmarcan: I miss some of the context, but a guest can always restrict speculation on some memory range by mapping it as device, provided thatt the hypervisor doesn't set HCR_EL2.FWB.
09:03bluerise has quit [Ping timeout: 480 seconds]
09:06mpskettenis: iirc sjg1 had some some comments on apritzel's patches, and I didn't had time to check last 3 in series
09:07mpsbut I'm using first five of his patches on M1 u-boot and also on two different chromebooks, works fine on all three
09:18coder_kalyan has joined #asahi-dev
09:18gpanders_ has quit [Read error: Connection reset by peer]
09:18coder_kalyan_ has quit [Read error: Connection reset by peer]
09:18gpanders_ has joined #asahi-dev
09:23willemml has quit [Quit: willemml]
09:55MajorBiscuit has joined #asahi-dev
13:00marcanmaz: but can't get the magic restricted speculation that you get with translation disabled entirely
13:01marcanwith stage 1 translation disabled you get whatever stage 2 says instead
13:02thevar1able has joined #asahi-dev
13:02marcankettenis: yeah, I'm not too worried about carrying a few cosmetic patches here and there as long as they aren't hard to rebase
13:35mazmarcan: MMU off at S1 gives you device memory, which is not speculated. But that relies on S2 not using FWB.
13:41kettenismarcan: is that margin diff to work around the rounded corners at the top of the display on the new laptops?
13:46_jannau_yes, the U from U-boot in the top left corner is in the rounded corner on the macbook pro 14"
13:46marcanmaz: that's not my reading of the ARM nor what I see in practice
13:46marcankettenis: yes
13:46bluerise has joined #asahi-dev
13:46marcanbut also a good idea for HDMI overscan on the Mini, which is unpredictable
13:47marcane.g. if someone hooks it up to a TV
13:48kettenisshouldn't we adjust the start of the framebuffer on the laptops to avoid the top with the rounded corners and the notch though?
13:50marcanthat's another way, yes
13:50marcanbut then it's device-specific
13:51marcanthough I guess we could outright do it for the whole FB in m1n1, including for linux? hm
13:51kettenisyes, that was what I was thinking
13:51marcanmight make sense
13:51marcanI'll give it a try
13:51grgy has left #asahi-dev [WeeChat 3.4]
13:56mazmarcan: with S1 disabled, the strongest memory attribute wins. if that's not what you are seeing, then that's a violation of the architecture. that's c;early described in the VMSA spec.
13:57mazactually, S1 beng enabled or not doesn't matter. the combination of the two levels of translations should apply irrespective of that. only FWB is allows to change that.
14:00alyssaM1? violating the spec? never :-p
14:00thevar1able has quit [Ping timeout: 480 seconds]
14:01marcanmaz: D5.2.9 The effects of disabling a stage of address translation
14:01marcanFor all other accesses, when stage 1 address translation is disabled, the assigned attributes depend
14:01marcanon whether the access is a data access or an instruction access, as follows:
14:01marcanInstruction access
14:01marcanThe stage 1 translation assigns the Normal memory attribute, with the cacheability and
14:01marcanshareability attributes determined by the value of the SCTLR_ELx.I bit for the
14:01marcantranslation regime
14:02marcanthe only reason that doesn't explode all over the place is the later subsection "Behavior of instruction fetches when all associated stages of translation are disabled
14:02marcanwhich limits speculation to allow software to guarantee the CPU does not speculate into memory it shouldn't, but *only* if *all* stages of translation are disabled
14:02marcanso if you have S2 and no S1, and S2 says it's normal memory, you end up with normal memory, and things explode randomly
14:06marcanbasically, tl;dr it's illegal to map read-sensitive or read-illegal memory as Normal memory into the guest if the guest ever plans to run with translation disabled, because there is no way for it to stop the CPU from speculating into it otherwise
14:48yuyichao has quit [Ping timeout: 480 seconds]
14:56yuyichao has joined #asahi-dev
15:11klaus has joined #asahi-dev
15:40klaus has quit [Quit: Konversation terminated!]
15:57marcankettenis: pushed notch hiding to m1n1, removed the margin stuff
15:57marcangood point on that one, this makes more sense
15:57marcanI do it in kboot so it only affects the m1n1 -> u-boot (or linux) boundary
15:57marcanm1n1-m1n1 keeps the full fb, same with xnu/hv/etc
15:58marcanthe code is a heuristic to avoid per-platform code (for now); we do have "is there a notch" in the ADT. it checks that, then rounds down the height to an integer 16:N aspect
15:58marcan(since we know these screens are 16:10 notchless, and one would hope Apple will stick to even dimensions plus notch)
15:59marcanworks with linux and u-boot
16:04_jannau_which kicks the notch awareness can of worms down to dcp. seems sensible
16:10kettenismarcan: the margin might still make sense for overscan on hdmi tv's, but with a larger font that issue largely disappears as well I guess
16:10VinDuvSo if m1n1 displays something at the top of the screen, it will stay visible indefinitely in the booted OS?
16:10marcanfwiw my margin patch was broken, it faults on scroll
16:10marcanVinDuv: m1n1 clears the screen
16:11marcan(when loading something else)
16:11marcan(except the logo)
16:11WhyNotHugo has quit [Remote host closed the connection]
16:11coder_kalyan has quit [Remote host closed the connection]
16:11gpanders_ has quit [Remote host closed the connection]
16:12coder_kalyan has joined #asahi-dev
16:12WhyNotHugo has joined #asahi-dev
16:12gpanders_ has joined #asahi-dev
16:13Dcow[m]would be great to have option to use notch area (left and right side from the notch) as separate screen
16:14marcanunlikely to be practical I think, at least at the DRM level
16:14marcanit'd have to be something the compositor does
16:14marcanwe don't have enough layers to fake that
16:17_jannau_multiple simple-framebuffers might work but could cause problems with the dcp driver
16:18marcanit doesn't make any sense to do it for simplefb and not dcp
16:18marcanand we can't really do it for dcp
16:51willemml has joined #asahi-dev
16:58coder_kalyan has quit [Remote host closed the connection]
16:58gpanders_ has quit [Remote host closed the connection]
16:58WhyNotHugo has quit [Remote host closed the connection]
17:04coder_kalyan has joined #asahi-dev
17:04WhyNotHugo has joined #asahi-dev
17:04gpanders_ has joined #asahi-dev
17:14willemml has quit [Quit: willemml]
17:28phiologe has joined #asahi-dev
17:29willemml has joined #asahi-dev
17:30PhilippvK has quit [Ping timeout: 480 seconds]
17:37PhilippvK has joined #asahi-dev
17:37willemml has quit [Read error: Connection reset by peer]
17:40phiologe has quit [Ping timeout: 480 seconds]
17:47svenhm, looks like usb 3 actually won’t be very painful. Still needs some tunables though afaict
17:48svenonly annoying part is that we probably need to know the orientation of the plug which we can get from the tipd chip - but that subsystem is ofc separate from the usb-role-switch stuff that triggers the phy_set_mode in dwc3
17:49svenbut as a first hack it should be enough to call typec_set_orientation before the usb role switch stuff in the tipd driver :D
18:47___nick___ has joined #asahi-dev
18:48___nick___ has quit []
18:49___nick___ has joined #asahi-dev
18:56roxfan2 is now known as roxfan
19:08the_lanetly_052 has joined #asahi-dev
19:51MajorBiscuit has quit [Quit: WeeChat 3.4]
20:01the_lanetly_052 has quit [Ping timeout: 480 seconds]
20:48mini has quit [Quit: ZNC closing...]
20:50mini has joined #asahi-dev
20:58CME has joined #asahi-dev
21:07___nick___ has quit [Ping timeout: 480 seconds]
21:46sirn- has joined #asahi-dev
21:48sirn has quit [singleton.oftc.net coherence.oftc.net]
21:48sirn- is now known as sirn
21:58hays has joined #asahi-dev
23:31manawyrm has quit [Quit: Read error: 2.99792458 x 10^8 meters/second (Excessive speed of light)]
23:31manawyrm has joined #asahi-dev
…