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
thinkpol has quit [Remote host closed the connection]
thinkpol has joined #osdev
Turn_Left has quit [Ping timeout: 240 seconds]
<heat> oh wow found the virtio bug
<heat> write(queue_desc_low, _descs); write(queue_desc_hi, _descs << 32);
<heat> i'm surprised this ever worked
<heat> actually it accidentally works cuz _descs << 32 was then casted back to u32, so always 0 if it was under 4G anyway
netbsduser has quit [Ping timeout: 272 seconds]
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<heat> klange, thanks for the testing as well btw!
<heat> niceperson, fyi on fstat1_threads -t 4 i get 2.8M on onyx, ~3.2M if i disable rdtsc on entry/exit. i get 3.5M on linux with -t 4
<niceperson> because your linux suffers SMAP
<niceperson> to copyin the path
[itchyjunk] is now known as [spookyJunk]
<niceperson> while (1) {
<niceperson> int error = syscall(5, fd, &sb);
<niceperson> assert(error == 0);
<niceperson> (*iterations)++;
<niceperson> }
<niceperson> this is how you fstat
<niceperson> also, is not your cpu shafted with meltdown
<niceperson> which onyx does not have a mitigation for
<heat> hmm, yes
<heat> good point
<heat> also musl fstat1_threads is a lot faster
kof123 has joined #osdev
<heat> i wonder if something fucky is going on with kernel <-> user transitions under KVM
<heat> i have the timer tick on 1000Hz. however, i get *a lot* of interrupts in the syscall entry code, 2 insns right after the sti
<heat> ends up being around 40% of stacks
Turn_Left has joined #osdev
Turn_Left has quit [Read error: Connection reset by peer]
divine has quit [Ping timeout: 258 seconds]
heat has quit [Ping timeout: 258 seconds]
vdamewood has joined #osdev
admiral_frost has joined #osdev
[spookyJunk] has quit [Remote host closed the connection]
<gorgonical> been sitting here puzzling about what's causing this deadlock when i realize i'm trying to receive interrupts inside an interrupt context
<gorgonical> dummy me
* vdamewood interrupts gorgonical's interrupt handler
skipwich has quit [Quit: DISCONNECT]
vdamewood has quit [Quit: Life beckons]
skipwich has joined #osdev
<geist> STACKS
<gorgonical> I just realized that I'm a double dummy and was clumsily reinventing workqs because I forget I had them alraedy
<gorgonical> Please do not tell my advisor or I will definitely not get the phd at this rate
<gorgonical> impending conference deadlines seem to have the effect of "work faster, not smarter"
<Mutabah> yep
<gorgonical> oh no. this driver I'm writing is making me realize I'm on the verge of reinventing futures and I really hate it
<gorgonical> driver init has to do an async task. kick off the request, wait for a worker to handle it on the way back in. sleep until that worker wakes you up, wa la the async data is available
<gorgonical> :(
<Mutabah> heh, have you seen UDI?
<Mutabah> It's an entire driver framework written around (completion-based) futures/async
<gorgonical> Horrifying
rustyy has joined #osdev
<gorgonical> I mean the idea is cool. This is underpinning idea of erland right?
<gorgonical> Everything is trivially async and whatnot
<gorgonical> But I worked on some gnarly c++11 programs that were heavily async and it made me really hate C++
<moon-child> I mean
<moon-child> erlang is built to do a good job of that
<moon-child> c++ is not built to do a good job of anything
<kazinsal> c++ is an excellent language for constructing byzantine footguns
<moon-child> that's true!
Osmten has joined #osdev
Osmten has quit [Client Quit]
Osmten has joined #osdev
Vercas1 has joined #osdev
Vercas has quit [Remote host closed the connection]
Vercas1 is now known as Vercas
warlock has joined #osdev
<clever> does anyone happen to know how dwc3 works? ive seen some sources implying its xhci, but other docs imply its able to act as a device as well??
<Mutabah> I think that's correct
<Mutabah> Some googling implies that it's for USB "OTG" - For devices/ports that can be either a host or a device
<Mutabah> I assume when acting as a host, it is just a standard xhci controller - but likely has some magic mode bit somewhere that changes the otg port to device mode
<clever> is every dwc3 implementation device capable, or is that a choice made when putting it into silicon?
<bslsk05> ​software-dl.ti.com: 3.2.4.18. USB DWC3 — Processor SDK Linux Documentation
<bslsk05> ​www.kernel.org: Synopsys DesignWare Core SuperSpeed USB 3.0 Controller — The Linux Kernel documentation
<clever> > According to Synopsys Databook, all OUT transfer TRBs [1] must have their size field set to a value which is integer divisible by the endpoint’s wMaxPacketSize. This means that e.g. in order to receive a Mass Storage CBW [5], req->length must either be set to a value that’s divisible by wMaxPacketSize (1024 on SuperSpeed, 512 on HighSpeed, etc), or DWC3 driver must add a Chained TRB pointing to a throw-away buffer for the remaining length. Without this,
<clever> TRB's are an xhci only concept?
<clever> but it sounds like its got a bunch of weird quirks?
<Mutabah> TRB is just a DMA data structure - iirc ehci has them too
<clever> ah
<clever> i'll need to figure out where the capability/ident registers are, and what the RP1 is capable of
<Mutabah> have you implemented xhci?
<clever> just read chunks of the spec
<clever> the pi5 has 1 xhci and 2 dwc3 controllers on it, and i think the firmware us using a common xhci driver to query them all at once
<Mutabah> that's the impression I get
<clever> linux also refers to the dwc3 as xhci in some places like /proc/iomem
<clever> but if it has xdci support as well, that would be major
<bslsk05> ​github.com: linux/arch/arm/boot/dts/rp1.dtsi at rpi-6.1.y · raspberrypi/linux · GitHub
<clever> the device tree also has a dr_mode="host"; entry
<clever> so i wonder if its as simple as just changing that?
<clever> ah, reading the linux source mode, i can see a `Controller does not support host mode` and `Controller does not support device mode` error
<clever> i suspect that the implementor (rpi) can choose what features to include, when putting the design into the chip
admiral_frost has quit [Quit: It's time]
admiral_frost has joined #osdev
gbowne1 has quit [Quit: Leaving]
corecode has joined #osdev
corecode has left #osdev [#osdev]
vdamewood has joined #osdev
<CompanionCube> clever: btw i've happily switched the pi3 to the pi400 now. Didn't have to change anything on the sdcard, handling it was rather easier thanks to the design and eeprom. Will need to update that though, and how do I cp
<CompanionCube> *configure it to do 1440p, since it advertises 4K it should be possible right?
<gorgonical> Small victories, friends
<gorgonical> Never has getting the current temperature off an i2c sensor been so, so exhilerating
<geist> yah the pi400 is really cute
elastic_dog has quit [Ping timeout: 272 seconds]
<clever> CompanionCube: when using the kms drivers, you can configure it using standard linux methods, but it depends on if your in text console or X
andydude has joined #osdev
elastic_dog has joined #osdev
<CompanionCube> and otherwise?
<clever> CompanionCube: if your using fkms, you should switch to kms, fkms is being deprecated
andydude has left #osdev [#osdev]
mctpyt has joined #osdev
mctpyt has quit [Ping timeout: 252 seconds]
<clever> CompanionCube: i need to get some sleep, but feel free to leave some more questions in PM, and i can answer them later
alpha2023 has joined #osdev
admiral_frost has quit [Quit: It's time]
<kazinsal> part of me wants to look into the pi5 but I don't know what the connectivity is like yet and haven't really dived into that
<kazinsal> and I should probably get x86-64 stuff working first anyways
<kazinsal> also gotta grab some cheap 3-5 year old desktop off a government auction to jam a bunch of weird NICs into for testing..
danilogondolfo has joined #osdev
<kazinsal> only problem is those gov auctions are like, minimum five PCs per lot...
<kazinsal> and I don't really have use for more than three or four
<kazinsal> one router and the rest clients
<sham1> hi
Left_Turn has joined #osdev
Burgundy has joined #osdev
GeDaMo has joined #osdev
Vercas5 has joined #osdev
Vercas has quit [Ping timeout: 252 seconds]
Vercas5 is now known as Vercas
nyah has joined #osdev
bauen1 has quit [Ping timeout: 255 seconds]
CaCode has joined #osdev
<mcrod> hi
<froggey> what ever happened to bcos? seems like he just dropped off the internet a few years ago
netbsduser has joined #osdev
[itchyjunk] has joined #osdev
gog has joined #osdev
zxrom has quit [Quit: Leaving]
rustyy has quit [Quit: leaving]
rustyy has joined #osdev
bauen1 has joined #osdev
mctpyt has joined #osdev
bauen1 has quit [Ping timeout: 264 seconds]
Osmten has quit [Quit: Client closed]
bauen1 has joined #osdev
Arthuria has joined #osdev
heat has joined #osdev
gog has quit [Read error: Connection reset by peer]
pog has joined #osdev
<heat> pog
<sham1> poggers
Arthuria has quit [Ping timeout: 260 seconds]
heat has quit [Remote host closed the connection]
heat has joined #osdev
<mcrod> bcos became pot
<mcrod> pog
<mcrod> fuck this phone
<pog> pog
pog is now known as gog
<kof123> is that like "steal this book"
<heat> 66 2e 0f 1f 84 00 00 00 00 00 cs nopw 0x0(%rax,%rax,1)
<heat> found this noice 10-byte nop out in the wild
<heat> this one is a llvm assembler generated nop
<mcrod> my presentation is soon
<mcrod> on why we should go to LLVM
<heat> 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 data16 data16 data16 data16 data16 cs nopw 0x0(%rax,%rax,1)
* mcrod sweat
<heat> this is a clang generated nop
<heat> 15 bytes!
agent314 has joined #osdev
<bslsk05> ​stackoverflow.com: assembly - Long multi-byte NOPs: commonly understood macros or other notation - Stack Overflow
<zid> I like, 'nop13'
Cindy has quit [Read error: Connection reset by peer]
Gooberpatrol66 has quit [Read error: Connection reset by peer]
bnchs has joined #osdev
ZipCPU has quit [Ping timeout: 272 seconds]
ZipCPU has joined #osdev
bnchs is now known as Cindy
<heat> i bet amd also needs to handle the intel nops
<heat> doesn't sound very hard, they just start stacking 66h prefixes on top of the shorter nop sequences
mctpyt has quit [Ping timeout: 260 seconds]
dude12312414 has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
goliath has joined #osdev
[itchyjunk] has quit [Read error: Connection reset by peer]
[itchyjunk] has joined #osdev
CaCode has quit [Quit: Leaving]
<Ermine> goggers
<gog> hi Ermine
<gog> will you pet me?
<Ermine> hi gog
* Ermine pets gog
* gog prr
mctpyt has joined #osdev
mctpyt has quit [Ping timeout: 246 seconds]
<mcrod> hi
zxrom has joined #osdev
<zid> no
<mcrod> yes
<mcrod> zid: explain something to me
<mcrod> the PSX gameshark, the ROM on there was obviously MIPS-I
<mcrod> however, it could communicate to PC via parallel port
<mcrod> how did it conduct a transfer of data to the parallel port on the gameshark from the ROM running on the playstation
<mcrod> if that makes sense
<mcrod> oh. I guess it just wrote to an address on the PIO which the gameshark chip intercepted
sbalmos has quit [Ping timeout: 240 seconds]
goliath has quit [Quit: SIGSEGV]
bauen1 has quit [Ping timeout: 255 seconds]
xenos1984 has quit [Ping timeout: 258 seconds]
xenos1984 has joined #osdev
admiral_frost has joined #osdev
muffin has joined #osdev
gog has quit [Quit: Konversation terminated!]
dude12312414 has joined #osdev
<acidx> henlo
<mcrod> hi
<acidx> wrong window, but, well, hi :P
tomaw has quit [Remote host closed the connection]
tomaw_ has joined #osdev
tomaw_ is now known as tomaw
Turn_Left has joined #osdev
<zid> why are we not the right window? :(
xenos1984 has quit [Ping timeout: 245 seconds]
<zid> Maybe we'd be the right window if you had better priorities in life, throw your life away for tetri^w osdev
<heat> i dont use windows, i use linukz
Left_Turn has quit [Ping timeout: 260 seconds]
<sham1> zid: clearly the solution is to make Tetris in an OS like that one person in YouTube
<heat> here's a hilarious fun fact: libnvidia-egl-gbm.so has memory corruption issues
<heat> follow my onlyfans for more fun facts
<mcrod> no
<heat> damn you really want to see my butthole
<heat> i told you in private i'm not showing it to you
<heat> FUN FACTZ ONLY!
<sham1> no
xenos1984 has joined #osdev
<zid> sham1: I wanted to do bios tetris
<zid> but my mobo died
<heat> do EFI tetris
<zid> That's just running tetris
<zid> I can do that already in my gb emu
<heat> but you could use the GOP's blitting functions :/
<heat> i wonder if anyone implements that shit in hardware
<zid> i810 is all you need
bauen1 has joined #osdev
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
<mcrod> love is all you need
terrorjack has joined #osdev
gog has joined #osdev
joe9 has joined #osdev
danilogondolfo has quit [Remote host closed the connection]
eddof13 has quit [Quit: eddof13]
<gorgonical> heat: ganoo slash linucks
<zid> gunoo*
<gorgonical> guhnoo
TheCatCollective has quit [Quit: Meow Meow Meow Meow Meow Meow Meow Meow]
TheCatCollective has joined #osdev
<mcrod> goonoo
admiral_frost has quit [Quit: It's time]
<sham1> GNU+Linux
<mcrod> freebsd should’ve won
<gorgonical> cathedrals and bazaars
<gorgonical> The problem is although the bsds are clean and maintainable relative to linux, linux has allll the momentum now
<mcrod> yes
<mcrod> :(
agent314 has quit [Ping timeout: 255 seconds]
mctpyt has joined #osdev
<niceperson> freebsd is terrible
<gorgonical> but vs linux?
mctpyt has quit [Ping timeout: 258 seconds]
<mcrod> so
<mcrod> I’m looking at Zephyr
<bl4ckb0ne> oh no
<mcrod> it’s cool except it’s an overly complicated thing that frames itself as stable but like 6 of the most useful APIs are unstable or experimental
<mcrod> the fact that there’s some sort of meta build system which is *literally* a wrapper around some commands is silly to me
<mcrod> bl4ckb0ne: it’s CMake based too!
<bl4ckb0ne> the horror
admiral_frost has joined #osdev
muffin has quit [Quit: WeeChat 4.0.5]
<sham1> CMake bad
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
goliath has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
Arthuria has joined #osdev
gbowne1 has joined #osdev
eddof13 has joined #osdev
gbowne1 has quit [Remote host closed the connection]
gbowne1 has joined #osdev
Arthuria has quit [Ping timeout: 272 seconds]
goliath has quit [Quit: SIGSEGV]
heat has quit [Remote host closed the connection]
heat has joined #osdev
eddof13 has quit [Quit: eddof13]
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eddof13 has joined #osdev
eddof13 has quit [Client Quit]
rustyy has quit [Ping timeout: 258 seconds]
heat has quit [Read error: Connection reset by peer]
heat_ has joined #osdev
eddof13 has joined #osdev
eddof13 has quit [Client Quit]
goliath has joined #osdev
eddof13 has joined #osdev
eddof13 has quit [Client Quit]
[itchyjunk] has quit [Ping timeout: 260 seconds]
[itchyjunk] has joined #osdev
admiral_frost has quit [Quit: It's time]
justache is now known as justHaunting
tomith has joined #osdev
eddof13 has joined #osdev
eddof13 has quit [Client Quit]
<heat_> gorgonical, the bsds are what and what now
Burgundy has quit [Ping timeout: 272 seconds]
heat_ has quit [Remote host closed the connection]
<kof123> phk has a paper about cathedral and bazaar not applying to e.g. ports system
<kof123> really, any bazaar comparison is fantasy IMO ("markets" have corporations the past few centuries, not fruit vendors at stands negotiating fruit) and it leaves out pyramids.
<kof123> a cathedral is just an imitation pyramid
<niceperson> whatever magic article you read, it was probably taking a dig at someone
<kof123> it was just saying ports e.g. does not use libraries, might include the same code x times across y programs
<kof123> *particular programs in ports
<niceperson> but not knowing who the author had a beef with at the time obscures real meaning
<kof123> and autoconf ...cow tools ness lol
<kof123> why is it probing for stuff that made sense on ancient unix, but freebsd or <insert modern system here> had forever
eddof13 has joined #osdev
<niceperson> whatever magic prog would probably not work on the ancient unixes anyway
<kof123> :D i am all conway's law. so ...taking an overt dig does not make something magically credible, although...i don't believe there is such a thing as "not biased"
<kof123> so agree with that 100% lol except not "probably" -- "always like that"
<kof123> as the great k lange said once: why configure? just make </spaceballs>
<niceperson> as i said on multilpe occasions already, the old papers come from very small world
<niceperson> everybody knew everybody else and more often than not they had a massive personal beef
<kof123> well analogy maybe: there are 20 linux programs you want to run. 1) write linuxulator, hopefully minimize changes needed versus 2) patch/port 20 programs
<kof123> this is just to say, i think it is inevitable
<kof123> if it is not in the base system, if it is designed to run elsewhere as well...of course it will probably pick up abstractions or similar (even if #ifdefs or equivalent)
<kof123> so "remove legacy cruft" i would say is a pruning step, settling on some modern "baseline"
<bslsk05> ​queue.acm.org: A Generation Lost in the Bazaar - ACM Queue
eddof13 has quit [Quit: eddof13]
<kof123> 1) seems like bite the bullet once in the hope it saves more work later (and of course there may be multiple other reasons to choose 1) or 2) besides just this)
<kof123> option 3) go NIH, write replacements instead
goliath has quit [Quit: SIGSEGV]
<kof123> > Even in the most trivially simple case, however, the CS/IT dogma of code reuse is totally foreign in the bazaar: the software in the FreeBSD ports collection contains at least 1,342 copied and pasted cryptographic algorithms.
<kof123> i would say similar thing happened with OO ....which is not a criticism necessarily, just marketing was all these reusable libraries
nyah has quit [Quit: leaving]