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
biblio has quit [Quit: Leaving]
ElectronApps has joined #osdev
vdamewood has joined #osdev
<gog> UEFI spec doesn't say what EFER.NXE should be when starting, but it's 1 on OVMF
<gog> unsafe to assume always 1 probably?
<gog> it also says that the stack "may" be marked NX
<gog> which leads me to believe that it's unsafe and i should check for the feature and enable it
<moon-child> nested functions go brr
<gog> nooo you can't put a function inside of a function
<moon-child> yo dawg
<moon-child> we put a function inside of your function
<moon-child> so you can function while you're barely functioning cuz the world has gone to shit
<gog> hey now i haven't had an anxiety attack in uh
<gog> ok it's only been about two weeks
<moon-child> :<:
<moon-child> gah
<moon-child> :<
jjuran has quit [Quit: Killing Colloquy first, before it kills me…]
jjuran has joined #osdev
ping- has quit [Ping timeout: 240 seconds]
dude12312414 has joined #osdev
misnor has quit [Read error: Connection reset by peer]
mctpyt has joined #osdev
mctpyt has quit [Ping timeout: 268 seconds]
bauen1 has quit [Ping timeout: 240 seconds]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
_xor has quit [Read error: Connection reset by peer]
_xor has joined #osdev
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
srjek has joined #osdev
heat_ has quit [Remote host closed the connection]
heat has joined #osdev
zaquest has quit [Remote host closed the connection]
zaquest has joined #osdev
sdfgsdfg has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
nyah has quit [Remote host closed the connection]
ElectronApps has quit [Remote host closed the connection]
pretty_dumm_guy has quit [Quit: WeeChat 3.4]
sdfgsdfg has quit [Quit: ZzzZ]
ravan has joined #osdev
scoobydoo has quit [Read error: Connection timed out]
scoobydoo has joined #osdev
heat has quit [Ping timeout: 250 seconds]
srjek has quit [Ping timeout: 240 seconds]
sdfgsdfg has joined #osdev
ElectronApps has joined #osdev
MarchHare has quit [Quit: Leaving]
scoobydoo has quit [Ping timeout: 240 seconds]
scoobydoo has joined #osdev
biblio has joined #osdev
mats1 has joined #osdev
the_lanetly_052_ has joined #osdev
ElectronApps has quit [Remote host closed the connection]
gog has quit [Remote host closed the connection]
gog has joined #osdev
epony has quit [Quit: QUIT]
epony has joined #osdev
sdfgsdfg has quit [Quit: ZzzZ]
sdfgsdfg has joined #osdev
the_lanetly_052 has joined #osdev
the_lanetly_052_ has quit [Ping timeout: 256 seconds]
gog has quit [Ping timeout: 240 seconds]
terminalpusher has joined #osdev
gog has joined #osdev
bauen1 has joined #osdev
<gog> mew!
* kazinsal headpats gog
* gog purrs
<gog> my fucken computer died overnight and i lost everything
<kazinsal> D:
<j`ey> noo :<
<gog> i mean battery died
<gog> i lost all my work that i hadn't saved
<gog> i didn't notice that i had shut off the power strip somehow
<gog> oh well
<j`ey> well that's a lot less bad
<gog> yeah
<j`ey> but who goes to bed with unsaved files!
* gog blushes
<gog> i was intoxicated and i forgot
<gog> the need to sleep overwhelemed me in the moment
* vdamewood gives gog a fishy.
* gog eats fishy
<gog> ok swap file for what i was working on is still there and seems to have everything
<vdamewood> Yay!
<gog> thank the lort for vim
<j`ey> :)
GeDaMo has joined #osdev
<zid> yea I was about to say
<zid> buy an editor with temp files
<Affliction> gog | i was intoxicated and i forgot
<Affliction> Then, you've only lost drunk code!
<gog> different intoxicant :p
<Affliction> ah
<Affliction> To complete the thought, some of both my best and worst code was written with the assistance of alcohol, so. May or may not have been a big loss :)
<gog> i'm still unclear if UEFI on x86_64 will always have EFER.NXE set
<gog> and the docs are very unhelpful in this regard
<zid> does it matter to you if it is or isn't?
<zid> You have to toggle it off to turn it on anyway if you want it in your own code
<zid> which is..weird
<gog> oh really?
<zid> yea nx for some reason is a bit sticky I think
<zid> you have to hammer on it
<gog> ok i better read more about it then before playing with it
<zid> I think the sticky weirdness might be that some model of cpu doesn't check it as you enable paging, only after you enable paging or something?
<zid> so if it's already set in 32bit paging where it does nothing, then you go into long mode, you have to clear then re-set it or something
<gog> so there's some kind of latch between that register and the mmu then
<zid> or it was just a cpu bug
<gog> hm ok
<zid> It might not be true anymore and all cpus that had that bug have been microcode fixed, idk
<zid> or maybe I imagined it in a fever dream
<zid> but who cares, set the bit to what you want it set to
<zid> what are you up to anyhow
<gog> idk rn i'm just deciding what to do next
<zid> in..?
<gog> kernel land
<zid> doing?
<gog> memory management
<zid> for? (help)
<gog> for????? idk what anything is for i just do it
<zid> I'm not sure I've evver actually seen you do osdev before so idk what your project is or what silly ideas you have etc
<gog> what
<zid> what what
<gog> i don't only shitpost here, i do actually have a thing i'm experimenting with
<zid> so tell me about it lol
<zid> this is like pulling teeth
<bslsk05> ​adachristine/sophia - uefi bootloader and kernel for x64 (0 forks/4 stargazers)
<zid> ooh dynamic stuff
<gog> yeah it actually works too
<zid> we've seemingly got very similar amounts of actual stuff
<zid> except I have one driver
<zid> and you have uefi
<gog> i was stuck for months and finally had a breakthrough
<zid> nice
<gog> as evidenced by my contrib history
<zid> they've moved commits again
<zid> okay found them
<zid> looks like a normal pace to me :P
<zid> couple commits a month with some several month gaps is RAPID
<zid> not everybody is sortie
<gog> eh, i could be working on it more. life is chaotic and unpredicable though
<sortie> I plan my commits years ahead
<sortie> One of these decades I'll merge some of them
<zid> one day I might actually do some memory stuff instead of awkwardly working around the fact my memory code is missing stuff
<sortie> zid, I really don't think there is another sortie
<zid> gog: all I can do is map arbitrary addresses to arbitrary other addresses, but I can allocate physical memory at least
<gog> yeah that's about the size of my memory manager
<zid> so I've been doing dumb things to work around the fact I have no virtual memory allocations, like adding a fixed offset to the physical address to generate a virtual one
<gog> it also has anonymous address space support, but it's only nominal rn because i ripped out a bunch of code so it would build
<zid> so my allocation size is precisely 4k and nothing else, and isn't dynamic
<gog> that's a start
<gog> you can build a lot on top of that
<zid> works well enough for my driver though :D
<zid> I give it 4k pages, when the network stack needs to read the buffer I just map it to offset + phys, bam
<gog> also unrelated, my wife's co-worker has covid and she's really smug about having refused to go to the office the last couple weeks :p
<zid> your wife or her co-worker
<gog> my wife
<zid> I'll leave the house maybe at some point in 202x
<gog> i'm pretty sure my pmm init code clobbers an address that my kernel uses i should probably fix that
<zid> ehhh maybe
<zid> I start in 32bit mode so I get to map my own kernel and add its pages to the 'used' set in a convenient place which helps me there
<zid> I parse the e820, add all the pages to a list, then use that list to map the kernel, then just pass the rest of the list to the kernel
<zid> saves a lot of headaches
<zid> starting with an established set of page tables sounds like ballache ngl
<gog> it's not actually that bad. the only tables i touch are for the higher half, then i take the first entry in the PML4 from the UEFI tables and i have a full identity map that i can use temporarily
<gog> and eventually will discard when it's no longer needed
<zid> you need to not fuck with the pages that are inside that page table set though
<zid> which means your allocator needs to know about them before you can touch them blah blah
<gog> they're mapped RO in OVMF
<zid> it's just an annoying issue
<gog> so it'll at least #PF if something tries by accident
<gog> aha past me was smart, my pmm init code does not clobber anything
<robyn> I'm awake again
<robyn> blast my roommate's IV pump
* gog mews at robyn
<robyn> hello gog
<gog> :3
<robyn> too bad this isn't the channel for headpats
* gog pats robyn
<gog> i got headpats earlier so can you
* robyn hugs gog
<zid> sounds suspicious to me gog
g1n has joined #osdev
<gog> might be
<gog> but it works for now and i shouldn't be breaking things rn
<gog> it could disrupt all this momentum
<robyn> just to thank you all, wiki.osdev.org is invaluable
<sortie> :)
darkstardevx has quit [Remote host closed the connection]
sdfgsdfg has quit [Quit: ZzzZ]
darkstardevx has joined #osdev
darkstardevx has quit [Remote host closed the connection]
darkstardevx has joined #osdev
darkstardevx has quit [Max SendQ exceeded]
ElectronApps has joined #osdev
Oli has joined #osdev
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pretty_dumm_guy has joined #osdev
<gog> fun fact: when you're making a comparison make sure it's the right direction
<gog> good news is that anonymous memory spaces work agan
<gog> and i can check this off of the list of things to fix that i broke
<zid> nice
<zid> what's an anonymous memory space for
<GeDaMo> Every bugfix just creates more bugs :P
<gog> zid: demand-paged objects with no backing store
<GeDaMo> MAP_ANON
<gog> yes
<gog> lazy allocation
<zid> sounds too fancy, have you tried floppy disks
Oli has quit [Quit: leaving]
<zid> I'm not sure if I really like this turing complete game, or hate it because it's annoying
<zid> It keeps doing annoying things on purpose
<zid> Like making me draw an alu but having to draw the addition/sub part inline, even though previous levels let me do the bitwise ops as blackbox components for it
<gog> hey zid
<gog> what's a logic game for
<zid> sadism?
<zid> masochism I mean
tenshi has quit [Ping timeout: 268 seconds]
<kazinsal> sadism is for when you're interested in *writing* logic games
<gog> i'm kinkshaming
heat has joined #osdev
biblio has quit [Quit: Leaving]
bxh7 has quit [Quit: ZNC 1.8.2 - https://znc.in]
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
gog has quit [Ping timeout: 268 seconds]
vdamewood has joined #osdev
vdamewood has quit [Remote host closed the connection]
vdamewood has joined #osdev
dude12312414 has joined #osdev
vinleod has joined #osdev
vdamewood is now known as Guest9136
Guest9136 has quit [Killed (iridium.libera.chat (Nickname regained by services))]
vinleod is now known as vdamewood
ElectronApps has quit [Remote host closed the connection]
gog has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
eroux has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<zid> Forgetting which way around two's comp works is a good way to introduce a silicon bug
<GeDaMo> Which way around?
gdd has joined #osdev
<GeDaMo> You mean invert then add 1?
<zid> yea
<GeDaMo> Ah
<zid> At least, My circuit spits out 56 and the answer is supposed to be 55, at any rate :P
<GeDaMo> I watched a video where subtract was just add but the 'subtract' signal was used to invert the second operand and was also the LSB carry in
<gog> blew my mind when i finally grok'ed how it worked
<zid> yea I had to implement that
<zid> I have all the inputs regular and inverted fed into various multi-input AND gates to select the operation
<zid> and the sub operation selects a NEG or 'passthrough' into the adder
<zid> as well as the 'add' circuitry
<zid> and the 'neg' is the add circuit but with a carry in of 1
<zid> I fucked it up reimplementing it using black boxes later on cus this game likes to annoy you
<zid> and make you reimplement bitwise ops in levels that are supposed to be about implementing busses
<heat> what's the game?
<zid> 'turing complete'
<GeDaMo> You could feed the second operand into a set of xor gates with the 'subtract' signal as the second input for each in order ro invert
<zid> I think it's all nands
<zid> cus nands are cooler right?
<GeDaMo> Yeah, xor is 4 or 5 nands
<zid> Most annoying part of this game is that they limit the size of the playfield as a 'challenge' but also allow wires to overlap
<zid> so what you end up with is just an unreadable/undebuggable mess
<zid> not is just tied-together-inputs nand afaik?
<zid> in terms of what they teach, in silicon it's just a single transistor
<zid> or rather, in terms of fab processes where it can only make nands
<zid> cus.. of.. power issues or whatever it is
<GeDaMo> Yeah
<gog> they do it because you can use combos of NANDS to make any logic gate
<bslsk05> ​en.wikipedia.org: NAND logic - Wikipedia
<gog> and it simplifes the lithography process because you only ever need to make one kind of gatte
<zid> I think it's because of cmos
<zid> you need a down and an up transistor
<gog> and each of those gates will always have four transistors
<zid> you can't have naked ones
<gog> two P and to N
the_lanetly_052 has quit [Ping timeout: 240 seconds]
terminalpusher has quit [Remote host closed the connection]
<gog> right, because at every gate there's a direct path to Vss or Vdd
<gog> every NAND gate
terminalpusher has joined #osdev
<gog> so the voltage drop across each feature is more or less constant
<zid> zachtronics' silicon game was cool
<gog> less propagation delay
<zid> it didn't have gates only transistors, so you could make arbitrary input count gates
<gog> nice
<bslsk05> ​www.righto.com: Inside the 76477 Space Invaders sound effect chip: digital logic implemented with I2L
<zid> wrong image
<zid> Quad input AND gate
<zid> and quad input OR gate
<gog> oh wow it's like realistic with how the feature looks in silicon
<gog> that's neat
<zid> AND is 'block the voltage 4 times'and OR is 'block the volage in 4 places'
<zid> https://cdn.discordapp.com/attachments/417023075348119556/925792261118242846/8.png Two frequency oscillator, for some reason that's one of the levels, using not not not not not not not
<zid> GeDaMo: That's the blog I was thinking of
<GeDaMo> Yeah, it's good :)
ajoberstar has joined #osdev
mahmutov has joined #osdev
srjek has joined #osdev
the_lanetly_052 has joined #osdev
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
<froggey> zid: welp, you've got me playing turing complete now :|
<zid> kek
scoobydoo has quit [Read error: Connection timed out]
scoobydoo has joined #osdev
heat has joined #osdev
heat_ has quit [Read error: Connection reset by peer]
gog has quit [Ping timeout: 260 seconds]
<terminalpusher> In the UEFI GOP, in what cases is gop->Mode->Info->HorizontalResolution not equal to gop->Mode->Info->PixelsPerScanLine?
<zid> padding? one is physical one is logical? *thinks more*
<heat> terminalpusher, GPUs can pad the framebuffer
<heat> that's why the stride isn't strictly horizontal res * bpp/8
sonny has joined #osdev
<terminalpusher> ooh, so PixelsPerScanLine is physical and HorizontalResolution is logical
<terminalpusher> I see
<terminalpusher> does the GPU pad for performance or something?
<zid> It might just be the case that it wants the res to be divisible by 4 or something
<clever> terminalpusher: some operations in the gpu may act on batches of 4 pixels for example, and it would leak into the next line if you didnt keep each line aligned to a multiple of 4 pixels
<zid> because it uses 16 byte rows in its memory or somesuch
<zid> bmp is like that, fwiw
dennisschagt has quit [Quit: No Ping reply in 180 seconds.]
<zid> you have to pad to 4 pixels
<terminalpusher> hmmm, ah ok
dennisschagt has joined #osdev
rustyy has quit [Quit: leaving]
sonny has quit [Ping timeout: 256 seconds]
rustyy has joined #osdev
gog has joined #osdev
sonny has joined #osdev
vdamewood has quit [Quit: Life beckons]
<ZetItUp> i found a meme that hit far too close to home https://i.imgur.com/Qpy9P8e.jpg
<gog> lmao
sonny has quit [Quit: Ping timeout (120 seconds)]
jeaye has joined #osdev
sonny has joined #osdev
ajoberstar has quit [Ping timeout: 245 seconds]
sonny has quit [Ping timeout: 256 seconds]
sonny has joined #osdev
wand has quit [Remote host closed the connection]
wand has joined #osdev
amine has quit [Quit: The Lounge - https://thelounge.chat]
amine has joined #osdev
dude12312414 has joined #osdev
sonny has quit [Ping timeout: 256 seconds]
sonny has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
sonny has quit [Ping timeout: 256 seconds]
sonny has joined #osdev
terminalpusher has quit [Remote host closed the connection]
heat has quit [Remote host closed the connection]
heat has joined #osdev
sonny has quit [Ping timeout: 256 seconds]
GeDaMo has quit [Remote host closed the connection]
mahmutov has quit [Ping timeout: 268 seconds]
sdfgsdfg has joined #osdev
sonny has joined #osdev
radens has quit [Quit: Connection closed for inactivity]
scoobydoo has quit [Read error: Connection timed out]
scoobydoo has joined #osdev
srjek has quit [Ping timeout: 268 seconds]
* geist yawns
<geist> good afternoon everyone
* gog pours a coffee for geist
<heat> yo
* gog gives a cookie to heat
heat is now known as cookiemonster
<cookiemonster> thanks
cookiemonster is now known as heat
<heat> why is cookiemonster registered
<heat> man
sonny has quit [Quit: Client closed]
<geist> COOKIE
* moon-child feels insufficiently cookied
* gog gives a cookie to moon-child
<moon-child> I have found too many nasm bugs to be denied cookies!
<moon-child> ty gog
sdfgsdfg has quit [Quit: ZzzZ]
<heat> i also found a bug today
<heat> stack misalignment!
<gog> :o
heat has quit [Remote host closed the connection]
biblio has joined #osdev
sdfgsdfg has joined #osdev
<Ameisen> https://pastebin.com/79Hqme8u - my favorite JIT output
<bslsk05> ​pastebin.com: C.EQ0Test(System.String)L0000: jmp short L0003L0002: retL0003: mov eax, - Pastebin.com
<Ameisen> you don't even have to click it!
<Ameisen> mostly
<moon-child> that is not very nice JIT output
<moon-child> ._.
<sortie> Good news: I finished all the TODOs in my Unix socket file descriptor passing code!
<gog> lmao
<sortie> 23 files changed, 1440 insertions(+), 151 deletions(-)
<sortie> Doesn't sound too bad but hoo boo what insertions
<gog> sortie: nice
<sortie> https://gitlab.com/sortix/sortix/-/commit/938ebdcf5a485cfa717dd9cccac2e135ba2e4e5b ← You're not going to believe the silly bug in my code
xenos1984 has quit [Read error: Connection reset by peer]
<bslsk05> ​gitlab.com: Implement file descriptor passing. (938ebdcf) · Commits · sortix / Sortix · GitLab
<sortie> gitlab conveniently collapses kernel/pipe.cpp by default for your sanity