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
<doug16k> I am not a fan of relying on optimizer to do what I didn't say
<doug16k> use constexpr if if you have C++
<doug16k> it will do it at compile time and utterly discard the other case(s)
<doug16k> it's the fix for that overload trick I mentioned
<doug16k> that's one of the metaprogramming songs and dances
<clever> ok, so after .... 2 hours, i have implemented 2 opcodes, lol
<clever> but things are now working, and templated up the wazoo!
<bslsk05> ​gist.github.com: simple-test.cpp · GitHub
<clever> the matrix printing function is also using templates, to adjust the printf format string, and dump the right width from the matrix
<heat> doug16k: it looks like it's a known llvm/clang issue
<bslsk05> ​cs.opensource.google <no title>
flx- has joined #osdev
flx has quit [Read error: Connection reset by peer]
flx- has quit [Remote host closed the connection]
<heat> bytebill?
flx- has joined #osdev
<gog> storage unit currency
<johnjay> geist: ah yet another wrinkle in using WSL. apparently the xfonts used by default Xorg are not installed by default
<johnjay> xming forces you to download them separately for some reason
<johnjay> i guess it can't use the ones from the WSL instance so...
<klysm> you might be able to use xfs if unix domain sockets are supported, just a thought.
<clever> doug16k: vpu-support-vc4-elf> include/vpu-support-native.h:10:20: warning: asm operand 2 probably doesn't match constraints
<johnjay> i dont think so, on windows anyway
<clever> doug16k: when using the immediate constraint, the arg cant be a normal function arg, and i cant flag it as constexpr either
<doug16k> if you __attribute__((__optimize__("O2"), __always_inline__, __flatten__)) it should
<doug16k> that's how you jump up and down and scream at gcc to inline
<clever> i think moving it to template params also worked
<clever> `template <typename T, int x, int y> static inline void vst`
<doug16k> of course it does
<doug16k> that's compile time by definition
<clever> yeah
<clever> next problem, i need to do H( HY( or HX(, based on the sizeof(T)
<clever> how do i insert string literals into the inline asm?
<clever> rather then int literals
<klysm> johnjay, [xfs font server over ipv4
<doug16k> preprocessor
<doug16k> #define FOO(x, y) "movandstuffkthx r0," #x "," #y
<clever> doug16k: but can #if even know what T is?
<clever> since its happening before c++ gets involved...
<doug16k> actually ya, just drop the #
<doug16k> they are already strings
<clever> i think the only option is a switch-case, and implement it 3 times
<doug16k> "you " "can " "go" " like" " this"
<clever> and let const-expr discard 2 versions
<doug16k> #if can't know anything about T
<doug16k> types are way above #if's pay grade
<clever> thats what i expected
<bslsk05> ​en.cppreference.com: if statement - cppreference.com
<doug16k> it was made for exactly what you are trying to do
<doug16k> everyone wishes they could just use if
<doug16k> they can with constexpr one
<doug16k> debug build never heard of const elimination. when you explain it to it it says "oh no, I need the dev to be able to just put the instruction pointer in another case whenever they want"
<doug16k> constexpr if means don't even compile unless you can decide at compile time
<doug16k> and don't even look at the code in arms of the constexpr if that aren't true
<clever> doug16k: hmmm, and can constexpr allow you to do `constexpr const char *bar = "a"; asm("foo" bar);` ?
<doug16k> no but #define bar "a" then asm("foo" bar); would work
<clever> except, i need to select between H/HY/HX, based on sizeof(T)
<doug16k> then there are three overloads with different "a"
<doug16k> above them is a dispatcher that selects overload with integral constant or something
<doug16k> and it's all flattened away so it boils down to innermost asm statement and nothing else
<doug16k> you could probably just have a few if constexpr ... if constexpr ... that have the variants
<doug16k> don't even need to layer the dispatch if you have C++17 or newer
<doug16k> that pattern I did in bit_lsb_set_n works all the way back to ancient templates
<clever> and there is no inline asm immediate syntax, where a char* can be injected directly into the asm?
<doug16k> haven't attempted to
<doug16k> try what I did in that dr register thing with a string literal
<doug16k> ah you can't asm constexpr, obviously
<doug16k> how's the compiler supposed to run that at compile time
<clever> more, the string i'm passing to asm, is a constexpr
<clever> at compile time, it can fully compute what that string is, and just shove it into the .S file
<clever> the assembler then just assembles whatever that string turned into
<doug16k> you need to use overloads and have each asm case hardcoded
<bslsk05> ​gist.github.com: simple-test.cpp · GitHub
<clever> this is what i have so far
<clever> based on what your saying, i need to define 6 versions of ld and st
<doug16k> is it 6 different mnemonics?
<clever> and for every other opcode, 36 versions
<clever> for ld and st, the operand has 3 types, H(0,0) HY(0,0) and HX(0,0)
<doug16k> you can get it down to less than horrible with preprocessor
<clever> and there is a variant with and without REP%d
<doug16k> I have one ugly bit that does that. one sec
<clever> so that is 6 versions
<clever> for v32add, the destination can be - H HX or HY, and the 2 inputs can each be H/HX/HY
<clever> plus optional REP
<clever> so 4*3*3*2 combinations, 72!!!
<bslsk05> ​github.com: dgos/pci.h at master · doug65536/dgos · GitHub
<clever> oh, and the SETF, and IFNZ stuff
<doug16k> you can preprocessor trick it down to nothing
<clever> yeah, i see, the macro is just letting you write those 6 copies more easily
<doug16k> yeah
<clever> but when you get to 72 different versions .....
<doug16k> I could unroll it one more and put those in a macro and so on
<clever> wait, more, ALU inputs can also be immediate
<doug16k> if I had 10 of all 6 of those
<clever> and more, if i want to allow runtime offsets
<doug16k> I usually say don't preprocessor trick, but I say don't write 72 slightly different things even louder
<clever> might be 128 different variants
<clever> every time i stop, i think of another exception
<doug16k> go look at mmintrin.h. it's fine to have a stupid number of variations, that's what you expect
<johnjay> i see the expression "since C23" and I'm confused. lol
<doug16k> clever, in mmx intrinsics, wherever they wanted a template parameter, screw it, it's part of the name
<doug16k> sse avx same
<doug16k> then you layer on top of that the template type auto dispatch magic stuff
<heat> johnjay, i get confused every time I remember C17 is a thing lol
<doug16k> clever, surely you have seen this: https://software.intel.com/sites/landingpage/IntrinsicsGuide/
<bslsk05> ​software.intel.com: Intel® Intrinsics Guide
* johnjay sweating gif
<doug16k> zen4 is expected to have avx512
<klange> okay i fixed toaru32's atapi drivers, they weren't detecting error conditions correctly for devices without a medium, so they were just spinning waiting for a ready bit.
tricklynch has quit [Remote host closed the connection]
tricklynch has joined #osdev
<heat> "AMD Zen 4 rumor suggests much faster Ryzen CPUs for 2022, and even a 24-core monster" ah fuck off
<heat> I was looking at getting a 5950x this summer
<heat> now I'm :/
<klange> I am preparing to merge Misaka into mainline, so I should do one quick legacy release with that fix and then I need to do a bit of hacking on the bootloaders again as I want to use them for Misaka until my new Kuroko-based EFI loader is ready...
<clever> doug16k: this would be a ton easier if the assembler supported H32 instead of HY .....
<johnjay> klange: do you do most of the dev in qemu or would you test something like that on actual hardware?
<klange> I think I want to replace this menu system with just a simple line editor so you can change the boot mode...
<clever> doug16k: maybe i should just patch as instead? lol
<doug16k> heat, it will never end though. you'll be very happy compiling on 5950x, I assure you
<klange> johnjay: I test across QEMU and VirtualBox regularly, VMware occasionally, and I have a dedicated hardware test rig but that boots with grub.
<heat> doug16k: i'd be ecstatic even with a 3950x like yours
<johnjay> i see
<doug16k> I recently discovered schedutil. it boosts like crazy all the time now
<doug16k> there's almost always at least one cpu above 4.2
<clever> doug16k: scratch that, as already supports H16 and H32, ok, that makes it far simpler!
<doug16k> it's galaxy quest "press the turbo and hold it down!"
<klange> I moved ramdisk decompression into the kernel with Misaka, so I should be able to hack together a much simpler BIOS shim loader... maybe do it "right" with BIOS reads instead the thing toaru32 shipped with which was jumping straight to protected mode and doing ATAPI - gods help you if were trying to put that ISO on something other than CD.
<clever> klange: ipxe can do bios style booting from an iscsi mount, and will hijack the bios read routines, to read a iscsi dev
<clever> that sounds like it would ruin your current bootloader
<klange> it would just not work, rather than "ruin" it, but sure - pxe, et al., would be a good reason to actually use the facilities available in a legacy boot environment.
<doug16k> you can just read CD with int 0x13. why doesn't it?
<johnjay> klange: is a cd distinguished from a dvd in this context or are they the same
<doug16k> same read api as hard disk
<klange> toaru32's loader does a bunch of dumb stuff all so it can show a fancy menu that it shares with the EFI loader.
<klange> And by "a bunch of dumb stuff" I mean jumps straight to protected mode without even asking what the boot medium was. It doesn't even do a second stage load as it's an El Torito payload so it's multiple sectors right off the disc.
<klange> It also plays it rather fast and loose with memory layout... it _does_ at least ask the BIOS for the memory map before telling it to screw off.
<klange> It was written pretty much entirely to check a box of having a CD with no third-party stuff.
<klange> The EFI loader is slightly better, but the source for it is a mess.
<gog> that's bound to happen with EFI applications tbh
<klange> Mostly it's a side effect of sharing code with the bios loader - ELF parser, menu stuff.
<klange> I managed to clean it up quite a bit when I was building Kuroko-EFI.
<geist2> heat: as an owner of a mere zen 2 i can tell you it's not a big deal. any zen is better than no zen :)
<doug16k> zen2 might be slightly better than zen3 for compiles, if most of the time is parallel
<moon-child> zen2 has the memory renamer :3
<doug16k> zen2 has 4 L3s, zen3 has 2
<moon-child> they got rid of it in zen3
<doug16k> moon-child, where did you hear that?
<johnjay> klange: speaking of kuroko, why are some files duplicated like rline.c and another one
<klange> rline and the wcwidth implementation? Because Kuroko ships entirely separately from ToaruOS, and Windows doesn't provide a wcwidth so I provide the one I built for toaru's libc.
<moon-child> doug16k: don't remember now
<doug16k> zen3 would probably pull ahead just enough in configure steps and sequential crap to compensate for any contention it hit from having half as many L3s
<doug16k> and since there is no magic, the bigger L3 in zen3 has slightly longer latency
<doug16k> so don't feel bad at all for putting zen2 in a parallel workload
<doug16k> hardly want zen3 for that
<johnjay> i think compile.c was copied as well
<doug16k> zen3 actually slightly traded off parallel performance for more singlethread
<johnjay> well whatever i should look more closely
<doug16k> zen3 gains a ton of performance from two stores per clock though. that's insane
<doug16k> 3 loads and a store or two loads two stores iirc, per clock
<doug16k> push is 0.5
<doug16k> because you can just push a pair, 128 bits at once, no problem
<doug16k> cant 256+256 store though
sav has joined #osdev
<doug16k> zen4 probably will
<geist2> doug16k: yeah zen 3 replaced the memory renamer thing with something more generic and powerful, basically
<geist2> i think it was mentioned on anandtech and then agner picked up on it
<doug16k> nice
<geist2> and/or the load/store/cache/etc stuff is sufficiently more uber such that the complexity of the memory renamer thing became moot
<geist2> since it was basically a heuristic based hack makes sense it can be eventually outclassed by something more generic
<geist2> re: two stores or two loads per clock, how cute
<doug16k> I did notice that debug builds ran awfully fast
<geist2> (obligatory 'M1 is even more uber' comment)
<doug16k> even zen2 one I mean
<doug16k> it is creating the worst nightmare - constantly store-to-load dependency when one line writes out the variable update and next line reads it from memory
gog has quit [Ping timeout: 264 seconds]
<doug16k> because O0
<bslsk05> ​dougallj.wordpress.com: Apple M1: Load and Store Queue Measurements | dougallj
<clever> doug16k: and just for some extra fun, i tossed a `cycles_spent += 2;` into my pure-c implementation, to track how much time it would have cost on an actual vpu
<doug16k> clever, neat
<clever> so you can not only verify the algo is doing what you expected, but how fast it would run
Skyz has joined #osdev
<Skyz> m1 seems to have a harmless expoit
<geist2> oh neat the same guy seems to have mapped out the general port diagram https://twitter.com/dougallj/status/1373973478731255812
<bslsk05> ​twitter: <dougallj> And a little more... big changes to the LDQ/STQ sizes, and new 'coalescing retire queue' theory and sizes. ␤ ␤ (Using long-latency FP instructions to probe the load/store pipeline, the same way I used long-latency loads to analyse the int and FP pipelines.) https://pbs.twimg.com/media/ExFVZoiU8AAfeH6.jpg
<Skyz> seems like m1 is standing up for itself
<geist2> would seem to indicate how it can actually make a stab at consuming 8 instructions/cycle
<geist2> enough ALU units and load stores to probably keep a standard stream of instructions moving
<Skyz> There must be a way to distinguish what's useful or not
mctpyt has joined #osdev
<Skyz> 8/instructions per cycle is an improvement
isaacwoods has quit [Quit: WeeChat 3.1]
<Skyz> I was looking at Access2 today
<Skyz> I've been looking at it for a while
<Skyz> It's by someone who is here
<Skyz> Matabah
<Skyz> Seems robust
<klysm> mutabah, rather
<Skyz> Yeah and klys right, you showed me multiboot
<klysm> yeah
<bslsk05> ​gist.github.com: configure_pat.cc · GitHub
<doug16k> almost looks like it is for arm processor :P
<bslsk05> ​github.com: misaka: initial merge · klange/toaruos@b35f7ac · GitHub
<Mutabah> WHO DARES DISTURB MY SLUMBER
<klange> > 317 changed files with 12,122 additions and 24,175 deletions
<Mutabah> Skyz: Oh hey, cool
<Skyz> There's really no deadlines for anything that hobby
<doug16k> klange, do you feel guilty for making it one big commit though?
<Skyz> So it just seems like things go on forever
<Mutabah> That's why I like it, you can just work on something if it interests you
<doug16k> I have an insane size commit coming
<klange> doug16k: eh, the history is all in an archived repo elsewhere, and I tried to make sure that one huge commit wasn't all that bad
<klange> I think this is way better than what I did when I merged NIH and had two roots.
<klange> also I can just move this .git directory from where I did the merge over to where I've had the checkout of the new repo and... it recognizes everything perfectly.
<klange> So now I suddenly have the real repo history and I don't need to mess with my sysroot stuff or rebuild gcc :)
<Skyz> Misaka is a big update :D
<Skyz> Every OS needs SMP
<doug16k> it's so fun to get some smp stress test that keeps failing to pass overnight run
<klange> git managed to detect most of the moves from drivers that went from modules to kernel components, I get the small app fixes and they're just tiny diffs, the worst thing in here is the readelf diff because I rewrote that from scratch, and a handful of core stuff in the kernel didn't get picked up as moved because it was reordered too much.
<klange> amazingly the "about 80k lines of C" statement in the README is still true, but that's probably because of the handful of drivers that got lost in the move :)
<Skyz> The Plan 9 system manuals look really nice
<Mutabah> Skyz: I'm curious, anything in particular you were looking at in the Acess source?
<Skyz> It's well put together
<Skyz> The binary part seemed interesting
<Skyz> VFS as well
<Mutabah> Brings back memories, not worked on it in ages
<Mutabah> Barely looked at it actually... even when it would help in debugging newer code :)
<Skyz> Yeah noticed
<Skyz> Seems like these OS projects are conceptual
<Mutabah> It's fun to learn and implement... less so to polish out the bugs into something day-to-day usable
<Mutabah> ... unless you're klange
<heat> is java that hard to port?
<heat> if you have a working libc and whatnot
<doug16k> probably not that bad but it probably touches a lot of apis all together
<doug16k> it's like a small version of the browser problem. it uses so many apis it is hard to get one working
<klange> and there we go, now it's the master branch
<doug16k> if you dropped all the standard libraries, it's probably pretty easy to get java running
<klange> sortie had a mono port, if you want Microsoft-brand Java.
<klange> [that's a joke in case it's unclear]
<doug16k> I like C#. it's the microsoft compiler team's FTFY for Java
<doug16k> C# = Java + generics that aren't stupid
<moon-child> jvm still runs circles around .net though
<moon-child> esp. once they add value types
<moon-child> and you can use scala/kotlin/whatever
<Skyz> So far POSIX is a good system, not sure if one can break compatiblity with something else yet
<Skyz> Rust OS seems to be coming up with something
<Skyz> mutabah
<Skyz> But yeah me coming up with a different protocol is purely speculative
<Skyz> ?
<Skyz> Literally a question mark
<Skyz> Imagine, you got to use the os and try to vm it in windows / linux / mac
<Skyz> and you can't
<Skyz> !
<Skyz> Okay enough speculation
<Skyz> I wonder how quantum algorithms will work
mctpyt has quit [Ping timeout: 268 seconds]
<klysm> skyz, re: quantum algorithms, https://github.com/dwavesystems
<bslsk05> ​github.com: D-Wave Systems Inc. · GitHub
Oli has quit [Ping timeout: 265 seconds]
SwitchToFreenode has quit [Remote host closed the connection]
SwitchToFreenode has joined #osdev
heat has quit [Ping timeout: 268 seconds]
Skyz has quit [Quit: Ping timeout (120 seconds)]
<klange> Legacy BIOS loader is working again in its current form. Thinking I can probably just move the file loading to ye olde bios calls before even showing the menu...
<klange> And shouldn't be too hard to also hack this up to a "proper" legacy boot sector setup, or at least write a stub for it.
mctpyt has joined #osdev
<doug16k> is my system gcc really this obsessed with build ids? https://gist.github.com/doug65536/c30e5cd55054cc717afd5bd72c622d21
<bslsk05> ​gist.github.com: gist:c30e5cd55054cc717afd5bd72c622d21 · GitHub
srjek has quit [Ping timeout: 268 seconds]
<doug16k> why is the section named build minus id?
<Mutabah> skewer-case naming?
<doug16k> is that ok though?
<doug16k> will it parse that as arithmetic subtract expression?
<doug16k> guessing not, but it might screw it up
<doug16k> it seems to know it got discarded, yet still there in output. can someone explain that?
<Mutabah> I _think_ it's added by ld... not sure
<Mutabah> might need to delve into the internets, or even the source
<doug16k> I even said -Wl,-no-build-id and it didn't warn about that
<doug16k> I think my distro patched it so it can't be stopped
<doug16k> I should try with my dgos compiler, I guess this is an example of why you never use the system compiler
<Mutabah> Build your own
<Mutabah> And yep
<Mutabah> distros have a bad habit of doing their own patches for questionable reasons
<doug16k> I thought you could slap out a simple 2MB bin file with a slightly above hello world link
<doug16k> apparently not lol
<doug16k> I could make it work but just funny
<doug16k> yeah my cross compiler doesn't add it
mctpyt has quit [Ping timeout: 264 seconds]
<doug16k> I disable cache and turn off MTRRs when starting APs now
<doug16k> and flush cache and tlb
<doug16k> then after it changes the count I spin on, I flush both again and turn on cache
<doug16k> have to do that to comply with "MTRR considerations for MP systems" in manual
<doug16k> I change PAT to use WC so I need to do whole thing
<doug16k> not allowed to have two cpus with different memory types using MTRRs with cache on at same time
<doug16k> with different memory types in mtrrs or different pat I mean
<doug16k> all the other cpus have to have cache disabled and mtrrs off before changing pat or mtrrs
SlyFawkes has quit [Quit: Ping timeout (120 seconds)]
tenshi has joined #osdev
MarchHare has quit [Ping timeout: 268 seconds]
lleo has joined #osdev
lleo has quit [Quit: Leaving]
<bslsk05> ​gist.github.com: what happened?! 0x1ffdf0000??? · GitHub
<doug16k> I can't believe it
<doug16k> oh I know
<doug16k> I am in top 2MB
<doug16k> wait, why didn't it jmp to ecx
<doug16k> oh I know why
<doug16k> crap, cs base is 0xffff0000 , so it is nonsense to jump down that far
<doug16k> need - 0xFFFF0000 on the jmp address. let me try that
<doug16k> haha, nice. if I link the really early code above -64KB line, then I can just jmp normally to bottom of there. it's jmp 0 and goes to 0xffff0000 :D
<doug16k> but code says jmp _start
<doug16k> I can imagine people stepping through early rom code they made, going wtf?
chartreuse has quit [Ping timeout: 264 seconds]
riposte has quit [Read error: Connection reset by peer]
riposte has joined #osdev
redeem has quit [Ping timeout: 250 seconds]
alexander has joined #osdev
EricHerman has quit [Remote host closed the connection]
riposte has quit [Quit: Quitting]
sortie has joined #osdev
dennis95 has joined #osdev
<sortie> <oonbotti2> ​#offtopia <nortti> you've nerd-sniped me so hard with #port5742
<sortie> :)
<sortie> I worry what the timestamp on that message was :)
<sortie> I didn't mean to derail anyone, just wanted to get it back up in the last hours of Sunday :)
<moon-child> sortie: what timezone are you in?
<sortie> TZ=CEST
<moon-child> $ TZ=CEST date +%a
<moon-child> Mon
<sortie> Ah yes I'm currently in that phase where I'm officially working but eating breakfast
Oli has joined #osdev
mctpyt has joined #osdev
redeem has joined #osdev
sav has quit [Ping timeout: 264 seconds]
GeDaMo has joined #osdev
sav has joined #osdev
Oli has quit [Ping timeout: 252 seconds]
iorem has quit [Quit: Ping timeout (120 seconds)]
transistor has quit [Ping timeout: 265 seconds]
<sham1> Good afternoon everyone!
<klange> Good evening.
<sortie> It's a sham1
<sortie> !
<klange> ugh i just want to build modules with the 'large' memory model and stick them up top somewhere and be done with it...
<klange> going to be much less modular this time around, lots of stuff that moved to the main kernel is staying there
<klange> but device drivers for things I can probe PCI or whatever for, those should go back into relocatable objects where they belong
<klange> and then I'm also not going to do what I did in toaru32 where modules were being loaded from multiboot modules
<klange> just shove 'em in the ramdisk and load them on startup, maybe even with some udev-like thing...
<klange> maybe i can even do something fun and put pci ids in a section so you can just plop modules in /mod or whatever and they'll get scanned by something in startup.d, it'll check against /proc/pci, and load you... plus or minus also doing dependency resolution stuff, but I kinda want to avoid having dependency trees for modules
handicraftsman has joined #osdev
srjek has joined #osdev
iorem has joined #osdev
isaacwoods has joined #osdev
Oli has joined #osdev
mid-kid has joined #osdev
rorx has quit [Ping timeout: 264 seconds]
gog has joined #osdev
* gog meows
<sham1> maow
sav has quit [Ping timeout: 264 seconds]
Shikadi` has joined #osdev
qookie has joined #osdev
mahmutov has joined #osdev
<jfu> woof
mahmutov has quit [Quit: WeeChat 3.1]
Shikadi` has quit [Ping timeout: 264 seconds]
mahmutov has joined #osdev
sav has joined #osdev
<Oli> mjäu
tricklynch has quit [Ping timeout: 268 seconds]
tricklynch has joined #osdev
tricklynch has quit [Ping timeout: 268 seconds]
tricklynch has joined #osdev
mahmutov has quit [Read error: No route to host]
heat has joined #osdev
<z_is_stimky> mrow
<heat> morning cunts
<z_is_stimky> good afternoon
<heat> it's that time of the day where I grow sadder looking at build systems! woohoo!
<z_is_stimky> moos
<z_is_stimky> mood
flx- has quit [Quit: Leaving]
flx has joined #osdev
_whitelogger has joined #osdev
heat_ has joined #osdev
heat has quit [Killed (NickServ (GHOST command used by heat_))]
heat_ is now known as heat
knebulae has quit [Read error: Connection reset by peer]
Lucretia has quit [Remote host closed the connection]
Lucretia-backup has joined #osdev
srjek has quit [Ping timeout: 268 seconds]
matt|home has quit [Ping timeout: 268 seconds]
srjek has joined #osdev
mctpyt has quit [Ping timeout: 268 seconds]
transistor has joined #osdev
tricklynch has quit [Ping timeout: 268 seconds]
mctpyt has joined #osdev
geist has quit [Ping timeout: 268 seconds]
dutch has quit [Quit: WeeChat 3.1]
tricklynch has joined #osdev
geist has joined #osdev
tenshi has quit [*.net *.split]
thinkpol has quit [*.net *.split]
tenshi has joined #osdev
dutch has joined #osdev
tricklynch has quit [Ping timeout: 264 seconds]
tricklynch has joined #osdev
thinkpol has joined #osdev
mahmutov has joined #osdev
vdamewood has joined #osdev
tricklynch has quit [Ping timeout: 268 seconds]
tricklynch has joined #osdev
mahmutov has quit [Ping timeout: 264 seconds]
rorx has joined #osdev
KREYREEN has joined #osdev
SwitchToFreenode has quit [Remote host closed the connection]
<heat> does incbin not work with absolute paths?
MarchHare has joined #osdev
iorem has quit [Quit: Connection closed]
<Arsen> why would you want that?
<heat> build stuff
<heat> huh I found out why it's broken
<heat> somehow the vdso got non readable and clang just interpreted -EACCES as could not find file
redeem has quit [Quit: Client closed]
KREYREEN is now known as SwitchOnFreenode
alexander has quit [Ping timeout: 265 seconds]
Lucretia-backup is now known as Lucretia
tricklynch has quit [Read error: Connection reset by peer]
tricklynch has joined #osdev
Shikadi` has joined #osdev
matt|home has joined #osdev
mahmutov has joined #osdev
tricklynch has quit [Ping timeout: 265 seconds]
Stary has quit [Changing host]
Stary has joined #osdev
tricklynch has joined #osdev
Skyz has joined #osdev
<Skyz> Is Google hiring?
<bslsk05> ​lmgtfy.app: LMGTFY - Let Me Google That For You
<moon-child> lol you trust _google_ to tell you if google is hiring?
<moon-child> won't they be biased?
<kazinsal> yeah, the google interview process actually requires you to go work for apple first
<kazinsal> little known secret
mahmutov has quit [Remote host closed the connection]
<Skyz> Could find something I guess
<Skyz> Really looking for a job in the future
mahmutov has joined #osdev
tricklynch has quit [Ping timeout: 272 seconds]
tricklynch has joined #osdev
Skyz has quit [Ping timeout: 250 seconds]
Skyz has joined #osdev
<junon> Google calls me every 6 months down to the day.
<junon> Well, almost.
<junon> I interviewed with them once and got a really... interesting interviewer. I failed because I asked too many questions about the usecase of wrapping a bowling score algorithm in a class.
<moon-child> lol
<Skyz> My concern is I'm not a programmer
gareppa has joined #osdev
<Skyz> I'm attempting to be
<kc8apf> Neither are more CS grads
<junon> ^
pretty_dumm_guy has joined #osdev
<junon> Skyz what is your goal with becoming a programmer?
<junon> Philosophically, I mean.
<Skyz> I just wanted to get an os working
<kazinsal> take up professional snowboarding, it's more fun
<heat> oh yay that part of the day where I see crazy people talking to themselves
<junon> For what purpose? Just interest?
<Skyz> Pretty much thought it would be an interesting endeavor, and we all are working on OS dev so this should be relevant
<kazinsal> heat: *passes the bong*
<j`ey> Skyz: if you cant program yet, focus on that, before an OS
<junon> An OS is "final boss mode"
<junon> it's not just being an elitist saying this.
<Skyz> Yeah, but I got some ideas with it
<Skyz> I just wanted to get those ideas out there first
<Skyz> No matter what a new os is difficult to pull off
<Skyz> I wanted to try
<junon> Ideas are a dime a dozen, being able to execute them is what matters. You can ask questions about them, discuss them, hope and dream. But if you aren't willing to put in the work to actually learn the fundamentals then you are doomed to fail.
<junon> Do you know Python? Java? Javascript?
<junon> Do you understand control structures and whatnot?
<junon> Are you good with arithmetic?
<heat> learn ebpf and become a network engineer for cloudflare
<kazinsal> have you finished your blood pact with our dark lord and master ba'al ze'vuv
<kingoffrance> finish? he doesnt let anyone go
<heat> dark lord ge'ist
<junon> Basically the bare minimum is to know C, and to know C you need to know how programming works in the general sense, and that can take years to fully grok.
<kazinsal> and to know how programming works is to know madness
<kazinsal> turn back! turn baaaaaack!
<heat> fuck computers
<heat> go be a doctor or something
<heat> seriously
<kazinsal> not a dentist tho
<kazinsal> dentists are sadists
<junon> Then from there, you need to understand how processors work, read a bunch of manuals, spend a lot of time straight-up bashing your head against the wall with "this should work but it doesn't"-type problems
<heat> yeah I meant a real doctor
gareppa has quit [Quit: Leaving]
<heat> fuck them dentists
<junon> And that's just to get a kernel working.
* kazinsal watches as all his teeth ablate from his skull, britishly
<heat> bri'ish
<junon> And a kernel is a very very small part of the OS. A critical one, yes, but small in the grand scheme of things.
<kazinsal> oi guv spot a tenner for yer ol m8 OS dev
<junon> I'm not trying to discourage you, Skyz. But going from zero to OS is not realistic for anyone, nor has it ever been (including the creators of existing OSes).
<junon> Anyone who says this stuff is ezpz is lying to you.
<heat> paging tough innit
<junon> If you're not willing to learn the fundamentals then OS dev isn't for you. Gonna be real.
<kazinsal> I dropped out of math in grade 12 because I was lazy and now I'm a network engineer
<kazinsal> stay in school, kids
<Skyz> I can learn to count
<Skyz> Basically that's all the comp does
<GeDaMo> But can you count in binary? :|
<Skyz> Unfortunately
<junon> Ah okay, not sure if this is troll or srs now
<j`ey> junon: were not sure
<kazinsal> junon: nobody bothered reimplementing the +b after we moved to libera, that's what it is
<j`ey> junon: Skyz was actually banned on freenode
<Skyz> I want everyone to get into osdev
<junon> oh it's a troll
<junon> okay
<Skyz> It's not
<kazinsal> we're not sure if troll or unmedicated
<junon> here I am being earnest lol
<Skyz> I'm just obnoxious
<kazinsal> I'm betting on the latter
<heat> just /ignore him
<jimbzy> Binary is for Quakers. I count by listening to the microscopic transistors switching.
<Skyz> It's not fair how hard making an os is
<kazinsal> one of the downsides of IRC is that you can't apply snarky ban messages
<Skyz> It's my life goal
<jimbzy> You can add a message to the kick, tho?
<kazinsal> yeah, but that doesn't replay the shame when they try to rejoin
<junon> Skyz in the absolute off-chance you're being sincere, it's very clear this isn't for you. I'm not one to say "give up on your dreams" but... focus on something else that makes you happy. For real. The pathway is painted with pain and unhappiness if you aren't willing to commit to the absolute astronomical amount of work required to get a simple OS working.
<jimbzy> Ah, true that. I'm used to having eggdrops handle the velvet rope.
<Skyz> I tried to stop
<heat> astronomy is cool.
<Skyz> And yes I'm sincere
<jimbzy> I hate OS development, but I like the people in this channel so it's worth it.
<kazinsal> I've always loved the SomethingAwful method of putting the punishment log in public view, and letting the moderators occasionally craft bizarre punishment reasons that make people go "oh, now I REALLY have to click on the link and see what this was for"
<jimbzy> Wow, I ain't thought about that site in years, kazinsal.
<Skyz> I can work with a VM already
<kazinsal> The forums are still alive and kicking. We collectively booted all the weirdos and chuds, Lowtax flamed out and sold the site to Jeffrey of YOSPOS, and now things are nice and happy
<jimbzy> I'll be darned.
<heat> is somethingawful parody?
<kazinsal> The saga with Lowtax receiving big patreon bucks and spending it all on a rented mcmansion and leased Nissan GT-R against the business accounts was a fun one
<jimbzy> Hahaha
<jimbzy> Why am I not surprised?
<kazinsal> He then got outed as a serial wifebeater, his patreon flatlined, and Jeff bought the forums from him
<j`ey> kazinsal: Andrew Lee might buy them
<kazinsal> At one point he was also buying artisinal cookies off the internet
<jimbzy> SA and Zophar's Domain were two of my favorites back in the day.
<kazinsal> SA is safe. JeffPOS is also a lucky sonofabitch who threw a few bucks at bitcoin when they were a couple cents each
<jimbzy> StileProject was a bit too funky for me.
<Skyz> I was thinking osdev would be something like racketboy
<GeDaMo> What's racketboy?
<Skyz> It's retrogaming
<GeDaMo> Ah
<Oli> Hello! Reading the Z80 processor's user manual, I grow very intrigued about the innerworkings and structure of processors, and it's interaction with peripherals; I find myself looking at results from a web search engine query for a book about, and thought it could come good to bring this up here in addition: Which do you consider the best resource about the innerworking and structure of processors?
<bslsk05> ​www.bigmessowires.com: BMOW 1 Computer | Big Mess o' Wires
<clever> Oli: this blog has a whole series of posts, on creating a working cpu from just dumb logic gates
<bslsk05> ​www.nand2tetris.org: Home | nand2tetris
<GeDaMo> There are some video series on making breadboard CPUs
<GeDaMo> Ben Eater - Building an 8-bit breadboard computer! https://www.youtube.com/playlist?list=PLowKtXNTBypGqImE405J2565dvjafglHU
<bslsk05> ​playlist 'Building an 8-bit breadboard computer!' by Ben Eater
<bslsk05> ​playlist 'Making an 8 Bit pipelined CPU' by James Sharman
Oli has quit [Remote host closed the connection]
Oli has joined #osdev
<immibis> a pipelined one, eh
<immibis> btw I registered #cpudev by analogy with osdev, but it's pretty much empty
<immibis> (on freenode it's registered to someone who's gone)
<immibis> but if CPUs interest you i'd autojoin it just in case something happens. I think ZipCPU is making one
<immibis> I should read books sometime, instead of piecing together information from random internet comments and the occasional wikipedia article
<moon-child> the only hobby cpu communities I know of with any activity are opencores and comp.arch
<GeDaMo> You need a /topic
<GeDaMo> Isn't doug16k designing a CPU?
chartreuse has joined #osdev
<Skyz> Designing a cpu?
<immibis> designing a CPU is rather possible as long as you don't have to deal with any of that pesky real world stuff. You can basically just write a bytecode interpreter, but out of logic gates.
<GeDaMo> Reality sucks :P
<moon-child> immibis: I think that's rather an instruction set than a cpu :P
alexander has joined #osdev
<immibis> moon-child: > as long as you don't have to deal with any of that pesky real world stuff :)
tenshi has quit [Quit: WeeChat 3.1]
<kazinsal> just pull a 90s AMD and implement your bytecode translator on a RISC chip and then when it doesn't work as well as it should have on paper, buy someone else's design
sav has quit [Remote host closed the connection]
<geist2> rip K5
angelsl has joined #osdev
<Oli> Thank you so much, clever, GeDaMo, immibis and moon-child, for sharing about the processor-related resources you have!
<GeDaMo> I have others, I'll share them in #cpudev at some point :P
<geist2> it's a bit more hard core, but there's a professor in austria i think that puts his lectures online for the last few years
<geist2> and they start from pretty simple up to highly advanced modern cpu design
<geist2> really good stuff. doug16k turned me on to them
<bslsk05> ​playlist? 'Onur Mutlu Lectures - Playlists' - 'This channel contains videos and slides from courses taught and lectures delivered by Professor Onur Mutlu (https://people.inf.ethz.ch/omutlu/).
<vin> Onur Mutlu's lectures are pretty good
<geist2> the one i was specifically looking at was the spring 2020 one i believe, thoug hhe's done the same seminar a few times, dunno if any are better than others
<bslsk05> ​playlist 'Seminar in Computer Architecture - ETH Zürich (Spring 2020)' by Onur Mutlu Lectures
<geist2> actually no, this is a smaller playlist
<bslsk05> ​playlist 'Digital Design & Computer Architecture - ETH Zürich (Spring 2020)' by Onur Mutlu Lectures
<geist2> hmm, he mentions these two books at this point: https://youtu.be/44B6YmSuk0I?list=PL5Q2soXY2Zi_FRrloMa2fUYWPGiZUBQo2&t=780
<geist2> anyone read or have either of them?
<kazinsal> I've seen the cover of the Patt and Patel one before but haven't read it
<bslsk05> ​redirect -> www.amazon.com: Digital Design and Computer Architecture: Harris, David, Harris, Sarah: 9780123944245: Amazon.com: Books
<bslsk05> ​redirect -> www.amazon.com: Amazon.com: Introduction to Computing Systems: From Bits and Gates to C and Beyond (9780072467505): Yale N. Patt, Sanjay J. Patel: Books
GeDaMo has quit [Quit: Leaving.]
<doug16k> moon-child, it's a cpu
Patater has joined #osdev
<doug16k> it's a classic Tomasulo out of order processor. not finished, but most of what's there passes testbenches: https://github.com/doug65536/toycore
<bslsk05> ​doug65536/toycore - Out-of-order verilog CPU implementation (0 forks/1 stargazers/MIT)
<doug16k> register renaming and everything
<doug16k> single cycle fmul by power of two
<doug16k> er, fdiv I mean
<doug16k> adds exponents, boom done
<doug16k> er, subtract
<doug16k> moon-child, this is the instruction set https://www.docdroid.net/J0Eh0Qy/tiny-insn-set2-pdf
<bslsk05> ​www.docdroid.net: tiny_insn_set2.pdf | DocDroid
<doug16k> fdiv not on that one
<doug16k> has paging too - with large pages
<doug16k> every time I get it working the whole project gets more ambitious :)
<doug16k> it was just pipeline, then SMT, now OOO
<moon-child> smt? Wow
<doug16k> yeah it kept track of which threads are stalled and round robins the ones not stalled
<doug16k> sort of for free, since the sram block I used for the register file had room for lots of register contexts
<doug16k> tid becomes upper bits of register selector
<doug16k> then have a flags and pc for each and you're set
<doug16k> one stage before fetch to pick next ready thread and it tends to be independent operations going down the pipeline from different threads
<vin> geist2 | anyone read or have either of them? > I have skimmed throuh patt and patel. It is a nice intro book which uses LC3. Most US universities seem to use it for intro courses. But LC3 itself is limiited. Example you can't have interrupts.
<geist2> yah no, but i'm thinking of picking it up, though i doubt there's anything earth shattering that i didn't already know
<vin> Yes, you would likely know most of it (concepts).
<geist2> moon-child: hoestly SMT is less impressive than OOO. OOO is where it gets fun, SMT is relatively straightforward
dennis95 has quit [Quit: Leaving]
<geist2> which is why doug16k progressed in that particular direction, SMT first then OOO
<doug16k> yeah, once you get it doing the round robin in one cycle, and expand register files, SMT implements itself
<doug16k> carry along a tid
<doug16k> you already had to do most of what it needs
<doug16k> the scheduler is fairly neat though. you need to be able to make any number of threads become ready, possibly stall one thread, and select the next ready one, every cycle, back to back
<doug16k> wait actually I think you can resume one and stall one every cycle
<doug16k> and select next one
<doug16k> ya that makes sense, since only one cache miss can happen at one time, and one cache line fill completes at a time
<doug16k> data cache wins if contention between dcache and icache
<doug16k> totally unsure if that is right way around
<Skyz> ooo is good?
<doug16k> Skyz, it lets work get done when an instruction has to wait
<doug16k> it's like a cashier helping the next customer if one at counter has a long delay
<Skyz> scheduler?
<Skyz> This is processor related?
<moon-child> kind of like a scheduler for individual instructions, rather than processes
<Skyz> i see
<geist2> in case you didn't know ooo = out-of-order
<doug16k> processor finds ways to get a head start on things that don't depend on previous results
<geist2> so when folks say ooo cpu they mean modern designs where the cpu doesn't process instructions in the order they appear in the instruction stream
<geist2> a non ooo cpu folks will call in-order
<Skyz> seems bad at first but performance shows it's good
<Skyz> So I'll just take the advice if it's good
<heat> oooooooooooooooooooooooooh
<heat> almost as good as aaaaaaaaaarch64
<geist> Skyz: would would it seem bad?
<Skyz> Out-of-order
<geist> sure, go on
<moon-child> geist: 'out of order' means 'not working', in certain contexts
<moon-child> pun
<geist> you mean it appears bad because you think it would be incorrect? that's the key
<geist> out of order but still maintaining the illusion that the instructions are processed in-order
<geist> it has to do that or it would't work
<moon-child> geist: no, they meant that it appears bad because 'out of order' can also mean 'not working' rather than 'in a different order'
<moon-child> (I assume)
<geist> oh oh i see
<geist> like a sign on it, heh
<geist> never occurred to me :)
<heat> very accurate these past few years tbh
<doug16k> yeah it seems like they run in order, but delays can cause some older operations to wait while newer ones start immediately, and it makes sure it behaves just like it would in-order
<geist> every time we talk about this i get a teensy bit more nostalgic for an itanium machine
gmacd has quit [Remote host closed the connection]
<geist> but of course no real cheap itanium boxes were ever made and they're probably still valuable in very specific contexts, much like alpha machines are, apparently
<geist> so unlikely to ever find a cheap one on ebay
<Skyz> intel inside
<Skyz> pentium processor
<heat> if google has quantum computers they probably also have itanium machines
<Skyz> they actually advertised them
<geist> heat: probably a joke in there, but why do you figure that?
<moon-child> geist: cliff click says vliw doesn't solve the actual problem, which is that ultimately you have to deal with cache being slow, and all the deep pipelines in the world won't help with that
<doug16k> we got the exception abi everyone uses from itanium team. that thing is genius
<heat> geist: joke :)e
<moon-child> s/help with/fix/
<geist> moon-child: gotta be more specific about 'slow' though. ie, latency vs throughput
<heat> everyone knows itanium is even rarer than quantum computing :D
<geist> latency is the big one, and that's why machines that are highly OOO can help a bit
<moon-child> err, memory being slow, sorry
<moon-child> and yes latency
<moon-child> 'a bit' but his argument is that eventually you hit a cliff
<geist> and of course highly aggressive prefetching
<geist> oh yah vliw, yeah
<geist> got it. missed the vliw part of your statement
<geist> yah it seemed like a 90s problem. like 'how are we ever going to make cpus properly OOO without it being a huge complicated mess'
<geist> and thus 'solve it in software'
<geist> whereas some other processor designers were having their beer held
<doug16k> vliw seems like it would work
<Oli> It is the first time I became conscious about Verilog, and reading "Out-of-order verilog CPU" on the repository doug16k shared gave me "An emulator for a discontinued Verilog CPU" as first thoughth: I then looked at the code in, and now find myself with several web browser tabs open about hardware description languages, Verilog-related and VHDL-related information. This is a huge world I wasn't aware about.
<geist> turns out tomatsulo and whatnot had a lot more runway
<geist> Oli: yay, yeah it's neat
<doug16k> Oli, electrical engineer stuff
<Skyz> You can look into Computer Engineering
<geist> the thing that really is the leap forward is the 'thinking in parallel' that you have to context switch to when writing verilog, or really designing any computer circuits
<kazinsal> I've considered learning verliog or similar and trying to figure out how to put together a basic FPGA but I haven't found a good "starter kit" of sorts
<doug16k> someone has to make chips, right?
<kazinsal> I'd love to try to crank out an ethernet switching FPGA just for fun
<geist> if there's any value to the whole thing is that parallel thinking mindset you have to adopt while doig it
<kazinsal> Probably won't end up being terribly performant buuuut
<doug16k> yeah, the parallelism is pretty mind blowing in HDL. in some respect, all lines run continuously in parallel
<geist> kazinsal: indeed i've thought o doing that a few times. i think there's some extremely standard solutions for it, but its like building a simple cpu: you go through the learning curve by making all the same mistakes and designing from first principles
<kazinsal> definitely. same as osdev, takes many years of reinventing the same broken wheel before you get where you want to be
<geist> doug16k: right, of coruse it's not really an HDL thing. any circuit design does the same thing. because you dont care about these wires on *this* clock cycle doesn't mean that part of the circuit isn't still doing things, etc
<doug16k> yeah
<geist> what fools you about HDL, and especially verilog is it *looks* procedural
<doug16k> reality isn't a step by step thing, it's continuous and parallel
<geist> and in fact you have the whole structural vs procedural verilog stuff which blurs the line
<geist> where you're sort of switching between these two modes on a block by block basis and hoping the compiler figures out what you're doing
<geist> *kinda* like escaping to an alternate version of the same language, but it's more subtle
<geist> but i think that's why most intro stuff sticks to purely structural verilog (except maybe test harnesses)
<doug16k> yes you can make step by step stuff, but arrange it so they all work at once on different data
<geist> ie, wires, @clock, etc
<geist> all combinatorial with blocks for latches
<geist> as i hacked more verilog i got more comfortable writing procedural style 'describe the algorithm, not the structure' stuff where it mattered
<geist> but only because i could figure out what the compiler was doing and making sure it did the right thing
alexander has quit [Ping timeout: 272 seconds]
<doug16k> kazinsal, you can get fpga prototyping hardware that has the ethernet port already there and a transceiver to do the SERDES stuff for you so you can use a wide bus to keep clock speed down
<doug16k> you could probably get that working no problem
<immibis> kazinsal: i got a Digilent Arty board, but there are others too, expect to spend a few hundred dollars though
<immibis> haven't tried making a whole cpu on it. just some test stuff, then i got bored. I made it reply to IP pings
tricklynch has quit [Ping timeout: 244 seconds]
tricklynch has joined #osdev
<geist> i had some fun driving some of those fancy led arrays
<geist> a super dump fpga is great for that, especially if they have some fairly complex spi protocol or something
<geist> an fpga can sequence that like there's no tomorrow
<kazinsal> I ought to actually read up on how serdeses work
merry has quit [Quit: ZNC - https://znc.in]
<geist> my experience with them on altera and xilinx is there are N serdes ports per fpga, can be attached to some limited number of pins (or you can use the pins for regular stuff)
<geist> and you punch out a wrapper via some wizard that makes a verilog module for you that you then treat like some sort of black box
merry has joined #osdev
<geist> under the hood the verilog ends up basically using some built in intrinsics, not entirely unlike some C++ like __builtin_serdes_pin(...) kinda thing
<doug16k> you can write a wide value to it and it blasts them out at a speed you couldn't do in code, or vice versa, collects them into wide reads
<geist> and what it really is is a configurable hardware block
<kazinsal> makes sense
<geist> right, the verilog enterface ends up looking like something like
<geist> serdes_pin(out clock, in data[8]) or something
pretty_dumm_guy has quit [Quit: WeeChat 3.2-dev]
<geist> since you configured it to say run 8x the speed of the clock you feed it it'll once per clock cycle give you 8 bits of data
<kazinsal> gotcha. seems more logical to just let the FPGA do its thing on repeatable tasks like that
<geist> right, well also the whole point is it's a fixed asic block that can run many times faster than the regular fpga logic
<doug16k> you need to widen things because an fpga can't run at really high frequencies
<geist> so whereas you might only be able to clock up your logic to say 300mhz or so the serdes fixed part can run at many ghz
<doug16k> need a block per cycle
<geist> right
<geist> number of serdes pins and the speed they can run, etc is a big differentiator between lower end cheap fpgas and the higher end ones
<geist> a mid range but still semi affordable fpga may have say 4 or 6 serdes pins (out of say 400 on the part itself)
<geist> and a low end one may have 0 or 2
<kazinsal> right
<geist> really expensive big fpga may have craptons of them and that's a big part of what you're paying for
<geist> so something like the arty-100 that immibis mentioned i think has a few serdes pins? but that's a 100klut artix which is not the lowest end fpga you can get
<geist> https://www.xilinx.com/products/silicon-devices/fpga/artix-7.html#productTable yah, see the artix-7 like starts with 2 6.6Gb/s transceivers
<bslsk05> ​www.xilinx.com: Artix-7 FPGA Family
<doug16k> the ddr data bus to memory would be serdes but dedicated to memory
<geist> the xc7a100t which is what's in the 100klot arty board has 8
<geist> what the board does with them i dunno, hopefully you can get them out of the board in a reasonable way
<geist> iirc f you look up one of the raw fpgas on digikey i think they're probablyin the 30-50 USD range, i suspect
<doug16k> my fpga has a memory controller with 128 bit bus to get/write entire 16-byte ddr burst in one cycle
<doug16k> it's serdes-like
merry has quit [Ping timeout: 264 seconds]
<doug16k> which is nice when ram is running at 333 and cpu is at 100
<doug16k> and ram data bus is 16 bit and it's ddr
<doug16k> 166mhz ram ddr = 333 MT/s
<doug16k> 166M 32-bit/sec is easy way to look at it
<doug16k> so that should sustain 1 load/store per cycle plus lots of icache misses and tlb misses
<doug16k> that's why I went all ambitious and switched to OOO
<doug16k> I mean sustain even if missing a lot
<doug16k> makes it easy when cache line fill and write back are just done in one cycle
<doug16k> no stepping through words
<doug16k> had to make cache 4 banks so I can write 4 things at once
<doug16k> 128 bits
<doug16k> dual port - one port is cache line writeback/fill, other port is load/store
<doug16k> writeback/fill activate all four, load/store figure out which one from address
<doug16k> can't fill and load or writeback and store in same place so you need an interlock that delays the access if that happens
<doug16k> miss handling makes that happen mostly by itself - it can't hit until fill completes, and it can't start the fill until writeback completes
<doug16k> it actually reminds me of C64. the memory is so fast it waits for the cpu
<doug16k> it is if I overlap stuff a little
tricklynch has quit [Ping timeout: 268 seconds]
tricklynch has joined #osdev
<Skyz> What would FPGA be most useful for in osdev?
<Skyz> Can you get an OS to recognize it like a cpu?
<doug16k> yes
<doug16k> it is a cpu, just implemented with gates that aren't nearly as fast as if you made a custom circuit from the same code
<kazinsal> logically seems like a good way to prototype out something that can then be theoretically baked as an ASIC with the clock speeds cranked up
<doug16k> your code and the compiler figure out how to use the interconnects and resources in the chip to bodge together the logic you said in the code
<doug16k> kazinsal, exactly
<doug16k> instead of spending $1M to get a some real wafers that are full of bugs
<klange> That is, in fact, often the idea...
<kazinsal> still easier than trying to get your hands on friggin broadcom's switching ASIC documentation
<immibis> geist: unfortunately i looked up the serdes pins and none of them are accessible on this chip. but my version is the 35T IIRC, not the 100, and not the A7
<immibis> er. i think it is an Artix 7. but they released a newer board labeled "Arty A7" which it is not
<doug16k> kazinsal, a kit may provide an external transceiver that does that
<immibis> so i'm not sure what's on those chips. I picked it mainly for price and still having an ethernet port
<doug16k> kazinsal, with a bus wired to it
<immibis> Skyz: if you're writing an OS for your computer then an FPGA is useless to you. if you're writing a CPU for your FPGA then you need an FPGA to write it for
<doug16k> kazinsal, what bitrate are we talking about?
<immibis> geist: don't forget the stupid licensing system though. You can only use the dev tools for free with certain chips, including the one on this board, otherwise you need to pay $,$$$
<kazinsal> yeah, what annoys me is that you can get "open" whitebox switches that have some commodity ASICs of some sort in them, but the only OSes that will have drivers for the ASICs are all closed source
<immibis> so beware when buying FPGAs from digikey
<geist> yah but the point at which you pay for it is the super expensive fpgas
<geist> in practice i've never had an issue with the free licensing at all
<geist> ie, you need to be dealing with $1k boards and whatnot before you get into that
<geist> ie, kintex, etc
<geist> but, that being said, if you want open source tools lattice fpgas have been basically 'figured out'
<geist> ie, there is an open source compiler for it
<doug16k> order a "defense grade" fpga that's $100k. see if men in black knock on your door :P
<Skyz> I'm not sure what I'm trying to do right now
<immibis> IIRC lattice ones are much smaller
tricklynch has quit [Quit: Quit]
<kazinsal> we gathered
<geist> no doy Skyz
tricklynch has joined #osdev
<Skyz> I was thinking a plan 9 OS would be neat
<Skyz> I also was thinking ai
<doug16k> "yeah I ordered that to make a machine vision autonomous sentry gun like Team Fortress 2"
<geist> Skyz: yes. well what about plan 9 os? do you mean booting it? hacking it?
<geist> Skyz: that's the point, you need to focus on something and *do it*
<Skyz> "hacking it"
<Skyz> Got it
<Skyz> looking into it
<geist> instead of just endlessly blathering about what is interesting
<geist> no, looking into it is your problem. you look into everything and then dont do it
<geist> dont look into it. *DO IT*
<kazinsal> the #osdev team can no longer help you
<kazinsal> if we had the power to make someone want to actually put some damn effort in I sure as hell would be lobbying for its widespread use
<geist> we endlessly blather about stuff here, but usually after having done something with it, or blather about the thing we're doing
<doug16k> Skyz, it's like you want to skydive from space when you haven't even been in an airplane yet
<geist> that's a difference between endlessly blathering bout cool stuff that you have no idea what it really is
<kazinsal> our blathering is usually at least fairly concrete, yes
<Skyz> Yeah
<Skyz> Got it
<Skyz> I got some ideas
<doug16k> get some stuff working
<Skyz> but lets get some working stuff
<doug16k> modest stuff. not amazing stuff
<geist> you had a bootsector working, keep going on that if you want
<geist> that was concrete, and something that *actually* intersects with this channel
<kazinsal> sit down. write out what you want to do, starting in small chunks. then code.
<geist> and please drop any of these ideas like 'i want to design a dthing and get a bunch of random people to help me'
<kazinsal> your end goal will with 100% certainty change over time.
<geist> they are a non starter, 0% chance of working, and it just annoys people. simply stop doing that
<kazinsal> ^^
<kazinsal> communal projects grow organically
<geist> it's sort of the osdev equivalent of a nigerian prince scam
<kazinsal> they cannot be forced
<geist> and no one falls for it
<kazinsal> forcing someone to work on your product for you is called involuntary servitude
<kazinsal> or in some places, an internship
<immibis> Skyz: it is sad that everything takes 10000 times longer than you wish it would
<doug16k> I always suggest pick something that you think is near your upper limit, but totally doable. then when you realize it is harder than you thought it is enough of a challenge to learn from
<immibis> it is even sadder that we don't have AIs to generate code for us when we plug a bunch of random parts together
<Skyz> Just no income atm :|
<geist> you know was thinking about that. folks have been predicting AIs will be writing code for 50 years, hasn't happened. *but* i wonder if once AI models are cheap enough to deploy if the models/neural nets/etc become a commodity itself
<immibis> regarding Artix FPGAs, it is the GTP transceivers which are not available in all packages. I think the documentation is saying all pins have SERDES
<heat> if you tried to machine learn a programmer i'm fairly sure tensorflow would give up
<immibis> geist: actually we have AI that writes code - it's called a compiler
<geist> ie, company sells a net that promises to switch N packets/sec, or something even higher level
<heat> "screw this, i'll go do biology or something"
<immibis> telling the AI which code to write is still significantly difficult
<geist> immibis: yah but i'm thinking 30-50 years out
<geist> ie, at what point do you not write code but you load up an AI and teach it to do the thing instead
<immibis> a net that promises to switch N packets/sec is just code that promises to switch N packets/sec
<geist> for at least some projects
<immibis> yes, that is called a compiler
<geist> fine. i'm trying to be more abstract here
<heat> honestly having AI everything is going to bring our society down
<geist> as in what parts of solutions in te future are less written than grown. obviously we're in the first stages of it
<geist> heat: oh possibly, indeed.
<heat> automatisation bad because advanced caveman need job and token to buy food
Arthuria has joined #osdev
<Skyz> heat: true
<geist> one would hope we would grow tools to be able to better understand how these things work
<immibis> it's not clear how fast the SERDES can go from this document, but it mentions the number 1.25Gbps. https://www.xilinx.com/support/documentation/data_sheets/ds197-xa-artix7-overview.pdf
<geist> and at least keep pace instead of 'we grew an AI to route traffic and we dont know how it works but it works 10% better than anything humans have designed'
<immibis> FPGA speed seems to always be a matter of synthesizing your design and seeing whether the synthesizer finds any timing violations
<geist> immibis: the top level thing says 6.6Gb/sec
<immibis> but i would expect to find a hard limit on fixed function blocks
<geist> but possible that's the pin speed, or whatnot
<geist> well clearl fixed function stuff already runs at those speeds, and have to 10-15 years, so there are clearly transistors that can switch that
<immibis> 6.6 is not found, but it says 6.25, but that's for the GTPs which are not available in this package
<geist> ie, SATA, USB, etc
<immibis> the question isn't how fast a fixed function block *might* run, but how fast *this specific one* can run
<kazinsal> 1.25 Gbps is the serdes speed you need for GbE iirc
<immibis> perhaps the answer is "faster than you'll ever be able to process the data"
<geist> ah possible. the noe i linked earlier may be a fnewer version
<geist> i think it was an xc7 instead of an xa7
<geist> https://www.xilinx.com/support/documentation/data_sheets/ds180_7Series_Overview.pdf for example talks about a xc7 and it seems to have a 6.6 stuff in it
<geist> so maybe there's a new line called the same artix, which may be what you bumped into with your board. may have the old artix-7s?
<immibis> arty a7 has XC7A35TICSG324 or XC7A100TCSG324 depending on whether you pay an extra $120 and wait for it to be in stock. SG324 is the package - same for both and that package has no GTP pins
<geist> that's pretty shitty of xilinx if they did
<Skyz> Not sure what I want to develop
<kazinsal> well go figure it out
<immibis> I think that number is for the GTPs. It's not exactly a lie. Note it's not even listed for the Spartan-7 as they have no GTPs
<Skyz> "Ambitious project"
<immibis> but the SERDESes are a separate thing
<geist> Skyz: honestly we cant and/or dont want to help you on that
<geist> since you have shown zero forward progress over the last few *years*
<kazinsal> yeah you can't afford my "ideas guy" rate
<geist> thus we have no reason to believe you'll ever be unstuck from your rut
<Skyz> I'm starting
<geist> you were starting 2 years ago
<geist> (or at least it feels like 2 years)
<Skyz> ehh
<geist> anyway, this is why we kickbanned you fro the freenode one. i think we're being pretty generous right now even allowing you here. dont blow it.
<geist> reminds me, we should watch out for the guy that came in, would chat about riscv, actually doing some OS stuff
<geist> and then randomly go on a racist tirade
<geist> since we're kinda blank slating the ban list now
<kazinsal> yeah
<kazinsal> once in a while we seem to get someone who's channeling the ghost of terry davis
<kazinsal> (RIP terry, walked into a train)
<geist> yah, and sadly that almost certainly means mental illness, but there's just nothing we can do really
<geist> since you can't just talk someone out of lack of medication
<kazinsal> yep
<Skyz> OSdev is a complicated task
jstoker is now known as Guest27
Guest27 has quit [Killed (lithium.libera.chat (Nickname regained by services))]
jstoker has joined #osdev
<immibis> Skyz: so which part are you stuck with?
<Skyz> Coding, and really figuring out which part to work on
<Skyz> I got some ideas started
<Skyz> but it's gonna take time
<immibis> have you got anything working?
<Skyz> Nope
<kazinsal> yeah this isn't gonna last long
<immibis> Skyz: at the very least, follow someone's tutorial so you have an idea of what's involved
<Skyz> I know
<immibis> like what's a GDT, what's an IDT, what's a page table, what's a bootloader
<immibis> just so you have some starting point
<kazinsal> side note, as a community we ought to figure out what our standard reference tutorial should be for noobs
<j`ey> immibis: Skyz can't code
<immibis> Skyz: well then learn to code. in C, which is not optional
<kazinsal> we haven't really looked at it since The Bad Tutorial kept sending us people with really badbugs
<Skyz> I intentially left out the compiler out of my mind. Coding is like juggling, but I will attempt it
<immibis> presumably the bad tutorial = bkerndev
<geist> yeah, though i do kinda wonder if that's mostly in the past. i dont think we've had too many refrences to the Bad Tutorial lately
<geist> maybe it's no longer on the top of the google list
<geist> immibis: no the malloy one
<Skyz> I want to do some tutotial evaluation
<geist> Skyz: again. focus.
<Skyz> I'm gonna learn C
<geist> every time you think about focusing you immediately spiral off into something else
<geist> yes. perfect
<kazinsal> that's a really core starting point, yes
<immibis> make sure you're really comfortable with C because there's going to be a lot of it
<immibis> if you have C questions there is a #c channel for it
sortie has quit [Read error: Connection reset by peer]
<geist> geezus, how can i take this osdev discord seriously when actual partitipants have names like 'i really have aids (i'n india)'
<immibis> ???
<geist> there's another one that's about as bad
<immibis> oh on discord
<geist> yah
sortie has joined #osdev
<kazinsal> yeah uh my general recommendation for discords is to only exist in ones that sane, functional humans you know are in
<geist> sorry to spill it over, it's just so frustraing
<kazinsal> unfortunately we have not yet found a vaccination for racism
<immibis> the vaccination is actually growing up around people from various races
<kazinsal> (nor would we be able to effectively apply it if one existed, as the people it would be used on are likely to think it will give them blood clots and ASD)
<geist> and the annoying part is there actually are kinda functional humans they just also can be edgelords
<kazinsal> yeah some people never really left early 2000s internet shock humour behind
theruran has quit [Ping timeout: 244 seconds]
paulbarker has quit [Read error: Connection reset by peer]
<geist> yah there was some sort of random discussion on edgelording that i read the other day that kinda makese sense
<geist> ie, say terrible things for attention/feelings of relevance
jakesyl has quit [Read error: Connection reset by peer]
<immibis> so they're... special snowflakes?
<kazinsal> an appreciable fraction of awful things people say tend to be projection
<geist> well, not saying t's a good thing, but there's usually some underlying psychology for most good and bad things
<immibis> (it's funny because they're the same people who mock other people by calling them snowflakes)
<kazinsal> a few generations removed from the root cause of regressive social upbringings and people become decent
SanchayanMaity has quit [Ping timeout: 272 seconds]
<kazinsal> buuuuut that being said there are also people who are just horrible for horrible's sake
merry has joined #osdev
<kazinsal> they've internalized something for so long and been in so many echo chambers that they're incapable of *not* being horrible
<kazinsal> at the risk of vaguely invoking politics chat, we saw a similar recent issue on SA where the obsessive regular posters in a thread dedicated primarily to making fun of the previous president has had so little to do since january that they moved on to echoing each other until they became convinced that a culture war was brewing on the forums and decided to start it themselves to try to pre-emptively pull
<kazinsal> out a third party win
paulbarker has joined #osdev
theruran has joined #osdev
<kazinsal> the most bizarre thing we've seen in ages and it ended up with them more or less all flaming out and either self-banning, eating bans, or eating lifetime achivement awards of "your account has had its posting privilege disabled for 100,000 hours"
jakesyl has joined #osdev
SanchayanMaity has joined #osdev
<doug16k> I started a toy project. a bios rom for qemu that does just enough to initialize pci enough to initialize vga and print hello
<geist> oh that sounds fun
<kazinsal> coreboot? nah, I run dougboot
<doug16k> was funny when the unreal mode ffff0000 base screwed me up, but had that ironed out pretty quick
qookie has quit [Ping timeout: 265 seconds]
<doug16k> as in, how the hell does jmp 0xffe00000 end up at 0x1ffdf0000
merry has quit [Quit: ZNC - https://znc.in]
<seds> geist: discord usually have a bunch of kids, i think that's the main issue
<seds> afaik, it is a gaming chat platform, so... we get what they promise haha
<seds> i feel the level of maturity changes when going from discord to irc
merry has joined #osdev
<graphitemaster> You should see BBS, it's like talking to Aristotle and Socrates on there.
<graphitemaster> No Immanuel though, he Kant use it.
<Oli> Which BBS- LOL
<Oli> You just made me curious about whether there are active communities in relevant to this channel.
<seds> when i started osdev, #osdev and the wiki was the only good resource i've found
<seds> apart from random blog posts
<graphitemaster> There are BBS chat rooms
<graphitemaster> I'm in two
<seds> also, i found a slack server once, but it was more like "we will change the world with our os"
<graphitemaster> There's like a 85 year old on one of them
<moon-child> seds: oof
<klange> The one thing missing from this ThinkPad... is onboard serial...
<seds> graphitemaster: oh wow. years ago I was very active in the python-forum. There was a guy(?) called Bill. he was definitly older than most of the peeps there, but he was like a second version of geist, but in python. Eventually he disappeared
<klange> I have a 1394 firewire port, VGA that's actually hooked up to the Intel chipset despite this being an Optimus setup, real PS/2 input devices, but no serial.
<klange> Be thankful for the people you have who are there to help you, because one day they won't be.
<doug16k> optimus always has the vga hooked to cpu. the discrete gpu dmas the frames into the igpu framebuffer
<klange> Not on laptops.
<klange> External ports were generally only available to the discrete GPU, but there were two setups.
<klange> The LVDS was always on the iGPU.
<doug16k> that's why there's no such thing as vsync on optimus laptop
<doug16k> if using discrete
<doug16k> you can turn it on but nothing happens
<bslsk05> ​web.archive.org: www.python-forum.org • View topic - I miss Bill
<doug16k> it doesn't know where the scanout is
<klange> Totally different area, but we had a guy in a webcomic community who... really wasn't that much older - 40s to our 20s - but he was iconic for some of the meta cultural stuff. Passed from heart failure six years ago. I went to his funeral.
<seds> :/
<klange> I'd never met him face-to-face but that didn't matter.
<graphitemaster> Wow
<seds> what it matter is was he left behind
<doug16k> https://en.wikipedia.org/wiki/Nvidia_Optimus "Optimus avoids usage of a hardware multiplexer and prevents glitches associated with changing the display driver from IGP to GPU by transferring the display surface from the GPU frame buffer over the PCI Express bus to the main memory-based framebuffer used by the IGP"
<bslsk05> ​en.wikipedia.org: Nvidia Optimus - Wikipedia
<Skyz> Is using vscode okay?
<doug16k> I think vscode is pretty good
<kazinsal> vscode is pretty great yeah
<kazinsal> the only issue I'm having with it these days is that they haven't exposed the fuzzy search controller to extensions
<kazinsal> so if you have an sshfs workspace that's mounted in the vscode extension (instead of actually mounted by the OS) it can't search files
<kazinsal> it's tagged as a "soon" fix in the vscode issues log
<doug16k> go Help -> Toggle Developer Tools and have your mind blown if you didn't realize the whole program is a web page
<kazinsal> yep
<kazinsal> it's websites all the way down
<kazinsal> of course now I'm having issues with the friggin' NFS client for windows
<kazinsal> think I need to reboot in order to get the client to actually turn back on
<kazinsal> I might have crashed the redirector or something
<kazinsal> aha. the redirector doesn't show up in the services console for some reason
<kazinsal> but it can be manipulated by `sc`
<Skyz> Having some issue switching from python to c
<Skyz> Gonna spend some time learning the editor
<seds> Skyz: emacs ftw
<Skyz> i've used it I like the tetris feature
<Skyz> It was supposed to be made to be an OS itself
<klange> No, it was not, that's an old joke.
<seds> it was not supposed to. emacs is actually a elisp interpreter, which happened to become an editor
<klange> Also incorrect. Emacs was a set of macros for its predecessor. It was, and always has been, intended as an editor.
<Skyz> It would be a good OS if it were standalone
<klange> I've moved on from the Editor Wars to the Post-Editor Wars era, where we teach the history of both sides in school.
<Skyz> It's a great editor
<seds> klange: oh neat
<moon-child> klange: a joke--kinda. There's an argument to be made that emacs was compensating for gnu copying unix rather than genera. And one of the predecessors to emacs was zmacs, an editor for one of the classic lisp machines
<moon-child> *gnu's
<kazinsal> heh. turns out if I make changes to my build system and try to run it too quickly, bash gets upset because the NFS lock is still in place
<klange> Emacs considerably predates the GNU concept, though; Stallman saw E at Stanford and worked with Mikkelsen on TECO to implement similar features. Emacs is the result of Stallman and Guy Steele building a large collection of macros for TECO, and "Emacs" name came from "E with MACroS" - this around '76 or so.
<klange> The Lisp machine emacs showed up after that, and then it all gets jumbled with various different Emacs implementations until we arrive back at Stallman with GNU Emacs but that's nearly a decade later.
<Skyz> The programs I'm writing are very straightforward
<Skyz> An OS needs apps
<Skyz> There's like no real need for a new general purpose os
<Skyz> I have a couple ideas how it could work
<Skyz> I was thinking of getting into app development
<Skyz> I had an app that would work for people to manage their life
Skyz has quit [Quit: Client closed]
Skyz has joined #osdev
<Skyz> It really involves time management
iorem has joined #osdev
<Skyz> It could be useful with hobby os dev
Arthuria has quit [Ping timeout: 268 seconds]
<Skyz> Actually interesting is how UNIX/C came out together