<catern>
anyone know any attempts (perhaps very academic, and maybe crossing over into PL) to get the benefits of memory overcommit (increased resource utilization) without the drawbacks (spontaneous failure)?
<gog>
i'm clicking through a bunch of stuff with no trouble at all. curious
<gog>
catern: afaik it's a tradeoff and you can't really have both. unless you keep a reserve of pages for privileged tasks or something
Raito_Bezarius has quit [Ping timeout: 250 seconds]
Raito_Bezarius has joined #osdev
Raito_Bezarius has quit [Excess Flood]
Raito_Bezarius has joined #osdev
Raito_Bezarius has quit [Ping timeout: 240 seconds]
Raito_Bezarius has joined #osdev
Sos has joined #osdev
ckie has quit [Quit: off I go~]
ckie has joined #osdev
ElectronApps has joined #osdev
Burgundy has quit [Ping timeout: 256 seconds]
Lugar has quit [Quit: Bye]
Lugar has joined #osdev
<scaramanga>
catern, another way to look at it is that the development of overcommit itself is the process of acheiving tht by improving replacement algorithms, policy mechanisms, etc..
<scaramanga>
when you implment overcommit you aren't trying to have the downsides, you're trying to minimize them as far as you can :)
sdfgsdfg has joined #osdev
zaquest has quit [Remote host closed the connection]
zaquest has joined #osdev
gog has quit [Quit: byee]
epony has quit [Ping timeout: 240 seconds]
sdfgsdfg has quit [Quit: ayo yoyo ayo yoyo hololo, hololo.]
smeso has quit [Killed (NickServ (GHOST command used by smeso_))]
smeso_ is now known as smeso
Sos has quit [Quit: Leaving]
sortie has quit [*.net *.split]
ZetItUp has quit [*.net *.split]
bgs has quit [*.net *.split]
joe9 has quit [*.net *.split]
Mutabah has quit [*.net *.split]
MrBonkers has quit [*.net *.split]
rustyy has quit [*.net *.split]
basil has quit [*.net *.split]
pg12_ has quit [*.net *.split]
Goodbye_Vincent has quit [*.net *.split]
MiningMarsh has quit [*.net *.split]
EtherNet has quit [*.net *.split]
amj has quit [*.net *.split]
Mikaku has quit [*.net *.split]
kkd has quit [*.net *.split]
jjuran has quit [*.net *.split]
orthoplex64 has quit [*.net *.split]
koolazer has quit [*.net *.split]
j00ru has quit [*.net *.split]
night has quit [*.net *.split]
les_ has quit [*.net *.split]
Piraty has quit [*.net *.split]
andrewrk has quit [*.net *.split]
j00ru has joined #osdev
sdfgsdfg has quit [Quit: ayo yoyo ayo yoyo hololo, hololo.]
EtherNet has joined #osdev
les_ has joined #osdev
Mikaku has joined #osdev
jjuran has joined #osdev
andrewrk has joined #osdev
MiningMarsh has joined #osdev
joe9 has joined #osdev
Piraty has joined #osdev
amj has joined #osdev
sortie has joined #osdev
kkd has joined #osdev
koolazer has joined #osdev
lg has joined #osdev
the_lanetly_052 has joined #osdev
[itchyjunk] has quit [Read error: Connection reset by peer]
<klange>
one of my USB hubs is now crashing very often, and it has external power so I have to plug two cables to get it to reset... time to get a new hub, I guess
eryjus has quit [Ping timeout: 240 seconds]
xenos1984 has quit [Read error: Connection reset by peer]
xenos1984 has joined #osdev
eryjus has joined #osdev
ElectronApps has quit [Remote host closed the connection]
<bslsk05>
www.ebay.com: 7-Port USB 2.0 Multi Charger Hub +High Speed Adapter ON/OFF Switch Laptop/P S FS | eBay
<zid>
I have a set of usb slots in my desktop on a pci-e card because I needed the chipset so thankfully I have more than I'm using
sdfgsdfg has joined #osdev
<klange>
I have two "PCIe" video capture boards that are actually USB3 and they have onboard hubs that report 2 ports but only one is in use for the vid chip.
<klange>
I wonder if they have any pins for the second port...
<klange>
The hub that keeps crashing is a VIA VL812 packaged up by Elecom.
<geist>
ah so the capture cards are basically an xhci controller with a usb thing paired with it?
<klange>
yep, they work great so I can't complain about the mechanism
<zid>
yea the via vl is the controller I bought the pci-e card for :P
<zid>
6216L or something though
<zid>
6212L
<zid>
My pci-e capture card I've never actually looked at in lspci or anything, that might be interesting at some point
<klange>
Mine are Renesas uPD720202's on the PCIe side.
<klange>
Which is the same chipset in the ExpressCard card I have for my ThinkPad.
<geist>
honeslty the more uber the pci device the less bars and whatnot it has
<geist>
4k and done.
<zid>
I guess it mostly works in reverse via dma
<zid>
via a huge set of regs
<geist>
need a register to set the base pointer for some memory stuff, and probably a kick register to tell it to do something and everything else is memory
<geist>
huh didn't know about hwinfo
<geist>
kinda neat at least. a reasonable way to get a snapshot of a system in one command at least
<zid>
I happen to know this thing has an fpga on it, idk if the driver or the card has the bitstream though
<geist>
might be difficult to load bitstream on it after the fact since that might make it reappear as something different on PCI
<geist>
i remember having a pci based fpga a while back and there was some shenanigans to let you reprogram it dynamically
<zid>
I don't think the fpga does the talking
<zid>
I think it does the signal processing
<geist>
since it might upset the host
<geist>
ah makes sense
C-Man has quit [Ping timeout: 240 seconds]
sdfgsdfg has quit [Quit: ayo yoyo ayo yoyo hololo, hololo.]
kspalaiologos has joined #osdev
fwg has quit [Ping timeout: 250 seconds]
fwg_ has joined #osdev
fwg_ is now known as fwg
nyah has joined #osdev
the_lanetly_052 has quit [Ping timeout: 250 seconds]
sdfgsdfg has joined #osdev
the_lanetly_052 has joined #osdev
the_lanetly_052 has quit [Ping timeout: 250 seconds]
GeDaMo has joined #osdev
dormito has quit [Quit: WeeChat 3.3]
SikkiLadho has joined #osdev
<geist>
cool. added logic to allocate busses for bridges as they are seen
<geist>
still haven't allocated memory ranges, but that comes next
<geist>
I have this artificially complicated pci bus with lots of bridges and whatnot (and even a second root at 0x40 that i dont see here) that it's trying to set up
<geist>
this is on qemu arm, so none of the devices have been configured by firmware. but since you can't see anything downstream of a bridge until you assign it a valid address i had to add the logic to appropriately do that
SikkiLadho has quit [Quit: Connection closed]
<geist>
the complexity comes from drilling down and assigning the subordinate busses as you recurse more than one level
<geist>
so i set it such that every time a new bridge is found and it assigns a new bus number, it recurses up the bridge tree and bumps each of their subordinate bridge counts out
<geist>
that way its always properly decoding all the way down
<geist>
not that complicated, but had to restructure the code to do it
<kazinsal>
nested PCI buses are a thing I haven't really touched much but seems to be a thing that can be somewhat common on real hardware
<geist>
yah ryzen machines in particular seem to like them
<kazinsal>
especially when you have bizarre PCIe cards in that have inherent PCI and ISA converters in them
<geist>
where i see it in ryzen is there's always a root port that the chipset is sitting on and then then chipset is another bridge with a bunch of additional pcie ports on it, etc
<kazinsal>
there's a 16x UART card from StarTech that seems to have two PCI bus bridges and four ISA bus bridges in them with a "local bus bridge" of unspecified technical provenance in the middle
<geist>
intel stuff tends to be a bit flatter
<geist>
but now i fully grok secondary and subordinate bridges and whatnot. found the pci bridge spec and it's pretty straightforward
<geist>
pcie in particular likes to have lots of extraneous bridges with a single device in the 0 slot on the other side. basically represents the point to point connection
gog` has joined #osdev
<geist>
i think the idea is the bridge itself may have capabilities and whatnot that let you configure it, and that pcie devices aren't really on a shared bus, so they dont coexist technically with peers
<geist>
whereas a classic pci device is literally a shared bus in the classic sense
<geist>
oh huh. interesting. FWIW the geforce card in my ryzen is truly mapped > 4GB
<geist>
or at least has 288MB of prefetchable memory at 0x7fe0000000
<geist>
there's a 16MB aperture at 0xfb000000. presumably for legacy framebuffer purposes
* gog`
opens an aperture in spacetime and emerges through it
<geist>
eep!
* geist
beats the computer with a pointed stick
* kazinsal
throws a fishy through the aperture to satisfy the emerging catgirl
* gog`
mews cosmically
* kazinsal
gives gog scritchies and headpats
<gog`>
does firmware set that up where the geforce's ram is memory mapped or does the driver do that at boot
<gog`>
i'm sure it does for the legacy framebuffer
<kazinsal>
on my 1080Ti at least the GPU option rom seems to set up where the BARs are
<geist>
yah i bet it's this way out of the bios
<gog`>
i wonder if it expects 64-bit then if it's mapping them above 4GiB
<geist>
the 16MB <4GB is almost certainly for legacy framebuffer stuff
<gog`>
it seems reasonable if the card itself has at least 4GiB which the latest ones do
<kazinsal>
at a fresh boot before OS reconfig BAR0 is the nvidia stuff, BAR1 is the framebuffer aperture, BAR2-3 are something I don't know about, and BAR4 is an I/O space for the legacy VGA ports
<geist>
yah that being said i dont know what the large aperture is really used for, since i think most of the time moving resrouces around the GPU is mostly GPU initiated
<gog`>
otherwise there must be some GART trickery if 32-bit
<kazinsal>
yeah. I'm not sure about the big aperture stuff either
<kazinsal>
I have limited graphics programming experience but that which I do have is basically just shaders operating on stuff in shader memory or otherwise calling back to the CPU to say "hey dickhead I need to know what's at XYZ address"
<geist>
oh huh that's interesting: i thought 64bit bars were always even/odd pairs
<geist>
i coded my logic accordingly. guess i need to redo that
<geist>
when i was re-reading the bridge spec there is some wonkiness i didn't realize
<gog`>
i love the idea of a gpu referring to a cpu as "dickhead"
<geist>
bridges can only decode 64bit values as prefetchables
<geist>
in the config for the bridge ranges, regular mmio and io are max 32bit base/length
<geist>
but prefetchable range can be 64bit. so i think that means (unless there's some capability or whatnot that i dont know about) stuff > 4GB is *always* prefetchable
<geist>
so it seems to generally limit its utility to being just more PCI space
<geist>
regular bars for regular stuff that's not prefetchable by definition are 32bit
<geist>
but prefetchables can be of course <4GB, just not the other way around
<geist>
also explains why even in configurations like the arm64 virt machine where there's zero backwards compatibility, they still have to have a <4GB pci region and a >4GB one
<kazinsal>
gog`: my descriptions of machine internals should not be taken as gospel as I have had uh, many liquors
<gog`>
"i am the liquor"
<kazinsal>
ha
<kazinsal>
RIP john dunsworth
<gog`>
i haven't had any intoxicants in nearly 2 weeks
<geist>
coo coo ca-choo
<gog`>
starting to feel twitchy
<kazinsal>
condolences
<geist>
yah been cutting back to at most one drink/day
<kazinsal>
get yourself some cannabis, girl
<gog`>
having a procedure soon and i need to go under general for it. gotta avoid it so i don't wake up during
<gog`>
becauses YIL that cannabis affects that
<kazinsal>
I've more or less made my limit 250 calories below my daily expenditure
<gog`>
makes propofol less effective
<kazinsal>
oh dang, hope all is well
<gog`>
it's an elective procedure
<gog`>
nothing major
<kazinsal>
*hugs* best wishes to you then
<gog`>
:D thanks
ElectronApps has joined #osdev
Osm10 has joined #osdev
SikkiLadho has joined #osdev
<geist>
huh interesting, didn't know cannabis interacts with stuff like that
<geist>
not surprising at least, but interesting that that's a possibility
<gog`>
yeah i didn't either until yesterday
<gog`>
was talking about the upcoming thing and somebody's like "don't smoke weed a few weeks before"
Burgundy has joined #osdev
<geist>
huh!
gog` has quit [Quit: byee]
<SikkiLadho>
I'm trying to create bare metal hypervisor on rpi4. We have to clear some fields set by firmware to the device tree blob. Since we are at in a bare metal environment, we cannot use libfdt as it is shared library. How can one remove some fields from the DTB? We only have the dtb address. Can we traverse it without the shared library?
<geist>
you can do it manually, sure
<geist>
it's not that complicated. though you should also be able to statically link in libftd. it's pretty easy to link
<geist>
has basically no external dependencies last i checked
<geist>
and has a very permissive license
<klange>
I have managed to get to userspace and reached ld.so's main()...
<kazinsal>
:toot:
<klange>
It gets to a call to getenv() that is yielding a null pointer dereference presumably because I've messed up something around how I'm passing envp in, but it does get past several instructions and calls to get to main() in the first place, so that's good
tpg is now known as Mutabah
<geist>
oh woot. this is on arm64 i guess?
<klange>
yes
<geist>
oooh looks like HVF is in mainlie qemu v6.2.0 now
<geist>
just synced and ran configure on the m1 mac and it shows up as supported
<kazinsal>
ooh
<geist>
building now
<kazinsal>
haven't fiddled with hardware virtualization on my laptop but I should at some point
<geist>
143 seconds to do a full compelte qemu build. not bad
<kazinsal>
I should do a comparison of my OS build with the 8x SB-E build vs. the
<geist>
heh, lk does not boot at all on this. looks like it immediately traps :)
<kazinsal>
4+4 M1 on my laptop
<geist>
not surprising. M1 is a bit wonky as a core
<geist>
had to fix a few bugs and assumptions in zircon to get it to run
<j`ey>
but qemu virt should be the same?
<geist>
oh yeah i remember what it is. i had to fix this in zirco
<geist>
the LK start.S code uses 64K pages to set up a temporary trampoline page table
<geist>
and M1 only supports 4k and 16k pages
<geist>
so basically doesn't make it out of start.S
<j`ey>
ah
<geist>
far as i know the M1 is the only arm core that doesn't support 64K pages, but that's a perfectly valid architectural combination, just strange
<j`ey>
you can still get 1G with 4k pages, should be enough?
<j`ey>
for a temporary table
<geist>
yep
<kazinsal>
yeah, just an efficiency issue
<geist>
just had to fiddle with the logic a bit. it's actually not that it was using 64K pages, it was using one of the L2 large pages with 64K
<geist>
or soemthing
<geist>
i didn't write that particular piece of code so i had forgotten it was using 64k pages
<geist>
anyway, will fix tomorrow. but there ya go, if yo have an M1 mac, check out qemu v6.2.0, grab the requisite libs it needs from macports or whatnot and seems to work
* geist
goes to bed
Osm10 has quit [Quit: Client closed]
sdfgsdfg has quit [Quit: ayo yoyo ayo yoyo hololo, hololo.]
sdfgsdfg has joined #osdev
C-Man has joined #osdev
kspalaiologos has quit [Quit: Leaving]
pretty_dumm_guy has joined #osdev
Jaro2k has joined #osdev
SikkiLadho has quit [Quit: Connection closed]
Jaro2k has left #osdev [#osdev]
vdamewood has quit [Read error: Connection reset by peer]
<klange>
Have most of the basic memory management, a quick-and-dirty syscall binding to SVC, had to fix some libc stuff here and there, but it's getting pretty far
<klange>
will add the relocations in the morning, see if we can get /bin/init to actually start, and then once it tries to fork I'll work on task switching and getting a timer to produce an interrupt somewhere
<klange>
maybe with some luck we'll have a GUI up by Monday
<j`ey>
i checked on github earlier, are you going to push the code to a branch?
<klange>
not until it's sufficiently ready, and I'll probably squash it
rustyy_ is now known as rustyy
janemba has quit [Ping timeout: 245 seconds]
dennis95 has joined #osdev
srjek has joined #osdev
SikkiLadho has joined #osdev
janemba has joined #osdev
sdfgsdfg has quit [Quit: ayo yoyo ayo yoyo hololo, hololo.]
[itchyjunk] has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
the_lanetly_052 has joined #osdev
ElectronApps has quit [Remote host closed the connection]
SikkiLadho has quit [Quit: Connection closed]
the_lanetly_052_ has joined #osdev
the_lanetly_052 has quit [Ping timeout: 245 seconds]
Osm10 has joined #osdev
[itchyjunk] has quit [Ping timeout: 240 seconds]
[itchyjunk] has joined #osdev
Osm10 has quit [Quit: Ping timeout (120 seconds)]
nyah has quit [Remote host closed the connection]
gog has joined #osdev
mahmutov has joined #osdev
nyah has joined #osdev
CryptoDavid has joined #osdev
dennis95 has quit [Quit: Leaving]
the_lanetly_052_ has quit [Ping timeout: 250 seconds]
mahmutov has quit [Ping timeout: 250 seconds]
scoobydoo_ has joined #osdev
flx- has joined #osdev
immibis has quit [Remote host closed the connection]
flx has quit [Read error: Connection reset by peer]
scoobydoo has quit [Read error: Connection reset by peer]
unmanbearpig has quit [Ping timeout: 256 seconds]
scoobydoo_ is now known as scoobydoo
bradd has quit [Ping timeout: 256 seconds]
Griwes has quit [Ping timeout: 256 seconds]
ZipCPU has quit [Ping timeout: 256 seconds]
valeriusN has quit [Ping timeout: 256 seconds]
sham1 has quit [Ping timeout: 256 seconds]
bradd has joined #osdev
sham1 has joined #osdev
valerius_ has joined #osdev
ZipCPU has joined #osdev
unmanbearpig has joined #osdev
Griwes has joined #osdev
zid has quit [Read error: Connection reset by peer]
zid has joined #osdev
gwizon has joined #osdev
mahmutov has joined #osdev
<geist>
klange: hmm, you were reading from the fw_cfg interface. i never looked into it, what does it look like on ARM?
srjek has quit [Ping timeout: 240 seconds]
mahmutov has quit [Ping timeout: 250 seconds]
mahmutov has joined #osdev
gareppa has joined #osdev
gareppa has quit [Client Quit]
<clever>
geist: ive looked into it, and there is no way to dynamically add a fw_cfg "device" to a vm, so you must pick a machine type that already has it (or modify the machine type in src), its not like a lot of other plug&play type virtual devices
<geist>
yah ij ust didnt know that qemu arm virt machine had it
<clever>
in my case, i wanted fw_cfg ontop of the rpi machine
SikkiLadho has joined #osdev
Osm10 has joined #osdev
<SikkiLadho>
I'm trying to statically link libfdt with my bare metal project. I first compile libfdt as libfdt.a and then link it with my binary. However, I get errors like, "libfdt/libfdt.a(fdt.o): in function `_fdt_find_string':
<SikkiLadho>
fdt.c:(.text+0x5fc): undefined reference to `strlen'"
<kingoffrance>
that...seems normal? strlen() should be simple to write
<bslsk05>
github.com: Leo/Makefile at main · SikkiLadho/Leo · GitHub
<kingoffrance>
bare metal means no libc, no?
<zid>
you need to supply it a strlen, seems simple enough to me?
<gog>
you can have a freestanding libc that lacks some facilities
<zid>
gcc kernel.o libfdt.a string.o -o kernel.elf or whatever
<SikkiLadho>
I didn't knew that, I will write strlen(). I thought libfdt was a standalone library.
<zid>
strlen is part of C, it's written in C
<zid>
so ergo strlen should be available if the environment is conformant
<SikkiLadho>
yes but how can I supply libc at baremetal?
<zid>
>gcc kernel.o libfdt.a string.o -o kernel.elf or whatever
<zid>
write one, or steal one
<kingoffrance>
write a crappy one, and then doug16k will show up with an optimized one
<zid>
link order is left to right, things missing symbols go ---> that way to look for missing stuff
<zid>
you just need *some* strlen implementation to the right of it
<SikkiLadho>
libfdt is a shared library, it has --version-script, which I don't use as I'm trying to build it as a static library. Cannot use shared library at baremetal. strlen is only one problem, I have other refernece errors like "memmove" when I use more functions from libfdt
<zid>
which is also part of C
<kingoffrance>
yeah, but that doesnt sound bad either. i mean, depends on functions. memmove also easy
<zid>
strlen and memmove take all of 20 seconds to write, and your kernel will almost certainly need them too at some point
<SikkiLadho>
Okay, I will try to write them all and then compile to see if there's any problem. Thank you everyone.
xenos1984 has quit [Read error: Connection reset by peer]
janemba has quit [Read error: Connection reset by peer]
<kingoffrance>
gcc manpage "a freestanding environment is one in which the standard library may not exist, and program startup not necessarily at main()" they dont really say
<kingoffrance>
hosted: standard library is available, and main() returns int
<geist>
ah sorry SikkiLadho
<geist>
it's *mostly* standalone
<geist>
i think it only depends on a tiny bit of libc
<geist>
but i remember it being not much. maybe memcpy/memset too
<geist>
but those are easy to write/steal
<gog>
gcc's source has public-domain implementations
<gog>
just lift them from there
<kingoffrance>
protip: when someone says "c" it is like "god" in the sense, you must play 20 questions to see what they actually mean
SikkiLadho74 has joined #osdev
<moon-child>
indeed
<gog>
C is more of a feeling than a standard
<moon-child>
it's kind of an essential conflict. Going back to ritchie's disapproval of the standardised version of c
<moon-child>
spec itself even specifies two different cs (hosted and freestanding)
<gog>
freestanding gang rise up
<zid>
you people have libcs? smh
<gog>
i have a library and it's written in c for c
<gog>
it's a libc
dude12312414 has joined #osdev
bas1l is now known as basil
janemba has joined #osdev
xenos1984 has joined #osdev
Osm10 has quit [Quit: Ping timeout (120 seconds)]
Osm10 has joined #osdev
dormito has quit [Quit: WeeChat 3.3]
SikkiLadho has quit [Quit: Connection closed]
mahmutov has quit [Ping timeout: 256 seconds]
kingoffrance has quit [Ping timeout: 240 seconds]
SikkiLadho74 has quit [Quit: Connection closed]
[itchyjunk] has quit [Remote host closed the connection]
gdd has quit [Ping timeout: 250 seconds]
gdd has joined #osdev
dormito has joined #osdev
srjek has joined #osdev
sortie has quit [Ping timeout: 252 seconds]
sdfgsdfg has joined #osdev
GeDaMo has quit [Remote host closed the connection]