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
Burgundy has quit [Ping timeout: 256 seconds]
gog has quit [Ping timeout: 260 seconds]
zid has quit [Ping timeout: 260 seconds]
zid has joined #osdev
zid has quit [Read error: Connection reset by peer]
zid has joined #osdev
rorx has quit [Ping timeout: 260 seconds]
<klange> I just want to note that my 'fetch'-alike predates all of these clones and forks.
<klange> ToaruOS has had `sysinfo` since at least 2015, possibly longer.
<klange> hm, imagemagick converted my targa to a png upside down... but eog opens the targa and it's the right way up...
<klange> weird
<klange> My process for these native single-window screenshots is the compositor will dump window textures as a targa image, since that's a straightforward raw bitmap format that has actual alpha channel support, and then I send those over to the VM host with a dumb TCP socket and use `convert` to turn them into PNGs for upload, since I don't have a PNG writer yet [because I don't have a deflate deflater yet...]
spikeheron has quit [Quit: WeeChat 3.7.1]
elastic_dog is now known as Guest674
Guest674 has quit [Killed (platinum.libera.chat (Nickname regained by services))]
elastic_dog has joined #osdev
spikeheron has joined #osdev
rorx has joined #osdev
<heat> but is it written in rust?
<heat> no? exactly
<bslsk05> ​github.com: A TGA image converted to PNG is flipped vertically. · Issue #3844 · ImageMagick/ImageMagick · GitHub
linear_cannon has quit [Ping timeout: 260 seconds]
<zid> he went very.. paragraphy at the end there
carbonfiber has joined #osdev
<klange> You know what would be useful... if I actually had some indicator when taking a screenshot... and if I didn't save them all to /tmp/screenshot.tga...
<klange> https://klange.dev/s/toaru_screen_2022-11-15_12_40_39.png so how about some toast notifications
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
<heat> TOAST
terrorjack has joined #osdev
<klange> I could also make it play a sound...
<kof123> In Mortal Kombat II, a specialized Toasty Fatality can make Dan Forden say "Toasty!"
<zid> panty_shot_alarm.wav
<klange> I recorded myself doing this: https://popcat.click/
<bslsk05> ​popcat.click: POPCAT
wxwisiasdf has joined #osdev
<wxwisiasdf> Hello people developing Systems that Operate on Systems Operating on Operations IRC chat ^_^
<wxwisiasdf> i am hence again doing small cursed things, this time i added utf32 support to my os with custom emoji graphics
<wxwisiasdf> and i implemented a Go minigame cuz why not
<heat> that's cool
<heat> i support utf32 on my kernel vt but I don't have unicode codepoints
<wxwisiasdf> i also added tamil and devanagari script
<wxwisiasdf> with handdrawn fonts
<wxwisiasdf> (handdrawn by me)
<wxwisiasdf> oh also, how has orbital been goin'?
<heat> what's orbital
<bslsk05> ​'blorp.wav' by K Lange (00:00:17)
<wxwisiasdf> your, os?
<wxwisiasdf> oops, onyx
<heat> lol
<heat> it's been going
<heat> tonight I've been refactoring bits of the elf loader, added a kernel unit testing framework
<heat> and I've set everything up for theoretical compat 32-bit executable support
<heat> if I ever want to do that, for some reason
<wxwisiasdf> oh nice
<wxwisiasdf> unit testing framework?
<heat> yes
<heat> very gtest like
<wxwisiasdf> aha...; that seems pretty neat, not sure how much one can unit test a kernel through
<heat> normally
<heat> linux has unit tests, zircon has unit tests
<wxwisiasdf> never looked into that
<wxwisiasdf> is it like userspace but with drivers or like?
<bslsk05> ​elixir.bootlin.com: KUNIT_EXPECT_EQ identifier - Linux source code (v6.0.8) - Bootlin
<wxwisiasdf> aha
<heat> it's just tests that runs in kernel space
<wxwisiasdf> so like, assert everywhere
<heat> I already had kernel API tests that tested things in units
<heat> but it's not very granular
<heat> no, it works exactly like a normal gtest
<wxwisiasdf> righty
smeso has quit [Quit: smeso]
smeso has joined #osdev
wxwisiasdf has quit [Ping timeout: 260 seconds]
eck has quit [Quit: PIRCH98:WIN 95/98/WIN NT:1.0 (build 1.0.1.1190)]
eck has joined #osdev
eck has quit [Quit: PIRCH98:WIN 95/98/WIN NT:1.0 (build 1.0.1.1190)]
eck has joined #osdev
rorx has quit [Ping timeout: 268 seconds]
rorx has joined #osdev
<heat> geist, linux was tlbi + dsb for every page
<heat> it turns out this has huge overhead lol
<heat> tlbi is apparently fully async, dsb is the barrier that actually waits for tlb coherence
zaquest has quit [Remote host closed the connection]
zaquest has joined #osdev
<geist> that's correct
<geist> still beats an IPI, but it's pretty expensive
<heat> hah, invlpgb also has the same semantics
<heat> it's almost like amd ripped this off of arm
<klys> so, I have word somewhere that gcc was originally derived from this stuff: ftp://ftp.update.uu.se/pub/pdp11/rt/decusc
<bslsk05> ​ftp.update.uu.se: 404 Not Found
<geist> yep!
<klys> you've looked at it?
<geist> amd solution can actually do a run of pages too
<geist> oh sorry, was responding to heat
<klys> o kk
<geist> hmm, lets see
<heat> my firefox doesn't support ftp :v
<klys> yeah mine neither, was using lynx a bit
<geist> hah i was just trying to find a good way to browse it here. chrome dropped ftp: a while back
<kazinsal> I clicked on that link and vivaldi crashed lmao
<heat> geist, i wonder if being able to do a run of pages is a big deal
<geist> probalby not
<heat> considering it's all weakly ordered
<klange> My terminal opened the link in Firefox, which asked if I wanted to open it... in Firefox. Firefox doesn't do FTP anymore.
<geist> i mean it probably is, but will be interesting ot see what the actually count is realistically
<geist> you have to read it out of a cpuid leaf
<klys> heat, I'm using firefox though with "add custom search engine 4.2" addon which is configured to redirect ftp:// links to queries to a local webserver which offers the link for reference as a result page.
<klange> (Nothing asked if I wanted to open it in Nautilus, which _does_ do FTP...)
<geist> my mac wanted to mount it as a fs
<heat> geist, you have to read what?
<geist> huh, macs can mount ftp servers as fses
<geist> did't know that
<geist> heat: the max count of the invlpgb instruction
<heat> MICROKENRELMCIROKERNELMCIROKERNELMCIROKNEREL
<heat> huh
<heat> odd
<heat> i wonder if the perf ceiling for invlpgb is way better than invlpg
<heat> probably so
<heat> considering invlpg is not weakly ordered
<geist> as well as invpcid
<heat> you can just fire off 100 invlpgb and dsbtlbsync
<heat> invpcid is weakly ordered?
<geist> no
<heat> ah, thought so
<heat> praise be tlb_single_page_flush_ceiling = 33;
srjek|home has quit [Ping timeout: 260 seconds]
heat has quit [Ping timeout: 260 seconds]
bgs has joined #osdev
<kof123> "MCIROKNEREL" is this some kind of clever way of saying microkernels have threading issues
<klys> he left.
Celelibi has joined #osdev
Burgundy has joined #osdev
pieguy128 has quit [Quit: ZNC 1.8.2 - https://znc.in]
pieguy128 has joined #osdev
PapaFrog has quit [Read error: Connection reset by peer]
PapaFrog has joined #osdev
epony has quit [Remote host closed the connection]
wxwisiasdf has joined #osdev
bgs has quit [Remote host closed the connection]
wxwisiasdf has quit [Ping timeout: 268 seconds]
jafarlihi has joined #osdev
<jafarlihi> Hey, does anyone have a hashset library for C?
jafarlihi has quit [Ping timeout: 260 seconds]
carbonfiber has quit [Quit: Connection closed for inactivity]
sprock has quit [Ping timeout: 248 seconds]
sprock has joined #osdev
GeDaMo has joined #osdev
<klange> i have made taking screenshots far too satisfying with this blorp sound effect and toast notification
Burgundy has quit [Ping timeout: 268 seconds]
carbonfiber has joined #osdev
<dminuoso> heat | slab is pretty much based on the fact that if you need it once, you'll probably need it again
<dminuoso> I mean this is not just about slab
<dminuoso> most `malloc` implementations allocate larger chunks from the operating system for precisely the same reason
<dminuoso> Its the assumption that people tend to call malloc multiple times
<dminuoso> The main thing about `slab` is just grouping by object type or allocation size, to provide an extremely low latency find-free-memory-region version
<klange> i pushed the blorp
kazinsal has quit []
kazinsal has joined #osdev
kazinsal has quit [Client Quit]
kazinsal has joined #osdev
<kazinsal> blorp requires a new release due to its importance
Burgundy has joined #osdev
bauen1 has quit [Ping timeout: 268 seconds]
potash has quit [Remote host closed the connection]
potash has joined #osdev
rein-er has joined #osdev
kof123 has quit [Ping timeout: 268 seconds]
kof123 has joined #osdev
potash has quit [Ping timeout: 260 seconds]
xenos1984 has quit [Read error: Connection reset by peer]
potash has joined #osdev
rorx has quit [Read error: Connection reset by peer]
rorx has joined #osdev
y0m0n has joined #osdev
xenos1984 has joined #osdev
Burgundy has quit [Ping timeout: 256 seconds]
kof123 has quit [Ping timeout: 268 seconds]
Raito_Bezarius has quit [Quit: free()]
potash has quit [Read error: Connection reset by peer]
Burgundy has joined #osdev
potash has joined #osdev
y0m0n has quit [Ping timeout: 260 seconds]
bauen1 has joined #osdev
Raito_Bezarius has joined #osdev
Raito_Bezarius has quit [Max SendQ exceeded]
y0m0n has joined #osdev
Burgundy has quit [Ping timeout: 240 seconds]
bauen1 has quit [Ping timeout: 268 seconds]
Raito_Bezarius has joined #osdev
bauen1 has joined #osdev
Raito_Bezarius has quit [Max SendQ exceeded]
Raito_Bezarius has joined #osdev
gxt has quit [Remote host closed the connection]
y0m0n has quit [Ping timeout: 256 seconds]
nyah has joined #osdev
gxt has joined #osdev
<klys> ok in case you've had it with ftp here are the files, http://show.ing.me/paste/decusc-11sp68.tar.gz
zid has quit []
wereii has quit [Ping timeout: 246 seconds]
wereii_ has joined #osdev
epony has joined #osdev
zid has joined #osdev
<zid> I got new ram, it's od
<zid> odd
<GeDaMo> Only odd? No even? :P
<zid> No, aida reports that it's an URDIMM, it was not supposed to be an URDIMM
bauen1 has quit [Ping timeout: 240 seconds]
bauen1 has joined #osdev
carbonfiber has quit [Quit: Connection closed for inactivity]
dude12312414 has joined #osdev
wgrant has joined #osdev
srjek has joined #osdev
Burgundy has joined #osdev
bauen1 has quit [Ping timeout: 256 seconds]
jimbzy has joined #osdev
<zid> ooh they have temp sensors too
immibis_ has joined #osdev
<immibis_> is the registered nick requirement really needed here? it seems like most clients don't know how to auto-join after identifying and not before
<zid> Yes
<zid> there's a tech called SASL that solves that btw immibis
<zid> You're logged in before the MOTD is given
<bslsk05> ​libera.chat: Configuring SASL for Quassel | Libera Chat
<zid> aand I need to go loosen my ram timings
zid has quit []
heat has joined #osdev
<heat> dminuoso, sure, but slab does what I said based on the object (or object size in case of kmalloc-on-slab)
<heat> it's extra shitty because malloc can take the 32MB you alloc and freed momentarily and break it down for smaller allocations
<heat> slab would just get a bunch of such objects just sitting there
<heat> my slab allocator has a policy of discarding free slabs for anything with objsize > 128KiB
<heat> sorry, >=
<heat> objsize > PAGE_SIZE skip percpu batch allocation
zid has joined #osdev
<heat> this mostly works okayish in order to get memory usage under control
<zid> The XMP profile the corsair kit uses is.. very aggressive, and I used it as a shortcut to set 933MHz clocks, don't do that.
bauen1 has joined #osdev
<heat> I know SLUB has a bunch of knobs you can turn to get it to work decently in low memory devices
<zid> 9/9/9/2 -> 13/13/13/1
bauen1 has quit [Ping timeout: 260 seconds]
bauen1 has joined #osdev
dude12312414 has quit [Ping timeout: 255 seconds]
KaitoDaumoto has joined #osdev
dude12312414 has joined #osdev
<mrvn> Do you alocate and free objects >4k often?
<mrvn> If you make a slab for objsize >= PAGE_SIZE do you allocate more virtual address space and leave holes between objects?
vdamewood has joined #osdev
<heat> no
<heat> hence why it opts out of the percpu allocation path
eroux has quit [Ping timeout: 256 seconds]
eroux has joined #osdev
<mrvn> I'm not sure I see the point of a SLAB for >= PAGE_SIZE at all. For me the point of the SLAB is to avoid the overhead of a full page for small objects. Security wise it's nice to INVLPG objects on free so use-after-free definetly will crash and such.
<mrvn> And it's not like I have objects like a network buffer where I create a million of them a second, pass them around functions and free them. They pass between processes so they get mapped and unmaped. I can't save on page table manipulations there.
<heat> there absolutely is a point for slabs > PAGE_SIZE
<mrvn> which would be?
<heat> is every allocation you do after PAGE_SIZE at page granularity?
eroux has quit [Ping timeout: 260 seconds]
<mrvn> So far. I guess if you have objects of 1.5 pages then the overhead matters a bit.
<heat> 25% a
<heat> internal fragmentation
<heat> that's *horrific*
<mrvn> irrelevant for 64bit (48-47 bit address space) at current ram sizes.
<heat> it's not irrelevant
<mrvn> allocations never fail due to lack of address space.
<heat> just because you're on 64-bit it doesn't mean you can swing around pages like it's hot
<heat> dude, this is not address space
<heat> this is actual memory
<mrvn> the half page lost for a 1.5 PAGE_SIZE object I call overhead. Yes, that matters.
eroux has joined #osdev
<mrvn> sorry, yes, internal fragmentation is the more common term.
srjek has quit [Ping timeout: 268 seconds]
<mrvn> heat: where do you have objects > PAGE_SIZE that aren't a multiple of PAGE_SIZE and not so big the internal fragmentation becomes small?
<heat> I don't know
<heat> but it's definitely not impossible to have allocations of such sizes
<heat> a big vector can for sure hit that
<mrvn> but then it remains a theoretical problem.
<mrvn> A vector is kind of variable size so that wouldn't fit the SLAB idea.
<heat> there's no SLAB idea
<heat> malloc is implemented on slab
<heat> see any of the BSDs, linux
<heat> you need to handle any variable size shit someone can throw at you
<heat> this also works as a heap, not just a object caching allocator bs
<mrvn> heat: malloc with SLAB will use multiple slabs. Each SLAB is normaly for a fixed object size.
<heat> I am aware, yes
<mrvn> and a vector has vairable size. So into what size slab would you put it?
<heat> erm
<heat> that question makes no sense
<heat> normally?
<heat> you put your vector's memory in whatever slab your size buckets into
<mrvn> It makes no sense without the malloc layer between the two that handles dynamically sized allocations.
<heat> but there's a malloc layer
<heat> as I said
<mrvn> No, you started with big vectors being a reason to have slabs for > PAGE_SIZE objects.
<heat> no shit
<heat> if malloc uses slabs you'll need slabs for big allocations too
<mrvn> big IF. My malloc won't use slabs for big objects. It's unlikely you get many of the same size and you can use best-fit or similar strategies and have differently sized objects in a big chunk of memory.
<bslsk05> ​github.com: Onyx/slab.cpp at master · heatd/Onyx · GitHub
<mrvn> If I find an example that uses lots of equally sized big objects then I will have to rething things. Something between 4k and 64k.
<mrvn> heat: those are all PAGE_SIZE aligned object sizes. You gain nothing over allocating pages directly.
<mrvn> (other than those below PAGE_SIZE obviously)
<mrvn> heat: The point of the kmalloc caches are so that you don't have to map and unmap memory every time. That safes time but adds the risk of use-after-free. And me having a microkernel I basically loose that because obejcts passed between processes need to be unmapped and mapped in the other process all the time.
<dminuoso> heat: Sure. At the end what this boils down to is optimizations based on static properties.
<mrvn> s/point/gain/
<mrvn> I just checked, I actually don't have any object even close to PAGE_SIZE that isn't some kind of buffer that gets passed between processes and needs to be page aligned and padded for that reason.
<mrvn> Biggest thing I have, potentially, are filenames / directory entries. dentries are probably the most wasteful objects I have, each using a page and most filenames being short.
[com]buster has joined #osdev
<mrvn> I need to put them into a malloc pool instead of using pages for them but so far I'm lazy.
jimbzy has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
gog has joined #osdev
<gog> hi
Piraty has quit [Quit: -]
Piraty has joined #osdev
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
* Bitweasil yawns.
<Bitweasil> Hi.
bauen1 has quit [Ping timeout: 260 seconds]
wootehfoot has joined #osdev
<gog> that's geist's line
<gog> how dare you
<gog> :D
bauen1 has joined #osdev
bgs has joined #osdev
* mjg burps
* gog gives mjg a bagel
<mjg> is that the cure?
<gog> maybe
<zid> mjg bad at identifying bands
<mjg> the fuck you know about polish bands
<gog> gog and the bageltones
<zid> the cure are english, mjg
<mjg> over my dadbod
<mjg> heat: mofo how does one install onyx
<mjg> heat: need to build it from scratch?
<mjg> there is an updated haiku snapshot
<mjg> which i want to bench against it
<gog> i should try haiku on a liveusb it's been a minute
<mjg> it does boot in a vm for me and is operational
<gog> yeh i've used it a lot in a vm
<mjg> albeit i'm clearly incompatible with the general style
<gog> only once on real hardware
<gog> deskbar redesign is one of the things in their issue tracker iirc
<mjg> i use tiling window managers and the web browser is the only clickable prog i'm running
<mjg> terminals everywhere otherwise
<mjg> so i don't think the redesign will change anything of note in this regard ;p
GeDaMo has quit [Quit: I'm going to show these people something you don't want them to see. I'm going to show them a world without you.]
<gog> ah fair
<mrvn> mjg: it's terminals, all the way down.
<Ermine> gog: may I pet you?
<gog> yes
* Ermine pets gog
* gog prr
<zid> gog are you jealous of my new rams
<zid> I went from two unmatched sets, to two DIFFERENT unmatched sets, praise me
* geist yawns
<gog> nice
<zid> My timings situation is weird and needs some fiddling but I am not sure I can be bothered
<zid> one has an XMP profile for 933MHz 9/9/9 the other doesn't but has a *jedec* profile for 933 13/13/13, buuut my mobo's magic and lets me adjust the voltage per channel, so I could run 1.5V / 1.6V and maybe keep the 9/9/9, or maybe overclock both kits and leave timings at 13/13/13 blah blah
<zid> lots of work for when I can be bothered
<zid> also the new kit is ECC I didn't even realize
<gog> oh dang
<zid> so now I need a new new kit so both kits are ecc
<gog> i think my set is slightly mismatched
<gog> but it still works in dual channel
<zid> my previous mismatch was better
<gog> pretty sure the stock one i have is the slower one, the one my wife took out of her computer is the faster one
<zid> 8GB and 16GB kit, so I had 16GB of quad channel and 8GB of dual channel in NUMA
<gog> nice
* gog pets geist
<zid> lsotopo is still very confused though
<zid> and thinks I have 21GB of ram in numa domain 0
<heat> mjg, sup fucker
<geist> wasn't that always messed up?
<zid> yea, hence still very confused
<zid> but it used to show 16GB in numa domain at least, which made *some* sense
<mjg> heat: i asked you a question, politely!
<heat> sup qtpi
<heat> how are you sweetie? <3<3<3
<mjg> 21:45 < mjg> heat: mofo how does one install onyx
<mjg> 21:45 < mjg> heat: need to build it from scratch?
<gog> d'awww
<zid> Weirdly this kit was listed as 866, but doesn't actually.. have timings for 866
<zid> it has 933 and 838
<heat> mjg, ok so the situation is awkward
<heat> if you go to Onyx's nightly builds you have disk-images that boot in qemu EFI + ahci (q35)
<heat> Disk-image.img has gcc+binutils and wget (although http only wget)
<mjg> what nic do you support
<mjg> virtnet?
<gog> 838?
<gog> that's a bizarre timing
<heat> mjg, virtio, e1000 and co., pseudo-rtl8168
<heat> (where pseudo means not well tested but in theory there's a driver)
<zid> 13-13-13-32 (CL-RCD-RP-RAS) / 45-243-*-5-15-8-8-26-* (RC-RFC-**-RRD-WR-WTR-RTP-FAW-***)
<zid> 9-10- 9-27 (CL-RCD-RP-RAS) / 48-243-2-7-14-7-7-35-8 (RC-RFC-CR-RRD-WR-WTR-RTP-FAW-WCL)
<mjg> can you just link me the image
wootehfoot has quit [Ping timeout: 252 seconds]
elastic_dog has quit [Read error: Connection reset by peer]
<zid> That's what their profiles report as their prefered timings, the hynix is looser on the mains, but tighter on the secondaries
<bslsk05> ​github.com: Page not found · GitHub · GitHub
elastic_dog has joined #osdev
<mjg> how big is it?
<heat> you'll want to manually mount tmpfs in /tmp using a traditional mount(8) invocation
<heat> 1.5G
<mjg> wut
<heat> i should add an actual installation to my OS
<heat> yeah dude
<mjg> have you tried employing sparse formats
<heat> it has gcc, binutils, make, openssl, python, bash, etc
<mjg> wait that's genuinely populated?
<heat> yes
<mjg> huh
<heat> it's the full installation
<heat> well, "installation"
<mjg> allright then
<mjg> will bench this week
<heat> even has an efi partition
<mjg> vs haiku
<mjg> i expect you aregoing to win tho :p
<mjg> alternatively perhaps you should do it on your own hw
<heat> i always win epicly
<bslsk05> ​discuss.haiku-os.org: HELP WANTED: Haiku R1/beta4 boot & hardware testing! - OS - Haiku Community
<mjg> comes with a compiler
<mjg> so it's all dandy
<heat> now that you mention it I think I'll be doing IO stuff
<heat> i should get stable write
<heat> and then be able to install my OS
<heat> (from my OS)
<mjg> is it stable enough to self host?
<mjg> well let me restate, do things go haywire with single-threaded writes?
<heat> that EFI+AHCI restriction is just what I could cobble together using grub tools
<heat> hard question
<heat> probably
<heat> I usually use tmpfs
<heat> tmpfs works fine, the writeback stuff, etc needs some work
isaacwoods has joined #osdev
catern has joined #osdev
sonny has joined #osdev
<sonny> "Microsoft-paid trolls got me banned from OSDev.org and they are lying about BOOTBOOT ever since." -- Is there a story for this?
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<zid> yes, schizophrenia
<heat> who said that?
<geist> sadly yes
<heat> ah I see, bzt
<gog> ¯\_(ツ)_/¯
<geist> was just thinking about our friendly estonian the other day
<geist> i hope he's doing better
<gog> ohhh
<gog> that guy
<sonny> apart from that bootboot is ok to use?
<gog> probably
<j`ey> check out limine
<geist> i dont think this is that guy but that guy did have some issues
<heat> i prefer the racist riscv guy
<netbsduser> heat: object caching is no joke
<netbsduser> it's why the slab allocator is so fast
<netbsduser> take that away and it is a much lesser allocator
<zid> fun fact, in non-capitalist countries, schizophrenia doesn't tend to manifest conspiracy delusions
<sonny> j`ey I'm just looking around
<geist> zid: tell that to the estonian guy
<zid> he lives in a capitalist country
<sonny> I was reading about amd64 initialization then I realized today I can just use a boot loader
<zid> yes, please do
<gog> yes
<gog> do that
<zid> your project can either be an OS or a bootloader, not both
<netbsduser> zid: this is an object of considerable interest to me
<zid> grub is non-trivial project and it only boots a tiny spec called multiboot, or a tiny spec called linux, gl replacing it
<sonny> I think I've got a decent idea now, but it's gonna end up non trivial since I want to use a.out
<gog> why do you want to use a.out?
<netbsduser> i decided to change career and am in the middle of nursing school now, and my clinical supervisor mentioned this to me during my placement in IPCU
<geist> now that's a weird one
<zid> and why would that not be trivial
<zid> kernel /a.out.booter.multiboot; module /kernel.out
<sonny> I heard ELF was pages of docs
<zid> my elf loader is 4 lines
<gog> yeah, but it's really not that complicated to load
<geist> how about a flat binary?
<zid> but it took a bit of reading to get those 4 lines
<j`ey> sonny: you dont need to do much with ELF if youre just being loaded by a bootloader
<sonny> zid well I have to write a loader now
<sonny> geist that works?
<geist> i guess the point is figure out what features you need and then work backwards from that
<gog> the only thing you need to care about are the program headers
<gog> for the most part
<zid> it works if you write code that works as a flat binary
<geist> ie, do you need to load the kernel in a fixed spot? do you need it to be dybnamically linkable with other things? etc
<zid> same as as an elf loader is 4 lines if you make an ELF that can be loaded in 4 lines
<gog> if you try to do anything weird like i was working on then yeah you need to support more things
<geist> in general a flat binary will get you going if you can just hard code where to load it
<sonny> ohhhh
<sonny> ok
<zid> ELF is a flat binary with a header that tells you where the flat binary lives, if that's all you're using ELF for
<netbsduser> elf is a big book of docs but it's not all that hard to write a loader
<geist> only caveat there is nothing zeros your bss, so you have to do it yourself
<zid> you can also use it for more complicated things
<gog> most of the complicated bits of ELF are about shared object loading
<geist> that'll get you going. you can add ELF or multiboot or whatnot
<gog> you can safely ignore all of that for a kernel
<geist> think of multiboot as a wy to describe your flat binary to the loader: here's features i want, heres where i want to be loaded
<zid> gog: Exactly, my kernel is just two LOADs and you do nothing to them
<netbsduser> my first attempt at elf loading (shared libraries for kernel modules) took about one evening to do, with the help of some references to existing OSes
<zid> It's an ELF still though!
<gog> ELF has other benefits too
<gog> if you're using an ELF kernel you can use the debug symbols that gcc or clang generates
<geist> hey normally i'm 100% pro elf here, just trying to reduce the scope a bit since they seem to have some anxiety about dealing with it
<geist> if this gets em over the hump then great
<gog> with qemu's built in gdb stub
<sonny> gog: ur smart
<heat> netbsduser, so's are too hardcore for kernel modules
* geist pets teh gog
* gog prr
<zid> gog: I do split flat + elf for playstation
<sonny> brb
<gog> i'm not smart, i'm just a cat
<zid> attach to the rmote playstation, but tell gdb to 'file game.elf'
<geist> gog also knocks stuff off the table
<geist> so it's a give and take
<gog> did the original PS use ELF too?
<gog> i know PS2 did
<zid> nah some custom ex
<zid> exe
<gog> idk about anything later
<geist> ps3 did for sure
<bslsk05> ​github.com: psx/header.asm at master · zid/psx · GitHub
<gog> zid: you'd be the one to know about games consoles :D
<zid> WII uses .dol which is basically ELF
<geist> and ps4 and ps5 are freebsd based so i see no reason they wouldn't there
<zid> and GC and presumably wiiu+
<gog> and ofc xbox is PE because it's all derived from windows
<geist> right
<zid> ps header is basically just PS-X EXE, entry point, load addr, image size, stack pointer init
<gog> nice
<netbsduser> heat: i noticed later a lot of the big boy kernels just use relocatable objects, but i noticed it too late
<gog> keep it simple
<geist> including 360 which was PPC based, and therefore they ,ust have added PPC extensions to PE during that time
<geist> and dealt with big endian
<zid> I do a silly hack that nic hates in the linker script but meh
<gog> we love silly hacks at #osdev
<geist> this is a silly place
<gog> yes
<geist> side note i wonderif the discord has grown up any
<gog> we're silly people who do completely unnecessary projects because it's "fun"
<geist> anyone hanging out there seen if it's improved?
<zid> not unless that guy got hit by a bus
<geist> actually gal
sonny has quit [Quit: Client closed]
<zid> dude
<heat> who?
<geist> oh i forget, the one on the discord that was so abrasive, kicked zid and was upset by me traying o answer stuff contrary to their answer
<netbsduser> geist: i enjoy it a lot
<geist> had a short unmemorable handle so i can't remember
<netbsduser> lots of very interesting discussion there
<geist> was told in private that she is ust that way and sorry, etc etc
<heat> nice
<heat> sounds fun all around
<zid> just your average forum enjoyer
<geist> yah the problem in general was i had some answer they didn't agree with, which is fine. that happens
<geist> but since theyr'e a mod they can actually do soething about it, which is of course totally not okay
<zid> moderation is great and a lot of places lack it, but that moderator is a little mini-napoleon
<gog> i did not have a good time in the discord
<geist> so if they're gonna pull strings to enforce their ideas, i nope out of that
<gog> the irc channel is much more chill
<netbsduser> there are some LittleKernel'ers and Fuschsites there who can be fun to talk with
<gog> geist is both
<geist> hah
<gog> and newos
<geist> yah that channel is hella dead
<gog> geist how many kernels have you made
<geist> 3 or 4 depending on how you account
<gog> nice
<netbsduser> the Managarm squad are also very helpful, and there is even a youngster who is somehow an expert on VMS and NT
<zid> and how many that you won't admit to, like freebsd
<geist> and whether or not a fork of ane xisting one counts, or whether or not weekend hacks count
<gog> i think they count
<geist> netbsduser: hmm is this the same discord?
<heat> geist literally wrote every kernel eve
<heat> r
<netbsduser> geist: i think so
<geist> nah. i just keep applying the same hammer (write OS) to all problems
<geist> but they all have basically the same DNA, etc
<gog> everything is a nail
<geist> so you should be able to spot them
<gog> apply hammer
<netbsduser> i assume you are talking about the one with quite a lot of Managarm people (they are the defining presence)
<heat> so you wrote literally every OS ever?
<heat> nice
<geist> there are a few silly ones i wrote that nevr made it too far
<geist> like a microkernel called Muffle which i never open sourced
<gog> newos became part of haiku which i think is very cool
<geist> one day i'd like to piddle with that again
<gog> i need to use haiku more
<gog> best OS
<geist> yah newos became haiku indeed
<geist> still full of early geist dna. back when i made a lot of mistakes i then learned from
<netbsduser> i haven't used haiku but i noticed it has a lot of filesystem supported (including read/write) than i saw in most hobby OSes
<geist> a lot of the LK project (a few years later) was to start over after newos and try different schemes for the same thing, and also to reduce the scope
<gog> it's more than a hobby OS at this point
<heat> do you fork your small experiments off of LK?
<netbsduser> including BFS, which i read a lovely book about by Giampaolo which was very helpful to me in learning about filesystems
<geist> the more recent stuff i've piddled with have been clean implementations, maybe with some headers copied over from LK
<geist> like x86.h, etc
<gog> it just doesn't have the sort of contributor base that the rest of the big open source OSes have
<netbsduser> he is now the father of Apple's APFS i think
<geist> like 3x86 was a fun hack i did a few years ago. muffle, etc
<heat> gog, haiku is pretty much a hobby OS at this point
<heat> so is openbsd, netbsd, dragonfly, etc
<gog> yeah i suppose its momentum has stalled
<geist> yah dbg is great. he was my first boss outta college basically
<gog> a little
<geist> worked for him for a year at Be before he left
<geist> then i kinda took over FS stuff for another year
<gog> Be is the biggest disappointment of the 90's
<gog> imo
<geist> yah it wa sjust at the tail end of Everyone Gets an OS!
<gog> technically superior to both major commercial OSes
<heat> i'm the biggest disappointment of the 2010s
<netbsduser> it's a shame the concept of object-oriented operating system didn't catch on particularly well
<geist> MSFT was in full force squelching all competition (worked!) and then most f the other arches died out so there was ust PC left
<geist> and apple was just starting to get themselves together again (SJ had just come back)
<gog> yeh OS X was around the corner back then
<geist> so it seemed like the OS world (and the desktop hardware world) just collapsed in on itself right about 2000
<gog> rip
<gog> now we have... windows 11
<netbsduser> beyond the filesystem i am not overly familiar with beos but it looked to me as though it was like NeXTSTEP if C++ instead of Objective-C
<geist> also windows started getting 'okay' at that point. XP came out in 2001 and it was light years better than win9x in most cases
<gog> Be was trying to be like apple in a lot of ways
<geist> so now regular desktop folks had actual serious kernel stuff, etc
<gog> multicore powerpc with a bespoke OS
<geist> gog: yeah also remember about then apple stopped licensing any mac designs, that was the main reason Be pivoted into x86
<gog> yes
<gog> which sucked, a lot of the PPC Mac clones were way nicer
<gog> like the PowerComputing brand ones
<gog> i worked for a photographer that swore by them
<geist> yah i remember we had these powercomputing ones, and this one bespoke 4 core PPC
<geist> it was the stress test
<heat> don't forget linux
<gog> i wish i could heat
<gog> i wish i could
<geist> i still do have 2 beboxes. i need to pull them out of the packaged boxes 've had them in since moving 5 years ago
<gog> o:
<netbsduser> meanwhile the Amiga community churns out 3 new PPC boxes every decade or so
<geist> probably will throw out my back moving them
<gog> of course geist has a bebox
<geist> 2
<gog> geist has eveery computer
<heat> yup
<heat> even riscv
<heat> and that's unobtanium
<geist> for a period of time there in the mid 2000s i actually had more PPC desktops than not
<gog> nice
<geist> not that i was in particular love with the architecture
<geist> but it was kinda my main machine, etc
<geist> but they were aready starting to get outclassed by mid 2000s era x86s
<heat> eieio
<geist> was holding onto the 'yeah ut it's a superior arhcitecture' dogfood
<gog> then the G5 happened
<geist> but by about 2005 or so the writing was on the wall
<gog> (nobody liked that)
<heat> so you switched to itanium? nice
<gog> lmao
<geist> yah i *have* a g5 powermac. was my main machine from about 2003-2005
<geist> but it was starting to get outclassed by much cheaper AMD machines at the time
<gog> it doubles as a space heater and a power bill grower
<geist> yah totally. still have it in the box. i shoulda sold it when i had the chance, they used to go for a lot of bux just as apple switched to x86
<geist> since folks that had old PPC code needed a PPC box to run, and keep as a spare etc
<gog> in a few years it'll be retro
<gog> and nerds will pay thousands for it
<geist> yah i mean someone does try to sell one for $1k every so often on ebay but i doubt they'l get it
<geist> also it's big and heavy, so shipping sucks
bgs has quit [Remote host closed the connection]
<geist> anyway for lightweight ppc hackery i have an original mac mini G4
<geist> it's cute, it runs linux just fine. single core 1.4Ghz G4 i think
<gog> i had a powerbook g4 from 2006-2009 that was my daily driver
<geist> and doesn't use uch power. so nice to generally keep around
<gog> aluminum 15"
<gog> decent machine but it had issues
<geist> yah same. 12" powermac. was a cute little laptop. still have it. battery is dead, hd is dead
<gog> rip
<geist> i booted it off a firewire disk the other day (you can actually install to an root from firewire!) and it works like a champ
<gog> i did like how sleek it was
<heat> i'm too young for non-x86
<gog> my computer now is just black slab'
<gog> not totally aesthetically unpleasant
<gog> but rather bland
<geist> yeah as someone i know (designer of the Bebox) used to say 'it's dark in the box'
<geist> ie, doesn't matter as long as it does what it does
<gog> yeh
<geist> (except to people like us that do care because we're nerds)
<gog> haha nerd
<zid> If the box is dark you need some light emitting resistors
<gog> you mean
<gog> lamp
<geist> but heh but windows on sides of computers makes it less noise dampening
<geist> oh side note: i built a 25U rack the other day from startech
<geist> so... 25U is a lot bigger than i thought
<sbalmos> just water-cool it. your computer will gurgle louder than your coffee maker or fish tank
<geist> so now i have a fairly imposing wheeled rack i need to populate soon
<zid> Light emitting resistor.
<geist> noice
<sbalmos> geist: I've got a wheeled 12U rack downstairs that sits beneath the basement stairs
<zid> They're next to the smoke emitting diodes in the store
<gog> pretty sure it's not supposed to be like that
<klange> They don't last very long, I keep having to replace mine!
<gog> where's roz alice and liam when you need them
<geist> yah 25U was a weird size. actually cheaper than the 18 or 12, so i went for it
<sbalmos> they're fun firecrackers
<geist> it'll work though, i ordered a nice heavy shelf for the bottom so ill move my freestanding server boxen there
<geist> and then start populating the top with networking gear i already have just stacked up
<sbalmos> hook up a resister, accidentally hit the wrong wheel on the bench power supply, feed it 20V instead of 2V, boom, profit!
<gog> pop pop!
<geist> and then move in both direction, like a heap and a stack
<sbalmos> paging visualized in 1U increments!
<geist> yep!
<sbalmos> heh
<geist> i'll probably replace one of my server boxes with a 4U rack case, which seem cheap enough
<heat> firmware works in the opposite way btw
<sbalmos> gahd I need to get off my lazy arse and start writing some boot code. I've got time now, waiting on other people
<geist> but take ATX etc
<geist> sbalmos: do it!
<heat> the stack and heap start at the middle of $memory_region
<heat> and grow apart
<sbalmos> geist: https://savemyserver.com/
<gog> nooo T_T don't grow apart
<bslsk05> ​savemyserver.com: SaveMyServer - #1 Seller of Refurbished Servers
* geist bats firmware off the table, like a cat
<geist> sbalmos: oh cute
<gog> conspiracy theory: we're all cats
<geist> well i dont really have a problem with the server hardware itself, it's just the rack case i need (read: want)
<sbalmos> geist: i have an old Dell R610 2U downstairs from there. Dual-Xeon E5600, 96 gigs RAM, 1.8TB in spinny disk hardware RAID, etc. It was like $300
<zid> 660nm LEN
<heat> gog, counter-conspiracy-theory: cats don't exist
<gog> dang
<heat> they're just weird dogs
<sbalmos> heat: those are foxes
<pitust> zid: it means that the NSA is about to hit it with a missle, better cover it with some paper
<pitust> or matches
<heat> everything is a weird dog if you squint hard enough
<sbalmos> zid: it's hot. throw some water on it. maybe gasoline. gasoline conducts heat better.
<heat> no
<pitust> no its very cold
<pitust> heat it up a bit with gasoline
<pitust> its also very sad, so you should hug it
heat is now known as _Heat
<geist> ahaha
<gog> yes metal irridesces red when it's cold
<gog> science fact
<geist> you justn eed to _Heat it up
<sbalmos> if it's red, it means you've reversed the polarity on the subspace field emitters
sonny has joined #osdev
<sbalmos> it needs to be blue
<_Heat> nooooooooo don't use reserved identifiers
<gog> _Heat you can't do that, you're a reserved name
<_Heat> i am the implementation
<sbalmos> you need to go to the main electrical paddock, turn off all the fences, and reset the master circuit breakers. but only one at a time.
<sbalmos> extern "C" _Heat;
<_Heat> that's a syntax error sweetie
<_Heat> this is not C
srjek has joined #osdev
<gog> lol
<sonny> Is linux a PE when it boots from uefi?
<j`ey> yes
<sonny> ah ok
<j`ey> I mean, it always has the PE header
<j`ey> (if you build it with EFI enabled, at least on arm64)
<_Heat> doesn't it depend on CONFIG_EFISTUB
<j`ey> (hence what I wrote in side parens)
<gog> yes
<_Heat> yes
_Heat is now known as heat
<zid> why were you reserved for a bit there heat
<heat> I can't have people talk about warmth with that name
<heat> the best executable format is COFF
<heat> true neutral
* gog coffs
<zid> ps-x exe is pretty neutral
<heat> nah, coff is just superior
<zid> I hate superior formats
<zid> people use the features
<heat> do you think elf is too unix and PE is too windows? COFF
<heat> do you think elf and PE are too advanced, and a.out is too caveman? COFF
<heat> it's the amish executable format
<heat> just like the amish think the peak of technology was in the 1800s, you think the peak of executable formats was in 1983
<gog> PE is just spicy COFF
<heat> ELF is a circumcised COFF
<gog> l'chiam
<heat> I find it really odd how https://wiki.osdev.org/ELF_Tutorial does not teach you how to load ELFs
<bslsk05> ​wiki.osdev.org: ELF Tutorial - OSDev Wiki
<heat> it kinda teaches you how to load relocatable files
<gog> intentionally left as an exercise for the reader
<gog> WONTFIX
<heat> see, this is the kind of dubious osdev articles we know and love
<heat> j`ey, hah, you were right, CONFIG_EFISTUB got removed
<heat> ah, no, its CONFIG_EFI_STUB
torresjrjr has quit [Ping timeout: 246 seconds]
torresjrjr has joined #osdev
<gog> yeah they wouldn't remove a config like that people still refuse to use EFI if they can help it
<gog> which is understandable
Burgundy has quit [Ping timeout: 260 seconds]
sonny has quit [Quit: Client closed]