karenw has quit [Quit: Deep into that darkness peering...]
[Kalisto] has quit [Quit: Ping timeout (120 seconds)]
[Kalisto] has joined #osdev
Matt|home has quit [Ping timeout: 260 seconds]
agent314 has quit [Ping timeout: 276 seconds]
Jari-- has joined #osdev
agent314 has joined #osdev
carrar has joined #osdev
agent314 has quit [Ping timeout: 248 seconds]
goliath has joined #osdev
Jari-- has quit [Ping timeout: 276 seconds]
kj7 is now known as kishy
sprock has joined #osdev
agent314 has joined #osdev
agent314 has quit [Quit: WeeChat 4.5.2]
agent314 has joined #osdev
agent314 has quit [Max SendQ exceeded]
agent314 has joined #osdev
Lucretia has joined #osdev
GeDaMo has joined #osdev
xvmt has quit [Read error: Connection reset by peer]
xvmt has joined #osdev
swiftraccoon has quit [Server closed connection]
lain` has quit [Remote host closed the connection]
netbsduser has joined #osdev
bslsk05 has quit [Server closed connection]
<isabella>
here's a free osdev idea for all your next generation systems: a dedicated fd in every program specifically to report nonsense errors
<isabella>
"file not found" -> fd 2 "what you just asked makes no sense whatsoever" -> fd 777
<isabella>
then i can redirect fd 2 and still get the other kinds of errors
<heat>
what the heck does that mean
<heat>
why do you care
<zid>
so like -vvv
<zid>
but as an fd
<zid>
I do like the idea of programs that are sort of, 'aware' though
<nikolar>
that also expects your users to care about using that
<zid>
That is, they know that they exist in an ecosystem
<nikolar>
which is a lol
<zid>
so rather than idk, couldn't do thing, it'd be like "did you make sure to install libwat? and SSHD_CONFIG is set?"
<zid>
like, accelerated lived experience training :P
<zid>
so rather than having to learn "Ah yea I've seen that error before, it happens when x"
<zid>
like how C compilers eventually started saying "You likely missed a semicolon ^ here"
<zid>
but linkers are still inscruitable
<heat>
you can just do that over regular stderr
<heat>
i suspect isabella is trying to parse stderr
<heat>
and, like
<heat>
please no
<heat>
don't
<zid>
aye, and they do
<zid>
notably, gcc
<isabella>
i didn't try to parse it
<zid>
I prefer that to "Error: Failing" at least
<isabella>
i just suppressed more stuff than i wanted to
<zid>
which is what bloody windows programs do
<heat>
Something happened
<heat>
Something happened
<heat>
warra error message
<kof673>
that is perhaps like syslog if you want to go all out :D
<zid>
warra?
<heat>
warra
<zid>
warra?
<kof673>
but that is for "daemons" perhaps specifically
<heat>
warra.
<zid>
heat stop being a fuck
<zid>
answer the question that you know I am asking
<heat>
kof673: no you can use syslog on any program
<heat>
i don't know what you're asking buddy
<heat>
sorry
<zid>
[09:50] <heat> warra error message
<zid>
[09:50] <zid> warra?
<zid>
If you don't know what the question is, how are you even managing to breathe. Do you have it on tape? Someone's voice in your headphones saying "Breathe in. Breathe out." over and over?
<zid>
(also it's northern dialect transcription, not fucking internet slang)
<zid>
You don't speak northern though, you speak balkan
jjuran has quit [Ping timeout: 248 seconds]
jjuran has joined #osdev
<heat>
> I'm not sure how this will play out long term, but I really am not a fan of having to feel like I'm using a limited resource whenever I use an LLM
<zid>
well at least they're being realistic
<heat>
tfw someone tries to stop me from using 5 moderate size european villages worth of water every week for my javascript AI code completion
<zid>
because yes, you're being massively subsidised atm, and it will explode soon
<zid>
openai still spending $12 of compute for every $1 of income?
<GeDaMo>
Claude just got rate limits
<heat>
yeah this is on the hn post about that
<zid>
meta/amazon/microsoft/google/tesla have spent $560 billion for $35 of revenue, so that's 16x lol
<zid>
$35B*
<nikolar>
you just don't get it zid
<nikolar>
ai is the future
<zid>
ohhh
<nikolar>
there we go
<zid>
I should be less worried, all of the AI companies are promising that late 2025 will be 'phase 2'
<nikolar>
obviously
<zid>
Which I assume means "The US stock market, which is 35% those tech companies, drops 20%"
<nikolar>
no, no
<nikolar>
it doesn't drop 20%
<zid>
goes up 20% per day because of AI?
<nikolar>
now you're getting it
<GeDaMo>
I read something that said these companies keep throwing money into new things so they can keep being regarded as growth companies
<zid>
"AI, make this number go up 20%" is a thing it can do afterall
<zid>
GeDaMo: Yea, capitalism demands it at least for mid-sized companies
<GeDaMo>
If the market sees them as non-growth, they're valuation drops a lot
<zid>
If you're not growing faster than inflation, you're shrinking, and then your investors pull out
<zid>
and no investors means no new projects
<zid>
which means you are a FAILED BUSINESS
<zid>
(even if you're making billions in revenue and employing thousands of people)
<zid>
and could comfortably stay running at inflation-0.5% for the next 200 years
<nikolar>
maybe forcing companies, by law, to make profit for their share holders at any cost was a mistake after all
<zid>
How dare you shit on the american dream nikolar
<nikolar>
oh my bad
<zid>
That one day, I will wake up rich, I will talk to my investment broker, and he'd make me super rich forever
<zid>
is what it means to be american
<kof673>
u.s. dream. america was common law, corporations are an import. this is all dc stuff technically :D
<kof673>
ye olde america was more amish-like perhaps lol
pebble has joined #osdev
TkTech2 has joined #osdev
TkTech has quit [Ping timeout: 248 seconds]
TkTech2 is now known as TkTech
agent314 has quit [Quit: WeeChat 4.5.2]
agent314 has joined #osdev
lain` has joined #osdev
agent314 has quit [Quit: WeeChat 4.5.2]
sortiecat has joined #osdev
pebble has quit []
edr has joined #osdev
jcea has joined #osdev
<Mutabah>
zid: Thanks for the tip on the BIOS handoff for xhci. Didn't solve the interrupt issues, but did solve the XHCI deadlock issue
<zid>
yup yup
<zid>
your acpi issue is "you did it wrong"
<zid>
but I can't fix that
<Mutabah>
Did it wrong is likely. Question being "where"
jjuran has quit [Read error: Connection reset by peer]
jjuran has joined #osdev
<zid>
bios left x2apic enabled and all your shit is showing up on socket 2 cpu 4, sorry for the bad news :P
<heat>
x2APIC is BASED
<heat>
that reminds me of a stupid problem in MSI on x86
<heat>
where you can't target APIC IDs > 255 without an IOMMU
<heat>
:))))))))))))))
<zid>
I have a slick solution to that
<zid>
don't have more than 255 cores
<zid>
that's stupid
<heat>
that would sound reasonable but APIC id assignment isn't predictable like that on many platforms AFAIK
<zid>
Not my fault they numbered things dumbly
<zid>
don't do that, either
<AmyMalik>
not my fault i'm scrongling too hard
<heat>
yeah but you need to pick up the fucking pieces
<zid>
"because amd numbered the cores wrong, ask for an updated cpu, you ordered 8000 of them, you have their contact details"
<heat>
yeah and then amd tells you it's a kernel problem and you need to use the IOMMU
<nikolar>
i mean it's a kernel problem, because amd ain't gonna solve it
<zid>
you're not a big enough customer yet
<zid>
try being a bigger one and it will be amd's problem again
<zid>
nvidia doesn't have unit tests for being <3 scanlines of lag because of their generosity
<nikolar>
well dang
<zid>
it's because of customers
<nikolar>
why didn't i think of that
<Mutabah>
zid: Hmm... x2APIC is a good point, but that spec does imply no change to the IOAPIC
<Mutabah>
and the LAPIC timer works... only thing that definitively does
<zid>
lapic is internal though
<zid>
ioapic is the PIC replacement
<zid>
lapic is the per-core exception/message port
<Mutabah>
yep.
<Mutabah>
I guess maybe the interrupt is being generated and delivered to an invalid core... but that'd be unlikely, all enumerated cores are running. So if the BIOS had the interrupts working, they should stay working to some extent
<Mutabah>
buut... x2APIC would explain the IOAPIC reporting a version number of 0x20
<zid>
I broke my qemu whoops
<zid>
time to remember how I configured it last time
<nikolar>
kek
<nikolar>
how did you manage to break it
<zid>
that emerge world I did updated fuse and my qemu is hand-built
<Mutabah>
It's just the log messages, don't be scared :)
<nikolar>
oh crust
<nikolar>
who's scared
<zid>
can I get it without the broken ansi escapes
<nikolar>
kek
<nikolar>
zid, are we giving up usb for now kek
<zid>
well you stopped wanting to build things, and I ran out of ideas
<zid>
it took me 3 weeks to get one build out of you
<zid>
unless you wanna say fuck it and do xhci :P
<nikolar>
well sorry
<nikolar>
kek
<nikolar>
we can try
<nikolar>
i mean not right now, but yeha
<Mutabah>
zid: Oops, lazy copy. Fixed
<Mutabah>
Thanks for looking though :)
<zid>
Mutabah: and info pic shows good shit if you run it in qemu?
<Mutabah>
It just works in qemu
<zid>
and doesn't print silly things like IOAPIC #2
<Mutabah>
This is real hardware. A recent-ish dell optiplex
<zid>
on hw?
<nikolar>
zid: assuming we get usb going, how sucky would networking over usb be do you reckon
<zid>
just as bad as ethernet
<zid>
but worse cus usb bugs
<nikolar>
yeah another layer inbetween
<Mutabah>
nikolar: Now you have two problems :)
<nikolar>
yup
<zid>
Mutabah: afaik ioapic is a couple of low down regs, then a u64 for each vector?
<zid>
with dest, delivery mode, etc
<zid>
how does delivery status respond on hw? never goes high? never goes low?
<Mutabah>
zid: Yep. Three common registers, they're dumped in the above with `regs=[...]` then the IRQ redirect table, which is those `IRQ nn` lines
<zid>
I assume I should see an ..800 if any are delivery status = 1?
<zid>
the bottom bits look fucking random except they're all stuck 0x10xx
sortiecat has quit [Read error: Connection reset by peer]
<zid>
infact it all looks like noise
<Mutabah>
Yeah... that's what confuses me, although there's enough pattern to trust it... slightly. Plus, since it's an indexed register file - it's hard to get accesses wrong
<zid>
zero it all then just fucking set every single one to deliver to apic id of your bsp vector 55 or something?
<Mutabah>
Hmm... that 1 is in a reserved part of the register
sortiecat has joined #osdev
<zid>
Like, there's no way that's how you configured your IRQs lol
<Mutabah>
Nope, that's straight out of the firmware
<chiselfuse>
are the comparisons mentioned here supposed to be done by the kernel during the repeatable sequence or by the userspace code in the repeatable sequence?
goliath has quit [Quit: SIGSEGV]
<chiselfuse>
i hope someone can help me because i'm stuck. i read all results i got on rseq on google and i still cant wrap my head around how it works
<chiselfuse>
and since we are supposed set it to the boundaries of the restartable sequence *anyways* before it enters (as L115 instructs us) and since L114 implies that's in turn to be able to save `cpu_id_start` before we set it, then i guess reading `cpu_id_start` and writing `rseq_cs` causes some kind of effect in the kernel?
<chiselfuse>
this is so hard to understand
<chiselfuse>
i just want to understand what abi it provides, not even interested in how it's implemented
<clever>
an ABI is just a contract on how binary data is laid out
<clever>
things like what register the 1st argument will be in, or the layout of fields in a struct
<heat>
as always, with linux the concepts are murky
<chiselfuse>
clever: doesn't matter. this mechanism is described as an "ABI" between userspace and kernelspace, and you can only use it using things like inline assembly so it fits the definition
<chiselfuse>
and what if i don't do `if (cpu != TLS->rseq::cpu_id) goto abort_ip;` in my restartable sequence as instructed by that algorithm at L103? does the mechanism magically break or something? is it forcing me to use it a certain way because it will break otherwise or is it telling me i'd most likely want to use it this way
<chiselfuse>
it's not clear how it works because they don't explain what it provides
<chiselfuse>
and making an experiment to try and see is very hard
<chiselfuse>
and as far as i could find, debuggers go haywire with it
goliath has joined #osdev
Turn_Left has joined #osdev
getz has quit [Server closed connection]
getz has joined #osdev
Left_Turn has quit [Ping timeout: 244 seconds]
alpha2023 has joined #osdev
libercv has joined #osdev
<chiselfuse>
within the restartable sequence, the kernel automatically aborts if it gets preempted, switches cores, or gets a signal. why does it matter whether or not the CPU is the same one that the thread was on *just* before entering the restartable sequence
<heat>
i have a weird crash that seems either TLB shootdown caused, or somehow tangentially related
<heat>
where only sending IPIs to cpus with that mm active (per my bitmap) crashes, but doing a full broadcast does not
vdamewood has quit [Quit: Life beckons]
gareppa has joined #osdev
kof673 has quit [Ping timeout: 276 seconds]
<geist>
hmmm!
<heat>
indeed
<geist>
maybe double triple super check that it's sending to the right cpus
<heat>
i checked the atomic operation ordering, it was slightly incorrect
<geist>
like the selective sending algorithm is busted
<heat>
but i fixed it
<geist>
and has been this whole time
<heat>
an x86 cr3 load is fully serializing on x86 so that's okay
<heat>
i added an extra debug check and i'm seeing weird inconsistencies
<heat>
so i guess that's where i'm looking now...
kof673 has joined #osdev
karenw has joined #osdev
<heat>
ha ok
<heat>
i think there were both races and errors in logic
<heat>
that basically made it go oopsie
<heat>
like, if an incoming thread had the same address space i would do: unset(); load(); set();
<heat>
and that's just wrong, has multiple races
<heat>
the x86 load is "fancy" (due to legacy reasons) and checks if the cr3 is the same, so that wouldn't even result in a barrier
<heat>
plus wild speculation and i can see shit hitting the fan
<heat>
i'm not sure if i observed this on the KBL, but the zen 5 cores, man, they go hard
<Ermine>
could have seen that on raptor lake
<heat>
all in all this is really freakin gung-ho and should be somewhat moved out to architecture code
<heat>
as in this is totally broken on certain architectures, depending on how weak/strong their page table loading is
<heat>
for arm it's not serializing at all, not sure for riscv
<heat>
and it's full of... weird confusing logic. i don't like it at all
goliath has quit [Quit: SIGSEGV]
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
gareppa has quit [Quit: WeeChat 4.5.1]
<ZetItUp>
several months later i finally got to the point i wanted, created some basic tiny filesystem, make a bootloader which loads the kernel from a set location in the filesystem :D feels good
<geist>
heat: word
<geist>
this is in that shared page table stuff you wrote?
<heat>
no
<geist>
yeah i'd leave the final switch to arch code
<heat>
this is older, less careful code
<geist>
word
<heat>
excel
<geist>
either way anything that involves swapping the aspace should live in arch code so it can do all the appropriate bits
<geist>
doubleplus when you get toe ASIDs and whatnot
<heat>
yep
<geist>
have you tried using the zen 5 delayed TLB stuff?
<heat>
no
<geist>
alas the beefiest zen i have is a zen3
<heat>
i should, for the kernel flushes at least
<geist>
for lulz if nothing else
<geist>
also side note i saw some refrerence to FRED in the newer qemu release notes
<geist>
dunno if it's fully implemented or whatnot
<heat>
userspace is tougher because you need some proper way to decide if a process should have an ASID or not
<geist>
and yeah with 16bit ASIDs on arm and riscv it's *fairly* straightforward
<heat>
i mean, it still doesn't work there
baraq has quit [Server closed connection]
<heat>
i think you always need the logic
<geist>
but those two arches more or less assume you have consistent ASIDs across all cores
baraq has joined #osdev
<geist>
with x86 it's a mess
<heat>
wdym?
<geist>
well 12 bits being not enough to actually get you what you want
<heat>
neither are 16
<geist>
and not having global shootdown instructions *except* for zen5
<geist>
so now you have both mechanisms
<geist>
well..... there's are there enough bits to track *all* processes and there's are there enough bits to track all *active* processes
<geist>
16 yeah for now, 12 yuo can get there pretty quick
<heat>
like yeahhhhhhhhh in theory you can limit yourself to 64K processes
<heat>
but In The Real World that's not enough
<geist>
no i mean 64k *cpus*
<geist>
ie, can you have more than that active on the system at one instant in time
<geist>
that's the fundamental thing the ARM design assumes
<heat>
ok sure but what does that get you?
<geist>
sice yu can recycle asids globally, but you have to have all cores seeing the same list at the same time
<geist>
vs the x86 linux design where all ores have their own list of what an ASID means
<geist>
works great, but it's based on the assumption that you dont have an instruction that does it all for you
<heat>
for x86 it was decided that it only makes sense to upgrade to the AMD invlpgb stuff if a process is actually seeing a decent amount of TLB flushes and is present in a lot of CPUs
<geist>
and you have to still send IPIs to shoot things down (and translate to whatever the local ASID id is on that core)
<heat>
but then of course the ASID is global
<geist>
right
<heat>
btw invlpgb has been there since zen 3 at least
<heat>
so your zen 3 might have it?
<geist>
no i dont see it
<geist>
at least in lscpu, unless linux has another name for it
whereiseveryone has quit [Server closed connection]
<geist>
i always have to refresh with their numbering convention for server stuff
<geist>
oh huh i just noticed that the last number is the zen core version
<heat>
yeah it's pretty consistent with the desktop/mobile chips where the first number of the model is the zen version???
<heat>
wait
<heat>
1000, 2000, 3000, 5000, 7000, 9000
<heat>
ah i guess i have a zen9
nagitsu has quit [Server closed connection]
<heat>
dope!
<geist>
alas no
nagitsu has joined #osdev
<geist>
zen1, zen1+, zen2, zen3, zen4, zen5
<geist>
and except for the 2000 series, the even numbered ones are the mobile/APU versions
<geist>
and of course what happens when they go over 9000!!!!!111
<kof673>
:/ you already know what happens /me mumbles something about "plutonium" saturnian mercurial earth enchanted earth angels under the sea, libra libyans, car vanishes, leaving flames, at night time
Matt|home has joined #osdev
<geist>
kof673: are you smoking something something particularly spicy tonight?
<heat>
geist: fwiw Intel RAR also exists and is even worse
<heat>
as in, different
<heat>
such a nightmare
<geist>
well pretty quickly whatever intel thinks up isn't going to matter as much
<geist>
it's whether or not AMD adopts it
<nikolar>
We might already be there
<heat>
well it's getting added to linux
<heat>
plus i think (hope?) that intel will bounce back eventually
<heat>
AMD also had some pretty shit cores
<heat>
fuckin bulldozer
netbsduser has quit [Ping timeout: 240 seconds]
TkTech2 has joined #osdev
gog has joined #osdev
jcea has joined #osdev
TkTech has quit [Ping timeout: 276 seconds]
TkTech2 is now known as TkTech
EmanueleDavalli has quit [Quit: Leaving]
yuiyukihira has quit [Server closed connection]
yuiyukihira has joined #osdev
<geist>
i still have a bulldozer based machine that i kinda feel sorry for
<geist>
the little fella never really had a chance
<araxestroy>
the kind of curio that really isn't worth hanging onto but also isn't worth getting rid of
Lucretia has quit [Remote host closed the connection]
<zid>
It's definitely worth getting rid of :P
agent314 has joined #osdev
Turn_Left has quit [Read error: Connection reset by peer]