Search logs:

channel logs for 2004 - 2010 are archived at http://tunes.org/~nef/logs/old/ ·· can't be searched

#osdev2 = #osdev @ Libera from 23may2021 to present

#osdev @ OPN/FreeNode from 3apr2001 to 23may2021

all other channels are on OPN/FreeNode from 2004 to present


http://bespin.org/~qz/search/?view=1&c=osdev2&y=21&m=10&d=5

Tuesday, 5 October 2021

04:42:00 <klange> I appear to have made a quick recovery from the after-effects of the second dose. Made it up to 37.8˚ last night but have cooled back down and just have the sore arm again.
04:49:00 <vdamewood> klange: Personal body temperature or ambient temperature?
04:53:00 <geist> yeah that was basically my experience
04:53:00 <geist> it hits you fast and then dissapears pretty quickly
04:56:00 <klange> vdamewood: Personal body temperature ;) I think it was around 26 for most of yesterday, but I was only out in the morning to get to and from my appointment.
04:57:00 <klange> Spent the afternoon in bed with one of my cats, had a terrible night of not being able to sleep, but by around 8am I was peachy.
04:57:00 <vdamewood> 26?!
04:57:00 <klange> A perfectly reason and frankly nice temperature for Tokyo? It's 30 today and ugh.
04:57:00 <klange> reasonable*
04:58:00 <vdamewood> Oh, ambient.
04:58:00 <klange> I think it would be rather problematic if the ambient were 37 and body temperature were 26
04:58:00 <vdamewood> Yes.
04:59:00 <vdamewood> err Hep
04:59:00 <vdamewood> Yep
04:59:00 <vdamewood> Dammit
05:02:00 <heat> paracetamol + lots of ice really helped with the vaccine's effects for me, barely had any fever
05:02:00 <heat> although mine was a single dose vaccine (janssen)
05:02:00 <vdamewood> I got Moderna and just toughed it out. I was tired for three days.
05:03:00 <vdamewood> So, I hear some big osdever is going to release a new version of their OS tomorrow.
05:04:00 <heat> templeos 2 was confirmed?
05:04:00 <vdamewood> That project is as dead as its author.
05:05:00 <klange> Sortix 1.1 is finally coming out?
05:05:00 <kingoffrance> klange's cat hit some keys, and there is a new fork
05:07:00 <klange> I swear ToaruOS 2.0 will happen before the end of the year.
05:07:00 <vdamewood> Which year?
05:08:00 <klange> This year! Really it's just me dragging my feet. I could release it as-is and it would be fine, but there's just so much more I want to do...
05:08:00 <heat> I can't make myself release a 1.0 because I'll never be satisfied with what I've done
05:09:00 <heat> until I singlehandedly reimplement linux 2.6 I guess lol
05:10:00 <vdamewood> I haven't released 1.0 because I don't have a kernel, compiler, shell, or even a bootloader.
05:10:00 <kingoffrance> do you plan a compiler?
05:11:00 <kingoffrance> or you mean you havent ported one?
05:11:00 <vdamewood> I meant either, but I plan on porting clang.
05:16:00 <heat> right now I'm working on revamping the fs writeback code to be 1) stable 2) fast and all the concepts are super unclear to me and I'm starting to get discouraged
05:17:00 <heat> i sort of have a decent idea of how things work in linux, which is a good start, but all the locking and synchronisation that is needed is still horribly unclear to me
05:18:00 <heat> also, fun thing I found out: in Linux, a disk block read from /dev/sdaX and a page read from the corresponding file can have different contents, even after a sync
06:50:00 <klange> ToaruOS 2.0 has... a network stack that is technically more capable than the one it replaced in 1.x, most of the drivers from 1.x with only a handful of network chipsets no one cares about missing (everything worth using supports an e1000 or e1000e)...
06:51:00 <zid> even I support e1000 and I'm a fucking idiot
06:52:00 <klange> SMP is working, stable, and I dare say actually usable. The ports collection is mostly just missing Python because I'm still debating if I want to package 3.6 again (last version that doesn't have strong pthread requirements) or finish up the missing pthread shit to port a newer version...
06:52:00 <klange> We've got a Doom (with sound), the Quake port is running great, I even managed to bring back the MuPDF port that was last built for the 1.2.x Newlib ABI...
06:54:00 <klange> And gcc and binutils are working great as well, as far as I can see.
06:54:00 <zid> link me an iso to toss into qemu?
06:55:00 <klange> If you are logged into Github, you should be able to obtain the build artifact from the latest CI run: https://github.com/klange/toaruos/runs/3798095466
06:56:00 <klange> Anyway, back on the road for me. I'm halfway through a 400km journey to a race track for a meet tomorrow.
06:58:00 <zid> Ooh the spotlight effect on the tutorial is cool
06:58:00 <zid> itasha meet or actually racing?
06:58:00 <klange> Not technically either of those, it's an open meet, not a race.
06:59:00 <zid> how do i teach it my timezone
07:00:00 <zid> https://cdn.discordapp.com/attachments/417023075348119556/894841540516671528/unknown.png anyway, works out of the box on my vmware at least
07:01:00 <klange> It magics it from a geo IP service, but there's some envvars you can force in ~/.yutanirc - not quite standard stuff, but TZ_OFFSET is seconds from UTC and I had one for the abbreviation I think...
07:01:00 <zid> your geo ip service is incorrect then :P
07:01:00 <klange> What did it give?
07:02:00 <zid> CEST
07:02:00 <zid> instead of BST
07:02:00 <klange> Ah, well, darn.
07:03:00 <klange> "export TZ_OFFSET=3600" in ~/.yutanirc and then log out and back in, it's janky as all hell but it's better than the complete lack of any concept of timezones from previous versions
07:03:00 <klange> Also the list of abbreviations is like a half dozen ones I knew off hand :D
07:04:00 <klange> Time to d/c from my screen session and check my fuel indicator~
07:04:00 <klange> bye o/
08:52:00 <sortie> klange, oh man, I actually did resume Sortix work this year and thought I could finish 1.1 but uh it's October and uh the network stack still isn't merged
09:01:00 <mjg> :)
09:01:00 <j`ey> sortie: just merge it :P
09:04:00 <mjg> do you happen to have a custom bgp daemon?
09:04:00 <Kerum> if an ISR for an interrupt X is in privilege ring 0, should the interrupt descriptor for the interrupt X have a DPL of 0 or 3?
09:08:00 <zid> that's a sentence splice and a half
09:08:00 <zid> "If your ISR is ring0, should it be ring0 or ring3?"
09:08:00 <zid> Is how that reads to me
09:10:00 <Kerum> well im asking because i saw someone use a kernel code segment and a DPL of 3 in an interrupt descriptor, which was in conflict with what osdev wiki says
09:11:00 <Kerum> if i could think of a privileged instruction to put in the interrupt handler i could check
09:12:00 <Kerum> maybe i could "mov %cr0, %eax; mov %eax, %cr0"
09:12:00 <zid> I thought it was about the entry condition, but I don't read the idt pages much
09:14:00 <zid> The processor checks the DPL of the interrupt or trap gate only if an exception or interrupt is generated with an
09:14:00 <zid> INT n, INT3, or INTO instruction.4 Here, the CPL must be less than or equal to the DPL of the gate.
09:14:00 <zid> his
09:14:00 <zid> interrupt to access critical exception handlers, such as the page-fault handler
09:14:00 <zid> restriction prevents application programs or procedures running at privilege level 3 from using a software
09:15:00 <zid> So yea, it's about the entry condition
09:15:00 <zid> otherwise user programs could do int 8 and pretend a doublefault happened or whatever
09:16:00 <Kerum> from what i can tell CPL is bits 0 and 1 of code segment selector
09:16:00 <Kerum> would that be counting from right to left or vice versa?
09:16:00 <zid> cpl is the current one
09:17:00 <zid> in amd64 the value of cs tells you directly on the bottom bits afaik
09:17:00 <zid> I don't remember for x86
09:18:00 <zid> Current privilege level (CPL) — The CPL is the privilege level of the currently executing program or task. It
09:18:00 <zid> is stored in bits 0 and 1 of the CS and SS segment registers.
09:18:00 <zid> it's ordered, so cs & 3 is your cpl
09:19:00 <Kerum> thanks for clearing that up
09:19:00 <Kerum> so DPL is 0
09:19:00 <zid> DPL of 0 means only the kernel can use it, basically
09:20:00 <zid> dpl of 3 means anyone can
09:20:00 <Kerum> then i know what to set it to
09:20:00 <Kerum> thank you again
09:20:00 <Kerum> wait
09:23:00 <zid> if I wait much longer I'll start turning blue
09:24:00 <Kerum> nevermind that wait
12:20:00 <junon> set it to 4
12:20:00 <junon> now god himself can access it
12:20:00 <junon> checkmate atheists
12:24:00 <gog> what if god is like the cosmic hypervisor
12:24:00 * gog hits blunt again
12:25:00 <mjg> and atheists are people who think they run on bare metal
12:25:00 <zid> atheists are hypervisor agnostic
16:42:00 <Ermine> Hello, what is analogue of Intel SDM for ARM?
16:43:00 <GeDaMo> Architecture Reference Manual (ARM)
16:44:00 <GeDaMo> https://developer.arm.com/architectures/cpu-architecture/a-profile/docs
16:44:00 <Ermine> Thank you!
16:47:00 <zid> GeDaMo: I need some MOS moss now, link pls
16:48:00 <GeDaMo> https://github.com/roelandjansen/pcmos386v501
17:50:00 <geist> ah interesting (re: PC-MOS)
17:52:00 <GeDaMo> I used it back in the 80s, multiple serial terminals hooked up to a 386
17:53:00 <j`ey> mr stark I dont feel so good https://i.imgur.com/6jdBGhr.jpg
18:03:00 <Bitweasil> Ouch. :p Older hardware?
18:03:00 <Bitweasil> Get a PineBook pro, it's fine. :D
18:04:00 <gog> oof
18:04:00 <j`ey> Bitweasil: yeah, an iMac G5 PowerPC
18:05:00 <gog> my friend had one of those. big heatsink and fan cowls
18:05:00 <gog> looked cool tho
18:06:00 <j`ey> it probably would be fine, i think it just needs capacitors replaced
18:19:00 <Bitweasil> Yeah, that would be a good starting place.
18:22:00 <Bitweasil> Hrm.
18:22:00 <Bitweasil> https://asahilinux.org/2021/10/progress-report-september-2021/
18:22:00 <Bitweasil> Apparently the Linux port to the M1 is usable for dogfooding, like "Can use it to write code" level.
18:22:00 <Bitweasil> I never did get around to selling my M1.
18:22:00 <j`ey> I see a few familiar names
18:34:00 <Bitweasil> I'm just not sure it's (1) worth the hassle to set up, or (2) ethical to use Apple hardware anymore. :)
19:02:00 <dzwdz> do y'all do any coverage testing of your kernels?
19:02:00 <dzwdz> *code coverage
19:02:00 <dzwdz> or however that's called tbh i have no clue
19:20:00 <geist> days since Bitweasil pointed out that apple is bad: 0
19:20:00 <Bitweasil> :D
19:20:00 <GeDaMo> Presumably that's stored in a boolean variable :P
19:20:00 <Bitweasil> You're welcome.
19:21:00 <Bitweasil> Hey now.
19:21:00 <geist> haha
19:21:00 <Bitweasil> I don't chat on the weekends!
19:21:00 <Bitweasil> You need at least a couple bits!
19:21:00 <geist> I've been good, i haven't mentioned VAX in at least a few days
19:33:00 <Ermine> https://wiki.osdev.org/ARM_Overview#Emulators - qemu link is broken
20:22:00 <travisg> sounds like a good opportunity to use the power of wiki edit to fix
20:34:00 <Ermine> I'm not registered yet
21:25:00 <Bitweasil> *blinks* Anandtech has their A15 analysis out.
21:25:00 <Bitweasil> Apple definitely likes their caches.
21:25:00 <Bitweasil> 32MB system level cache, 12MB L2 shared between the performance cores, and their L1 is down to single cycle access latency in certain patterns.
21:26:00 <Bitweasil> And the rest of the chip to back it.
21:58:00 <noircode> If you want to get an overview of modern os design, is it still just the classic texts like the dinosour book?
22:03:00 <Brnocrist> there are more OS's than books today
22:04:00 <noircode> really?
22:05:00 <moon-child> depends on how you qualify 'OS'
22:06:00 <moon-child> noircode: there is no 'modern os design'. There's the OS design of the 90s, and a few things like containers people have (poorly) packed on top
22:07:00 <noircode> hmm, for some reason I thought there is a trend around resource usage (containers) and network stacks
22:08:00 <noircode> so we just get these by side effect or necessity?
22:09:00 <moon-child> containers are a workaround for language limitations, imo
22:09:00 <noircode> e.g. you prefer polling drivers becuase of networks, or you skip to userspace entirely
22:09:00 <noircode> high speed networks*
22:10:00 <noircode> ok that is a good point, but when I see orchestration stuff, it kinda resembles an os
22:11:00 <moon-child> have you looked at plan9?
22:11:00 <noircode> I've read some papers but not closely at it's design
22:12:00 <noircode> just overview and some networks stuff
22:14:00 <Bitweasil> Tannenbaum's works and such are probably still a good place to start.
22:14:00 <Bitweasil> We mostly tack crap on top of that when it fails to scale.
22:14:00 <Bitweasil> And the whole userspace driver thing isn't really novel either.
22:15:00 <noircode> ah
22:16:00 <noircode> I've spent some time on it, but I still don't really have the concept of OS, so I can say "if I wanted to build an OS right now, what would I consider from a design perspective?"
22:21:00 <noircode> hmm, that's probably because the OS is so general
22:22:00 <geist> it's a pretty wide open net
22:23:00 <geist> a lot of it also comes down to what you want to do, which isn't a very satisfactory answer
22:23:00 <Bitweasil> Well... the first question you should consider is what you want to do with it.
22:23:00 <geist> but, for example if you wanted to write an embedded system for a microcontroller, or some sort of larger network switch kernel, or a server or a desktop, or a hypervisor, etc
22:23:00 <Bitweasil> If you want to do some basic time splitting ...
22:23:00 <geist> you might end up with different solutions
22:23:00 <Bitweasil> Yeah, that.
22:23:00 <zid> Timesharing OSes are a thing of the past, old man
22:24:00 <zid> We just have 256 cores these days, and who needs to run more than 256 programs
22:24:00 <kazinsal> cooperative multitasking is the future, man
22:24:00 <geist> lots of the larger ones you can generally cram into the 'build a monolithic mid sized kernel and build drivers and user space on top of it' style thing
22:24:00 <geist> a-la linux
22:24:00 <noircode> I see
22:24:00 <zid> (I'm semi-serious about that, is it even worth not pinning processes to individual cores if you have 512 of them?)
22:24:00 <Bitweasil> Now that big.LITTLE is becoming more common (even Intel's new stuff has that concept), we're firmly back into the asymmetrical multiprocessing stuff, where it may very well make sense to split cores between OS cores and user task cores.
22:24:00 <geist> but yes also modern systems have moved towards lots of cores, 64bit
22:25:00 <geist> which also may change things a bit
22:25:00 <Bitweasil> It would depend on how many of those tasks are compute bound vs IO bound.
22:25:00 <Bitweasil> And if you can gate stuff off.
22:25:00 <Bitweasil> (power-wise)
22:25:00 <geist> zid: possibly, but then there's also cache and numa and whatnot to consider. so i can think of cases where pinning threads to cores and only running as many cores as you have threads can work against you
22:25:00 <geist> ie, two threads in the same process not running at the same time probably benefit from running ont he same core more than not
22:26:00 <noircode> so the thing is, having all those cores means you want a really nice thread api
22:26:00 <noircode> right?
22:26:00 <zid> disregard threads, run more full processes
22:26:00 <zid> the OS will make it use shared memory automatically
22:27:00 <zid> (This is personal preference)
22:27:00 <geist> noircode: having more cores doesn't really change threading much at all
22:27:00 <Bitweasil> Disregard cores, use blowtorches to turn them back into sand when they misbehave. :D
22:27:00 <geist> except more chances of at any snapshot in time two threads are running simultaneously
22:27:00 <noircode> geist: I'm thinking about interupts / context switches
22:27:00 <geist> and of course race conditions between them are more complex
22:27:00 <geist> noircode: what do you mean?
22:28:00 <Bitweasil> If you have enough cores, it starts to make sense to dedicate some of them to interrupt handling, IMO.
22:28:00 <zid> with more cores you'd do *fewer* context switches
22:28:00 <Bitweasil> Let their caches remain filled with the ISRs.
22:28:00 <Bitweasil> As an extreme case, you could have a core do nothing but service ISRs and then HLT.
22:28:00 <Bitweasil> Its L2 is likely to be very full of ISRs.
22:28:00 <zid> You only context switch as a painful penalty of trying to run multiple programs and/or with multiple priv. levels on a single core
22:28:00 <noircode> oh, I didn't know you could do that
22:29:00 <geist> to be clear context switches also happen between running an idle, but if you consider context switches to be between two threads that are non idle, then yes, more cores mean in general you'll have less contention over a single core
22:29:00 <geist> all else held equal, and assuming threads are distributed reasonably well across cores
22:29:00 <zid> geist: hmm what about a hybridy microkernel where you IPI instead of syscall, and have dedicated kernel threads that return the results async, with no context switchign?
22:30:00 <Bitweasil> Ew.
22:30:00 <geist> yea, that's pretty eq
22:30:00 <geist> ew
22:30:00 <Bitweasil> You could, but I imagine the IPI penalty would be horrid vs a simple syscall.
22:30:00 <geist> but yes you could do that
22:30:00 <geist> i think you'd find the performance would be horrendous
22:30:00 <Bitweasil> There's a vastly wider range of "Well, yes, you could, the hardware will support it" than "This works well."
22:30:00 <zid> I bet certain applications would benefit from it
22:30:00 <geist> *especially* on virtual machines, where IPI performance tends to be a few orders of magnitude worse than bare metal
22:30:00 <noircode> interesting
22:31:00 <zid> If they don't care about the latency of the syscall or its performance (i/o for example)
22:31:00 <Bitweasil> Is that true even with the virtual APIC stuff?
22:31:00 <zid> but they gain back the ability to not have to eat context switches to do those syscalls
22:31:00 <Bitweasil> I don't know if that can do IPIs without a round trip to the hypervisor.
22:31:00 <geist> Bitweasil: you start to get into specific details of this or that hypervisor on this or that hardware, but my experience is yes
22:32:00 <Bitweasil> Doesn't surprise me.
22:32:00 <geist> in best case you can end up with something not so bad, but in the usual case it's probably at least a round trip to the hypervisor
22:32:00 <Bitweasil> I really haven't messed with virtual APIC stuff.
22:32:00 <Bitweasil> ok
22:32:00 <zid> I was sort of expecting perf to be bad, but with it being async.. you're intentionally disregarding perf sorta
22:32:00 <geist> we see this somewhat in Zircon since it tends to be a bit more IPI and context switchy than linux or other guests
22:32:00 <geist> and thus more IPIs
22:32:00 <zid> So imagine like, prime95 where it wants to run the cpus as hard as it can, and also wants to grab work units from the network and also submit the results back, or such
22:32:00 <kazinsal> yeah, my experience in the datacenter space is that you're always going to have maximum I/O throughput issues on top of hypervisors simply because there are so many VMEXITs, but for "normal" computing it's fine
22:33:00 <Bitweasil> kazinsal, if you're doing maximum IO stuff from VMs, don't some storage controllers support passthrough?
22:33:00 <kazinsal> once you get into the wacky stuff of having a bunch of non-paravirtual NICs and high interrupt rates you start to see deeper perf issues than you would in reality
22:33:00 <Bitweasil> So you can carve off a "virtual" SSD controller and drop it straight into the guest?
22:34:00 <kazinsal> Bitweasil: yeah, once you're at that point you ought to be either going into paravirtual adapters or virtualized storage acceleration
22:34:00 <Bitweasil> Same for the NICs, I know there are some with a ton of PCI devices exposed, so you configure it and hand the PCI device straight off to the VM.
22:34:00 <Bitweasil> I mean... I use virtio drivers on all my VMs.
22:34:00 <Bitweasil> Even low utilization stuff.
22:35:00 <Bitweasil> There are the Windows drivers that Redhat puts out for Windows virtio network/block/display.
22:35:00 <geist> that does remind me, i wonder if it's possible/inexpensive enough to get a decent virtualizable e1000 nic for a regular PC
22:35:00 <geist> and more interestingly, actually utilize sharded copies of it on qemu/kvm
22:36:00 <kazinsal> I think the i350s are e1000-based but have PF/VF functions
22:36:00 <geist> i think the latter is possible, it just requires some hackery
22:36:00 <kazinsal> let me check my treasure trove of intel NIC papers
22:36:00 <noircode> is there any oever head from each process having it's own address space?
22:36:00 <geist> yah i do wonder exactly how you get them to publish N copies of themselves, map them into the guest, et cetc
22:36:00 <geist> noircode: yep
22:36:00 <noircode> hmm
22:36:00 <geist> but basicaly that ship sailed 40 years ago or so
22:36:00 <geist> and modern cpus do a pretty good job of keeping the overhead down
22:36:00 <geist> or at least throw a lot of hardware at dealing with it
22:37:00 <noircode> ok, makes sense
22:37:00 <geist> basically for every separate address space you have a separate set of page tables with a different set of virtual -> physical mappings
22:37:00 <kazinsal> yeah, it's the I350s that are e1000s with SR-IOV and virtual function support
22:37:00 <geist> and when you switch processes you switch address spaces which means thek ernel switches page tables
22:37:00 <kazinsal> document ID is 336626-001 for reference
22:37:00 <geist> and all of that is overhead, but the cpu has large caches for it and mitigates that a lot
22:38:00 <geist> kazinsal: nice thanks
22:38:00 <Bitweasil> I... literally can't come up with a single use for a virtual NIC thing around my property. :/
22:38:00 <geist> not that i need the performance but i do run about 8 VMs on my linux box with just plain qemu/kvm
22:38:00 <Bitweasil> Yeah, my VMs are either so lightly loaded as to not matter, or just compute nodes.
22:38:00 <geist> at the moment i just map each of them to a separate tuntap and then bridge it with a dedicated nic
22:38:00 <Bitweasil> I no longer have *anything* that counts as performance critical.
22:39:00 <geist> yah agreed. i have also been looking for an excuse to go 10gbe, but the only thing that'd really benefit from it is the VM server to my NAS box, and i could just set up a private cable between the two
22:40:00 <Bitweasil> Yeah, or one of the 2.5/5Gbit cards, they're a ton cheaper.
22:40:00 <Bitweasil> Or just go get a coffee and it's done when you get back.
22:40:00 <geist> ya it hasn't gone over the threshold of things to do yet
22:41:00 <geist> also the synology nas box wants a particular brand so i have to be a bit careful
22:41:00 <kazinsal> haven't gotten to the point of RAID10-ing NVMe drives yet
22:42:00 * Bitweasil wanders out, enjoy the evening!
22:42:00 <geist> huh wow. $35 2.5GBe card on amazon
22:43:00 <geist> ah here's a $29 one
22:43:00 <kazinsal> ooh
22:43:00 <kazinsal> wonder what the controller on those is
22:43:00 <geist> ah realtek 8125
22:44:00 <geist> seems to be all of these from various mfgs
22:44:00 <geist> realtek strikes again!
22:44:00 <Ermine> There's a question from xv6 book: they map kernel code and data to 0x80000000. Thus, processes can only use 2Gb of memory. Could raising address of kernel help to increase memory available to process? I think answer is yes, but I'm not sure, because one might have to change process's memory map (move kernel stack or whatever)
22:44:00 <kazinsal> I wonder how much of the "realtek nics suck" mentality is still accurate
22:44:00 <geist> Ermine: yes
22:44:00 <kazinsal> clearly they aren't high end cards but if you just need something chunking out a few gigabits of traffic... are they really that bad?
22:44:00 <geist> later 32bit kernels (on architectures that support it) tended to do that
22:44:00 <geist> move the kernel to 0xc000.0000 or even 0xe000.0000
22:44:00 <geist> 64bit generally made that moot
22:45:00 <geist> kazinsal: oh i think they objectively have less features, but modern computers are far faster so in anythin but server situations i doubt you can tell
22:46:00 <Ermine> geist: thank you
22:46:00 <geist> fun fact, when i worked on a robotics thing at work for a bit, we were fiddling with real time networking stuff using EtherCAT
22:46:00 <kazinsal> oh neat
22:46:00 <geist> basically needed to be able to squirt out a frame on ethernet on a fixed interval and read then back as quickly as possible
22:46:00 <zid> fancy serial?
22:46:00 <geist> found that for the most part the smarter the nic (ie, intel) the harder it was to do that
22:46:00 <geist> the best nics for that were cheapo realteks with all of the features disabled
22:47:00 <zid> 10000000000000 baud serial :p
22:48:00 <clever> i think one of the realtek's i checked the drivers on a while back, basically just had 4 regs for the raw dma start addr, 4 regs for size, and 4 regs for status (start, busy)
22:48:00 <geist> zid: basically. ethercat is kinda neat. uses 100mbit ethernet but basically you build a big loop of nodes where the TX pair goes out, loops through N nodes on the bus, each node clocks in a frame, modifies it in place, and clocks it out a few cycles later
22:48:00 <geist> and the loop comes back to the RX pair on the origin node
22:48:00 <clever> so you could queue up 4 packets to tx, and dma would just barf them out the cat5 cable
22:48:00 <kazinsal> what annoys me is I can't seem to find a programming guide for the 8125... seems to be some example drivers on realtek's site but no nice chunky PDF
22:48:00 <geist> basically you toss an ethernet frame out with a bunch of slots reserved for various nodes, and the nodes modify them in place
22:49:00 <geist> you start receiving the response packet before you've even finished sending it
22:49:00 <clever> oh, now that is crazy
22:49:00 <geist> basically each node adds a few clock cycles of delay
22:49:00 <clever> i dont think i could reply to a packet that quickly on any hw i own
22:49:00 <clever> not without an fpga
22:49:00 <geist> cool thing is the head unit doesn't have to be fancy, just a plain nic on a PC will work
22:50:00 <geist> the nodes themxelves are using an asic (or FPGA) that modifies the packet as it clocks through, including recomputing the CRC
22:50:00 <clever> ahh
22:50:00 <clever> and you would hack it into a bit of a token ring?
22:50:00 <clever> so the tx from the pc, goes thru each node, and right back to rx?
22:51:00 <geist> right
22:51:00 <geist> each node adds a few cycles of skew to it
22:51:00 <clever> like a non-store&forward switch
22:51:00 <geist> the ethercat frame has a standard ethernet header + some header that says 'in the rest of the frame at offset X i want report Y from node Z' with a few of those
22:51:00 <clever> where you just check the 6 byte dest addr, and immediately begin forwarding, with 6 bytes of latency
22:51:00 <geist> no, it's a distinct ethernet type
22:52:00 <geist> it's not that simple. it actually has a frame and whatnot
22:52:00 <clever> but similar in terms of the "forwarding" delay
22:52:00 <geist> right
22:52:00 <clever> but it will mutate as it forwards
22:52:00 <geist> right
22:52:00 <kazinsal> great, realtek's 8125 sample driver is GPLed. time to scrub this from my brain
22:52:00 <geist> kazinsal: :(
22:52:00 <geist> bummer, realtek is usually okay about releasing specs
22:53:00 <zid> that actually.. sounds a lot like usb
22:53:00 <zid> Bastard child of ethernet and usb
22:53:00 <kazinsal> yeah, I'm trying to find their documentation portal or something that I can hopefully find a pdf for this thing on
22:53:00 <geist> zid: sort of, except the chaining part, but the idea that you toss out a header and then leave a gap for the device to insert its bits, yeah
22:53:00 <geist> anyway, it's a lot faster than say CAN bus or whatnot
22:54:00 <geist> but downside is ethercat is proprietary
22:54:00 <geist> though you can pay for it
22:54:00 <zid> It has that weird 'I know what I am expecting back' aspect of USB
22:54:00 <zid> telling the other side what the response length will be always struck me as odd
22:55:00 <geist> well, ethercat is standardized, but i think there's some stuff you have to license
22:55:00 <geist> zid: yeah it's very very much speak-when-spoken-to
22:55:00 <zid> "Hello my name is zid, you're going to tell me your name too in 14 characters, each character is an ascii character" :p
22:55:00 <geist> at least classic USB. USB 3 is kinda a mind screw of a point to point much more sophisiticated thing that still pretends its the old thing
22:56:00 <zid> yea I've never dealt with fireusb wire 3.0 lightningbolt over pci-e for workstations 3.11
22:56:00 <zid> I bet it's.. trying very hard
22:56:00 <geist> if you get a chance, i highly recommend getting a usb bus analyzer. it's very educational
22:56:00 <clever> zid: lol
22:56:00 <geist> i bet you can get old ones cheap on ebay or whatnot not
22:56:00 <zid> I know the usb 1 spec enoug for hid
22:56:00 <zid> which is what I use it for
22:56:00 <clever> geist: if you dont care about the low-level encoding, usbmon is still great
22:57:00 <zid> I had to deal with it on the software side on windows, then learned the line encoding for it all later
22:57:00 <clever> but usbmon requires well-formed packets
22:57:00 <geist> did you see ben eaters version of it? he did some fun manual probing and decoding with his scope
22:57:00 <clever> and ive had problems where my bugs where creating malformed packets, so the kernel/usb-controller just dropped it
22:57:00 <zid> yea that's where I learned the line level version :D
22:57:00 <geist> though it helps that he has a nice agilent scope that can actually do some framing
22:57:00 <zid> but I knew what would be in all the packets
22:57:00 <clever> geist: yeah, and i kept screaming to use usb mon, and to stop decoding the bits by hand, lol
22:57:00 <geist> yah same. it was fun to watch, but nothing i hadn't seen before
22:57:00 <clever> show how to decode them once, but then switch to proper tools
22:58:00 <zid> I liked his ethernet one, I didn't know about the.. PAL colourbust it does etc
22:58:00 <clever> dont cripple yourself by decoding by hand forever
22:58:00 <zid> HID on windows is weird btw, I *still* don't undertand how joy.cpl gets the device names
22:59:00 <clever> zid: my motherboard identifies itself as an HID device, so it can run on windows without drivers
22:59:00 <zid> your motherboard runs on windows?
22:59:00 <clever> as-in, one of the host mode ports, turns into a device mode port (double-ended cable), and claims to be an HID device
22:59:00 <clever> with the right software, you can then query the cpu temp, cpu amps, and fan speed, over that usb cable
22:59:00 <zid> ah right
22:59:00 <clever> from a second machine
22:59:00 <zid> there's a header for that on most boards
23:00:00 <zid> der8auer (sp) likes to bust out his tool for it
23:00:00 <clever> for my system, its just a regular usb-a host port on the back, with a switch to put it into gadget mode
23:00:00 <zid> when hes' doing extreme OC it's easier to poke all those values via the header than msi afterburner or whatever
23:00:00 <clever> and you use a spec-bending a to a cable, that connects 2 port ports
23:00:00 <zid> yea doing it over HID makes sense tbh
23:00:00 <clever> ive checked it with usbmon, and its just sending .ini files over
23:00:00 <zid> I'm sure there's a usage page for thermometers and stuff
23:00:00 <clever> but you need to write an HID packet to the MB, to cycle to the next page
23:01:00 <clever> and .ini records are cut off at the page border
23:02:00 <geist> kazinsal: heh that's a bad sign when you download the freebsd driver for the 8125 from realteks site
23:02:00 <geist> and it turns out to be a shared implementation with the 8139
23:03:00 <kazinsal> oh no.
23:03:00 <geist> single driver for
23:03:00 <geist> https://www.irccloud.com/pastebin/paMXjLml/
23:04:00 <kazinsal> oh no way
23:04:00 <geist> oh actually maybe it's not for the 8139
23:04:00 <kazinsal> that's bizarre
23:04:00 <geist> it's based on wpauls driver, minus the classic rant he had at the top of it
23:04:00 <kazinsal> considering the 8168/8101 driver in Linux doesn't handle the 8125
23:04:00 <geist> if_re.c
23:05:00 <kazinsal> you explicitly need like, kernel 5.4 or newer or something like that for the 8125
23:05:00 <geist> seems to be based on https://github.com/freebsd/freebsd-src/blob/main/sys/dev/re/if_re.c but is extended
23:06:00 <geist> anyway 8169 is a fairly capable gigabit one, so makes sense it's probably just extended to 2.5
23:06:00 <kazinsal> I'm glad they cleaned that driver up, at one point iirc the source file was a meg long and was 80% bitbanging firmware word by word into the NIC
23:07:00 <clever> kazinsal: wut? lol
23:07:00 <geist> iirc the 8169 is not too bad, just a TX and RX descriptor queue that does what it does
23:07:00 <geist> not fancy, but gets it done
23:08:00 <kazinsal> yeah once upon a time most of that driver was a giant phy config function that was half a meg of write_phy calls
23:09:00 <clever> kazinsal: that reminds me, i still need to figure out what usb PHY is on the rpi
23:09:00 <clever> ive found ways to configure it, but no details on what i'm actually doing
23:09:00 <clever> if mis-configured, it can silently corrupt every ssh packet from the usb nic
23:10:00 <clever> and the usb nic must be doing checksum accel on the nic side, and then assuming the usb link is lossless
23:11:00 <GreaseMonkey> huh, where is this classic rant
23:14:00 <geist> GreaseMonkey: seems to be gone now
23:15:00 <geist> basically was a rant about how realtek has set the bar for new low and how shitty it was, etc
23:17:00 <GreaseMonkey> nope, not gone apparently: https://github.com/freebsd/freebsd-src/blob/main/sys/dev/rl/if_rl.c
23:17:00 <kazinsal> ah, it's in the old driver still
23:17:00 <kazinsal> nice
23:18:00 <GreaseMonkey> i get the feeling i've read that rant before actually
23:21:00 <geist> ah okay, rl vs re i guess
23:28:00 <geist> i know it probably doesn't really scale, but i've always liked the classic unix and BSD method of naming devices
23:28:00 <geist> for some reason it feels nicer and more clean
23:29:00 <geist> ie, sys0 has a pci0 which has a re0, etc
23:41:00 <zid> Speaking of usb
23:41:00 <zid> >Forget where usb3 ports are on motherboard
23:41:00 <zid> >Can't see them either because rat's nest of cables
23:41:00 <zid> Solution: Google picture of own motherboard
23:42:00 <clever> zid: lol
23:42:00 <zid> For reference: They're between the ethernet and audio
23:42:00 <zid> In case I forget and need to ask you
23:42:00 <clever> i have usb3 on the front of my case
23:42:00 <clever> so i can just look at the color of the ports
23:42:00 <zid> I never plug the header in
23:43:00 <clever> ah, thatll do it
23:43:00 <zid> nor do I use the front of the case tbh
23:43:00 <zid> I have the back of it facing out so I can deal with my.. 10 usb ports more easily
23:43:00 <zid> https://news-cdn.softpedia.com/images/news2/Asus-Rampage-IV-Gene-LGA-2011-Motherboard-Set-to-Arrive-Soon-5.jpg
23:43:00 <zid> They're all filled with random controllers and hard drives and other nonsense, I even use a hub connected into one
23:44:00 <clever> zid: ah, i see the same link and reflash button i have
23:44:00 <zid> and I have a 4x pci-e usb controller
23:44:00 <zid> I have no idea what the rog connect button does
23:45:00 <clever> the button with a round arrow, will re-flash the bios from a file on a usb stick
23:45:00 <clever> and can somehow unbrick it
23:45:00 <clever> the button with a chain link, will set one of those usb-a ports into device mode
23:45:00 <zid> yup
23:45:00 <clever> with the right usb cable, and software on the far end, you can then do all the overclocking fun
23:45:00 <zid> oh
23:46:00 <zid> ah so like thingy's board from earlier
23:46:00 <clever> yeah
23:46:00 <clever> the white port is likely that special rog port
23:46:00 <zid> I used flashback a lot
23:46:00 <zid> yea it's the flashback port too
23:46:00 <zid> I trialled a few bioses on this board, it was finnicky about posting with a GPU plugged in
23:46:00 <clever> the software for that, is also on a sketchy site, lol
23:47:00 <clever> the site has broken bbcode bleeding thru into the visible text
23:47:00 <clever> some images dont load
23:47:00 <clever> and its hard to even find
23:47:00 <zid> It has some weirdness where they switched ROM formats mid-series
23:47:00 <clever> but its on an official domain
23:47:00 <zid> so you have to hit exactly the version where they switched if you want to go to either side which is annoying
23:47:00 <zid> like if you have 1.0 and you want 2.0 you have to go through 1.4
23:47:00 <zid> or vice versa
23:47:00 <zid> .ROM and .CAP I think
23:48:00 <zid> 1.4 can flashback either format, 1.0 doesn't understand CAP, 2.0 doesn't understand ROM
23:48:00 <clever> ive not looked into reflashing this board much
23:48:00 <zid> I thought I might have to flash the bios before the cpu would work
23:48:00 <zid> but it turns out my xeon uses the same microcode as an i7-3820 so it was just supported
23:49:00 <zid> I was going to replace some other cpu in the uncompressed ROM format with a hex editor if needed
23:49:00 <clever> mine is using an AM3 socket i think?
23:49:00 <clever> fx-8350 core