klange changed the topic of #osdev to: Operating System Development || Don't ask to ask---just ask! || For 3+ LoC, use a pastebin (for example https://gist.github.com/) || Stats + Old logs: http://osdev-logs.qzx.com New Logs: https://libera.irclog.whitequark.org/osdev || Visit https://wiki.osdev.org and https://forum.osdev.org || Books: https://wiki.osdev.org/Books
<geist> vdamewood: re the gap in x86-64, AFAIK all 64bit arches have that
<geist> ie, none implements absolutely every bit in virtual mode
<geist> aybe a super beefy POWER or s390 does?
<geist> but it's a hardware (TLB tag bits) vs functionality tradeoff
<geist> POWER could probaby do it beacuse they dont have nested page tables
<klange> geist: chatted with agraf in #qemu on oftc and that hvf trapping issue was tracked down, https://lists.gnu.org/archive/html/qemu-devel/2022-02/msg00609.html
<geist> ah yeah you're right. nice
k8yun has quit [Ping timeout: 240 seconds]
heat has quit [Remote host closed the connection]
[itchyjunk] has joined #osdev
k8yun has joined #osdev
Brnocrist has quit [Ping timeout: 245 seconds]
<klange> and confirmed that patch works, hvf vm is now slick and speedy
k8yun has quit [Quit: Leaving]
Brnocrist has joined #osdev
pretty_dumm_guy has quit [Quit: WeeChat 3.4]
<vdamewood> geist: Oh, really? re gap
gog has quit [Quit: byee]
<geist> yah it's pretty common. arm, riscv, etc all have the same thing
<geist> though they're at least cleaner about it: x86 throws a #GP if you touch the gap, #PF elsewhere
<geist> sane arches just toss a #PF. which makes way more sense
<klange> just gonna throw this out there: https://github.com/klange/toaruos/releases/tag/aarch64-preview
<bslsk05> ​github.com: Release Preview: ToaruOS 2.1 on ARMv8 · klange/toaruos · GitHub
<geist> make a fancy twitter thing and i'll share it
<klange> (nothing special as I've already pushed the relevant code, but presumably no one wants to sit around and build an aarch64-toaru toolchain)
Lugar has quit [Quit: Bye]
JanC_ has joined #osdev
JanC is now known as Guest7251
JanC_ is now known as JanC
Guest7251 has quit [Killed (molybdenum.libera.chat (Nickname regained by services))]
<bslsk05> ​twitter: <ToAruOS> I have put together a preview build of ToaruOS for ARMv8. It's still experimental, and only for QEMU's "-m virt", but it's got Doom. <github.com/klange/toaruos… https://t.co/xIE3AmORXX>
<geist> yay
mctpyt has joined #osdev
srjek has quit [Ping timeout: 240 seconds]
mctpyt has quit [Ping timeout: 240 seconds]
<klange> the fpu instructions I'm using in my "plasma" demo are so fast on the M1 that it just flickers patterns instead of visually morphing (the demo intentionally runs a thread in a constant loop to burn CPU)
<zid> heh
<zid> I'm going to have the same problem if I ever run my os on hw, it currently emulates zelda at approx realtime by.. virtue of qemu being slow
<zid> it's going to go brrrrrrr instead
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #osdev
<bslsk05> ​'ToaruOS 2.1 AArch64 on M1 HVF' by K Lange (00:02:24)
nyah has quit [Ping timeout: 256 seconds]
<Griwes> https://twitter.com/awr_hey/status/1489422379356803072 a bit re: prior segmentation discussions
<bslsk05> ​twitter: <awr_hey> https://pbs.twimg.com/media/FKt9rccVgAM9OQR.jpg
<geist> klange: nice, runs a lot faster without TCG huh?
<geist> also those m1 are ridiculous
<geist> klange: i forget, in that bootstub are you running out of EL3 or whatnot?
<geist> if not, what are you getting out of the fw_cfg?
<klange> virt machine starts -kernel in EL1. I set up MMU and read my actual kernel, which is linked at -2GiB
ZombieChicken has joined #osdev
<geist> oh the actual kernel is part of the ramdisk or something?
<geist> i'm just curious because -kernel and -initrd i think generally just plonk it in ram already without needing the fw_cfg
<geist> or did you set them as custom entries? i see the opt/org.* stuff
<klange> I didn't see -initrd ending up _anywhere_
<klange> I checked dtb, I checked mem region listings in the monitor... though I have not checked code yet.
<klange> I pass the actual kernel and the ramdisk as separate fw_cfg entries; bootstub loads kernel, kernel loads ramdisk
<geist> how did you set the opt/ things? that sounds useful. did'tknow you could do that
<geist> yah and the bootstub is -kernel, makes sense
<klange> -fw_cfg name=opt/org.toaruos.initrd,file=ramdisk.igz
<geist> ah good to know
<geist> the ramdisk just ends up somewhere. lemme see where it ends up. for fuchsia we're basically loading a boot shim with -kernel and them a single image in the -initrd slot that has the kernel + initial filesystem in it
<geist> but not using the fw_cfg feature
<geist> i *think* we read the location of the initrd out of the FDT or its hard coded. i can't find the code anymore since it's been rewritten by other people
<geist> also looks like a nice way to get to the ACPI bits if wanted, since if there's no UEFI bios nothig will otherwise pull it out and set it up
<geist> the FDT doesn't seem to come in through this interface though
<geist> ah yeah we do. found the code in the boot shim that does it. finds it in the /chosen key of the FDT
<klange> I have no entry in /chosen
<klange> Are you doing Linux boot in that stub?
<geist> yah we must be doing that
<geist> enough to think it's linux, yeah
<klange> I think for raw ELF it just silently ignores it
<geist> the node is "linux,initrd-start" it seems
<klange> I got a bootargs, stdout-path, and kaslr-seed, but -initrd is nowhere to be found
<klange> at least they give me my -append
<geist> yah
<geist> anyway, good to know
[itchyjunk] has quit [Remote host closed the connection]
masoudd has joined #osdev
ElectronApps has joined #osdev
Maxime has joined #osdev
ElectronApps has quit [Remote host closed the connection]
<Maxime> Hey there
<Maxime> I'm trying to build libgcc with no red zone, something i'[ve done a bunch of times before
<Maxime> But I think something changed in the gcc build system
<geist> which gcc are you using?
<Maxime> Latest
<geist> https://github.com/travisg/toolchains/blob/master/patches/gcc-patch.txt#L6 seems to be all i need to do, and i've built that against i think 11
<bslsk05> ​github.com: toolchains/gcc-patch.txt at master · travisg/toolchains · GitHub
<geist> but yeah i think it did change somewhere along the way
<geist> oh also line 35 may be needed
<geist> which adds that t-x86_64-elf to the build
<Maxime> Yeah i did pretty much that
<Maxime> I'm certain the MULTILIB_OPTIONS is correct - I added echoes in strategic spots along the way
<Maxime> But it seems to be ignored
k8yun has joined #osdev
<Maxime> Instead I get 32 and x32 multilibs
<geist> hmm, and you're specifically building the x86_64-elf triple?
<geist> the line 35 in that patch may be important
<Maxime> Yes, target is x86_64-elf
<Maxime> I added line 35 and can confirm that it is included by some makefile at some point
<geist> well, if you're interested, you can try that repo and its script and see if it does it
<Maxime> Oh I think I got it
<Maxime> Looks like it's trying to extract the multilib config from gcc before bulding libgcc
<Maxime> But it's calling my native gcc (which indeed multilibs for 32/x32 :) )
<geist> ooooh!
<Maxime> Yeah, that was it
<Maxime> Sorry for the bother
<geist> no worries! glad yougot it working
ZombieChicken has quit [Remote host closed the connection]
Maxime has quit [Quit: Leaving]
dmh has joined #osdev
dmh has quit [Quit: leaving]
dmh has joined #osdev
k8yun has quit [Ping timeout: 240 seconds]
k8yun has joined #osdev
zaquest has quit [Remote host closed the connection]
zaquest has joined #osdev
k8yun has quit [Ping timeout: 256 seconds]
gwizon has joined #osdev
gog has joined #osdev
GeDaMo has joined #osdev
gxt has quit [Remote host closed the connection]
gxt has joined #osdev
gog has quit [Quit: byee]
dennis95 has joined #osdev
gwizon has quit [Ping timeout: 240 seconds]
Retr0id6 has joined #osdev
Retr0id has quit [Read error: Connection reset by peer]
Retr0id6 is now known as Retr0id
kingoffrance has quit [Ping timeout: 250 seconds]
[itchyjunk] has joined #osdev
gog has joined #osdev
seds has quit [Ping timeout: 245 seconds]
seds has joined #osdev
sdfgsdfg has joined #osdev
kingoffrance has joined #osdev
zaquest has quit [Quit: Leaving]
xenos1984 has quit [Remote host closed the connection]
xenos1984 has joined #osdev
<bslsk05> ​'7nhvbb8b7qf81' by [idk] (--:--:--)
<gog> angery floof
<g1n> hi
<klange> after much annoyance, I have a toolchain on macos... had to hunt down some patches to build for arm host, and that was a pain to find because of course all the bug talk is about host=target m1 gcc builds that are _still_ not a thing
<klange> thankfully I still don't really poke toolchain stuff much, so now that it's out of the way I can go back to not caring
gxt has quit [Remote host closed the connection]
nyah has joined #osdev
gxt has joined #osdev
zaquest has joined #osdev
sdfgsdfg has quit [Quit: ayo yoyo ayo yoyo hololo, hololo.]
dude12312414 has joined #osdev
srjek has joined #osdev
Dreg has joined #osdev
k8yun has joined #osdev
gwizon has joined #osdev
gwizon has quit [Ping timeout: 256 seconds]
mahmutov has joined #osdev
Mutabah has quit [Ping timeout: 250 seconds]
Mutabah has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
srjek has quit [Ping timeout: 240 seconds]
dennis95 has quit [Quit: Leaving]
elastic_dog has quit [Ping timeout: 240 seconds]
elastic_dog has joined #osdev
MrBonkers has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
mahmutov has quit [Ping timeout: 240 seconds]
MrBonkers has joined #osdev
masoudd has quit [Quit: Leaving]
srjek has joined #osdev
gwizon has joined #osdev
Dreg has quit [Read error: Connection reset by peer]
Dreg has joined #osdev
<geist> yah i haven't been able to build for arm host either,b ut been using older x86 prebuilt toolchains in the interim
<geist> since i assume at some point someone will fix it so that it builds
<geist> gcc+binutils thatis
gwizon has quit [Quit: Lost terminal]
<geist> huh, noticed on apt get on an arm ubuntu machine there are kernels with -64k in them. *thats* how you select 64k pages on linux arm
<geist> i was vaguely wondering if it was a command line option or whatnot, but hadn't really tried to see
<geist> but naw, it's a linux compile option i guess
<geist> kinda makes sense actually because the kernel most likely needs to be compiled with the native page size, probably
<geist> due to ELF layout issues, etc
<raggi> Does the haiku syscall interface require user space register save?
<geist> i wouldn't think so if it follows the newos model, unless they changed it
<geist> the haiku folks over on OFTC at #haiku might kow off the top of their head though, why do you ask?
<raggi> Yeah. The reason I ask is I'm reviewing some libc patches and seeing a whole bunch of code dedicated to register saving which raised my eyebrow
<gog> the registers saved/on the stack of the process/is required for syscall
<gog> haiku help in the form of a haiku
<geist> ah. well it's not necessarily a bad model: have user space dump all the registers that aren't part of the syscall and then the contract with user and kernel is that kernel can trash/zero anythig o the way back
* raggi chuckles
<raggi> Yeah, it certainly opens space for some optimizations, but also opens up some nasty mistakes too
<geist> i cant offhand think of a particularly good or bad reason to do that
<geist> yah, it definitely means you'll need to be more careful about zeroing things out on the way out of the kernel
<raggi> I remember thinking about it quite a bit when Go did caller save in their first abi
<geist> which would be more annoying for an arch with a crapto of regs
<raggi> And on the way into the kernel, potentially
<raggi> You wouldn't want to accidentally read random junk from user space which feels more risky
<geist> yah though that's kinda what happens anywya with callee saved (the callee being the kernel) in this case
<geist> but i guess it matters how args are passed. i was thinking that args are still passed in regs, it's just the regs that dont participate in arg passing that are saved user side
<geist> in that case it's not much different re: passing garbage to the kernel. it's still garbage in for the non arg regs
<raggi> True
<raggi> There's some bad joke in here about being like openssl and dumping all that data into the entropy pool
<geist> in any of those cases if the kernel is paranoid about extra junk beig passed it has no real choice but to zero out unused regs on the way in after saving
[itchyjunk] has quit [Read error: Connection reset by peer]
GeDaMo has quit [Remote host closed the connection]
068AAJ084 has quit [Ping timeout: 240 seconds]
<Arsen> klange: sweet! nice
<Arsen> (wrt the arm port)
valerius_ has joined #osdev
epony has quit [Ping timeout: 240 seconds]
<friedy10-> eibcccunctjubdgbgeviteenlkgbtjfrcvnijfkcjdji
<bauen1> friedy10-: time to change your root password
<friedy10-> bauen1: my hand slipped
terminalpusher has joined #osdev
ZipCPU has quit [Remote host closed the connection]
ZipCPU has joined #osdev
wootehfoot has quit [Ping timeout: 256 seconds]
Lugar has joined #osdev
rustyy has quit [Quit: leaving]
rustyy has joined #osdev
terminalpusher has quit [Remote host closed the connection]
sdfgsdfg has joined #osdev
[itchyjunk] has joined #osdev
wootehfoot has joined #osdev
epony has joined #osdev
dequbed has quit [Ping timeout: 250 seconds]
dequbed has joined #osdev
pretty_dumm_guy has joined #osdev
rorx has quit [Ping timeout: 268 seconds]
rorx_ has joined #osdev
gwizon has joined #osdev