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
<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.
<kazinsal> At least having someone like one of you two having access to the linode subaccount the site runs in would be handy
FreeFull has quit []
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
heat has quit [Remote host closed the connection]
heat has joined #osdev
<kazinsal> So I seem to have completely disregarded my estimate for what I was actually going to accomplish this week...
<kazinsal> I fixed a couple gnarly bugs and improved some performance on VMware but managed to ruin performance in VirtualBox in the process...
<kazinsal> Nothing that I've accomplished is actually related to my original plan for the week, which was a 64-bit rewrite...
<heat> i'm struggling to get NAT working on libvirt
<heat> this is highly depressing
dh` has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
<heat> when in doubt, reboot
<heat> at least windows tells you when to reboot, in linux you just have to guess
<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
<clever> somehow, it was just ignoring all changes to the rules, and running the old ruleset
<clever> `iptables-save` claimed no firewall at all, yet it was still running the old ruleset
dutch has quit [Quit: WeeChat 3.3]
dutch has joined #osdev
pretty_dumm_guy has quit [Quit: WeeChat 3.3]
gog` has joined #osdev
<heat> well with this I got completely sidetracked
<heat> i was supposed to start the riscv port not install OSes in virtual machines
<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
kazinsal_ has joined #osdev
kazinsal has quit [Killed (NickServ (GHOST command used by kazinsal_!uid527678@lymington.irccloud.com))]
kazinsal_ is now known as kazinsal
kazinsal_ has joined #osdev
kazinsal_ has quit [Ping timeout: 256 seconds]
<geist> turns out i have misinterpreted how the UXN and PXN bits work on ARM64 paging
<heat> turns out I'm not going to pay AWS a single cent
<heat> shouldn't this need a license? *shrug*
<geist> if you're fiddling with it, double check. UXN behaves not as i'd expect
<kazinsal> finally switched my ass over to irccloud because I got tired of trying to fiddle with irssi + znc on my phone
<geist> yah that was what finally tipped me over to
<geist> too
<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...
<heat> when I'm bored/curious I just check #osdev's logs
<heat> typing irc messages on a phone sounds like a chore
<kingoffrance> s/irc messages//
mctpyt has joined #osdev
<heat> i feel like abbreviating words on irc is a bit frowned upon
gog` has quit [Ping timeout: 268 seconds]
<heat> typing on a phone is doable if you abbreviate and abuse the dictionary
<eryjus> esp on a flip phone
Matt|home has joined #osdev
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
misnor has quit [Remote host closed the connection]
c2a1 has quit [Ping timeout: 264 seconds]
<geist> actually the most annoying thing is the damn autocorrection
<geist> it keeps trying to fix technical words
<geist> but you can tell i'm using it because it'll start capitalizing words
<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
<kingoffrance> i dont actually follow phone stuff, just when i have to help a family member or something
<kingoffrance> i should say, i had zero issues with real "keyboard"
<kingoffrance> "like" is a strong word :/
Oli has quit [Quit: leaving]
<zid> geist that's ramifications, why would autocorrect change words like paige tablet
Affliction has quit [Remote host closed the connection]
Affliction has joined #osdev
<geist> yah conceptually i wish for a simpler time with flip phones or whatnot
<geist> but realistically i use too many smartphone features to do away with them
<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
<zid> I only really use it for piracy and communication
<zid> so I don't use a phone regardless
<zid> no full sized hdd or full iso keyboard? gtfo
<heat> well this was a fun experiment but it's completely unusable
<zid> nice
<heat> all I wish for is a vm install without UI slugishness
<heat> even virtio sucks :/
[itchyjunk] has joined #osdev
<heat> i should try out intel gvt-g again
<zid> vmware emulating windows on windows can do directx I think, the least useful thing I've said all week
<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]
<klange> Not, like, "this is clearly a page attribute issue" slow, but just like it was doing it super lazily.
<kazinsal> the way to do GUIs in VMs is to leave the actual VM headless and remote into it
<klange> gotta write a VNC server for that...
<geist> or have the VMM do the VNC for you
<heat> the only fun-to-use virtualised GUI I've ever used was the new WSL2 thing
<heat> seamless windows and everything, no lag
<klange> I found it visibly slower than running Xming.
<klange> It's Wayland-over-RDP.
<heat> worked fine for me
<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
<heat> maybe it was a driver issue?
<geist> which i'm more fond of
<klange> It's _acceptable_, but still noticable.
<kazinsal> it's probably the VM breakout part that sucks
<kazinsal> because local RDP is perfectly fine normally
<klange> RDP's not great at pixel pushing, so if you have an uncooperative client [like a VM window], it's visible.
<klange> To be fair, the Xming was also terrible at that, just ever slightly less so.
<heat> oh I've noticed yesterday that windows shows the linux partition as a network thingy now
<heat> on the file explorer
<heat> ext4 driver when?
srjek has quit [Ping timeout: 264 seconds]
<kazinsal> I need to switch my linux network shares over to SMB
<kazinsal> my NFS hack is horrible and I hate it
<kazinsal> NFS on Windows is just a nightmare
<heat> it hates you too :(
<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.
<kazinsal> Hyper-V honestly is not a good hypervisor
<klange> geist: I found vmware still worked and was accelerated [though see previous comment about display weirdness], though VirtualBox did reliably fail to function ...
<kazinsal> I'll defend most Microsoft products but not Hyper-V
<klange> Oh right, one odd issue I had with QEMU in WSL2 with nested virtualization was that the serial port was incredibly slow.
<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.
<heat> WSL2 with nested virtualization broke new OVMF builds for some reason
<heat> no idea why
<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...
<klange> I think VMware has something like that, but they recently restricted it to only Windows on Windows or something?
<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...
<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.
heat has quit [Remote host closed the connection]
<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
<zid> does it save now?
<klange> it does, I just replaced the `rename` with `system("cp ...` :D
<zid> heh
<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
<klange> I used to have a prboom port, but it had major (upstream) issues
<kazinsal> > WSL2 with nested virtualization broke new OVMF builds for some reason
<kazinsal> because Hyper-V's nested virt *sucks*
<kazinsal> in fact, just having Hyper-V enabled is detrimental to most other hypervisor frontends
<kazinsal> I have it enabled on my machine for some work stuff and it causes vmexit times to increase by about 450% in virtualbox
<geist> exactly, that's why i donth ave WSL2 on my machine
<geist> i dont need it *that* much
<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
ElectronApps has joined #osdev
mahmutov has joined #osdev
mahmutov has quit [Ping timeout: 268 seconds]
Burgundy has joined #osdev
dzwdz has quit [Ping timeout: 245 seconds]
dzwdz has joined #osdev
[itchyjunk] has quit [Remote host closed the connection]
nyah has quit [Ping timeout: 268 seconds]
MiningMarsh has quit [Ping timeout: 265 seconds]
MiningMarsh has joined #osdev
jjuran has quit [Ping timeout: 256 seconds]
<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
<moon-child> :/
<gorgonical> Working on Linux is so frustrating
jjuran has joined #osdev
* kingoffrance .oO( I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) )
<kingoffrance> hobby oses are like <xyz> they grow up :D
<kingoffrance> you think they are cute and cuddly, but they grow up to be killers
<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
<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
<zid> I hope you get a couple weeks for that
<gorgonical> That or I am misusing google
<zid> I imagine the 'arm64' surface is incredibly small
<zid> compared to the entire subsystem
<gorgonical> Yeah, and the irq subsystem is special in that it's been generalized
<zid> that's not really special, for linux
<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
<gorgonical> I mean the arm64 irq subsystem*
<zid> I imagine you'd need to be intimately familiar with arm64 first
<zid> so that you can.. make heads or tails of what it's even trying to do
<kazinsal> Yeah, many aarch64 platforms don't use the GIC for... reasons
<gorgonical> Yep. I'm reasonably familiar with arm64, but reverse engineering the many abstraction layers is making me doubt my life choices
ns12 has joined #osdev
jjuran has quit [Quit: Killing Colloquy first, before it kills me…]
jjuran has joined #osdev
bradd has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
bradd has joined #osdev
<geist> thankfully most do use GIC and whatnot, at least newer stuff
xenos1984 has quit [Quit: Leaving.]
<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
<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
<bslsk05> ​gist.github.com: gist:c38b01b808410add045cf8d157e9905f · GitHub
<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
xenos1984 has joined #osdev
gog` has joined #osdev
gog` has quit [Client Quit]
<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
<rustyy> gorgonical: also, gdb over qemu (kgdb) is very good, also helps me a lot
<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
<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.
<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...
<j`ey> rustyy: gorgonical also #armlinux on libera
bauen1 has quit [Ping timeout: 265 seconds]
gdd has quit [Ping timeout: 250 seconds]
gdd has joined #osdev
Terrascope has joined #osdev
<Terrascope> Is wiki.osdev.org timing out for anyone else?
<sham1> Seems that it's timing out for me at least
<klange> Probably the same issue we were seeing before... wouldn't doubt it's getting DOS'd...
<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
<zid> could be a vhost on a machine that's getting attacked for completely different reasons
<zid> or someone hacked it and is running crypto miners on it :P
<klange> I'll be so mad if someone found a way in that I couldn't...
<sham1> Mayhaps
<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
<Affliction> I remember Linode tending to null route if you get DDoSed
<zid> now find all possible rdnss for 173.255.206.39
<Affliction> oh I can do that!
<Affliction> well, not all possible
<puck> it's a linode box, so unlikely that it's shared with anything else
<zid> I know :p
<Affliction> but, I do have rapid7's dns and rdns scan downloaded
<Affliction> https://bpa.st/4S5Q
<bslsk05> ​bpa.st: View paste 4S5Q
<sham1> Well that's not surprising
<Affliction> https://bpa.st/EJGQ
<bslsk05> ​bpa.st: View paste EJGQ
GeDaMo has joined #osdev
elastic_dog has quit [Ping timeout: 250 seconds]
dormito has quit [Quit: WeeChat 3.3]
elastic_dog has joined #osdev
mctpyt has quit [Remote host closed the connection]
mctpyt has joined #osdev
bauen1 has joined #osdev
dormito has joined #osdev
<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
<bauen1> which is nice, previously there was no actual operating system code that was used in the course, but it's very limited
<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
X-Scale has quit [Ping timeout: 256 seconds]
ElectronApps has quit [Remote host closed the connection]
ElectronApps has joined #osdev
X-Scale` has joined #osdev
ElectronApps has quit [Remote host closed the connection]
X-Scale` is now known as X-Scale
ElectronApps has joined #osdev
k0valski18 has quit [Quit: Peace out !]
gog has quit []
gog has joined #osdev
Terrascope has quit [Ping timeout: 268 seconds]
<sham1> Interesting things like writing. Of course reading is interesting enough
nyah has joined #osdev
dormito has quit [Ping timeout: 250 seconds]
pretty_dumm_guy has joined #osdev
[itchyjunk] has joined #osdev
CryptoDavid has joined #osdev
dormito has joined #osdev
sonny has joined #osdev
gog has quit []
gog has joined #osdev
jess has joined #osdev
the_lanetly_052_ has joined #osdev
the_lanetly_052_ has quit [Quit: Leaving]
dormito has quit [Read error: Connection reset by peer]
dormito has joined #osdev
the_lanetly_052 has joined #osdev
ElectronApps has quit [Remote host closed the connection]
xenos1984 has quit [Quit: Leaving.]
freakazoid343 has quit [Read error: Connection reset by peer]
dormito has quit [Ping timeout: 265 seconds]
sonny has quit [Ping timeout: 264 seconds]
sonny has joined #osdev
k0valski18 has joined #osdev
freakazoid343 has joined #osdev
sonny has quit [Quit: Going offline, see ya! (www.adiirc.com)]
Irvise_ has quit [K-Lined]
junon has quit [K-Lined]
chibill[m] has quit [K-Lined]
paulusASol has quit [K-Lined]
someonejv[m] has quit [K-Lined]
happy-dude has quit [K-Lined]
novasharper has quit [K-Lined]
asmwfi[m] has quit [K-Lined]
dormito has joined #osdev
dude12312414 has joined #osdev
clever has quit [Ping timeout: 264 seconds]
happy-dude has joined #osdev
seds has quit [Ping timeout: 265 seconds]
mxshift has quit [Ping timeout: 240 seconds]
Benjojo has quit [Ping timeout: 268 seconds]
nohit has quit [Ping timeout: 265 seconds]
CryptoDavid has quit [Ping timeout: 256 seconds]
paulbarker has quit [Read error: Connection reset by peer]
kazinsal has quit [Read error: Connection reset by peer]
geist has quit [Read error: Connection reset by peer]
seds has joined #osdev
Benjojo has joined #osdev
mxshift has joined #osdev
CryptoDavid has joined #osdev
kazinsal has joined #osdev
paulbarker has joined #osdev
nohit has joined #osdev
geist has joined #osdev
novasharper has joined #osdev
Irvise_ has joined #osdev
someonejv[m] has joined #osdev
paulusASol has joined #osdev
junon has joined #osdev
asmwfi[m] has joined #osdev
<zid> ah you got un-isekai'd
CryptoDavid has quit [Client Quit]
clever has joined #osdev
happy-dude has quit [Quit: Client limit exceeded: 20000]
novasharper has quit [Quit: Client limit exceeded: 20000]
[itchyjunk] has quit [Remote host closed the connection]
asmwfi[m] has quit [Quit: Client limit exceeded: 20000]
srjek has joined #osdev
Qubasa has quit [Remote host closed the connection]
the_lanetly_052 has quit [Ping timeout: 268 seconds]
mahmutov has joined #osdev
Qubasa has joined #osdev
mctpyt has quit [Ping timeout: 265 seconds]
tomaw has quit [Quit: Quitting]
tomaw has joined #osdev
darkstardevx has joined #osdev
darkstardev13 has quit [Ping timeout: 264 seconds]
Burgundy has quit [Ping timeout: 265 seconds]
srjek has quit [Ping timeout: 264 seconds]
X-Scale has quit [Ping timeout: 264 seconds]
X-Scale has joined #osdev
chibill[m] has joined #osdev
mimmy has joined #osdev
heat has joined #osdev
mimmy_ has joined #osdev
<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
happy-dude has joined #osdev
novasharper has joined #osdev
asmwfi[m] has joined #osdev
mimmy has quit [Ping timeout: 260 seconds]
<GeDaMo> Regular pinging / connecting to services?
<heat> context: this is for a network engineer internship
<heat> I don't believe they're trying to test my borgmon knowledge lol but ping seems too simplistic?
<zid> Installing a disgusting monitoring package
<eryjus> Try IPMI
<GeDaMo> Maybe ask in #networking ?
<heat> maybe
<heat> i'm busy studying up on bgp now though
Burgundy has joined #osdev
freakazoid343 has quit [Ping timeout: 250 seconds]
cooligans has joined #osdev
<cooligans> does anyone use emacs as a editor?
<jjuran> it has a few users, I think
<jjuran> What's your real question?
<heat> I use visual studio express 2008 for my osdeving
<cooligans> jjuran: that was my real question
<cooligans> heat: how is that possible???
<cooligans> vs 2008 is notoriously bad
<heat> everything is possible
<moon-child> cooligans: yes, lots of people use emacs as an editor
<cooligans> vs 2017 isn't too bad tho
<heat> vs 2008 express is peak IDE
<cooligans> since it has a cmake integration
<cooligans> heat: is it a NT-Style OS by any chance
<heat> i'm fairly sure VS2019 caused covid
<cooligans> lol
<heat> vs 2008 <-- very far from covid; vs 2019 <---- not very far
<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
<heat> moon-child, vscode is neat
<jjuran> I use CodeWarrior Pro 6, released in 2000, which is even further from covid!
<moon-child> vscode is completely uninteresting to me
<cooligans> emacs + evil (vim bindings) is the best
<jjuran> Not as an editor, though
<cooligans> I used to use vim until I stumbled upon this legendary combo
<cooligans> jjuran: why?
<cooligans> is it too bloaty
<dzwdz> i've tried to like emacs, but its defaults are so garbage
<dzwdz> configuring it to work like a normal editor is too much of a pain
<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
<cooligans> thats why you use a distro of some sorts
<jjuran> cooligans: For targeting classic Mac OS.
<moon-child> vscode for c just wraps clangd. Which I have _not_ had particularly good experiences with
<cooligans> the defaults are boring
<dzwdz> vim just works though
<cooligans> true, true
<cooligans> but its so convinent to use emacs
<dzwdz> also i don't really want to install a giant mass of random plugins
<cooligans> I am writing code alongside irc
<dzwdz> org mode is great through
<dzwdz> s/thr/th
<heat> moon-child, clangd works fine for me
<heat> never had an issue
<cooligans> ERC (Emacs IRC client)
<cooligans> is what I use
<cooligans> i used to use irssi
<dzwdz> i've tried erc, it's kinda neat
<dzwdz> same with eww
<cooligans> yeah
<dzwdz> i definitely get the appeal of emacs, it's just not my thing
<cooligans> I like it because I can use vim-keybindings with irc
<cooligans> dzwdz: I use clion when I am not using emacs
* dzwdz has never used it
<dzwdz> intellij is pretty damn good, so i assume clion is too
<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
<Ermine> vscode python plugin is garbage
<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
<klange> finish your own editor~
<dzwdz> o, higher-order text editor?
<dzwdz> that sounds interesting, any details?
<Ermine> Did someone try xi?
<cooligans> jetbrains font tho
<moon-child> dzwdz: you know like 'dw' in vi?
<cooligans> is bomb
<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
<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
<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'
<Ermine> Using vim is pain when you have to change your keyboard layout, since vim only understand commands typed with english layout
<j`ey> you can remap everything of course
<moon-child> yeah, I think people have done vim keymaps that keep everything in the same place for dvorak
<dzwdz> moon-child: that indeed is interesting
<dzwdz> do you have the current source up somewhere?
<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
<bslsk05> ​moon-chilled/v - text editor with higher-order functions (0 forks/0 stargazers/NOASSERTION)
<dzwdz> those are some... interesting directory names
<klange> the best thing you can do to for your editor is use it constantly
<dzwdz> what i'd love is a modern ed-style editor
<dzwdz> not as an editor to use long-term, but as an editor to experiment with new ways to edit code
<moon-child> apparently ed is actually surprisingly powerful. (Can't speak to it myself)
<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
<moon-child> klange: first I need to teach it to scroll!
<klange> virtually anything you can do in vi you can do in ed
<dzwdz> line mode stuff is underrated
<klange> ed is just vi with a blindfold
<dzwdz> i've made a lil line mode mail client recently
<moon-child> (also, I don't _entirely_ trust it to not kill my data. But I guess that's what vcs is for)
<dzwdz> and it's very pleasant to use, actually
<klange> moon-child: one of the reasons to use it, you'll find those issues quickly and be highly incentivized to fix them ;)
<dzwdz> instead of reimplementing scrolling in a shitty way like all TUI apps, it just dumps the entire email to the terminal at once
<dzwdz> and you just use scrollback
<dzwdz> it's barely 200 loc and it's already my preferred client for reading email
<j`ey> dzwdz: what about sending?
<dzwdz> haven't implemented that yet
<jjuran> For email-sized documents, that makes sense
<klange> wow I haven't tagged a release of my editor in a year...
<klange> back in January I pretty much rewrote the thing and I've been dragging it along as 2.99.x ever since...
cooligans has quit [Remote host closed the connection]
<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
<heat> yay I passed
<jjuran> You resisted the temptation of the One Ring? Nice :-)
vdamewood has joined #osdev
<sham1> One rng
GeDaMo has quit [Remote host closed the connection]
Burgundy has quit [Ping timeout: 256 seconds]
dormito has quit [Quit: WeeChat 3.3]
MiraCat has joined #osdev
<MiraCat> Any recommended books to beyond hello world in the bootloader?
nvmd has joined #osdev
Oli has joined #osdev
<MiraCat> How much assembly would I need anyways? I prefer C.
<klange> I recommend not reading books, they have this terrible bug where you can't update them after release.
<vdamewood> klange: It's called a pencil.
<klange> They banned me from the library when I tried that.
<vdamewood> You think that's bad... they banned me from the bookstore.
<MiraCat> It seems that pure C isn't possible, I'll have to use a tiny bit of assembly to interact with the BIOS.
<vdamewood> Apparently, trying to share your knife with everyone is not considered polite.
<j`ey> MiraCat: what about UEFI?
particleflux_ is now known as particleflux
<MiraCat> What about UEFI?
<moon-child> uefi is a c api
<vdamewood> UEFI is designed to load a C program.
<moon-child> (that said you will still need some assembly)
qookie has joined #osdev
<vdamewood> Yeah, but at least with UEIF your entry point can be C.
<vdamewood> UEFI
<MiraCat> Does the VM truly matter? As in, does it matter if using qemu or bochs or whatever?
<j`ey> it shouldnt!
<vdamewood> Well, matter how?
<moon-child> some hardware may only be emulated by one vm
<vdamewood> They all virtualize different hardware of course.
<moon-child> some vms may have bugs others don't
<moon-child> some vms may have better (or different) debugging tools than others
<moon-child> some may be faster or slower than others
<klange> test in everything you have access to
<vdamewood> I think Qemu needs a separate component for UEFI firmware if you use UEFI.
<klange> Not to any more degree than it needs one for BIOS.
<clever> moon-child: and different software has different ISA's and modes it can do
<clever> i think bochs is x86 only?
<j`ey> yes
<klange> If your QEMU didn't come with an OVFM build, blame your local package maintainer.
<klange> clever: hey it also does x86-64!
<clever> qemu is both a vm (when using /dev/kvm) and an emulator, so it can target a different ISA entirely
<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?
<vdamewood> Can Qemu do that on aarch64 to virtualize aarch64 systems?
<klange> vdamewood: yes
<clever> vdamewood: qemu can use kvm on aarch64 to do properly hw accelerated VM's
<vdamewood> MiraCat: There really isn't a set process.
<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).
<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
<MiraCat> I might experiment with making my own bootloader at one point.
<clever> vdamewood: how did all of the himem stuff work in dos?
<klange> I highly recommend not spending too much time early on thinking about bootloaders.
<klange> clever: magic
<clever> lol
<bslsk05> ​david942j.blogspot.com: Play With Capture The Flag: [Note] Learning KVM - implement your own kernel
<vdamewood> clever: The individual programs would call into and stuff like that, I think.
<clever> this blog post is also a great read, if you want to learn how kvm actually works
<vdamewood> call into it
<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
<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?
<clever> the only thing that varies, is the struct describing the cpu registers, and what ISA you run inside
<klange> some stuff is still more easily done in assembly, like interrupt entrypoints
<clever> i think kvm doesnt even define a reset vector, the kvm based app must just initialize PC with something
<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.
<vdamewood> Even Linux has inline assembly here and there.
<j`ey> MiraCat: you have to use asm in an OS too
<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.
<vdamewood> s/able o/able to/
<vdamewood> functions for the in and out instructions are pretty common.
<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.
<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.
<klange> It'll be less than 5%.
<wleslie> not much of the inline assembly is for performance reasons, it's mostly because of wacky stack requirements
<clever> vdamewood: what ive been doing lately, is writing static inline functions for a single opcode
<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.
<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
<wleslie> e.g. oh, you took an interrupt? did that push a value on to the stack? lets find out!
<vdamewood> clever: That's pretty much what I do for in and out.
<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.
<klange> That's 3% of the total source lines.
<vdamewood> Damn I need to learn aarch64 already.
<klange> same
<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.
<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.
<MiraCat> I could even make a frankenOS to where I pick what elements I want from XYZ OS and just make it.
<klange> good luck
mahmutov has quit [Ping timeout: 268 seconds]
<j`ey> MiraCat: if you have ten years to spare
<MiraCat> This is a hobbyist thing, so it won't be as huge as windows or TempleOS.
gog has quit [Quit: byee]
<vdamewood> That's what Linus said.
<j`ey> heh
gog has joined #osdev
<sham1> Nothing serious, like GNU
<MiraCat> Well I don't intend to make this a full time gig. Just a fun thing in my spare time.
<klange> ``probably never will support anything other than AT-harddisks, as that's all I have :-(''
<j`ey> but dont expect anything like xlib for a while
<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.
<klange> "Simply, I'd say that porting is impossible."
<vdamewood> Didn't he say something to the effect that it was for the 386 and it will probably stay on the 386?
<klange> https://www.cs.cmu.edu/~awb/linux.history.html just read the whole lot of 'em yourself
<bslsk05> ​www.cs.cmu.edu: LINUX's History by Linus Torvalds
nvmd has quit [Quit: Later, nerds.]
nvmd has joined #osdev
<vdamewood> "It is NOT protable (uses 386 task switching etc)..."
xenos1984 has joined #osdev
<sham1> Oh how things have changed
<vdamewood> Yeah, I think the only thing more portable than Linux is NetBSD.
<klange> Quite amusing how Linux went from that to Linus's thesis literally being about portability.
<vdamewood> There are just one or two models of toaster that only NetBSD supports.
<sham1> NetBSD with dead badgers when
<MiraCat> It seems that the boot sector is very tiny, is that all there is when you first power the computer on?
dormito has joined #osdev
<vdamewood> In BIOS mode, yep.
<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.
<MiraCat> I'll probably be writing entirely in assembly at first and then rewriting stuff in C.
mimmy_ has quit [Quit: WeeChat 3.3]
<vdamewood> I'll be porting my code to UEFI when I care about it again.
<moon-child> 'when I care about it again' I feel that, strongly
<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.
<vdamewood> Also, about 90% of the annoying assembly code is in the bootloader.
<heat> MiraCat, no it's not there
<heat> the computer reads a single sector from the hard drive but it's not "there"
<heat> nothing is "there" really, even your bios needs to be read in
<heat> (although not by the CPU)
<klange> that's a newfangled thing, ain't it? used to be some bits of the ROM really were directly mapped?
<heat> I believe the chipset kind of maps the firmware region and translates it into SPI flash accesses
<heat> i'm not 100% sure though
MiraCat has quit [Quit: Leaving]
<heat> it can't be in RAM because there's no RAM online
<heat> so you execute in place with CAR, then you bring the RAM online and shadow everything to RAM (including your little heap)
<klange> BIOSes in PCs have evolved over time, from true mask ROMs, to EPROMs, to EEPROMs, to flash.
<Affliction> on some platforms, a state machine loads the flash into DRAM
<Affliction> of course, on PCs, you don't even have DRAM coming out of reset, so
<Affliction> well, modern PCs
<Affliction> And, as I've learned with how BIOSes evolved early on in AM4, configuring the memory controller is apparantly non-trivial
<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
<heat> (reads in)
<heat> "*
<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
<heat> since the firmware has lots of different regions (like the ME and the firmware volumes)
<heat> clever: that's DMI
<Affliction> I think modern AMD starts with the PSP (an ARM core on the CPU die next to the x86 cores)
<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)
<Affliction> I assume the flash is connected directly to the CPU, since some AM4 platforms don't have a southbridge at all
<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
<heat> amd with ps vita when?
<Affliction> Kind of an approximation of my initial "state machine loads the flash" comment, that state machine just happens to be turing complete
<clever> heat: platform security processor, i think
<Affliction> yeah
<heat> i know, it was a joke
<heat> ba dum tss
<clever> i knew :P
<Affliction> But the PSP is ARM itself, so... anyone hacked the PSP to run the CPU core of a PSP emulator? :V
<clever> Affliction: i think it requires signed code, which makes it harder
<heat> have the security processors even been cracked?
<Affliction> yeah
<Affliction> some TPMs have been
<heat> i think you can only disable stuff
<heat> not outright run skyrim
<heat> skyrim intel ME edition sounds neat though
<Affliction> while running windows ME on the x86 cores? :D
<Affliction> well, maybe someone will find some element of turing completeness on the interface exposed by the PSP or ME
<Affliction> Just like the x86 mov instruction, and exception handling
<Affliction> But yeah, even my 3950X had some slight issues early on - it wouldn't POST consistantly when cold.
<heat> how cold?
<Affliction> ~5-15C
<Affliction> now, I completelly empathise :)
<Affliction> But, a later BIOS fixed that right up
<heat> spending 800 euro on a CPU just so it doesn't post sounds great!
<clever> Affliction: my motherboard has a dedicated LN2 switch, to fix that
<Affliction> I think it was something to do with the memory controller
<Affliction> I guess its memory training process couldn't figure out good timings while cold
<Affliction> or, something like that
nanovad has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
<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
nanovad has joined #osdev
<heat> hey that's pretty cool
<heat> i've never gotten my ps2 driver to work on one of my laptops either
<heat> dunno if it's my fault or my ps2 detection's fault
<klange> Mine's working on my ThinkPad, but that legitimately is PS/2
dormito has quit [Ping timeout: 256 seconds]
dormito has joined #osdev
srjek has joined #osdev
<heat> this laptop definitely has PS/2, not sure about the other one
[itchyjunk] has joined #osdev
nvmd has quit [Quit: Later, nerds.]
nvmd has joined #osdev
PyR3X has quit [Quit: ZNC - https://znc.in]
PyR3X has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
c2a1 has joined #osdev