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
nyah has quit [Ping timeout: 272 seconds]
freakazoid333 has quit [Read error: Connection reset by peer]
<NieDzejkob> how likely is it that the bios get keystroke function just busy-waits without halting? My CPU is getting quite hot even though it's basically idle
<Mutabah> It's probably in a busy loop
<Mutabah> I wouldn't expect BIOS to bother with power managemnet
<Mutabah> ... modern UEFI firmware might, but legacy BIOS unlikely
<NieDzejkob> well APM is a thing, sooo...
<moon-child> Mutabah: eh it might just hlt
<Mutabah> Point....
<NieDzejkob> yeah, I'd expect it to hlt
<doug16k_> NieDzejkob, it won't halt
<doug16k_> there is a callout the bios does when idling, when waiting for I/O
<doug16k_> if you hook int 0x15 and point it at this, it halts: https://github.com/doug65536/dgos/blob/master/boot/x86_bios/tui_bios.cc#L10
<bslsk05> ​github.com: dgos/tui_bios.cc at master · doug65536/dgos · GitHub
<doug16k_> look for ax==5305
<NieDzejkob> hmm, I should get at least some of my driver situation sorted. Should I expect the bios disk I/O to continue functioning if I reconfigure the PIC and PIT?
<doug16k_> you can make it do something useful there, instead of halt
<doug16k_> or try to do something useful
<doug16k_> no!
<doug16k_> why would you screw with IRQ controllers and keep using BIOS
<doug16k_> make up your mind. are you screwing with hardware, or using bios?
<doug16k_> both is a recipe for disaster
<doug16k_> a sane design is to use the bios for disk I/O to load a kernel image and an initial ramdisk, then stop using the bios completely, and take over
<Mutabah> ^
<klange> my current bios loader just mashes an entire CD image into memory and jumps to protected mode to present a menu, parse the CD filesystem, etc.
<doug16k_> yeah, any way of just copying a block from storage to ram will do the job, whether it is fully elaborate filesystem reader, or simply LBA ranges
<klange> still gotta fix up the dang efi loader...
<NieDzejkob> so, um, sane design. What I'm doing is basically an experiment in how early you can be selfhosting, and the answer seems to be 512 bytes (https://niedzejkob.p4.team/bootstrap/) - I'm currently well within real mode, but I'm looking for a way to switch to long mode, eventually using fully native drivers, in a somewhat incremental way
<bslsk05> ​niedzejkob.p4.team: Bootstrapping
elastic_dog has quit [Quit: elastic_dog]
<doug16k_> operating systems aren't in the MBR
<gog> not with that attitude
<doug16k_> despite what 99% of osdev tutorials say
<gog> 446 byte os
<gog> smallest ever
<klange> the less you do, the easier it is bootstrap it
<doug16k_> there is hardly enough room to comfortably load the rest of itself in the MBR
elastic_dog has joined #osdev
<doug16k_> nobody tries to fit it in 446 unless they blundered into thinking that is their max
<doug16k_> it loads the rest of itself, then it can be whatever size
<doug16k_> in my bootloader, my memory map has a 128MB code+data+bss. plus 64KB stack
<doug16k_> rest of low memory is bootloader heap
<doug16k_> oops
<doug16k_> 128KB
<klange> > 7.7K Jun 17 23:34 boot.sys
<doug16k_> that is enough to do pxe or fat or iso and have a text ui and progress bars loading, and creating page tables for kernel, and loading it already high half at entry
<doug16k_> with lots of room
<doug16k_> that loads MB of debug info and hundreds of KB of kernel and modules
Matt|home has joined #osdev
<doug16k_> my bootloader grew from pure 16 bit code to the point it is now where it is all protected mode and just switches to real mode for bios calls
<doug16k_> at first I was trying to fit code+data+bss+stack under 64KB
<doug16k_> foolish
<doug16k_> even protected mode full 32 bit can't reach half the ram
<doug16k_> how stupid is it to condemn myself to 64KB bootloader
<NieDzejkob> oh I'm not trying to fit it all in 512 bytes. That's just how large the seed is.
<doug16k_> you get 446 of it
<doug16k_> if you want to act as a partition table and be widely recognizable
<NieDzejkob> yeah, in my case it's 510 because I didn't need the partition table and needed the space
<doug16k_> and have a decent probability to be picked up by a nitpicking bios
<doug16k_> the bios might check the partitions and reject you from even being a selectable option in boot settings
<doug16k_> you must have it if you expect it to work
<doug16k_> expect bioses to be stupid
<doug16k_> it's like that saying about people. one bios is completely sane, but bioses are crazy
<doug16k_> they will try to find some excuse to not boot or not make you selectable as a boot drive
<NieDzejkob> yeah, I do realize there are compatibility concerns here, but perfect compatibility is out of scope
<gog> it's me, i'm bioses
<doug16k_> NieDzejkob, I have a bios rom project for qemu that goes into protected mode within a dozen instructions of power on
<doug16k_> it's funny when debugging it. when you attach it just instantly hits the breakpoint :D
<NieDzejkob> yeah, makes sense to do that when you don't have to worry about A20
<doug16k_> this is the first instruction at power up: https://github.com/doug65536/qemu-rom/blob/master/machine/x86/entry_arch.S#L56
<bslsk05> ​github.com: qemu-rom/entry_arch.S at master · doug65536/qemu-rom · GitHub
<NieDzejkob> A20 is off on power on, right? only then some bioses enable it for compatibility?
<doug16k_> yes
<doug16k_> you mean in a museum or not?
<doug16k_> did the battery corrode through the board or no?
<doug16k_> if not, A20 is on
<doug16k_> ignore a20
<doug16k_> in qemu, seabios keeps a20 on forever
<doug16k_> if you want a20 to EVER be off, you have to custom build seabios to be like that
<doug16k_> if you do, seabios makes it a computer from commander keen time
<doug16k_> before wolfenstein
<doug16k_> might not have cd drive time
<doug16k_> maybe sound card only cd drive
<doug16k_> and you have a DOS install
<NieDzejkob> so you're saying it's pointless to write code that sets up A20?
<doug16k_> that is an a20 off machine
<doug16k_> yes
<doug16k_> even if you did write it all, like I did, this is what would happen:
<doug16k_> 1) your code sees if A20 is on, 2) it sees it is on, obviously, 3) never touches a20 ever again and forgets a20 even exists
<NieDzejkob> btw, why do the jump after reset through a register like that?
<doug16k_> because it is a weird jump
<doug16k_> cs base is 0xffff0000
<NieDzejkob> which is not something that's normal for real mode, isn't it?
<doug16k_> that is moving 0 into ebx
<doug16k_> it's very not normal
<doug16k_> cs is 0xf000
<doug16k_> it sets up an unreal cs base
<doug16k_> everything else is real. ds, es, ss are 0 base, 64KB limit
<doug16k_> the rom is at the top of the bottom 4GB
<doug16k_> the entry point is at 4GB-16
<doug16k_> or just at eip=-16
<doug16k_> but it's not that simple
<doug16k_> in fact, cs base is ffff0000 and ip is fff0 at entry
<NieDzejkob> does qemu have the cache as ram business?
<doug16k_> no, ram works at power up completely
<NieDzejkob> it probably doesn't, there's no point
<doug16k_> disabling the cache doesn't do anything
<doug16k_> in kvm it would
<doug16k_> even on my real machine, ram works completely at bios entry
<NieDzejkob> huh, kvm allows you to do that?
<doug16k_> since zen, the security processor sets up the ram
<NieDzejkob> do Intel platforms do that too?
<doug16k_> don't know. it is up to the platform technically
<doug16k_> ones with fancy recovery bios or overclocking gadgetry, probably
<doug16k_> has a cpu to deal with no-post overclocked crap
<NieDzejkob> did you poke into your machine's bios with, like, coreboot?
<doug16k_> it just pushes the burden into another layer, so now the "true" power on code is in the security processor
<doug16k_> no, but someone here pointed me to the RE they have for my platform, that's how I know ram works at bios entry
<doug16k_> RE that coreboot has
<doug16k_> reverse engineering
<doug16k_> I could probably make that a direct jump. not sure why I left it that way
<doug16k_> it does look hideous in disassembler with straight jmp though. it's jmp 0
<NieDzejkob> I wonder if the processor will like a relative jump like that
<doug16k_> when I first saw it I was like, wtf? then, oh yeah, I am jumping to 0xffff0000 with csbase=ffff0000
<doug16k_> processor has no problem
<doug16k_> thing is, to jump to 0 from there, you need to jmp +16
<doug16k_> and wrap it around to 0
<doug16k_> 16 - sizeof_the_jmp
freakazoid333 has joined #osdev
<doug16k_> so when someone looks at the disassembly it is a very odd corrupt looking jmp with 32 bit offset with 3 upper 00 in offset, with weird disp32 less than 16
<doug16k_> I thought it was too much weirdness all at once so I changed it :P
<doug16k_> imagine if you had to describe each instruction as it runs. just imagine how much you have to say before they understand what that does :D
<doug16k_> I should try direct, see if it works
<doug16k_> I forget whether it even works
<doug16k_> 62:(.text.entry+0x1): relocation truncated to fit: R_X86_64_PC16 against `.text.early'
<doug16k_> addr32 jmp _start-0xffff0000 doesn't work either
<doug16k_> neither does jmpl
<doug16k_> mov jmp is good way to absolute jump when you can't touch cs
<NieDzejkob> so it's the linker that doesn't like it most? :P
<doug16k_> it doesn't believe it needs a 32 bit jump offset
<doug16k_> until it's too late, at link
<doug16k_> linker is wrong. short jump would work
<doug16k_> that would never happen, nobody tested that
<doug16k_> it needs to be a 32 bit offset so subtracting 0xffff0000 makes sense
<doug16k_> you can't subtract 0xffff0000 from a 16 bit relocation
<doug16k_> so mov to ebx corners it into making it represent it as a 32 bit relocation
<doug16k_> then I just register indirect that
<doug16k_> jmp always zero extends the ip value into rip, so no point making it use a 32 bit jmp
<doug16k_> bx is fine. I know it is 0
<doug16k_> I could have said xor %bx,%bx
<doug16k_> maybe I could say jmp 0
<doug16k_> my code is just being a nice person :P
iorem has joined #osdev
<doug16k_> a beginner will see jmp 0, and I lost them already
<doug16k_> write code primarily for the reader, not for the computer. the computer is the afterthought
<doug16k_> I should put a comment saying why subtract 0xffff0000
<doug16k_> / Subtract 0xffff0000 because cs.base is 0xffff0000, cancel that out
ZetItUp has joined #osdev
<doug16k_> jmp 0 doesn't work either
<doug16k_> the 16 bit wraparound blows ld's mind
<doug16k_> nobody would run into this, unless some nut made a qemu rom or something
<NieDzejkob> :D
mrlemke has joined #osdev
<ZetItUp> thought i'd try win11, got a warning, "Your CPU is not supported!", clicked ok, it started to download and install, no way to cancel it, great job microsoft
<doug16k_> windows setup was always crappy
<doug16k_> it's the tradition
<warlock> yea, I'll wait for it to be out of beta
<warlock> doug16k_: I could look but is dgos 16/32/64?
<doug16k_> main thing is 64 but it has a bios bootloader using real mode and protected mode and 64 bit uefi bootloader
<warlock> alright
<warlock> yea I been playing with 64bit uefi
<warlock> but I got this 2009 mac, now I here it just does efi, but the pos wont let me boot
<warlock> so I guess I got to do a normal boot loader
<doug16k_> the uefi can boot from disk or lan and can use efi filesystem or the one bios bootloader uses with direct block I/O
<doug16k_> cd boot is trivial on uefi - just make your fat32 boot partition the boot program with the right stuff in el torito headers
<warlock> I can't tell if it's working, I really have no idea how to tell
<doug16k_> it is probably verifying a signature or something
<warlock> basicly, once I drop into the app, I'm printing to the shell, but the whole screen is just white
<doug16k_> looking for "please don't steal this" text or something :P
<warlock> yea
<warlock> it's a macbook pro so probably
<doug16k_> it works in qemu?
<warlock> basicly, I wiped the hd, but I'm not the original owner, and it was already installed with the max upgrade when I got it
<warlock> yea it works in qemu and hyperv
<warlock> but it's a no go on macbook pro
<doug16k_> ah, then it might be not working deliberately yeah
<doug16k_> have to do it more like an attack to run your own code on your own machine
doug16k_ is now known as doug16k
<doug16k> didn't the apple store tell you that you aren't *allowed* to make your own bootloader? :P
<warlock> nah, but I was trying to reinstall it, and since I didn't click to download the last update, it's not attached to my account
<warlock> that I own the os
<warlock> so it wont install, wants me to login to apple store, then says error basicly
<warlock> anyway I can boot it with windows disk
<warlock> I tried the win8 cd
<warlock> it boots on their uefi
<warlock> and cd
<doug16k> a friend of mine had a parts place that had apple parts willing to sell him a replacement nvme ssd. he got there and the other person said "na, that probably won't work, they are often soldered onto the board". my friend said, "oh no I opened it and checked, it's a socket". the guy gasped and said, "you aren't allowed to open the case!"
<warlock> oh haha
<warlock> either way, I don't get it, really all these companies trying to sell you a device that's locked
<warlock> now, I make it a point, that I wont buy anything unless it can be unlocked
<doug16k> buddy at the store had no idea my friend has had practically every brand laptop completely apart for years at a full time repair job
<warlock> but I did hear about, a broken windows 8 implementation, that you can disable secure boot, and I got the disk, so I'm gonna try it out eventually, when I find it
<warlock> I'm in the process of trying to figure that out in the mean time
archenoth has quit [Ping timeout: 272 seconds]
<doug16k> isn't there some magic key combo you can hold at power up to clear nvram?
<warlock> yea I tried that
<doug16k> and lose encryption keys etc
<warlock> but it seems to just hang or something
<warlock> yea who knows
sts-q has quit [Ping timeout: 252 seconds]
jjuran has quit [Ping timeout: 265 seconds]
sts-q has joined #osdev
jjuran has joined #osdev
isaacwoods has quit [Quit: WeeChat 3.2]
ZetItUp has quit []
ElectronApps has joined #osdev
ElectronApps has quit [Ping timeout: 256 seconds]
ElectronApps has joined #osdev
decartes has joined #osdev
jstoker has quit [Read error: Connection reset by peer]
jstoker has joined #osdev
ZetItUp has joined #osdev
<ZetItUp> so yeah, don't run win11 yet :P
ElectronApps has quit [Read error: Connection reset by peer]
<ZetItUp> they removed the option to move the taskbar however you wanted and removed like task manager from the menu when you right click it etc
<ZetItUp> stupid changes
ElectronApps has joined #osdev
Blend has joined #osdev
<geist> noted
<geist> i read some preview of it and it does seem like they moved a bunch of stuff around arbitrarily
<geist> and in general as a trend towards trying to make the first layer of ui simpler, at the expense of power users
<klange> It very much feels like they just shipped someone's intern project.
<klange> And if by some comsic coincidence someone involved in this at Microsoft is reading this and feels insulted by that because they're a staff engineer with the company for decades, you should be.
<geist> the direct storage stuff sounds interesting
<geist> presumably some result of work on xbox
<klange> It _sounds_ like there's some cool stuff behind the scenes planned but either product dev or marketing didn't think it was enough to sell a new major release so they threw in an incomplete prototype Explore redesign
srjek_ has quit [Ping timeout: 256 seconds]
<Mutabah> Hmm... I wonder if MS would have had more luck going the other way
<Mutabah> Being very open on "we run a [3] year release schedule, and maintain support for version n-2 - after that, you're on your own"
<Mutabah> and then doing incremental changes without needing to do flashy selling points
<geist> totally cynical me says they had to release a version 11 because apple just did
<geist> but i'm sure this was planned longer than that
riposte has quit [Quit: Quitting]
riposte has joined #osdev
<bslsk05> ​www.msn.com: Windows 11 will look different from what you're used to — here are some of the biggest changes
riposte has quit [Quit: Quitting]
riposte has joined #osdev
<Blend> Looks like an apple product
<klange> The thing that has irked me the most so far is the rounded windows as they cut off the bottom corners of stuff that wasn't prepared for it.
<klange> Like my QEMU windows in Xming.
<geist> klange: ah did you give it a whirl?
archenoth has joined #osdev
<klange> My Surface is enrolled in the dev channel for insider previews, it got automatically upgraded yesterday.
<geist> ah
<geist> i suppose i could try to get one of my windows machines upgrtaded, but meh
<geist> would rather fiddle with something useless and esoteric than something useless and modern
ElectronApps has quit [Read error: Connection reset by peer]
ElectronApps has joined #osdev
ElectronApps has quit [Read error: Connection reset by peer]
ElectronApps has joined #osdev
<nur> Hi I'm back. Took a week off recovering from my vaccination shot. And subsequent anxiety. BUT I got back to debugging my kernel. The one that's causing me endless grief.
Ameisen_ has joined #osdev
<nur> so my interrupt handler does different things depending on... the -O level of the compiler
<nur> is this a sign of "compiler bug" or "I'm making wrong assumptions about things in my assembly" bug
<Mutabah> Wrong assumptions
<Mutabah> Always assume your code has a bug
Ameisen has quit [Ping timeout: 272 seconds]
<nur> sigh
<nur> alright, in the "wrong" version of the code, there appears to be a mysterious value appearing on the stack that shouldn't be there
<nur> perhaps it's some kind of return value
<Mutabah> make sure your stack is aligned correctly
<nur> it is
<Mutabah> and beware the red zone (if using x86-64)
<nur> no I am not
<nur> it's x8632
<Mutabah> are you seeing stack corruption, or the stack point changing?
<Mutabah> If it's consistent, you could use a watchpoint
<nur> it is consistent
<nur> the stack is fine, it's just that in the "wrong" version there's an errant value on it. One single one.
<nur> a watch point as in when that value gets pushed in?
<nur> ah yeah in the failed version there's a weird value overwriting one of my stack entries
<Mutabah> a watchpoint will break into the debugger when a location in memory changes
<Mutabah> you can use that to tell when it's being clobbered
<nur> ahhh
<nur> you can do this in...gdb?
<nur> or qemu?
<Mutabah> qemu's gdb stub support it iirc
<nur> thanks
<doug16k> strictly speaking, when you set a watchpoint, you are watching for the memory to change with a program store to a virtual address covering the watched range. it can change through an access to another virtual address mapped to the same place, or by DMA
<doug16k> ...and not be caught
<doug16k> 9 times out of 10, watchpoint caches it if it's not that
<nur> no dma or virtual memory yet
<doug16k> then watchpoints are pretty much infallible for you
<doug16k> in TCG
<doug16k> if you don't create it properly, you'll end up with a frozen debug session
<doug16k> if you accidentally make it a "complex" watch, gdb will resort to single-step-and-check spam
<doug16k> that would work if gdbstub didn't mask irqs when stepping
<doug16k> so you end up continuing with interrupts masked whether you like it or not
<doug16k> way to avoid complex watch is to watch a pointer dereference
<doug16k> then you are defining it as "this address range changed" not "this arbitrary expresion changed"
<doug16k> if you did need to watch an arbitrary expression, you can also tell gdbstub to allow interrupts when stepping
<doug16k> if you see the title of the qemu window flickering between paused and not paused, you did it wrong
mrlemke has quit [Ping timeout: 240 seconds]
<doug16k> wrong = created the watchpoint as an expression, not memory watch
pony has quit [Quit: WeeChat 2.8]
pony has joined #osdev
<doug16k> note that watchpoints are traps. it breaks into the debugger *after* the value changes
<doug16k> might need to see back one instruction
<doug16k> *not* like a fault, which would have prevented the change and return address points at the accessing instruction
mctpyt has quit [Ping timeout: 240 seconds]
<nur> right
<nur> I know which function does it, I wonder if I can just step through it
<sham1> You should be able to, if you have the debug information
<nur> I compiled it with -g
<doug16k> do you know how to attach to qemu and debug from gdb?
Blend has quit [Ping timeout: 246 seconds]
<nur> yes I do
<nur> thanks :)
GeDaMo has joined #osdev
dennis95 has joined #osdev
gareppa has joined #osdev
gareppa has quit [Remote host closed the connection]
tenshi has joined #osdev
<Griwes> eyyyy ported my AP booting code from my previous kernel iteration
<Griwes> I guess I really need the synchronization primitives now, don't I
<Griwes> <atomic>, here I come
<klange> tell me about it...
<mjg> screw atomics man, eat the panic and reboot
<Griwes> klange, ha
<klange> i'm lucky if I can manage a panic!
<mjg> funniest panics are cpus racing to do it
<klange> Sometimes I'll just get a race during a block and a critical thread will never unblock!
<mjg> and you get an absolute mess of the screen
<klange> I've actually fixed most of the panics, it's just bad resource ownership now!
<Griwes> in my case at least I *think* I have "// TODO: lock" or "// TODO: atomic" in most places where I know I need it *so far*
<Griwes> but yeah I'm not looking forward to the panic code lol
<Griwes> for sanity you need a lock around printing text
<Griwes> but then you need to be able to panic even when someone else is printing...
<Griwes> it's a mess
<Griwes> it's such a mess
<mjg> no, you just wait for them! ... but they never finish
<mjg> there should be a panic exokernel
<mjg> with exclusive access to vga and serial
<mjg> you want to apnic, you message that guy
<mjg> and if your message passing got broken, well, tough
<Griwes> ah now I remember how I did this the last time
<Griwes> my *spinlock* class knew about a "am_I_panicing" flag
tacco has joined #osdev
<mjg> but what if everyone is panicking? :)
<mjg> can multiple cpus set it?
<mjg> for themselves
<mjg> i would argue panic itself should be guarded with a special lock, so that the rest can panic in order of arrival
<mjg> if that
<Griwes> it's just `unlock() { if (!_lock && !panic_in_progress) { PANIC; } ... }`
<Griwes> and the panic code would forcibly unlock the spinlock
<Griwes> needless to say I am *not* a fan of how I did that lol
<Griwes> but I don't yet know how it'll look like this time around
<Griwes> anyway writing <atomic> will be fun
<mjg> it is fun the first time around
<mjg> a chore the second
<Griwes> I should know, maintaining another copy of that header is a part of my actual job description
<mjg> what's your job?
<Griwes> in general, all things standard C++
<Griwes> more specifically, maintaining our partial fork of libc++, and working on committee papers
<mjg> you like the lang?
<mjg> most people i know who use it are not exaclty fond of it
<Griwes> one would hope so, I'm on the committee lol
<mjg> an argument can be made people working on the lang are trying to kill it
<mjg> (:
<Griwes> I don't know if I really like any programming tools, it's a love-hate relationship with most things I think
<Griwes> but I certainly consider it the best tool available to me for the kind of code I want or need to write most often
<mjg> i found majority of programmers, myself included, just settle on half-assed tooling at some point
<mjg> and refuse to learn anything better
<mjg> maybe with exception of moving away from cvs to git
<Griwes> I gave rust a try some time ago, didn't last too long
<mjg> but try taking away someone's vim
<pony> Griwes: what made you stop?
<mjg> i know a guy who learned on nvi and refuses to even use vim, let alone anything fancier
<Griwes> pony, tiny changes suddenly needed a new trait and that just forced me to change the entire mini-library I was trying to write and I just got kinda tired of it
<pony> oof
<Griwes> plus some people with Opinions kept telling me that I shouldn't want to do some things I wanted to do
<pony> yeah
<Griwes> like, "you are doing X wrong" is a fine criticism, to an extend (if followed by a constructive explanation as to why)
<sham1> There's sadly some cargo cult and such with the language
<j`ey> sham1: same with every language
<Griwes> but "you shouldn't want to do X" is such a dumb thing to say
<sham1> True enough
<j`ey> I mean, i dont think you can tell what lang Griwes is talking about, without them having said rust first, *shrug*
<sham1> Although with Rust the cargo cult could be seen as a very literal thing, since their package thing is called cargo
<pony> lol
<j`ey> $ cargo cult
<j`ey> error: no such subcommand: `cult`
<Griwes> wasted opportunity
<pony> I like C, really. I sometimes wonder whether to learn C++ or Rust, but people scare me away from C++ by saying it's extremely hard to learn it well, etc.
<sham1> Could have been used for creating a project based on a given boilerplate
<Griwes> j`ey, the thing is, while most langs have communities that have Opinions on how to do a thing, not many langs other than rust that I've seen have communities that just say "but why would you *want* that" as a reply to an explanation of what you want to do
<klange> Make your own low-level compiled language :sip:
<Griwes> it's not even "why would you want to do that? here's a cleaner way to achieve the same"
<pony> klange++
<sham1> klange++
<mjg> pony: rust is the hot new thing and is likely here to stay
<j`ey> Griwes: I haven't seen that, so I cant comment
<mjg> pony: i would say go rust
<pony> klange: I actually want to do that ;)
<pony> mjg: ok :)
<mjg> even linux is getting rust support
<mjg> in the kernel
<klange> I'm just gonna write a boring C compiler in a Python knock-off
<Griwes> rust in the linux kernel is not going to go badly, Not At All /s
<pony> what does that even mean, for a language to be in a kernel?
<j`ey> pony: aka you can write kernel modules in rust
<bslsk05> ​lwn.net: Rust heads into the kernel? [LWN.net]
<Griwes> it means the kernel has translation units written in it
<pony> ahh
<sham1> I wonder how they have integrated rust stuff with kconfig
<sham1> Too lazy to look it up tho
<j`ey> sham1: it just calls rustc, instead of gcc
<sham1> Oh, hmm
<mjg> there were people who also extended it with c++ support
<mjg> in particular exceptions handling
<j`ey> sham1: it just boils down to some makefiles in the end!
<sham1> I thought they would have also added some cargo support, but I guess not
<Griwes> I wonder if the language will manage to stay unified once the gcc rustc becomes usable
dormito has quit [Ping timeout: 256 seconds]
dennis95_ has joined #osdev
<j`ey> sham1: nah
<Griwes> or if gnu extensions will keep just popping up all over the place as is the case with C and C++
<j`ey> Griwes: hopefully not!
<pony> :(
<mjg> Griwes: except "gnu extensions" are the de facto standard
<sham1> I think it would stay unified. Maybe cargo would have to be taught that `rustc` isn't the only thing one can use, but other than that I don't see how much stuff would change
dennis95 has quit [Remote host closed the connection]
<sham1> But not de-jure standards, and that also has an impact on things
<mjg> however, i don't know if some local changes like that to rust would have enough of a push to becomeo ne
dennis95_ is now known as dennis95
<j`ey> sham1: yeah, probably some rustc shim that translated to gcc-rs
<Griwes> mjg, nope, the international standard is the standard ;p
<mjg> Griwes: you sound like a committe person
<mjg> Griwes: oh wait
<Griwes> :D
<Griwes> hey, it's a part of my job description
<Griwes> I'm contractually obligated to be factually correct about standards
<pony> there are too many low level languages now. I'm going to make a new one to replace them all!
<sham1> Now there are n+1 systems languages
<bslsk05> ​xkcd - Standards
<sham1> By induction we can say that as t approaches infinity, n approaches infinity as well
<mjg> as long as there are countably infinite number of standards i think we are fine
<Griwes> I doubt we can guarantee that
Keyboard-Slayer has joined #osdev
<bslsk05> ​software.intel.com: Flexible Return and Event Delivery (FRED) Draft Specification
<Griwes> hahaha just noticed that ovmf doesn't actually do detection of the actual emulated hpet device, I booted qemu with a hpet with 12 comparators, and the hpet mmio regs correctly say there's 12 of them, but the acpi table claims... 3
<Griwes> trusting acpi tables only to an extent has once again proven to be the correct thing to do
<sham1> As time goes on, maybe ACPI will turn more and more into legacy, although I wonder how things like power saving could be done in that case
<Griwes> I mean, acpi is *fine*
<Griwes> just assume it's as buggy as any other firmware information from the past
<Griwes> verify all the info with actual hw regs of the devices it describes
dormito has joined #osdev
Phibred has joined #osdev
Keyboard-Slayer has quit [Quit: WeeChat 3.2]
archenoth has quit [Remote host closed the connection]
archenoth has joined #osdev
dormito has quit [Ping timeout: 256 seconds]
Arthuria has joined #osdev
dormito has joined #osdev
doug16k has quit [Remote host closed the connection]
Arthuria has quit [Read error: Connection reset by peer]
Arthuria has joined #osdev
Arthuria has quit [Read error: Connection reset by peer]
Arthuria has joined #osdev
dutch has quit [Ping timeout: 272 seconds]
ahalaney has joined #osdev
dutch has joined #osdev
doug16k has joined #osdev
<doug16k> I booted into my windows partition after months. when I got tired of its bullshit I went to restart. it said I wasn't allowed to shut down, and thought it was going to force me to wait. pressed reset, will be zero wiping the windows drive later today
<doug16k> how someone can run windows is a mystery to me
freakazoid333 has quit [Read error: Connection reset by peer]
Arthuria has quit [Read error: Connection reset by peer]
Arthuria has joined #osdev
Arthuria has quit [Read error: Connection reset by peer]
Arthuria has joined #osdev
nyah has joined #osdev
Arthuria has quit [Read error: Connection reset by peer]
Arthuria has joined #osdev
<sham1> You need incredible zen for it
<gog> idk why updates aren't applied in the background with shadow copy and then poof you reboot and you're updated. simple as
<sham1> Windows probably isn't set up for that. They probably could, but won't
<sham1> Too much effort for little gain for them, I would wager
<gog> yeah can't say microsoft is committed to improving ux
<gog> the underlying technologies to make this feasible do exist. perhaps not for all components of windows
isaacwoods has joined #osdev
gog has quit [Quit: bye]
gog has joined #osdev
Arthuria has quit [Read error: Connection reset by peer]
Arthuria has joined #osdev
mjg has quit [Ping timeout: 252 seconds]
srjek_ has joined #osdev
Arthuria has quit [Read error: Connection reset by peer]
Arthuria has joined #osdev
springb0k has joined #osdev
mrlemke has joined #osdev
mjg has joined #osdev
ElectronApps has quit [Read error: Connection reset by peer]
Arthuria has quit [Read error: Connection reset by peer]
Arthuria has joined #osdev
Arthuria has quit [Read error: Connection reset by peer]
Arthuria has joined #osdev
_mrlemke_ has joined #osdev
mrlemke_ has joined #osdev
mrlemke has quit [Ping timeout: 252 seconds]
_mrlemke_ has quit [Ping timeout: 272 seconds]
freakazoid333 has joined #osdev
Arthuria has quit [Read error: Connection reset by peer]
Arthuria has joined #osdev
srjek_ has quit [Ping timeout: 240 seconds]
Arthuria has quit [Read error: Connection reset by peer]
Arthuria has joined #osdev
nvmd has quit [Quit: Later, nerds.]
tacco has quit [Ping timeout: 252 seconds]
tacco has joined #osdev
iorem has quit [Quit: Connection closed]
shikhin has quit [Quit: Quittin'.]
zgrep has quit [Quit: It's a quitter's world.]
zgrep has joined #osdev
Arthuria has quit [Read error: Connection reset by peer]
shikhin has joined #osdev
Arthuria has joined #osdev
janemba has quit [Read error: Connection reset by peer]
janemba has joined #osdev
Arthuria has quit [Read error: Connection reset by peer]
Arthuria has joined #osdev
freakazoid333 has quit [Read error: Connection reset by peer]
zoey has joined #osdev
Arthuria has quit [Ping timeout: 252 seconds]
mahmutov has joined #osdev
freakazoid333 has joined #osdev
dennis95 has quit [Quit: Leaving]
mrlemke_ has quit [Ping timeout: 256 seconds]
mrlemke_ has joined #osdev
<sortie> I have coffee.
<sortie> I have a VM of my OS that's been up for days and have crashed.
* gog takes coffee
<sortie> I'm logged into the qemu via VNC and it hasn't paniced
<sortie> But the shell is not accepting keyboard input
<sortie> So: Fun times! Time to debug what qemu thinks is happening
freakazoid333 has quit [Read error: Connection reset by peer]
freakazoid333 has joined #osdev
<sortie> Hmm odd. My qemu VMs on my server doesn't seem to switch to the qemu debug console when I control-alt-2.
<sortie> When logged into them via VNC
Skyz has joined #osdev
<sortie> Oh it does work
<Skyz> Hello
<sortie> It just doesn't draw properly
<sortie> Hiya Skyz
<Skyz> Do you have any news on your os sortie?
<sortie> Skyz, yeah I merged true thread idling via futexes the other day :)
<sortie> Plus I now run my own self-hosted IRC network which is, uh, currently down as I debug a kernel deadlock
<Skyz> So technical :|
<sortie> Aha damn, -nodefaults disables the virtual console in qemu
<geist> hmm, is it text mode qemu?
<geist> or are you running it with graphics and X11 or something?
<sortie> geist: I have a server running a qemu -enable-kvm -nodefaults -vnc, and I'm logged into that VM using vnc
<sortie> The problem appears to be that -nodefaults turns off the default virtual console support I was hoping to use to debug the rare crash
<geist> yah, any articular reason you're using -nodefaults?
<sortie> It's because qemu is a nightmare in terms of specifying devices
<geist> well, probably means you h ave to manually turn the console back on again and whatnot
<sortie> The default network device doesn't have port forwarding set, and if I specify it, it makes a duplicate devce thatconflicts
<sortie> So I have to turn off the defaults and manually specify the network device
<Skyz> I ran templeos last night, still trying to figure out how to get into the games
<Skyz> People say the OS isn't finished, but I feel it's pretty complete with the applications
<Skyz> Found them, you just go to the menu
<Skyz> I'm gonna be a bit quiter on the chat because I'm not contributing to an OS
<GeDaMo> Neither am I, it doesn't stop me :P
<sortie> Aha, -monitor vc
<gog> i wrote five (5) lines of code today so i can OT as many times
<Skyz> I'm learning LISP and am looking for a new job
<Skyz> I can do recursion
<GeDaMo> Are you looking for a job writing Lisp?
<Skyz> I'm thinking I could write applications for an OS in the end, I'm just learning lisp for school. i'm doing an online class with it and it said it would make me a better programmer
<Skyz> No just gonna probably do something related to business
<GeDaMo> "A language that doesn't affect the way you think about programming is not worth knowing."
<Skyz> I'm kind of an entrepreneur
<Skyz> Wanted to make my own applications and somehow the OS seemed like the most interesting piece of software
vdamewood has joined #osdev
<Skyz> I'm just doing basic things like writing games and finding the largest in a list
<GeDaMo> Do you know about higher-order functions?
<Skyz> Not sure what that is
<GeDaMo> Things like map and fold
<Skyz> hmm
<GeDaMo> You can apply a function to all elements of a list
<GeDaMo> So you could fold max over a list to get the largest item
<GeDaMo> I'm not really familiar with Lisp
<GeDaMo> Ah, fold is called reduce in COmmon Lisp
tenshi has quit [Quit: WeeChat 3.2]
<Skyz> I'm reading here that iOS developers definitely need to be aware of Higher Order Functions
ahalaney has quit [Quit: Leaving]
ahalaney has joined #osdev
sm2n has quit [Read error: Connection reset by peer]
sm2n has joined #osdev
Skyz has quit [Quit: Client closed]
Skyz has joined #osdev
Skyz has quit [Ping timeout: 246 seconds]
Skyz has joined #osdev
<bslsk05> ​www.theregister.com: Microsoft wasn't joking about the Dev Channel not enforcing hardware checks: Windows 11 pops up on Pi, mobile phone • The Register
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GeDaMo has quit [Quit: Leaving.]
vdamewood has joined #osdev
dormito has quit [Ping timeout: 256 seconds]
srjek_ has joined #osdev
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dormito has joined #osdev
<doug16k> sortie, you can modify the default devices, like this: https://github.com/doug65536/dgos/blob/master/Makefile.am#L2485
<bslsk05> ​github.com: dgos/Makefile.am at master · doug65536/dgos · GitHub
hgoel[m] has quit [Remote host closed the connection]
paulusASol has quit [Remote host closed the connection]
medvid has quit [Remote host closed the connection]
paulusASol has joined #osdev
mahmutov has quit [Ping timeout: 258 seconds]
medvid has joined #osdev
hgoel[m] has joined #osdev
ahalaney has quit [Quit: Leaving]
vdamewood has joined #osdev
vinleod has joined #osdev
vdamewood has quit [Ping timeout: 256 seconds]
sortie has quit [Quit: Leaving]
mrlemke_ has quit [Quit: Konversation terminated!]
mrlemke has joined #osdev
vinleod is now known as vdamewood
freakazoid333 has quit [Read error: Connection reset by peer]
freakazoid333 has joined #osdev
freakazoid333 has quit [Client Quit]
<geist> iiinteresting: https://copilot.github.com/
<bslsk05> ​copilot.github.com: GitHub Copilot · Your AI pair programmer
<geist> but as someome pointed out on twitter: https://twitter.com/andrewgodwin/status/1410050004086104064?s=19
<bslsk05> ​twitter: <andrewgodwin> GitHub Copilot does look very interesting, but I _would_ like to see the legal analysis that the code it generates isn't a GPL-derived work (given it was apparently trained on GPL code?) before I put it into a codebase.
<clever> geist: i recently saw on the rpi forums, that the axi bus deals with 128 BYTE writes better then 16 byte writes, that feels very wide for a bus, do you think its the bus width, or the fifo depth, or something else?
<geist> like 128 strbs in a row vs a single store of a 16 byte vector?
<geist> oh duh, mind not working
<geist> 128 vs 16. i was reading as bits vs bytes
<clever> the thread was on the context of the h264 encoder block doing 16 byte burst writes, and saying that the hw handles 128 byte better
<geist> well, it's possible they've widened it out to 128 yeah
<clever> yeah, thats why i put byte in caps
<geist> or maybe that's a row line in dram?
<geist> or the width of the L2/L3? which rpi?
<geist> AXI can do bursts of more than one transfer, so maybe 128 is the max burst len
<clever> pi4
<bslsk05> ​www.raspberrypi.org: Stressing USB3 affects H264 encoding performance (Update). - Page 2 - Raspberry Pi Forums
<clever> also on the subject of copilot, i lost the link, but i found a haskell tool to do somewhat better
<clever> first, you define the type of a function, input args, and return value
<clever> and it will brute-force combine every haskell function it can find, to form that type
<geist> you can at synthesis time configure the width of the AXI busses and its somewhat dynamic