2021-01-20
00:14acelogic has joined #asahi-dev
00:22acelogic has quit [Ping timeout: 256 seconds]
01:40ransom has joined #asahi-dev
01:48ransom has quit [Ping timeout: 256 seconds]
01:50ransom has joined #asahi-dev
02:37tiagom has joined #asahi-dev
02:54ransom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
03:05modwizcode has quit [Quit: Later]
03:55tiagom has quit [Quit: tiagom]
04:24tiagom has joined #asahi-dev
04:26artemist has quit [Ping timeout: 258 seconds]
04:31artemist has joined #asahi-dev
04:34tiagom has quit [Quit: tiagom]
04:57artemist has quit [Read error: Connection reset by peer]
04:57artemist has joined #asahi-dev
05:01acelogic has joined #asahi-dev
05:07tiago has joined #asahi-dev
05:08tiago has quit [Client Quit]
05:15tiagom has joined #asahi-dev
05:20tiagom has quit [Quit: leaving]
05:21ransom has joined #asahi-dev
05:24ransom has quit [Client Quit]
05:28tiagom has joined #asahi-dev
05:29tiagom has quit [Client Quit]
05:32tiagom has joined #asahi-dev
05:33tiagom has quit [Client Quit]
05:33tiagom has joined #asahi-dev
05:37r3n has quit [Ping timeout: 264 seconds]
05:46tiagom has quit [Quit: leaving]
05:47tiagom has joined #asahi-dev
06:03_whitelogger has joined #asahi-dev
06:06tiagom has quit [Quit: leaving]
06:33n40455 has joined #asahi-dev
06:33n40455 has left #asahi-dev [#asahi-dev]
06:34acelogic has quit [Ping timeout: 256 seconds]
06:34VinDuv has joined #asahi-dev
06:36acelogic has joined #asahi-dev
06:46m1kr0[m] has joined #asahi-dev
07:25VinDuv has quit [Quit: Leaving.]
07:40acelogic has quit [Read error: Connection reset by peer]
07:40acelogic has joined #asahi-dev
07:54acelogic has quit [Remote host closed the connection]
07:56acelogic has joined #asahi-dev
07:58volpe has joined #asahi-dev
08:06bostjan has joined #asahi-dev
08:09acelogic has quit [Remote host closed the connection]
08:10acelogic has joined #asahi-dev
08:10volpe_ has joined #asahi-dev
08:14fsc has joined #asahi-dev
08:16mogery has joined #asahi-dev
08:26_jannau_ has joined #asahi-dev
08:37wiloon has joined #asahi-dev
08:38mogeryy has joined #asahi-dev
08:38fsc_ has joined #asahi-dev
08:41fsc has quit [Ping timeout: 256 seconds]
08:41mogery has quit [Ping timeout: 256 seconds]
08:41Esmil has quit [Ping timeout: 256 seconds]
08:41Esmil has joined #asahi-dev
08:54Axenntio has joined #asahi-dev
08:57r1fl has joined #asahi-dev
09:18DrWhax has quit [Ping timeout: 240 seconds]
09:18yeoj has quit [Ping timeout: 240 seconds]
09:19yeoj has joined #asahi-dev
09:19vijfhoek has joined #asahi-dev
09:20DrWhax has joined #asahi-dev
09:34acelogic has quit [Ping timeout: 264 seconds]
09:37Axenntio has quit [Ping timeout: 272 seconds]
09:53thresh has joined #asahi-dev
10:00taziden has quit [Ping timeout: 240 seconds]
10:02mogeryy has quit [Read error: Connection reset by peer]
10:08taziden has joined #asahi-dev
10:10volpe has quit [Remote host closed the connection]
10:10volpe_ is now known as volpe
10:23e820 has joined #asahi-dev
10:25e820 has quit [Client Quit]
10:44mogeryy has joined #asahi-dev
10:46maor26 has joined #asahi-dev
10:46wiloon has quit [Quit: Connection closed for inactivity]
10:46mogeryy has quit [Client Quit]
10:47mogeryy has joined #asahi-dev
10:47mogeryy has quit [Remote host closed the connection]
10:48mogeryy has joined #asahi-dev
10:48mogeryy has quit [Remote host closed the connection]
10:49mogeryy has joined #asahi-dev
10:52maor26 has quit [Remote host closed the connection]
10:52maor26 has joined #asahi-dev
10:58snalty has joined #asahi-dev
11:08mogeryy has quit [Remote host closed the connection]
11:14fewfewwe has joined #asahi-dev
11:22amw2 has joined #asahi-dev
11:26amw2 has quit [Ping timeout: 246 seconds]
11:30vimal has joined #asahi-dev
11:37vimal has quit [Remote host closed the connection]
11:38vimal has joined #asahi-dev
11:38amw2 has joined #asahi-dev
11:44amw2 has quit [Ping timeout: 265 seconds]
11:47diddledanLinux and the ARM spec says to use 0x1 so I think Linux is spec correct. I'm not sure why the Apple Silicon might be using a different value
11:51diddledanas to WFI it looks like XNU does do WFI so it's not broken entirely.. the XNU does an extra command between dsb and wfi
11:55amw2 has joined #asahi-dev
12:01amw2 has quit [Ping timeout: 256 seconds]
12:04amw2 has joined #asahi-dev
12:17Alex[m] has joined #asahi-dev
12:20PdimH has joined #asahi-dev
12:28amw2 has quit [Ping timeout: 265 seconds]
12:41j`eyhttps://lore.kernel.org/linux-arm-kernel/70D1FB71-240D-4FC4-81BC-0954062A4D11@caramail.com/T/#u
12:50maor has joined #asahi-dev
12:53maor26 has quit [Ping timeout: 256 seconds]
13:00_jannau_marcan: samsung-uart probably works not yet. there's "samsung-uart …: could not find driver data" in the log
13:03jamadazi has joined #asahi-dev
13:08jn__marcan: the individual device data selected by the compat strings in the samsung-tty driver are guarded by #if CPU_S3*
13:09diddledanwith 4 big cores and 4 little ones and the bigLITTLE concept becoming more mainstream we need the pingus to be 4 big and 4 small
13:15fewfewwe has quit [Quit: Connection closed]
13:16myfreeweb has joined #asahi-dev
13:22aknt has joined #asahi-dev
13:35arsomeone in the youtube chat claims so >David Ryskalczyk e.g. clock-names = "uart", "clk_uart_baud0";
13:39plainbits has joined #asahi-dev
13:47davidrysk[m]that's me
13:47davidrysk[m]I can talk here
13:51TomJepp has joined #asahi-dev
13:58PdimH has quit [Quit: WeeChat 2.9]
14:00modwizcode has joined #asahi-dev
14:02luca020400 has joined #asahi-dev
14:21aknt has quit [Quit: Leaving]
15:04hungryhugo has joined #asahi-dev
15:14diddledancorellium claim fully working ubuntu https://twitter.com/DMConstantino/status/1351910277349056513
15:28ransom has joined #asahi-dev
15:28ransom has quit [Client Quit]
15:29_jannau_they pushed usb support to github a couple of hours ago: https://github.com/corellium/linux-m1/commits/master
15:29thecake21[m]pretty impressive they got there so fast.
15:29thecake21[m]guess having tons of experience with apple socs from iphones did pay off here
15:31thecake21[m]gpu acceleration is still the hardest part imho. and not something you can throw together in a few days
15:38skg has quit [Quit: 〜バイバイ〜!]
15:43skg has joined #asahi-dev
15:48sharpiro has joined #asahi-dev
16:20diddledanI think RX remasks on purpose because you're expected to drain the buffer before enabling the interrupt or it'll keep firing for every received byte
16:28diddledanwould it be easier to reason about by using bitshifting in the code rather than defining the values using hex? that way we can be sure of the actual bits that are being set
16:30jamadazi has quit [Ping timeout: 272 seconds]
16:34sharpiro has quit [Quit: Leaving]
16:37davidrysk[m]marcan: cutoff at 2am?
17:08lethalbit has joined #asahi-dev
17:26jamadazi has joined #asahi-dev
17:29Starymarcan, from stream chat: @marcan just FYI s3c6400 already supports a single-interrupt mode
17:30jamadazi has quit [Client Quit]
17:49VinDuv has joined #asahi-dev
17:52davidrysk[m]marcan: when are you going to sleep? it's nearly 3am
17:53hungryhugo has quit [Quit: Connection closed]
17:58davidrysk[m]alright :)
18:19Axenntio has joined #asahi-dev
18:19alicela1n[m] has joined #asahi-dev
18:22alicela1n[m] is now known as Alice[m]
18:38arthis isn't turning into a circular thing, where printk's from irq_* stuff cause serial writes, and serial writes cause the same irq_ things to happen, right?
18:40Axenntio has quit [Ping timeout: 272 seconds]
18:47yrlfmarcan: your apple_serial code is still using some S3C... macros, don't know if that is deliberate
18:48uberushaximus has quit [Ping timeout: 256 seconds]
19:04modwizcodeSo I've been playing around with other stuff and I was curious what compiler and linker flags m1n1 used and I'm now wondering why it's linked as a shared library before being copied out. Does it make a difference if it's linked that way vs as an executable if you're just copying out the mach-o that's been constructed in the guts anyway?
19:04plainbits has quit [Quit: Bye!]
19:33modwizcodeI looked at a PR and aparently the way shared is (ab)used here annoys clang which partially answered that question. But I realized there's other weirdness like I'm pretty sure it should be linked with -nostdlib or at least -nostartfiles theoretically. The invocations for doing non-hosted stuff are always like a random smattering of options because I feel like they just get copied forever.
19:33modwizcodeYeah
19:33jixthe only difference when removing -shared is that some relocation data doesn't end up in the elf (and in turn the macho) ... but I'm pretty sure that isn't used anyway?
19:34modwizcodeProbably also because the most documentation you get is other projects with a bunch of those flags/the individual flag documentation which is very unclear about what things actually do. Like -pie is defined as something like "enables position independent executable" or something.
19:35modwizcodeWhich doesn't tell you how that differs from -fpic, nor is the difference between -fPIE and -pie explained (I think I'm remembering the flag names right)
19:39modwizcodeI'm pedantic about these things and I have not figured out what the big flags are. the docs say large mode but wtf does that mean
19:39modwizcodeI assume maybe using larger offsets but I don't see why I have to tell it to do that???
19:53fsc_ has quit [Quit: leaving]
21:07TehLink has joined #asahi-dev
21:08TheLink has quit [Ping timeout: 240 seconds]
21:08TehLink is now known as TheLink
21:30yrlfjix: what difference are you getting when removing the shared? for my GCC toolchain removing -shared literally has no effect when -pie also exists
21:31jixyrlf: ah I partially failed at looking at the diff... I do get a difference... but it's less than I thought
21:31modwizcodeAfter a bit of research I think what would probably be desired is -fpic when doing codegen and -shared when linking.
21:32HotSwap has joined #asahi-dev
21:32modwizcodeAfaik (according to one place, next route is checking the gcc/ld source) the difference is the PIE has a fixed entry point
21:32modwizcodewhich is not what we want
21:32modwizcodeAT least I don't think it's what we want it might not matter
21:32modwizcodeBut "correctness" suggest it's not
21:33modwizcodeI don't think m1n1 should be big enough (I think it's not the overall size but internal to function size or something) to matter for that
21:33modwizcodewtf is a "NONE" relocation
21:33yrlfI don't know why they are put in the ELF anyway, since they literally encode no information
21:33modwizcodeI think there's a flag on to do it anyway
21:33modwizcode--no-apply-dynamic-relocs I think this might do it
21:33modwizcodebut don't quote me on that
21:34modwizcode"-Bsymbolic" I really want to know if this flag is there for a reason because looking it up suggests it does not
21:45yrlfmodwizcode: at least according to `gcc -dumpspecs`, -shared already implies -Bsymbolic for the linker call
21:47yrlfmodwizcode: apparently, NONE relocations are sometimes used to tell the linker that a section references another to not --gc-sections the other one away
21:50modwizcodeUhh it was a random blog post: https://eklitzke.org/position-independent-executables it was literally like the one thing I could find that gave a specific difference. I was going to follow up by checking my own code then the compiler source but my build system was broken.
21:51modwizcodedamn it made sense too
21:51modwizcodeAhhh I didn't actually know that
21:52modwizcodeRight that part made sense to me
21:52yrlfminimal linux x86_64 PIE entry: https://github.com/Ferdi265/dynamic-loader/blob/master/crt/static-pie-crt.c
21:53citruscitrus[m] has joined #asahi-dev
21:54modwizcodeah of course
21:58yrlffor a dynamically linked binary that is not -static-pie, the loader takes care of the relocating
21:59modwizcodeNo I think this is relevant I was asking because I think the flags being used for m1n1 should probably be paired down (apparently the existing ones break clang) and the fix for that didn't seem... quite right.
21:59modwizcodeYeah
21:59modwizcodeAnd the compiler flags too
22:00modwizcodefor -static-pie what does that do?
22:02yrlffor clang, there's nothing like -dumpspecs, so we have to find out ourselves what the equivalent ld.lld args are (probably the same as for GNU ld, but there might be slight quirks)
22:04yrlfthe -mgeneral-regs-only is also pretty much a hack, that I preemptively added since I noticed that printf writes to the q registers that aren't saved on interrupt.
22:20VinDuv has quit [Quit: Leaving.]
22:25fridtjof[m]Ah, that's what the R stands for? :D
22:26dottedmagmarcan: R is 01010010 so it really looks like a previous' character garbage in a shift register
22:31bostjan has quit [Quit: Leaving]
22:37modwizcodeWhat was the issue in the end?
22:37modwizcoderight but I was trying to figure out the specific
22:38modwizcodeI thought the interrupt controller was level triggered?
22:39modwizcodeAh that's what I was getting at, maybe I'll notice it if I rewatch from beginning at some point. The bit I watched was like "oh that's it" and then was like "okay I'm done" maybe next time he'll explain XD
22:44marcanthe mismatch isn't the problem, the UART driver assuming level-triggered support is the problem
22:45davidrysk[m]aah...
22:45modwizcodeThat's interesting
22:46modwizcode"our innovative technology features edge level interrupts for greater performance" ;)
22:47davidrysk[m]lmao the DMA stuff for the core is `#if 0`'d out
22:47davidrysk[m](for the uart)
22:47davidrysk[m](in xnu)
22:47davidrysk[m]it seems that apple doesn't use interrupts though, their driver is polled-mode
22:56snalty has quit [Quit: Leaving]
23:01maor has quit [Ping timeout: 272 seconds]
23:08volpe has quit [Remote host closed the connection]
23:14Emantor has quit [Quit: ZNC - http://znc.in]
23:17Emantor has joined #asahi-dev
23:33yrlfhuh, I think I have found GCC compiler flags that make it resolve ALL of the relocations at compile time
23:36j`eywhat flags? that sounds like it just got lucky.. because all the flags ive seen just minimise relocations
23:36yrlf(the flags are -static-pie for compiling and -static -pie for linking, clang doesn't like -static-pie for compiling though)
23:38yrlfI think the easiest way we can force a relocation there is `int x; int * xptr = x;` globally somewhere
23:40yrlfI was looking around trying different flags since both GCC and clang were generating relocations that I have definitely already seen GCC optimize away in my own projects
23:40modwizcodeI've been playing with it too and I was having things go very wrong but it looks like you're right -static-pie or the equivilient functionality is what we want here, the current flags are basically what (at least one definition of) -static-pie does
23:41kit_ty_kate has joined #asahi-dev