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
<zid> by 2030 it will be an efi spec whitepaper
vdamewood has quit [Quit: Life beckons]
<meithecatte[m]> authenticity garbage CR3 msrs?
<meithecatte[m]> oh, authenticly
<heat> it has no room for future features
<heat> with this set up, they get a stupid bad current hack, and then for future hacks they'll need to hack things up even further
* meithecatte[m] goes back to reading the pdf
<zid> That's how intel works heat
<zid> it's correct
<meithecatte[m]> okay i am still confused what you're talking about
<zid> heat: So next time we get 4 more MSRs, then we get 8 MSRS, etc?
<heat> absolutely
<heat> it's exponential
<heat> 2^(order of hackery)
<heat> meithecatte[m], 3.14 4L/5L Paging Switch
<zid> I don't actually see why they've added *more* cpu state
<zid> rather than just disabling things?
<heat> what did they add?
<zid> those CR3_ MSRs for one
<heat> because there's no way to toggle LA57 with paging on
<heat> a multitude of crap was assumed to be changed with paging off (in 32 bit mode)
<heat> so they had to add hacks for all that crap
<zid> right but.. why
<zid> that's totally not how the cpus have worked before now for mode switching behaviors
<zid> you loaded a 'new' one, and you had some thing you could do to flush it live
<heat> right
Maja has joined #osdev
<Maja> hi matrix got more fucky so i set up an actual irc channel like the good old days
<heat> my idea is something like wrmsr(MMU_MODE, ADDR_SPACE_57_BIT | PAGE_SIZE_69KiB | ASID10); wrmsr(CR3_MSR, cr3_val); where CR3_MSR would flush MMU_MODE
<zid> client*
<heat> where MMU_MODE writes would have no side effects until flush
<Maja> okay that's just a brain fart
<Maja> i swear i'm not doing this on purpose
<heat> this is a lot more sane (even if I guess harder to impl in sillicon???) than the CR3 MSR debauchery
<heat> there's no way those CR3 msrs age well, no fucking way
<heat> they already have blatant limitations (you can't have more than 4096 ASIDs, you can't change the paging mode atomically)
<bslsk05> ​videocardz.com: Intel proposes x86S, a 64-bit only architecture - VideoCardz.com
meithecatte[m] has left #osdev [#osdev]
<kazinsal> scroll up
<frkazoid333> oh oops
<Maja> fuck yeah now i don't feel bad about posting the link when the scrollback was zid talking about waifus or whatever
<Maja> this one is *blatant*
<heat> zid, fwiw I don't think all these MSRs are about adding state (because they don't add any new state), but rather fucking minimally change the verilog
<Maja> lol
<Maja> why can't they just do "loading cr4 to change the long mode bit is allowed"
<Maja> oh, right
<zid> I mean, they *do* add state
<heat> like "enable paging with 57-bit" and "enable paging with 48-bit" were already procedures they had, so they retrofit some MSRs on top of that shit
<zid> they might not add shit for silicon
<Maja> because then you modify cr4 and the paging setup gets yanked from under you until you load cr3
<Maja> or whatever
<zid> but technically if you wanted to like, test the cpu, or an implementation against it etc, it's more bits to twiddle for no real reason
<zid> I'm surprised they didn't just add a 64 flat mode tbh
<zid> that seems to be more their bag
<zid> add a new cpu mode
<zid> drop into that to fuck with your page tables, cpu boots into that too
<heat> i agree, 64-bit flat seems like a decent option
<Maja> okay but like, they explicitly wanted always-on paging for 64-bit mode
<heat> but why?
<Maja> for some reason that simplifies things
<heat> ARM has 64-bit nommu
<heat> riscv has 64-bit nommu
<zid> until you start fucking with other things such that you need hacks, yea
<zid> they wanted "one 64bit to rule them all"
<zid> but now there are 2 64-bits anyway
<heat> they had to add hacks to the firmware, to fucking SIPIs to set some basic MMU so things boot
<Maja> idk i am strictly a software catgirl i don't know how cpu design works under the hood
<Maja> yet
<zid> 4 once you consider the -s vs pml5 diagram :p
<Maja> -s is not a different mode though, it's simply a different gender of cpu
<zid> "do we honor this bit" etc is a different tapout of the design
<zid> that they need to test both of for now
<Maja> okay fair
<Maja> makes sense that the msrs they did are "minimal change to the verilog"
<zid> It's just more of.. everything, if you decide you can multiply different states together
<zid> like long flat vs long paging doubles up on a *lot* of stuff
<zid> documentation, silicon, engineering time, testing time, etc
dutch has quit [Quit: WeeChat 3.8]
<heat> i dont see the point of this if they're afraid to change stuff up
<zid> which is why they hate the 16bit stuff now, and only wanted one 64bit bit back then
<heat> you just get extra hacks
<zid> I'd just clean it the fuck up
<zid> rather than making x86-2
<zid> but it's actually
<zid> x86.0.0.0.2
<heat> 16 -> 32 -> 64 Just Works
<heat> toggling all the horrible bits just works for the time being (even if poorly in the current cr3 statetoo)
<zid> if you want it 64bit clean and don't support i/o bitmaps, why does the TSS even *exist* anymore etc
<Maja> for the rsp0 of course
<Maja> we may have a little bloat, as a treat
<Maja> :3
<heat> what's x86 without a cheeky descriptor table in the process
<zid> that's one thing that absolutely could and should be an msr lol
<zid> IA64_MSR_RSP_STAR_RING_ZERO_STAR_STAR
<heat> eliminate the need for swapgs
<geist> or at least replace it with 'setgs'
<heat> you mean IA32
<zid> no no we're going 64bit clean
<zid> 32bit is dead to us
<heat> IA32E
<Maja> oh right, swapgs
dutch has joined #osdev
<Ermine> tl;dr what's your verdict?
<Maja> didn't that create vulns at some point?
<heat> Maja, yes
<zid> It doesn't go too far enough
<zid> freebsd and linux and windows
<Maja> Ermine: too little too late?
<heat> Ermine, kind of sux, i'll be sending an email like tomorrow I guess
<heat> the CR3 stuff pissed me off
<heat> also yes, the blatant legacy garbo like the TSS, etc still existing
<heat> segmentation is probably hard to deal away with, you'd need 2 codepaths for x86 and x86s
<Maja> oh, and the name, it'll look like the plural of x86 the moment people get sloppy
<zid> x64
<zid> that's not oversubscribed yet!
<zid> itanium 3
<heat> ia64-2
<geist> x172
<zid> IA57
<zid> worst of all worlds.
<heat> hahahaha
<heat> we've realized 64-bit arithmetic is just too much
<heat> so now every register is 57-bits long
<geist> a nice smooth 19 octal digits
<Maja> a nice little homage to Grothendieck
<heat> i wonder if the cpuid will still say pentium 6 :v
<zid> Maja: This is a christian aol chat room
<Maja> wait which part?
<mcrod> hi
<Maja> do you consider mathematicians to be obscene creatures, mention of which to be kept out of a christian household?
<heat> yes
<Maja> omg cool one more reason for fundamentalist christians to hate me
<Maja> well "pi = 3" is in the bible, so clearly all mathematicians are in a state of blaspemy
<Maja> arguably the universe is too
potatojs has joined #osdev
<potatojs> hello
<Ermine> Ah, this explains why I catch fire when I get close to cathedrals
<mcrod> Maja: take a look at 666 and 616 and nero
Left_Turn has quit [Read error: Connection reset by peer]
nyah has quit [Quit: leaving]
potatojs has quit [Ping timeout: 240 seconds]
potatojs has joined #osdev
<potatojs> the shear amount of frustration is too much !
<Mutabah> You've only been doing this for a few days
<Mutabah> learning takes time, especially with the complex mess that is kernel-level stuff
<zid> If you can even get that far, early on
<zid> amateurs who decide to try osdev don't even usually get past tooling and bootloaders and stuff
<zid> (It's useful to find out how much you don't know, though
<potatojs> the bracket didnt close , is there more?
<potatojs> for some reason , loading disk is failing, it worked before , when i added a kernel, it fails
<zid> are you doing real mode stuff?
<zid> I have no idea how to debug that, one of the many pleasures of writing bootloader stuff is how hard that is
<zid> bochs can do an okay job of it I suppose
<zid> if you want real help you'll need to post code + what you expect to happen + what actually happens + what you tried etc
<potatojs> i am using qemu
<potatojs> ok ok
<zid> otherwise the best we can do is commiserate
andydude has joined #osdev
<potatojs> load_kernel:
<potatojs> ;setting up Disk
<potatojs> mov dl, [disknum]; the disk type to read 80h for harddisk (using disknum)
<potatojs> mov al, 25; number of sectors to read
<potatojs> ;seting up CHS
<potatojs> mov ah, 0x02; first thing to set
<potatojs> mov ch, 0h; Cylinder to read ( C )
<potatojs> mov dh, 0h; which Head ( H )
<potatojs> mov cl, 2h; which sector to start reading ( S )
<zid> never ever do that again
<potatojs> int 13h; load disk !
<potatojs> jc load_kernel_err; repeat until kernel is loaded
<potatojs> cmp al, 01h
<potatojs> jne load_kernel_err_2
<potatojs> ret
<potatojs> you just said i should do that
<zid> /topic #osdev
<zid> "For 3+ LoC, use a pastebin (for example https://gist.github.com/) "
<bslsk05> ​gist.github.com: Discover gists · GitHub
<potatojs> what is LoC
<zid> lines of code
<zid> https://gist.github.com/zid/01054569dea724a527ba0c9fb989634e If you do it like this, we get syntax hilighting, line numbers etc, and you don't flood the channel out
<bslsk05> ​gist.github.com: cube.c · GitHub
andydude has quit [Ping timeout: 240 seconds]
<Maja> potatojs: don't "repeat until loaded" print the error message and the error code you get in... was it AH or AL? i forget
<potatojs> al
<potatojs> i cant find the share button
<zid> After you paste it
<zid> it's just a webpage you can link us to
<potatojs> should i copy and paste the link... ok
<zid> (see all the numbers and crap at the end of my url?)
<potatojs> i didnt check yours
<zid> You didn't have to
<bslsk05> ​gist.github.com: a boot loader · GitHub
<zid> after call load_kernel you fall into "protected_mode.asm"'s content
<Maja> irrelevant but you have a typo: KENREL
<zid> I assume 13h gives carry set for error, and al is the number of sectors read?
<zid> yea found a doc for it
<potatojs> al is number of sectors read
<Maja> RBIL: > AL = number of sectors transferred (only valid if CF set for some BIOSes)
<Maja> you don't need to check this
<potatojs> carry flag set if there was a fail i think
<Maja> underfull read is automatically an error
<zid> you're not setting bx to anything are you?
<Maja> and carry flag set
<potatojs> bx is 0
<Maja> you get an error code in AH, print it
<zid> yeaaa don't do that
<potatojs> es is 0x1000
<zid> oh
<potatojs> so its loaded into 0x1000:0000
<zid> didn't realize you'd loaded es with a funny value
<zid> I assumed either 0 or 7c00
<Maja> > xor ax, KERNEL_LOCATION
<Maja> i don't think you want that
<potatojs> damn i missed that Maja
<potatojs> let me change
<Maja> you're loading it to 0x10000 ^ (whatever ax was after print_message << 4) lol
<zid> can't see print_message or we could figure out the actual value it has :P
<zid> It might actually end up correct if al contains the last char read (a 0) and ah happens to be clear..
<Maja> lol
<zid> register dump from a debugger on line 22 would be ideal tbh
<zid> not sure you can debug real mode from qemu at all though?
<zid> I know gdb isn't.. amazing, at cpu mode switches, and probably doesn't show it right to begin with, is my gut feeling
<potatojs> ok it still fails
<zid> oh wait you could just hlt instead :D
<zid> did you set your qemu up properly so that you have the monitor you can type commands into potatojs?
<Maja> ctrl+alt+2 if you're using gui
<Maja> and... esc+2 if curses iirc?
<Maja> and yes, if you hlt then you can query the registers reliably in the monitor
<Maja> e.g. info registers
<Maja> or p $eax
<Maja> the 16-bit names aren't recognized iirc
<potatojs> i have no idea how to use qemu
<potatojs> i just use it to load the img
<potatojs> but i will try
<Maja> okay, new exciting thing to learn about yay!!
<zid> -monitor stdio is the easiest way
<zid> just makes your terminal act as a command line for qemu, and qemu runs in a different window
<potatojs> ok ok
<zid> If you hit enter after your thing boots it should say (qemu)
<zid> and you can type commands
<Maja> oh neat, i didn't know this approach
<potatojs> al, ah are used in the printing message so i just hlt after calling 13h, al,ah are not holding the correct numbers
<potatojs> bx ( ebx ) is 0
<zid> You should hlt just before it ideally
<zid> the int 13h may mess with your register contents
<potatojs> oh yea
<potatojs> am dumb
<zid> Then copy paste to a gist would be nice, so we can see too
<potatojs> ok
<bslsk05> ​gist.github.com: info registers · GitHub
<potatojs> here added the code ( to load the disk )
Maja has quit [Ping timeout: 264 seconds]
<zid> well that doesn't match
<potatojs> yes
<potatojs> why...
<zid> are you sure this is the correct hlt?
<potatojs> yep
<zid> looks right.. 0x7c15
<potatojs> you can see the exact code below it
<zid> eax having 0xc01 in it is complete nonsense though
<zid> yea but you have a lot of hlts
<zid> it's not unreasonable to think you possibly stopped on the wrong one
<potatojs> in the new i posted
<zid> given how eax is total nonsense and shouldn't be possible
<zid> but eip=0x7c15 does look like it would be that hlt
<potatojs> i only call text mode( to clear the screen ) the print message then load disk
<potatojs> only in load disk err labels has all the halts
<zid> you have ah = 0x0C, AL = 0X1, apparently directly after mov ah, 2; mov al, 25
<potatojs> yes
<zid> which.. definitely should not be possible
<potatojs> yes...
<zid> I wonder if x will work right
<potatojs> 0x25?
<zid> does... x /32i 0x7C00
<zid> give you a useful output?
<potatojs> yes
<zid> paste it for me?
<potatojs> lemme do a gist
<bslsk05> ​gist.github.com: x /32i 0x7C00 · GitHub
<zid> boo AT&T, I'll try :D
<zid> nope, you're halted on a different hlt
<zid> 0x00007c14: f4 hlt
<zid> 0x00007c15: b4 02 movb $2, %ah
<zid> that's the line directly *before* the code you pasted.
<zid> My hunch was 100% correct
<potatojs> i dont seeeee any
<zid> I assume
<zid> it's the final line of 'print.asm'
<potatojs> nope
<zid> 7c00 -> 'jmp start', <print.asm>, 0x7c15: 'mov ah, 0x02; first thing to set'
<zid> and 0x7C14 is a HLT, which you're on
<zid> hmm although
<zid> look at line 23 of your x /32i paste
<zid> 0x00007c26: 72 ec jb 0x7c14
<bslsk05> ​gist.github.com: print.asm · GitHub
<zid> That's supposed to jump to load_kernel_err I believe
<zid> but instead it's going to 1 byte before load_kernel
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
<potatojs> hmmmm
<zid> tis all very strange, something is messed up somewhere but either I missed something or the vital piece of info is missing, might have to get something cloneable
<zid> ah you have it on your github
<zid> can you push to a new branch or something?
terrorjack has joined #osdev
<potatojs> ok
<potatojs> do i need to make a new branch
<potatojs> just clone the main
<zid> nah
<potatojs> updated it
<zid> kk
<potatojs> thanks for the help
<zid> need to remember an option for ld..
<zid> There, massaged my system compiler into building this
<gog> zid: pregnananant
<zid> what qemu options are you using to boot this?
<gog> hang on
<zid> qemu -drive id=disk0,format=raw,file=os.img does something at least, prints booting then halts
<gog> wait are u asking me
* zid deletes a bunch of stuff to find out what is what
<zid> okay builds and does semi-useful stuff for me, I just needed to throw in a `cli` because as expected, I was on the wrong hlt
<zid> interrupts were driving the hlts forwards
<zid> eax = 0x219, ebx = 0, ecx = 2, edx = 0x80, es = 0x1000
<zid> I think you were running a different file to the one you were editing or something
<potatojs> the make file has it
<potatojs> which is no options
<potatojs> it is supposed to print booting the halt
<zid> just put "cli" as the first instruction
<potatojs> it is supposed to print booting then halt
<zid> and it does much more useful things
<potatojs> disable interrupts?
<zid> yes, interrupts unhalt you
<potatojs> i dont get i t
<zid> bios can leave keyboard interrupts etc pending, timer interrupts can fire, etc
<zid> so your first hlt can get unhalted
<zid> while you're busy typing info registers
<potatojs> eax has the right values
<zid> yea, it has 0x219 before, and 0xc01 after
<potatojs> after 13h ?
<zid> yea
<zid> and it loads.. e8 02 00 00 00 eb fe 05.. into memory by the looks of it
<potatojs> if i disabled interrupts before calling print , how did it run int 10h >
<zid> because 'int' is a fancy 'call'
<zid> that runs the interrupt handlers directly
<zid> *interrupts* are the external things that wake the cpu up
<zid> to run those same handlers
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<potatojs> am lost but ok....
<potatojs> am really lost
<zid> When an interrupt happens (literally, something gives a voltage to the interrupt request pins on the actual cpu)
<potatojs> ok..
<zid> the cpu sees this, and jumps to the interrupt handler code
<potatojs> ok...
<zid> this is called 'an interrupt'
<zid> That's what cli disables.
<potatojs> ok.......
<zid> why are you being shitty
<potatojs> i didnt not intend to put off that enery
<potatojs> energy
<zid> lots of dots = I am being dismissive of you please be quiet
<potatojs> my oks are like , a curious
<potatojs> noo
<potatojs> its more like okkkkkkkkkkkkkkkk
<potatojs> sorry about that
<potatojs> i didnt mean that
<Mutabah> Being verbose tends to help in text form communication. Unless you really have a rapport with the people you're talking with, and they can associate your comments to what you're actually thinking
<bslsk05> ​abbygenise.wordpress.com: Awesome Use of Ellipsis…. | What Makes a Text Awesome?
<zid> anyway, hlt before int 13h: 0x10000: 0x00 0x00 0x00 0x00 ...
<zid> hlt after int 13h: 0x10000: 0xe8 0x02 0x00 0x00 0x00 0xeb 0xfe 0x55 0x89 0xe5
<zid> so it clearly did something!
<zid> (and that's precisely what's at 0x200 in my .img)
<potatojs> got it Mutabah
<zid> I'd clean up your working space tbh, there's like 8 files called .img
<zid> and many of them give very similar but slightly incorrect results, so it's hard to tell you accidentally loaded the wrong one, etc
<potatojs> the main one is in ./os
<zid> that has two!
<potatojs> if you do make, it creats 2
<zid> with almost identical names
<potatojs> yea that was an error on my end
<zid> potatOs.img and potatoOs.img, I had to stare for 10 seconds to even find out which was which lol
<potatojs> potatOs with a O and potat0s with a sero
<potatojs> zero*
<potatojs> you cloned the old one
<potatojs> when i said "i have updated it " i fixed those issues
<potatojs> as in removed it and fixed the makefile
<potatojs> wait
<potatojs> no second thought
<potatojs> it still does that
<zid> Anyway, it works fine on my end under a debugger, after I added a cli. The main issue is just that the source tree is a mess, you should have a much easier time debugging this for yourself now
<zid> with the monitor + info registers + x command
<potatojs> mine still fails, carry flag is set
<potatojs> probably reading more sectors ?
<zid> check the memory
<potatojs> than i emluate?
<zid> I also have CF set, but the data is there..
<zid> you could check what the disk status routine returns, or just ignore it, it seems to work..
<potatojs> how do i do that ?
<bslsk05> ​www.ctyme.com: Int 13/AH=01h
<potatojs> thanks
<potatojs> my laptop is about to go off, thanks very much for the help, when i get home i will continue
<potatojs> without your help( with others), i would have had the most frustation day in my life
<potatojs> good night/day /afternooN!!!!
potatojs has quit [Remote host closed the connection]
[itchyjunk] has quit [Remote host closed the connection]
terminalpusher has quit [Ping timeout: 245 seconds]
Burgundy has joined #osdev
Burgundy has quit [Ping timeout: 256 seconds]
GeDaMo has joined #osdev
slidercrank has joined #osdev
JerryXiao has quit [Ping timeout: 240 seconds]
JerryXiao has joined #osdev
bgs has joined #osdev
JerryXiao has quit [Quit: Bye]
JerryXiao has joined #osdev
Burgundy has joined #osdev
<moon-child> is there any portable way to find out the tsc frequency? Iirc linux just has a hard-coded table based on uarch
<GeDaMo> I think statistically that the answer to any question which begins "is there any portable way ... ?" is "No" :P
<kazinsal> assuming you know you have an invariant TSC, CPUID EAX=0x16 should give you the CPU base frequency and thus the invariant TSC frequency in MHz in EAX
biblio has joined #osdev
<moon-child> kazinsal: as I recall, there are three constants, only two of which can be gleaned from cpuid
<kazinsal> invariant TSC should always run at maximum non turbo ratio * BCLK
<moon-child> https://stackoverflow.com/a/42190816 sez those cpuid values relate tsc to always running timer, and you need a further conversion factor from the always running timer to real time. 'As @BeeOnRope pointed out, from Skylake the ART crystal frequency is no longer the bus frequency'
<bslsk05> ​stackoverflow.com: c++ - Calculate system time using rdtsc - Stack Overflow
<moon-child> and lists that uarch table I mentioned
<heat> pretty much what kazinsal said
<heat> iirc you dont need to hardcode anything
<moon-child> then why does linux do it?
terminalpusher has joined #osdev
<kazinsal> finnish stubbornness and quasi-legal amphetamines, I'd wager
<kazinsal> also potentially the need to adjust for non-invariant TSCs
Left_Turn has joined #osdev
pmaz has quit [Quit: Konversation terminated!]
Burgundy has quit [Ping timeout: 240 seconds]
<heat> TSC_Value = (ART_Value * CPUID.15H:EBX[31:0] )/ CPUID.15H:EAX[31:0] + K
<heat> this seems like you don't need to hardcode anything?
<moon-child> you need to relate ART_Value to real time
<heat> Nominal TSC frequency = ( CPUID.15H.ECX[31:0] * CPUID.15H.EBX[31:0] ) ÷ CPUID.15H.EAX[31:0]
<heat> then they have some hardcoded values (table 19-91) for processors that do not enumerate 15h.ECX
<heat> whatever the hell that means (ECX = 0 maybe?)
<heat> yes“TSC frequency” = “core crystal clock frequency” * EBX/EAX.
<heat> The core crystal clock may differ from the reference clock, bus clock, or core clock frequencies.
<heat> EAXBits 31 - 00: An unsigned integer which is the denominator of the TSC/”core crystal clock” ratio.
<heat> ECXBits 31 - 00: An unsigned integer which is the nominal frequency of the core crystal clock in Hz.
<heat> EBXBits 31 - 00: An unsigned integer which is the numerator of the TSC/”core crystal clock” ratio.
<heat> but any of these registers may not be enumerated (aka register = 0)
<moon-child> I see, thanks
<moon-child> where is that table? I don't seem to have a 19-91
<heat> 19.7.3 Determining the Processor Base Frequency
<moon-child> oh I see, I guess my manual was out of date. And yours is too--in the latest one, it is 20.7.3 :)
<moon-child> (should do named sections like the c++ spec or something)
<gog> hi
<moon-child> gog
<gog> moon-child:
* kazinsal gives gog scritchies
* gog prr
<heat> i have way too many manuals in my downloads haha
<kazinsal> nya~
<gog> nya~
<moon-child> meow
* moon-child is proper western cat, not weeb catgirl
<gog> :<
<gog> i'm not even a weeb
<kazinsal> angry nya~ noises
<gog> my wife is the weeb
<kazinsal> i'm not a weeb, i'm just a catboy >:(
<heat> i'm a proper eastern european cat
<heat> i've seen some shit down in the balkans back in 1999
nyah has joined #osdev
Maja has joined #osdev
<Maja> meow!!
* mjg burps
biblio has quit [Quit: Leaving]
gildasio has quit [Ping timeout: 240 seconds]
heat has quit [Remote host closed the connection]
heat has joined #osdev
innegatives has joined #osdev
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
vdamewood has joined #osdev
andydude has joined #osdev
andydude has quit [Client Quit]
terminalpusher has quit [Remote host closed the connection]
dutch has quit [Quit: WeeChat 3.8]
innegatives has quit [Quit: WeeChat 3.8]
* bnchs pats mjg's back
gildasio has joined #osdev
dutch has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
Maja has quit [Ping timeout: 265 seconds]
<sham1> heat: well Portugal is eastern Europe anyway
<nortti> at one point the english wikipedia page for finland claimed finland was a western european country
<mcrod> hi
<sham1> Wikipedia editors not being able to look at a map? Either that or they just went with the whole "western institutions" thing
<mcrod> heat: hi
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
heat_ is now known as heat
goliath has joined #osdev
torresjrjr has quit [Remote host closed the connection]
torresjrjr has joined #osdev
<heat> sham1, most eastern european countries are indeed in central europe
<heat> it is effectively what it always has been - a designation for iron curtain countries
<heat> like slovenia is an eastern european country, but austria isn't :v
<mjg> careful
zarock has quit [Remote host closed the connection]
<mjg> you don't want to anger any art school rejects
zarock has joined #osdev
<bnchs> mjg: why is it that when girls fail art school, they complain about it on tiktok
<bnchs> but when guys fail art school.....
warlock has quit [Ping timeout: 264 seconds]
<heat> when guys fail art school they invade poland
<heat> men do EVERYTHING to avoid therapy
<gog> hi
<gog> i was very drunk last night
<heat> good
<gog> meow
<mcrod> i cannot drink due to meds
<mcrod> it is unfortunate.
<gog> it was my friend's bday
<Ermine> hi gog, may I pet you
<Ermine> and happy bday to your friend
Burgundy has joined #osdev
<mcrod> hi Ermine, may I pet you
<Ermine> no
* mcrod doesn't pet Ermine
* vdamewood gives gog a fishy
<vdamewood> gog: What a coincidence, yester day wasn't my birthday.
[itchyjunk] has joined #osdev
torresjrjr has quit [Remote host closed the connection]
torresjrjr has joined #osdev
bauen1 has quit [Ping timeout: 256 seconds]
torresjrjr has quit [Ping timeout: 265 seconds]
torresjrjr has joined #osdev
<sham1> Most days aren't
<vdamewood> But yesterday in particular isn't.
<vdamewood> I can't say the same thing about tomorrow.
andydude has joined #osdev
<mcrod> happy birthday
<andydude> who
* bnchs supplys gog with fishies
<vdamewood> bnchs: Hey, that's my job!
<vdamewood> mcrod: Thanks.
<bnchs> vdamewood: i'm just investing mo- i mean fishies into gog
<mcrod> i'm getting old
<vdamewood> Haha, I'm still a year younger today than I will be tomorrow.
<bnchs> i have this song stuck in my head
<vdamewood> bnchs: "This is the song that doesn't end. Yes, it goes on and on my friends..." ?
<Ermine> happy birthday vdamewood !
<vdamewood> Ermine: Thanks.
<bnchs> vdamewood: oh didn't realize it's your birthday, happy birthday!
<vdamewood> bnchs: Well, tomorrow is.
<bnchs> oh
<Ermine> In advance
<bnchs> happy future birthday*
<Ermine> What a coincidence, I had bday this week
<vdamewood> Ermine: It was implied, after all I'm probably not going to be on IRC tomorrow. Will be to busy partying and eating ... food.
<bnchs> but the song goes like *ahemm*... dreeeam back and dreeeam, hold it in your haand, it's maario land!
<gog> happy birthday!!!
<gog> Ermine: yes
* gog chomp fishies
torresjrjr has quit [Remote host closed the connection]
torresjrjr has joined #osdev
terminalpusher has joined #osdev
* bnchs pets gog
* gog pr
<Ermine> me pets gog
* gog pr
<bnchs> pull request?
<gog> git meow
torresjrjr has quit [Remote host closed the connection]
torresjrjr has joined #osdev
dude12312414 has joined #osdev
<heat> happy 68th birthday mjg!
<mjg> mate i'm busy lolling at haskell right now
<mjg> something prodded me to take a look and oh boy
<mjg> stracing a lol prog which does next to nothing is like throwing darts at eyeballs
<heat> functional programming is pessimal??????!??!?!?!?!?!??!?!
<mjg> news at fucking 11
<bslsk05> ​wiki.haskell.org: Tutorials/Programming Haskell/String IO - HaskellWiki
<clever> semi related, i found a bug in a haskell library for embedding things like gitrev into binaries, and after much digging, it turned out to be partially a linker bug!
<clever> basically, the library had a "0000000000000000000000000000000000000000" c-string in the binary, which you edit after building, to fill in the blanks
<mrvn> heat: and yet basically every relevant compiler out there either turns the code into CPS or SSA form, i.e. basically functional.
<clever> and some crypto code (both haskell and openssl) had a "00" c-string in it
<clever> the linker went and shared the last 3 bytes (the 00 and trailing null)
<clever> so, filling in the gitrev, changed every "00" literal in the entire binary, across both c and haskell, into a random 2 hex chars, lol
<mrvn> c-strings are const, editing them is UB. you get what you deserve
<heat> you can't have string merging enabled and be surprised at that...
<heat> or expect to pull that off, at all
<clever> yeah, we changed it to store that string in .data
<clever> and now its working fine
<mrvn> you have to write {'0', '0', '0', ...}
<mrvn> make it a C arrays, not a string.
<bslsk05> ​github.com: Use a c-stub for the placeholder. by angerman · Pull Request #5231 · input-output-hk/cardano-node · GitHub
<clever> yep, a char[68] in this case
<clever> and since its not const, it belongs in .data, and isnt subject to merging
<gog> i'm const
<mrvn> doesn't that still give a warning because "" is const char?
<heat> constog
<heat> gonst
<mrvn> heat: I have a git rev in my code too but I edit that on commit/checkout via hook so it always contains the actual git rev.
<clever> mrvn: oh, godbolt complains about length, not that
<clever> mrvn: the problem is that we dont want to redo all of the compiles and test-cases, when the gitrev changes
<clever> and due to the build system, any change to the rev, results in a new build of everything
<mrvn> then what good is the git rev if it doesn't contain the actual rev?
<clever> the rev is filled in after building
terminalpusher has quit [Ping timeout: 245 seconds]
<clever> so its cheap to replace the rev
<mrvn> but then it won't match the code
xenos1984 has quit [Ping timeout: 240 seconds]
xenos1984 has joined #osdev
<mrvn> We also use "git describe" to get a nicer version string.
<mrvn> release builds then just have 1.2.3 or something.
<clever> our gitrev comes from nix flakes, which is actually half the fun of this bug
<clever> if the tree is dirty, the rev turns into all 0's
Turn_Left has joined #osdev
<clever> making ANY change at all, and testing, would set the rev to all 0's, and set the "00" literals to "00", so it worked
<clever> so, any change to the codebase, "fixed" the problem
<clever> until you try to commit it :P
<mrvn> you could just put the rev in there during build.
Left_Turn has quit [Ping timeout: 256 seconds]
<heat> why is the rev turning into all 0s?
<heat> it should just be ${HEAD}-dirty
<clever> heat: thats just what nix does when the tree is dirty
<clever> never asked why
Lumia has joined #osdev
elastic_dog has quit [Killed (cadmium.libera.chat (Nickname regained by services))]
elastic_dog has joined #osdev
foudfou has quit [Ping timeout: 240 seconds]
xenos1984 has quit [Ping timeout: 256 seconds]
andydude has quit [Quit: Leaving.]
<heat> mjg, in freebsd how large is too large of a stack frame?
<heat> kernal ofc
<heat> linux says 1024
xenos1984 has joined #osdev
<mcrod> hi
andydude has joined #osdev
innegatives has joined #osdev
<mjg> heat: hard to say
<mjg> heat: depends how deep you are
<mjg> stack size is 16
<heat> mjg, no -Wframe-larger-than= ?
<mjg> no
<heat> cringe
<heat> thanks anyway
<heat> it's hard to draw up a theoretical limit
<heat> in certain syscalls you just know you won't go too deep, others may end up quite deep
<mjg> just don't stack-alloc big shit
<mjg> kthx
<bnchs> you know what i like more than making OSes?
<bnchs> reverse engineering ones
<bnchs> it's more painful! :D
<clever> bnchs: try RE'ing an os on an undocumented cpu ISA!
<heat> try writing a fucking unix
<heat> its hard i promise
<mjg> if it was hard the geezers would not have done it l-o-l
<mjg> try writing windows
innegatives has quit [Quit: WeeChat 3.8]
<heat> you mean WINBLOW$
<heat> owned.
<mjg> larping an os-interested teenager in the 2000s?
<heat> yes
<heat> M$
<mjg> ask me how many times i reinstalled windows 98 today
<mjg> none! it did not instlal even once
<mjg> ha ha... fuck those were bad times
<mjg> normally it would install but then it break if you look at it funny
<zid> I'd personally say about.. 30?
<mjg> what's your windows 9x story zid
<zid> every 4 months or so on my personal machines, and doing it for friends too etc
<immibis> i installed windows 11 today (for a VM). I had no idea how cancerous it was now since I gave up on windows after 7
<zid> w7 still works fine at least, for now
<zid> it's getting VERY close to not working though
<immibis> you need internet access unless you google (!) the secret cheat code to install without internet. Even in that mode it still demands you to set security questions and answers
<zid> nvidia installer doesn't run on w7 (there's a third party tool), chrome now flashes up a "we no longer support w7" banner, and they may at some point link against an msvcrt that's too new, etc
<zid> I'm on w10 and it's just w7 but significantly worse
<zid> w11 sounds like w10 but worse
<zid> (taskbar grouping forced on and you can't turn it off, wtf?)
<immibis> bing chat is integrated into the start menu (didn't try it)
<immibis> grouping? hah! what's a taskbar? they replaced it with the mac os dock
<zid> yea I haven't figured out how to stop w7 giving me internet results
<zid> like I want all my filenames fucking binged for..
<immibis> not bing - bing CHAT
<heat> ohno!
<zid> yes I heard you
<heat> wait until you figure out that was already in windows 10?
<zid> I'd like to disable w7 doing internetty things in my start bar
<zid> w10*
<heat> also, there's still a taskbar, it's still centralized
<heat> you can put it back to the corner
<heat> mjg, what's the openbsd windowing thing again?
<immibis> microsoft invented the SDI interface because they realized MDI was stupid and now they force MDI on everyone again. weird
<immibis> like, microsoft very specifically and deliberately realized that an app-centric UI was stupid and that's why they made it more document-centric
<immibis> in fact I think they invented the document-centric variant of the windows UI. Not that it's a huge change. I just mean having a separate window per open document, separate taskbar items, etc.
andydude has quit [Quit: Leaving.]
* zid did some more regedit and gpedit tweaks to try make w10 shut up a bit more
<zid> probably won't do anything until I reboot next though
<mjg> heat: what?
<mjg> heat: twm?
<mjg> heat: or compatible
<heat> oh yes, its cwm
<heat> how did i forget cwm
<zid> are you a cwmboy heat
<zid> I'm an xfceboy
<zid> (I just really like their Terminal)
<heat> i love cwm(1)
* mjg glares at heat
<mjg> given your oter takes this may be true
<gog> kde
<gog> everything else is for hipsters'
<jimbzy> Right?
<heat> gog is anti-cwm
<mjg> hipsters?
<mjg> i suspect tha would be xfce
<mjg> for real
<mjg> just enough difference to pretend to not be mainstream
<mjg> but past the identical
<mjg> to kde 'n shit
<mjg> or perhaps discount kde, f you will
<gog> when u order kde from wish.com
<jimbzy> Hah
<mjg> i3 for life tho
<heat> i3 is hipster
<heat> xfce is brokie-boy-that-cant-run-a-real-de
<heat> kde is normie, GNOME is FSF-normie
<heat> actual normal people use windows or macOS
<nortti> < heat> xfce is brokie-boy-that-cant-run-a-real-de ← >install debian xfce to computer >go start up terminal >nothing happens >discover it uses zutty by default and your graphics card can't do OpenGL ES 3.1
<bnchs> we're not normal people here
<mjg> speak for yourself!
* mjg hugs waifu
<bnchs> unrelated to this but somewhated related to nortti's case
<CompanionCube> zutty?
<bnchs> >wanted to play some flash animations >install ruffle >run ruffle >it doesn't work >checks output
<bnchs> >apparently ruffle doesn't support opengl
<nortti> CompanionCube: https://github.com/tomscii/zutty
<bslsk05> ​tomscii/zutty - X terminal emulator rendering through OpenGL ES Compute Shaders (26 forks/302 stargazers/GPL-3.0)
<heat> nortti, woah what gpu are you running?
<nortti> sandy bridge intergrated
<gog> sussy zutty
<CompanionCube> heat: eh, i would associate GNOME more with redhat than the FSF, even though i think it's technically a GNU project?
<heat> CompanionCube, GNOME is not GNU
<nortti> (I can get it working if I use the nvidia dedicated, but zutty by default doesn't try to do that)
<heat> i think it's under freedesktop?
<CompanionCube> 'In 2021, GNOME Executive Director Neil McGovern publicly tweeted that GNOME was not a GNU project and that he had been asking GNU to remove GNOME from their list of packages since 2019' ah, not GNU anymore then
<bnchs> >i have to do a parameter according to some shithub issue, so i put --graphics gl >hooray, it STILL DOESN'T WORK because the opengl backend it uses in some outsourced rust shit library is BROKEN
<nortti> it is wgpu?
<heat> nortti, opengles 3.1 is not that old anyway
<bnchs> nortti: yes
<bnchs> meanwhile, use lightspark/gnash
<nortti> because, yeah, that is for the webgpu API which is meant to target dx12 / metal / vulkan
<bnchs> supports opengl out of the box, just works
<heat> sandy bridge integrated should still be capable of very recent opengl
<bslsk05> ​cohost.org: cohost! - "I want to talk about WebGPU"
<bnchs> nortti: this is why cargo shouldn't be a thing
<heat> rost project!
<bnchs> this is why i hate rust
<nortti> bnchs: I'm not sure how cargo not being a thing would help you run AZDO-based graphics on opengl
<bnchs> nortti: ruffle devs were too lazy
<bnchs> and outsourced graphics to a library that barely works with opengl
<nortti> ruffle is meant to run in the browser, so I think it makes sense to use the graphics APIs that are meant for the browser
<nortti> though, I can run ruffle on firefox myself, do they also have a webgl backend maybe?
<bnchs> no, they have a standalone program
<bslsk05> ​ruffle.rs: Ruffle Web Demo
<bnchs> i know
<bnchs> they also have a standalone program
<bnchs> also the demo barely works too
<nortti> yeah, but like, it's secondary target from what I can tell
<bnchs> it's just a black screen
<nortti> not for me?
<bnchs> nortti: what GPU do you have?
<bnchs> does it support vulkan?
<nortti> sandy bridge integrated, and no, it does not
<heat> it doesn't?
<bnchs> yes it doesn't
<bnchs> i have the same iGPU
<heat> oh you need haswell for vulkan
<nortti> I also have nvidia dedicated, running with open source drivers so no vulkan there either
<nortti> it can do GL 4.3 / GLES 3.1 tho
<nortti> maybe you need that?
<bnchs> i need that?
<bnchs> if ruffle needs a really REALLY recent opengl version, more than it's own alternatives and even the official adoble flash player
d5k has joined #osdev
<bnchs> then it's useless
<nortti> I dunno, I'm using a beater from 2013 and ruffle works just fine on my computer
<nortti> if the goal is to be the future of flash content, sticking to worse APIs for compatibility with even worse machines than I have doesn't really seem like worth it
Lumia has quit [Quit: ,-]
<bnchs> oh dumb browser shit
<bnchs> webgpu is crippled here
<bnchs> tried it out in another browser, it works
<bnchs> webgl*
<nortti> oh, what's wrong with your webgl deployment?
<bnchs> it's disabled for fingerprint reasons
<nortti> guess you don't use stuff requiring it like google maps either?
<bnchs> no
<bnchs> but anyway, you can't really drop opengl
<bnchs> especially when majority of computers are using it
<heat> no, the majority of computers use direct3d
<heat> then starbucks fans use metal
<nortti> vulkan or gles if you include phones
<bnchs> heat: majority of computers if they were not running windows
<nortti> no that's be metal
<bnchs> if they were not running hackintosh, why would you run it in the first place
<nortti> or do you mean "majority of computers, if every windows users magically became a linux user"?
<heat> are macbooks et al not computers? lol
<bnchs> nortti: yes
<heat> if every windows user became an openbsd user, pledge would be the world's most popular system call
d5k has quit [Quit: leaving]
<bnchs> heat: i will eat pufferfish sushi in honor of you
<gog> pledge
<gog> ??
<gog> ohh
<bnchs> i promise you master pufferfish
<bnchs> i will not eat the chicken tendies
<nortti> < bnchs> if ruffle needs a really REALLY recent opengl version, […] ← looks like gles 3.1 is from march 2014, so over nine years ago by this point
<bnchs> if i do, you have to kill me
<gog> i'm waiting for pizza
<bnchs> i have opengl ES 3.1
<bnchs> but it doesn't work
<Ermine> gog: have a good meal in advance
<gog> the website says it will arrive in -8 minutes
nur has quit [Read error: Connection reset by peer]
<gog> Ermine: thank u for the well wishes
<gog> i hope u have a nice evening
<heat> gog, i hope you have a good meal but slightly overpriced in hindsight
<heat> a solid 8/10
<heat> i desire upon you the mildest inconveniences
<nortti> bnchs: looks like ruffle can fall back to canvas, but I guess you gotta build it yourself
<bslsk05> ​github.com: ruffle/README.md at master · ruffle-rs/ruffle · GitHub
<nortti> you might be able to hack together something that uses the webgl renderer on desktop too
<gog> heat: this isn't as good as it usually is
<gog> and i'm pretty annoyed because it took 90 mins to get here
<gog> but whatever i'm hungover and useless and my wife didn't want to go to the store or cook either
<Ermine> I hate hangovers so I don't drink
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
_73 has joined #osdev
dutch has quit [Quit: WeeChat 3.7.1]
innegatives has joined #osdev
<zid> I'm bad at drinking, I'm fine, then either asleep or vomitting, without much inbetween
<zid> and never wake up hungover cus I pass out instead
<zid> of being able to drink all day and really dry out
dutch has joined #osdev
<zid> I need like, 1% beer or something
_73 has left #osdev [ERC 5.4 (IRC client for GNU Emacs 28.2)]
sauce has quit []
vdamewood has quit [Quit: Life beckons]
bgs has quit [Remote host closed the connection]
heat has quit [Remote host closed the connection]
heat has joined #osdev
<sortie> I was mentioned in here but it scrolled beyond the scrollback
<sortie> I will assume it was heat being made throwing shade
heat_ has joined #osdev
heat has quit [Ping timeout: 240 seconds]
bgs has joined #osdev
slidercrank has quit [Ping timeout: 256 seconds]
sauce has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
heat_ is now known as heat
bgs has quit [Remote host closed the connection]
innegatives has quit [Quit: WeeChat 3.8]
goliath has quit [Quit: SIGSEGV]
<sham1> zid: thank the stars non-alcoholic beer exists
<Ermine> It's cringe
<zid> I don't mind alcohol I'm just not good at it
<heat> alcoholic beer is a bro moment
<heat> sorry, non-alcoholic
<heat> it tastes a bit like ass
<zid> do they even make non-alcoholic bitter
<Ermine> Better drink cola or something instead if you want something alcohol free
<heat> yes, i agree
<Ermine> heat: s/bit//
<heat> it tastes a like ass
<zid> I just drink dr pepper all day
<zid> nectar of the gods
<Ermine> s/a //
<zid> https://en.wikipedia.org/wiki/Bitter_(beer) Big fan of bitter, not a huge fan of many other styles
<sham1> Personally all beer tastes like ass. Too much wheaty stuff which is not surprising but I'm just not into it
xenos1984 has quit [Read error: Connection reset by peer]
<zid> Like, I can't even swallow stella
<zid> it's disgusting
<heat> i really like stout
<heat> guiness, the best irish non-irish beer
<zid> yea bitter and stout are very similar
<zid> stout is just crunchier
<zid> it's got similar bubbles and tastes, stouts are just what happens if you add black
bauen1 has joined #osdev
<zid> heat: buy a newcastle brown ale and tell me what you think
<heat> does it involve me going to newcastle
<heat> cuz hard skip if that's the case
<zid> no, I've never been either
<zid> I'm not macho enough to survive newcastle
<zid> they'd knobhead me to death
<zid> after that, try a john smith's
<zid> https://www.amazon.co.uk/dp/B01DLX3D1K Does this ship to portugal? :P How much do they want for it? eleventy billion euoiueroes?
<bslsk05> ​'John Smith&#39;s Extra Smooth Ale, 10 x 440ml' - ''
<heat> there may be a niche british bar in lisbon that sells that stuff
<zid> oh right, british expats are all over portugal I bet
<zid> Just go to the algarve
<heat> but usually it's just the traditional portuguese stuff (superbock, sagres), guinness if they're an "irish bar"
<heat> or just crappy spanish beers
<heat> corona, estrella are all mega cringe beers
<heat> sometimes heineken too I guess
<zid> I googled, lots of places in alvor have it on tap
<heat> how tf do you google that?
<heat> <beer name> bars portugal?
<zid> -bars
<zid> wtf is a bar
<heat> i can't find what you're finding
<bslsk05> ​www.google.com: Error 403 (Forbidden)!!1
<zid> 2nd result is a trip adviser thread
<heat> aha yes, i missed that one
<heat> have you tried baltika?
Turn_Left has quit [Ping timeout: 264 seconds]
<heat> it has a really weird, alcoholish taste, but I like it
<zid> neer heard of it
<heat> Ermine, help me out here
<zid> ah, it's the leading russian brewery
xenos1984 has joined #osdev
<zid> no real call for us to get russian beers
<zid> we're not eastern europe like portugal
<Ermine> heat: I'd better eat shit than drink baltika
<heat> sadly I don't think they're getting here anymore cuz of the war
<heat> hahahaha
<heat> it's like beer, with more alcohol, and then without the beer
<heat> truly russian
<Ermine> Well foreign beers do not get there since 2014
<Ermine> Even those who call themselves Czech are produced in Russia
<heat> how tf does that work, given baltika is owned by carlsberg?
<heat> sanctions are hard part 420
<heat> hm, maybe because it's just part owned
<Ermine> Easy. You just pee into the can somewhere in Russia instead of somewhere outside it and then exporting it to Russia
<Ermine> And Carsberg probably had subsidiary based in Russia
Burgundy has quit [Ping timeout: 240 seconds]
<heat> why do you harbour such ill will towards Great Patriotic Beer /s
<heat> before I die I need to try out american beer to see if its as bad as they say it is
<Ermine> Because word 'Patriotic' doesn't remove the taste of urine
<heat> hahahahaha
<zid> It does if you're qanon
<zid> They were literally drinking piss cus trump told them to
<Ermine> Same goes for 'patriots' here
innegatives has joined #osdev
<zid> brb, need to go get a drink
<zid> bathroom is downstairs
<Ermine> have a good drink
<zid> It's got a lovely head on it
<innegatives> So bios loads bootsector 512 into 0x7c00, what happens to rest of the code in the disk? Is it loaded by whatever is contained in that 512?
<Ermine> Yes, bios loads the first sector of the disk. Code there is responsible for fetching other data from the disk. It can use BIOS interrupts for this
<Ermine> You can see an example in 'OS from 0 to 1'
andydude has joined #osdev
bauen1 has quit [Quit: leaving]
<heat> guyzzz facebook deaded again!
bauen1 has joined #osdev
<Ermine> Yay
andydude has quit [Quit: Leaving.]
<mcrod> good
<mcrod> the longer it is down, the better off society is for a little while
<heat> its back
<heat> one day google will be down, and on that day I'll switch to the best search engine ever, bing
<mcrod> i wonder if the US will actually default
<mcrod> normally, I would think it unthinkable
<mcrod> but the current political theater is a concern
<mrvn> heat: There is no american beer.
<mrvn> it's that bad.
<mcrod> wut
<mcrod> there are plenty of american made beers