<heat>
I've been debugging loopback communication without tcpdump
<heat>
this is painful af
<geist>
usually i add some sort of trace thing that looks kinda tcpdumpy that you can turn on
<geist>
though it tends to screw up timing
<heat>
I have no obvious place for that since a good bit of my network stack runs under softirq
<heat>
and printk is a thing that may sleep
<geist>
aaah yeah
<geist>
printing from any context is hard
<moon-child>
need a waitfree reentrant thingy
<geist>
or grab a spinlock and just print away
<moon-child>
can't grab a spinlock from an isr
<GreaseMonkey>
something i'm wondering... what are the recommended ways on an IBM PC to, CPU-clock-speed-independently, do short delays for e.g. the floppy disk controller?
<heat>
moon-child, yes you can
<heat>
most spinlock impls also have a irq safe variant that turns off irqs
<GreaseMonkey>
ah hmm... how long of a delay would i expect out of that?
<gog>
is this a PC or a compatible with an arbitrary clock speed?
<heat>
some microseconds I guess
<GreaseMonkey>
yes
<heat>
I know that some ISA devices have guaranteed ways to waste time
<heat>
i.e IDE has a register that takes 100ns to read so you read it 4 times for a 400ns delay for some stuff
<geist>
moon-child: right, spinlocks are exactly the one kinda lock you can grab from an isr
<geist>
specifically because it doesn't try to reschedule if there's contention
<heat>
my printk kinda sucks right now because it has no structure
<heat>
it's just a big char buf[BIG_SIZE]; you sprintf into
<heat>
problem 2 - i have a printk and a printf. printk prints on the tty (has to hold mutexes and go through all that path), printf prints on the big char buf[]
<heat>
anyway not my problem atm
<heat>
relatively funny fact: my loopback_send_packet was just sending it straight back down the stack immediately
<heat>
this was causing obvious issues as you could run out of stack or deadlock
xenos1984 has quit [Read error: Connection reset by peer]
xenos1984 has joined #osdev
<kaichiuchi>
so
<kaichiuchi>
heat: the context you were asking for, it was *any* usage of a lambda that had a capture that I thought you needed std::function for
<heat>
oh yeah no definitely not
<heat>
lambdas are just bullshit callable objects generated by the compiler
<kaichiuchi>
right
<kaichiuchi>
that's why template<typename Callable> worked
<kaichiuchi>
now
<heat>
typename Callable will work with anything that implements operator()
<kaichiuchi>
I am heavily debating on whether or not I should install arch right now
<kaichiuchi>
it is 8:21 PM
<heat>
go for it
<heat>
i know you want to
<heat>
*palpatine voice* DO IT
Burgundy has quit [Ping timeout: 252 seconds]
<kaichiuchi>
ok
<kaichiuchi>
i will try
<heat>
i've typed so many gtest invocations today I'm more than mildly pissed at google's underscores in options
<heat>
--gtest_filter? really??
<geist>
a little surprising honestly. there's generally an anti-underscore mentality at work
<geist>
OTOH maybe it's to make it non ambiguous with switch dashes
<heat>
it just looks so wrong
<moon-child>
should be --gtest-filter
<moon-child>
seriously
<heat>
i think they just straight up screwed these ones up back in the day
<moon-child>
how is that ambiguous?
<heat>
remove any ambiguity and go with /gtest-filter :))
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
<ddevault>
getting this far required nearly all of my knowledge of toolchains and stupid bullshit
<mjg>
:]]
<ddevault>
now I have to write the rest of the bootloader, so, uh
<ddevault>
guess it's time to learn how the fuck arm works
<mjg>
[[:
<mjg>
writing a bootloader is a special kink
<ddevault>
my approach to all of my platform is that everyone else is stupid and I just want my kernel to be an ELF file
<ddevault>
all of my platforms*
<ddevault>
so this code's job is now to load my kernel proper's ELF file, plus boot modules (i.e. initrd)
<zid>
wanting a super cool environment to run your startup code in is a weird want anyway
<ddevault>
I have a similar thing in place for multiboot that just loads the kernel proper and goes away
<zid>
yea my grub multiboot setup is.. an elf loader
<zid>
and a kernel
<zid>
so it's just a question of getting the elf loader bootable on the specific system, to port it
<ddevault>
aye
<ddevault>
you and I are of one mind
manawyrm- is now known as manawyrm
<ddevault>
hrmph
<ddevault>
why do I get a syncronous exception just by doing adrp x1, _DYNAMIC
<ddevault>
is that even possible
<ddevault>
it's only for x1, too, x0 and x2 work fine
<ddevault>
wtf
<ddevault>
oh duh
<ddevault>
I am dumb dumb
<ddevault>
obviously if you trash the ABI registers then whatever uses it next is gonna flip
Brnocrist has quit [Ping timeout: 260 seconds]
<geist>
is this riscv?
<geist>
if so then yeah, x1 is the 'ra' register
<geist>
protip when dealing with riscv registers, never use the raw numbers, always use the abi name for them
<j`ey>
arm64
<geist>
only real time it's worth using the raw ones is if you are writing the context switch routine, etc
<geist>
okay. for arm64 x1 is generally pretty free
divine has quit [Ping timeout: 260 seconds]
<ddevault>
yeah this is arm64
<geist>
i guess i dont know the context of messing with x1, but if you were doing it in inline assembly without properly marking the register trashed or whatnot then that'll do it too
divine has joined #osdev
Burgundy has joined #osdev
<ddevault>
yeah I just forgot to stash it on the stack first
<ddevault>
nbd, silly mistake
epony has quit [Read error: Connection reset by peer]
<heat>
none of that PANSY ASS SMILE FOR THE SECURITY BULLSHIT UNIX IS BACK BABY
<j`ey>
then openbsd
<heat>
now you just want to piss me off
<sham1>
Yes
<kaichiuchi>
if stuff was better supported for bsd i’d run it over linux
<mjg>
i miss when this channel was friendly
<kaichiuchi>
but, alas.
<kaichiuchi>
mjg: i dunno but i can tell he’s mostly joking
<sham1>
We exist in a Linux reality
<heat>
mjg is de raadt btw
<mjg>
kaichiuchi: knowing heat he is dead serious
<sham1>
Nah, can't be Theo
<mjg>
heat: and what do you have in your basement, fritzl
<sham1>
Not enough insults
<heat>
hahahhahahahaha
<kaichiuchi>
i’m so sleepy
<mjg>
snort some fent
<sham1>
Watching cars get stuck on icy hills due to lack of traction is so satisfying when you're on foot
<heat>
mjg, wtf this fritzl guy is so sick
<heat>
sham1, why are you evil
<sbalmos>
probably because at some point he slipped on an icy curb on his feet and broke his tailbone
<kaichiuchi>
what i want to do is go home and work on my projects
<kaichiuchi>
alas i am here
<mjg>
and on tiktok
<sbalmos>
I am proudly a Nexus Of Evil, writing OS code under WSL on Win11
<sham1>
sbalmos: that too. I've also managed to get messed up cycling through this icy terrain, which forced me to consider walking
sweetleaf has quit [Quit: WeeChat 3.7.1]
fwg has quit [Quit: .oO( zzZzZzz ...]
sweetleaf has joined #osdev
<kaichiuchi>
no
eroux has joined #osdev
fwg has joined #osdev
<kaichiuchi>
i can’t believe GNOME uses wayland by default
<heat>
why not
<heat>
i'm speaking to you from wayland atm
<kaichiuchi>
are you on NVIDIA?
<heat>
intel
<heat>
(+ nvidia on the PRIME side, but that doesn't matter much afaik)
awita has joined #osdev
vdamewood has quit [Quit: Life beckons]
demindiro has quit [Quit: Client closed]
<kaichiuchi>
still scary
<heat>
dude it works fine
gxt__ has quit [Remote host closed the connection]
gxt__ has joined #osdev
<zid>
I suck at finding sedimentary layers of stone today
<zid>
(I am now a dwarf fortress pro, rather than a pro Grammer)
<heat>
"screw it, aoc sucks, i'm gonna dwarf now"
<zid>
no, I sucked
<zid>
I retired
vdamewood has joined #osdev
<epony>
you not a very big disappointment since there was no previous appointment
<epony>
cheer up, it's all good
awita has quit [Remote host closed the connection]
arminweigl has quit [Ping timeout: 268 seconds]
<alpha2023>
I wonder if anyone else has come across this -- New GCC linker warning "warning: (...) has a LOAD segment with RWX permissions". I've got it fixed on my x86 linker but aarch64 keeps lumping my segments together
<alpha2023>
I know I can suppress the warning but that seems... wrong?
<heat>
i have seen that
<heat>
you can fix it by not having RWX LOAD segments
<heat>
"EBBR systems must not provide both ACPI and Devicetree tables at the same time. Systems that support both interfaces must provide a configuration mechanism to select either ACPI or Devicetree, and must ensure only the selected interface is provided to the OS loader."
<bslsk05>
en.wikipedia.org: Server Base System Architecture - Wikipedia
<epony>
also known as "where the f*rk is the f*rking PCI bus on this f*rking sh*t f*rk"
<heat>
omg wikipedia man is here
<heat>
hi wiki man!
<heat>
i like arm64, a totally superior architecture to x86
xenos1984 has joined #osdev
<ddevault>
riscv64 is pgood so far
<alpha2023>
I miss powerPC personally...
<ddevault>
at least from sifive
<Ermine>
ddevault: do you mean the board you reviewed in your blog?
<ddevault>
yeah
<ddevault>
I can live with EFI+device trees
<gog>
y'all motherfuckers need alpha
<ddevault>
which is what I get on riscv64
<heat>
fwiw riscv64 will start to adhere to ebbr
<ddevault>
I'm gonna bomb the home of the first person to propose an ACPI standard for risc-v
<heat>
you're late
<ddevault>
gdi
<gog>
lmfao
<j`ey>
lol
<gog>
heat
<gog>
heat
<heat>
gog
<gog>
heat
<gog>
bazinga
* heat
desintegrates
<alpha2023>
unfortunately I never had alpha to play around with (despite my nick)
<gog>
me either
<gog>
i'm gonna invent the sigma architecture
<alpha2023>
fun fact: I've been using this nick in various places since like, 2012, now it's gonna be "Oh look, another <current year> name"
gxt__ has quit [Remote host closed the connection]
gxt__ has joined #osdev
<gog>
i've been using this nick since 2007
<gog>
i'm old
<epony>
arm64 on a stick, stuck to your shoe, suffed in a remote
<Ermine>
ddevault: do you have an idea of something that could take place of ACPI on risc-v64?
<epony>
deface-3
<alpha2023>
holy sh-- I fixed it
<heat>
gog, change your name to pog
gog is now known as pog
<heat>
poggers
<pog>
what
<pog>
this nick is unregistered
<heat>
TAKE IT
<alpha2023>
` . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));` between .rodata and .data segments
<Ermine>
TAKE THAT
<pog>
its
<pog>
mine
<epony>
DOS does not run on ARMputers but.. you need a DOS partition to boot it, WTF ;-)
<pog>
ARM DOS
<pog>
let's do it
<epony>
armindows running armoffice and armisual armudio
<Ermine>
ddevault: also do I understand correctly that ARM boots are less of a nightmare now with EFI? (sorry for being little intrusive).
xvmt has quit [Ping timeout: 256 seconds]
<Ermine>
pog: if there's some kind of real mode, then why not. Maybe one can run everything in supervisor mode.
eck has quit [Quit: PIRCH98:WIN 95/98/WIN NT:1.0 (build 1.0.1.1190)]
smach has joined #osdev
eck has joined #osdev
xvmt has joined #osdev
<alpha2023>
heat: https://pastebin.com/pEfFgtrQ this was the fix, basically aarch64 pages aren't 4k, so the ALIGN(4096) aint doing shit. hence need for MAXPAGESIZE align
<bslsk05>
wiki.osdev.org: Linker Scripts - OSDev Wiki
heat has quit [Read error: Connection reset by peer]
FreeFull has quit [Quit: rebooting]
<alpha2023>
thanks for all the help, being able to walk through that process with y'all helped a lot
<ddevault>
what's up with this device tree anyway
<ddevault>
the serial ports are
<ddevault>
reg = <0 addr 0 length>
<ddevault>
rather than reg = <addr length>
<ddevault>
tbf this is decompiled from the dtb
<ddevault>
oh, duh
<ddevault>
#address-cells and #size-cells are both 2
* ddevault
rolls eyes
pog is now known as pogchamp
<alpha2023>
I read the device tree spec not too long ago. It's sure dense
<kaichiuchi>
hi
<heat_>
pogchamp, pogchamp
heat_ is now known as heat
<pogchamp>
heat:
<heat>
warmth
<pogchamp>
bazinga
<heat>
bazongo
<heat>
alpha2023, but aarch64 pages can be 4k
<heat>
it seems to me that GNU ld.bfd is pooping their panties
<alpha2023>
Can be 4k yes. ld.bfd is being a shit
<heat>
it makes no sense that given 3 segments it chooses to merge them all into a single RWX segment vs splitting them up and aligning them
<heat>
I would ask around about that if I were you
<heat>
why does x86 have different behavior?
<alpha2023>
because x86 only has 4k pages
<heat>
are they assuming arm = needs to be small?
<alpha2023>
and I had ALIGN(4096) directives
<heat>
so what happens if you ALIGN(2048) instead?
<alpha2023>
align(2048) on x86 brings the warning back
<zid>
I'm too lazy to read the scrollback so I will just guess based on you throwing around align directives
<zid>
shit was smushing into page boundaries and then was unloadable without the page in the middle requiring both sets of perms?
<alpha2023>
long story short: new ld warning for WRX LOAD segment. ld was smushing everythign into one WRX segment for no reason, using ALIGN(CONSTANT(MAXPAGESIZE)) on all sections fixes it
<heat>
it noticed differing perms on page boundaries so it merged everything into a super RWX segment
<heat>
which is FUCKING BONKERS
<alpha2023>
only happens on gnu ld though, gold and lld.ld both do the right thing
<heat>
I'm mildly curious if PHDRS changes anything
<bslsk05>
pastebin.com: Using a different linker script - Pastebin.com
<alpha2023>
it infact, does work
<heat>
PRAISE BE MY BLESSED LINKER SCRIPT
<heat>
it's very amusing how it makes empty phdrs lol
<heat>
alpha2023, btw making sections that don't start in . is a capital felony
<zid>
yea I cringed and closed it
<zid>
too lazy to call the cop
<alpha2023>
gcc generated those
<zid>
it did not
<heat>
no it did not
<alpha2023>
hang on
<alpha2023>
I dont mean autogenerated
<alpha2023>
I mean I told a variable to live in a different section
<zid>
someone did __attribute__((section("module"))__ or whatever
<heat>
__attribute__(section(".modules"))
<heat>
fixed
<zid>
and they meant to do .modules
<alpha2023>
yeah, that!
<zid>
illegally did* sorry
<zid>
not meant to do
<zid>
heat: Why did no books come out today? :/
<heat>
books of what?
<zid>
books
<zid>
(shitty light novels)
<heat>
stop doing that and go read, idk k&r
<heat>
or again, something productive for the human kind, like some medicine books
<alpha2023>
so here's the thing; the sections named "modules" is named that because the linker or gcc autogenerates __stop_modules and __start_modules without me having needed to include them in the linker as sections (and it doesn't autogen if theres a pre-dot)
<alpha2023>
so yeah, laziness on my part
<heat>
"This book was typeset (pic|tbl|eqn|troff -ms) ..."
<heat>
fuck your MICRODONG WORDSHIT or your LaTeCrAp, we using troff
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<pogchamp>
typesetting
<pogchamp>
who needs typesetting
<pogchamp>
plain text is fine
<zid>
word wrap is good enough for jesus
<pogchamp>
nope
<pogchamp>
all line breaks are manual
isaacwoods has quit [Quit: WeeChat 3.7.1]
bgs has quit [Remote host closed the connection]
_xor has quit [Ping timeout: 252 seconds]
_xor has joined #osdev
sortiecat has quit [Quit: Leaving]
bauen1 has joined #osdev
smach has quit []
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
smach has joined #osdev
fwg has quit [Quit: .oO( zzZzZzz ...]
heat_ has quit [Remote host closed the connection]
heat has joined #osdev
vdamewood has quit [Read error: Connection reset by peer]