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
Gooberpatrol66 has joined #osdev
gsekulski has left #osdev [#osdev]
netbsduser has quit [Ping timeout: 260 seconds]
navi has quit [Ping timeout: 264 seconds]
Arthuria has quit [Ping timeout: 260 seconds]
vdamewood has joined #osdev
gog has quit [Quit: byee]
Matt|home has joined #osdev
Apollyon has joined #osdev
oldgalileo has quit [Ping timeout: 240 seconds]
oldgalileo has joined #osdev
oldgalileo has quit [Ping timeout: 264 seconds]
edr has quit [Quit: Leaving]
mavhq has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
mavhq has joined #osdev
agent314 has quit [Ping timeout: 240 seconds]
agent314 has joined #osdev
oldgalileo has joined #osdev
Apollyon has quit [Remote host closed the connection]
oldgalileo has quit [Ping timeout: 260 seconds]
Arthuria has joined #osdev
smeso has quit [Quit: smeso]
smeso has joined #osdev
srjek has quit [Ping timeout: 252 seconds]
Arthuria has quit [Ping timeout: 268 seconds]
node1 has joined #osdev
agent314 has quit [Ping timeout: 264 seconds]
agent314 has joined #osdev
tjf has joined #osdev
goliath has joined #osdev
zetef has joined #osdev
node1 has quit [Quit: Client closed]
gbowne1 has quit [Read error: Connection reset by peer]
<ddevault> anyone happen to know offhand
<ddevault> if I'm using a linker script with OUTPUT_FORMAT(binary), can I export the DWARF symbols to a separate elf file while linking?
<ddevault> or do I need to link again
GeDaMo has joined #osdev
<Ermine> What is the license of meaty skeleton?
Vercas has joined #osdev
<zid`> ddevault: if you're doing that, just make a bastard elf with .dumpme : { everything you want as a binary }
<zid`> then that file is just a valid elf with debug symbols, then objcopy -j.dumpme -O binary has your firmware image
<Ermine> ddevault: what do you want to do with this binary?
<ddevault> Ermine: feed it to gdb
<zid`> I do this all the time for precisely this
<bslsk05> ​github.com: psx/link.ld at master · zid/psx · GitHub
<ddevault> cool
<ddevault> I think I can also just create an ELF file which is also multiboot compatible?
<ddevault> so long as the header is near the start of the file
<zid`> yea I do it to make a valid ps-exe here, rather than multiboot
netbsduser has joined #osdev
<zid`> but the principle is the same
<Ermine> Yes, you need to write multiboot header
<zid`> you can just multiboot a regular elf fine though
<zid`> no need to play tricks
<ddevault> yeah
<bslsk05> ​github.com: Onyx/kernel/arch/x86_64/boot.S at master · heatd/Onyx · GitHub
<bslsk05> ​github.com: bootstrap/boot/boot.asm at master · zid/bootstrap · GitHub
<ddevault> yeah that works fine
<ddevault> cheers
<zid`> `section .text.boot` -> .text : { * (.text.boot); * (.text); }
<zid`> so that it ends up first in the elf
<ddevault> yeah
<ddevault> this bootloader bug that I'm working on is incredibly annoying
<zid`> Maybe stop working on the bug and start working on the fix
<ddevault> thanks
warlock has quit [Ping timeout: 260 seconds]
Nixkernal has joined #osdev
bauen1_ has quit [Ping timeout: 252 seconds]
<geist> i second what zid says: link to elf and then use an objcopy step to flatten it to a binary
<geist> then you have the elf that you can use for debugging, disassemby, etc
<Ermine> Also some debugging probes understand elf and can flash elfs straight away
<geist> yep and most of the architectures that aren't x86 understand it with -kernel on qemu
<geist> you can just load your elf directly
<nikolar> Can't you do -kernel with x86 too
<zid`> no
<zid`> it tried to linux boot protocol and shit it
<zid`> tries*
<nikolar> Ah
<zid`> then multiboot, then gives up and complains about an OVH header or something
<geist> it's complicated, depends on 32 vs 64 and i forget the precise details
<geist> yeah
<zid`> because of the way the errors fall through
<geist> but on pretty much all the other arches, since there's no multiboot either either parse it as elf, or fall through an interpret as .bin and load it to some fixed address
<nikolar> So it should work with mulitboot no?
<nikolar> That's what ddevault needs anyway
<zid`> yea he just needs to multiboot it
<nikolar> Yeah good
<bslsk05> ​github.com: qemu/hw/i386/x86-common.c at 01782d6b294f95bcde334386f0aaac593cd28c0d · qemu/qemu · GitHub
<zid`> linux kernel, then multiboot, then PVH
<nikolar> What's pvh again
<zid`> no idea
<nikolar> Kek
<zid`> "the x86/HVM direct boot ABI."
zxrom has joined #osdev
<zid`> xen related?
masoudd has joined #osdev
<nikolar> Maybe
<nikolar> I was thinking elf related
<nikolar> Based on nothing
<zid`> I think it's the elf booting proto for starting xen instances
<geist> yeah like i said one of the two x86 arches supports ELF as the fallback, but i thik it's only 32bit iirc
<geist> and so less useful
<bslsk05> ​wiki.xenproject.org: Paravirtualization (PV) - Xen
<nikolar> Oh yeah makes sense
<GeDaMo> I was wondering what the 'P' stood for :P
<zid`> paravirtualized hardware interface layer for zen guests, pvhilfzg
<zid`> xen* xg
<zid`> Not very mindful and calm guests
goliath has quit [Quit: SIGSEGV]
goliath has joined #osdev
<ddevault> sometimes I feel very dumb when I fail to implement basic algorithms correctly
<nikolar> It happens :)
<nikolar> Which algorithm is it lol
<ddevault> "given this memory map, reclassify the region from phys min:max as memory type $x"
<ddevault> I also had to rewrite my asymmetric doubly linked lists like, six times
<nikolar> What's an asymmetric doubly linked list
<ddevault> a doubly linked list where the head only has one pointer
<nikolar> Ah right
<ddevault> single direction traversal and O(1) insertion/deletion
<nikolar> Yup, got it
<zid`> I always fuck up implementing fifos by failing to reinitialize the pointer if the list goes empty, every time
<nikolar> At least you know what to check first
Left_Turn has joined #osdev
<zid`> if(!q.head)
<zid`> q.tail = &q.head;
<zid`> I'm still not 100% sure conceptually why this is needed, but it is and it crashes if you don't
<geist> years ago i got turned onto circular doubly linked list and have been pretty much using them ever since
<nikolar> Lol
<geist> nice thing being they have no special case for insertion/removal
<geist> just 4 pointer swaps
<zid`> yea a regular linked list doesn't either, which is why it's weird that a fifo does
<zid`> I mean, I guess I get why it's needed
warlock has joined #osdev
gog has joined #osdev
spare has joined #osdev
scaleww has joined #osdev
Vercas has quit [Ping timeout: 260 seconds]
rustyy has quit [Read error: Connection reset by peer]
bauen1 has joined #osdev
scaleww has quit [Quit: Leaving]
rustyy has joined #osdev
bauen1 has quit [Ping timeout: 264 seconds]
bauen1 has joined #osdev
bauen1 has quit [Ping timeout: 264 seconds]
bauen1 has joined #osdev
oldgalileo has joined #osdev
oldgalileo has quit [Ping timeout: 240 seconds]
pg12 has quit [Ping timeout: 268 seconds]
pg12 has joined #osdev
<Ermine> Meh, zathura can't handle intel sdm
<nikolapdp> intel sdm?
<nikolapdp> the manual?
bauen1 has quit [Ping timeout: 268 seconds]
oldgalileo has joined #osdev
masoudd has quit [Quit: Leaving]
dalme has joined #osdev
dalme has quit [Ping timeout: 264 seconds]
dalme has joined #osdev
k4m1_ is now known as k4m1
netbsduser has quit [Ping timeout: 260 seconds]
bauen1 has joined #osdev
netbsduser has joined #osdev
edr has joined #osdev
m257 has joined #osdev
bauen1 has quit [Ping timeout: 240 seconds]
m257 has quit [Quit: Client closed]
m257 has joined #osdev
masoudd has joined #osdev
m257 has quit [Ping timeout: 250 seconds]
Terlisimo has quit [Quit: Connection reset by beer]
Terlisimo has joined #osdev
masoudd has quit [Remote host closed the connection]
masoudd has joined #osdev
zetef has quit [Remote host closed the connection]
bauen1 has joined #osdev
kpel has joined #osdev
Turn_Left has joined #osdev
srjek has joined #osdev
Left_Turn has quit [Ping timeout: 256 seconds]
kpel has quit [Quit: .]
<wantyapps> Ermine: Sure you have pdf support? :)
goliath has quit [Quit: SIGSEGV]
Matt|home has quit [Ping timeout: 260 seconds]
m257 has joined #osdev
agent314 has quit [Ping timeout: 264 seconds]
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 240 seconds]
eddof13 has joined #osdev
eddof13 has quit [Quit: eddof13]
gsekulski has joined #osdev
m257 has quit [Ping timeout: 250 seconds]
dude12312414 has joined #osdev
eddof13 has joined #osdev
oldgalileo has quit [Remote host closed the connection]
oldgalileo has joined #osdev
<Ermine> wantyapps: sure, I can open all other pdfs
dalme_ has joined #osdev
dalme has quit [Ping timeout: 264 seconds]
node1 has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
hirigaray has joined #osdev
<wantyapps> well that's interesting
<wantyapps> never had zathura not open a file for me
<GeDaMo> It may be the size of it, I've seen some readers fail on the ARM reference manual
<GeDaMo> Ermine: is it the all-in-one version of the SDM?
gsekulski has quit [Ping timeout: 240 seconds]
<Ermine> GeDaMo: yep
<GeDaMo> Maybe try the separated versions
xenos1984 has quit [Ping timeout: 260 seconds]
m257 has joined #osdev
xenos1984 has joined #osdev
<Ermine> Yeah, will do
eddof13 has quit [Quit: eddof13]
eddof13 has joined #osdev
sham1 has joined #osdev
rustyy has quit [Ping timeout: 256 seconds]
rustyy has joined #osdev
oldgalileo has quit [Ping timeout: 240 seconds]
gsekulski has joined #osdev
gsekulski has left #osdev [#osdev]
Halofreak1990 has joined #osdev
<bslsk05> ​lore.kernel.org: [linus:master] [keys] 9578e327b2: stress-ng.key.ops_per_sec -98.9% regression
<mjg> :p
<Ermine> Oh my
m257 has quit [Ping timeout: 250 seconds]
MrCryo has joined #osdev
MrCryo has quit [Remote host closed the connection]
<bslsk05> ​'Battleme - Hey Hey, My My (Sons of Anarchy S03E13)' by BoonesFrry (00:02:56)
gsekulski has joined #osdev
<Ermine> No, I'm too genz for that
gsekulski has left #osdev [#osdev]
gog has quit [Quit: Konversation terminated!]
<Ermine> Is hardware task switching widely used, or do people prefer software one?
MrCryo has joined #osdev
rustyy has quit [Ping timeout: 240 seconds]
xenos1984 has quit [Ping timeout: 260 seconds]
<Halofreak1990> the software one is preferred, being more flexible, and also easier to translate to other platforms
osdev199 has joined #osdev
oldgalileo has joined #osdev
node1 has quit [Quit: Client closed]
spare has quit [Remote host closed the connection]
<osdev199> Hello, I'm getting the invalid opcode (vector nr. 6) exception on executing the bash shell (a compiled 64-bit linux elf binary for x86-64 arch) in my os on my real machine. The `rip` is outside the loaded segments of the bash shell. How to debug this? Thanks.
oldgalileo has quit [Ping timeout: 260 seconds]
xenos1984 has joined #osdev
gog has joined #osdev
rustyy has joined #osdev
netbsduser has quit [Ping timeout: 240 seconds]
netbsduser has joined #osdev
gog has quit [Quit: byee]
gog has joined #osdev
osdev199 has quit [Remote host closed the connection]
xFCFFDFFFFEFFFAF has joined #osdev
<Ermine> This guy got userspace but didn't make a toolchain for his os?
<geist> Ermine: re: hardware tasking. it's never used on anything modern
<geist> x86-64 doesn't even support it for 64bit contexts
Halofreak1990 has quit [Ping timeout: 268 seconds]
<Ermine> Okay
<Ermine> Thank you
<Ermine> Was that failed attempt to speed up context switches?
<GeDaMo> Did they copy it from the Vax? :P
masoudd has quit [Quit: Leaving]
<geist> GeDaMo: probably
<geist> though the way x86 does it is a bit more overengineered than the way vax does it. i think it was more of a derivative of the axp432 work they were doing
<geist> but that may be closer to vax. dunno the details of that
<geist> Ermine: it wasn't so much failed, as it fell out of favor over time, and by the time 64bit stuff was invented there was no real need to use it
<geist> and modern x86s (last 25 years or so) just implement it in microcode, slowly
<Ermine> Oh. If it really helped with context switching performance, I'd rely heavily on this in microkernel systems
eddof13 has quit [Quit: eddof13]
<geist> yah it does not. a few years back i wrote some test case to actually measure it (for 32bit protected mode, since it doesn't exist for 64bit) and it was hecka slow on modern machines
<geist> like many times slower than just doing it manually
Halofreak1990 has joined #osdev
goliath has joined #osdev
<nikolar> What about the processors it wasn't mean to be used on
navi has joined #osdev
eddof13 has joined #osdev
foudfou has quit [Quit: Bye]
foudfou has joined #osdev
oldgalileo has joined #osdev
xFCFFDFFFFEFFFAF has quit [Remote host closed the connection]
oldgalileo has quit [Ping timeout: 255 seconds]
fluix has quit [Ping timeout: 260 seconds]
gbowne1 has joined #osdev
<geist> hmm what do you mean processors it wasn't meant to be used on?
<geist> it's a feature all modern x86s still have, it just was never extended to support full 64bit mode
<geist> so to use it you need to be running 16 or 32bit OS code
<nikolar> Eh typo
<nikolar> It *was*
<nikolar> Like early 32 bit cpus that introduced it
<nikolar> How will did it work
<GeDaMo> Was it used by Windows 286 / 386?
<nikolar> *well
<nikolar> Words hard
<zid`> nikolar cannot into word
dalme_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
<nikolar> Indeed
<mjg> how fast is it anyway?
<mjg> was it even used (dos presumably if so?)
<mjg> not that even something as simple and *common* as function prologue/epilogue had instructions which were slower than spelling it out
<mjg> note*
<mjg> so i would not be particularly surprised if magic task switching was also slow af
xFCFFDFFFFEFFFAF has joined #osdev
<geist> well, so for example i wrote some code a few years back that used it on a proper 386sx
<geist> it was predictably about as fast as doing the equivalent instructions, except it has the added ability to direct context switch between two complete cr3 contexts
<nikolar> So it was no worse
<geist> so you can directly switch between two user processes, which is not something you can do
<geist> it was no worse for sure. maybe a bit faster since it required less instructions
<zid`> yay new headphones
<zid`> Nice and tight again, unlike my bent-out and broken-ass previous pair
<geist> however it also is not as flexible. the TSS task switching stuff always reloads all registers, including all of the segments
<nikolar> Interesting
<geist> and on older hardware (newer too really) loading a segment register is pretty slow (was like 30 cycles on a 386) beause it has to do a fetch from the GDT/LDT and a bunch of microcode to validate the contents
<geist> which was already a lot of the time. 6 segment registers + 30 cycles a piece or so
<geist> so iirc the whole thing was like 300 cycles. i then wrote my own softeare code to do most of the same thing and since i didn't need to reload all the registers it was about that much faster
<geist> so interestin i then ran it on like a skylake and a bulldozer class machine (this was a few years back i wrote this code) and it was even worse. like 1000 cycles. but that's not surprising, because modern cpus they dont bother optimizing it
<geist> i'm sure it drops into some sort of slow microcode path with a full state dump
<nikolar> Yeah guess it was never used widely enough to get proper support
<zid`> Probably makes the verification people's job a lot easier
<zid`> if it's done in a little microcode VM, rather than silicon
<zid`> and that feature is *nasty*
<bslsk05> ​github.com: 3x86/x86/tss.c at c5650a4f867975319833b74006f9c94d2e21c389 · travisg/3x86 · GitHub
oldgalileo has joined #osdev
<geist> was just trying to set things up enough to actually do a task switch
<geist> at the end of the day switching tasks is just a ljmp to a TSS segment though, kinda neat
<nikolar> Yeah sounds like it
<geist> re: the questioa bout did they copy fro VAX. not really. the VAX hardware task switching is in some ways simpler and easier to use, since it's really just a pair of instructions: svpctx and ldpctx
<geist> you load a control register with a pointer to the hardware state structure and do a save, load a new pointer, load
<geist> very straightforward. it just slams the state of the cpu down in a struct
<bslsk05> ​github.com: lk/arch/vax/asm.S at vax · littlekernel/lk · GitHub
<bslsk05> ​github.com: lk/arch/vax/include/arch/vax.h at vax · littlekernel/lk · GitHub
oldgalileo has quit [Ping timeout: 268 seconds]
fluix has joined #osdev
<geist> it's like intel copied a lot of details from VAX but filtered them through this object oriented way of thinking that i think was permeating the axp432 at the time
<geist> so everything needed a handle to a thing (segments) and you basically treated it like an opaque object
sham1 has quit [Ping timeout: 264 seconds]
<geist> and hardware always has pointers to tables that contain data, instead of just pointers to the data
<xFCFFDFFFFEFFFAF> whut
<xFCFFDFFFFEFFFAF> what this stackter is saiynb and how much
fluix has quit [Remote host closed the connection]
xFCFFEFFFFFFFFFF has joined #osdev
xFCFFDFFFFEFFFAF has quit [Ping timeout: 264 seconds]
<Ermine> a bunch of microcode to validate the contents <-- so invalid table will trigger GPF?
<geist> yah
<Ermine> Does processor validate page tables in the same way?
<mjg> was dos using the thing?
<Ermine> it's protected mode stuff, dos isn't
<mjg> aight, then was windows 3.x using the thing?
<mjg> (or is that sucker not protected either?)
<nikolar> Wonder what the world would look like if we were running axp432 instead of x86
fluix has joined #osdev
<Ermine> it was protected afaik, so answer is probably yes
<Ermine> And I think same goes for 9x
<mjg> nikolar: i wonder how the world would look like if ibm rolled with unix early on
xFCFFEFFFFFFFFFF has quit [Quit: 0xC0230002 STATUS_NDIS_CLOSING]
<nikolar> Maybe we'd all be running power or s390
<GeDaMo> There were other x86 multi user / tasking systems around, maybe some of them used it
xFCFFDFFFFEFFFAF has joined #osdev
<Ermine> book on VxD programming discusses IDT/GDT stuff quite in-depth, so that's why I'm thinking why they used gdt heavily
<Ermine> But they could mix it with paging as well, I guess
zetef has joined #osdev
<mjg> :)
<bslsk05> ​www-user.tu-chemnitz.de: Writing Windows Virtual Device Drivers
MrCryo has quit [Remote host closed the connection]
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
<dostoyevsky2> does Windows have a stable api for e.g. writing device drivers? I always have the feeling they change so much all the time
<Ermine> Yes, WDM. It's definitely stable in one version, and more or less stable across versions
<nikolar> You can use a lot of win7 drivers on win10 for example
<nikolar> So it's definitely stable across versions, to a point at least
<Ermine> (I used ati drivers for Vista in 7 successfully, but using tp-link wifi drivers for 7 in 8.1 and 10 gave me BSODs)
<nikolar> Yeah it depends
<dostoyevsky2> can one write device drivers with just gcc/clang on windows?
<nikolar> But you can use some drivers for 7 on 10
<Ermine> gcc definitely no, it can't into ms abi
<Ermine> clang probably, but most probably they only support msvc
<zid`> you know mingw exists right?
<dostoyevsky2> yeah, doesn't windows also have a code veriifier for drivers, does it work similar to ebpf?
<Ermine> mingw can't into msabi
<zid`> y.. yes it can?
<Ermine> why it generates code incompatible with msvc then? At least c++ wise
<zid`> __attribute__((ms_abi)), with -maccumulate-outgoing-args
<bslsk05> ​learn.microsoft.com: Driver Verifier - Windows drivers | Microsoft Learn
<Ermine> oh i absolutely love placing msabi attribute before each function
<Ermine> no, rmdir /s /q c:\mingw
<zid`> good news, all winapi code does it already :P
<zid`> int WINAPI WinMain(.. are the official prototypes
<zid`> because it changes abi so often they do it in their own headers
<nikolar> Lol
<Ermine> lol abi changes
<zid`> and all .dlls are randomly stdcall or not so you have to know ahead of time for those too
<zid`> and use attributed'd declarations
<Ermine> mon, 24year old binaries work just fine on 10
<zid`> opengl tends to catch people out on this, it'll just decide to randomly start crashing at some point
<zid`> because they forgor an attribute somewhere, and it takes a while for the stack corruption to actually kill you
seds has joined #osdev
<zid`> leaving some deep init() frame go back to main and now main is crashing
oldgalileo has joined #osdev
devurandom has quit [Quit: Ping timeout (120 seconds)]
devurandom has joined #osdev
Yoofie has quit [Read error: Connection reset by peer]
Yoofie has joined #osdev
eddof13 has quit [Quit: eddof13]
Halofreak1990 has quit [Quit: Konversation terminated!]
eddof13 has joined #osdev
zetef has quit [Remote host closed the connection]
dude12312414 has joined #osdev
spare has joined #osdev
chibill has quit [Ping timeout: 260 seconds]
dude12312414 has quit [Client Quit]
<xFCFFDFFFFEFFFAF> Am in the Bulgarian topper
<nikolar> What
eddof13 has quit [Quit: eddof13]
eddof13 has joined #osdev
eddof13 has quit [Ping timeout: 260 seconds]
lanodan has quit [Ping timeout: 256 seconds]
<xFCFFDFFFFEFFFAF> i am abhasian asm growler
<zid`> You're high as shit
<gog> hi
<zid`> hi, as shit
<xFCFFDFFFFEFFFAF> shit can be decreased
<xFCFFDFFFFEFFFAF> into a point
<xFCFFDFFFFEFFFAF> so forgive the sh it
<xFCFFDFFFFEFFFAF> or
<xFCFFDFFFFEFFFAF> i
<nikolar> Lol
voidah has joined #osdev
<xFCFFDFFFFEFFFAF> shkolar is you drunken people installed?
<xFCFFDFFFFEFFFAF> vipah
<xFCFFDFFFFEFFFAF> nice openbsd install
<xFCFFDFFFFEFFFAF> *inst
<xFCFFDFFFFEFFFAF> shit guys sorry my small brother (10cm) is on the keyboard while i pressed my wife on the tickchen
<xFCFFDFFFFEFFFAF> really sorry
<zid`> Is that a dick joke
<nikolar> What is going on here
<nikolar> Is he having a stroke or a fever dream
<xFCFFDFFFFEFFFAF> woody rar pecker
<Ermine> sortie: requesting banhammer
* xFCFFDFFFFEFFFAF running anonce tracker ...
Left_Turn has quit [Read error: Connection reset by peer]
lanodan has joined #osdev
lanodan has quit [Client Quit]
lanodan has joined #osdev
xFCFFDFFFFEFFFAF has quit [Read error: Connection reset by peer]
sham1 has joined #osdev
<geist> it's been a while
goliath has quit [Quit: SIGSEGV]
chibill has joined #osdev
<Ermine> fk, sdm volume 3 seems like must read, but it's 1500 pages long
<Ermine> well, first 480 are definitely a must
fluix has quit [Remote host closed the connection]
fluix has joined #osdev
<geist> yeah you should at least read the important parts
xFCFFDFFFFEFFFAF has joined #osdev
spare has quit [Remote host closed the connection]