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
<Clockface> do you guys reccomend getting a temporary filesystem implementation going before kernel modules, or a temporary way of storing the kernel modules on disk first?
<Clockface> i guess the latter sounds easier in the long run
<moon-child> why not link all the fs implementations directly into the kernel?
troseman has joined #osdev
<geist> a cheesy but functional version is to implement a static in memory fs, basically. list of files, maybe included in the kernel itself
<geist> or appended to it. so you can start to build up your notion of kernel modules without needing secondary storage
<geist> then later it can morph into an initrd sort of
<Clockface> my things entire gimmick is that everything except the bootloader are modules loaded into memory, linking it to the kernel would defeat that
<Clockface> geist: that sounds useful
<Clockface> ty
pretty_dumm_guy has quit [Quit: WeeChat 3.5]
<zid> That's basically my recommendation to solve the fs and vfs chicken-egg regardless
jhagborg has joined #osdev
jhagborg has quit [Remote host closed the connection]
darkstardevx has joined #osdev
lainon has joined #osdev
lainon has quit [Client Quit]
mahmutov has quit [Ping timeout: 248 seconds]
gog has quit [Ping timeout: 250 seconds]
papaya has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
troseman has quit [Read error: Connection reset by peer]
papaya has joined #osdev
dude12312414 has joined #osdev
diamondbond has joined #osdev
diamondbond has quit [Quit: Leaving]
<klange> Filesystem first, imo. While there are plenty of ways to provide modules without a notion of a filesystem, and you may be interested in having filesystem implementations as modules, it's rare for hobby kernels to even get module support, so most get a filesystem an infinitely long time before they manage that...
<klange> I also think it's better to have functionality and then break it out, so even if you did want filesystem implementations as modules, they should start as not-modules.
<klange> I used to load modules as Multiboot 'modules', and I honestly think I modularized too much, you had to load so much stuff to get a working toaru32 system.
<klange> I dropped support for loading modules through Mutliboot - only ramdisks there. Now modules come from files that generally come from the ramdisk, which is a ustar fs layer provided by the base kernel.
<zid> see, ramdisk is always the solution
<kingoffrance> they're all ramdisks a series of buffers
<klange> all about layers, the ustar 'fs' doesn't care that it's dealing with a ramdisk, it could be a file on another fs, or a raw disk :)
C-Man has quit [Read error: Connection reset by peer]
<klange> I really should fix how I move from a read-only mounted tarball to a read-write tmpfs, though... it's currently all in userspace, basically the equivalent of rsync or cp -r and some mount shuffling
<klange> Either I should change up my tmpfs so it can deal in 512-byte blocks instead of page-size blocks, so it can just subsume the data from the tarball, or I should switch to another format... or start forcing alignment on the tarballs...
<klange> but for now I should sleep, I am actually tired at a timezone appropriate time, hurray jetlag!
<geist> huh. `addl %sp@+,%sp` does not do what i think it does
<geist> i cheated, and used qemu to translate it and see what it did, with `-d in_asm,op_opt`
<bslsk05> ​IRCCloud pastebin | Raw link: https://irccloud.com/pastebin/raw/NtdlcbEF
<geist> is the result
<geist> (A7 is SP)
<geist> so at first glance it loads what was at %sp (makes sense), then adds that to SP incremented by +4, stores the result back
<geist> like, it loads into SP *and* adds +4 at the end
<geist> well, it adds to SP, and then adds +4 because of the addressing mode
<geist> :mind blown:
srjek has quit [Ping timeout: 260 seconds]
<geist> in other cpus i've seen with complex addressing modes like that you generally just say it's undefined write into a register modified by the addressing mode, but 68k plows right through and says the postincrement of SP happens once the rest of the instruction completes
<geist> this kinda lines up with what i've read in the manual. i was expecting it to call out this ambiguity, but turns out there really isn't an ambiguity, so it doesn't call it out
<geist> the addressing modes simply happen left to right and in order
<bslsk05> ​IRCCloud pastebin | Raw link: https://irccloud.com/pastebin/raw/Tt41zTSd
<geist> that's a fun one... looks like it also does what it says on the tin. subtracts 4 from a2, derefs it, stores it at the newly decremented address, then post increments it by 4 and writes it back to a2
<geist> also i dunno the rules, but when taking a MMU fault presumably it unwinds this stuff so it can be repeated
<geist> the + then - one is more interesting: it derefs A2, then adds 4 to it, then subtracts 4 from it, and derefs that, and writes that back
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
Likorn has joined #osdev
Likorn has quit [Quit: WeeChat 3.4.1]
the_lanetly_052_ has joined #osdev
the_lanetly_052 has quit [Read error: Connection reset by peer]
lg has quit [Ping timeout: 248 seconds]
lg has joined #osdev
SR-71 has joined #osdev
SR-71 has left #osdev [#osdev]
YusufKhan has joined #osdev
<YusufKhan> How does drm/dri etc send ISA commands to gpus and other devices?
<clever> YusufKhan: each device has its own DRM driver in the linux source, that knows how to drive a specific device
YusufKhan has quit [Ping timeout: 250 seconds]
GeDaMo has joined #osdev
vimal has joined #osdev
Burgundy has joined #osdev
biblio has joined #osdev
corank_ has quit [Remote host closed the connection]
corank_ has joined #osdev
biblio has quit [Quit: Leaving]
bliminse has quit [Quit: leaving]
zaquest has quit [Remote host closed the connection]
zaquest has joined #osdev
corank_ has quit [Remote host closed the connection]
corank_ has joined #osdev
bliminse has joined #osdev
puck has quit [Excess Flood]
puck has joined #osdev
gog has joined #osdev
LittleFox has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
LittleFox has joined #osdev
dennis95 has joined #osdev
hodbogi_ has joined #osdev
<hodbogi_> I imagine most everyone likely uses GNU Make. I still kind of wish that all build systems didn't suck :D
<mjg> you mean none of them or at least one which does not
<mjg> i suspect both are in the same ballpark of pipedream tho :-P
<hodbogi_> heh
<hodbogi_> I mean that all build systems suck and it's a matter of which shitshow you want to work with. No different than 99% of all software development jobs :P
<hodbogi_> I've been playing around with bmake lately because I like how I don't have to struggle to remember operators like $< and $@, etc. I can use ones like $(.TARGET) and $(.PREFIX), and so forth. But it's just another build system that all sucks at the end of the day
<hodbogi_> Sometimes, I think about making my own butrealize that it will also, too be a shitshow.
xenos1984 has quit [Read error: Connection reset by peer]
<bauen1> hodbogi_: if you're gonna build your own, you could write a "meta buildsystem" on top of ninja, so you only need to generate the rules with the right dependencies and get the DAC and command execution done for you
Likorn has joined #osdev
<hodbogi_> Yeah but then you need Ninja
<bauen1> hodbogi_: but you won't need to reinvent ninja
<mjg> gonna have to check realities of using ninja in terms of performance
<hodbogi_> Ninja is pretty cool
<mjg> both gmake and bmake are f-word terrible when it comes to high -j builds
<j`ey> ninja is good at that
<mjg> they fork a metric fuckton and use a shared anonoymous pipe to communicate
<hodbogi_> parallel builds aren't always that great though tbh
<mjg> as a result you get out of the world contentnion on it
<hodbogi_> they can hide errors and things that make you wish you didn't use -j
<mjg> errors?
<mjg> they may make a mess out of warnings
<mjg> but erros break the build. worst case you restart to get a clear message
* mjg routinely does -j 40, no problems
<mjg> .. of that sort
<hodbogi_> yeah sometimes when compiling a large project with -j errors and such can get burried all over the place so I have to remove -j and then redo make and try and see what went wrong
<j`ey> yeah but that is better than doing -j1 always :P
<hodbogi_> not a big deal but
<mjg> well the alternative is to wait way more time with -j 1
<hodbogi_> Could just use a shell script too
<mjg> for the case which works
<hodbogi_> but the problem then is "which shell to use"
<hodbogi_> which isn't reliable
<j`ey> POSIX
<hodbogi_> basically
<j`ey> powershell :P
<mrvn> hodbogi_: GNU make has a flag to keep the output for each target in a block. Use that and log the build.
<hodbogi_> There are things that are fairly common that are say bash dependent, and then when you run it in tcsh or some shit it doesn't work and you wonder why- it's easy to not be aware of the features you may be using.
<hodbogi_> I completely hate gmake
<hodbogi_> I can't justify their stupid choice of special variables
<mrvn> hodbogi_: but yeah, the most easy way with large projects is to do "make -j -k || make"
<hodbogi_> are you sure it isn't format C: ?
<mrvn> hodbogi_: if you use bahs feature then that won't work on Debian at all. sh is not bash. If you want bash then you have to set SHELL in the makefile.
<hodbogi_> I am particulaarly a Slackware / Feeebsd user so
<hodbogi_> I only deal with debian at work :D
<mrvn> By the way, if your project fails with -j then it can also randomly fail with -j1. When you edit a file and rebuild you suddenly get broken build while clean + build will work.
<hodbogi_> Ok, I'll write this in wish right? :P
<hodbogi_> we'll make this a GUI tk shell application (kidding)
<mrvn> One thing I hate about GNU make is that you can't have it group output for each target AND have it display the output as it happens (for at least one target). If a traget goes into an infinite loop or goes interactive then the output never shows.
xenos1984 has joined #osdev
<hodbogi_> Heh you know if shells were an issue
<hodbogi_> I could alsways make it build busybox and deploy a busybox chroot
<hodbogi_> and use that to ensure that the build system is at least going to be sane
<hodbogi_> That's more work than I want to do though.
<j`ey> just rely on POSIX< thats basically that
srjek has joined #osdev
<hodbogi_> What the shit, apparently if you run -x on "" it returns true on some versions of bash and not others.
<hodbogi_> Fixed it anyways
pretty_dumm_guy has joined #osdev
<mrvn> it would return the return code of the previous command I think
Ram-Z has quit [Quit: ZNC - http://znc.in]
Ram-Z has joined #osdev
corank_ has quit [Remote host closed the connection]
corank_ has joined #osdev
heat has joined #osdev
<heat> yo
<hodbogi_> I should have a posix compatible bootstraping shell script now
<hodbogi_> it fetches nd builds bmake and everything else it needs into a build directory and generates a build wrapper for bmake that passes the right env.
<hodbogi_> I forked bmake and other lesser common dependencies that I agree to follow the license of (i.e. bsd licensed) as submodules for my repo so that I can maintain them and prevent having to worry abuild having all the required stuff.
Ali_A has joined #osdev
Jmabsd has quit [Quit: Leaving]
<zid> good job for not making me grab your weird build system in advance to build your stuff, by the sounds of it
mahmutov has joined #osdev
srjek has quit [Ping timeout: 250 seconds]
Mikaku has quit [Quit: server maintenance ...]
<hodbogi_> There are just some things that make sense to me to provide, especially since it helps me make sure that a specific supported version is used
<hodbogi_> I'm not going to build llvm and crap though
<hodbogi_> that takes forever
zagto has joined #osdev
hodbogi has quit [Quit: Lost terminal]
Mikaku has joined #osdev
Ali_A is now known as Aragami
toulene has joined #osdev
ravan has joined #osdev
Likorn has quit [Quit: WeeChat 3.4.1]
dennis95 has quit [Quit: Leaving]
Aragami has quit [Quit: Connection closed]
Emil_ is now known as Emil
sortie has quit [Quit: Leaving]
Likorn has joined #osdev
* geist yawns
<geist> good morning folks
srjek has joined #osdev
<bauen1> funny, i'm pretty sure gcc doesn't dump the stack usage for at least a lot of the c++ constructors
* kingoffrance pets geist, gives gog coffee
* gog pets geist, sips coffee
<kingoffrance> well played
<gog> :D
* papaya pets geist.
<papaya> I should get another coffee...
<geist> yay more coffee
<sbalmos> does getting more coffee involve petting geist today?
<geist> i'm okay with this arrangement
* sbalmos goes for another iced tea
<sbalmos> ;)
<geist> too cold here for iced tea
<graphitemaster> Just keep giving geist coffee like that episode of Simpsons where homer is force fed donuts by the devil.
<graphitemaster> Henlo osdevers
<sham1> I've never understood iced tea. Then again I do come from a rather cold climate so yeah
<sham1> I like my tea hot
<sham1> graphitemaster: ah yeah, where the Devil thought it would be a punishment for a glutton, but Homer proved the Devil wrong there
<geist> iced tea can be nice, but then i grew up in the South where that probably means Sweet Tea
<geist> which is, not so great
<sbalmos> one of these days I'll actually get back into cobbling together a kernel. always too many other side projects and interests
<geist> or maybe great if you like lots of sugar
<sbalmos> geist: great for the hummingbirds. ;)
<geist> sbalmos: i generally figure that's okay. as long as you have lots of side projects and interests, i think you're ahead in the game
<sham1> I wish I wasn't such a procrastenator. Or rather that I could stop
<geist> i go through phases where i waste a lot of time/energy on 'useless' projects like 68k or whatnot. but it gets it out of my system
* Ermine is a procrastinator and a Dae Dreamer
<sbalmos> I'll probably go for triple-pain and be one of those who tries to cobble together their kernel in Zig, because.
<nur> I waste a lot of time on useless projects too. Days, weeks... there are times when I want to just go "this is USELESS CRAP and I am no longer doing it" but then my boss will get all pissy and say "we employ you for this" and so I never say it.
<sham1> My problem is that I can't focus on one thing. Stupid ADD
<sham1> I'd really need to just force myself to write my thesis to its end and such so I could stop worrying about procrastenation. But it's like, I simply have trouble
<nur> what's your thesis on
<sham1> Comparing some algorithms for doing multi-dimentional interpolation of manifolds. Useful for machine learning and the like
hodbogi_ has quit [Ping timeout: 256 seconds]
* nur eyes glaze over
<sham1> It's a batchelor's thesis thing. I know that I can do it, I just need to force myself to finish it
<geist> i know some of these words
<nur> I've heard some of those words on star trek
<sham1> Yeah. Quite mathematical
<nur> math major?
<sham1> CS
<nur> wow nice
<nur> I went to a crap college so I never got to study such things
* geist aims the deflector dish at nur and sends a tachyon pulse
* nur goes back in time
* nur eyes glaze over
<sham1> You just need to check the polarity in the warp drives
<nur> I've heard some of those words on star trek
<sham1> But yeah. It's like, the hard part of the writing is done. It's probably the laziness and such because it's like I need to write like the conclution and such and I just can't find the motivation to actually do it even though I could probably do it in an hour or two with concerted effort
<sbalmos> The old-is-new pure math sciency sounding name for n-dimensional OLAP "cubes"
<nur> math major?
<Ermine> My coursework is also somewhat related to ML
<nur> wow nice
<sham1> For better or for worse, ML is and has been for a while now a very good thing to look at for stuff to write about
<nur> I went to a crap college so I never got to study such things
<gorgonical> nur: Same. My OS class taught us java.
<gorgonical> Every lecture the OS professor would instead talk about how hardcode things used to be in the 90s and how we were all soft these days
<gorgonical> They'd write their homepages in notepad in raw HTML or maybe dreamweaver if you were rich. It wasn't a great OS class
<Ermine> We had classes on C during the first year
<gorgonical> The first time I got to write in anything that wasn
<gorgonical> wasn't java was my database class where I wrote a set of REST API bindings for a DB in jisp
<gorgonical> lisp*
<gorgonical> Man my fingers today
zagto has quit [Quit: Konversation terminated!]
diamondbond has joined #osdev
Matt|home has quit [Quit: Leaving]
GeDaMo has quit [Remote host closed the connection]
<nur> and look at us, here we are.
<nur> btw I made the best "hit by tachyon pulse" joke and none of you noticed.
<heat> don't all CS courses use java?
<heat> i've yet to see one that uses a different main language
<nur> an OS one would be... kind of impractical.
<nur> not impossible, but highly impractical.
<gorgonical> nur: I noticed and even considered echoing geist for effect
<nur> aww :)
<gorgonical> heat: Yeah I think these days it's all java. Used to be scheme, but as nur said writing an OS in Java is at best highly contrived
* nur wipes a single tear
<gorgonical> And at worst covering a huge amount of fine detail
<sbalmos> all my CS classes, "a few years ago", were C++ with 16-bit x86 or Moto 68HC12 assembly for firmware and OS classes
<heat> huh i'm confused
<heat> isn't a course kinda the same as a degree?
seal331 has joined #osdev
<seal331> Hi
<gorgonical> heat: I consider a course == class
<geist> seal331: hi!
<seal331> So I've been following this tutorial https://wiki.osdev.org/Sparc_Barebones and ran into some issues, while the resulting thing boots on QEMU OpenBIOS when I tried to load it up using real SS5 firmware it errored out with a disklabel checksum error
<bslsk05> ​wiki.osdev.org: Sparc Barebones - OSDev Wiki
<seal331> I was able to fix it using some extra parameters to mkisofs but ran into another issue
<seal331> brb forgot the error name
<heat> gorgonical, why
<seal331> The real firmware throws out an "Instruction Access Exception"
<seal331> i have no idea how to fix it and I'd like to run it on real SS5 FW
<gorgonical> heat: probably because I'm american. For no particular reason, in my head it's a "degree in CS" a "(course|class) on (OSes|networks|algorithms)" and a specific "(lecture|class) that I attended this Wednesday"
<geist> seal331: oooooh! someone doing sparc!
<geist> this is new. i have to admit that i dont think anyone here offhand knows sparc that well, since it doesn't come up often
<geist> i haven't even fiddled with it much aside from the basics, though i really should
<seal331> Oh
* geist is at a precipice to maybe start fixating on sparc for a week or two....
<geist> i have a sparc lx and a sparc ss20 floating around, though i havven't used either in a while
<geist> kazinsal i think has a few too
<heat> gorgonical, okay thanks!
<gorgonical> I suppose possibly Bitweasil knows something about it, he's been involved with non-x86 for some time
<gorgonical> but that's a guess only
<jimbzy> I am scheduled to take my ham radio exam(s) on the 19th.
<geist> oh grats!
<sbalmos> oh there's another one of those hobbies / distractions I haven't been involved in for years
<geist> i've been putting that off for like 15 years
<sbalmos> I keep my license active, couldn't do a damn bit of CW if I tried though
<jimbzy> Same here, geist.
<jimbzy> I know I can pass at least the tech exam, but I figured what the hey.
<geist> i suspect outside of the stuff where you just have to memorize rules i could most likely pass it without studying, i bet
<jimbzy> One thing I learned is that starting that day I'll have to pay the FCC $35 to register a callsign if I pass.
<jimbzy> Can you tell the difference between a transistor and a capacitor?
<geist> yah, i think my problem is every year or so i sit down with a fresh license manual and start reading it end to end
<geist> and then get sidetracked maybe 1/2 way through it
<geist> whereas what i really should do is just study and take the damn test and then go back and fill in later if i need
<geist> it's my general strategy of 'if i'm gonna learn something i'm going to Deeply Learn' which doesn't always work
<sbalmos> you want a real time and money sink? get your pilot's license. and build a plane. ;)
<jimbzy> They have websites with free quizzes that draw from the question pools.
<geist> haha back when i lived in the SF bay area, that was a lot of my friends' time/money sink
<geist> then you could go fly to that steak house off i5 every week and get a $300 hamburger
<jimbzy> I can think of worse ways to spend one's time.
<sbalmos> geist: at least you got the price right. It ain't a $100 hamburger nowadays
<geist> ah yes. Harris Ranch
<jimbzy> It was probably a $300 burger back then
<geist> out in the middle of nowhere, has an airport attached to it, and is a fairly short flight from bay area
<sbalmos> but it's fun to say (and do) that you're roughly 2-2.5h flight time away from the east coast beaches or mountains. nice quick weekend getaway.
<jimbzy> Yeah, I'm familiar with it I think. I want to say it was all the way down past Fresno
<geist> now since i moved to PNW a few years back the idea of getting a pilots license is more of a steeper ask. i think you'd probably want IFR pretty quick sos you dont run into a mountain
<sbalmos> all depends on the day
<geist> yah but most days here statistically speaking...
<jimbzy> That makes you smarter than John Denver.
<sbalmos> true. that's my next real immediate time diversion that I keep avoiding, getting my instrument rating
<sbalmos> John Denver and Kennedy both directly contribute to 3+ hours of required night flight training for your private license
<sbalmos> both made obscenely boneheaded decisions
<jimbzy> Jeff K Junior
<gog> yeah your airspace is pretty constrained if you're west of the rockies and don't have instrument rating
<gog> is there even a pass below 10000ft that's safe to fly through?
<jimbzy> I just want to get my ham license hehe. I may never transmit, but I figure it'd be shame if the gubmint were to take it away due to lack of interest.
<gog> seems like it'd have terrible weather a lot of the time if there were
<kingoffrance> "Used to be scheme" as long as there is magic lambda salamander on the cover its all good
<sbalmos> jimbzy: Get a cheapo handheld ICOM or Yaesu 2m/440, find a few repeaters, go to town. Used to work all 24 hours of Field Day at the local ham radio club years back.
<jimbzy> Right on.
<jimbzy> I also want to try building some homebrew stuff, too.
<sbalmos> I bit my tongue, endured learning CW for my General a few years later, some of my home-from-college time was working overseas from a portable Yaesu and vertical antenna meant for mobile mountain. Put out maybe 100W if that.
<jimbzy> I got a good friend who's very tube savvy and has quite a collection and they said they'd help source stuff if needed.
<sbalmos> do you even still have to learn CW for General nowadays?
<jimbzy> Nope
<sbalmos> oh hell, go General then.
<sbalmos> 2m is fun, especially if you find your local weather spotter network during the severe t'storm / tornado times. But shortwave is moar funnar.
<jimbzy> I'm gonna try to do both technician and general in the same session.
<Bitweasil> gorgonical, good guess, but never got into Sparc stuff. I've done mostly SGI/MIPS as my non-x86 legacy computing, and lately am into ARM.
<jimbzy> I'd like to do some continuous wave stuff, too.
<Bitweasil> sbalmos, flying is awesome. Cessna 182s will do anything, they're the F150 of the air. The 172s are more of a Ranger.
<sbalmos> Bitweasil: Cessnas are slow packmules to me
<sbalmos> Bitweasil: I built an RV-9A. ;)
<geist> seal331: if i weren't butt deep in 68k hackery i'd fire up my sparcstation and see if i can follow along
<Bitweasil> Ok, I'm jealous. ;)
<jimbzy> I'd be happy with a Curtiss JN
<Bitweasil> I don't have the time to build an RV. And I know a *lot* of people who are 15 years into "Building an RV." :/
<sbalmos> yeah
<seal331> ty geist
<seal331> i guess i'll go post it on the forum then
<geist> seal331: but one legacy hardware osdev project at a time :)
<seal331> :)
<geist> sparc always seemed to be just annoying enough to be below my radar of things to fiddle with
<geist> but that being said it's probably one of the last remaining major 80s arches to port my OS to. that and maybe alpha
<gorgonical> seal331: the forums are a good spot for this. someone'll see it surely
<sbalmos> Alpha... now there was a fun little chip
<jimbzy> There was a person on OSNews talking about your OSeses.
<geist> oh yeah?
<geist> i forgot about osnews, i stopped following it years ago when thom just turned it into his political rant forum
<Bitweasil> That is a depressingly large majority of the internet anymore. :(
<sbalmos> geist: I always meant to try and find another OS site. I'm the same way
<geist> ah looks like it's a bit back on track
<jimbzy> It's still like that to some extent, but Alfman takes care of most of that in the comments.
<sbalmos> geist: Wish I could tell Thom to GFO
<geist> i remember back when it was still run by eugenia. back in the early 2000s
<jimbzy> Yeah.
<geist> she was one of my housemates at the time, i believe
<heat> oh yeah an intel engineer mentioned lk on the edk2 mailing list
<geist> or at least i think we were housemates at the time it started
<jimbzy> Awesome, original articles.
<heat> said it was built by "ARM folks"
<geist> heat: oh yeah? oh. :(
<heat> made me cringe a bit tbh
<geist> interesting because a lot of the x86 code is copyright intel
<heat> really?
<Bitweasil> Yeah.
<geist> yah, years ago they had some engineers on it and was actively submitting code to LK. never really told me precisely why, but i think they had some internal project that used it
<Bitweasil> Downsides of UEFI, it's basically all reference code. :(
<heat> oh there it is haha, intel corporation
<geist> i generally took as is, and later found out the hard way that a lot of the code they submitted was broken in subtle ways
<geist> took quite a bit of cleanup in the zircon repo to fix most of the major bugs
<heat> oops
<heat> like what?
<geist> mostly stuff like broken inline asm, dodgy casting, etc
<geist> usual sloppy C code stuff. i shoulda. been more picky about it
<heat> yeah
<Bitweasil> mmm... dodgy casting.
<Bitweasil> How *else* are you going to do integer math on your floating point values?
<geist> the page table code is the biggest place they submitted stuff, and i think it has since been mostly rewritten
<geist> but it was kinda not so good the deeper you looked
<geist> but whatever, free code, you get what you pay for
<Bitweasil> It's really easy to write clean, simple, and subtly broken page table code. :/
<geist> yah doubleplus on ARM. i spent most of yesterday staring at the ARM ARM and finding yet more ways the zircon code is subtly broken
<Bitweasil> ARMv8 stuff with the different granule sizes?
<geist> but hard to prove because most of it is 'hypothetically the cpu could ....'
<geist> yah
<Bitweasil> I haven't had to write that stuff yet, probably this year, though.
<geist> there's so many 'unless you do this the cpu could hypotheitically see this out of order' stuff
<Bitweasil> mmm, weak memory models! :D
<geist> if you strictly follow the rules, most of the page table manip should be framed with pretty hard DSBs, is the gist
<Bitweasil> I love that Apple's solution to "Emulating x86 memory ordering on a weak memory order chip" was "Add a bit to turn the chip into a strong memory order chip."
<Bitweasil> And it /works/. Rosetta is... what, 80% of native or something insanely good like that?
<geist> yah tjat's genius, since the atlernative is to generate a bunch of jitted code with tons of embedded DSB/DMBs
<Bitweasil> Absolutely.
<Bitweasil> And kill your bandwidth to memory.
<geist> this way at least hardware can just pretend it's strongly ordered, the way x86 does
<Bitweasil> I'm still waiting for a good "hybrid VM" sort of thing that can run x86 virtual machines, -ish. You can do it in qemu but it's glacial.
<Bitweasil> But you could have a Rosetta-like VM.
<Bitweasil> Just, I'm not sure what the demand is.
<geist> it's glacial, but as usual the M1 chews through it like a monster. ie, it's jitted and slower than native, but M1 does a darn good job of running the jitted code
<Bitweasil> (OS bits in ARM, taking x86 syscalls, thunk into ARM libraries and such for Linux... it would be beautiful)
<Bitweasil> Yeah, I was impressed that qemu on the M1 running a full x86 OS in qemu was *usable.*
<heat> horrifying
<Bitweasil> It was not *fast* but that it *worked at all...*
<Bitweasil> heat, if my computers work, I haven't fixed them enough yet.
<geist> still blows my mind that building fuchsia on M1 is pretty fast, despite the fact that all of the tools (rustc, clang, etc) are all x86 running under rosetta
<Bitweasil> Spotify working is a novelty to me these days, I've gone to ncspot for a command line client.
<geist> like, can do a core build in like 29 minutes, which is pretty comperable to a mid sized x86 box
<Bitweasil> On the Mini, or do you have a Studio yet?
<heat> that's pretty good
<Bitweasil> Or did they buy you a laptop for it?
<geist> i have a mini and a macbook pro
<Bitweasil> *nods*
<Bitweasil> I finally got my Mini shipped off.
<geist> but exactly as i thought, the M1 on the mini and the M1 pro on my macbook pro are basically identical, per core
<Bitweasil> *nods*
<geist> theres just more cores on the pro, and the ram is faster, but it dosen't seem to make much difference for mundane stuff like compiling
<Bitweasil> That's what the benchmarks have shown, it's literally the same per core performance.
<geist> yah and apparently basically the same clock rate, since they're more or less the same numbers for time based benchmarks
<Bitweasil> Yeah. They are.
<geist> and apparently that clock rate is 3.2Ghz, so it also blows me away it holds even with my 5950x at 4.6 or so
* Bitweasil purrs along with his A73s...
<geist> yah honestly the 5950x is not needed by my setup. it's nice to have a lot of cores on my server (3950x) because i have a lot of VMs running in parallel
<geist> but for my desktop, aside from heavy compiles, i can't use most of the cores
<geist> my justification at the time was thinking i'd be doing some FPGA work in the near future :)
<Bitweasil> What do you think about the... 5800X3D or whatever? The big honkin' L3 chip?
<geist> and for building somehting like LK i can't load up the cores fast enough. i just compile with `make -j` and it still cant light them all up
<heat> lk is super fast to build tbh
<heat> you should work on llvm or something similar ;)
<geist> heat: the power of C. the compiler takes longer to start up than compile the files
<geist> make can
<geist> cant spawn processes fast enough to run a few 100 gccs for .c files
<geist> also i have ccache enabled, so it doubleplus so speeds it up
<geist> Bitweasil: yeah was reading one of the reviews yesterday, but it was very gaming focused
<geist> they seemed to imply that it only helped games (makes sense), and other tests didn't really show anything (depends on the other tests, i guess)
<geist> but it was a gaming oriented sites. i'm curious what use cases outside of gaming it would be an uplift. probably some very precise rendering or whatnot things where the data set fits in the larger L3
<jimbzy> I only I only have a 5500U :(
<geist> what i also dunno is if the bigger L3 has any higher latencies or whatnot
<geist> i'd love to see a classic anandtech deep dive, but i kinda doubt we're going to get that anymore
<geist> so it goes.
<sbalmos> So is there any other good OS site other than osnews nowadays?
<jimbzy> ntiko
<geist> oh i dunno there's lots of stuff that's very linux centric
<sbalmos> yeah. :/
<geist> one can argue it's a sign of the last 20 years: most of the alternative oses that aren't windows or linux have died out
<geist> or at least the BSDs or whatnot that existed before are still around, but not generating any real news
<geist> it's not a fertile ground for new os stuff
<sbalmos> I kinda like watch seL4 and parts of Fuschia, just from the capability-based stuff, microkernel design, etc. Genode at times.
<sbalmos> s/watch/watching
<geist> yah.
<sbalmos> oh well. Guess I'll just be like you and continue tolerating the random Thom rant.
<heat> lwn is really good
<heat> linux centric, but very good
<sbalmos> though it's been weird how the site will go for weeks at a time without an update, and then suddenly have a slew of new articles
<sbalmos> anyway, have a good weekend
<jimbzy> Cheers
<geist> yah!
<geist> going to solder on some ram for my 68k board. 5MB here we come!
<Bitweasil> w00t!
<mjg> you are not the kind of person to go for accelerator cards, are you?
<mjg> i'm assuming this is an amiga :-P
<mjg> (although i hear there are accelerators for atari as well)
<mjg> re bsd et al, if one wants a bsd job they can get one, but only because few people are trying
<heat> it's not an amiga
<heat> it's a rosco m68k board
<heat> mjg: what bsd jobs? netflix?
<raggi> geist: you can have that speed boost on x64 too if you add an equivalent loader cache. Spawning new compilers for every kilobyte of text turns out to be kinda wasteful
<zid> we clearly need to implement Connection: Keep-Alive for gcc
<zid> and just run a bunch of .c files through the same instance
* moon-child bonks zid
<moon-child> gcc -c x.c y.c?
<kingoffrance> chmod +t gog
<gog> o:
<moon-child> what's +t
<heat> plus tee
<kingoffrance> sticky, long ago it meant dont swap out
<moon-child> ohhh
<kingoffrance> or so ive heard tales
<kingoffrance> dead oses tell no tales
<mjg> heat: not netflix :)
* moon-child 's reputation as a codgy old man is ruined
<kingoffrance> no, it can be faked pretty easy, dont give up
alpha2023 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
Matt|home has joined #osdev
<mrvn> zid: how long does it really take for gcc to spin up?
Ali_A has joined #osdev
seal331 has quit [Ping timeout: 256 seconds]
alpha2023 has joined #osdev
hodbogi has joined #osdev
alpha2023 has quit [Client Quit]
ZetItUp has quit [Ping timeout: 240 seconds]
Likorn has quit [Quit: WeeChat 3.4.1]
alpha2023 has joined #osdev
<geist> hmm, yeah sticky bit for executables. makes sense
<geist> i've only ever heard of it in the usage of dirs
<mrvn> I know of +t for dirs and files having different meanings. I wonder what +t means for sockets, devices or pipes.
<hodbogi> Everyone is going to hate me for making a 128B stack.
<hodbogi> Because ^&*() convention
<mrvn> huh?
pretty_dumm_guy has quit [Ping timeout: 246 seconds]
<mrvn> I have micro processes: Every process has one 4k page containing 1k level 2 page table, minimum level 1 page table, process struct, heap and stack.
<hodbogi> Okay so I'm not the only insane one
scripted has joined #osdev
<hodbogi> I am doing something similar, except I want to give 64K for every process
<papaya> Whats important here is that you recognize the insanity ;)
<scripted> When writing a page frame allocator, why can't I just use the type property of the memory map entry passed by multiboot to determine whether that entry is reserved or not?
<scripted> So like mmmt->type = MULTIBOOT_MEMORY_RESERVED
<mrvn> it's a bit insane to implement memory protection between processes but then give every process write access to the page table. :)
<mrvn> scripted: 1) because you can, 2) because you can't because BIOSes are buggy.
<hodbogi> I want to favor smaller processes that focus more on IPC than large processes that do everything for this toy
<hodbogi> so I decided 64K per process is more than they will ever need
<scripted> mrvn: Yes but if I allocate a frame I can just use that as an orientation to see whether I already reserved it.
<mrvn> hodbogi: You can save a lot by not having per process kernel stacks.
<hodbogi> Plus I appreciate Chuck Moore's explanation that a stack depth of 17-18 deep is infinite.
<mrvn> scripted: that would require 32bit per page. That's pretty inefficient.
<scripted> well yeah..
<dh`> the conclusion I came to a while back is that not enough things _really_ fit in 64K to make a 16-bit process mode worthwhile
<scripted> so that's why you use a bitmap?
<dh`> unless that's the point of what you're doing
<scripted> it doesn't use that much memory?
<hodbogi> so
<mrvn> scripted: a simple stack of free pages has zero overhead
<dh`> 1M is a much better small size
<mrvn> dh`: 1M is horrible. use 2M and give every process 1 page
<scripted> would 32 bits be enough for the bitmap?
<mrvn> hodbogi: if you remove the kernel stack that means you only need a page for the process structure and probably can put all the resource tracking for the process in there. Then on user space you need 1 page for the stack and COW for everything else.
<hodbogi> what I am doing isn't really as much of an OS, as much as it is a virtual machine for an architecture I worked on a while back. it only has 64K of memory, but you can manipulate the entire memory space using MMU & DMA. So.. while the architecture can only see 64K at a time, you can configure the MMU and DMA to access more memory than will ever be needed. So it's not exactly that it really only has 64K, it
<hodbogi> just only has 64K of working space. You could tell the MMU to bank in and out things, etc if you needed more scratch memory.
<mrvn> hodbogi: The process can have 16M stack and if it doesn't use it you don't have to ever allocate pages for it.
<hodbogi> and it's a stack based architecture but I have yet to find a need for more than 32 elements.
<mrvn> hodbogi: seems like a horrible limited architecture
<hodbogi> Well it's not meant to be a modern computer or anything.
<mrvn> hodbogi: if you want to emulate this on a modern cpu better stick with 4k granuarity for your MMU
<hodbogi> I designed most of it when I was going to school for computer engineering out of hatred for modern computing XD so it's really just a toy.
<mrvn> or go full on software emulation
<scripted> finally found something actually good
<hodbogi> The MMU and DMA kind of work together because I used a serial IO bus, in the CPLD, it's clocked several times the speed of the core, and the core gets a cycle once per collection of DMA cycles. It's a pretty weird architecture to say the least. The MMU depends on the DMA to accept memory requests and copy data faster than the core needs them. Translating some of the ideas to something like x86 will be odd.
<hodbogi> It's kind of like the DMA is more RDMA-like and the MMU works kind of like a NAT for the DMA. Horrible analogy
<bslsk05> ​docs.microsoft.com: DegaussMonitor function (highlevelmonitorconfigurationapi.h) - Win32 apps | Microsoft Docs
<hodbogi> What
<hodbogi> Out of all of the CRTs I had..
<hodbogi> Not one of them had software controlled Degaussing.
<kazinsal> was digging around in MSDN for something and somehow stumbled upon that
<hodbogi> I am not surprised it exists but I have never seen one with software controlled degauss
<kazinsal> wonder if it was meant for embedded systems with CRTs in them
<hodbogi> Maybe
<hodbogi> I've seen monitors with a hardware button, and I've seen monitors that you need to literally use a degaussing magnet
<hodbogi> My CRT monitor I have now has an auto adjust for the screen dimensions, like LCDs do XD
<hodbogi> It's kinda cool
<scripted> Is this a good way to implement the bitmap in a OS?
<bslsk05> ​www.mathcs.emory.edu <no title>
<mrvn> if you have to ask the answer is always no.
<mrvn> and it
<mrvn> and it's the wrong data structure anyway
<scripted> whaaat
xenos1984 has quit [Read error: Connection reset by peer]
<mrvn> it's not just bad, not just verry bad, it's also not correct.
<mrvn> and not even efficiejnt
Burgundy has quit [Ping timeout: 256 seconds]
<scripted> not even sure what to do now
<mrvn> do what we already told you weaks ago. Make a stack of free pages.
<geist> yeah but that involves linked list, which is a level or two past bitmaps
<geist> but a bitmap does work, but it requires a pretty good knowledge of bit twiddling, which you should know at this point
<mrvn> I would argue a single linked list is a level below bitmaps
* geist nods
<mrvn> another reason against bitmaps
* geist shrugs
<geist> i mean, it's sort of academic at this point. i would argue for a bitmap for getting started, because its simply a data structuer that tracks frees.
<geist> it's easy to implement because there's no implied notion of a structure per page, etc
<geist> which is another leap of logic
<geist> if you're *juuuuuuust* getting started all you want is 'give me a page to put stuff in' and bitmaps do that pretty well, beccause there's no second layer of this-represents-that
<geist> clearly its limiting, but it works pretty well
<geist> the data structure itself... well an optimized bitmap (one bit per page) requires at least some knowledge of bits, but you can be dumb about it and make an array of chars, one byte per page
<mrvn> except when you don't have a clue about bit twiddling. :)
<geist> sure. so make it less efficient
<geist> not great, but gets ya going
<mrvn> it basically comes down to "which you should know at this point". Either structure should be a non-issue or you aren't ready to write a kernel.
<geist> right
<geist> but.. that doesn't stop us from trying to help
<mrvn> scripted: and seriouslyl, you aren't ready for it yet
<geist> true but that's not as helpful
<scripted> mrvn: feel like I'm wasting time
<geist> well, you could for example go learn how to a) write a bitmap data structure and b) implement a linked list
<scripted> but then again I don't want to just give up
<geist> both of which you'll need to know pretty well
<geist> and the things you may learn in that process will help you for other things
<geist> ie, turn this into a learning experience
<scripted> yeah I read that article till mrvn told me it's the wrong data structure
<geist> then find another one
<scripted> I read previously another article which explained like in 2 sentences what a bitmap is and used synonyms like bit array and so on
<geist> mrvn was being a bit unhelpful. that article seems *okay* for the purposes of making a bitmap data structure
<mrvn> scripted: try reading at least one that doesn't use C from 1989 incorrectly.
<geist> i dont think it teaches you much since it just sort of implements it and dosn't tell you how/why it works
<mrvn> geist: it assumes int is 32bit.
<mrvn> and yeah, no teaching there, just blind showing of code
<geist> fine. sure. i mean it's not a great article, but it doesn't fundamentally lead someone astray. it's just not a great solution
<scripted> geist: this is basically what happened my entire osdev adventure
<scripted> *in
<geist> scripted: what do you mean?
<scripted> not sure how to explain it
<scripted> it's like learning a new language in a new country with a new culture
<geist> that it's hard and nothing is explained you the way you want it? welcome to life
<scripted> kinda that way
<geist> the universe does not owe you a clear path
<scripted> shows me how convenient learning for high school is
<geist> but... there's a tremendous amount of stuff out there on the topic, but it requires implicit understandings of a bunch of other things, whcih aren't called out
<mrvn> scripted: maybe go to your local library and get a book about algorithms or data structures. You need something that teaches you stuff instead of trying to copy&paste code together.
<geist> ie, it's not programming 3, built on programming 2 class
<scripted> geist: yeah I see what you mean
<geist> but we are pointing out there are basic data structures you should probably get familiar with, because they seem to be tripping you up
<scripted> mrvn: I did that, till.. yeah
<geist> but this is great, frankly, because these are things you will eventually have to learn as a programmer anyway
<geist> so it's a perfect learning opportunity
<scripted> it is
<hodbogi> Erlang supports bitmaps. I wonder how they do it
<geist> maybe you dont get an os hacked? fine. but you learn something along the way
<mrvn> scripted: and all of that you should do in user space on windows or linux. Only when you know this stuff is the time to try your hand at a kernel. A kernel is not a good way to learn.
<mrvn> hodbogi: c++ supports bitmaps
<scripted> mrvn: yeah I know, but I don't want to kinda end it now
<scripted> I make progress, but its very slow
xenos1984 has joined #osdev
<mrvn> scripted: but you are doing it by walking over broken glass and burning coals instead of using the walkway next too it.
<scripted> mrvn: sounds insane but I like it, and no I'm not a masochist
<hodbogi> I would argue that writing a kernel for something like x86 is probably not. Though, I found a lot of people in my CE major were learning to program for the first time with C and assembly on ARM.. which- as somebody who loves the 6502 I kinda hate arm tbh..
<geist> sure, but keep in mind that you can burn up good graces with other people that you lean on
<geist> if you keep asking basic questions, it tends to turn people off
<scripted> yeah
<scripted> especially in osdev
<scripted> LOL
<hodbogi> I also was an 80s kid and grew up with 8 bit computers though and using a computer was very different back then. You usually had to write code in order to do anything useful.
<scripted> that sounds like fun
<geist> right. same. sometimes you just wrote code at the bare metal because that was simply how it was
<geist> but it was also a lot simpler. OTOH there wasnt as good of tools or documentation available as easy as it is now
diamondbond has quit [Quit: Leaving]
<geist> so it was... different
<scripted> yeah, I think it's like getting into cyber security as a non technical person back then
<hodbogi> Yeah.. we were lucky enough though to have a bbs-like interface to the entire university library system we could dial out to if you had a computer and a modem that would work together.
<mrvn> remember tape drives?
<scripted> I'm not that old
<hodbogi> you could download papers and such that people wrote about and things and even check out books for pickup
<scripted> actually I'm not old at all
<geist> hodbogi: sounds pretty good. all i had was local bbses
<hodbogi> you know.. I may not have any tape drives left unless you count the casette recorder I use for my TRS-80 but.... I do have.. (getting a camera)
<geist> of which there weren't a lot of
<geist> but mostly game cracking and whatnot
<geist> i had a 5GB tape backup scsi thing for a while, tossed it maybe 10 years ago
<geist> and of course the obligatory ZIP drive back in the 90s, which was great for that sort of thing
<scripted> Do you guys think reverse engineering is easier than osdev?
<geist> no.
<geist> though 'reverse engineering' is a very very broad topic
<scripted> yeah I mean disassembling binaries
<geist> yes. for what purpose?
<scripted> trying to understand the source code
<geist> that's easy, doing something with that is a different can
<geist> there's no source code in a binary
<geist> it's compiled machine code
<scripted> No, I mean trying to understand the assembly code
<geist> (unless it's java, etc etc etc)
<geist> okay. well, it's *easy* in the sense that you just do it
<scripted> and also do something with it
<scripted> personally it was way harder for me to get into fiddling around with disassemblers
<geist> anyway, carry in. you have a lot of learning to do but it's fine. just dont get hung up in needing to make forward osdev progress all the time, because frankly there are far more unknown unknowns to you at this point
<geist> which is okay
<hodbogi> Found them!
<geist> everyone starts somewhere. trying to hack an x86 kernel.... probably not a great idea as a first programming
<scripted> geist: it's not my first programming experience
<geist> ah yeah syquest!
<scripted> but definitely for C
<hodbogi> Not tape drivesbut
<geist> yah those were pretty popular too
<hodbogi> It's one of the things I kept
<geist> i wish i remember what the model number of the scsi tape drive was. it was in an external box. think i got it from smeone on ebay or a friend or something
<geist> had 5GB (10GB compressed) tapes
<geist> 8mm tapes?
<geist> i technically have a tape drive now on this vaxstation, but i dont think you can get media for it anymore really. it's some DEC format
<scripted> I think it would make much more sense to learn more data structures right now than osdeving
<geist> problem with low level C code for kernel stuff is you almot immediately have to get your hands dirty and 'break the rules' so to speak
<scripted> can't always use crusty c89 too
<hodbogi> My first computer actually ^
<scripted> geist: Not only that, I don't have any use case for very old C versions rather than osdev
<geist> hodbogi: yah i have a coco 2 on the shelf
<geist> been trying to get a coco 3 but they're pretty rare and/or expensive
<hodbogi> yep! These are both coco2 64K
<hodbogi> one has extended color basic and one has regular color basic
<hodbogi> but I have a color forth program for them