MiningMarsh has quit [Read error: Connection reset by peer]
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
smach has quit [Remote host closed the connection]
MiningMarsh has joined #osdev
lkurusa has joined #osdev
Celelibi has quit [Remote host closed the connection]
lanodan has quit [Ping timeout: 265 seconds]
lanodan has joined #osdev
Celelibi has joined #osdev
isaacwoods has quit [Quit: WeeChat 3.7.1]
MiningMarsh has quit [Read error: Connection reset by peer]
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
dude12312414 has quit [Ping timeout: 255 seconds]
dude12312414 has joined #osdev
<kazinsal>
yeah I've mentally always rhymed it with flange
* kazinsal
ducks
<klange>
y'all are getting bans for christmas this year
<Mutabah>
Hey, you've never provided a pronounciation guide
<Mutabah>
(At least, not here)
<Mutabah>
So technically, this is your fault :)
<moon-child>
'rhymed with flange' likewise
<klange>
There was a discussion on the matter in this channel's pedecessor circa 2018.
<gorgonical>
the website does specify how to say it tho
<moon-child>
hmmm it's hard to tell because my logs are spread over 3 computers, but I _think_ I wasn't there at the time
<moon-child>
one log drops off in aug 2018 (nothing for 'pronounc' there), and another picks up in 2020
<gorgonical>
I assume that it's said the way it's written on the toaru website right
rwxr-xr-x has quit [Ping timeout: 264 seconds]
gorgonical has left #osdev [Changed major mode]
epony has quit [Ping timeout: 268 seconds]
[itchyjunk] has quit [Ping timeout: 260 seconds]
[itchyjunk] has joined #osdev
gorgonical has joined #osdev
gorgonical has left #osdev [Killed buffer]
gorgonical has joined #osdev
MiningMarsh has joined #osdev
<graphitemaster>
I always thought it was pronounced. Kay, Lang, ee
vdamewood has quit [Remote host closed the connection]
vdamewood has joined #osdev
rwxr-xr-x has joined #osdev
<rwxr-xr-x>
well shit yall
<rwxr-xr-x>
i had a 103 degree fever
<rwxr-xr-x>
now at 102.4 but holy
<rwxr-xr-x>
any tips to get sleep tonight???
<gorgonical>
There's a trick you can use: take a very hot bath, as hot as you can tolerate safely. Then when you get out, try to go somewhere cooler. The drop in body temperature supposedly helps make you tired. Might help relax you and get you to sleep
[itchyjunk] has quit [Remote host closed the connection]
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
<geist>
huh i wouldn't have thought that, but that just might work
<moon-child>
once I was rather sick and had a fever and a friend told me to take some codeine. I think it helped somewhat. Though I think it's not otc in the west
<zid>
it's otc in the uk
<zid>
but only blended with paracetamol
<gorgonical>
and also in mexico. I don't know about the us though
<zid>
I think fentanyl is otc in the US at this point :p
<moon-child>
yeah it was part codeine, part paracetamol
<zid>
What you want is a pint glass full of vodka, dramamine, ephedrene, heroin, etc
rwxr-xr-x has quit [Remote host closed the connection]
MiningMarsh has quit [Ping timeout: 255 seconds]
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
epony has joined #osdev
MiningMarsh has joined #osdev
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
<zid>
heat: it's almost day 8, better hurry up with day 7
dude12312414 has joined #osdev
xenos1984 has quit [Quit: Leaving.]
heat has quit [Ping timeout: 256 seconds]
<gorgonical>
I just realized I have a problem with my forth interpreter that should have been obvious a month ago but wasn't thinking about
<gorgonical>
That my load address won't be 0x0. lol
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
MiningMarsh has quit [Read error: Connection reset by peer]
<zid>
Took me longer to remember how to print in green than anything else I think re advent :p
<bslsk05>
wiki.osdev.org: UEFI App Bare Bones - OSDev Wiki
<heat>
rando idea, i don't know if this is new: make the kernel write a value to a user pointer on context switch in and another on switch-out. this makes it so user code can know if a thread is scheduled in and could make it adapt on, for instance, mutex spinning
<zid>
the legendary ovmf
<zid>
the thing qemu always prints if you fucked up loading an elf properly, but has no other use.
<heat>
so you could effectively write adaptive mutexes with this pseudo-feature i'm making up
<heat>
Ermine, use -bios OVMF.fd
<Ermine>
heat: thank you.
<heat>
I've never seen -pflash
<heat>
I do know -bios works
<heat>
now back to my Great Idea(tm), I think this should have negligible overhead on context switches. to make sure we don't page fault you could do something like lock that specific page holding the address
<zid>
looks like -pflash is the generic one
<heat>
obviously handling a page fault (from disk, from swap) is not viable
<zid>
and -bios is the x86 one
gxt has quit [Ping timeout: 255 seconds]
gxt has joined #osdev
<Ermine>
-pflash opens OVMF.fd for reading somewhy. Unlike -bios
<heat>
-bios should also open it for reading
<Ermine>
heck, s/reading/writing/
<heat>
-pflash probably expects a non-ROM region
<heat>
OVMF.fd is not (supposed to be) writable btw
<heat>
in theory you can but OVMF itself does not support it
<Ermine>
Exactly, so I couldn't launch qemu without root. with -bios it works rootless.
<heat>
OVMF_VARS.fd is the bit that should be -pflash'd for a writeable memory region
<bslsk05>
github.com: sophia/debug.sh at myefi · adachristine/sophia · GitHub
<gog>
i copy ovmf_vars.fd to my run directory
<gog>
and just use ovmf.fd in place
<gog>
wherever that is in your distro
MiningMarsh has quit [Ping timeout: 260 seconds]
<Ermine>
Yay, tried it on real hardware, it works!
Bonstra has joined #osdev
invalidopcode has quit [Remote host closed the connection]
invalidopcode has joined #osdev
<epony>
did you forget to run the tests?
xenos1984 has quit [Ping timeout: 256 seconds]
gxt has quit [Ping timeout: 255 seconds]
gxt has joined #osdev
xenos1984 has joined #osdev
MiningMarsh has joined #osdev
<gorgonical>
Okay I think I understand why the linker is seemingly not using pcrel addressing
<gorgonical>
Two reasons: I hadn't turned on no-relax so it was trying to relax stuff, which can be fine. But more importantly, I think the linker doesn't understand my NEXT macro and as such doesn't/can't understand that when I say .word QUIT I want it to magically replace that with the pc-relative version
gareppa has joined #osdev
nikitalocalhost has joined #osdev
nlocalhost has quit [Ping timeout: 252 seconds]
nyah has quit [Remote host closed the connection]
Burgundy has joined #osdev
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
gildasio has quit [Remote host closed the connection]
gog has quit [Read error: Connection reset by peer]
gdd has quit [Ping timeout: 246 seconds]
kaichiuchi has joined #osdev
gareppa has quit [Quit: Leaving]
invalidopcode has quit [Remote host closed the connection]
invalidopcode has joined #osdev
dude12312414 has quit [Ping timeout: 255 seconds]
gog has joined #osdev
<kaichiuchi>
someone do me a favor, if at all possible
<kaichiuchi>
please highlight me
<mrvn>
me
<kaichiuchi>
thanks
<kaichiuchi>
I have come to the conclusion that IRC interfaces are garbage
dude12312414 has joined #osdev
<sortie>
kaichiuchi
<kaichiuchi>
thanks
<gog>
irc is perfect in every way
<gog>
it is the best protocol
<kaichiuchi>
here's the problem
<geist>
all hail irc
<gog>
it will survive the coming nuclear and or climate apocalypse
<sortie>
Tonight in osdev: I'm debugging a deadlock when my OS, which was built on itself, spawns a qemu, to boot up the new version built on itself
<kaichiuchi>
a) yes, all hail IRC
<kaichiuchi>
b) Quassel was nice until it looked *really* bad on my mac and there isn't a decent iOS client for it
<sortie>
I'm starting to worry the AI hallucinating all of this osdev does simply not nest that deeply
<mrvn>
don't worry, it has infinite many parents.
<kaichiuchi>
on ubuntu Quassel looked great, but because I'm not using Quassel anymore (i'm using ZNC), google led me to hexchat
<gog>
what about irccloud'
<geist>
i started to try to figure out how to do bare metal rust last night. managed to eventually set up a cargo build to generate a static library that seems reasonable enough to try to link it with codez
<kaichiuchi>
and hexchat looks like hell
<sortie>
An OS isn't supposed to ssh into its own clone
<kaichiuchi>
gog, I used to use IRCCloud
<geist>
now i just need to bust out some asm to get it bootstrapped and start filling in the details
<gog>
i have android i'm spoiled by revolutionirc
<sortie>
gog, hey I use that too!
<kaichiuchi>
i really like what Quassel has in mind but jesus christ
<gog>
i used to use yaaic
<geist>
re: irc clients i basically ended up switching to irccloud full time, after 20 years of using irssi
<gog>
which i loved
<sortie>
I just use hexchat on desktop
<gog>
desktop irc clients are numerous
<sortie>
Or my irc(1) hack natively
<gog>
just pick one it's fine imo
<kaichiuchi>
I'm 28 now, but when I was 13 until I stopped using IRC full time (read: when Discord killed it), I used irssi
<geist>
but it is also nice to stay logged in all the time, assuming that's important for you
<sortie>
You ever one of those days when you take an old IRC bot, rip out the logic, slap on a UI and a fresh coat of paint, and call it an IRC client
<gog>
if i really cared about that i'd buy a shell and use irssi in a terminal tbh
<gog>
in tmux
<gog>
i used to use that setup and it worked great
<geist>
yah that's what i basically did since forever
<kaichiuchi>
IRCCloud has a native iOS app
<kaichiuchi>
I'm starting to regret leaving IRCCloud
<geist>
and can still fall back to if irccloud dies
<geist>
yah the android and ios app are pretty good
<gog>
let's all pool our money on a vps
<kaichiuchi>
my thought was essentially this: do I pay $5 for one service, or $5 (nanode) for a VPS that I can do IRC on, along with other things in the future
<gog>
also buy a domain and have a mastodon instance
<gog>
osdev.lol
<geist>
they're pretty cheap now. could grab a super low end specced freebie tier arm one on AWS which is perfectly suitable for running irssi
<geist>
kaichiuchi: right
<gog>
bring back osdev community on not discord
<kaichiuchi>
except everything is just... bad
<geist>
what i did get used to was things like auto pastebin and image stuff in irccloud that is frankly kinda nice
<gog>
we'll make a killer web client
<gog>
:P
gdd has joined #osdev
<kaichiuchi>
one of the reasons I stopped using irccloud was the fact Textual kept fucking up with IRCCloud somehow
<gog>
but imo
<kaichiuchi>
but I'm starting to think that I've made a mistake
<kaichiuchi>
sigh
<geist>
why? you can just go back. it's not like you've permanently burned some bridge
<gog>
unless you were paying for it
<kaichiuchi>
heh, no I know
<kaichiuchi>
I know I sound like all hope is lost
<gog>
nah
dutch has joined #osdev
<geist>
yeah i mean, like, just use what works for you
MiningMarsh has quit [Ping timeout: 268 seconds]
spikeheron has quit [Quit: WeeChat 3.7.1]
<gog>
fediverse supersite for osdevving
<gog>
cmon
<gog>
let's do it
<geist>
omg i switched keyboards and now my life is dooomed.... of coruse the old one is right there on the bed. but it's over there
<geist>
DOOOOOOOMM
<gog>
i need to buy a better one to use at work
<gog>
the one they gave me is trash
<gog>
my computer is way too fancy and expensive for that kind of thing
<geist>
(actually happy with my keyboard, but was trying to badly make a point)
<gog>
:P
<geist>
my trusty ol daskeyboard is still working like a champ here
<geist>
i get new ones, i piddle weith things like type Ms and whatnot, and i end up just going back to the daskeyboards
<gog>
i've pointed out to the CEO a couple times that i want a workstation but it's gotta be something that isn't a thinkpad because they're not that good anymore
<gog>
he laughed at me
<gog>
he's gonna buy me a computer for that slight against my ego
<kaichiuchi>
so
<gog>
sorry
<kaichiuchi>
on an unrelated note, I am converting my company to LLVM from IAR
<gog>
nice
<geist>
hah someone is still using IAR
<kaichiuchi>
they hate it
<kaichiuchi>
they absolutely hate it
<geist>
for good reason
<kaichiuchi>
then I got hired and I said "wtf IAR?"
<geist>
didn't know it still exists honestly
<kaichiuchi>
they're like "yeah. wanna do something about it?"
<geist>
this is where you find all the dumb shit that folks have written against specific compiler behavior
<gog>
we have software we hate that needs replacing but it means gutting half the application lol
<geist>
have fun
<gog>
applications
<gog>
we're fucked
<kaichiuchi>
yeah I'm not exactly looking forward to it
<kaichiuchi>
but... we also don't compile with optimizations, which was a surprise
<geist>
also worrisome. like maybe it breaks if you do?
<gog>
it will
<gog>
it's basically guaranteed in any large application
<kaichiuchi>
well, problem
<geist>
yah that's ar eason someone may have years ago turned it off
<kaichiuchi>
we're going to run out of space soon
<kaichiuchi>
-Os/-Oz would be a *really* big help right now
<geist>
yah for lots of embedded style stuff that's totally fine
<kaichiuchi>
this is my first job involving embedded anything
<kaichiuchi>
lots of surprises...
<geist>
oh fun
<geist>
suggestion: get familiar with ARM assembly and always dissassemble what you're building
<gog>
dang
<gog>
i want that job
<geist>
and keep an eye out for weird shit
<gog>
lol
<geist>
it matters a lot in embedded
<geist>
also run 'size' on the output so you can get a feel for where the text/data/etc is going
<kaichiuchi>
gog, yeah, I was stoked when I got it
<kaichiuchi>
it's exactly where I want to be
<kaichiuchi>
geist, I am doing my best to get familiar with ARM assembly
<kaichiuchi>
heh
<gog>
i do web dev and it's fine and i like my job and the culture is just my speed
<gog>
but i hate web dev
<kaichiuchi>
i live on the east coast of the US
<kaichiuchi>
90% of the jobs are web dev
<gog>
iceland :P
<kaichiuchi>
either web dev, or military/defense contractor bullshit
<gog>
yeh
<gog>
i didn't wanna do my internship with lockheed martin
<gorgonical>
we're already past this put I now use emacs' rcirc as a client
<gog>
so i didn't
<kaichiuchi>
the only reason I got this job was some recruiter called me and I hated my current job immensely (i was in the semiconductor industry as a manual tester!)
<gog>
i dropped out of school disillusioned and battling my mental health :P
<kaichiuchi>
understand that at my prior job, we made machines that a Big Name uses for die bonding
<kaichiuchi>
and the software was 99% manual tested.
<kaichiuchi>
it was then I knew that I had to jump ship
<gog>
serious industrial control stuff
<kaichiuchi>
no, it was bad
<kaichiuchi>
really bad
<gog>
oof
<kaichiuchi>
I don't want to say too much about my former employer's anything, but suffice it to say that the codebase is unmaintainable and once the old guys retire no one is going to be able to understand it
<gorgonical>
regarding my forth: is there an easy way to solve the problem that threaded code contains pointers to rountines/words to execute, but they aren't pc-relative. I see two ways forward: invent a way to relocate those pointers or avoid the problem and make sure the linker starts it where the bootloader will put it
mctpyt has joined #osdev
<kaichiuchi>
hang on, be right back
mctpyt has quit [Remote host closed the connection]
kaichiuchi has quit [Quit: ZNC 1.8.2+deb2build5 - https://znc.in]
<gorgonical>
My thought is to have the linker put it at the right address for now, just so I can test that other things work
kaichiuchi has joined #osdev
<kaichiuchi>
hi
<gorgonical>
wb
<mrvn>
gorgonical: any global you take the address of (including code) makes your code require relocations or fixed position.
* mrvn
wants position relative pointers.
<mrvn>
Meaning a pointer is stored as the offset of the object and where it is stored.
<geist>
we actually use that feature in fuchsia. it's an abi breaker but the C++ vtables are 32bit relative to the vtable
<kaichiuchi>
yay irccloud
<geist>
there's a switch on clang for it
<mrvn>
geist: how do you do that?
<mrvn>
patched gcc/clang?
<gorgonical>
mrvn: yeah that's possible in principle, but I don't have a clue how i'd figure that out in raw asm
<geist>
well, we dont keep patches, so it's got to be in mainline
<geist>
we might only enable it for our particular triple, but i bet there's a command line switch for it
<bslsk05>
reviews.llvm.org: ⚙ D72959 Relative VTables ABI on Fuchsia
<geist>
but these are a few years old, so i bet it's more mainstream now
<geist>
note it's not free: now it means all virtual calls via the vtable have to do a few instruction sequence to do the math
<geist>
but the amount of load-time patching goes down a lot
MiningMarsh has joined #osdev
<kaichiuchi>
test
<kaichiuchi>
okay I think it worked
<mrvn>
geist: you will already have the vtable in some register so it should be just one "add" to get the final address
<mrvn>
geist: and vtables get smaller so you might even win on cache efficiency
<geist>
sure. like i said you need a few instruction sequence
<mrvn>
s/few/one/ is what I'm saying
* geist
shrugs
<geist>
depends on the arch, how you got the vtable pointer, etc
<mrvn>
might be a few on x86 where you first have to free a register ...
<geist>
right, whereas you might have been able to do basically a direct dispatch before
<geist>
call *address*
<geist>
but yeah you could do a lea PCREL<vtable>, reg; call [reg + offset]
<geist>
or whatever
<mrvn>
hmm, that would only work if you know the address of the vtable but then the compiler eliminates the virtual call
<geist>
i could dig around for an exmaple but i donmt have one handy right now
<mrvn>
lea PCREL<vtable>, reg also assumes you know the address of the vtable
<geist>
oh yeah it'd be pointed to by the object, so actually easier
<mrvn>
What I think you will get as code is loading the address of the vtable from the object and then load the function address as offset to that reg
<geist>
well sure, that's literally what it has to do, but question is what is a nice sequence for that on various arches
<mrvn>
So object in R0, vtable in R1, 32bit offset in R2, add R2, R2, R1, b R2
<geist>
it probably 'hurts' x86 more sicne it's possible you could have avoided trashing as many registers in the non relative sequence
<mrvn>
I might be totaly wrong but I think you can't get a different sequence because those would get optimized further.
<geist>
but on an arch like arm64 it was probably already going to have to make two loads anyway to get the address into a reg to call
<geist>
so in arm64 you're really just adding another add instruction to an already double load sequence
<mrvn>
nod
<mrvn>
If you can eliminate any of the loads then you can eliminate the virtual call and the compiler will do that.
<geist>
interestingly riscv may have actually been nicer before, since it has a jsr [reg + offset] instruction, iirc
<geist>
as long as the offset is within 2K
<geist>
oh wait, no never mind. still woul hdave to double load
<mrvn>
is that a indirect jump?
<geist>
yah no it isn't. disregard
<geist>
it *is* odd that riscv has a jmp reg + offset instruction, which is a little strange. most arches have a indirect branch/jmp/call but usually without a offset like that
<geist>
but it actually fits into the way they compute large addresses
<mrvn>
geist: great for jump tables
<mrvn>
assuming all your target addresses are within 2k
<geist>
actyually what it's for is they have an instruction that computes a 12K aligned address, and then you 'fill in' the last 12 bits in the jmp instruction
<geist>
for 'far' calls basically
<j`ey>
4k aligned?
<geist>
4K yes
<geist>
12 bit aligned
<geist>
it's very similar to how arm64 does it, except that riscv doesn't burn bits in a large relative branch instruction like arm64 does
<geist>
so it falls back to a 2 instruction sequence to compute an address and indirect it much more often
<geist>
but it's at least only 2 instructions, because the jsr has the 12 bit offset, etc
lkurusa has quit [Quit: I probably fell asleep (or went out). Who will ever know.]
<geist>
downside is of course you actually do more register indirect calls than you would have otherwise, so i guess it's up to the branch predictor to remember what's up
<geist>
OTOH it hink modern branch predictors dont really care about register indirects anymore. they treat them just like regular branches and goes ahead and predicts them as usual
<geist>
though it does seem like if the branch cache is cold it's harder for it to 'run ahead' and fetch through it since it can't know what is in the register yet
<mrvn>
you mean they predict the contents of the register?
<mrvn>
It's not a conditional branch so there is no predicting a yes/no state
<geist>
i think most BTBs nowadays just remember where it went last and just go through it
<geist>
but i dunno what the usual strategy is for a 'cold' hit on a branch that's indirect
<geist>
but branch prediction is still a hot area of development/etc so honestly i dunno what the current state of the art is
<gorgonical>
my understanding is that branch predictors are now monstrously complex and considered black magic
<mrvn>
geist: probably. Remembering if the branch was taken would mean you still have to do the address computation for where it ends up.
* geist
nods
MiningMarsh has quit [Read error: Connection reset by peer]
<moon-child>
I think they can remember a couple of indirect addresses now
<moon-child>
what I want to know (and am too lazy to test) is whether the overhead goes away completely if you compute the address far enough ahead of time
<moon-child>
(say, 15-20 cycles)
<geist>
yeah
<geist>
mrvn: asked the origiunal author of the patch at they say you can just use the vtable relative stuff with -fexperimental-relative-c++-abi-vtables
FreeFull has quit []
<geist>
only real caveat is it will break the ABI so you can't mix and match code compiled with and without