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
thinkpol has quit [Remote host closed the connection]
thinkpol has joined #osdev
Arthuria has joined #osdev
Renfield has quit [Quit: Leaving]
Renfield has joined #osdev
heat has joined #osdev
wlemuel has quit [Quit: wlemuel]
Left_Turn has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
edr has quit [Quit: Leaving]
navi has quit [Ping timeout: 252 seconds]
Matt|home has joined #osdev
Matt|home has quit [Remote host closed the connection]
Matt|home has joined #osdev
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
gog has quit [Quit: byee]
heat has quit [Ping timeout: 256 seconds]
gorgonical has quit [Remote host closed the connection]
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vdamewood has joined #osdev
Arthuria has quit [Ping timeout: 260 seconds]
Celelibi has quit [Ping timeout: 240 seconds]
Celelibi has joined #osdev
Yoofie1 has joined #osdev
Yoofie3 has joined #osdev
Yoofie has quit [Ping timeout: 256 seconds]
Yoofie has joined #osdev
Yoofie1 has quit [Ping timeout: 246 seconds]
xal has quit []
xal has joined #osdev
Yoofie3 has quit [Ping timeout: 246 seconds]
xal has quit [Client Quit]
xal has joined #osdev
xal has quit [Client Quit]
xal has joined #osdev
rustyy has quit [Ping timeout: 246 seconds]
agent314 has quit [Ping timeout: 256 seconds]
xvmt has quit [Remote host closed the connection]
xvmt has joined #osdev
zxrom has joined #osdev
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bitoff has quit [Remote host closed the connection]
netbsduser has joined #osdev
<ddevault> why is my framebuffer code so slow :<
<ddevault> no, it's not because I'm not double buffering
<nikolapdp> ):
gbowne1 has quit [Quit: Leaving]
rustyy has joined #osdev
<ddevault> there we go
<ddevault> I capped buffer flips at 24 FPS and the problem went away, of course
<ddevault> no sense flipping the buffer every time the terminal is dirtied
<geist> kinda fun retro evening: been writing code to parse through a FILES-11 ODS-2 filesystem
<geist> the more i dig into this the more i see the similarities with NTFS
<geist> its so close, it's like NTFS v0.5
<geist> NTFS is a bit more flexible, clearly they fixed a few of the earlier issues and made it smarter
<geist> though there's ssome multi volume stuff built into files-11 that's sort of neat
<geist> notably there's a notion in the file record ID (basically inode #) of which volume to refer to
<geist> so you can't have a single file cross multiple mounts, you can have inode #s refer to files on another volume #
<geist> only 8 bits of volume, but still pretty useful
<geist> probably used in a cluster system pretty heavily since in a clustered VMS system you see all of the shared fses as if it were local, so i suspect it allows you to union a bunch of fses that way
<ddevault> have a much cleaner integration with vterm post-refactoring
npc has joined #osdev
<nikolapdp> very nice ddevault
<nikolapdp> geist i've stumbled upon openvms on itanium video like 2 days ago heh
<geist> yah for alpha and itanium they updated to ODS-5 and added some new features, but I don't any one of those around
<geist> ODS-3 and 4 were I think something else, like CD-ROM extensions
GeDaMo has joined #osdev
<nikolapdp> heh nice
Left_Turn has joined #osdev
sortie has quit [Quit: Leaving]
MrCryo has joined #osdev
<ddevault> wish I had a PC with a working serial port
JerryXiao has quit [Ping timeout: 255 seconds]
gog has joined #osdev
JerryXiao has joined #osdev
sortie has joined #osdev
<Ermine> ddevault: now your system doesn't have 25th frame. j/k
oldgalileo has joined #osdev
altf2o has quit [Remote host closed the connection]
node1 has joined #osdev
bitoff has joined #osdev
node1 has quit [Ping timeout: 250 seconds]
leg7 has joined #osdev
zhiayang_ has joined #osdev
zhiayang has quit [Ping timeout: 252 seconds]
zhiayang_ is now known as zhiayang
bitoff_ has joined #osdev
bitoff has quit [Ping timeout: 268 seconds]
<leg7> hey guys when I think that my pic remapping code isn't doing anything?? When I enable interrupts I get a stack exception 12 and if I initialise the 8042 first I get interrupt 116 as if the remaping did nothing
<bslsk05> ​github.com: LigmaOS/src/kernel/architecture/x86/chips/PIC_8259A.c at vga_text_mode · leg7/LigmaOS · GitHub
<leg7> I don't really see what I could be doing wrong, it's only io out commands with known values
<gog> heh Ligma
<gog> is that c++
<leg7> no
<leg7> c23
<pounce> based
<nikolapdp> uh
<nikolapdp> what made you think it's c++
<pounce> c is getting better every day. when c4X rolls around it's over for rust
<nikolapdp> c getting better every day > you got nullptr
<gog> strongly-typed enum
<gog> i didn't realize c has this now
<nikolapdp> does ti
<nikolapdp> *does it
<gog> idk
<gog> i've been using nullptr
<pounce> yea!
<pounce> anyway here's my cringe pic in rust https://github.com/ESALP/ESALP-1/blob/master/src/interrupts/pic.rs
<bslsk05> ​github.com: ESALP-1/src/interrupts/pic.rs at master · ESALP/ESALP-1 · GitHub
<nikolapdp> gog why
<gog> because
<pounce> dang i wrote that 8 years ago..
<dostoyevsky2> pounce: not enought unsafe in that code, imho
<pounce> it's all unsafe though...
<pounce> is this a meme
<pounce> gog: c23 has auto! isn't that just neat
<nikolapdp> is it?
<pounce> and true/false... after so many years
<pounce> nikolapdp: yeah the majority of functions in that link are 'unsafe fn'. since you can trigger unsafe behaviour by talking to the PIC wrong
<gog> inferred types!
<leg7> So do any of you see something wrong?
<gog> wish it had var inste4ad
<nikolapdp> i meant > c23 has auto! isn't that just neat
<nikolapdp> is it?
<gog> ruuuuuuuuuuuuuuuust
<nikolapdp> FEARLESSLY UNSAFE
<pounce> 😎
<leg7> guys I need help T.T
<sham1> Do you now
edr has joined #osdev
<nikolapdp> lol
<leg7> sham1: wdym?
navi has joined #osdev
goliath has joined #osdev
Arthuria has joined #osdev
Nixkernal has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
dcn has joined #osdev
Renfield has quit [Remote host closed the connection]
Renfield has joined #osdev
MrCryo has quit [Read error: Connection reset by peer]
MrCryo_ has joined #osdev
MrCryo_ is now known as MrCryo
Arthuria has quit [Ping timeout: 246 seconds]
wlemuel has joined #osdev
dcn has quit [Remote host closed the connection]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 256 seconds]
altf2o has joined #osdev
hussein is now known as nur
heat has joined #osdev
<leg7> yo
<leg7> heat:
<heat> hi
<leg7> I have a problem with my pic irqs and I'm pretty desperate
<leg7> After initializing the 8259 and enabling hardware interrupts it looks like the pic didn't remap interuupts
<leg7> So it triggers stuff like interrupt 116 and exception 12 or 8
<leg7> But my code it textbook
<heat> okay that explains what was wrong with your error codes
<leg7> Well I'm not sure it's related
<leg7> maybe it is
<bslsk05> ​github.com: LigmaOS/src/kernel/architecture/x86/chips/PIC_8259A.c at vga_text_mode · leg7/LigmaOS · GitHub
<leg7> Do you see anything wrong
<leg7> I followed the piix3 manual I really have no idea what the problem could be
<heat> it 100% is
<leg7> I can mask irqs and unmask them
<leg7> but they don't call the right ISRs
<heat> qemu -trace pic*
<bslsk05> ​forum.osdev.org: OSDev.org • View topic - PIC reconfiguration - what happens to the orginal INTERUPTs
<leg7> 12 should be serial com 1
<leg7> sometimes it's 8 if I debug and step through it
<heat> -trace pic*
<leg7> I added that
<heat> okay, your outb is borked
<leg7> why?
<leg7> do I need to add the `*`
<leg7> ?
<heat> yes
<leg7> I didn't know the argument was a regex my bad
<Mutabah> it's a glob, not a regex
<Mutabah> (similar idea, different syntax)
<heat> yep, the values are all off
<heat> pic_ioport_write master 1 addr 0x0 val 0x0
<heat> pic_ioport_write master 0 addr 0x0 val 0x0
<heat> ^^garbage ICW1
<heat> the rest looks okay-ish to me but it's unreasonable to expect the rest of the PIC init to work well, if you screw up the first step
<leg7> what does the number after master mean? flag if it's going to master?
<heat> yes
<heat> it seems to me that your outb is fucked, and since the ICW1 was never sent, you just touch the mask register
<heat> instead of irq offset
<leg7> OOOOMMGMGG
<leg7> I defined icw 1 with logical &
<leg7> instead of |
<leg7> why are we here?
<heat> well, there you go
<leg7> just to suffer
<leg7> thank you
<heat> does it work now?
<leg7> ugh yeah
<leg7> now it's just unhandeled irq 0
<leg7> which ig is the timer
<leg7> :')
<leg7> thanks a lot
<leg7> Are there other useful qemu settings I should know of?
<heat> off the top of my head i can't really think of anything else
<heat> -d int, -trace are the most important
<dostoyevsky2> The qemu options feel like a programming language
<leg7> Mutabah: What is the difference between a glob and a regex?
<leg7> I've never known
<heat> regex is a lot more powerful
<leg7> A regex is a syntax for automata
<leg7> a glob is?
<heat> *
<heat> leg* matches you
<heat> le* matches you
<heat> l* matches you
<leg7> So that doesn't work with regex?
<heat> no
<leg7> regex would be `l*` matches some number of `l` ?
<heat> yes
<heat> correct regex would be "leg.*, le.*, l.*"
<leg7> yeah
<heat> anyway regex is a lot more powerful, glob is dirt simple
<leg7> so we could say it's a subset of regex/simple automata?
<leg7> or not a subset just something less expressive
<kazinsal> it's just another much simpler wildcard pattern matching system
<leg7> ok
<heat> uhhhh yeah probably, i can't think of a glob that can't be expressed in regex
<Mutabah> glob is a simpler language that can be turned into a regex
<Mutabah> It's primarily used for selecting files in unix commands/shells
<heat> yeah, gcc *.c not gcc .*.c
<leg7> well it explains a lot
<heat> because then you'd run into troubles with the dots too, so gcc .*\.c
<leg7> I was always confused as to why someth* works
<leg7> and sometimes it's `?` instead of `.`
<leg7> and sometimes `[^a-z]` or `[!a-z]`
<heat> regex is awful anyway and it should die
<heat> i've never seen a maintainable regex pattern that wasn't exceedingly clever and complicated to read
<Mutabah> regex is great for quick-n-dirty stuff
<Mutabah> less so for more serious work... although, I have used it in relative anger
<Mutabah> (meaning - with production code)
<Mutabah> on the other hand... I've seen people use regex where a full parser would have been better, or even just not doing strings at all
<bslsk05> ​stackoverflow.com: html - RegEx match open tags except XHTML self-contained tags - Stack Overflow
<GeDaMo> A lot of regex implementations are no longer regular languages
<dostoyevsky2> GeDaMo: irregular expressions?
<GeDaMo> Yeah, i guess so :P
<leg7> It's language theory stuff
<dostoyevsky2> irregular expression is a much more fitting term imho... ^(?:\w+\s+)+ doesn't look like a regular expression in the first place
<leg7> regular expression is very vague to begin with but your example is very regular
<leg7> in terms of expressivity
<leg7> the automaton would be pretty simple too
vdamewood has joined #osdev
<bslsk05> ​cs.stackexchange.com: When is a regexp not a Regular Expression? - Computer Science Stack Exchange
<leg7> this makes sense it's the same problem as a^n b^n
dcn has joined #osdev
leg7 has quit [Ping timeout: 246 seconds]
Arthuria has joined #osdev
gog has quit [Quit: Konversation terminated!]
<Ermine> I feel myself extra smart when I do substitution in vim with nontrivial regex
* kof673 squints > printf("%zu: %s", i+1, line_buffer); FAILS (no output, i is a size_t) WORKS printf("%zu: ", i+1); printf("%s", line_buffer); fflush() is no help :/ just simply doing the first line twice "works" but doubles the output :/
<kof673> this is a stupid test program, but wonder where the issue is :/
Arthuria has quit [Ping timeout: 246 seconds]
Arthuria has joined #osdev
xenos1984 has quit [Ping timeout: 256 seconds]
xenos1984 has joined #osdev
<GeDaMo> Is this your own printf implementation?
<GeDaMo> If you just do printf("%zu: ", i+1); does that work?
Arthuria has quit [Ping timeout: 268 seconds]
<kof673> no, but eventually will write own printf(). this is old knoppix and like gcc 4. it may be a known bug, unless i corrupted something :/
<kof673> * gcc 6.4.0
<kof673> that part alone does work :/
Arthuria has joined #osdev
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
<GeDaMo> What if you do an empty printf first?
<GeDaMo> Does this printf call your kernel's write? Does the write actually get called?
<kof673> eh, just a variable was not initialized, so apparently sometimes got zero lol
<kof673> nah, just sometimes i don't init stuff until actually used :/
<GeDaMo> Tsk, tsk :P
<kof673> OTOH i thought "C" int f; can be assumed to be zero...anyways...
<netbsduser> looks like page-out and page-in of anonymous memory is now up and running properly
<kof673> strange gcc did not warn me "use before initialize" or whatever
<netbsduser> the "easy" part is done, now i need to formulate and implement the replacement policy
<kof673> what i was doing was incrementing an uninitialized size_t and testing against that (different than the printf() was using), strange that would seemingly corrupt the stack, but maybe it was just a combination of "optimizations" that it thought was fine if you go out of bounds :/
xenos1984 has quit [Ping timeout: 268 seconds]
<dostoyevsky2> GeDaMo: I think my OS will be called printfOS
<GeDaMo> :P
<dostoyevsky2> if your printf implementation is turing-complete you don't need any other form of scripting
<GeDaMo> Any function with buffer overflows is technically Turing complete :P
FreeFull has quit [Ping timeout: 252 seconds]
<dostoyevsky2> printf("%ext3M", "/dev/sda1");
<dostoyevsky2> And then one could use `printf("%U", "/dev/sda1")' for unmount
<kof673> i did start a printf()-alike that will allow custom formats...and does not use var args, so foo1() foo2() .... just shuttles into an array and calls the real foo() function. slow...probably. i just have not implemented yet, not very exciting :/ and see if it can work without needing malloc() maybe.
<kof673> and then i got another "real" one from elsewhere, just not exciting :/
<kof673> well, vfprintf()-alike whatever. just outputs to a buffer. then combine with something else to output to a "FILE *" or wherever/however else
<dostoyevsky2> Not sure if I should extend the printf-%-expressions or rather extend the ansi escape sequences... ^[21;4B;/bin/ls;E
xenos1984 has joined #osdev
<dostoyevsky2> GeDaMo: Buffer Overflows give Turing Completeness a bad name
gog has joined #osdev
<kof673> it will look like: %UC.B16.U% print a uchar, base 16 (hex), U == uppercase hex the order of the .foo.bar does not matter .Z == zero pad, .P4 == pad output to width 4
<kof673> in any case, each "backend" can be queried to see which of those "subformats" it supports, since many of those basic/standard things will be common
<kof673> hopefully, you can more or less just set some function pointers to add a new "backend" at run-time
<kof673> so i will try to support normal printf stuff, but backends could add whatever "subformats" they wish, just choose a unique string lol
<kof673> "modifiers" is a better word than "subformat"
<dostoyevsky2> https://www.stanislavs.org/helppc/int_21.html you could have different syscall apis, like 80 for linx and 21 for dos all inside printf
<bslsk05> ​www.stanislavs.org: int 21
FreeFull has joined #osdev
oldgalileo has quit [Ping timeout: 272 seconds]
goliath has quit [Quit: SIGSEGV]
Arthuria has quit [Ping timeout: 268 seconds]
k0valski18891621 has joined #osdev
heat has quit [Remote host closed the connection]
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
MrCryo has quit [Remote host closed the connection]
joe9 has joined #osdev
goliath has joined #osdev
oldgalileo has joined #osdev
oldgalileo has quit [Ping timeout: 260 seconds]
<netbsduser> i evidently spoke too soon
<netbsduser> had to revisit anonymous memory in/out-page
joe9 has quit [Quit: leaving]
dcn has quit [Remote host closed the connection]
gbowne1 has joined #osdev
Matt|home has quit [Quit: Leaving]
gbowne1 has quit [Remote host closed the connection]
gbowne1 has joined #osdev
frkzoid has joined #osdev
wantyapps is now known as linux-offtopic
linux-offtopic is now known as wantyapps
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<GreaseMonkey> x86 16-bit asm tip: when one is using a base address (in the current case, 0x3F0 for the floppy disk controller), put the base address in one of {BX, BP, SI, DI} and then you can do LEA DX, [BX+DEVTYPE.SOMEREG]
Arthuria has joined #osdev
oldgalileo has joined #osdev
<zid> yea real mode indexing is weird
<zid> only a couple of combinations work
<GreaseMonkey> yeap
<GreaseMonkey> and once they got more registers usable for 32-bit, LEA became that much more useful
<GreaseMonkey> although it does stump me as to why ESP requires the extra byte of SIB
<GreaseMonkey> but yeah, classic and rather overused example: LEA edi, [edx+edx*4] \ SHL edi, 6 \ MOV [edx+ecx], al
<GreaseMonkey> oh right you'd also have an offset in the MOV memory address for 0xA0000
<GreaseMonkey> ...and that's meant to be [edi+ecx+0xA0000]
oldgalileo has quit [Ping timeout: 268 seconds]
<zid> ebp doesn't, hence the frame pointering
<GreaseMonkey> huh, they really wanted you to use EBP as the frame pointer even then
<GreaseMonkey> and of course 16-bit only provides BP (w/ SS: as default), not SP
<GreaseMonkey> of course, many compilers use ESP anyway - 7 general purpose registers really isn't much and 6 is even more of a squeeze
zetef has joined #osdev
<GreaseMonkey> with that said... i have the beginnings of a state machine for a floppy disk driver (of which ports 0x3F2, 0x3F4, and 0x3F5 are the only ones which are guaranteed because 5150 compatibility), and i have a background task scheduler to make it actually keep ticking along
<zid> disregard TASKS, acquire 100% cpu use when accessing the floppy, like windows explorer
<GreaseMonkey> unfortunately i do need to ensure it still works on qemu for convenience and i don't know if it supports the non-DMA method yet
<geist> yeah i remember only learning the differences between 16 and 32 bit mode addressing much later, since i didn't do much x86 assembly in the dos days (was more interested in playing games that were already cracked than cracking them)
altf2o has quit [Quit: Leaving]
oldgalileo has joined #osdev
Brnocrist has quit [Ping timeout: 268 seconds]
Brnocrist has joined #osdev
oldgalileo has quit [Ping timeout: 256 seconds]
Turn_Left has quit [Read error: Connection reset by peer]
goliath has quit [Quit: SIGSEGV]
zetef has quit [Remote host closed the connection]
oldgalileo has joined #osdev
gog has quit [Quit: byee]
Terlisimo has quit [Quit: Connection reset by beer]
npc has quit [Remote host closed the connection]
Terlisimo has joined #osdev
gorgonical has joined #osdev
<gorgonical> This computer build is irritating
<gorgonical> I just cannot get DIMMs in the A channel slots to make the machine post
<gorgonical> B1, B2 work either singly or both populated, but the A slots don't work at all. >:(
<gorgonical> But I didn't upgrade to DDR5 6000MT/s ram to downgrade to a single channel!
<geist> i'm sure yo have but did you try dropping the speed one notch or so? In about half the builds i've done, including one recent threadripper, when adding more channels I had to drop 200MT/s or so for it to train
<gorgonical> That would be the memory multiplier?
<geist> generally yeah, but usually at the bios setting there's sort of a master setting
<geist> that i pull down a level or two
<geist> like from 2666 to 2500 or 4600 to 4400 or whatnot
<gorgonical> Hmm. I tried setting it super low and it stopped posting, but this is encouragement I need to keep trying
<gorgonical> I thought the mobo was cooked at first until I left it alone for like four minutes and it suddenly posted
<geist> it sucks you have to drop speed like that, but i've found sometimes it's just the price you pay for driving a lot of sticks of ram
<gorgonical> It's only 2 :(
<geist> ah, well even so
goliath has joined #osdev
<gorgonical> I've never dealt with this memory training nonsense. If it doesn't pass is it just like probabilistic? Is there sense in just trying to like reset the machine and wait like three minutes each boot to see if it'll pass?
<gorgonical> Or is it just some fundamental problem?