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
wootehfoot has joined #osdev
wootehfoot has quit [Read error: Connection reset by peer]
nvmd has quit [Quit: Later, nerds.]
sdfgsdfg has joined #osdev
givemeyourpies has quit [Remote host closed the connection]
rustyy has quit [Quit: leaving]
rustyy has joined #osdev
freakazoid12345 has quit [Read error: Connection reset by peer]
ElectronApps has joined #osdev
exec64 has joined #osdev
gog has quit [Ping timeout: 256 seconds]
CaCode_ has joined #osdev
CaCode- has joined #osdev
CaCode has quit [Ping timeout: 256 seconds]
CaCode_ has quit [Ping timeout: 256 seconds]
<heat> https://gist.github.com/heatd/17e365644a7ad9adf1a6d8d636704531 <-- llvm got really mad looking at the infinite loop
<bslsk05> ​gist.github.com: gist:17e365644a7ad9adf1a6d8d636704531 · GitHub
<heat> first time seeing this in action
freakazoid12345 has joined #osdev
isaacwoods has quit [Quit: WeeChat 3.3]
Oli has quit [Quit: leaving]
Matt|home has quit [Ping timeout: 265 seconds]
[_] has joined #osdev
[itchyjunk] has quit [Ping timeout: 256 seconds]
<rustyy> so, i continue to reverse vmware library with ida pro, i am making some progress =) as i read decompiled code i keep naming variables and functions so that it becomes easier to navigate around. is this how people usually do it?
<kazinsal> yep
<kazinsal> whatcha reversing?
<rustyy> kazinsal: vmware authd
<rustyy> daemon
<kazinsal> ah, trying to find a bug?
<rustyy> kazinsal: that particular svc is a gateway to many other services, including disklib api, i want to understand the protocol, it is not really documented anywhere
<rustyy> and then i want to implement an open source version library for it
<kazinsal> yeah, I've never done an internals dive into the more frontend bits of ESXi
ad__ is now known as kernelspace
<rustyy> kazinsal: it is not complicated but it is a bit weird i must say
sdfgsdfg has quit [Quit: ZzzZ]
<kazinsal> consider grabbing a few of these to run through IDA or nm or something, a bunch of them are kind of like public alpha test things and still have dwarf information and import/export symbols in them: https://flings.vmware.com/flings
<bslsk05> ​flings.vmware.com: Flings | VMware Flings
<rustyy> thanks!
xing_song has joined #osdev
[_] has quit [Remote host closed the connection]
ravan has quit [Quit: Leaving]
xing_song has quit [Quit: xing_song]
xing_song has joined #osdev
<heat> does anyone know how to install grub on a disk image?
<heat> not an iso, a regular disk image
<heat> without root is the important bit
<kazinsal> programmatically, without root? I actually don't know
<kazinsal> interactively, boot a grub ISO, get into the grub command line, root (hd0,0) or whatever the appropriate filesystem is
<kazinsal> then setup (hd0) or whatever the appropriate device is
<Belxjander> heat: so you basically want the beginning of the image to be the grub initial boot loader?
<kazinsal> though that might just be a Legacy thing, idk
<heat> Belxjander, I want to install grub
<heat> on the disk image
<Belxjander> heat: do you have grub installed to an MBR or partition ?
<heat> and it's for a script I'm writing that automates creating a disk image of my OS
<Belxjander> as the diskimage is equal to the content of a partition afaik
<Belxjander> MBR includes partition table
<heat> I have grub installed but I don't see how that matters
<heat> i want to do this rootless
<Belxjander> partition formatting would be whatever the filesystem requires and a bootloader header no?
<heat> like grub-install but to a file
<heat> i have partition formatting down
<Belxjander> heat: how about using grub install with the file as destination?
<heat> it doesn't work
<heat> it only wants block devices
<clever> there are ~3 steps to installing grub into a block device
<Belxjander> clever: which is not the actual operation wanted ;)
<klange> Grab a small Linux live ISO. Boot it in QEMU with your image attached as a secondary disk. You now have a block device and root.
<clever> Belxjander: or disk image
<clever> -rw-r--r-- 1 root root 26K Aug 9 2019 /boot/grub/i386-pc/core.img
<clever> -rw-r--r-- 1 root root 5.9K Aug 9 2019 /boot/grub/i386-pc/ext2.mod
<heat> klange: that beats the point of "build script" ;)
<clever> first, core.img, and all modules related to mounting /boot are linked together in some fashion, and written to an unused part of the disk (usually the sector just after the MBR), along with a fragment of grub config (saying which grub.conf to open)
<klange> Okay, get a _really small_ Linux live ISO, base64 it, and include it in the script ;)
<clever> -rw-r--r-- 1 root root 512 Aug 9 2019 /boot/grub/i386-pc/boot.img
<kazinsal> mount the image with fuse maybe?
<clever> then boot.img gets merged into the MBR, while preserving the MBR itself, and updating the pointer to the 1st part
<moon-child> klange: sounds like gog install scripts
<moon-child> actually i think they include straight gzip in the file after some sentinel, no base64. And then tail themselves into zcat or some such
<clever> my @command = ("$grub/sbin/grub-install", "--recheck", "--root-directory=$tmpDir", Cwd::abs_path($dev), @extraGrubInstallArgs);
<clever> nixos does all of those with this command
<kazinsal> as per usual no one who actually develops the tools that we use regularly have no idea what we actually need to do with them
<heat> https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/boot/grub2/Makefile#l147
<bslsk05> ​git.openwrt.org: git.openwrt.org Git - openwrt/openwrt.git/blob - package/boot/grub2/Makefile
<heat> looks promising?
<clever> ah, yeah, that does sound like a good starting point
<heat> the efi one looks dead simple
<heat> just create a fat32 partition and copy it in
<clever> yeah, efi is far far simpler
<clever> brb
<clever> > The program 'grub-install' generates a GRUB core image using 'grub-mkimage' and installs it on your system. You must specify the device name on which you want to install GRUB, like this:
<clever> heat: i think mkimage is just for merging the core.img and ext2.mod together, but not actually embedding it into a disk
<clever> [nix-shell:/tmp]$ grub-install ./test.img --boot-directory=/tmp/boot/
<clever> Installing for i386-pc platform.
<clever> grub-install: error: failed to get canonical path of `/dev/nvme-eui.0000000001000000e4d25cd9a9984d01-part1'.
bradd has quit [Ping timeout: 250 seconds]
<clever> heat: the error here, is that it cant figure out which block device it should be loading at boot time, so i have to specify that manually
srjek has quit [Ping timeout: 252 seconds]
<clever> aha, grub is being naughy, it knows /tmp/boot is on zfs, so it ran `zpool status` and is trying to track down the root block device
<klange> too smart for its own good
<clever> grub-install: error: failed to get canonical path of `tmpfs'.
<clever> if you used fuse to mount the .img file, then it would probably work a bit better
<moon-child> I would say, clever but not smart
<moon-child> if it were smart it would do what you tell it to and no more!
<clever> but lets operate on the assumption you cant mount anything
<klange> too clever for clever
<clever> the above error can come from either grub-install.c or grub-probe.c
<clever> -s, --skip-fs-probe do not probe for filesystems in DEVICE
<clever> that looks handy
<clever> but doesnt solve it
ElectronApps has quit [Remote host closed the connection]
<clever> aha, i was searching too narrow of a dir
<clever> grub-core/osdep/unix/getroot.c can also give the above error, right in grub_guess_root_devices()
<clever> i'm not seeing a clear answer in the code...
<clever> heat: have you considered just spinning up a qemu to run grub-install in?
<clever> it can be fully automated
<heat> no
<clever> that is how nixos does nearly all of its disk image things
<klange> That's what I said an hour ago!
<heat> there it is
<heat> I did it
ThinkT510 has quit [Quit: WeeChat 3.3]
ThinkT510 has joined #osdev
<heat> i think i found a bug in my ahci driver
<heat> i'm receiving grub's old irqs I think lol
Burgundy has joined #osdev
<geist> once i get my pci driver finished i wanna finally go back and write an ahci driver just to get it done. never actually writ one
bradd has joined #osdev
heat has quit [Ping timeout: 252 seconds]
the_lanetly_052 has joined #osdev
<bradd> forum.osdev.org broken?
<kazinsal> yep
<bradd> :(
<kazinsal> we are currently acquiring the reagents used to cast Summon Chase (ninth-level)
mahmutov has joined #osdev
ElectronApps has joined #osdev
the_lanetly_052 has quit [Remote host closed the connection]
Oshawott has joined #osdev
archenoth has quit [Ping timeout: 256 seconds]
the_lanetly_052 has joined #osdev
wootehfoot has joined #osdev
CaCode_ has joined #osdev
CaCode- has quit [Ping timeout: 256 seconds]
elastic_dog has quit [Ping timeout: 268 seconds]
elastic_dog has joined #osdev
<sortie> We should probably set up some osdev foundation communication org that can own the domain
<sortie> We got enough reliable skilled always-around people in here that it's completely insane we're relying on some unreachable rando for our infra
<moon-child> why ‘our’?
<moon-child> really, it is the unreachable rando’s infra on which we hang out
<kazinsal> probably a good idea yeah
<kazinsal> lots of computer janitors around the regulars
<klange> moon-child: for one, look at the mod list when the forum comes back
<klange> and two, se what I said a few weeks ago
<moon-child> what did you say a few weeks ago?
<zid> okay advent of code part 2 took me 2 mins today, rather than the hour it took yesterday :p
<klange> It's not that chase is a hostile party... he's just not good at what he's responsible for doing.
GeDaMo has joined #osdev
<zid> it'd be fine if he were here ever
<junon> I've said it a few times now but if someone needs to take over hosting I can do it, even if it's temporarily.
<junon> Happy to help however I can.
<zid> did you look at my stupid trie yet? :P
<junon> No I've had a cruddy morning
<junon> link again though?
<bslsk05> ​gist.github.com: daytrie.c · GitHub
<zid> (I just really enjoy the filename)
<junon> I refuse to look at this, braces should be on the same line
<junon> (jk)
[itchyjunk] has joined #osdev
<j`ey> does anyone here actually use the forums?
<junon> This looks nice
<zid> sometimes it comes up when you google for things
<junon> Clear implementation
<moon-child> j`ey: at some point I stopped--too much of a mess
<zid> well yea, I know how to write C, it's the one thing I can do :p
<junon> j`ey I've lurked for years but have never signe dup.
<moon-child> and bad stn ratio
<junon> Yeah that is also true
<junon> Too much content that is low quality but not enough content to warrant strict moderation
<junon> IMO
<zid> You know it's good when it has lines like t = &(*t)->left;
<junon> whenever a pointer-pointer is warranted I get a little giddy
<moon-child> zid: recently I wrote this: desc++->t = type
<junon> I think a few times in my life I needed a ***
<zid> moon-child: Thanks I hate it
<moon-child> :)
<junon> and there was once where a **** was warranted (legitimately). But it was the only time.
<moon-child> junon: I want to hear about this
<zid> I *have* a lot of ****** you just never see it
<moon-child> zid: I use --> sometimes too
<zid> because it's a bunch of nested structs
<zid> with an array at the end
<junon> moon-child: I forget what exactly lead to it but it had something to do with an efficient CLI parser if memory serves.
<zid> so you only ever see like f(struct foo *f){ g(f->b); } g(struct boo *b){ h(b->c); } ...
<zid> where each one deals with its layer and passes it deeper a pointer removed
<zid> nobody ever does f->b->c->d->e[3].a[8]
<moon-child> junon: 'efficient' and 'deeply nested pointers' do _not_ go together
<junon> Oh no it wasn't the CLI parser, that was just ***
<moon-child> >_<
<bslsk05> ​github.com: xopt/xopt.c at master · Qix-/xopt · GitHub
<junon> This was years ago though, don't judge if you see something weird.
* junon will brb
<moon-child> but yea I do the same thing in my cli parser. Basically: int *argc, char ***argv
<moon-child> i think that's p sensible
<zid> For clarity I might end up doing struct args { int argc; char **argv; }; there
<zid> drops a pointer out of a lot of expressions
<moon-child> fair enough
the_lanetly_052_ has joined #osdev
the_lanetly_052 has quit [Ping timeout: 252 seconds]
CaCode- has joined #osdev
CaCode_ has quit [Ping timeout: 256 seconds]
* kingoffrance crossees finger hoping its a qix game
<kingoffrance> &crosses fingers
pretty_dumm_guy has joined #osdev
CaCode- has quit [Quit: Leaving]
mahmutov has quit [Ping timeout: 256 seconds]
zaquest has quit [Remote host closed the connection]
zaquest has joined #osdev
[itchyjunk] has quit [Read error: Connection reset by peer]
immibis_ is now known as immibis
<immibis> indeed, this layering stuff is something to be unlearned: may be fine when development time is your main concern, but for execution time the computer really wants you to cut through all the layers
<immibis> of course the best of both worlds is a compiler that accepts code written with layers and automatically inlines them all
<immibis> then you end up with C++'s compile times :P
<j`ey> z e r o c o s t a b s t r a c t i o n s
<immibis> fun fact, i learned that even std::unique_ptr has a cost, because the ABI for passing a struct containing just a pointer is different from the ABI for passing a pointer
<immibis> at least on some platforms
<immibis> like the caller has to allocate space and pass a pointer to the space
<j`ey> Hmm I think rust's Box might get around that
<immibis> and that reminds me that ABI based on common conventions between the caller and the callee is kinda stupid - how it should work is that the callee's compiler picks the most efficient ABI and writes it into the file you import (whatever format that file has in your language)
<zid> That's called LTO
<zid> and we already do it
<zid> LTO also gets rid of all the 'layers'
<Mutabah> rust has an annotation that makes some types be just compile-time abstractions (`#[repr(transparent)]`) which is how it gets around that
<j`ey> Mutabah: box is confusing with the allocator now..
<Mutabah> Hmm.. yeah, point there
<Mutabah> I think it still works? Just gets traslated to to arguments
Oli has joined #osdev
sdfgsdfg has joined #osdev
<HeTo> it's not because std::unique_ptr is a struct that it gets a different ABI than just a pointer, it's because it's a struct with a destructor
<HeTo> and maybe having a non-trivial move constructor also affects it
<HeTo> but anyway, template <typename T> struct ptr { T* p; }; would have the same ABI on the Itanium C++ ABI (used by GCC everywhere) as T* AFAIK
<j`ey> geist: trying to convert my code to gicv3 from gicv2
ElectronApps has quit [Remote host closed the connection]
isaacwoods has joined #osdev
Matt|home has joined #osdev
xing_song has quit [Read error: Connection reset by peer]
xing_song has joined #osdev
bauen1 has joined #osdev
isaacwoods has quit [Quit: WeeChat 3.3]
srjek has joined #osdev
dennis95 has joined #osdev
sdfgsdfg has quit [Quit: ZzzZ]
mahmutov has joined #osdev
Oli has quit [Quit: leaving]
[itchyjunk] has joined #osdev
dude12312414 has joined #osdev
dude12312414 has quit [Client Quit]
<geist> j`ey: it's enough of a difference you probably want to fork it and have two drivers
ss4 has joined #osdev
Mikaku has quit [Quit: server maintenance ...]
Mikaku has joined #osdev
xing_song has quit [Read error: Connection reset by peer]
the_lanetly_052_ has quit [Ping timeout: 256 seconds]
xing_song has joined #osdev
_xor has quit [Read error: Connection reset by peer]
_xor has joined #osdev
mavhq has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
mavhq has joined #osdev
dennis95 has quit [Quit: Leaving]
Oli has joined #osdev
Bonstra has quit [Quit: Pouf c'est tout !]
Bonstra has joined #osdev
<j`ey> geist: I mean my gicv2 code was just like 20 LOC to poke as minimal stuff as possible, not enough to call a driver :D
<j`ey> didnt manage to get interrupts out of v3c yet
Oli has quit [Quit: leaving]
<geist> ah
Oli has joined #osdev
<j`ey> I just found some random code here https://github.com/aohzju/gicDemo/blob/master/gicv3.c trying to get that working first before reading the spec
<bslsk05> ​github.com: gicDemo/gicv3.c at master · aohzju/gicDemo · GitHub
<zid> huzzah, google fixed my google account at last
dude12312414 has joined #osdev
<Oli> Congratulations for having your Google account fixed, zid!
<bslsk05> ​github.com: 4.3.3 · debug-js/debug@043d3cd · GitHub
<j`ey> noe
<j`ey> *nope
<junon> weird
<Oli> No: That Github page displays fine to me: It features a file hinted to have one addition and deletion; its line number 3 changed from: "version": "4.3.2", to: "version: "4.3.3",
<Oli> The aforementioned file, has a name of: package.json
dutch has quit [Quit: WeeChat 3.3]
Alpha2023 has joined #osdev
dutch has joined #osdev
freakazoid343 has joined #osdev
freakazoid12345 has quit [Ping timeout: 252 seconds]
<Alpha2023> I saw it brought up in the logs this morning that osdev.org was down. I dropped in to see if anyone knew anything more. Also, hi!
<sortie> 'ello
<sortie> I haven't seem any more chatter on that topic :) Hope it gets back up soon
<Alpha2023> For the record since I haven't seen it yet: the root domain is responding, but the forum and now the wiki both seem to be offline (I saw the forum being down in log but no one mentioned the wiki afaik)
<sortie> Ah that's new, wiki was working earlier
<Alpha2023> Which is weird because they both seem to be the same IP on linode...
thinkpol has quit [Remote host closed the connection]
<Alpha2023> Oh wait, root is now down, I must have had the redirect in cache
<junon> There's a corrupt DB table
<junon> I don't think it has anything to do with the routing
thinkpol has joined #osdev
Alpha2023 has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
DeepComa has joined #osdev
DeepComa has quit [Ping timeout: 252 seconds]
j00ru_ has joined #osdev
bradd has quit [Read error: Connection reset by peer]
smeso has quit [Ping timeout: 256 seconds]
j00ru has quit [Ping timeout: 256 seconds]
bradd has joined #osdev
smeso has joined #osdev
gxt has quit [Remote host closed the connection]
gxt has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
GeDaMo has quit [Remote host closed the connection]
heat has joined #osdev
pretty_dumm_guy has quit [Quit: WeeChat 3.3]
<bslsk05> ​developer.arm.com: Documentation – Arm Developer
heat has quit [Remote host closed the connection]
<LambdaComplex> junon: so was the web server taken offline as a result?
<junon> The forums originally just errored with a MySQL-related error but now the entire site appears to be down.
<LambdaComplex> to be clear, i'm unable to open a TCP connection to ports 80 and 443 of the IP address that wiki.osdev.org resolves to
<zid> maybe, but yesterday it was just returning yabb messages that the db was broken or whatever
MarchHare has joined #osdev
<kazinsal> yeah, it's gotten worse, we don't know why, and we don't have infra access
<kazinsal> I'm more and more on board with sortie's "osdev foundation" idea every day
sdfgsdfg has joined #osdev
<klange> I have sent Yet Another Email.
<zid> yae!
<junon> Interested in the osdev foundation :D
<klange> Just as long as we don't seel the name "osdev" to some Korean prince to run a conference...
freakazoid343 has left #osdev [Leaving]
mahmutov has quit [Ping timeout: 252 seconds]
ss4 has quit [Quit: Leaving]
<kazinsal> actually, there's a good question in there -- are we registered as project/organized community with libera?
dutch has quit [Quit: WeeChat 3.3]
<klange> Yes. Based on our authority as the moderation team for the forum, we made the Libera registration a joint thing between "osdev.org" and "the former #osdev on The Other Place".
<kazinsal> awesome
<klange> Mostly because it got annoying picking words to discuss 'the forum' without implying an association, so now there is one.
dutch has joined #osdev
<klys_> is there a backup?
<GreaseMonkey> looking at some stuff on how to program the S3 Trio64 and the S3 ViRGE, the former as used in DOSBox-X seems to be incomplete in its emulation pertaining to rendering of polygons and the debug log complains about unhandled XGA commands... is there a reasonable reference on how to program the XGA?
<klange> Not my knowledge, but again, chase is not a hostile actor, just really shit at doing his job.
<kazinsal> yeah, dude just hasn't been in the osdev game for years at this point but also hasn't given anyone else the keys
<klange> If we can get direct server access, we have a laundry list of things I think we should do. Upgrade phpBB, for one...
<kazinsal> some of the people with mod powers haven't posted in a decade
<kazinsal> kinda weird they're still in the list
<klange> I can tell you from the moderator logs a good number of them are still visiting and occasionally rejecting spam in the queue.
<klange> And really I'm more into it for the Wiki.
<klys_> I have a wiki on a server except it's getting spammed to heck
<klange> And the forum is how you register to edit the wiki, ergo the forum still matters.
<GreaseMonkey> ...XGA is probably a red herring here, found vgadoc4b.zip and it appears to be programmed completely differently from a Trio64
<GreaseMonkey> but of course, DOSBox just calls the damn thing "XGA" in its debug log and -X continues that tradition
<klys_> afaik, XGA is 1024x768
<GreaseMonkey> i'm talking about the hardware, not the resolution name that makes searching for docs on the hardware nigh impossible
<klys_> and it's an IBM standard, though I'm unaware what was standardized aside from that resolution
<GreaseMonkey> i mean both XGA and Trio have bitblt acceleration but they appear to be implemented quite differently from each other
<klange> bitblt is overrated
<klys_> bit blit and polygon?