Search logs:

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

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

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

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


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

Thursday, 18 November 2021

00:09:00 <klange> While I'm not going to say that chase has done a great job of things, it's not like we're fighting him... ideally we would like to keep using what we have, but get more people access to fix things.
00:11:00 <kazinsal> At least having someone like one of you two having access to the linode subaccount the site runs in would be handy
00:54:00 <kazinsal> So I seem to have completely disregarded my estimate for what I was actually going to accomplish this week...
00:55:00 <kazinsal> I fixed a couple gnarly bugs and improved some performance on VMware but managed to ruin performance in VirtualBox in the process...
00:56:00 <kazinsal> Nothing that I've accomplished is actually related to my original plan for the week, which was a 64-bit rewrite...
01:02:00 <heat> i'm struggling to get NAT working on libvirt
01:02:00 <heat> this is highly depressing
01:12:00 <heat> when in doubt, reboot
01:13:00 <heat> at least windows tells you when to reboot, in linux you just have to guess
01:13:00 <clever> heat: i had an issue with iptables last week, where the firewall was logging to dmesg and dropping packets, even when i deleted that rule entirely
01:14:00 <clever> somehow, it was just ignoring all changes to the rules, and running the old ruleset
01:14:00 <clever> `iptables-save` claimed no firewall at all, yet it was still running the old ruleset
01:55:00 <heat> well with this I got completely sidetracked
01:56:00 <heat> i was supposed to start the riscv port not install OSes in virtual machines
01:59:00 <klange> I was supposed to be porting a webserver, not getting an ext2 disk-based installation working with the new SMP infrastructure, yet here we are
02:15:00 <geist> turns out i have misinterpreted how the UXN and PXN bits work on ARM64 paging
02:15:00 <heat> turns out I'm not going to pay AWS a single cent
02:15:00 <heat> shouldn't this need a license? *shrug*
02:16:00 <geist> if you're fiddling with it, double check. UXN behaves not as i'd expect
02:16:00 <kazinsal> finally switched my ass over to irccloud because I got tired of trying to fiddle with irssi + znc on my phone
02:16:00 <geist> yah that was what finally tipped me over to
02:16:00 <geist> too
02:20:00 <klange> I just don't IRC on my phone much, but I can't say I've been _that_ annoyed by my setup of running one irssi instance in screen and using an ssh client...
02:21:00 <heat> when I'm bored/curious I just check #osdev's logs
02:22:00 <heat> typing irc messages on a phone sounds like a chore
02:22:00 <kingoffrance> s/irc messages//
02:23:00 <heat> i feel like abbreviating words on irc is a bit frowned upon
02:24:00 <heat> typing on a phone is doable if you abbreviate and abuse the dictionary
02:25:00 <eryjus> esp on a flip phone
02:45:00 <geist> actually the most annoying thing is the damn autocorrection
02:45:00 <geist> it keeps trying to fix technical words
02:45:00 <geist> but you can tell i'm using it because it'll start capitalizing words
02:48:00 <kingoffrance> eh, i actually liked the old flip phones as far as real little tiny "keyboard". the on-screen keyboard seemingly i am not against, just have trouble hitting the little buttons. i am very very skinny, and don't have 500 lb fingers
02:48:00 <kingoffrance> i dont actually follow phone stuff, just when i have to help a family member or something
02:50:00 <kingoffrance> i should say, i had zero issues with real "keyboard"
02:50:00 <kingoffrance> "like" is a strong word :/
02:57:00 <zid> geist that's ramifications, why would autocorrect change words like paige tablet
03:00:00 <geist> yah conceptually i wish for a simpler time with flip phones or whatnot
03:01:00 <geist> but realistically i use too many smartphone features to do away with them
03:02:00 <geist> much like how it may sound great to go without internet for a weekend or whatnot, but really you just find that you depend on it for too many things
03:06:00 <zid> I only really use it for piracy and communication
03:06:00 <zid> so I don't use a phone regardless
03:07:00 <zid> no full sized hdd or full iso keyboard? gtfo
03:10:00 <heat> well this was a fun experiment but it's completely unusable
03:10:00 <zid> nice
03:10:00 <heat> all I wish for is a vm install without UI slugishness
03:10:00 <heat> even virtio sucks :/
03:11:00 <heat> i should try out intel gvt-g again
03:13:00 <zid> vmware emulating windows on windows can do directx I think, the least useful thing I've said all week
03:14:00 <klange> I had some weird issues with display updates being awfully slow in VMware on Windows [guest OS obviously being ToaruOS, but before you ask Yutani runs just fine even at 4K, so it wasn't my fault]
03:14:00 <klange> Not, like, "this is clearly a page attribute issue" slow, but just like it was doing it super lazily.
03:15:00 <kazinsal> the way to do GUIs in VMs is to leave the actual VM headless and remote into it
03:15:00 <klange> gotta write a VNC server for that...
03:16:00 <geist> or have the VMM do the VNC for you
03:16:00 <heat> the only fun-to-use virtualised GUI I've ever used was the new WSL2 thing
03:16:00 <heat> seamless windows and everything, no lag
03:16:00 <klange> I found it visibly slower than running Xming.
03:16:00 <klange> It's Wayland-over-RDP.
03:16:00 <heat> worked fine for me
03:17:00 <geist> yah i'm torn about it, I haven't put WSL2 on my windows box because it requires enabling hyper-v and last i tried that had issues with virtualbox and vmware
03:17:00 <heat> maybe it was a driver issue?
03:17:00 <geist> which i'm more fond of
03:17:00 <klange> It's _acceptable_, but still noticable.
03:17:00 <kazinsal> it's probably the VM breakout part that sucks
03:17:00 <kazinsal> because local RDP is perfectly fine normally
03:18:00 <klange> RDP's not great at pixel pushing, so if you have an uncooperative client [like a VM window], it's visible.
03:18:00 <klange> To be fair, the Xming was also terrible at that, just ever slightly less so.
03:18:00 <heat> oh I've noticed yesterday that windows shows the linux partition as a network thingy now
03:18:00 <heat> on the file explorer
03:18:00 <heat> ext4 driver when?
03:19:00 <kazinsal> I need to switch my linux network shares over to SMB
03:19:00 <kazinsal> my NFS hack is horrible and I hate it
03:19:00 <kazinsal> NFS on Windows is just a nightmare
03:19:00 <heat> it hates you too :(
03:19:00 <klange> I switched back to a native Ubuntu install on my Surface. Just getting a much better VM experience than I was with any of the options I did with WSL2.
03:20:00 <kazinsal> Hyper-V honestly is not a good hypervisor
03:20:00 <klange> geist: I found vmware still worked and was accelerated [though see previous comment about display weirdness], though VirtualBox did reliably fail to function ...
03:20:00 <kazinsal> I'll defend most Microsoft products but not Hyper-V
03:21:00 <klange> Oh right, one odd issue I had with QEMU in WSL2 with nested virtualization was that the serial port was incredibly slow.
03:22:00 <klange> I do often run headless VMs over traditional serial and they work just fine under KVM or even TCG, but something about how that whole pipeline works was slowing to a snail's pace in WSL2.
03:23:00 <heat> WSL2 with nested virtualization broke new OVMF builds for some reason
03:23:00 <heat> no idea why
03:27:00 <klange> Speaking of GUIs in VMs... still waiting for the day VirtualBox gets the "map-to-host" seamless integration that's been reserved in its code for years now...
03:27:00 <klange> I think VMware has something like that, but they recently restricted it to only Windows on Windows or something?
03:27:00 <klange> And unlike with VirtualBox where I can peruse headers, VMware is more of a black box when it comes to implementing its guest integrations...
03:29:00 <klange> I do support the "VM mouse" and display size stuff at least. VM mouse is supported [and enabled by default!] in QEMU, so it was easy to test, and I think I fumbled through docs that came with the X11 drivers for the display size changing? I don't even remember.
03:39:00 <klange> fixed up my doom port's key mappings so now I can cheat, and also tossed in a quick hack to make save games work
03:40:00 <zid> does it save now?
03:40:00 <klange> it does, I just replaced the `rename` with `system("cp ...` :D
03:41:00 <zid> heh
03:43:00 <klange> Now if I can just get it to render at a higher resolution... this is built on doomgeneric which is based on fbDOOM, which is based on Frosted Doom, which is based on the original GPL release
03:44:00 <klange> I used to have a prboom port, but it had major (upstream) issues
03:47:00 <kazinsal> > WSL2 with nested virtualization broke new OVMF builds for some reason
03:47:00 <kazinsal> because Hyper-V's nested virt *sucks*
03:47:00 <kazinsal> in fact, just having Hyper-V enabled is detrimental to most other hypervisor frontends
03:48:00 <kazinsal> I have it enabled on my machine for some work stuff and it causes vmexit times to increase by about 450% in virtualbox
03:50:00 <geist> exactly, that's why i donth ave WSL2 on my machine
03:50:00 <geist> i dont need it *that* much
03:51:00 <geist> also fwiw i found that things like Ryzen Master can't run with hyper-v enabled, presumably because it denies access to AMD specific MSRs it wants
06:24:00 <gorgonical> Just to vent a little frustration, I will be soon writing only hobby OSes because I am sure to be ejected from my PhD program for not being able to figure out Linux's IRQ subsystem
06:24:00 <moon-child> :/
06:25:00 <gorgonical> Working on Linux is so frustrating
06:26:00 * kingoffrance .oO( I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) )
06:26:00 <kingoffrance> hobby oses are like <xyz> they grow up :D
06:27:00 <kingoffrance> you think they are cute and cuddly, but they grow up to be killers
06:39:00 <kazinsal> I think telling someone they need to figure out how one of Linux's subsystems works from scratch should be considered a crime with penalties equivalent to abetting suicide
06:39:00 <gorgonical> The thing is I don't even mind reading documentation or source code with comments. But Linux has virtually none of that for such an exotic architecture as... arm64
06:39:00 <zid> I hope you get a couple weeks for that
06:40:00 <gorgonical> That or I am misusing google
06:40:00 <zid> I imagine the 'arm64' surface is incredibly small
06:40:00 <zid> compared to the entire subsystem
06:40:00 <gorgonical> Yeah, and the irq subsystem is special in that it's been generalized
06:41:00 <zid> that's not really special, for linux
06:41:00 <gorgonical> Like, they built this generic framework for the irq subsystem to unify all the irqchips, but that means it's not even similar to how the rest of linux does it
06:41:00 <gorgonical> I mean the arm64 irq subsystem*
06:41:00 <zid> I imagine you'd need to be intimately familiar with arm64 first
06:41:00 <zid> so that you can.. make heads or tails of what it's even trying to do
06:42:00 <kazinsal> Yeah, many aarch64 platforms don't use the GIC for... reasons
06:42:00 <gorgonical> Yep. I'm reasonably familiar with arm64, but reverse engineering the many abstraction layers is making me doubt my life choices
07:13:00 <geist> thankfully most do use GIC and whatnot, at least newer stuff
07:36:00 <kazinsal> hmm, wiki and forums are now just straight up timing out for me again. was hoping to check to see if there were any docs on vmxnet3 but I guess it's read-the-whitepaper time
07:59:00 <klange> I think I've got this thing down to two main problems: I don't properly mark anything deallocated (uh, oops?) and I'm still missing indirect blocks in i_blocks calculations: https://gist.github.com/klange/c38b01b808410add045cf8d157e9905f
07:59:00 <bslsk05> ​gist.github.com: gist:c38b01b808410add045cf8d157e9905f · GitHub
08:00:00 <klange> The two deleted inodes (multiple complaints) actually are deleted files (yay), and I fixed an issue where I was calculating block groups incorrectly at the border which was causing two files in gcc to break
08:38:00 <rustyy> gorgonical: sorry to hear that, apart from obvious brute force(reading code with ctags/cscope), have you tried using ftrace to figure out irq subsystem? sorry if my q is naive and of no help, but quite often with linux i find that tracing subsystems with ftrace allows me to better understand the code that i am reading, and whenever i need more details kprobe + ftrace help me a lot
08:39:00 <rustyy> gorgonical: also, gdb over qemu (kgdb) is very good, also helps me a lot
08:47:00 <rustyy> gorgonical: also, at oftc irc net we have #linux-rt, where we have extraordinary people, like Thomas Gleixner or Peter Zijlstra or Steven Rostedt and many others, they are just simply a fountainhead of inspiration in terms of learning and kernel developement, you can ask for help
08:48:00 <klange> heh, while I have no confidence I can actually achieve my goals, one of my focuses for ToaruOS these days is to have something that's way simpler than Linux but way more realistic and broad than the usual academic toys that end up in uni research.
08:49:00 <klange> Minix 2 was okay, though would be terribly dated now. Minix 3 sold out, it relies way too much on using BSD stuff to fill in gaps...
08:50:00 <j`ey> rustyy: gorgonical also #armlinux on libera
09:23:00 <Terrascope> Is wiki.osdev.org timing out for anyone else?
09:24:00 <sham1> Seems that it's timing out for me at least
09:27:00 <klange> Probably the same issue we were seeing before... wouldn't doubt it's getting DOS'd...
09:28:00 <sham1> I have no idea why one would DoS a hobbyist site for operating system development, but there are all kinds of crazies out there
09:29:00 <zid> could be a vhost on a machine that's getting attacked for completely different reasons
09:29:00 <zid> or someone hacked it and is running crypto miners on it :P
09:29:00 <klange> I'll be so mad if someone found a way in that I couldn't...
09:30:00 <sham1> Mayhaps
09:31:00 <Affliction> wiki.osdev.org has address 173.255.206.39 | 39.206.255.173.in-addr.arpa domain name pointer smtp.osdev.org | NetName: LINODE-US
09:31:00 <Affliction> I remember Linode tending to null route if you get DDoSed
09:31:00 <zid> now find all possible rdnss for 173.255.206.39
09:31:00 <Affliction> oh I can do that!
09:32:00 <Affliction> well, not all possible
09:32:00 <puck> it's a linode box, so unlikely that it's shared with anything else
09:32:00 <zid> I know :p
09:32:00 <Affliction> but, I do have rapid7's dns and rdns scan downloaded
09:33:00 <Affliction> https://bpa.st/4S5Q
09:33:00 <bslsk05> ​bpa.st: View paste 4S5Q
09:33:00 <sham1> Well that's not surprising
09:34:00 <Affliction> https://bpa.st/EJGQ
09:34:00 <bslsk05> ​bpa.st: View paste EJGQ
12:37:00 <bauen1> klange: for the GBS (Grundlagen Betriebsysteme, Basics of Operating Systems) at the TUM (Technical University of Munich), they're using xv6-riscv for teaching
12:37:00 <bauen1> which is nice, previously there was no actual operating system code that was used in the course, but it's very limited
12:38:00 <bauen1> i think the filesystem is read-only (or well a tmpfs), so it's enough for teaching but too limited to do very interesting things
13:48:00 <sham1> Interesting things like writing. Of course reading is interesting enough
16:46:00 <zid> ah you got un-isekai'd
19:42:00 <heat> i know this is totally offtopic but does anyone know what "Common methods for server monitoring / Health check" means or is? stuff like this looks so server/company-specific that I'm not sure where to start
19:44:00 <GeDaMo> Regular pinging / connecting to services?
19:45:00 <heat> context: this is for a network engineer internship
19:46:00 <heat> I don't believe they're trying to test my borgmon knowledge lol but ping seems too simplistic?
19:46:00 <zid> Installing a disgusting monitoring package
19:46:00 <eryjus> Try IPMI
19:46:00 <GeDaMo> Maybe ask in #networking ?
19:47:00 <heat> maybe
19:48:00 <heat> i'm busy studying up on bgp now though
20:30:00 <cooligans> does anyone use emacs as a editor?
20:30:00 <jjuran> it has a few users, I think
20:31:00 <jjuran> What's your real question?
20:32:00 <heat> I use visual studio express 2008 for my osdeving
20:33:00 <cooligans> jjuran: that was my real question
20:34:00 <cooligans> heat: how is that possible???
20:34:00 <cooligans> vs 2008 is notoriously bad
20:34:00 <heat> everything is possible
20:34:00 <moon-child> cooligans: yes, lots of people use emacs as an editor
20:34:00 <cooligans> vs 2017 isn't too bad tho
20:34:00 <heat> vs 2008 express is peak IDE
20:34:00 <cooligans> since it has a cmake integration
20:35:00 <cooligans> heat: is it a NT-Style OS by any chance
20:35:00 <heat> i'm fairly sure VS2019 caused covid
20:35:00 <cooligans> lol
20:35:00 <heat> vs 2008 <-- very far from covid; vs 2019 <---- not very far
20:35:00 <moon-child> visual studio seems like it does a lot of cool things, but I really can't stand windows, and I'm too attached to my vi keys
20:36:00 <heat> moon-child, vscode is neat
20:36:00 <jjuran> I use CodeWarrior Pro 6, released in 2000, which is even further from covid!
20:36:00 <moon-child> vscode is completely uninteresting to me
20:36:00 <cooligans> emacs + evil (vim bindings) is the best
20:37:00 <jjuran> Not as an editor, though
20:37:00 <cooligans> I used to use vim until I stumbled upon this legendary combo
20:37:00 <cooligans> jjuran: why?
20:37:00 <cooligans> is it too bloaty
20:37:00 <dzwdz> i've tried to like emacs, but its defaults are so garbage
20:37:00 <dzwdz> configuring it to work like a normal editor is too much of a pain
20:37:00 <moon-child> heat: basically, people have been working for 10?ish years on clangd et al, since stallman stalled attempts to use gcc to provide editor support. Vs/msvc has been around for 2-3x as long
20:37:00 <cooligans> thats why you use a distro of some sorts
20:38:00 <jjuran> cooligans: For targeting classic Mac OS.
20:38:00 <moon-child> vscode for c just wraps clangd. Which I have _not_ had particularly good experiences with
20:38:00 <cooligans> the defaults are boring
20:38:00 <dzwdz> vim just works though
20:38:00 <cooligans> true, true
20:38:00 <cooligans> but its so convinent to use emacs
20:38:00 <dzwdz> also i don't really want to install a giant mass of random plugins
20:38:00 <cooligans> I am writing code alongside irc
20:38:00 <dzwdz> org mode is great through
20:38:00 <dzwdz> s/thr/th
20:38:00 <heat> moon-child, clangd works fine for me
20:39:00 <heat> never had an issue
20:39:00 <cooligans> ERC (Emacs IRC client)
20:39:00 <cooligans> is what I use
20:39:00 <cooligans> i used to use irssi
20:39:00 <dzwdz> i've tried erc, it's kinda neat
20:39:00 <dzwdz> same with eww
20:39:00 <cooligans> yeah
20:40:00 <dzwdz> i definitely get the appeal of emacs, it's just not my thing
20:40:00 <cooligans> I like it because I can use vim-keybindings with irc
20:40:00 <cooligans> dzwdz: I use clion when I am not using emacs
20:40:00 * dzwdz has never used it
20:41:00 <dzwdz> intellij is pretty damn good, so i assume clion is too
20:41:00 <moon-child> I think I used clion briefly. Had to use xephyr or xnest or some such to get it to not bug out and move the cursor whenever I changed window focus
20:42:00 <Ermine> vscode python plugin is garbage
20:42:00 <moon-child> It was fine. But until somebody cooks up a non-garbage structural editor (or I finish my own higher-order texteditor), probably stuck with vim
20:42:00 <klange> finish your own editor~
20:43:00 <dzwdz> o, higher-order text editor?
20:44:00 <dzwdz> that sounds interesting, any details?
20:44:00 <Ermine> Did someone try xi?
20:44:00 <cooligans> jetbrains font tho
20:44:00 <moon-child> dzwdz: you know like 'dw' in vi?
20:44:00 <cooligans> is bomb
20:44:00 <moon-child> d is an 'operator' and w is a 'motion' (or something like that, I forget the details); basically it's pretty much special-cased
20:45:00 <moon-child> but another way to model it is that 'd' is a higher-order function transforming a text buffer, and you pass it the 'w' function
20:45:00 <moon-child> or like 'dtX'. First you pass the literal character X to function t; t returns a function, and you pass _that_ function to 'd'
20:45:00 <Ermine> Using vim is pain when you have to change your keyboard layout, since vim only understand commands typed with english layout
20:46:00 <j`ey> you can remap everything of course
20:46:00 <moon-child> yeah, I think people have done vim keymaps that keep everything in the same place for dvorak
20:47:00 <dzwdz> moon-child: that indeed is interesting
20:48:00 <dzwdz> do you have the current source up somewhere?
20:49:00 <moon-child> https://github.com/moon-chilled/v/ kinda (out of date, crap code needs to be rewritten). But I think I need to sugar up the type system a bit
20:49:00 <bslsk05> ​moon-chilled/v - text editor with higher-order functions (0 forks/0 stargazers/NOASSERTION)
20:50:00 <dzwdz> those are some... interesting directory names
20:50:00 <klange> the best thing you can do to for your editor is use it constantly
20:50:00 <dzwdz> what i'd love is a modern ed-style editor
20:51:00 <dzwdz> not as an editor to use long-term, but as an editor to experiment with new ways to edit code
20:51:00 <moon-child> apparently ed is actually surprisingly powerful. (Can't speak to it myself)
20:51:00 <dzwdz> i'm sure that if you forced yourself to use ed for a while you'd come up with a way to make it comfortable
20:52:00 <moon-child> klange: first I need to teach it to scroll!
20:52:00 <klange> virtually anything you can do in vi you can do in ed
20:52:00 <dzwdz> line mode stuff is underrated
20:52:00 <klange> ed is just vi with a blindfold
20:52:00 <dzwdz> i've made a lil line mode mail client recently
20:52:00 <moon-child> (also, I don't _entirely_ trust it to not kill my data. But I guess that's what vcs is for)
20:52:00 <dzwdz> and it's very pleasant to use, actually
20:53:00 <klange> moon-child: one of the reasons to use it, you'll find those issues quickly and be highly incentivized to fix them ;)
20:53:00 <dzwdz> instead of reimplementing scrolling in a shitty way like all TUI apps, it just dumps the entire email to the terminal at once
20:53:00 <dzwdz> and you just use scrollback
20:54:00 <dzwdz> it's barely 200 loc and it's already my preferred client for reading email
20:59:00 <j`ey> dzwdz: what about sending?
20:59:00 <dzwdz> haven't implemented that yet
20:59:00 <jjuran> For email-sized documents, that makes sense
21:00:00 <klange> wow I haven't tagged a release of my editor in a year...
21:01:00 <klange> back in January I pretty much rewrote the thing and I've been dragging it along as 2.99.x ever since...
21:12:00 <klange> I was going to do this whole rewrite to make the Kuroko integration a lot more integral, but I gave up _ages_ ago and have just been cleaning it up slowly
21:19:00 <heat> yay I passed
21:23:00 <jjuran> You resisted the temptation of the One Ring? Nice :-)
21:40:00 <sham1> One rng
22:02:00 <MiraCat> Any recommended books to beyond hello world in the bootloader?
22:03:00 <MiraCat> How much assembly would I need anyways? I prefer C.
22:03:00 <klange> I recommend not reading books, they have this terrible bug where you can't update them after release.
22:04:00 <vdamewood> klange: It's called a pencil.
22:05:00 <klange> They banned me from the library when I tried that.
22:05:00 <vdamewood> You think that's bad... they banned me from the bookstore.
22:06:00 <MiraCat> It seems that pure C isn't possible, I'll have to use a tiny bit of assembly to interact with the BIOS.
22:06:00 <vdamewood> Apparently, trying to share your knife with everyone is not considered polite.
22:06:00 <j`ey> MiraCat: what about UEFI?
22:07:00 <MiraCat> What about UEFI?
22:07:00 <moon-child> uefi is a c api
22:07:00 <vdamewood> UEFI is designed to load a C program.
22:07:00 <moon-child> (that said you will still need some assembly)
22:07:00 <vdamewood> Yeah, but at least with UEIF your entry point can be C.
22:07:00 <vdamewood> UEFI
22:08:00 <MiraCat> Does the VM truly matter? As in, does it matter if using qemu or bochs or whatever?
22:08:00 <j`ey> it shouldnt!
22:08:00 <vdamewood> Well, matter how?
22:08:00 <moon-child> some hardware may only be emulated by one vm
22:09:00 <vdamewood> They all virtualize different hardware of course.
22:09:00 <moon-child> some vms may have bugs others don't
22:09:00 <moon-child> some vms may have better (or different) debugging tools than others
22:09:00 <moon-child> some may be faster or slower than others
22:09:00 <klange> test in everything you have access to
22:09:00 <vdamewood> I think Qemu needs a separate component for UEFI firmware if you use UEFI.
22:10:00 <klange> Not to any more degree than it needs one for BIOS.
22:10:00 <clever> moon-child: and different software has different ISA's and modes it can do
22:10:00 <clever> i think bochs is x86 only?
22:10:00 <j`ey> yes
22:10:00 <klange> If your QEMU didn't come with an OVFM build, blame your local package maintainer.
22:10:00 <klange> clever: hey it also does x86-64!
22:10:00 <clever> qemu is both a vm (when using /dev/kvm) and an emulator, so it can target a different ISA entirely
22:11:00 <MiraCat> Correct me if I'm wrong, but the process is the boot sector programming, then enter 32 bit protected mode, then the bootloader, then the OS boots?
22:11:00 <vdamewood> Can Qemu do that on aarch64 to virtualize aarch64 systems?
22:11:00 <klange> vdamewood: yes
22:11:00 <clever> vdamewood: qemu can use kvm on aarch64 to do properly hw accelerated VM's
22:11:00 <vdamewood> MiraCat: There really isn't a set process.
22:12:00 <vdamewood> MiraCat: Most usng BIOS-based booting try to work with GNU Grub, but even that's optional. DOS didn't even enter protected mode itself (I think).
22:12:00 <klange> Some bootloaders are more like boot sector → some real mode stuff → protected mode → more real mode → more protected mode → more real mode → more protected mode → long mode
22:13:00 <MiraCat> I might experiment with making my own bootloader at one point.
22:13:00 <clever> vdamewood: how did all of the himem stuff work in dos?
22:13:00 <klange> I highly recommend not spending too much time early on thinking about bootloaders.
22:13:00 <klange> clever: magic
22:13:00 <clever> lol
22:13:00 <clever> https://david942j.blogspot.com/2018/10/note-learning-kvm-implement-your-own.html
22:13:00 <bslsk05> ​david942j.blogspot.com: Play With Capture The Flag: [Note] Learning KVM - implement your own kernel
22:14:00 <vdamewood> clever: The individual programs would call into and stuff like that, I think.
22:14:00 <clever> this blog post is also a great read, if you want to learn how kvm actually works
22:14:00 <vdamewood> call into it
22:14:00 <clever> for the most part, the kvm api is entirely ISA independant, you have functions to create a vm, create a cpu core, pause/resume the cpu, map memory into the guest
22:14:00 <MiraCat> In the end, I won't be using assembly anymore if I don't want to after the boot sector is done and I'm at the bootloader?
22:15:00 <clever> the only thing that varies, is the struct describing the cpu registers, and what ISA you run inside
22:15:00 <klange> some stuff is still more easily done in assembly, like interrupt entrypoints
22:15:00 <clever> i think kvm doesnt even define a reset vector, the kvm based app must just initialize PC with something
22:16:00 <MiraCat> At what point klang should it be good to stop using assembly and just use C? Because I want to make something similar to linux for fun.
22:16:00 <vdamewood> Even Linux has inline assembly here and there.
22:16:00 <j`ey> MiraCat: you have to use asm in an OS too
22:17:00 <vdamewood> MiraCat: You might be able o write wrappers that expose C interfaces to certain assembly instructions, but they'll be slow as a snail.
22:17:00 <vdamewood> s/able o/able to/
22:18:00 <vdamewood> functions for the in and out instructions are pretty common.
22:18:00 <MiraCat> Fine, I'll have a 95% C and the last 5% assembly. Save assembly for when it's most useful and not really much increase in convenience over C.
22:18:00 <klange> You've got the wrong mindset. Assembly is not some scary thing that must be avoided at all costs. If you're writing an OS, you need to interface with hardware, and sometimes that needs a blunter tool.
22:18:00 <klange> It'll be less than 5%.
22:18:00 <wleslie> not much of the inline assembly is for performance reasons, it's mostly because of wacky stack requirements
22:18:00 <clever> vdamewood: what ive been doing lately, is writing static inline functions for a single opcode
22:19:00 <MiraCat> I don't think that I find asm to be scary, but rather I just am a fanboy for C and want to see how much can I use C.
22:19:00 <clever> vdamewood: gcc is smart enough to inline it, and it then functions like you had just used inline asm directly at the call site
22:19:00 <wleslie> e.g. oh, you took an interrupt? did that push a value on to the stack? lets find out!
22:19:00 <vdamewood> clever: That's pretty much what I do for in and out.
22:19:00 <klange> There's about 3k lines of assembly in my OS, which is a ridiculous measure since a line of assembly does a lot less than a line of C.
22:19:00 <klange> That's 3% of the total source lines.
22:20:00 <vdamewood> Damn I need to learn aarch64 already.
22:21:00 <klange> same
22:22:00 <MiraCat> I think this will be fun. This kind of programming is OS independent, so I don't have to learn multiple API's for each OS, just make one.
22:23:00 <MiraCat> I started out this morning wanting to make libraries for win32 and xlib, and here I am with wanting to make an OS. Time sure flies.
22:23:00 <MiraCat> I could even make a frankenOS to where I pick what elements I want from XYZ OS and just make it.
22:24:00 <klange> good luck
22:25:00 <j`ey> MiraCat: if you have ten years to spare
22:25:00 <MiraCat> This is a hobbyist thing, so it won't be as huge as windows or TempleOS.
22:25:00 <vdamewood> That's what Linus said.
22:25:00 <j`ey> heh
22:26:00 <sham1> Nothing serious, like GNU
22:26:00 <MiraCat> Well I don't intend to make this a full time gig. Just a fun thing in my spare time.
22:26:00 <klange> ``probably never will support anything other than AT-harddisks, as that's all I have :-(''
22:26:00 <j`ey> but dont expect anything like xlib for a while
22:27:00 <MiraCat> xlib is gigantic, I wouldn't try to make it as big like xlib, but I think in 2 years of casual development I could get a graphics library of some sort up and running.
22:27:00 <klange> "Simply, I'd say that porting is impossible."
22:27:00 <vdamewood> Didn't he say something to the effect that it was for the 386 and it will probably stay on the 386?
22:28:00 <klange> https://www.cs.cmu.edu/~awb/linux.history.html just read the whole lot of 'em yourself
22:28:00 <bslsk05> ​www.cs.cmu.edu: LINUX's History by Linus Torvalds
22:30:00 <vdamewood> "It is NOT protable (uses 386 task switching etc)..."
22:30:00 <sham1> Oh how things have changed
22:31:00 <vdamewood> Yeah, I think the only thing more portable than Linux is NetBSD.
22:31:00 <klange> Quite amusing how Linux went from that to Linus's thesis literally being about portability.
22:31:00 <vdamewood> There are just one or two models of toaster that only NetBSD supports.
22:31:00 <sham1> NetBSD with dead badgers when
22:34:00 <MiraCat> It seems that the boot sector is very tiny, is that all there is when you first power the computer on?
22:35:00 <vdamewood> In BIOS mode, yep.
22:35:00 <vdamewood> For this reason, some file systems allow you to reserve a chunk of sectors after the boot sector that won't be used by the file system, so you can store a stage-2 loader in that area.
22:36:00 <MiraCat> I'll probably be writing entirely in assembly at first and then rewriting stuff in C.
22:36:00 <vdamewood> I'll be porting my code to UEFI when I care about it again.
22:38:00 <moon-child> 'when I care about it again' I feel that, strongly
22:38:00 <klange> I would just skip writing a bootloader, defer it to later. Use GRUB, or Limine, or literally anything that offers you a standard boot interface. You'll learn what you need out of a bootloader from that.
22:39:00 <vdamewood> Also, about 90% of the annoying assembly code is in the bootloader.
22:43:00 <heat> MiraCat, no it's not there
22:43:00 <heat> the computer reads a single sector from the hard drive but it's not "there"
22:43:00 <heat> nothing is "there" really, even your bios needs to be read in
22:43:00 <heat> (although not by the CPU)
22:44:00 <klange> that's a newfangled thing, ain't it? used to be some bits of the ROM really were directly mapped?
22:45:00 <heat> I believe the chipset kind of maps the firmware region and translates it into SPI flash accesses
22:45:00 <heat> i'm not 100% sure though
22:46:00 <heat> it can't be in RAM because there's no RAM online
22:47:00 <heat> so you execute in place with CAR, then you bring the RAM online and shadow everything to RAM (including your little heap)
22:47:00 <klange> BIOSes in PCs have evolved over time, from true mask ROMs, to EPROMs, to EEPROMs, to flash.
22:47:00 <Affliction> on some platforms, a state machine loads the flash into DRAM
22:47:00 <Affliction> of course, on PCs, you don't even have DRAM coming out of reset, so
22:48:00 <Affliction> well, modern PCs
22:49:00 <Affliction> And, as I've learned with how BIOSes evolved early on in AM4, configuring the memory controller is apparantly non-trivial
22:49:00 <heat> ok yeah looks like I'm right, accesses in the BIOS region go to the DMI which reads in the BIOS region of the firmware
22:49:00 <heat> (reads in)
22:49:00 <heat> "*
22:50:00 <clever> and on a moderm x86 pc, i think its the southbridge, will map a window of the addr space to the spi flash chip
22:50:00 <heat> since the firmware has lots of different regions (like the ME and the firmware volumes)
22:50:00 <heat> clever: that's DMI
22:50:00 <Affliction> I think modern AMD starts with the PSP (an ARM core on the CPU die next to the x86 cores)
22:50:00 <clever> the exact address of the window varies, so the window always ends at the x86 reset vector (up to the max window size of the bridge chip)
22:50:00 <Affliction> I assume the flash is connected directly to the CPU, since some AM4 platforms don't have a southbridge at all
22:50:00 <clever> Affliction: yeah, amd with PSP will instead boot an entirely different core, mirror the x86 bios to ram, and then boot from that copy
22:51:00 <heat> amd with ps vita when?
22:51:00 <Affliction> Kind of an approximation of my initial "state machine loads the flash" comment, that state machine just happens to be turing complete
22:51:00 <clever> heat: platform security processor, i think
22:51:00 <Affliction> yeah
22:51:00 <heat> i know, it was a joke
22:51:00 <heat> ba dum tss
22:52:00 <clever> i knew :P
22:52:00 <Affliction> But the PSP is ARM itself, so... anyone hacked the PSP to run the CPU core of a PSP emulator? :V
22:52:00 <clever> Affliction: i think it requires signed code, which makes it harder
22:52:00 <heat> have the security processors even been cracked?
22:52:00 <Affliction> yeah
22:52:00 <Affliction> some TPMs have been
22:52:00 <heat> i think you can only disable stuff
22:52:00 <heat> not outright run skyrim
22:53:00 <heat> skyrim intel ME edition sounds neat though
22:53:00 <Affliction> while running windows ME on the x86 cores? :D
22:53:00 <Affliction> well, maybe someone will find some element of turing completeness on the interface exposed by the PSP or ME
22:54:00 <Affliction> Just like the x86 mov instruction, and exception handling
22:55:00 <Affliction> But yeah, even my 3950X had some slight issues early on - it wouldn't POST consistantly when cold.
22:55:00 <heat> how cold?
22:55:00 <Affliction> ~5-15C
22:55:00 <Affliction> now, I completelly empathise :)
22:55:00 <Affliction> But, a later BIOS fixed that right up
22:56:00 <heat> spending 800 euro on a CPU just so it doesn't post sounds great!
22:56:00 <clever> Affliction: my motherboard has a dedicated LN2 switch, to fix that
22:56:00 <Affliction> I think it was something to do with the memory controller
22:56:00 <Affliction> I guess its memory training process couldn't figure out good timings while cold
22:56:00 <Affliction> or, something like that
22:57:00 <Affliction> Usually only took a hit of the reset button to get it going, but yeah, it's been solid over the last year and a half
23:03:00 <klange> no ps/2 emulation https://cdn.discordapp.com/attachments/711112727426367571/911028813499105360/IMG_8466.jpg
23:04:00 <klange> gonna have to get this xhci driver working https://cdn.discordapp.com/attachments/711112727426367571/911028813977227324/IMG_8467.jpg
23:05:00 <heat> hey that's pretty cool
23:06:00 <heat> i've never gotten my ps2 driver to work on one of my laptops either
23:06:00 <heat> dunno if it's my fault or my ps2 detection's fault
23:06:00 <klange> Mine's working on my ThinkPad, but that legitimately is PS/2
23:16:00 <heat> this laptop definitely has PS/2, not sure about the other one