klange changed the topic of #osdev to: Operating System Development || Don't ask to ask---just ask! || For 3+ LoC, use a pastebin (for example https://gist.github.com/) || Stats + Old logs: http://osdev-logs.qzx.com New Logs: https://libera.irclog.whitequark.org/osdev || Visit https://wiki.osdev.org and https://forum.osdev.org || Books: https://wiki.osdev.org/Books
<dasabhi> hey do we classify a page directory as the pages that are non leaf page table entries in a multi page table system?
navi has quit [Ping timeout: 268 seconds]
<dasabhi> leaf pages being the final page tables that contain actual addresses
<dasabhi> where as the other page tables are just pointers to other page tables, which i am asssuming are 'page directories'
<heat> page directory is an old x86 term
<heat> page table is generic enough and correct enough
<heat> non-leaf page table i guess
<dasabhi> okay i will keep a note of that, its an x86 term
<Ermine> folios!
<kazinsal> broke: "page directory". woke: "multi-layer page table". bespoke: "heckin funky linked list"
theruran has quit [Quit: Connection closed for inactivity]
<geist> yah i generally say something like non leaf table
<geist> though thats kinda ambiguous in a particular sense beecause an inner page table can have a mix of leaf entries and page table links
<geist> sometimes i use 'inner page tables' or something to mean levels o the table that aren't all the way out
<geist> for page table entries i tend to use ARM's lingo: terminal and non terminal entries
<zid> tabletables
<zid> or just regular ass-tables
<heat> pte is nice, i like pte
<heat> for individual level naming you can drink the linux koolaid and go pgd, p4d, pup, pmd, pte, ptep
<heat> pud*
netbsduser has quit [Ping timeout: 268 seconds]
<pog> yo dawg i heard you like virtual memory mapping data structures
<kof673> i have a heat question.... > The myth of Geryon is linked to the building of the nations of Spain and Portugal
<heat> never heard of it
<pog> who
<bl4ckb0ne> i found worst
<bl4ckb0ne> mtlb/stlb
<bl4ckb0ne> that shit sucks
* vdamewood gives pog a fishy
<dasabhi> geist: i didnt know internal page tables can have leaf entries, is that an x86 thing
<geist> large pages
<geist> 2MB, 1GB, etc
<dasabhi> xv6 textbook makes it seem riscv has to perform the three stage translation no matter what
<dasabhi> ah
<dasabhi> so thats why huge pages work
<dasabhi> wait does this mean no huge pages in riscv?
<geist> yep! basically think of it as an early terminate in the page table walk
<geist> there are totally huge pages in riscv
<geist> at all levels, more flexible than x86 even
<dasabhi> so then riscv can terminate before it compltes the three stage walk
<dasabhi> if its a huge page
<geist> yep
<geist> it is a huge page simply because it early terminates
<dasabhi> okay so xv6 was lying
<geist> that is not new
<dasabhi> textbook was lying*
<dasabhi> making a note of this
<geist> there's no real special cases in riscv page tables, except you can't have a page table pointer on the last level
pog has quit [Quit: byee]
<geist> on the inner levels it can be a big page or a pointer to a lower table (or not valid)
<dasabhi> and these rules are very different in arm and x86 yeah?
<dasabhi> well more so in x86 i am guessing
<zid> x86's big pages are just early terminations
<zid> The directory that would map 2M stops there instead of having children 4kB entries, 1GB doesn't have any 2M table children, it just stops there
<zid> it'd be kinda weird to do anything else tbh, you'd end up with overlaps or gaps or something
vdamewood has quit [Quit: Life beckons]
<zid> it would let you misalign them though
<dasabhi> hey what about the flags found in the intermediate PTEs, are they useful even if there exists a translation all the down to the final Page table?
<dasabhi> i am assuming they def are for huge pages that terminate the walk early
<dasabhi> but if its a regular 4k page, are the flags in level 1 and 2 ignored?
<zid> They work to terminate the search early via permissions checks
<dasabhi> ah
<zid> they all need to be writeable, to be writeable, afaik
<dasabhi> so they are important and you cant ignore them
edr has quit [Quit: Leaving]
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #osdev
gbowne1 has quit [Read error: Connection reset by peer]
Arthuria has joined #osdev
gbowne1 has joined #osdev
agent314 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
heat has quit [Quit: Client closed]
theruran has joined #osdev
dasabhi has quit [Quit: Lost terminal]
<geist> woot, nearly have my virtio stack redone to sit on top of mmio and pci
<geist> the PCI bits are very data-driven, lots of pci capabilities to parse and whatnot
bliminse has quit [Quit: leaving]
bliminse has joined #osdev
oldgalileo has quit [Ping timeout: 240 seconds]
Arthuria has quit [Ping timeout: 256 seconds]
pebble has joined #osdev
zetef has joined #osdev
<clever> geist: nice
<clever> ive only looked at the mmio side of things
<geist> yeah, at the end of the day it ends up just being more MMIO bits to whack, but the way it's described is more complicated
<bslsk05> ​<unnick> autotools be likechecking for number system base ... base 2checking for signed integer system ... twos complementchecking for galaxy ... milky waychecking for laws of the universe ... standard model
theruran has quit [Quit: Connection closed for inactivity]
goliath has joined #osdev
<clever> geist: have you considered supporting both virtio1 and virtio2 at the same time?
<clever> i think for the guest side, thats simple, just check the version field, and then do the right thing
<geist> yeahi have a whole todo, but i can't figure out how to get qemu to do virtio-mmio-2
<clever> but the host cant do that as easily, it would need to provide duplicate devices, and if the guest supports 2...
<clever> ah
<geist> so i went ahead and just added a printf that says it is skipping it
<clever> i have virtio 2 working in the emulator i'm working on
<clever> let me peek at the qemu src....
<geist> i literally fiddled with that for 15 minutes earlier tonight trying to figure out how to do it with qemu
TkTech7 has joined #osdev
<geist> i couldn't find any switches for it, ie, `-device virtio-blk-device,help`
<geist> or whatnot
<geist> you can asolutely do transitional and non transitional PCI, which is a different kettle of fish
<clever> 122 case VIRTIO_MMIO_VERSION:
<clever> 125 } else {
<clever> 123 if (proxy->legacy) {
<clever> 124 return VIRT_VERSION_LEGACY;
<clever> 126 return VIRT_VERSION;
<clever> it looks like this is the bit flag that has to flip
<geist> yeah i see that all over it too, but i can't figure out how to flip it
<geist> over in virtio-mmio.c there's some talk about some of the devices supporting legacy, but newer ones not.
TkTech has quit [Ping timeout: 260 seconds]
<clever> 463 static const MemoryRegionOps virtio_legacy_mem_ops = {
TkTech7 is now known as TkTech
<geist> so it's almost like it defaults to: if it's an old device (blk, net, etc) use legacy mode, otherwise non-legacy
<clever> 469 static const MemoryRegionOps virtio_mem_ops = {
<geist> yeeep
<geist> also /me waves at TkTech
<clever> ah and then virtio_mmio_realizefn uses one or the other
<geist> didn't see you there!
<clever> 669 DEFINE_PROP_BOOL("force-legacy", VirtIOMMIOProxy, legacy, true),
<clever> it cant be that simple?
<geist> i tried that, didn't work
<geist> said that switch isn't supported
<bslsk05> ​github.com: virtio-mmio: implement modern (v2) personality (virtio-1) · qemu/qemu@44e687a · GitHub
<clever> it was added 5 years ago, what is your qemu version?
<geist> 9.0
<clever> > Machine types willing to use v2, can enable it using MachineClass's compat_props.
<geist> godo to know
<geist> will fiddle with it
<clever> hw/arm/virt.c: compat_props_add(mc->compat_props, hw_compat_4_2, hw_compat_4_2_len);
<geist> also seems like the risc-virt machine still defaults to 1
<geist> maybe it's a switch on the machine itself
<clever> include/hw/qdev-core.h has the definition of compat_props_add
<clever> the 2nd arg is an array, and 3rd is len
<geist> hmm, no i dont see it at least on the arm virt machine
<geist> as a switch that is
<clever> yeah, that was more of an example of compat_props
<geist> `-machine virt,help` shows yo all the switches
<clever> i suspect its something that hw/$arch/virt.c has to enable
<clever> but they didnt give an examples
<geist> yeah, i dont see it on riscv virt machine either
<clever> so, what other DEFINE_PROP_BOOL's are there....
<clever> 667 DEFINE_PROP_BOOL("format_transport_address", VirtIOMMIOProxy,
<clever> hw/core/machine.c: { "virtio-mmio", "format_transport_address", "off" },
<geist> thing is that arm virt, riscv virt, and x86 all support hte PCI one, so i think PCI is generally what everyone cares about
<geist> if nothing else because it has MSI-X and whatnot
<clever> thats in the hw_compat_2_6 array
<clever> which arm then uses
<clever> so, i think you want to find one of those hw_compat arrays, and add force-legacy to it
<clever> ive been ignoring pci in this emulator, because that would require a pci controller first
<geist> yep
<geist> this is some other emulator?
<bslsk05> ​github.com: mini-rv32ima/mini-rv32ima/virtio.c at nix · cleverca22/mini-rv32ima · GitHub
<clever> this file implements virtio-mmio 2
<clever> and mini-rv32ima.h is the entire cpu core
zetef has quit [Ping timeout: 255 seconds]
<geist> ah
<geist> fun!
<geist> yeah rv emulators are so fun to write
<geist> i need to bash one out for lulz too, but it looks so simple it's fun
<clever> tracing things thru qemu, i think `-machine virt-2.6` uses the hw_compat_2_6 array, which enables the format_transport_address feature in virtio
<clever> so in theory, you should now have enough into to modify the hw_compat arrays, to add your own version, or just modify an existing one
<clever> and then when you select that variant, it will use virtio 2
<geist> the other fun platform that qemu implements virtio on: m68k, machine=virt
<geist> has virtio-mmio!
<clever> upstream wrote the core of the emulator, ive just added simple-framebuffer, and virtio
<geist> problem i have *there* is i dont have big endian support in my virtio layer
<geist> heh FWIW, *that* seems to support version 2 by default
<geist> just the endian is swapped around, because IIRC one of the differences of version two mmio is it is no longer in host endian, everything is hard LE
<clever> most of the work ive done, has been getting the nix package manager to support rv32ima nommu
<clever> i can now build a userland with both uclibc and musl, and boot either
<bslsk05> ​IRCCloud pastebin | Raw link: https://irccloud.com/pastebin/raw/Co8QaqaN
<clever> oh, and on the subject of BE, linux and aarch64 support running in BE mode
<geist> mmio in the right spot, filled out, but the bytes are all swapped around :)
<clever> i knew a few guys, that got BE linux to boot on an rpi
<clever> but it promptly crashed all over the place because of a lack of byte swaps in drivers
<geist> indeed. i dont really have any intention of dealing with BE arm or riscv
<geist> and yeah that
<clever> i consider it a useful testing target
<clever> BE aarch64 is far simpler to find hw for, then m68k :P
<geist> honesty it's a little weird that virtio went hard LE like that. machine arch endian makes sense to me
<geist> but i guess the idea is if you could be running a BE guest in a LE host, even with KVM
<clever> what if you have a LE host with a yeah
<geist> and then making the host deal with the endian swap is annoying
<geist> so fuck it, if the guest wants to be BE, then its their problem
<clever> the host wont always know what endian the guest is
<clever> because arm can switch
<geist> yah so do most risc architectures, since it's easy to do
<clever> i just noticed
<clever> { "virtio-pci", "disable-legacy", "off", .optional = true },
<clever> this line is in the 2.6 compat array
<geist> yep, virtio-pci you seem to be able to easily force legacy or not
<geist> and that has a lot of ramifications to the layout, more so than the mmio version
<clever> ah
<clever> on mmio, the only difference i noticed at a glance, is how you find the rings
<geist> OTOH the pci virtio stuff is more flexible because it's mostly described in a series of pci capabilities
<clever> ah
<clever> mmio just has crazy big bit fields
<geist> re: virtio-mmio how you find the rings and how you describe it to the host. the v2 version is a full 64bit thing with pointers to the 3 areas (descriptors, avail, used)
<geist> whereas v1 is just a PFN pointing to the base and everything has to be mashed in
<clever> yep, exactly
<clever> but, what does page# mean when the guest is nommu? or is using 16k pages?
<geist> yeah. in v1 there's a guest_page_size field that you fill in that sets what PFN is in units of
<geist> v2 does away with that and you just just fill in a full 64bit pointer to the 3 areas, that no longer need to be contiguous
<clever> thats just 64bit addressing with extra steps! lol
gbowne1 has quit [Read error: Connection reset by peer]
<geist> i figured this all out recently with the PCI stuff, since it jumps directly to the v2 style mmio stuff
<geist> ie, there's 3 fields you fill in
<clever> one issue i ran into, is putting keyboard and mouse on the same virtio-input
<geist> oh yeah? would they just be on different rings?
<clever> linux caps a queue at 64 events max, and the mouse can easily overwelm a guest
<geist> ah interesting
<clever> and if the host then drops a key-up event, the guest will go into auto-repeat
<clever> so you need to either buffer events on the host side, or put key events in a dedicated queue (a whole 2nd device)
<clever> then i discovered, mouse-up also drops, so the problem isnt solved :P
zetef has joined #osdev
<clever> and i only discovered that, because ive been playing doom inside the emulator
zxrom has quit [Quit: Leaving]
<geist> heh doom ported to riscv huh
<clever> upstream already ran doom baremetal over the emu serial
<zid> risc-v now as fancy as a pregnancy test
<clever> i think
<geist> ahaha
<clever> all i did was run it under linux, with simple-framebuffer and evdev
<geist> still waiting for Grindavik to pop https://www.youtube.com/watch?v=804nPrAUAxg
<geist> any minute now!
<geist> i mean who knows, but there are a lot of earthquakes
<clever> dang
<zid> I'm waiting for the gavle goat
<geist> they know the magma has been building up, and it's basically to the levels it was the last few times it's popped in the last few months
<geist> so it's one of these any day now things
<zid> cor, it's wimdy up there
<zid> look at those clouds rocket past on top right
<zid> fighter-jet clouds
<geist> https://www.youtube.com/watch?v=1TWiAPdGg5k is a more direct view of the town
<geist> you can see it smoking off there on the left
<FireFly> my brain still doesn't treat 'cor' as a real word
<clever> geist: i also discovered 2 fork related bugs on rv32nommu
zxrom has joined #osdev
<clever> 1st, musl just entirely lacked a vfork() wrapper, so it was using fork on nommu!
<geist> i have no idea what 'cor' is. assumed it was some UK slang
<clever> 2nd, linux doesnt block fork on nommu!
<FireFly> geist: yeah
<FireFly> some UK dialect
<zid> it's not dialectal
<zid> It's just.. old
<geist> as is everything about UK
<zid> been in common use for hundreds of years
<FireFly> cor
<FireFly> (Cockney UK) Expression of surprise.
<FireFly> says wiktionary at least :p
vdamewood has joined #osdev
<zid> FireFly: In the same way that a bunch of stuff is actually dialectal surfer lingo, but now it's just a thing everybody knows
<zid> re the US
<FireFly> sure, makes sense
<geist> i remember for a period there my parents came down on 'man'
<geist> like 'hey man'
<geist> like dont use that shit!
<zid> stoked, kook, etc
<geist> but that was totally not going to happen
<zid> geist: totally tubular, man
<zid> Ironically I think the reason cor is very universally known is due to an american
<zid> a certain dick van dyke
<FireFly> the only reason I know the word is because they decided to use cockney slang for a videogame character heh
<zid> mary poppins / chitty chitty bang bang he did his.. really weird cockney impression :p
<zid> and just said cor blimey a lot
osdev199 has joined #osdev
<osdev199> Hello, I have just built my GCC cross-compiler using the instructions at https://wiki.osdev.org/Hosted_GCC_Cross-Compiler#GCC. Now on using it, I'm getting this error: fatal error: cannot execute ‘cc1’: execvp: No such file or directory
<bslsk05> ​wiki.osdev.org: Just a moment...
GeDaMo has joined #osdev
zxrom has quit [Quit: Leaving]
<Mutabah> Did you copy `cc1` to your target system?
<osdev199> My target system doesn't have the userspace yet. I'm trying to compile my kernel on my host Linux OS.
<osdev199> I can't find cc1 in my host OS. $ whereis cc1 output is blank
bauen1 has quit [Ping timeout: 260 seconds]
<Ermine> where did you install your toolchain?
zxrom has joined #osdev
<osdev199> Ermine: /usr/bin/
bauen1 has joined #osdev
<Ermine> so this is what you've specified as $PREFIX in that instruction?
<Ermine> The instruction uses some subdirectory of your home dir as installation prefix. Use that too
<osdev199> Oops. I didn't pay attention to this variable while copying the commands. This variable isn't set.
<Ermine> Try writing them by hand
<osdev199> Yes I'm using the system root.
<Ermine> And, generally speaking, you don't want to install unpackaged stuff into directories like /usr/bin . These are premises of your package manager
<osdev199> is /usr/local/bin/ fine?
<Ermine> For the first time, install it somewhere in $HOME as instruction prescribes
bauen1 has quit [Ping timeout: 264 seconds]
<Ermine> I think these instructions wouldn't work as-is in /usr/local/ case
<osdev199> Ok. Let me try it.
zetef has quit [Ping timeout: 255 seconds]
zetef has joined #osdev
_whitelogger has joined #osdev
<osdev199> Ermine: from the wiki "You should switch all your operating system build scripts to use this new compiler, even the kernel and libk, as your new compiler is capable of providing a freestanding environment."
node1 has joined #osdev
<Ermine> osdev199: where did you read that?
<bslsk05> ​wiki.osdev.org: Just a moment...
MrCryo has joined #osdev
<Ermine> Then again, os-specific stuff is something you need to bother yourself with when you're about getting userspace
<osdev199> Ermine: I'm compiling a userspace program for my os and I think I should also switch my kernel to use the cross-compiler and linker.
<osdev199> Read in the wiki too that using the host's gcc can create problems later!
node1 is now known as ComputeLabs
ComputeLabs is now known as Comput
Comput is now known as Comput-Labs
Comput-Labs is now known as Comput_Labs
gog has joined #osdev
<kof673> > autotools be likechecking for number system base ... base 2 /me points at tunguska ternary emulator...sort of has/had a "c"-ish language, or was planned... one can only dream
gog has quit [Client Quit]
<kof673> ain't noone writing one's complement or sign and magnitude to my knowledge :D
Comput_Labs is now known as Compute_Labs
<Ermine> osdev199: but you've said you have no userspace yet
<osdev199> Ermine: ...host's gcc can create problems later (including the kernel)! I'm about to build it.
<Ermine> I don't tell you to use host compiler
<Ermine> If you're working on your kernel, x86_64-elf would be fine
<Ermine> Or are you going to do full-fledged gcc port for your userspace?
<osdev199> Yes but not now.
Compute_Labs has quit [Ping timeout: 250 seconds]
zetef has quit [Ping timeout: 256 seconds]
<clever> geist: having a harder time building rv32 LK then i am building qemu, lol
pebble has quit [Ping timeout: 255 seconds]
<osdev199> Ermine: I'm getting the same error with x86_64-elf
pebble has joined #osdev
<kof673> *ain't noone who uses autotools
<nikolar> Plenty of people use autotools
<zid> plenty of people use meth
<kof673> *ain't noone who uses autotools uses it to target one's complement or sign and magnitude systems i can't imagine posix does either
<nikolar> Probably more than autotools, yeah
<nikolar> What's your point
<zid> Wouldn't use how many people use it as a metric for anything important
<nikolar> I just said that because kod said no one uses it
<nikolar> *kof
<zid> Nobody uses autotools though
<zid> it just appears
<zid> It's like cats
<nikolar> You write c code and poof there's a configure script
<zid> A lot more people have cats than deliberately installed cats
netbsduser has joined #osdev
<nikolar> Wouldn't say a lot more
<zid> SIGNIFICANTLY more
<zid> I've never bought a cat
<zid> we've had 4
<kof673> it wasn't a complaint, it is that such mythical creatures do not inhabit unixland to my knowledge, they live in mainframes IIRC
<nikolar> Adopting a friend's kitten is deliberate installation
<bslsk05> ​www.datacenterdynamics.com: Just a moment...
<zid> Nope they just appeared
<zid> kittens are fucking expensive btw
navi has joined #osdev
chiselfuse has quit [Remote host closed the connection]
<zid> who was I talking to about english having consonants that we can say but not write
chiselfuse has joined #osdev
<zid> I couldn't think of the example at the tiem but I just did
<zid> ah nortti replied to it at least
<kof673> i would like a library to simulate such things, but just skeleton functions for now, it is not exactly high priority :) would want a transpiler, or bytecode, else have to rewrite code to use function calls.
<zid> It's impossible to shorten the word 'casual' in english typography, but you can say it just fine, also the word.. ʒuʒ
<zid> meaning to spruce up
pebble has quit [Read error: Connection reset by peer]
pebble has joined #osdev
bauen1 has joined #osdev
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #osdev
m257 has joined #osdev
osdev199 has quit [Ping timeout: 268 seconds]
FreeFull has quit []
pebble has quit [Read error: Connection reset by peer]
osdev199 has joined #osdev
m257 has quit [Ping timeout: 250 seconds]
rustyy has quit [Ping timeout: 264 seconds]
edr has joined #osdev
rustyy has joined #osdev
oldgalileo has joined #osdev
osdev199 has quit [Ping timeout: 260 seconds]
Gooberpatrol66 has quit [Quit: Konversation terminated!]
osdev199 has joined #osdev
Left_Turn has joined #osdev
<osdev199> Hey, if I compile my C program using my cross-compiler, I get this error: /home/user/usr/lib/gcc/x86_64-myos/13.2.0/../../../../x86_64-myos/bin/ld: cannot find crt0.o: No such file or directory
<osdev199> and /home/user/usr/lib/gcc/x86_64-myos/13.2.0/../../../../x86_64-myos/bin/ld: cannot find -lc: No such file or directory
<osdev199> I have built and installed musl C library to /home/user/usr
<osdev199> wait, I think it must be in ~/myos/sysroot/usr
<osdev199> *installed in
snowcra5h has joined #osdev
<osdev199> The second error for -lc is gone
Arthuria has joined #osdev
seds has quit [Quit: Connection closed for inactivity]
Left_Turn has quit [Remote host closed the connection]
Left_Turn has joined #osdev
PublicWiFi is now known as PiblicWiFi
FreeFull has joined #osdev
Arthuria has quit [Ping timeout: 268 seconds]
PiblicWiFi is now known as PublicWiFi
Gordinator has joined #osdev
oldgalileo has quit [Ping timeout: 268 seconds]
GordinatorG has joined #osdev
Gordinator has quit [Ping timeout: 272 seconds]
dalme has joined #osdev
oldgalileo has joined #osdev
goliath has quit [Quit: SIGSEGV]
<dostoyevsky2> Could a sendfile() be used to implement a syscall-less tcp/ip stack where you just need to setup a socket which will then be mapped to a ioport in the cpu that you can use to share data between kernel and userland without any syscalls?
GordinatorG is now known as Gordinator
Gordinator has quit [Quit: My client has closed - perhaps I did that, perhaps I didn't]
Gordinator has joined #osdev
bauen1 has quit [Ping timeout: 260 seconds]
osdev199 has quit [Quit: Leaving]
heat has joined #osdev
Gordinator has quit [Remote host closed the connection]
bauen1 has joined #osdev
<Ermine> linux earlyprintk is damn slow
gog has joined #osdev
stefanct has quit [Ping timeout: 268 seconds]
stefanct has joined #osdev
<nikolar> ¯⁠\⁠_⁠(⁠ツ⁠)⁠_⁠/⁠¯
<heat> Ermine: conversely ONYX PRINTK DAMN FAST GO VROOOOOOOOOOOOOOOOOM SUPER FAST
<geist> also iceland has a volcano again
<Ermine> heat: yeah, linux is not a competitor for us
devurandom has quit [Quit: Ping timeout (120 seconds)]
zxrom has quit [Remote host closed the connection]
devurandom has joined #osdev
zxrom has joined #osdev
alpha2023 has quit [Quit: No Ping reply in 180 seconds.]
<Ermine> Is there such a thing as hotplug cpu?
alpha2023 has joined #osdev
<heat> yes
m3a has quit [Remote host closed the connection]
<nikolar> Is there such a thing as hotplug ram
m3a has joined #osdev
<heat> yes
<Ermine> So I can just insert a cpu and pull it off when I like it?
<nikolar> How would that work
<nikolar> You have to flush the cache at least
<heat> if the platform supports it, maybe
<heat> i don't know how this feature is being used, but i know linux has supported it for a long time
<heat> i have however seen memory hotplugging used as something like: "init N MB of memory at boot, defer the rest after init runs" so boots go super mega fast
<heat> but ofc hotplugging != pull it off willy nilly
<heat> PCIe hotplugging is a thing, USB hotplugging is a thing (and for USB itself you can't just pull it off without flushing the caches and unmounting filesystems in the case of a mass storage device)
snowcra5h has quit [Remote host closed the connection]
snowcra5h has joined #osdev
<bslsk05> ​github.blog: How to write the perfect pull request - The GitHub Blog
<heat> >Use emoji to clarify tone. Compare “✨ ✨ Looks good 👍 ✨ ✨” to “Looks good.
<nikolar> So hot plugging a CPU would at least require pressing a button and waiting for an led or something
<nikolar> No?
<heat> 😡😡😡😡this sucks ass😡😡😡😡
<Ermine> instructions clear
<bslsk05> ​systemd.io: Using /tmp/ and /var/tmp/ Safely
<heat> nikolar: sounds more sane to just offline it in the OS and then remove it
<Ermine> a 🚨 Denial-of-Service (DoS) 🚨 vulnerability
<nikolar> heat: yeah I mean either would work I think
<heat> oh i forgot: an easy example of CPU offlining is suspend
<nikolar> Yeah my thinking
<heat> every CPU except 0 is offlined (for linux at least)
gorgonical has joined #osdev
<gorgonical> holy jesus
<gorgonical> trying to build the amd rocm stack is awful
<heat> yeah ive heard
<gorgonical> I spent a good portion of yesterday using some slackbuild files
<gorgonical> They did not work, at all
<gorgonical> Today i'm working on just building it directly from source. But my limited understanding of exactly what each piece of this stack does is sort of obstructing progress
heat has quit [Ping timeout: 250 seconds]
gog has quit [Quit: byee]
node1 has joined #osdev
<nikolar> gorgonical you could look at what the distros are doing
<gorgonical> in theory that's what the slackbuilds were doing -- copied from debian/ubuntu
<Ermine> Multiboot2 apparently doesn't specify handoff state for non-efi x86_64 machines
xenos1984 has quit [Read error: Connection reset by peer]
<kazinsal> bizarre
theruran has joined #osdev
MrCryo has quit [Remote host closed the connection]
node1 has quit [Ping timeout: 250 seconds]
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
josuedhg has joined #osdev
xenos1984 has joined #osdev
Matt|home has quit [Ping timeout: 260 seconds]
node1 has joined #osdev
melonai has quit [Quit: Ping timeout (120 seconds)]
<gorgonical> is this a normal thing? the amdgpu driver uses its minor version as a way to check if a certain feature is supported
node1 has quit [Quit: Client closed]
<gorgonical> like, all the /dev/kfd function calls have a CHECK_KFD_MINOR_VERSION, and i've never seen something like this
node1 has joined #osdev
melonai has joined #osdev
<Ermine> It's weird
<gorgonical> and also, why does the /dev/kfd device report a minor version of 0 when the on-system ioctl header says it should be 6? I see now that's not enough for the library, meaning I need a kernel upgrade, but whatever. This is an unrelated problem
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
pieguy128 has quit [Quit: ZNC 1.8.2 - https://znc.in]
pieguy128 has joined #osdev
<gorgonical> bizarre. they don't expose the minor number on the /dev/kfd file for some reason, but it is checkeg against internally. anyway, the answer to this specific question is a kernel upgrade
node1 has quit [Ping timeout: 250 seconds]
node1 has joined #osdev
shan has quit [Quit: Ping timeout (120 seconds)]
shan has joined #osdev
node1 has quit [Ping timeout: 250 seconds]
gbowne1 has joined #osdev
node1 has joined #osdev
josuedhg has quit [Quit: Client closed]
j_o-s has joined #osdev
node1 has quit [Quit: Client closed]
node1 has joined #osdev
node1 has quit [Client Quit]
node1 has joined #osdev
heat has joined #osdev
gog has joined #osdev
<heat>   gog we both just joined
<heat> twiiiiiiiiiiiinsss
<gog> don't get excited i may not stay long
dude12312414 has joined #osdev
<nikolapdp> oi
<zid> k
<heat> Ermine: define handoff state
dude12312414 has quit [Remote host closed the connection]
<nikolapdp> this code very faster
<dostoyevsky> #define if(x) if (false) /*optimization*/
* mjg rubs shoulder with gog
<heat> mjg: have you seen LUF? it's a fun idea
<mjg> no
gog has quit [Quit: byee]
<heat> basically they want to defer TLB shootdowns of read-only mappings til that folio gets reused
<heat> hoping you can avoid the IPI
<heat> when migrating or doing page replacement, that is
<Bitweasil> Ugh. TLBs.
<Bitweasil> That was my day.
<Bitweasil> Someone updated our emulator code for it, didn't run the tests, and totally broke the damned things.
<Bitweasil> (when the tests don't build, and when they run, they don't pass, I don't need to ask if the person ran them...)
node1 has quit [Quit: Client closed]
josuedhg has joined #osdev
j_o-s has quit [Quit: j_o-s]
Left_Turn has quit [Read error: Connection reset by peer]
josuedhg has quit [Quit: Client closed]
dalme has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jjuran has quit [Ping timeout: 252 seconds]
gorgonical has quit [Ping timeout: 268 seconds]
heat has quit [Quit: Client closed]
oldgalileo has quit [Ping timeout: 268 seconds]
heat has joined #osdev
<Ermine> heat: liek whether the cpu is in long mode or not, paging state, something else CRx-related
<heat> it's implied you're in protected mode
<heat> maybe it should be specified better, but yeah you need to look at the i386 machine state stuff
josuedhg has joined #osdev
<Ermine> will do, thank you
<heat> yw
josuedhg has quit [Quit: Client closed]
heat has quit [Quit: Client closed]