<Mutabah>
Given MS's backwards compatability standards - Windows 2's code might still hold some value to them
<epony>
for DOS/WIN 3
<Mutabah>
And really, any company releasing historically significant code is interesting
<epony>
the Lisa emulators are so important, we can hardly wait on these
<kazinsal>
Apparently the code for the original release of PostScript is on CHM now too.
<moon-child>
valuable in what sense? I mean, it's valuable for them to have it, but releasing the source code wouldn't stop their having it
<epony>
it's 40 years too late
<Mutabah>
legal/IP value
<epony>
should have been release for previous generation machine support when new come up
<epony>
yeah, fuck patents and copyright law, pirate everything!
<epony>
or much rather, don't use systems like that, so they are not important ever again
<epony>
you don't get trillion dollar worth with correct and public interest and science and technology decisions
<epony>
it's just bad designs and bad technical achievements that are into incompatibility, lack of standardisation, proprietary and secretive exploits
<epony>
so they are not "anti"-IBM, they are IBM done worse for consumers and suckers
<epony>
(and cost more and work worse)
<epony>
fall into the category of parody, consumer with incompatiblity and good chance to make a long lasting impact for computing, instead making money and models that don't work well so a new model obsoletes it
<epony>
Apple really had an advantage on cheap and low end PCs in the beginning
gog has quit [Ping timeout: 246 seconds]
<epony>
well, maybe it's like Windows 3/3.1 moreso than 2/2.1 (incomplete) but Win3 is much more successful since it came later and had more features and capability (newer and more powerful computers) and benefitted more from the DOS epoch, while Apple took the early feature on a weaker incompatible computers and then high costs too
gabi-250 has quit [Remote host closed the connection]
gabi-250 has joined #osdev
fedorafan has joined #osdev
sprock has quit [Ping timeout: 252 seconds]
sprock has joined #osdev
foudfou has quit [Quit: Bye]
invalidopcode has quit [Remote host closed the connection]
foudfou has joined #osdev
invalidopcode has joined #osdev
bradd has quit [Ping timeout: 260 seconds]
bradd has joined #osdev
<moon-child>
hmmm. How do I say 'round up to the next positive multiple of 16'?
<moon-child>
not (x+15)&~15, because then 0 rounds to 0, not 16
<bradd>
if (x % 16) x = x + (16 - (x % 16)) maybe?
<moon-child>
I might as well branch, then. Just curious if there's something clever I've missed
<moon-child>
oh, and your solution do anything with x=0 either
<Mutabah>
The branch is required afaik
<bradd>
oh. thought you wanted it aligned to a multiple of 16
<Mutabah>
If you do it after the operation, the compiler might just emit a `cmov` and it'd be basically free
<moon-child>
I would prefer a branch to a cmov
<moon-child>
context is malloc
<Mutabah>
wait, what do you mean about prefering a branch to a `cmov`?
<Mutabah>
(I mean the `cmov` instruction)
<moon-child>
cmov goes on the criticial path. Branch, if correctly predicted, does not
<zid>
!!!x<<4
<zid>
add that?
<moon-child>
if I can do malloc(0) -> malloc(16) for free, I'll do it. Otherwise I'll eat the branch earlier and do something else
<zid>
what's the difference between rounding down then adding 16?
<zid>
that should offset your sequence by 16 like you wanted no?
<moon-child>
because 16 should round to 16
<moon-child>
the only thing I want is that 0 should round to 16
<zid>
okay then what I said works
<moon-child>
!!!x<<4? Yeah but that's extra ops
<Mutabah>
Does your malloc have a block header or footer?
<zid>
well yea, it's an extra step
<zid>
you want a discontinuity
<Mutabah>
If it does, you could add the size of that then round
<moon-child>
Mutabah: nope
<moon-child>
(did consider to add an overflow canary, but it'll be optional if I do add it)
zxrom has joined #osdev
<epony>
it's very simple, using a bitmask or toggling to 1 the least significant four bits (nibble)
potash has quit [Read error: Connection reset by peer]
<epony>
you people with your mini-divisors
potash has joined #osdev
fedorafan has quit [Ping timeout: 256 seconds]
fedorafan has joined #osdev
<zid>
Bytes? In my cache? It's more likely than you think.
bgs has joined #osdev
<sham1>
Bytes? How very unstructured
<geist>
bytes are a crutch
<kazinsal>
three groups of six bits per word or gtfo
<geist>
octets are for children
<kazinsal>
good enough for the PDP-7, good enough for anyone
<geist>
hextets ftw
heat_ has quit [Ping timeout: 256 seconds]
<epony>
on the wrong kind of machines you shift left, on the right kind of machines you shift 3b
<epony>
in the better programming languages, that is machine independent, in the worse programming languages you really have no access to the hardware so you need real ones to do your work
<epony>
of which you obviously know nothing
<epony>
so all kinds of contraptions are invented ;-) but expect to find an instruction in the listing of the machine instructions that does that
<epony>
might optimise away a whole block of code and a couple of fake languages
<dinkelhacker>
I mean even in the _real_ languages the compiler will optimize away many blocks of code^^
<epony>
only if you're the same level of stupidity as the one that the compiler knows how to deal with
<dinkelhacker>
Like I vividly remember my colleagues face when I told him that he had to debug his code with -O2 bc. it wouldn't fit in the target otherwise. Like for every 20 lines of c code 1 line of asm was left.
<geist>
yah thats frequently a real issue with embedded targets
<dinkelhacker>
epony: which most people are..
<epony>
if only you could pick your colleagues.. by working at the correct job / facility
<dinkelhacker>
including myself sometimes I guess^^
<dinkelhacker>
geist: yeah 1 MB of internal RAM wasn't enough...
lockna has joined #osdev
ElementW has quit [Quit: No Ping reply in 180 seconds.]
ElementW has joined #osdev
sprock has quit [Ping timeout: 256 seconds]
fedorafan has quit [Ping timeout: 246 seconds]
dutch has quit [Ping timeout: 256 seconds]
sprock has joined #osdev
dutch has joined #osdev
fedorafan has joined #osdev
heat_ has joined #osdev
heat_ is now known as heat
foudfou has quit [Ping timeout: 255 seconds]
<heat>
i am back
<heat>
my cat left my chair
foudfou has joined #osdev
eroux has quit [Ping timeout: 256 seconds]
<clever>
ive been building some arm code for the GBA, and ive noticed, gcc is using the `b` opcode to call functions, but the GBA encourages use of thumb mode
<clever>
ive also noticed the linker generating wrapper functions, to switch modes
<clever>
what determines if gcc uses b or bx?
eroux has joined #osdev
<zid>
-mthumb :P
<clever>
zid: the problem is the inter-op
<clever>
if i compile one .o in arm mode, and its using b
<clever>
and then another .o in thumb mode
<clever>
and i link them together
<clever>
`b` is not the right opcode to cross over
<zid>
it knows based on the low bit of the address doesn't it
<zid>
does it not check?
<clever>
the bx opcode does, branch and exchange
<clever>
but the b opcode isnt even capable of holding that low bit
<clever>
the bit is just missing
<clever>
the linker is aware of it, but its too late to change the assembly
<zid>
you can also erm, -mthumb-inerwork
<clever>
`b` takes an immediate pc-relative offset, with bits 0/1 missing
<clever>
so a single 32bit opcode is enough to jump +/- 8mb
<clever>
but `bx` instead takes a register, and uses the low bit to determine if its arm or thumb
<zid>
also mcallee-super-interworking
<clever>
so you need a 2nd opcode to load that addr
<zid>
which makes all functions arm but they b +1 or something at the start
<clever>
and then a .word to hold the addr
lockna has quit [Quit: lockna]
<clever>
trying those 2 flags...
fedorafan has quit [Ping timeout: 252 seconds]
eroux has quit [Remote host closed the connection]
<clever>
with -mthumb (but one function is forced to arm mode), i see bl being used for every call, from both arm and thumb mode, and bx being used for returns
<clever>
the same if i omit it, and it defaults to arm
<bslsk05>
arstechnica.com: A history of ARM, part 1: Building the first chip | Ars Technica
<clever>
let me try one other thing, that i expect to horribly break it...
<clever>
*facepalm*
<clever>
i was going to remove -mcpu= to trick it into using blx
<heat>
reject thumb, embrace jazelle
<geist>
note this is somewhat why in LK i removed v4 and v5 support (and v6 really). i got tired of dealing with some of this legacy nonsense. by v7 the thumb2 support was a nice complete solution
<clever>
-mcpu= is already missing, i forgot to include it in the gcc args, lol
<geist>
if you dont want to pick a cpu you can also use -march=armv5, etc
<clever>
i had been considering re-adding it, but as a new arch, so it couldnt conflict too heavily
<clever>
just so i can run LK on more crazy things
<bslsk05>
github.com: armemu/cp15.c at master · travisg/armemu · GitHub
<geist>
yep, i remembered correctly
danilogondolfo has joined #osdev
lockna has joined #osdev
<heat>
rookiest mistake there is: info mem on a KASAN'ed kernel
<heat>
yesterday I realized I have continuously left .rodata executable
<heat>
which sux
<moon-child>
lol
<heat>
wait until you find out this is the default toolchain behavior for microsoft linkers
* geist
beats heat with the proverbial wet noodle
<heat>
noooo not the proverbial wet noodle
<heat>
geist, my x86 entry code is 700 LoC vs riscv's 80 :v
<heat>
and defo not yet finished :(
<geist>
opensbi does all the work
<geist>
all hail SBI
<geist>
for all your doings of things
<heat>
not that you really have that much work do you
<heat>
getting dropped onto M mode is still a relatively trivial condition you can easily bootstrap out of
micttyl has joined #osdev
GeDaMo has joined #osdev
<geist>
yeah indeed. as i generally tell people, riscv is almost comically simple
<geist>
especially after coming from armv8
<micttyl>
please don't bring over-complicated mess from old architectures
<heat>
arch/x86_64/realmode.S:78:5: error: ambiguous instructions require an explicit suffix (could be 'jb', or 'jl')
<heat>
j .
<heat>
llvm as errors are miles off of binutils'
<micttyl>
don't get confused simplicity with personal familiarity
gog has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 252 seconds]
lockna has quit [Quit: lockna]
<geist>
huh, i never though j was an appropriate pseudo isntruction on x86 anyway. always used jmp
<heat>
it's not, it was a typo
<heat>
well, in this case the error is slightly misleading
<dinkelhacker>
I'm looking at the dts qemu genreated (arm64, virt). According to the dts the timer interrupts are interrupts = <0x01 0x0d 0x104 0x01 0x0e 0x104 0x01 0x0b 0x104 0x01 0x0a 0x104>;. I thought if the first value is non-zero that means its an SPI. Shouldn't the timer irs be core local an therefore be PPIs?
<bslsk05>
geekz.co.uk: Hyper Threading – Everybody loves Eric Raymond
<heat>
nope, too old, made by oldies
<mjg>
generational gap right there
nyah has joined #osdev
<heat>
the only linux memes I'll ever enjoy are the meta-memes of laughing at linux people
<heat>
hear that, wincuck?
<heat>
FreeBShitDickuck
<heat>
use gnuuuuuuuuuuuU!1111111!!!11111111
<mjg>
you clearly want a polish joke so here it is
<mjg>
'gnu' gets "jokingly" expanded as Gówno Nie Uzywac
<mjg>
which translates roughly to "shit, don't use"
<heat>
oh no, not the polish jokes
<heat>
everybody gangsta until eastern european humor shows up
<mjg>
what do you think about the following:
<mjg>
schrodinger's cat goes to visit a doctor... and it does not
<heat>
nerd humor, straight out of the big bang theory
<mjg>
dude what
<mjg>
if they have this joke, that's a massive slap in the face for me
<heat>
why
<heat>
this is the sort of unfunny joke they would try to pull off, but with a worse delivery
<mjg>
bbt predominantly has jokes which boil down to "look at social ineptitude"
<mjg>
well i found it funny, you genz!
<heat>
also cats don't willingly go to the vet
<sham1>
To me, this meta-discussion made the joke funny
<sham1>
Nice
<ddevault>
FOSDEM slots secured :D
<heat>
mjg, bbt has jokes that boil down to social ineptitude and *doing a physics joke and laughing super hard about it* is exactly the kind of shit they would pull
<bslsk05>
lwn.net: Kernel code on the chopping block [LWN.net]
<kazinsal>
I wonder how much profit lwn makes
<heat>
little? it's very affordable
<heat>
btw tl;dr of that article, debian sucks stop using debian
<kazinsal>
32 million desktop linux users as of latest steam survey, assuming 0.01% of them are LWN subscribers at nine bucks a month per...
<kazinsal>
that's what, just shy of $300k/mo?
<heat>
32 million desktop linux users? (X) Doubt
<kazinsal>
that's what steam survey says
xenos1984 has quit [Read error: Connection reset by peer]
<heat>
where? I can only see percentages
<kazinsal>
a hundredth of a percent of desktop linux users seems like a pretty reasonable figure for the kind of dorks who want to know when bungomarks-devel-khttpd gets mainlined
<kazinsal>
and argue in the comments on a very specialized version of hackernews
<mjg>
heat: shitty article
<GeDaMo>
Most popular Linux distro "SteamOS Holo"
<kazinsal>
the insufferable level of dork will tell you that linux is used by four billion people due to the proliferation of inexpensive androids
<GeDaMo>
Would that be the Steamdeck?
<mjg>
heat: "computer necrophiliacs" quote from the itanium guy did not make it in
<heat>
mjg, lmao
<kazinsal>
but realistically 30 million or so seems accurate
<moon-child>
:\
<heat>
GeDaMo, yes, steamdeck
<heat>
if your linux numbers have the steam deck they are heavily skewed
<kazinsal>
eight billion people on this rock, a tenth of them being vaguely tech savvy, a hundredth of those being dorks, a third of those being linux on the desktop goobers
<kazinsal>
GeDaMo: I love that the largest proportion of linux version there is Other because the overwhelming majority of Linux On The Desktop 2023 duders don't fit in the top 8 distros
<kazinsal>
and for some reason at least one distro reports itself as Freedesktop.org SDK 22.08 (Flatpak etc
<kazinsal>
I guess `cat /etc/*release | head -1` was too difficult
<heat>
ok, conclusions: a quarter of those linux users are not linux users; stop using manjaro; stop using manjaro, 2; linux people's hardware is always worse than windows people's
<mjg>
use debian
<mjg>
on itanium no less
<mjg>
i demand phones running itanium
<heat>
YES
<heat>
LFG
<heat>
mjg, you know there was a prototype of a mobo that supported IA32 and IA64 at the same time right?
<heat>
like literally 2 architectures running at the same time
<heat>
we should bring that back, just saying
<gog>
why not just have the IA32 running on a PCI card
<kazinsal>
win11 seems to be growing in user base. guess I oughta GPT convert my boot disk and join 'em
<gog>
kazinsal: don't
<gog>
10 is fine
<heat>
do
<mjg>
heat: wut
<heat>
windows 11 is better than 10
<gog>
i hate the way it looks
<mjg>
95 is bigger than 11
<mjg>
just sayin
<kazinsal>
kinda curious as to if upgrading to 11 on my 7700X will improve my framerates in DX12 stuff
<heat>
gog, I love the way it looks
<heat>
what shall we do now
<gog>
fight to the death
<kazinsal>
EVE and COD mostly
<heat>
mjg, wut wut
<kazinsal>
I inhabit two opposite ends of the gamer spectrum
<kaichiuchi>
hi
<heat>
kazinsal, you know, what you really should be using, is linux
<kazinsal>
on one, grognard playing space sociopath simulator. on the other, brain disengage and playing honky-in-the-middle-east sociopath simulator
<zid>
Oh dust was shut down in 2016, til
<kazinsal>
yeah dust died when the PS3 did
<gog>
factorio is the only game that needs to exist
<kaichiuchi>
i bought a new keyboard, right?
<kaichiuchi>
and I hate it
<heat>
ok
<gog>
heat you should join my factorio game
<heat>
use your mouse and a virtual keyboard
<zid>
wow
<zid>
I don't get invited but heat does
<heat>
oh wait its linux you probably have none
<gog>
zid you should join gtoo
<kazinsal>
I got an NDA signing request a month and change ago from CCP regarding an EVE FPS tho
<kaichiuchi>
it's an excellent keyboard for everyone who isn't a programmer
<zid>
what version are you on
<kazinsal>
so hopefully new EVE MMOFPS soon
<gog>
latest stable
<kaichiuchi>
you need to hold Fn for basically everything
<zid>
ah okay I cannae play then
<gog>
dang
<zid>
unless latest is .79, I think I have that
<heat>
gog, i don't know what factorio is
<gog>
fuck off you liar
<GeDaMo>
I think it's a video game :|
<zid>
I've been playing .74 cus that's the version that space explo needed
<heat>
it looks very old school
<heat>
kind of cringe
<zid>
heat thinks games are bad if they don't have grass and men in shorts
<zid>
althetic men, with strong legs
<mjg>
heat: have you ever used windows 95?
<heat>
mjg, yes
<mjg>
the 9x family was famously unstable
<zid>
gog: turn auth off and tell me login
<mjg>
to the point where even fanboys were not claiming otherwise
<kazinsal>
focusing on leg day to be a proper gamer
<heat>
mjg, i was wutting to your wut
<zid>
95 was kinda stable
<kaichiuchi>
i really liked 2000/XP
<zid>
98 was less-so because.. more random hardware with shit chinese drivers existed by that point :P
<mjg>
heat: wut re itanium and i386
<zid>
WHQL now exists for a reason
<mjg>
bro
<heat>
mjg, yeah it existed internally
<mjg>
zid: lemme tell you my adventure with windows 95
<zid>
nah
<mjg>
zid: it literally stopped booting out of nowhere
<zid>
tell me login for factorio
<zid>
ip pls
<kazinsal>
if I have to boot an operating system for non work purposes that's older than 15 years old I boot up a new 86box VM
<kaichiuchi>
still kinda remarkable how much old tech is still used
<heat>
fork() moment
<kazinsal>
and if someone's telling me to boot up a > 15 year old operating system for work I'm calling an account manager with a bunch of short and angry words prepped
<kazinsal>
up until a few years ago Vancouver's train system was running on second generation SelTrac images
<heat>
braille.
<zid>
do you need [::1]:1
<zid>
for ports in ipv6
<zid>
or can you legit do ::1:1
<heat>
you need them I think
<zid>
omg does ipv6 support the decimal notation that ipv4 does
<zid>
so I can use a giant integer for my ip
<zid>
2001^256 or whatever
<zid>
400 digits long
<kazinsal>
700 thousand people per day riding on an automated train powered by OG pentiums and 3.5 inch floppies
<mjg>
:[
<heat>
mjg, is that PESSIMAL
xenos1984 has joined #osdev
<mjg>
heat: does not SCALE
<kaichiuchi>
kazinsal: yeah...
<kazinsal>
I am a daily commuter using that system
<mjg>
there was an airport which in 2010 was still on windows 98
<mjg>
i don't know what's goin on there now
<kazinsal>
and one of the reasons I have long placed my trust in it is because my uncle wrote a good chunk of it :P
<heat>
mjg, those systems are ideal for OpenSSL
<heat>
erm, what
<kazinsal>
so y'know if I die because the train explodes it's his fault
<heat>
OpenBSD
<heat>
also OpenSSL, they go hand in hand. probably written in the same year
<mjg>
kazinsal: gonna let him know after the fact
<mjg>
heat: "open" is an old african word for "crap"
<kaichiuchi>
I'm getting an SGI workstation very soon
<kazinsal>
he was an early adopter of it
<heat>
FreeBSD is a crap-source operating system
<zid>
my ip is 1365630351 btw
<mjg>
heat: show some respect for distinguished scholars who wrote it
<kaichiuchi>
as someone who has been playing with freebsd on the desktop lately
<kazinsal>
then he moved to toronto but he's planning on coming back and is looking forward to using it in retirement and yelling at his ex-coworkers when things aren't working right
* kaichiuchi
gently scolds heat
<heat>
like phk, pronounced "phuck"
<heat>
using freebsd????
<heat>
not even freebsd developers use that
<kaichiuchi>
i've been using freebsd for a long time for server stuff
<kazinsal>
paul hungry kamp
<moon-child>
lol
<zid>
I told you my ip, why are you not hacking me
<heat>
i'm pinging you
<heat>
zid, give me ssh
bauen1 has joined #osdev
<kazinsal>
bombarding your IP with thousands of streams of femboy breeding ASMR
<heat>
zid, ok I almost got an ISO, but i have no boot/grub/stage2_eltorito
<zid>
there I copied you one
<zid>
fun trick, `file` knows how it was compiled wrt the config filename it wants
<zid>
no idea *why* it knows that, but it does, and it's useful
<heat>
still doesn't work
<heat>
fuggit
<heat>
you get the idea
<zid>
do I? idk what you did
<heat>
iso.sh needs something to put the iso together
<heat>
scripts/iso.sh iirc
<zid>
so can I delete all this now
<zid>
if you're done
<heat>
kernel/vmonyx is the kernel, initrd.tar.zst is an image of the full system
<heat>
no, just like I did of boros
<heat>
never deleted it
<heat>
s/of/for/g
<zid>
that system has crippling disk space issues
<zid>
because I refuse to reinstall it on a bigger vmdk
<clever>
zid: you should be able to resize a vmdk
<zid>
but then I need to resize the fs
<zid>
and I can't do that either
<clever>
why not?
<zid>
autism? idk
<clever>
what fs is it?
<zid>
heat what fs is it
<heat>
what fs is what
<sham1>
Seems that the inability to resize it is a you-problem
<zid>
yes
<zid>
I didn't say it was clever's fault wtf
<gog>
who
<zid>
gog is an owl now
* gog
spins her head 180°
<zid>
same
SGautam has joined #osdev
<zid>
*crunch*
epony has quit [Read error: Connection reset by peer]
foudfou has quit [Quit: Bye]
craigo has joined #osdev
craigo has quit [Read error: Connection reset by peer]
craigo has joined #osdev
genpaku has quit [Remote host closed the connection]
genpaku has joined #osdev
<kaichiuchi>
gog: we have chili
<kaichiuchi>
come to america
heat has quit [Ping timeout: 256 seconds]
foudfou has joined #osdev
gog has quit [Ping timeout: 256 seconds]
nisa has quit [Ping timeout: 260 seconds]
heat has joined #osdev
Matt|home has joined #osdev
srjek has joined #osdev
epony has joined #osdev
awita has joined #osdev
nisa has joined #osdev
awita has quit [Quit: Leaving]
<zid>
maan, 84 copper miners and I still ain't got shit for circuits, gating mining prod behind space sucks
gog has joined #osdev
<gog>
kaichiuchi: i'm not going back there
<gog>
scary place
<clever>
zid: on my SE map, i added LTN, and i had a blueprint for a train station, that could both request resources (constant combinator) and supply resources (excess stuff)
<clever>
i would pop one of those outposts by every ore field, and set it to request miners/belts/poles, and create another ltn station offering only ore
<clever>
another mod, auto-deconstructs miners as they run out
Burgundy has joined #osdev
<gog>
clever: nested blueprints?
<clever>
so LTN would then recycle those miners into the next outpost
<clever>
gog: just manually pasted blueprints
<gog>
ah ok
<clever>
one for the outpost, which had a roboport and could request materials from the core
<clever>
then with SE sat nav mode, i could change the constant combinator and paste down more blueprints
<clever>
and the outpost would build itself
<clever>
and it could also auto-repair
<clever>
each outpost also kept an artilery turret, and kept a stock of ammo, so biters where kept at a good distance
<clever>
gog: do you remember those warehouse mods in factorio, where its bigger on the inside?
<zid>
It's using 3 sets of boilers already cus it's an isolated outpost :P
<clever>
zid: oh, that reminds me, i wanted more power, so i went to a website, and grabbed a random nuclear reactor
<clever>
after building it fully (took days) and looking at the map, i realized a mistake
<zid>
a.. website? what?
<clever>
the reactor, was 3x bigger then my base
<zid>
than
<zid>
I'm still on my starter-starter base
bauen1 has quit [Ping timeout: 260 seconds]
<zid>
I will upgrade it to being a starter base at some point
bauen1 has joined #osdev
bgs has quit [Remote host closed the connection]
<dinkelhacker>
how do you guys configure which drivers should go in a certain build? autotools? Asking for a friend^^
<gog>
clever: yeh factorissimo
<zid>
all of them?
<zid>
doubt many of us are fancy enough to not just do that
<clever>
gog: thats using a feature in factorio where you can have multiple surfaces, and teleport freely between them
<clever>
gog: SE basically just creates 2 surfaces per planet/moon, one for the surface, and one for in-orbit
<clever>
and to progress thru the tech tree, you need ores that are on other bodies
<gog>
ah neat
<zid>
'teleport' as in, very expensive and complicated passenger/cargo rockets
<zid>
but you don't get to use bots
<zid>
or mining eff
<zid>
because it's behind space science
<dinkelhacker>
zid: right.. and at runtime you just parse the dtb? Since I haven't implemented that I'll think I have to do some #ifdef bla
<froggey>
just play seablock. no mining, no prod problems
<clever>
dinkelhacker: yeah, if you parse the dtb at runtime, and have drivers for all chips, you target, then one kernel will work on all chips
<zid>
froggey: I started a seablock, and decided the loop was annoying but I liked the technology, so I just played it on a normal map :D
<clever>
froggey: SE core mining can do the same thing
<clever>
froggey: big-ass drill, that hollows out the planet (turns power into ore)
<zid>
It failed lategame though once of the recipes was unbalanced, some purple ore and aluminium came out together and I just had to trash millions of it
<clever>
the ore it produces, is based on the local ore mix
<zid>
also the fucking sodium hydroxide shenanigans fml
<zid>
I really enjoyed piping metal fluids around rather than using belts though
<clever>
dinkelhacker: compatible="arm,pl011"; tells you which driver to use (its a \0 seperated array of many aliases), reg= tells you the addr and size of the IO window you need to map, but the ranges= up on line 717 tells you to map 7e over to fe
<froggey>
nearly done with seablock, dunno what I'll move on to next
<zid>
froggey: done krastorio yet?
<froggey>
nope
<zid>
It's polished but not super intense
<zid>
you can smash through it and enjoy it
micttyl has quit [Quit: leaving]
<froggey>
lol, alright
<clever>
dinkelhacker: with just basic recursion, handling of #address-cells, #size-cells, and ranges, and a compatible->driver table, you can support basically any non-dma device, with support for dma-ranges, dma devices will also work
<zid>
some custom buildings and processes, but very little added bullshit
<froggey>
fuck sodium hydroxide, we all hate it
<zid>
SE is 1000% on the bullshit meter
<zid>
sodium hydroxide is 50%
<zid>
vanilla 0%, krastorio 5%
AFamousHistorian has quit [Ping timeout: 260 seconds]
<zid>
krastorio is like.. bigger vanilla?
<froggey>
I played SE ages ago, fucked up my base design and burned out once I got to space
<zid>
I just built a cargo rocket pad
<zid>
now I need.. 100 rocket parts, and none of those things are on belts yet
<bslsk05>
github.com: lk-overlay/platform.c at master · librerpi/lk-overlay · GitHub
<dinkelhacker>
clever: Thx. Thanks for the hint on the ranges. I was always confused why they put the "legacy addresses" into the dts. Btw: Is there something similar to the dtb that tells a kernel its load address?
<clever>
dinkelhacker: i think the simplest way to get the load addr, is to just peek at pc, or use a pc-relative label opcode
<clever>
dinkelhacker: i forget which opcode, but there is a way to just do `mov r0, foo` and put a `foo:` at the start, and if you use the right variant of the opcode, it will be stored as a pc-relative offset, not an absolute addr
<zid>
who needs device trees for finding more than the busses
<clever>
so it always returns the actual addr `foo:` wound up at in ram
<clever>
dinkelhacker: ranges= opens up new fun, the rpi allows you to move the MMIO window to basically 63 different spaces, at 16mb increments, and by just changing the ranges= field only, i can fix the entire DTB
AFamousHistorian has joined #osdev
<dinkelhacker>
interesting...
<clever>
zid: yeah, you could just query the ranges and not much else, and then assume the hw is at the offsets you expect, but you will have to recreate that code on each board
<zid>
the hw is on a pci-e bus or doesn't exist*
<clever>
but with dtb parsing, assuming the uart clock is initialized, you could in theory boot your kernel on anything with a pl011, and get debug, without having added support for the board
<zid>
what is this, 1998
<clever>
zid: the gigabit ethernet on the pi4 isnt in pci-e, the uart's arent in pci-e, the 3d core isnt in pci-e
<zid>
it's not my fault the pi is bad
<dinkelhacker>
xD
<clever>
nearly every arm device does this
<clever>
a lot lack pcie entirely
<zid>
It's not my fault nearly every arm device is bad either
<dinkelhacker>
I was gonna ask: what IS actually in pci-e on the pi?
<heat>
my cat stole my chair again
<heat>
see you tomorrow
<clever>
dinkelhacker: the pi4 has a single pcie lane, that goes to the vl805 pcie<->usb3 controller
foudfou_ has joined #osdev
<clever>
you can get the vl805 in a pcie card format, for desktop use, those have 4 x usb3 ports
<clever>
but the pi4 is wired up as 2 x usb2 + 2 x usb3
<clever>
i dont think pcie 1x has enough bandwidth to drive all 4 at once, at usb3 speeds
foudfou has quit [Ping timeout: 255 seconds]
<dinkelhacker>
clever: that's good to know. I'll hope it will help me the day I'll try to hook up a keyboard to my "os"
<clever>
dinkelhacker: the pi4 has 3 usb controllers you can pick from
<clever>
the crusty old dwc2 usb controller from past models, is still present, and routed to the usb-c port
<heat>
doesn't the cm4 even have nvme?
<clever>
so you can do both host and device roles
<clever>
heat: the cm4 just exposes that 1x pcie lane, the official IO board gives you a standard pcie slot, the user can then add nvme if they want to
<clever>
the firmware also supports booting from nvme, but only if its directly on that 1x lane
<clever>
pcie expanders break the firmware bootloader
<dinkelhacker>
clever: so the usb ports are controllable through either of them o.O? Is it somehow muxed or how does it work?
<clever>
dinkelhacker: but if you add otg_mode=1 to config.txt, youll instead get a broadcom xhci controller, host only, on the usb-c port
<clever>
the dwc2, and the broadcom xhci, share the usb-c port with an internal mux
<clever>
the main 4 type-a ports, are exclusively for the vl805
<clever>
the broadcom xhci has better cpu usage, but is host only
<clever>
the dwc2 has worse cpu usage, but can do both host and device
<clever>
the vl805 is also xhci, so you could drive both the usb-c and the usb-a's with a single xhci driver, giving you 5 ports total
Ameisen has quit [Quit: Quitting]
<clever>
and qemu also has xhci, both emulated i believe, and pcie forwarding from your host
<clever>
so you can prepare for xhci far more easily
<clever>
and the docs are freely available
<clever>
the dwc2 docs, arent freely available
Ameisen has joined #osdev
<dinkelhacker>
gottcha! xhci it is! :)
<clever>
you also really want to respect dtb, when talking to the broadcom xhci
<clever>
if you dont set otg_mode=1, and try to poke the broadcom xhci, the whole system just locks up hard
<clever>
otg_mode=1 updates the dtb, to tell you its safe to poke it
<clever>
the vl805 xhci is missing from dtb, you discover it via standard pcie enumeration
<clever>
the dtb instead tells you how to setu the pcie controller
<clever>
the mux, to switch between dwc and xhci, is also undocumented
sebonirc has quit [Remote host closed the connection]
<clever>
you just have to edit config.txt, reboot, and let start4.elf do its thing
sebonirc has joined #osdev
<dinkelhacker>
okay so let me recap. you set that in config.txt, that will give me 1x xhci on the usb-c and 4x on the usb-a's. All host only?
<clever>
yep
<dinkelhacker>
Cool!
<clever>
the usb-c port is also usb2 speeds max
<clever>
dinkelhacker: from memory, you setup 2 rings (master in and out) in ram, and you put the address of them into some MMIO in the xhci, then all master commands are done by appending to the ring, and whacking a doorbell
<clever>
the xhci controller will then read the ring in ram, and perform each action
<clever>
there are then many layers of rings, for each port, and endpoint, and the master ring is used to set those up
[itchyjunk] has joined #osdev
<dinkelhacker>
ring = ring buffer?
<clever>
yeah
<clever>
each command in the ring, has an is-valid bool, but 1 is not always valid
<clever>
the "valid" state changes, on each loop around the ring
<clever>
and the last command in the ring, is a special goto, that jumps to the start, and inverts what state is "valid"
<clever>
so all old commands in the ring, become invalid, until you overwrite them with new ones
<zid>
yeaa it should just flip the valid bit
<clever>
thats a nice trick, that lets you reuse the ring, without having to pre-clear ahead of where the xhci is reading
<zid>
until you get out of sync on what thing valid is due to a race condition
<zid>
and fuck it all
<clever>
or a hardware bug in the xhci controller causes a fifo to overflow, and it doesnt reset the read pointer correctly
<clever>
so it repeats the last 512 bytes worth of data
<dinkelhacker>
I'll have to store the logs of this somewhere for reference once I'll get there^^
<zid>
YOu may have noticed, but clever likes to take a topic and just run with it and info dump
<zid>
if he happens to know about something related
<clever>
let the flood gates open!
<dinkelhacker>
I highly appreciate that!^^
<dinkelhacker>
(Although I don't understand everything just now)
<zid>
Someone say tetra or stack or something
<zid>
I need to write a 20 page essay on tetris
<GeDaMo>
For why, zid, for why? :|
<zid>
GeDaMo: So I can educate dinkelhacker ofc
<clever>
bbl
micttyl has joined #osdev
gog` has joined #osdev
gog has quit [Quit: Konversation terminated!]
xenos1984 has quit [Ping timeout: 256 seconds]
xenos1984 has joined #osdev
sebonirc has quit [Remote host closed the connection]
sebonirc has joined #osdev
bauen1 has quit [Ping timeout: 246 seconds]
gog` has quit [Read error: Connection reset by peer]
vin has joined #osdev
<vin>
How is everyone holding up today? Seems like a bleak winter
<sham1>
It's great! Not so annoying to get around when compared to years with loads of snow. Also keeps the electricity costs (relatively) down alongside gas demand
AFamousHistorian has quit [Ping timeout: 256 seconds]
gog has joined #osdev
heat has quit [Ping timeout: 252 seconds]
AFamousHistorian has joined #osdev
<dinkelhacker>
where are you guys acutally located?
heat has joined #osdev
<vin>
sham1: I meant both figuratively and literally. Finally got some fresh snow yesterday so I am excited about that but I see soo many layoffs and am bummed and feel sad for people
<gog>
nowhere
<kof123>
northern hemisphere, early 21st century </fuzzy clock>
<kof123>
* century[20]
<gog>
69°N, 42.0°W
<dinkelhacker>
We don't have much snow here in southern germany this year. Like 10 days at most.
<GeDaMo>
Scotland
<vin>
It's the warmest January in recorded history here in US
<gog>
we have a lot of ice rn
<gog>
but it's vv warm today and everything is melty
<gog>
kinda sloppy and dangerous tbh
<vin>
I haven't skied at all this season :/
<gog>
we still have good skiing. i don't ski tho
<vin>
I hope this winter is an anomaly
<gog>
i guess i could check the bookings for the local ski resort to gauge how busy it is :P
xenos1984 has quit [Ping timeout: 256 seconds]
<vin>
Yes, I plan on going next week. Doesn't matter if it's icy!
xenos1984 has joined #osdev
micttyl has quit [Quit: leaving]
zxrom has quit [Read error: Connection reset by peer]
FreeFull has joined #osdev
zxrom has joined #osdev
vin has quit [Remote host closed the connection]
bauen1 has joined #osdev
fedorafan has quit [Read error: Connection reset by peer]
fedorafan has joined #osdev
foudfou_ has quit [Quit: Bye]
foudfou has joined #osdev
elastic_dog has quit [Ping timeout: 256 seconds]
elastic_dog has joined #osdev
bauen1 has quit [Ping timeout: 268 seconds]
bauen1 has joined #osdev
srjek has quit [Ping timeout: 252 seconds]
elastic_dog has quit [Killed (erbium.libera.chat (Nickname regained by services))]
elastic_dog has joined #osdev
<FireFly>
dinkelhacker: hey now, we have snow in southern germany right now at least :p
epony has quit [Remote host closed the connection]
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
fedorafan has quit [Ping timeout: 256 seconds]
fedorafan has joined #osdev
SGautam has quit [Quit: Connection closed for inactivity]
gildasio has quit [Ping timeout: 255 seconds]
danilogondolfo has quit [Remote host closed the connection]
gildasio has joined #osdev
Burgundy has left #osdev [#osdev]
terminalpusher has joined #osdev
dude12312414 has joined #osdev
gxt has quit [Ping timeout: 255 seconds]
gabi-250 has quit [Ping timeout: 255 seconds]
gabi-250 has joined #osdev
foudfou has quit [Ping timeout: 255 seconds]
foudfou_ has joined #osdev
gxt has joined #osdev
Gooberpatrol66 has quit [Remote host closed the connection]
_xor has quit [Read error: Connection reset by peer]
_xor has joined #osdev
srjek has joined #osdev
Burgundy has joined #osdev
invalidopcode has quit [Remote host closed the connection]
invalidopcode has joined #osdev
bauen1 has quit [Ping timeout: 246 seconds]
bauen1 has joined #osdev
terminalpusher has quit [Remote host closed the connection]
AFamousHistorian has quit [Ping timeout: 256 seconds]