Search logs:

channel logs for 2004 - 2010 are archived at http://tunes.org/~nef/logs/old/ ·· can't be searched

#osdev2 = #osdev @ Libera from 23may2021 to present

#osdev @ OPN/FreeNode from 3apr2001 to 23may2021

all other channels are on OPN/FreeNode from 2004 to present


http://bespin.org/~qz/search/?view=1&c=osdev2&y=21&m=11&d=25

Thursday, 25 November 2021

01:08:00 <geist> get the combined version of the doc
01:08:00 <geist> though that's a good test of your ram
01:14:00 <geist> also side note AMD has a combined version of their doc as well
03:28:00 <moon-child> hmmm
03:28:00 <moon-child> somebody is selling a gpu for the ... surprisingly affordable price of $750
03:28:00 <moon-child> (like 600 usd)
03:33:00 <moon-child> or maybe I should just wait two years or however long before gpus are cheap again
03:37:00 <jjuran> Even MacRelix has a Git port :-)
07:01:00 <gorgonical_> This feels generic enough that I can ask here: the linux notion of percpu interrupts. For x86, all interrupts are per-cpu, right? As opposed to ARM64 where maybe the device only duplicates interrupts per CPU for say intid 0-15
07:23:00 <mxshift> I assume you mean modern x86. I think multiprocessor 386 did interesting things with interrupts
07:33:00 <gorgonical_> Indeed I do mean what's mentioned recently in the SDM or so
13:00:00 <klange> where the heck is my retail doom.wad... i'm bored of replaying the shareware episode over and over...
16:38:00 <lumo_e> hello all
16:38:00 <lumo_e> I want to write a type 1 hypervisor to experiment with my old laptop
16:39:00 <lumo_e> this laptop has already a couple of oses installed, and it uses an old amd dual core cheapo processor that supports amd svme
16:39:00 <lumo_e> now, what I would like to do is to have this relatively thin hypervisor boot an existing os
16:40:00 <lumo_e> which basically means it should be an hypervisor and a bootloader... should this be possible?
16:41:00 <lumo_e> I am trying to figure out the booting part but I cant' really wrap my head around it
16:41:00 <lumo_e> for example, linux can chroot into filesystems , but there is a whole os underneath that makes that possible
16:42:00 <lumo_e> I would be happy even just by loading grub in virtualized mode and let it do the rest
16:44:00 <zid> depends how your stuff is configured to boot them, efi or bios
16:45:00 <lumo_e> eh... so this being an old laptot it had windows 7 preinstalled in legacy mode, so MBR disk
16:45:00 <lumo_e> the firmware is actually EFI though, but I wouldn't take the risk of changing the whole disk to gpt although possible
16:46:00 <lumo_e> I wonder if I can write an efi application that then falls back to legacy booting and loads grub
16:47:00 <lumo_e> maybe I should read grub code and see how it does chainloading
16:47:00 <zid> or just.. boot grub
16:47:00 <lumo_e> I basically want that, right?
16:47:00 <zid> load grub's first sector to 0x7c00
16:47:00 <zid> bam
16:48:00 <lumo_e> mh
16:50:00 <lumo_e> my current plan was: bootable usb key that I can quickly deploy my code to, that would go into the old laptop and then from this key I would boot from the hard drive
16:50:00 <lumo_e> ok yes that could work actually, if I manage to access the hard drive
16:50:00 <lumo_e> with EFI it should be doable, I dunno with legacy booting
16:51:00 <lumo_e> one problem is that in order to activate virtualization I need to be in long mode (or at least in protected mode? don't remember)
16:51:00 <lumo_e> but then virtualization should be capable of running in real mode and booting grub
16:51:00 <lumo_e> maybe
16:52:00 <lumo_e> sounds to me like I'm going to have a lot of headaches, maybe I should do some basic experiments first
17:15:00 <sortie> <klange> where the heck is my retail doom.wad... i'm bored of replaying the shareware episode over and over...
17:15:00 <sortie> Say you're doing osdev without saying you're doing osdev
17:17:00 <GeDaMo> https://www.cs.unm.edu/~dlchao/flake/doom/chi/chi.html
17:17:00 <bslsk05> ​www.cs.unm.edu: Doom as an Interface for Process Management
17:17:00 <zid> heyy I remember that
17:24:00 <j`ey> is there a way to prevent (at compile time) functions from a certain section calling functions in different sections?
17:25:00 <GeDaMo> Don't declare the functions?
17:26:00 <j`ey> I mean linker sections
17:26:00 <GeDaMo> If they don't have a reference to the symbol, it's more difficult to call them :P
17:27:00 <j`ey> heh
17:35:00 <c2a1> j`ey: #define?
17:35:00 <sortie> If this is something like an early kernel, maybe it can be linked independently?
17:36:00 <sortie> Or maybe you can do a full link of the core kernel, and then link the core kernel with the early kernel to get the final binary.
17:36:00 <sortie> Then the core kernel can only call itself an not the early parts.
17:36:00 <j`ey> sortie: its something like that yeah, but its ok for things outside to call in, just not the other way around
17:36:00 <sortie> (which you can then safely unmap later)
17:37:00 <sortie> It should be possible to relink programs so that is one way of catching it at link time
17:37:00 <clever> ipxe for example, is designed to do 99% of its configuration at link time
17:38:00 <sortie> Although perhaps headers are an easier solution. Have a separate header directory for the early kernel, and have #ifndef EARLY #error nope #endif
17:38:00 <clever> the goal with ipxe, is to be able to generate 100's of kernels, but only compile things once
17:38:00 <sortie> Like c2a1 suggested
17:39:00 <sortie> I assume something like ipxe is done by having each part of it register some global stuff, or put something in a global section, and then some startup discovery phase connects the modular pieces
17:39:00 <sortie> Which e.g. makes a lot of sense for device drivers
17:40:00 <j`ey> I kinda need a linker approach, I need something that is minimally disruptive. it might not be ppssible though
17:40:00 <clever> sortie: yep, there is a special linker section for each type of list, with a start/end symbol, and the linker inserts list elements for you
17:40:00 <sortie> Any fundamental reason why the header approach doesn't work for you?
17:40:00 <clever> the other reason ipxe does it at link time, is to prevent code rot
17:41:00 <clever> something inside a #ifdef never gets compiled, and then code can change and fail to compile
17:41:00 <clever> if every line gets compiled all the time, you cant ignore such errors
17:41:00 <sortie> j`ey, maybe you can tell us a bit more about your needs and requirements. I think the kernel relink approach might be the easiest and least disruptive if you can clearly separate the .o files into each category
17:41:00 <j`ey> sortie: this is for a change im looking at to make in linux, I cant do it like that
17:41:00 <sortie> Gotcha
17:42:00 <sortie> That's a whole lot of very particular requirements right there
17:42:00 <j`ey> yes :)
17:42:00 <sortie> Why do you want to do this to Linux? What are you trying to accomplish?
17:42:00 <zid> I agree with "one way linking is enforcable as one way calling", which just means.. not including the 'wrong' header dir with -I, which isn't a hard constraint to keep, imo
17:44:00 <j`ey> Im trying to make a certain part of the code safer. its code that patches the kernel .text, and Im trying to make it self contained
19:00:00 <geist> j`ey: one strategyi’ve done for that sort of thing is take a module, say a group of .o files, link them together with ld -r which combines them into a larger .o
19:00:00 <geist> Then there’s an objcopy switch to let you unexport symbols
19:00:00 <clever> geist: ive been up to some crazy stuff lately, building an entire aarch64-be userland...
19:01:00 <geist> So basically if you mark symbols you want exported as actually exported (i forget the pragma or attribute for that ), link things how you want it with the granularity you want, and then mark everything local that isn’t exported
19:01:00 <clever> surprisingly, running the BE linux kernel was the simplest step, it still expects the bootloader to launch it in LE mode
19:01:00 <geist> Then you’ve now created little self contained modules of code
19:01:00 <clever> and the linux mmu enable code is what swaps to BE mode
19:01:00 <zid> yea I love double linking
19:02:00 <clever> but this also gives me an idea, that LK could do the same, so start.S is in LE, but the rest in BE
19:02:00 <zid> I use it to get got/plt to go away
19:02:00 <clever> then you can just run something like the ext4 testcase in qemu twice, in LE and BE modes
19:03:00 <geist> clever:sure
19:03:00 <geist> Actually hardest part is probably have to build a BE multilib
19:03:00 <geist> So back to fiddling with the tool chain
19:03:00 <clever> i'm not sure how LK deals with it, but linux didnt seem to need a special multilib flag
19:03:00 <clever> but maybe linux omits libgcc?
19:07:00 <geist> Omits lingcod
19:08:00 <clever> auto-complete?
19:09:00 * gog catches a lingcod
19:11:00 <kaichiuchu> something fun i've been doing
19:12:00 <kaichiuchu> unrelated to OS development itself but I've been writing code on a windows 98 machine
19:26:00 <geist> Yah autocomplete and osdev do not mix
19:26:00 <geist> Waking up, doing kitchen stuff for turkey day using ipad
19:34:00 <kingoffrance> re: not calling some function, there was a poison thing https://gcc.gnu.org/onlinedocs/gcc-3.2/cpp/Pragmas.html
19:34:00 <bslsk05> ​gcc.gnu.org: The C Preprocessor
19:34:00 <kingoffrance> Sometimes, there is an identifier that you want to remove completely from your program, and make sure that it never creeps back in. To enforce this, you can poison the identifier with this pragma. #pragma GCC poison is followed by a list of identifiers to poison. If any of those identifiers appears anywhere in the source after the directive, it is a hard error.
19:34:00 <clever> ooo, havent seen that one before!
19:35:00 <kingoffrance> i mean, thats kind of just a fancy automatic define...
19:35:00 <kingoffrance> i havent used it, i just remember the name lol
19:36:00 <kingoffrance> i dont see any revocation there, so looks like once poisoned always poisoned for that "translation unit" or whatever
20:30:00 <Ameisen> https://godbolt.org/z/6TeYT6WbE - not particularly fond of the coroutine codegen
20:30:00 <bslsk05> ​godbolt.org: Compiler Explorer
20:33:00 <geist> oh that's neat (the poison thing). i should suggest taht to work since we do explicitly have some things we like to poison in the kernel
20:33:00 <geist> plain `new` for example
20:44:00 <geist> Ameisen: which one? both compilers?
20:45:00 <geist> seems clang at least generates not a lot of extraneous symbols, though i haven't fully grokked what's going on there
21:06:00 <zid> oh good, my binutils updated to 2.37
21:06:00 <sortie> GNU ld (GNU Binutils) 2.24
21:07:00 <sortie> God damn at this rate I'm becoming Haiku
21:07:00 <sortie> It's a good vintage
21:07:00 <zid> I'd say stale
21:08:00 <sortie> Boy one of us is self-hosting you will drink my stale binutils while under my roof
21:08:00 <zid> hey, I built this entire linux machine with binutils
21:08:00 <sortie> When I grew up we didn't even have cross-compilers
21:09:00 <sortie> We used tutorials that inserted bugs that would explode in your face years down the road
21:09:00 <sortie> Like real osdevers
21:09:00 <sortie> osdevers these days have it so crazy what with all the tutorials I wrote so lazy they are all
21:10:00 <sortie> (to the camera) It's important to get some good lines in before I'm replaced with a markov bot and join the other ghosts in the channel
21:11:00 <GeDaMo> Are you sure you haven't already been replaced with a bot? :|
21:11:00 * gog beeps
21:12:00 <sortie> Sometimes I worry I just use a gpt3 on my diary to generate a few years worth of stuff and centuries from now they found it and are simulating it to reconstruct the past and that's why shit's been wack lately
21:17:00 <kingoffrance> "FINAL FANTASY Main Theme" JSDF,USMC,USArmy Bands if history is lost, its important to preserve the national anthem. future bots reconstructing the past, you know the truth now.
21:17:00 <kingoffrance> just have to prime them a little, they'll be fine
22:39:00 <kazinsal> sortie: the "good" ol' days*, with The Tutorial That Shall Not Be Named and friends
22:39:00 <kazinsal> * note: ol' days not guaranteed to actually be good
22:39:00 <j`ey> The Tutorial Written By My Housemate
22:39:00 <j`ey> *ex-Housemate
22:40:00 <gog> wait for real?
22:41:00 <j`ey> yup
22:42:00 <moon-child> is that why you kicked him out?
22:42:00 <j`ey> yeah, too many bugs, he had to go
22:44:00 <klange> > GNU ld (GNU Binutils) 2.36.1
22:44:00 <j`ey> gog: I wasnt into osdev at the time, so I didnt know!
22:44:00 <klange> sortie: I updated earlier this year, though unfortunately missed gcc 11
22:45:00 <kazinsal> I'm on whatever geist's toolchain script pulled down when I set up my build server earlier this year. I think GCC 10.3 and a similar vintage binutils
22:49:00 <klange> I was on 4.6 for a long time, then 6.4 for a long time. gcc 10.3 was released April 8th, 11.1 (there was no 11.0) was the 27th...