<bslsk05>
learn.microsoft.com: LoadStringA function (winuser.h) - Win32 apps | Microsoft Learn
<mjg>
> The buffer to receive the string (if cchBufferMax is non-zero) or a read-only pointer to the string resource itself (if cchBufferMax is zero). Must be of sufficient length to hold a pointer (8 bytes).
<mjg>
i'm sure this approach did not result in people passing the result to free when they should not
<mjg>
and the other way around
<mjg>
anyhow, the winfile code is all intern quality
<mcrod>
hi
<mjg>
in terms of "cosmetics" indentation is all over the place, including stuff which should be deeper ending up with no indent
<mjg>
if (foo == BAR) and if (BAZ == foo) in the same func
<mjg>
and so on
<mjg>
in terms of not cosmetics there is code duplication all over
<gog>
speaking of intern quality, one of our support people stumbled upon a bug in time parsing that was written by the guy whose name my boss and i curse most
<mjg>
it is clear that people working on this code did not know c
<gog>
it's been there for ages
<gog>
fucken time bomb
<mjg>
:]
<mjg>
did it pass review
<mjg>
at the time
<mcrod>
i hate code reviews.
<mcrod>
obviously, I'm not a team playe
<mcrod>
r
<gog>
it was only him, another guy and two interns and they were all very sloppy coders
<mjg>
[:
<mcrod>
when you are unable to write a function without hearing 400 different stupid things, you start to hate code reviews.
<mjg>
in that area i love when they try to meet what you told them, technically speaking
<mjg>
while failing to deliver
<mjg>
gog: i'm willing to best the problematic code was mostly copy pasted from SO
<mjg>
and massaged into the codebase
<gog>
in the thing i'm working on i found an Enumerable.Range(DateTime.Now.Year, DateTime.Now.Year.AddYears(10))
<gog>
which results in an enumerable starting at 2023 and ending in 4036
<gog>
or 4056 or whatever it was
<mcrod>
oh
<mcrod>
gog may I pet you
<gog>
either Enumerable.Range changed ro they didn't even look at the page when they finished
<gog>
mcrod: yes
* mcrod
pets gog
<gog>
mjg: possibly
<mjg>
i don't know that lang, why is it adding up to over 4k?
<gog>
it's C#
<gog>
Range is (start, count)
<gog>
when the intent was to have today and 10 years from now
<gog>
for a credit card form
<mjg>
again without knowing the lang, cursory reading suggests it would be + 10 years and they did the addyears thing to match the tyep
asarandi has quit [Ping timeout: 250 seconds]
<gog>
yeah
<gog>
well it was wrong
<mjg>
i believe you but now i'm curous what's up with this not working as "expected"
<mjg>
i don't have c# runtime to mess with either
asarandi has joined #osdev
<gog>
because the property Year is an int
<gog>
so the type being enumerated is an int, not a DateTime
<gog>
so it starts at 2023 and yields 2033 elements
<gog>
(i transposed the AddYear() and Year part in the count)
<mjg>
uh
<mjg>
public static System.Collections.Generic.IEnumerable<int> Range (int start, int count);
<mjg>
i was looking at the wrong thing
<mjg>
aight
<mjg>
i assumed that's int start, int end or so
<gog>
yeh
<mjg>
kind of weird above, but i don't know these langs
<gog>
in my greatest of shame i'm actually coming to like C#
<mjg>
i'm confident there are legitimate reasons to give you shit for it
<mjg>
but i have to concede i'm fully oblivious to them
<gog>
yes
<mjg>
i dodged everything windows in my career
<mjg>
modulo one blip at first job
<gog>
i still fall into traps that are set for C programmers
<mjg>
:]]
<mjg>
why not RUST MOTHE^W
<gog>
i will eventually
<mjg>
i wonder tho, what's worse
<mjg>
webdev or winapi dev
<gog>
idk
<mcrod>
i have to write winapi code soon
<mcrod>
because winusb
<mjg>
oooffff mate
<mcrod>
it won't be the absolute worst thing in the world
<mcrod>
it will be pretty bad
<mcrod>
but... worse is there
<mjg>
GetRektByHandle
<mcrod>
what makes matters worse
<gog>
lmao
<mcrod>
the shit is locked down so tight I need to call IT every single time I need to install something, because admin
<mcrod>
don't want to say too much, but it is a nightmare.
<mjg>
as much as i would like to dunk more on windows, i can only share legitimate gripes against xp and older
<mjg>
and even then i have to concede xp was a good product for home usage
nikolar has quit [Ping timeout: 250 seconds]
<mjg>
i did use some win 7, but not enough to comment
<mjg>
it worked :p
nikolar has joined #osdev
<mjg>
lstrcat(szTemp, szFile);
<mjg>
strcpy(szTemp, szPath);
<mjg>
lstrcpy(szFile, szTemp);
<mjg>
addition to winfile made in 2022
<mjg>
i wonder if these people are this bad or are they larping being a ms programmer back in the day
<mjg>
if the latter A+ emulation
<mjg>
perhaps i should also point out
<mjg>
WCHAR szFile[MAXPATHLEN];
<mjg>
WCHAR szPath[MAXPATHLEN];
<mjg>
WCHAR szTemp[MAXPATHLEN];
<mjg>
gg
<gog>
yikes
zxrom_ is now known as zxrom
<mcrod>
gog you didn't prr
* gog
prr
<gog>
sorry i got 3ds auth working again and now i need to finish the transaction flow
* mjg
distracts gog
<gog>
what's that
* gog
look around
<mjg>
's all good, go back to napping
<mjg>
i just remembered one and only gui app i ever wrote
<mjg>
and claiming i wrote it is a stretch
<gog>
i've slapped together some Qt components to make a few different apps
<mjg>
i followed delphi tutorial to create an app with one button
<gog>
and wxwidgets for awhile too
<mjg>
then i messed with it
<mjg>
and that was th extent of my work in the area
SGautam has quit [Quit: Connection closed for inactivity]
mjg has quit [Ping timeout: 250 seconds]
<gog>
yay it works
<gog>
now i need to shake out the several bugs i introduced
zarock has quit [Server closed connection]
zarock has joined #osdev
bradd has quit [Ping timeout: 250 seconds]
bradd has joined #osdev
kof123 has quit [Ping timeout: 240 seconds]
linearcannon has joined #osdev
randm has quit [Server closed connection]
randm has joined #osdev
linear_cannon has quit [Ping timeout: 250 seconds]
amj has quit [Ping timeout: 250 seconds]
amj has joined #osdev
Mutabah has quit [Ping timeout: 250 seconds]
Mutabah has joined #osdev
[itchyjunk] has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 260 seconds]
mjg has joined #osdev
nvmd has quit [Ping timeout: 264 seconds]
awita has joined #osdev
Arthuria has joined #osdev
gabi-250 has joined #osdev
Arthuria has quit [Ping timeout: 260 seconds]
<junon>
Is there a list of x86_64 NMIs somewhere? I'd like to know exactly which ones can break through a cli, and my google-fu isn't doing me any service this morning >.>
<zid>
not sure what good such a list would do you?
<junon>
Well, things like page faults, IPIs, etc. I'd like to understand which cases a critical section could still be interrupted.
<zid>
not sure what good such a list would do you?
<junon>
Why?
<zid>
because.. what good would it do you?
<zid>
why do you care if there are 17 SMI sources and 12 SMM entry points on specific motherboard B, etc?
<junon>
Aren't there more NMIs than system management modes? Aren't there also NMIs I can install interrupt handlers for?
<zid>
and what does that have to do with a full list of every possible nmi?
<junon>
I didn't say every possible one, just a list of NMIs that could exist. Perhaps I can be more specific: a list of NMIs that I can install handlers for and run my own code for.
<junon>
E.g. is a double fault considered an NMI?
<zid>
do you mean
<zid>
exceptions
<junon>
I would assume exceptions are non-maskable, yes
<zid>
The list of exceptions are kind of obviously, in the manual
<junon>
No, I don't mean just exceptions
<zid>
You're going around in circles
<junon>
Which interrupts that I can react to are also impervious to CLI?
<zid>
none
<junon>
So double fault handler is disable when IF flag is 0?
<zid>
that's an exception
<zid>
you said we weren't counting exceptions, I got confused sorry
<junon>
s/interrupt/anything that can interrupt normal execution/
<junon>
exceptions being one of those things
<zid>
because the answer was literally "exceptions, there's a list in the manual"
<zid>
and "smi, which you cna ignore, so a list isn't needed"
<zid>
both of which I already said
<junon>
Okay so the "list" is just those two things, yeah?
<junon>
If so, great
torresjrjr has quit [Remote host closed the connection]
torresjrjr has joined #osdev
boga has joined #osdev
goliath has joined #osdev
<boga>
Hey, I don't really know if this is the proper place to ask for help. I'm a newb in OS development and I've been trying to make something since I'm on holidays. The OS' repo is here https://github.com/miguelrcborges/simple-os.
<bslsk05>
miguelrcborges/simple-os - Project to learn OS development. (0 forks/0 stargazers)
<boga>
. I've been having a problem where I can't draw the whole vga screen into a random background colorm crashing in the process. However, if I set to draw a smaller section (like it is atm in the repo https://github.com/miguelrcborges/simple-os/blob/master/src/kernel.c#L21), it works fine.
<bslsk05>
github.com: simple-os/src/kernel.c at master · miguelrcborges/simple-os · GitHub
<boga>
Could you give me any direction what could be the cause of the problem?
<zid>
a debugger?
<zid>
vga_buffer isn't declared here and that's really the only thing that could have an issue
<boga>
vga_buffer is in constants.h
<boga>
is a define
<zid>
to what
<boga>
#define vga_buffer ((uint16_t *)0xb8000)
<zid>
and what 'crash' do you get?
<boga>
it simply reboots the OS
<zid>
is paging enabled and it's not mapped so you get a page fault? etc.
<zid>
okay that's a triplefault, are you using qemu?
<boga>
yeah
goliath has quit [Ping timeout: 250 seconds]
<zid>
-no-shutdown -no-reboot -d int
<zid>
boot with that
<zid>
find the line that says check exception old 0xffff... once it hangs
boga has quit [Remote host closed the connection]
<zid>
man, heat is getting dumber
<bnchs>
true
<bnchs>
fuck the summer heat
boga has joined #osdev
<boga>
sorry, X was acting up
<boga>
check_exception old: 0x8 new 0xd
<boga>
is this the line you wanted?
<zid>
nope, before that
<zid>
old needs to be 0xffffffff
<boga>
check_exception old: 0xffffffff new 0xd
<zid>
okay so the first exception you ate was a d
<boga>
nvm I found even this one before
<boga>
check_exception old: 0xffffffff new 0x6
<zid>
gist / pastebin / whatever the 0xd one
<zid>
whichever is closer to the bottom is the one we want, the 0xd one sounds better from here
<boga>
okok
<gog>
0x6 is undefined opcode i think, 0xd is general protection fault
<bslsk05>
pastebin.com: s-os.bin: file format elf32-i386Disassembly of section .text:00401 - Pastebin.com
<gog>
m'general regs /me tips ALU
<zid>
Correct, you did not infact, recompile with -mgeneral-regs-only
<boga>
I mean at least I added the flag to CFLAGS
<zid>
did you make clean
<zid>
and make
<boga>
I think so
<zid>
can you *definitely* do it, instead?
<boga>
had to clean manually since I dont have a clean yet
<zid>
It's much more useful for me
<junon>
try it again, and make sure 'clean' does it.
<zid>
It's going to be *very* painful for me if there's a random chance what I asked you to do doesn't get done, then you lie and say it's been done
<junon>
and make sure make is re-running the commands. Make doesn't know if its rules have changed from run to run.
<junon>
Make only checks for each rule that "input timestamp > output timestamp", nothing more.
<boga>
seems like zig cc is not taking the flag?
<zid>
the fuck is that
<junon>
zid: zig is a programming language that also has its own C compiler built in as a frontend to LLVM. It also has a build system built into the language.
<zid>
well, I can't support zig cc
<junon>
boga: don't use zig cc when building OSes.
<boga>
I understand yeah
<zid>
either switch to gcc or figure it our yourself
<boga>
I was just using it so I didnt have to download a whole toolchain
<boga>
will try downloading i386-elf-gcc and see if it works
<boga>
also, could you explain what the flag does and why it solves the problem?
<boga>
I mean what it does it is not needed since I can google
<zid>
did you look at the line of assembly?
<boga>
yeah
<zid>
notice anything weird about it?
<boga>
it is not part of i386 instruction set?
<zid>
no then, apparently
<zid>
it's targetting register 'xmm0'
<zid>
that's an SSE register
<gog>
you _can_ tell make that your target depends on its makefile and it'll figure out that its rules have changed
<gog>
although that has other implications iirc
<zid>
You haven't configured the floating point settings and shit to make SSE work right
<zid>
and you don't want SSE in the kernel anyway, because.. nothing is stopping it generating sse code *in the code that enables sse*, for starters
<zid>
so you need a way to generate code with sse disabled
<zid>
that's what -mgeneral-regs-only does
<boga>
I thought simd worked kinda universaly
<boga>
I see
<zid>
only use general purpose registers
<zid>
not special ones
<zid>
You need to tell it which rounding mode and other things to use before it's useful
<zid>
and whether it should fault on unaligned accesses and things
<boga>
I see
<zid>
you might be able to get away with -mno-sse or something for zig, idk
<boga>
I thought I could do vectorization for granted
<boga>
I was also requesting it to vectorize to
<boga>
with -ftree-vectorize
<gog>
not without supporting code
<boga>
yeye
<gog>
the compiler won't provide it
<zid>
but for gcc you want -mgeneral-regs-only because it also impacts things like attribute interrupt stack frame generation
<zid>
so it's the "Better" option
<zid>
plus it also disables 3dnow, mmx, avx, avx2, avx512, etc
<zid>
and any future instructions that may come along and break your code
<boga>
ye
<boga>
I see
<boga>
is the flag the same on clang?
<zid>
yea
<zid>
afaik anyway
<zid>
I'm not a clang user
<zid>
easily testable on godbolt if you care
<boga>
aite
<boga>
thanks for all the time and guidance
<mjg>
,next
* gog
iterates
<mjg>
gog: btw now that my uptime is longer, i think i'm ok today
<gog>
:)
<mjg>
i decided to remedy that by looking at rust youtube videos
<gog>
careful with learning rust
<mjg>
rust is the best thing since node.js
* gog
puke
<gog>
i'm revising some of my react code so i'm dealing with node right this minute
<zid>
Can confirm -mgeneral-regs-only works on godbolt
<zid>
try removing it
slidercrank has quit [Quit: Why not ask me about Sevastopol's safety protocols?]
<mjg>
there was a talk somewhere by a node.js creator concedeing to numerous mistakes they made creating it
<boga>
damn, thanks again
<junon>
mjg: I maintain a lot of Node.js code, regrettably, and know a lot about Node internals. There's a reason I've moved almost entirely away from Javascript as have most of the OG node folks.
<gog>
javascript is an abomination but i continue to have to learn more about it to get my work done
<mjg>
junon: what did you switch to? RUST?
<gog>
i never wanted my life to be like this
<gog>
i want to port everything to blazor
<gog>
wasm wasm wasm
<junon>
mjg: I use a lot of languages, for along time it was C/C++ for personal projects. I use Rust almost exclusively now.
<mjg>
wasm is one of these things which make wonder what is happening
<mjg>
me*
<junon>
WASM could have been cool. It's a nightmare at this point.
lg has quit [Ping timeout: 250 seconds]
<zid>
someone explained to me how wasm interfaces javascript recently and the asnwer was.. weird
<mjg>
[disclaimer: i don't know the realities of it, just talking about the concept]
<zid>
like, wasm can't actually do any dom stuff, but it can do a fairly boring callback out to javscript, and you have to make up a protocol for what you want the javascript you call out to to do
<gog>
junon: should i learn rust for my personal projects y/n
<junon>
zid: it interfaces with javascript in pretty much the exact way you'd expect it to. Lists of imports and exports from the WASM payload. The weirdness comes from WASI, which is some standard library they're imposing now.
<mjg>
gog: rust is unfortunately going to be a sensible thing to have on your resume
<zid>
like, callback("please update dom element with number 7 plskxthx"); is about all you can do
<junon>
gog: I personally think Rust is the future, but that's just my opinion. I find it refreshing.
<mjg>
the only reason i'm looking at it
<junon>
zid: right, yeah.
lg has joined #osdev
<zid>
so everything is FRAMEWORKS to handle that part for you
<zid>
which imo kind of defeats the point of using wasm in the first place to a large degree
<mjg>
frameworks all the way down innit
<junon>
zid: depends on what you're doing, WASM is measurably faster than JS, by a wide margin. But the fact we even need WASM is, to me at least, a shining example of why the web is a terrible invention.
<gog>
what if there was a virtual machine that was installed on every computer that we could blat arbitrary bytecode to and run things anywhere
<junon>
Then you get Java applets again.
<gog>
also the web isn't the terrible invention, it's the "innovation" of turning it into a universal application platform
<gog>
yes, bring back java applets
<zid>
yea
<mjg>
bring back sun microsystems
<gog>
yes
<gog>
oracle bad
<gog>
bring back solaris
<zid>
it's fucking CRAZY that people ship software as javascript running inside an invisible browser
<gog>
i want to kiss girls again
<zid>
so now browsers need native functionality to do everything the OS could have done
<bl4ckb0ne>
do I have to bother hand crafting a page allocator in the uefi bootloader or should I just call AllocatePage once I exit the boot services and let it do its thing
<zid>
call it *after* you left boot services?
<zid>
This seems like a sequencing error to me
<bl4ckb0ne>
maybe i dont understand it fully
<zid>
I was under the impression that exitbootservices was the "I am done with uefi" call
<zid>
like libpng_destroy();
<sham1>
It means that you're done with the boot services
<sham1>
As the name implies
<bl4ckb0ne>
oh AllocatePages is part of the boot service
<zid>
gog and heat and people know more about this than I do though
<zid>
my physical allocator at boot is just the += 4096 operator
<bl4ckb0ne>
thats what I have atm too but im lost
<gog>
yeah, once you exit boot services you need an allocator
<zid>
usiing bootalloc to allocate your bitmaps and shit seems easy at least though
<zid>
easier tha not doing it
<gog>
easiest way is to just grab a contiguous range of pages before ExitBootServices and make a bump allocator
<bl4ckb0ne>
what about allocatepool to shove the memorymap
<bl4ckb0ne>
ive seen people use that on the internet
<gog>
you can do that, but you'll need to add some extra space to the buffer because AllocatePool can and will alter the memory map which will make the subsequent call to ExitBootServices fail
<bslsk05>
github.com: sophia/kc/boot/kc_main.c at main · adachristine/sophia · GitHub
<zid>
plog.
<gog>
plog
<junon>
I'm filing the funniest bug report I think I've ever even seen, let alone filed myself.
<zid>
can we replace 306 with an 'else'
<zid>
actually just add a return on 304?
<gog>
no
<zid>
and reorder etc
<bl4ckb0ne>
gog thats exactly what i was looking for thanks
<zid>
uninedent the !error
<gog>
it all needs to be reordered
<junon>
There's a bug in the text to speech model called tacotron2-ddc whereby adding "?!?!?!" at the end of the text causes the decoder to trail off exponentially and generate bizarre nonsense.
<bl4ckb0ne>
writing this bootloader has been my white whale recently
<zid>
Can I do it?
<gog>
zid: do whatever you want this code is kinda dead i think
<gog>
if so, the addresses that are calculated for those statics is going to be at or above that address
<gog>
page table address must be physical
<bl4ckb0ne>
probably, im not the author
<zid>
I have a random 510 or 509 or whatever pte that contains all of physical memory
<zid>
and 511 ultimately contains the kernel
<zid>
I then use that full memory map to just link all free memory into a linked list of 4k pages cus hyper-lazy and I don't need better yet
<bl4ckb0ne>
i dont understand what you mean gog
<zid>
so phys_alloc is just pop()
<zid>
&pml4 is a virtual address
<zid>
&pml4 needs to be a linear address
<gog>
yes
<zid>
on line 40
<bl4ckb0ne>
oh
<gog>
so you'll need to calculate that correctly somehow
<gog>
that's not easy if you'reloading from UEFI because it doesn't put it at a fixed location like grub does
<zid>
loading a virtual address into c3 would be like.. "use the virtual memory map we haven't loaded yet to find where the virtual memory map lives so we can load it" :p
<gog>
which is why i get my page tables dynamically
<zid>
mine's dynamic with grub
<gog>
during UEFI phase so their addresses are physical
<zid>
cus my kernel changes sizes and I steal the pml4 page from after the end of my kernel :p
<zid>
if(!pml4)
<zid>
pml4 = (struct page_table *)new_page(); /* New PML4 */
<zid>
new page is just t = free_page; free_page += 4096; return t
<zid>
where free_page is set to physical_address_of_end_of_kernel
<gog>
zid did you see the thing i sent you in discord the other day
<zid>
You are allowed to play fan games, I cannot stop you.
<bl4ckb0ne>
ive enjoyed up to gen5 but gen 2 best gen
danilogondolfo has quit [Quit: Leaving]
zxrom has quit [Quit: Leaving]
zxrom has joined #osdev
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
gog has joined #osdev
<zid>
gog is home!
<zid>
now you can make me a jmp -2 right?
<sham1>
Yay
<gog>
no
<zid>
:(
<gog>
i'm cooking dinner
<sham1>
What's cooking
<zid>
gog is
<zid>
but dont' call her a what
<sham1>
'_>'
rnicholl1 has joined #osdev
<gog>
pene with red suace, sosig, mushroom, basil, and grated parmeseassn
<mjg>
watap
<sham1>
Sounds good
<zid>
penne with blood, pig flesh in sheep tube, hallucinogenics, american herb, foot scrapings
<mjg>
i only got fentanyl
<mjg>
low calories tho
<sham1>
Blood is good
<zid>
blood for the gogod
<geist>
hello fronds
<geist>
are you talking about meat?
<zid>
geist do you have a jmp -2 PE coff
<mjg>
this is a cooking channel, yes
<geist>
are you also made of meat?
<zid>
heat isn't here and gog won't furnish me with one
<mjg>
me? no, i'm made of flamegraphs
<geist>
mjg: pessimal
<mjg>
heat is a piece of meat tho
<geist>
meat is pessimal
<mjg>
eat him
<mjg>
what, you vegan?
<geist>
no being made of meat is pessimal
<mjg>
that's like using a shell without tab completion
<zid>
I'm a flesh mech piloted by a spooky skeleton
<sham1>
Can't quite join Mechanicus quite yet
<geist>
piloting a meat shell without tab completion
<geist>
that is pessimal
<mjg>
gotta find a stronger word than "pessimal
* geist
applies a flamegraph to you
<mjg>
80% cpu time spend on irc, busted
<sham1>
I've got a strong word for something that's pessimal. It's just shit
<zid>
sham1: find me an easy to look at PE / COFF header set
<mjg>
hhow about openbsddesque
<geist>
whats with the PE bits zid? trying to uefi boot?
<geist>
what arch
<zid>
yea I was CHALLENGED to do uefi
<zid>
but I don't wanna mingw or whatever
<geist>
oh PE headers are pretty EZ though i dont have an example handy
<zid>
I wanted a jmp -2 PE so I could test qemu/ovmf
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
<zid>
geist: did you know wsl2 does not support kvm on amd, but does on intel? :(
<geist>
hmm, like nested virt?
<zid>
yea
<zid>
the kernel doesn't support kvm if you're amd amd amd
<zid>
/dev/kvm no worky
<geist>
huh. well i mean i have AMD and never noticed that there was kvm on the wsl, so that tracks
<geist>
i just never assumed that nested virt was a thing there
<zid>
hyper-v a pile of ass confirmed
<geist>
i thought you had some ancient xeon?
<zid>
it was dumb that I had to run windows in a VM so that WSL could run side by side with it to begin with (especially because it was broken and I had to blindly fix it)
<geist>
did you upgrade to a newer ryzen?
<zid>
I have a 5800x
<geist>
oh nice, when did you get that?
<zid>
few months ago? my 1650's mobo died
<zid>
or turns on with post code 00 immediately
<geist>
guess i haven't been paying enough attention. yay, grats for something within this decade!
<zid>
possibly just a completely dead spi flash chip
<geist>
yeah
<zid>
but they need pre-programming and the chips are a few quid and so are the programmers so meeh
<geist>
guess you can try to remove it and flash it if you're bored
<zid>
the ME still works and lets you flash it, but the board doesn't seem to be able to read it back or something
<geist>
or harvest the board for capacitors
<zid>
(or it's dead and it just can't detect that it isn't properly flashing it)
<geist>
yeah and i guess the post code 00 it has is the same as a post card would read
<geist>
port 0x80 or whatever it is
<zid>
yea it's literally a post card
<zid>
but built onto the mobo
<zid>
superio chip has pins, and is the thing that listens to lpc port 0x80
<geist>
i have some 2009 era dual xeon box that started getting flaky at some point so i eventually upgraded to a newer ryzen
<geist>
but one of those things where you can't trust it anymore
<zid>
yea your situation is lame
<zid>
it works 99.99%
<zid>
but that 0.01% means you can't use it for anything important
<geist>
main reason i waited so long was i had a strong requirement for ECC, and until ryzens came along there wasn't a solid way to get ECC without buying another expensive server chip
<geist>
thanks AMD for not artificially segmenting the market!
<zid>
my 1650 had ecc at last :(
<zid>
died within weeks of it
<zid>
I got a good deal on some URDIMMs
<geist>
yep. the dual xeon i think was E5520s iirc
<zid>
eww
<zid>
nehalem
<geist>
they were surprisingly cheap at the time, and asus made a dual socket board for not much, a brief period there where xeons w/ECC were cheap
<geist>
it was new at the time
<zid>
yea there was a period on ebay where verybody was dumping X5 xeons
<geist>
but yeah not worth keeping it running now, at the minimum it's a waste of power
<zid>
so you could get a dual X5... xeon setup for $50 total
<zid>
I still maintain that SB is the best microarch intel has ever made
<geist>
sure, still have my 2600k though i'm not using it now
<geist>
but that was a solid trooper. i ran it at 30% overclock for like 4 years straight
<zid>
yea the 1650 was fully unlocked, which made it an X cpu, technically
<zid>
I ran it at nearly 5GHz (limit of my cooling)
<geist>
yeah i ran the 2600k at like 4.4ghz i think. officially it maxed out at like 3.6 or something
<geist>
but they were famously hella overclockable
<sham1>
The mouse getting stuck in Windows is rather pessimal
<zid>
max multi on a 2600k is 42
<zid>
2600k is basically a 1620 non-xeon
<geist>
yah that's it. 3.4 -> 4.2
<zid>
1650 was a 3960X
<zid>
1620 was also limited to 42
<zid>
same cores etc
gareppa has quit [Quit: WeeChat 3.8]
<zid>
was probably literally the same silicon but different fuses
<geist>
yeah
gareppa has joined #osdev
<geist>
wasn't until a 6600k i think that you could reliably get more performance than a sandy bridge
<zid>
yea it took a WHILE
<geist>
skylake
<zid>
and the 6700k had compromises because desktop
<geist>
aside from all the sploits skylake was a pretty solid thing
<zid>
dual channel, so your ram was slower, limited pci-e lanes, no ecc, etc
<zid>
so I stuck to my 1650 without coveting skylake
<zid>
by 11xxx though it was getting pretty uncompetitive
slidercrank has joined #osdev
<geist>
alas i was really bummed about bulldozer at the time, though i still have a kaveri machine floating around
<geist>
i feel sorry for it, literally. because i'm like that
<geist>
even if it's not competitive in any metric at all
boga has quit [Remote host closed the connection]
<zid>
I need to investigate why my 5800x doesn't clock especially well
<zid>
but amd's settings are super weird
<geist>
overclock you mean?
<zid>
undervolt
<zid>
they freeform clock themselves now
<zid>
up to their TDP
<geist>
yeah, you can enable PBO if you have the cooling
<geist>
but in general that only really helps in the situation where you're pegging all the cpus, and it give syou more headroom
<geist>
since any one given core can't hit the TDP
<zid>
power density is ridic though
<geist>
i have fiddled with it but decided it's not really worth the effort
<zid>
if you load a single core you get a giantic (miniature) hotspot
<geist>
only really shaves off a few minutes for compiling llvm or something
<zid>
"oops, you put it at 5GHz for a nonosecond, now it's at 180C"
<geist>
kinda sorta, but i dont think its as bad as you say
<geist>
but yeah you can extend the turbo phase a little bit
<zid>
It's *really* hard to get heat out of the cpu
<geist>
but i'm not sure where that really matters in real world usage
<zid>
my cooler is just stone cold basically all of the time, because it just gets a hotspot and doesn't clock up any more
<zid>
I need to re-paste it and enthusiastically tighten some bolts
<zid>
to see if that helps
<geist>
yeah. i've been using closed loop coolers for a while too, which ithink have the property of not really dealing with transient spikes that well
<zid>
I dread to think how the AM5 ones are working, their IHSs are another couple of mm thicker
<zid>
the chip is less thick and they wanted to make the mounting height similar so they just made the IHS thicker
<geist>
i read yesterday that noctua has a delidded cooler they just announced
<geist>
ie, if you delid it, they have a plate designed for that situation
<zid>
yea delidding modern chips is a whole thing now
<zid>
debaurer sells little vices to pop the IHS
<zid>
then brackets to make coolers fit, etc
<zid>
debauer*
<geist>
will be a while now though, since i have a 5950x which will keep me going for quite a few years yet
<zid>
5950x is am4?
<geist>
it's a little sub optimal for straight ahead gaming, but only by a few percentage
<geist>
yah
<geist>
x570 chipset board, which i think was the best AM4 they ever made (not sure they made another run of AM4 chipsets after that)
<zid>
I think mine is x570
<geist>
yah. solid after they got rid of the initial run of usb instability that required a few AEGSA releases to solve
<zid>
5950x I would have been trepidacious about because it's 3 dies
gareppa has quit [Quit: WeeChat 3.8]
<geist>
it's fine, but a single die 5800x is a solid chip. really unless you need the extra cores it's an all together better solution
<zid>
the x3d chips are even more asymmetrical, amd's solution is just to disable the other cores
<geist>
windows at least generally keeps one of the dies off
<zid>
'gaming mode' -> disable the ccd without the L4
<geist>
you can see it load up die 1 as more threads fire up, but it usually keeps die 0 active till like 50% load
<geist>
presumably thats the optimal solution to keep the L3 cross die thrashing to a minimum
<geist>
linux of course takes the opposite approach and tries to distribute everything evenly all the time
<zid>
yea I doubt any games are using the numa aware allocator flags
<zid>
you can just cgroup script it easily though
<zid>
for linux
<geist>
of cours eit's not really numa, but there's sdefinitely a cross die cache latency
<zid>
no need to phsically shut the cores off
<zid>
I mean, that's literally numa?
<zid>
The memory access latencies are non-uniform
<geist>
no that's not numa because there's a single memory controller on the io die
<geist>
so all cores see the same ram at the same latency
<zid>
and there's physically more cache on one ccd
<geist>
but they have cross core cache
<zid>
nuca? :
<geist>
oh you're talking about the x3d stuff? maybe. i'm just talking about a plain 5950x
<zid>
x3ds have stacked dram l4 on *one* ccd
<zid>
it absolutely destroys most gaming perf if you let them use arbitrary cores
<geist>
but cross core cache latency is a thing even on a dual core machine because local L2. it's just L3s are not uniform in the zens
<geist>
so it's another tier of cpu cache locality is all
<zid>
If you're using a server chip it's genuinely numa gain too
<zid>
because each ccd gets its own memory channels
<zid>
again*
<geist>
yep. the first gen threadrippers too
<zid>
the desktop ones are limited to dual channel (WHY?)
<geist>
wasn't until zen 2 that they moved the memory controller into the io die
<zid>
I really don't understand this fascination with cost-cutting over memory channels tbh
<geist>
pinout
<zid>
apple demonstrated how powerful good memory subsystem is on M1
<geist>
AM4 only has enough pins for 2 channels
<geist>
and the SP3, etc sockets have hella pins to handle more channels
<zid>
and my sandy bridge didn't? :P
<geist>
what was the socket?
<zid>
my am4 chip is like twice the size
<zid>
2011
<geist>
yeah guess it had mroe memory channels
<zid>
40 pci-e lanes too, intel offers 20 on desktop at best these days
<geist>
yah
<zid>
it also had integrated power
<zid>
so you didn't need 40 vrms on the mobo
<zid>
which actually probably helps the pin situation
<GeDaMo>
Do Intel or AMD have any CPUs with on-chip memory like Apple?
<geist>
looks like AM5 is dual channel too, DDR5
<geist>
1718 pins
<zid>
amd just needs to add 293 more pins
<zid>
so we can get to 2011 desktop socket level of pins
<geist>
might need more pins to do the same thing with DDR5. dunno
<zid>
I don't think so
<zid>
the electrical signalling is nearly identical for ddr 1 -> 5 tbh, the speeds haven't even really changed since ddr3
<zid>
they just keep changing what PC3, PC4 etc multiplies the base clock by to keep consistently getting bigger numbers
<zid>
but the base clocks are very similar
<geist>
it is generally interesting that intel dropped the number of pins post 2011
<zid>
2400MHz I think is a good speed for ddr5?
<geist>
oh oh i see why. yeah LGA 2011 was explicitly for the high end server/enthusiast/workstation market
<zid>
yea it's the workstation socket
<geist>
the general consumer stuff was always dual channel
<geist>
oh sure, so that's like a different thing, that would compete with like SP3 or something on AMD side
<geist>
which has hella pins
<zid>
E5-1620 was actually an OEM part for HP
<zid>
for their Z420 blaze it workstations
<geist>
sure. but that's the point, it had more channels because it was a high end chip with a high end socket
<geist>
consumer stuff has been dual channel for a long time
<zid>
It's just death of the middle class
<zid>
there *is* no workstation anything anymore imo
<zid>
just server for hpc, and server for webservers
<geist>
well, if amd gets back into the threadripper biz whcih i thinkt here may be rumors
<geist>
GeDaMo: re: on chip memory i think AMD just announched some sort of on chip mem thing for machine learning
<geist>
but it's a super expensive server thing
<zid>
who the fuck would buy that bronze xeon lol
<zid>
$414 for 8 cores at 1.9GHz
<geist>
gets you ECC. guess you could use that for a NAS or something
<zid>
this is what they're selling instead of 2011, basically
<geist>
this is why i hate intel for this stuff. they *could* do ECC on their desktop stuff, but they artificially segment it
<zid>
a 2GHz 8 core
<geist>
AMD at least just leaves ECC on all the time, even if they dont really officially support it
<geist>
(though i haven't checked recently with zen 3 or zen 4)
<zid>
yea urdimms are hard to get though
<geist>
def, slow and expensive, but i'll pay that for a NAS machine
<zid>
I need 900MHz ddr4 urdimms kthx
<zid>
man, every time I look at cpuz the weirder this cpu feels as an intel nerd
<geist>
for at least nas level stuff the speed of the ram wont really matter that much, since you're almost always bottlenecked by the storage or the net
<zid>
it's varying the base clock all over the place
<zid>
and has fractional multipliers
<geist>
yeah, the clock is crazy on zens
<zid>
so I am doing 98.33MHz * 38.2 multiplier atm
<geist>
at some point i just sort of gave up trying to grok it too much. this also doesn't take into account that one of your 8 cores is golden, the second one is silver
<geist>
not sure linux ever grokked that, and ignores it, but windows definitely takes it into account
<zid>
yea I have a 5800x so one ccd, woot woot
<geist>
the golden core has a 100-200mhz headroom over the others
<zid>
They're all individually VIDed though yea
<zid>
I forget if you can dump it
<geist>
if you're on windows get the ryzen master utility
<geist>
it's pretty decent for viewing that stuff
<geist>
at least shows you the gold star on the core, etc
<zid>
I found it had the worst UI of anything eer
<geist>
well, sure
<zid>
I couldn't figure out how to do anything in it
<zid>
every button looked like it was "immediately crash the machine", and it turns out it just.. was
<geist>
oh interesting. works like a champ for me
<zid>
like, none of the fields were editable, they were informational
<zid>
and the only option I had was enable PGO, which immediately set everything to 'unlimited'
<bslsk05>
'low poly cat spin to funkytown for 1 hour' by asipill (00:59:56)
<heat>
funkykat
<heat>
are you secretly genz too
<zid>
to overdriven funkytown that sounds like ass too
<zid>
who needs more than a couple of dB of range
gareppa has quit [Quit: gareppa]
kof123 has joined #osdev
<junon>
> The field ‘framebuffer_addr’ contains framebuffer physical address. This field is 64-bit wide but bootloader should set it under 4GiB if possible for compatibility with payloads which aren’t aware of PAE or amd64.
<junon>
How can a bootloader "set" the physical address of the framebuffer?
<junon>
(this is from the mb2 spec, I was just confused at the wording since the VBE tag gives you a physical address)
<zid>
yea that makes no sense
<zid>
it's also grammatically awful
<gog>
PCI BAR
<zid>
The field ‘framebuffer_addr’ contains framebuffer physical address.
<zid>
English uses articles pls, author
<junon>
It's literally from GNU.org xD it's the GRUB manual on Multiboot 2, amazing
<junon>
gog: What's PCI BAR?
<zid>
for PCI devices
<zid>
they have memory regions associated with them
<gog>
base address register
<zid>
BARs are ^
<zid>
and they're writeable
<zid>
so that multiple devices don't try to decode the same addresses as their own
<gog>
if the video card is PCI then you can set the framebuffer by setting one of its BARs
<zid>
sort of like isa port conflicts for joystick and sound cards :P
<gog>
typically
<gog>
VBE will do that
<junon>
Ahhhh okay
<junon>
neat, so it's possible to set the address of certain devices
<gog>
for PCI it's mandatory if it has MMIO
<zid>
yea, usually the bios does all that though
<gog>
yes
<gog>
and if it is PCI, it almost always has MMIO
<zid>
unless you support hotplug you probably don't have code to change it
<zid>
generally
<gog>
yeh
<gog>
and most PCI host bridges don't support that
<junon>
I'm surprised the CPU can just reroute addresses like that, is that part of the MMU or is that a different subsystem of the chip?
<zid>
or maybe to work around bios quirks
<zid>
it isn't the cpu
<zid>
The PCI device has a configuration, that configuration tells it "decode addresses that start 0xF8F"
<zid>
when it sees addresses go past on the PCI bus
<junon>
what about RAM though?
<zid>
what about ram?
<gog>
i guess i've never tried it, idk what happens if you split the adress space by assingin a PCI BAR to an address that points to physical memory
<gog>
i wouldn't do it
<zid>
ram isn't on the PCI bus, the PCI controller will be on the ram bus though, and decode a *huge* range of addresses for every pci deivce on that bus to sub-decode
<zid>
you'd need to reconfigure the pci controller itself to get ram and pci to overlap
<zid>
and my pci controller lives in my cpu these days so that's probably not even possible
<junon>
Ahhhh okay, so the CPU is just requesting <some address> across some pins essentially, and there's external circuitry switching which devices will receive/service those memory requests based on certain upper bits or something?
<zid>
yup
<zid>
exactly like the ISA i/o port bus
<zid>
you literally just had a couple of AND and NOT gates to figure out if you were being talked to
<junon>
I feel like a part of my brain just achieved zen enlightenment or something
<gog>
always cool when something clicks
<junon>
This is also how the BIOS loads its firmware into the CPU upon boot?
<gog>
for x86 the cpu on start up executes the instruction at FFFF:FFF0
<zid>
bubble = NOT, rest is a giant AND
<gog>
there's usally a JMP to the bios there
<zid>
so 'RAM2' on this image is 'if the top bits of the 24 address is 0b00101'
<zid>
that goes to the CHIP_SELECT pin on the IC
<heat>
<gog> i guess i've never tried it, idk what happens if you split the adress space by assingin a PCI BAR to an address that points to physical memory <-- depends on the chipset
<gog>
meow
<heat>
intel chipsets will, AFAIK, not do that
<heat>
well, they will not support that I mean
<zid>
The problem with doing it via the BARS is that if the BAR is outside of the PCI range
<zid>
it won't ever *see* anything on that address
<gog>
makes sense
<zid>
because it won't even make it to the PCI device
<junon>
Right it'll never activate those circuits
<heat>
they essentially designate the pci bus ranges (what they call DMI) as everything from TOLUD to 4G, then from TOUUD onwards
<heat>
with a small exception for VGA down in the lower regions
<junon>
wait so the I/O ports are similar, then?
<zid>
TOLUD? TOUUD?
<gog>
junon: PCI devices also have address registers for IO space
<zid>
junon: you see that 'select i/o' gate on the imge btw?
<heat>
sorry, tolud = top of lower usable DRAM, touud = top of upper usable DRAM
<gog>
ISA devices have a different configuratin mechanism
<gog>
well a couple different ones
<zid>
That's the *exact* circuit you need to connect to the address pins on an ISA card to make it work, literally, those 8 wires and that chip, and you've made an ISA card that responds to its own port.
<gog>
jumpers on the board or ISAPNP
<heat>
AMD has similar ideas with TOP_OF_RAM or something stupid sounding like that
<heat>
it's actually an MSR there
<zid>
the pci-e root being *in* the cpu means I doubt the address even makes it to the bus
<zid>
if it's inside the ram range
<zid>
it just gets sent straight to the.. internal memory controller that speaks DDR
<gog>
our CPUs are slowly becoming SoCs
<zid>
yup
<zid>
turns out hardware acceleration is fast
<zid>
who knew
<gog>
¯\_(ツ)_/¯
<heat>
x86 cpus are 100% SoCs
<gog>
so is your mom
<gog>
OHHHHHHHHH
<heat>
fuck you
<heat>
i thought u were my friend
<gog>
i am ur friend buddy
<heat>
are we buddies in a buddy allocator
<gog>
yes
<gog>
but we'll never split
<junon>
yeah was gonna say... something something split
<junon>
:D
<gog>
:D
<gog>
heat i'm sorry for making a your mom joke but i couldn't resist
<zid>
I thought of a stupid your mom joke yesterday but I had nobody to tell it to
<zid>
and now I forgot it
<heat>
so couldn't your mom
<gog>
lmao
<bl4ckb0ne>
osdev more like grillingdev
<heat>
anyway it's super funny how intel chipsets all have make-belief bridges that you use to configure the shitz
<heat>
where AMD went the magic MSR route because it's literally the same thing
<heat>
all in the SoC
<gog>
yes
<gog>
my friendship ended with intel a while ago, now amd is my best friend
<zid>
xeon was great, so was coal
<gog>
i'll probably regain friendship with intel at some point
<zid>
if intel makes a good cpu I will want it
<zid>
lets cross our fingers
<gog>
i liked my haswell
<gog>
but that was very 2013
<heat>
kaby lake poggers
<zid>
sandy is the best thing they've ever made
<zid>
anyone who thinks otherwise is a terrible person
<heat>
sandy bad
<heat>
kabylake good
<mjg>
sandy?
<heat>
upvotes left
<zid>
competitive on perf for the next decade, *still* offers better base features than modern desktop.
<mjg>
Leon Mao
<gog>
renoir renoir renoir
<heat>
renoir? more like renass
<gog>
fuck you
<mjg>
OH
<heat>
french-sounding leftist CPU uarch
<mjg>
i thought he is your protege or something
<heat>
very fancy and liberal san francisco there mate
<mjg>
french CPU would not even execute the instruction set
<gog>
Debout les damnés de la terre
<mjg>
it would pretend it does not understand it
<gog>
Debout les forçats de la faim
<mjg>
les marionettes
<heat>
now presenting the new Intel 14th gen based on our new uarch TruckNutsLake
<gog>
i cannot execute ze instruccion
<heat>
a true American(tm) uarch
<gog>
i have not had my baguette and wine
<mjg>
Ligma Bridge
<gog>
hon hon
<zid>
FuckOffeeLake
<gog>
sugma lake
<heat>
updoglake
<mjg>
speaking french is for la parvenu
<gog>
also heat is not my protegé, he's a better programmer than i am
<mjg>
born 1 century too late
<mjg>
gog: easy there gogs, we don't want to encourage him too much in here
<zid>
Born too late to explore the world, born too early to get a good intel cpu
<heat>
im a better programmer than everyone except linux torval and matthew garrett
<gog>
i'm not a very good programmer
<zid>
what about peter djikstra
<mjg>
here is a programmer litmus test
<mjg>
is pascal good
<heat>
peter djikstra bad programmer handsomest man
<zid>
or greg k. h. (the k. h. is for kills humans)
<gog>
i'm gonna go with no because i've never had the need to learn it
<zid>
Why the fuck would you know pascal
<zid>
is it 1974
<gog>
i remember some guy i used to talk to spoke delphi
<mjg>
the answer is bNo
<heat>
now, edgar zjilstra best programmer
<gog>
ah
<zid>
more like PASCAL BLAZE IT
<gog>
it's hungarian notated
<mjg>
dude i got pascal in high school
<gog>
also isn't ada pascal-like or smth
<mjg>
almost lost my shit using it
<zid>
did you go to highschool in the 70s mjg
<zid>
or is polan just.. a bit behind
<mjg>
i went to high school in 2002-2005 in poland
<mjg>
you can consider it 70s in the west
<zid>
polan cannot into space :(
<gog>
my high school intro programming class was python
<heat>
polan can into neighbouring countries into empire
<mjg>
program fml;
<zid>
when restoring commonwealth, plc stronk
<gog>
but it didn't exist until my senior year and i couldn't fit it in because i was scambling to get enough credits to graduate lol
<bslsk05>
github.com: NT4.0/private at master · lianthony/NT4.0 · GitHub
<bnchs>
gog: why are you linking that
<heat>
pls dont post leaks here
<heat>
thanks
<gog>
whoops
<mjg>
whoa onlyfans leak
<bnchs>
congrats gog
<bnchs>
you just made wine lose a few developers
<bnchs>
NOT including me
<CompanionCube>
huh, apparently the xp one included server 2003? suppose that makes sense.
<gog>
it was the first result on google
<gog>
so like
<gog>
idk
<zid>
xp64 was server2003
<heat>
mjg, why do you want to use old systems if you're inevitably going to complain they don't scale anyway
<bnchs>
gog be more careful around posting leaks
<bnchs>
i wanna contribute to wine
<gog>
i will
<mjg>
heat: i would have to get a compiler on them to do it
<mjg>
heat: which i ownt
<heat>
might as well use unixware or sunos
<mjg>
i fucked around on dos and windows for years before i saw the light
<mjg>
that is to say it all sucks so bad
<gog>
why would this still be up though lmao
<zid>
heat are you a high-calorie human
<heat>
idunno
<mjg>
gog: calling people who download?
<mjg>
:
<gog>
idk maybe it's sus
<bnchs>
mjg: microsoft's honeypo
<bnchs>
they're keeping it up to ruin wine
<bnchs>
remember this is hosted in Microsoft Github
<mjg>
that is what i'm saying
<zid>
my mental image of heat is high calorie human with an under-chin hair situation, and a head covering that sounds like a linux distribution
<bnchs>
yes
<bnchs>
that's why NOBODY should look at the source code
<mjg>
so people like heat missed out on bluescreans being a common occurence when using your magic desktop
<mjg>
xp released before he was born
* mjg
realizes he is hold af
<mjg>
old
<gog>
you're one year older than me relax
<heat>
you're all old
<CompanionCube>
i was gonna say if it was a honeypot the w2k source would be taken down but nope that's *also* still up on github, so while i don't think microsoft is actually doing that it's at least possible
<mjg>
gog: you '85?
<gog>
87
<mjg>
ye is what i meant
* mjg
<-- old
<bnchs>
CompanionCube: c'mon it's in the first result of google
<gog>
lol
<zid>
89 :(
<bnchs>
it is a wine honeypot
<zid>
I am the same age as germany
<gog>
the same age as modern germany
<gog>
there was a reich and a republic and another reich before that
<mjg>
gog: fwiw you got nothing to look forward to, saying this as an older person
<gog>
oh and the two germanies
<zid>
GDR best sub-germany
<mjg>
how does a middle aged man know he is still alive?
<gog>
mjg: that's why i go to the gym
<mjg>
something hurts
<gog>
trying to stave off the decline of my body as much as possible
<zid>
I just be thin
<zid>
can't be unhealthy if you're underweight, they proved it in rats
<zid>
less cancer, less aging, etc just from 'having fewer cells and doing less digestions'
<mjg>
gog: push ups, pull ups and plenty of juice
<mjg>
now i'm mildly curious what happens when women take tren
<zid>
Is that a street name for the steroids you take
<mjg>
[for people out of the loop, it is a substance *banned* from human use. it is legal for use in animals to buff them up]
<mjg>
zid: ye, amongst other compounds
<zid>
I take HGH
<mjg>
i'm taking more shit than liver king
<zid>
snort it right out of aborted babies
<mjg>
trenbolone sandwiches == best
<mjg>
i hear i messes with people big time, including turning them gay(no joke)
<zid>
mjg bro
<mjg>
mm did you take it?
<zid>
you can't "turn people gay", they were looking for excuses to fuck men
<zid>
and you got conned
<mjg>
are you calling me a closeted homo
<mjg>
cause that's right on the money
<zid>
side note, it's sort of wild how accurate sexual preference is, it almost always gets it bang on as a specific gender and age range of human
<zid>
and not like, cheese
<zid>
or only elm trees
<zid>
and it's very very very resistant to being changed
<mjg>
seriously though i did not look particularly closely into it
<mjg>
i only got stackoverflow-level guarantees for accuracy here
<zid>
If it made people gay
<zid>
it'd be used in warfare 100%
<heat>
gog, you forgor prussia btw
<heat>
bad mistake
<gog>
prussia is a different animal
<mjg>
pRussia
<heat>
prussia was very germany
<zid>
When you hear things, you need to consider if they're true in the scale of "would the US have done this to a random part of the middle east?"
<zid>
if the answer is "yes" but they have not, it's not true
<heat>
particularly after the early 1800s
<mjg>
is pRussia just russia written by a hungarian?
<junon>
as a gay man living in berlin, this convo is a whole deal right now
<gog>
lel
<zid>
"Cell phones cause cancer" -> "Did the US bathe the middle east in cell phone amplifiers and give everybody cancer?" -> "No" -> False.
<mjg>
junon: what's going on?
<zid>
Easy.
<mjg>
does bacon cause cancer?
<zid>
Let's find out
<mjg>
did the us feed the middle east?
<mjg>
no
<mjg>
false
<zid>
see, it works great
<mjg>
agreed
<mjg>
did you get it from chatgpt?
<zid>
get what from chatgpt
<zid>
common sense?
<mjg>
it can do that?
<zid>
do what?
<heat>
linux
<mjg>
nigga either play along or gtfo
<zid>
why the fuck would I play along with stupid shit about moronic corporate products
<mjg>
junon: i hear there are anti-lgbt movements in poland, no clue about .de
<zid>
I'm not a wage slave to chatgpt's owners, I don't need to give them free advertising for their scam product
<mjg>
zid: i don't know, have you tried having lulz?
<zid>
have you tried having standards?
<mjg>
i don't need stadnards, i have chatgpt
Gooberpatrol66 has quit [Quit: Leaving]
<heat>
wtf
<gog>
osdev
<zid>
did sham ever find me my pe header
<heat>
yes, please osdev
<zid>
I don't like the msdn pages
<bl4ckb0ne>
speed run going off subject any%
<gog>
hi bl4ckb0ne how you today
<gog>
are you enjoying osdevving
<bl4ckb0ne>
im mad
<gog>
why are you mad
<bl4ckb0ne>
yes
<bl4ckb0ne>
i also enjoy johto
<bl4ckb0ne>
i am mad my son didnt sleep
<bl4ckb0ne>
because i couldnt osdev
<heat>
son > osdev
<heat>
always
<bl4ckb0ne>
thats not what mjg told me
<gog>
mjg says a lot of things
<bl4ckb0ne>
but he's cute and we did a little walk so im not really mad
<gog>
best to take what's useful and leave the rest
<mjg>
whoa there this channel turns judgmental real quick
<zid>
heat how many passes does ld do
<zid>
can I forward reference things
<zid>
nasm is one pass so that's SUPER ILLEGAL
<bl4ckb0ne>
ill osdev instead of sleeping like a regular human bean
<gog>
sleep is good
<bl4ckb0ne>
yes but i prefer fixing my uefi bootloader
<gog>
sleep is better than trying to fix your uefi bootloader
<mjg>
uh
<heat>
zid, i think you can
<mjg>
so you are doing osdev or bootloader
<gog>
kernel loader
* mjg
is conflicted on this one
<gog>
what's the line between a kernel loader and a bootlaoder
<zid>
oh nice, osdev wiki was one of my google results
<bl4ckb0ne>
or i could start a pokemon emerald playthrough
<zid>
but it's pe32
<bl4ckb0ne>
in honor of zid
<zid>
I think I can adapt
<zid>
why do you keep talking about pokemon fan games to me
<zid>
I really don't care about them
<bl4ckb0ne>
ill name my mudkip after you
<bl4ckb0ne>
and teach it rock smash
<zid>
good for you
<zid>
I *really* don't care
<heat>
... why's everyone so hostile
* bl4ckb0ne
shrugs
<zid>
I keep telling him I don't care and he keeps pinging me about it
<zid>
so I ask him to stop
<zid>
and he does it again, so I ask him to stop
<zid>
not really hostility, just.. beating my head against a wall
<junon>
zid: I'll change the topic for you
<junon>
is RAID something completely transparent to the OS?
<junon>
Just a passing thought
<zid>
depends who implements it
<zid>
it's definitely not transparent to mdadm
<zid>
but 'fake raid' or hardware raid might be
<zid>
or might not be
<gog>
there's hardware accelerated raid, firmware raid and software raid
<gog>
fake raid == firmware raid
<zid>
hardware raid, fake raid, mdadm
<zid>
also technically 'intel storage technology' iastor
<zid>
for that last one
<zid>
but who configures their raid within windows
<kazinsal>
there's also the possibility of hardware raid being transparent to the filesystem layer but not the whole OS
<zid>
yea there's various levels of "I care about this", as in all things
<mjg>
gog: i dont think there is one, it just sounds better
<gog>
the fake raid might also be performance-limited until a software component takes over
<zid>
like tcp is invisible to some layers, but not others, etc for networking
<heat>
btw junon i read your TLB shootdown question in the logs and that made me do a hard-think about some idea where one would do some quiescence-based TLB shootdowns to save on IPIs
<mjg>
had my fill using windows after 2 minutes
<kazinsal>
wherein the actual FS ops don't know about the hardware raid but the driver and management utils do
<heat>
obviously i don't know if that works well
<gog>
mjg: wha
<gog>
oh
<mjg>
whaoh indeed
<gog>
i forgot what we were taling about last, i have a very short attention span
<mjg>
so a serious question, anyone here versed in windows and is able to profile said kernel?
<heat>
get dtrace
<mjg>
i'm mildly-to-moderately curious how it performs in /certain tests/
<mjg>
mate i don't have real windows nor hw to run it on
<mjg>
but maybe a poor sap in the area?
<junon>
heat: yeah I'm trying to run through a few usecases of "async" TLB shootdowns in some cases for this IPC design of mine.
<heat>
mjg, windows 10+ is free to install
<zid>
objcopy pls, what r u doin
<heat>
junon, the shit problem is that this could temporarily exhaust memory and thus still need actual IPIs
<heat>
like, I can't tell if there's actually relevant wins, and it may not interact well with ASIDs
<heat>
ARM style tlb invalidation is probably miles better
<mjg>
heat: i also don't know fuck about how ot install a compiler and so on
<mjg>
i would be helplezzz
<heat>
mjg, what exactly do you want me to run?
<mjg>
i suspect it does not even do dtrace tho, does it
<mjg>
heat: loller
<mjg>
look fucker
<heat>
dtrace-on-windows
<junon>
heat: In my case it's less about memory availability and more about correctness; in the "slow" mode the IPC channels are ring buffers whereby the message slots have their page table permissions changed in order to prevent incorrect usage. In the "fast" mode, these checks are off and both sides have to support handling the cursor and memory correctly. But the channels are set up by the kernel prior to the two sides being executed at all, and persist over the
<junon>
lifetime of the two processes.
<mjg>
heat: if you can run some will-it-scale *while* profiling the kernel, that would be interesting
<junon>
page faults are used to perform blocking and backpressure
<mjg>
heat: bonus q if there is any way to disable meltdown protection
kerravon has joined #osdev
<mjg>
heat: maybe you hypervisor could lie abut the cpu somehow
<heat>
no idea
<heat>
i have it on bare metal
<mjg>
Check that you are running a supported version of Windows. The current download of DTrace is supported in the Insider builds of 20H1 Windows after version 18980 and Windows Server Build 18975. Installing this version of DTrace on older versions of Windows can lead to system instability and is not recommended.
<mjg>
what cpu?
<mjg>
is that your kaby?
<heat>
yes
<heat>
i dual boot
<mjg>
aight
<mjg>
well see above
<mjg>
does not look like it is safe to begin with
<heat>
seems like it should work fine
<mjg>
or are these numbers older than 10
<mjg>
well if you are genuinely up to it, that would be appreciated
<mjg>
but don't try too hard :X
<heat>
junon, oh right you can't really pull tricks with mprotect can you
<mjg>
the apis look rather... PESSIMAL
<mjg>
so i expect lol overhead out of the gate
<zid>
guys, guys
<heat>
unless you wait in mprotect for the quiescent state, in which case, very PESSIMAL
<zid>
I think all my finger types are in the top 5
<heat>
the pinky is lame and does not make my top 5
<junon>
I know that you can get the address of the faulting instruction and the destination address of the op, but in the case of writes, is there a way to get the value of the write?
<zid>
pinky better than ring
<zid>
doesn't even have a tendon
<junon>
Or is that completely entering black magic territories?
<heat>
junon, no
<zid>
I thought the pf addr was in the fault
<heat>
the positive side is: you get to implement your own x86 decoder AND emulator!!!
<zid>
and you had to use the stack to find the rip of it
<zid>
:(
<junon>
zid: the addresses are there, but not the values themselves.
<zid>
oh, value, pfft
<zid>
who needs those
<junon>
Like the value that is to be written to the address
<zid>
single step debug the faulting instruction
<heat>
you know what kernel has this capability?
<zid>
onyx?
<heat>
fuckin linux
<heat>
no im not smart enough to figure out x86 encodings remember
<gog>
if it's a write and you want the value i suppose you could do some weird shit and re-run the instruction with its context
<gog>
but it's not guaranteed to be the exact same value
<junon>
yeah you'd have to do a software emulation of the instruction
<gog>
it's a little more complicated than that
<junon>
you'd have to fetch the source of the write (which register, etc.) and then pull from it, no?
<junon>
and you'd only be able to do that by decoding the instruction
<gog>
i suppose
<gog>
but what if the instruction is a stack push
<junon>
in this case it wouldn't be
<junon>
but yeah, I suppose it could be.
<gog>
well i guess that wouldn't be different
<gog>
idk it seemed more complicated thinking about it
<junon>
I mean if you decode 'push rax' then you just need to read from rax
<junon>
but bleh the complexity of this is... way too much to justify going this route haha
<junon>
I need to figure out another way to do this.
<junon>
but I enjoyed the thought exercise lol
<zid>
emulate all of the x86 in the first place
<zid>
then it isn't a side-case
<zid>
it's part of the main case
<heat>
stop writinga kernel in the first place
<heat>
then you won't have to think about any of this
<heat>
enjoy a nice vacation to a caribbean island
<heat>
visit iceland, meet gog and learn rizz tips and tricks
<gog>
do not visit iceland
<gog>
also i don't have rizz stop with this rumor
<heat>
that's exactly what the rizzler would say
<mjg>
i met gog, she is a hound for women
<mjg>
albeit her tips may be only useful if you are also one
<mjg>
so rather limited on this channel innit
<mjg>
heat: where is my windows kernel flamegraph
<heat>
tip #1: stop using IRC
<heat>
women don't like cavemen
<gog>
unfortunately i have no insight on what straight women like
<heat>
yes, IRC doesn't run on anything newer than 2006
* mjg
hails from a 2005 desktop
<heat>
2004 GNU/Linux Libreboot thinkpad here
<junon>
Is there an instruction that can zero a byte in memory that isn't mov-based?
<mjg>
heat: fortunately there is a StartIrcSessionByHandle func since windows 98
<heat>
junon, stos
<mjg>
why are you trying to not mov tho
<junon>
Was just a shot in the dark to see if I could avoid having to decode the entire instruction in order to know if it's an increment or a "clear" (set to 0)
<mjg>
i guess xchg can also do it, nott that you should use it
<heat>
mjg, in linux you echo some specific values to ircfs in /sys/net/irc
<junon>
heat: can you give an example?
<mjg>
do you know about portalfs?
<heat>
mov $addr, %rdi; mov $1, %rcx; rep stosb
<heat>
erm, xor %rdx, %rdx too or something
<mjg>
you can just stosb
<mjg>
no need for the rep prefix
<mjg>
nor count in rcx
<heat>
ah ok great
<mjg>
also stosb SUCKSS
<mjg>
really, it is super slow
<heat>
aaa best instruction
<mjg>
rep-related problems aside
<gog>
aaa
<mjg>
that is not a valid x86 instruction
<heat>
aaa
<heat>
yes it fucking is mjg
<mjg>
AAA is the real instruction
<heat>
oh, sorry, i didn't realize we were speaking MASM here
<zid>
AAA is dead
<zid>
long live amd64
<junon>
IF 64-bit mode THEN #ud; -> womp womp
<mjg>
but is NOOOO a valid instruction?
<mjg>
#ud == undefineb dehavior
<mjg>
someone made typos and they stuck
<heat>
unpopular opinion: CPUs should have undefined behavior
<heat>
ud2 -> don't care, may as well blow up
<moon-child>
mov tmp, [x]; sub [x], tmp
<junon>
heat: $1 in GAS syntax is literal 1, yeah?
<moon-child>
also zeroes
<heat>
yes
<moon-child>
also push
<moon-child>
movs
<moon-child>
call if rip happens to be zero
<heat>
most things that write to memory could end up zeroing something
<moon-child>
hell even a faulting instruction can do it
<moon-child>
yeah
<mcrod>
hi
boga has joined #osdev
<heat>
mcrod? more like mcrodbest
<junon>
is the mov $1, %rcx necessary if rep prefix isn't used?
<heat>
mcrodbestdeveloperandpersonever
<mjg>
no
<heat>
no
<mcrod>
i... are you drunk
<mjg>
it is for the count
<heat>
mcrod, no
<moon-child>
if mcrod is so good why's there no mcroe yet
<mcrod>
i will take the compliment
<heat>
why can't i compliment you
<zid>
what I wanna know is why 'rep blah' is its own instruction
<mcrod>
no you can
<mjg>
moon-child: you have not seen mcroc i take it
<mcrod>
but that was just so random
<zid>
rather than it being a prefix byte I can do for anything
<mcrod>
also, guys
<moon-child>
mjg: no that guy sucks
<mcrod>
i'm moving for the first time
<heat>
no, you said hi
<moon-child>
fuck mcroc
<zid>
It looks like one, but it isn't
<mcrod>
no one in real life is happy for me so here I am
* mcrod
party
<heat>
congrats
<mjg>
get a dog
<mcrod>
we have one.
<heat>
didn't you move a couple of weeks back?
<mcrod>
no
<mcrod>
i was in the process of getting the applications/seeing places etc
<mjg>
mate if your own dog does not care
<heat>
i swear you said something related to that?
<mjg>
that's pretty bad
<moon-child>
lol
<heat>
"hello mr woof, we moving"
<heat>
mr woof: "woof"
<gog>
mcrod: will you pet me
* mjg
never gets asked :(
<bnchs>
mjg: will you pet me?
<heat>
junon, if you want a shortcut for "instruction sequence that can safely zero this without me implementing a decoder and all types of depression", just do it in assembly
<zid>
polan germs
<mjg>
bnchs: no
<bnchs>
;_;
* mcrod
pets gog
<heat>
define mov $0, [reg] as the only sequence that could ever do it, else UB
<heat>
and then you just increment that shit
<mcrod>
mjg i guess i'm just cute.
* bnchs
curls up
<junon>
heat: that's pretty much exactly what I'm doing
<heat>
so why do you care about other instructions then?
<junon>
specifying "this address has to be either incremented or set to zero exactly this way"
<junon>
anything else is faulty
<junon>
(still not sure this is the approach I wanna take)
<moon-child>
junon: wait what are you doing
<moon-child>
and why
<zid>
silly tings
<moon-child>
I mean that much is clear already
<junon>
moon-child: determining if a specific write condition is met in a page fault
<moon-child>
but
<moon-child>
oh
Turn_Left has quit [Ping timeout: 260 seconds]
teroshan97 has joined #osdev
<moon-child>
i see
<zid>
butt
<junon>
the original question was if the page fault handler is also given the value that would be written, not just the address
<moon-child>
why
<moon-child>
if somebody wanted to not force commit the thing, maybe they should have simply not written a zero
<junon>
well, the ORIGINAL original question was whether or not you could tell the CPU to skip the instruction that caused a page fault and discard the memory operation
<junon>
the answer was "not without decoding the instruction and jumping N bytes after RIP"
slidercrank has quit [Ping timeout: 264 seconds]
<heat>
what part of that answer isnt attractive to you?
<junon>
so then the question became more of whether or not you could decode-but-not-really the instruction by specifying that only specific instructions were supported
<junon>
because writing a full-blown decoder is a wild ask, at least for x86
teroshan97 is now known as teroshan9
teroshan9 has quit [Ping timeout: 250 seconds]
<heat>
i n f i n i t e f u n
<heat>
i'll pad all my mov $0, (%reg) with 66h prefixes so your logic gets confused