2021-02-08
01:26r3n has joined #asahi-dev
02:10amw has quit [Ping timeout: 272 seconds]
02:25qyousef has quit [Ping timeout: 276 seconds]
02:27qyousef has joined #asahi-dev
03:22phiologe has quit [Ping timeout: 258 seconds]
03:23phiologe has joined #asahi-dev
03:28bgb has joined #asahi-dev
03:29bgb has left #asahi-dev ["WeeChat 3.0.1"]
03:30bgb has joined #asahi-dev
03:35bgbI am curious about the m1n1.ld, there is a line: "_va_base = 0xFFFFFE0007004000;", How did we decide this specific address?
03:53modwizcodeI googled it and it turns up one result as an XNU thing
04:05bgbI guess iBoot loads m1n1.macho as a standalone app, just as we execute hello demo under linux. question is why 0xFFFFFE0007004000?
04:05brandas has quit [Read error: Connection reset by peer]
04:06brandas has joined #asahi-dev
04:08modwizcodeSpecifically line 342
04:17modwizcodeHeh I didn't see that when I first looked at this file awhile back
04:20bgbnot quite clear about the whole picture, but got more info to understand why using this address to get control of M1
04:26modwizcodeYeah I'm not suer if it honestly matters only marcan would know. As far as I know once iBoot kicks execution over to you, you're executing from a physical address and the virtual load address is nothing. I'm assuming that iBoot would relocate things using the virtual base address if you had any mach-o relocations, but that's now how M1N1 works (for good reason)
04:27modwizcodeThat makefile for xnu is insane though, they seem to specify everything via linker arguments instead of using a linker script for anything
05:16marcan(back when I was writing that mach-o header thing I started out making it similar to xnu to eliminate errors, since I had to get that much to work blind)
05:17marcanit's just a hack because mach-o is a mildly brain-dead format that does not support the concept of physical addresses
05:18marcanso it's really a completely arbitrary number at this point, with no significance to anything whatsoever at runtime; I just don't know if iBoot has any restrictions on it
05:56anthonyo has joined #asahi-dev
05:56anthonyo has quit [Client Quit]
06:21_whitelogger has joined #asahi-dev
06:29bgbmaran: I saw more about m1n1.ld, the m1n1 code itself is linked at 0, then you tell iBoot which loads the m1n1.macho: please load m1n1 to vmaddr and transfer
06:31VinDuv has joined #asahi-dev
06:37bgbxnu kernel is linked at 0xFFFFFE0007004000 (according to xnu makefile...-Wl,-image_base,$(ARM64_LINK_ADDR)), so there is no reason to be wrong for m1n1 using this address
06:45marcaniBoot loads m1n1 to wherever it wants, in fact it's randomized in a 32MB window every boot due to kASLR
06:46marcanthe only thing those vmaddrs are used for is internal to the mach-o format, and as a quirk, also as the base for some pointers passed from iBoot, but those are kASLR slid anyway so that base vmaddr isn't correct either, iBoot tells you the one it *actually* used
06:50maor26 has joined #asahi-dev
06:51bgbok, I do notice the top_of_kernel_data of bootargs changes every time when transfered from iBoot
07:28VinDuv has quit [Quit: Leaving.]
09:00mellotron1[m] has quit [Quit: Idle for 30+ days]
09:00jrmuizel[m] has quit [Quit: Idle for 30+ days]
09:00jinen[m] has quit [Quit: Idle for 30+ days]
09:18robinp_ has joined #asahi-dev
09:20robinp has quit [Ping timeout: 258 seconds]
09:21robinp_ is now known as robinp
10:14robinp_ has joined #asahi-dev
10:17robinp has quit [Ping timeout: 240 seconds]
10:46bgb has quit [Ping timeout: 264 seconds]
10:53zkrx has quit [Ping timeout: 276 seconds]
10:58bgb has joined #asahi-dev
10:58zkrx has joined #asahi-dev
11:02bgb has quit [Ping timeout: 240 seconds]
11:14bgb has joined #asahi-dev
11:19bgb has quit [Ping timeout: 246 seconds]
11:32bgb has joined #asahi-dev
11:37bgb has quit [Ping timeout: 272 seconds]
11:50bastilianAfter ordering a handful of USB-C cables, I did find one with SBU1/2 lines attached to my external hard drive. So I finally could play around with the serial console. :D so fun.
11:50bgb has joined #asahi-dev
11:55bgb has quit [Ping timeout: 265 seconds]
12:00odmir_ has joined #asahi-dev
12:03odmir has quit [Ping timeout: 258 seconds]
12:07bgb has joined #asahi-dev
12:25bgb has quit [Ping timeout: 246 seconds]
12:34bgb has joined #asahi-dev
12:35bgb has left #asahi-dev [#asahi-dev]
12:43acelogic has quit [Ping timeout: 240 seconds]
12:44bgb has joined #asahi-dev
12:47bgbmarcan: can we disable HCR_EL2.E2H bit? I just wanted to clear this bit in m1n1_main, but failed
12:47thestr4ng3r has quit [Read error: Connection reset by peer]
12:48thestr4ng3r has joined #asahi-dev
12:49snalty has joined #asahi-dev
12:51jixbgb: nope, see https://lore.kernel.org/linux-arm-kernel/1dbffcd4-5b20-404c-94af-c985a96785e2@marcan.st/
12:51thestr4ng3r has quit [Read error: Connection reset by peer]
12:51thestr4ng3r has joined #asahi-dev
12:56acelogic has joined #asahi-dev
13:16carlosn has joined #asahi-dev
13:26puhitaku has quit [Read error: Connection reset by peer]
13:26narmstrong has quit [Read error: Connection reset by peer]
13:26HeN has quit [Ping timeout: 246 seconds]
13:26modmuss50 has quit [Read error: Connection reset by peer]
13:26eric_engestrom has quit [Ping timeout: 246 seconds]
13:26austriancoder has quit [Read error: Connection reset by peer]
13:27diddledan has quit [Ping timeout: 265 seconds]
13:27robher has quit [Ping timeout: 265 seconds]
13:27sferrini has quit [Ping timeout: 260 seconds]
13:27r1fl has quit [Ping timeout: 260 seconds]
13:27brinly has quit [Read error: Connection reset by peer]
13:27prusnak has quit [Read error: Connection reset by peer]
13:27WhyNotHugo has quit [Write error: Connection reset by peer]
13:27sirn has quit [Read error: Connection reset by peer]
13:27arnd has quit [Read error: Connection reset by peer]
13:27doof has quit [Read error: Connection reset by peer]
13:27rann has quit [Read error: Connection reset by peer]
13:27puhitaku has joined #asahi-dev
13:28narmstrong has joined #asahi-dev
13:29modmuss50 has joined #asahi-dev
13:29austriancoder has joined #asahi-dev
13:29sirn has joined #asahi-dev
13:30prusnak has joined #asahi-dev
13:30arnd has joined #asahi-dev
13:30sferrini has joined #asahi-dev
13:31diddledan has joined #asahi-dev
13:31robher has joined #asahi-dev
13:31brinly has joined #asahi-dev
13:31eric_engestrom has joined #asahi-dev
13:33HeN has joined #asahi-dev
13:34WhyNotHugo has joined #asahi-dev
13:34r1fl has joined #asahi-dev
13:41bgb has quit [Ping timeout: 272 seconds]
13:45rann has joined #asahi-dev
13:49doof has joined #asahi-dev
13:54bgb has joined #asahi-dev
13:59bgb has quit [Ping timeout: 240 seconds]
14:08acelogic has quit [Remote host closed the connection]
14:10bgb has joined #asahi-dev
14:14marcanit means you can run a "normal" OS as EL2 because it aliases all the EL1 registers to EL2 registers
14:15jixwasn't really asking, was just pointing out that even though I posted that mail, I'm not the right person for more info... :)
14:16marcanbgb: just for the record, if you *could* clear E2H you'd have to change the mmu code, as things there work differently in those two modes
14:17jixyeah, I'd have to read more about how arm does stuff in general to make sense of this (but I'm busy with other stuff)
14:18bgb has quit [Ping timeout: 265 seconds]
14:24acelogic has joined #asahi-dev
14:32bgb has joined #asahi-dev
14:37bgb has quit [Ping timeout: 260 seconds]
14:40bgb has joined #asahi-dev
14:46bgb has quit [Ping timeout: 265 seconds]
14:49l0bara has joined #asahi-dev
15:04bgb has joined #asahi-dev
15:05acelogic has quit [Ping timeout: 256 seconds]
15:07vimal has quit [Remote host closed the connection]
15:09bgb has quit [Ping timeout: 272 seconds]
15:10vimal has joined #asahi-dev
15:15bgb has joined #asahi-dev
15:20bgb has quit [Ping timeout: 246 seconds]
15:35bgb has joined #asahi-dev
15:40bgb has quit [Ping timeout: 272 seconds]
15:41never_releasedmarcan: I wonder if there's a chicken bit
15:41never_releasedfor this
15:51bgb has joined #asahi-dev
15:56bgb has quit [Ping timeout: 265 seconds]
16:00reispflanze[m] has quit [Quit: Idle for 30+ days]
16:09bgb has joined #asahi-dev
16:13bgb has quit [Ping timeout: 265 seconds]
16:19marcannever_released: sounds unlikely though, why hardcode this on if not to simplify the implementation?
16:27robinp_ has quit [Ping timeout: 240 seconds]
16:28robinp has joined #asahi-dev
16:33bgb has joined #asahi-dev
16:38bgb has quit [Ping timeout: 256 seconds]
16:40l0bara42 has joined #asahi-dev
16:42l0bara has quit [Ping timeout: 272 seconds]
17:23bgb has joined #asahi-dev
17:41bgb has quit [Ping timeout: 246 seconds]
18:16VinDuv has joined #asahi-dev
18:23bgb has joined #asahi-dev
18:25arnd has quit [Read error: Connection reset by peer]
18:25austriancoder has quit [Read error: Connection reset by peer]
18:26arnd has joined #asahi-dev
18:26austriancoder has joined #asahi-dev
18:56bgb has quit [Ping timeout: 240 seconds]
19:06acelogic has joined #asahi-dev
19:11bgb has joined #asahi-dev
19:11acelogic has quit [Remote host closed the connection]
19:12acelogic has joined #asahi-dev
19:15bgb has quit [Ping timeout: 272 seconds]
19:27bgb has joined #asahi-dev
19:31the-mentor has quit [Quit: The Lounge - https://thelounge.chat]
19:32bgb has quit [Ping timeout: 264 seconds]
19:35the-mentor has joined #asahi-dev
19:37l0bara42 has quit [Ping timeout: 256 seconds]
19:39l0bara has joined #asahi-dev
20:01bgb has joined #asahi-dev
20:05bgb has quit [Ping timeout: 264 seconds]
20:22acelogic has quit [Remote host closed the connection]
20:22acelogic has joined #asahi-dev
20:31bgb has joined #asahi-dev
20:35bgb has quit [Ping timeout: 246 seconds]
20:49bgb has joined #asahi-dev
20:53bgb has quit [Ping timeout: 246 seconds]
21:14bgb has joined #asahi-dev
21:18VinDuv has quit [Quit: Leaving.]
21:19bgb has quit [Ping timeout: 256 seconds]
21:49bgb has joined #asahi-dev
21:53bgb has quit [Ping timeout: 240 seconds]
22:05brandas has quit [Ping timeout: 264 seconds]
22:07bgb has joined #asahi-dev
22:11bgb has quit [Ping timeout: 240 seconds]
22:18bsandro has quit [Ping timeout: 256 seconds]
22:20bsandro has joined #asahi-dev
22:25bgb has joined #asahi-dev
22:29bgb has quit [Ping timeout: 256 seconds]
22:43bgb has joined #asahi-dev
22:48bgb has quit [Ping timeout: 264 seconds]
22:55bsandro has quit [Ping timeout: 256 seconds]
22:56bsandro has joined #asahi-dev
23:01bgb has joined #asahi-dev
23:04r1fl has quit [Read error: Connection reset by peer]
23:05r1fl has joined #asahi-dev
23:06bgb has quit [Ping timeout: 272 seconds]
23:14stemnic has quit [Ping timeout: 240 seconds]
23:15Hakon has quit [Ping timeout: 240 seconds]
23:18bgb has joined #asahi-dev
23:18Hakon has joined #asahi-dev
23:22bgb has quit [Ping timeout: 240 seconds]
23:30stemnic has joined #asahi-dev
23:32maor26 has quit [Ping timeout: 256 seconds]
23:38bgb has joined #asahi-dev
23:43bgb has quit [Ping timeout: 264 seconds]
23:58amw has joined #asahi-dev