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
gog has quit [Ping timeout: 264 seconds]
vdamewood has joined #osdev
gog has joined #osdev
<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
<moon-child> sure
<moon-child> waitfree is sexier though
<gog> GreaseMonkey: 8253 pit
<heat> __asm__ __volatile__("outb %%al, $0x80" ::"a"(0) : "memory");
<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 :))
<heat> ... or /gtest/filter
<moon-child> ._.
immibis_ has joined #osdev
<heat> click learn more mate
<kaichiuchi> also
<kaichiuchi> would you think me a heathen to just use EFISTUB
<heat> not really
<heat> why would you
<kaichiuchi> for the life of me i don’t understand grub anymore
<kaichiuchi> EFI can load shit directly
<kaichiuchi> so… just… do that
<kaichiuchi> all i ever hear is grub, systemd-boot or rEFInd
<heat> i like grub
<moon-child> what's efistub
<moon-child> efi bootloader?
<heat> no
<heat> it's a simple efi bootloader stubbed on top of vmlinuz
<moon-child> so it is an efi bootloader
<heat> no, because it's part of the kernel itself
<heat> literally (as in vmlinuz) and figuratively (as in the project)
<heat> it's not much of a bootloader as it is a thing that loads the kernel
<heat> (which is why it's called a stub and not a bootloader)
<heat> it's similar to what the traditional decompressors do
FreeFull has quit []
TkTech has quit [Ping timeout: 252 seconds]
Matt|home has joined #osdev
<geist> i think the green thing is some schtick about using peer to peer transfers of windows updates
<heat> you know, when I have a /* TODO: Fix this */ it kind of explains why this crap wasn't working doesn't it
TkTech has joined #osdev
gog has quit [Ping timeout: 252 seconds]
<geist> looks like qemu 7.2.0 was just released
<heat> is it the avx release?
<heat> yes, yes it is
<heat> i'll have to test this when arch packages it
[itchyjunk] has joined #osdev
dude12312414 has joined #osdev
<geist> finally got around to getting a shell account on sdf.org
<geist> a bit late to the game, but it has some nostalgia feeling to it
<heat> what is that?
<geist> a unix shell provider. since like 1987
<geist> gets you a free shell on one of a pile of netbsd boxes
<geist> and some community stuff, etc etc
<heat> coolio
<heat> how do they stop you from abusing the system?
<CompanionCube> iirc it costs $lol to run most programming languages (and supposedly gcc but actually anyone can run it lol)
<heat> netbsd doesn't have containers and cgroups and all that, so unless you run on a vm I don't see how that's sustainable
<geist> it generally relies on people not being asshats
<heat> that's not a sustainable model!
<geist> has worked since 1987
<heat> weird
<heat> #NotMyInternet
<geist> though to be pretty clear you et a fairly limited shell until you are validated
<geist> either by someone else or you donate like $1
<geist> to keep bots from attacking it, etc
<geist> and the limited shell you can only really do like mutt and some bbs like things
<geist> and play bsd games and whatnot
<geist> i mean i have a much beefier box at home, but it's the whole BBS and sharing and being nice and whatnot community stuff, which is nic
<heat> >bsd games
<kaichiuchi> geist: do you use the irccloud web client
<heat> BSD, Now with Fun!
<geist> i do
<kaichiuchi> oh
<kaichiuchi> then never mind :')
<geist> used to use irssi, but last year i trial ran irccloud and found it to be sufficient, so switched right about the time freenode disintegrated
<CompanionCube> you too can easily experience the parallelism of openbsd, given that i think recently they added one box of it?
<kaichiuchi> i get "authentication temporary error, try again" almost constantly when connecting via another client
<heat> CompanionCube, ahhh so that's why the website is slow
<heat> gotcha!
<CompanionCube> no, blame netbsd for that
* geist eyes roll
<geist> seriously there is far more to life than blinding speed
<CompanionCube> (there's also a thing plan9, dunno what joke you could do for that)
<geist> it's kinda honestly nostalgic for me to log into a machine with 100 other folks logged in at the same time
<geist> and really a 16GB 8 core x86 machine is ridiculously overpowered for a bunch f shells running lightweight stuff
<heat> the only thing there is to life other than blinding speed is deafening speed
<geist> a bit of nostalgia for the much smaller sun boxes that my university used with a lot more logins
<heat> sdfeu.org europe gang stand up
<heat> hmm
<heat> has there ever been a distributed UNIX?
<heat> as in, the same "system" running in multiple boxes
<CompanionCube> https://en.wikipedia.org/wiki/Single_system_image lists a number of attempts
<bslsk05> ​en.wikipedia.org: Single system image - Wikipedia
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
[itchyjunk] has quit [Remote host closed the connection]
<heat_> ah yes ofc
<heat_> PLAN9PLAN9PLAN9PLAN9PLAN9PLAN9PLAN9PLAN9PLAN9PLAN9 and inferno
<CompanionCube> not mentioned but very network-oriented is Apollo's Domain/OS
<heat_> but plan9 is not quite what I wanted
<heat_> i want something like what they mention as "single process space"
<heat_> (although I don't see how that could be fast, ever)
<CompanionCube> so openssi/UnixWare NonStop Clusters?
vdamewood has quit [Quit: Life beckons]
<heat_> yup
heat_ has quit [Ping timeout: 252 seconds]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
vdamewood has joined #osdev
elastic_dog has quit [Ping timeout: 252 seconds]
elastic_dog has joined #osdev
bgs has joined #osdev
<geist> RUUUUUUST
<Mutabah> The sound of geist oxidizing
<geist> though i'm really not that fixated on it my subconcious is probably telling me otherwise
<geist> i literally kept waking up last night thinking about rust
<Mutabah> That seems like normal (enthusiastic) learning
<geist> yeah
<geist> i guess you're right
<Mutabah> Oh the other hand, it means that you're having fun :)
gog has joined #osdev
<geist> oh i really dont know what i'm doing, and still haven't wrapped my head around most of it
<Ermine> Cursed idea: plan 9 on rust.
<geist> reminds me, someone the other day asked what plan9's native architecture was, and got me thinking, weren't they named by numbers anyway?
<geist> like the '4' compiler is i386, etc
<geist> so maybe it's the '1' compiler?
<geist> probably 68k
<geist> ah no it wasnt numbered that way for a reason
<geist> some old docs say it was v for Mips, k for sparc, z for hobbit, 2 for 68k, 8 for i386, 6 for intel 960
<geist> the '2' for 68k was probably because the original cpu was 68020
<klange> may favorite naming convention: random keyboard mashing
<gog> guu2jfjd
<gog> feel free to use it
<klange> Already naming my next language that, thanks for the suggestion!
<gog> :D
<LittleFox> for some time I liked using pwgen to generate project names
gog has quit [Ping timeout: 252 seconds]
GeDaMo has joined #osdev
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]
epony has joined #osdev
<ddevault> getting there
bauen1 has quit [Ping timeout: 272 seconds]
<epony> in an island of isolation that arm* is going to be.. you need more apples up your supply chainstore
Brnocrist has joined #osdev
Burgundy has left #osdev [#osdev]
isaacwoods has joined #osdev
Burgundy has joined #osdev
sweetleaf has quit [Quit: WeeChat 3.7.1]
sweetleaf has joined #osdev
<mrvn> and if you need a temp register in asm pass in a dummy variable so the compiler can pick a register.
[itchyjunk] has joined #osdev
bauen1 has joined #osdev
<epony> "Pick any of the 256 you can" --Knuth
heat_ has joined #osdev
<heat_> bonk
heat_ is now known as heat
netbsduser has joined #osdev
awita has joined #osdev
<heat> I need a lightweight std::variant for the kernel
<heat> unions are a fucking pain in C++
<heat> due to construction/destruction/moves/copy/whatever sematics going bonkers
demindiro has joined #osdev
* demindiro points at Rust
<heat> pointing is rude
<heat> that's why we shouldn't use pointers RUSRURSURUSRUSRUSURSUTSURURUSTUTSURUSRUTURSUTRUST
* zid points at C
<j`ey> point at dn
<mjg> what's even the point of rust when php exists
<zid> php is the C preprocessor, mjg
<zid> puts("Version: <?php print_version(); ?>");
<heat> blursed
<kaichiuchi> hi
<kaichiuchi> heat: i didn’t get to install arch yesterday but I will today
<heat> SHAME
<heat> SHAME TO THE HOUSE OF KAICHIUCHI
<kaichiuchi> fun fact
<kaichiuchi> kaichiuchi means “scissor house” in japanese
<kaichiuchi> apparently
<heat> kinky
<kaichiuchi> it wasn’t intentional at all
<kaichiuchi> it just sounded cool to me
<mjg> lemme tell you a funny story
<mjg> a young guy promised a patch, then got distracted by tik tok videos
<kaichiuchi> stop it
<mjg> and no patch talk ever since
<sham1> Moral of the story? Tiktok brings down promising developers
<heat> mjg, i feel attacked
<heat> I don't use tiktok!
<heat> I use youtube shorts and instagram reels
<mjg> so how much did you pay for tai lopez nft
<sham1> heat: you too have fallen into the YouTube shorts rabbit hole?
<sham1> I can't get out of it
<mjg> scrolling that feed is increasingly cancerogenic
<mjg> sham1: ez. just don't start.
<heat> mjg, 3 billion FTT
<mjg> i was laughing at jordan peterson videos and the algo figured i'm genuinly into them
<heat> so approximately 10 USD
<mjg> heat: my man
<heat> i only purchase things using defunct crypto tokens
<heat> sham1, yes, it's so fucking hard to stop
<kaichiuchi> i have tiktok blackholed
<mjg> you are not scrolling at this very moment, no?
<heat> those tiktok guys are fucking geniuses
<mjg> just don't start again
<kaichiuchi> and it’s going to stay that way
<mjg> gg
<kaichiuchi> my girlfriend however, if we ever move in together, will demand that i unblock it
<mjg> new gf time
<sham1> Couldn't she just use 4G?
<heat> arch user? with a gf? uninstall
<kaichiuchi> yes she could
<heat> kaichiuchi, pacman -Qe | cut -d' ' -f 1 | xargs pacman -R
<heat> run this after you've installed arch
<heat> it's the "I have a gf" command
<kaichiuchi> no
<kaichiuchi> i don’t even know what that does
<heat> remove every package that's installed
<heat> no need to thank me
<kaichiuchi> you’re a weird guy
<kaichiuchi> heh
<heat> i'll take that as a compliment
<mjg> maybe there is a tiktok video how to do it
<mjg> probably where he copied the one liner from
<heat> yes I learned this from tiktok
<mjg> i learned how to do daytrading on tiktok
<heat> how in-debt are you
<mjg> i don't think you understand how money works
<mjg> if you have $10, that's literally thousands in potential earnings
<demindiro> Over how many years?
<mjg> that said i'm $30k in the hole
<kaichiuchi> i will not lie
<kaichiuchi> i bought AMC when it was a meme stock
<kaichiuchi> walked away with a pretty penny
<kaichiuchi> not an insane crazy amount, but,
<kaichiuchi> it was nice.
<mjg> sure, some people make moneyz
<heat> not mjg though
<kaichiuchi> god
<kaichiuchi> you know what kills me
<sham1> Swords
<mjg> radiation
<heat> cancer, heart attacks, getting run over
<demindiro> age
<mjg> UNIX
<kaichiuchi> when I was 18 I wanted to be cool and dump all of my savings into GME
<heat> sysctlbyname(2)
<kaichiuchi> but I said “no that’s stupid”
<mjg> i was not ther for enron
<mjg> age-wise
fwg has quit [Ping timeout: 256 seconds]
dude12312414 has joined #osdev
<heat> kaichiuchi, dude i've heard stories of people literally missing millions in stock options during this tech stock boom
<kaichiuchi> yeaaaah
<heat> not putting all your money in a meme stock is way shittier than "if I worked here for 2 more years I would be a literal millionaire"
fwg has joined #osdev
<sham1> One could of course put money into non-meme stocks
<kaichiuchi> obviously i’m not a financial advisor
<kaichiuchi> but the best thing for most people to do is buy the S&P 500
<heat> obviously people should donate to FreeBSD given that Apple doesn't
<heat> support your favourite BSD flavour
<kaichiuchi> i have a beastie poster
<j`ey> CheriBSD
<heat> "CheriBSD extends FreeBSD to implement memory protection and software compartmentalization features supported by the CHERI ISA."
<heat> hard skip
<j`ey> rip
<heat> memory protection? software comparmentalization? really??
awita has quit [Ping timeout: 252 seconds]
<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
<bslsk05> ​pastebin.com: ENTRY(_start)SECTIONS{ .init 0x80000 : { PROVIDE (__sta - Pastebin.com
<alpha2023> @heat any ideas / guides on how to split those load segments? I've been having an awful time at finding anything
<heat> alpha2023, thats very weird. can you share your --section-headers ?
<zid> your assembler's doing it
<bslsk05> ​pastebin.com: There are 12 section headers, starting at offset 0x86a8:Section Headers: - Pastebin.com
<zid> that's where the flags come from, before ld tries to package things up
<heat> the section perms look fine
<heat> how are you invoking ld
<zid> I'd check the flags on the input sections, presumably that's what ld is complaining about
<heat> no, ld complains about the LOAD segment
<heat> so program header
<zid> but that comes from defaults, or what you stuff into it
<heat> yes but the sections themselves look fine
<zid> I'd always go forwards forwards, though
<zid> find where the problem starts
<alpha2023> /usr/local/bin/aarch64-elf-gcc -I(Includes) -fbuiltin -DGITREV="\"A023CE2\"" -Wall -Wextra -Wno-unused-parameter -Tsrc/arch/rpi4/link.ld -nostdlib -lgcc -n -o (Objects)
<alpha2023> I'm invoking ld through gcc
<heat> what's -n?
<zid> nmagic? :o
<heat> what
<zid> oh that's -N I think
<heat> ld says -n is NMAGIC, -N is OMAGIC
<zid> ah so I was right, does -n do -Wl,-n though
<alpha2023> (not going to lie, not sure why -n is in there...)
<heat> delete
<alpha2023> no change, but still compiled okay
<alpha2023> wait hang on
<alpha2023> yes, still compiled but no change
<zid> did you build all the .o files with that
<alpha2023> no, it was only being passed into the linker
<heat> something is fucky and I don't know what
<heat> source?
<heat> or is it TOP SECRET
<alpha2023> haha no it's not, one sec, I'll push up the latest linker changes
<bslsk05> ​github.com: GitHub - primis/Apollo at testing-branch
<bslsk05> ​github.com: Apollo/target-rpi4.mk at testing-branch · primis/Apollo · GitHub
<bslsk05> ​github.com: Apollo/link.ld at testing-branch · primis/Apollo · GitHub
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<heat> wow Kconfig
<heat> that's a first
<alpha2023> I did it... manually! :D
<bslsk05> ​github.com: Apollo/Makefile at testing-branch · primis/Apollo · GitHub
<alpha2023> that should be all the things things that touch linking
<heat> oh god
<heat> where are your standard makefile variables
<heat> DEFS?
<heat> CFLAGS CPPFLAGS man
<alpha2023> yeah... that's a my bad
<alpha2023> I'll make a note to fix that
<heat> what happens if you use another linker?
<heat> like ld.lld or ld.gold
<alpha2023> havent tried
<heat> (-fuse-ld=(lld/gold))
arminweigl has joined #osdev
<alpha2023> collect2: fatal error: cannot find 'ld' on both lld and gold ...
<heat> do you even have them installed
<alpha2023> yes
<alpha2023> might be because it's not the cross compilation version thouhgh
<heat> oh no, i think it's just searching under its prefix
<heat> copy ld.lld to wherever your toolchain is installed
<heat> lld doesn't need a cross compilation version, every build can link anything
<alpha2023> yeah that's not working either...
<heat> c a l l i t d i r e c t l y
<alpha2023> working on it
<bslsk05> ​pastebin.com: There are 12 section headers, starting at offset 0x18610:Section Headers: - Pastebin.com
<alpha2023> so ld.lld fixes the segments
<heat> try gold
<heat> we're going the full stretch
<heat> maybe even mold lmao (jk, they don't support linker scripts)
<alpha2023> `gold: fatal error: build-rpi4/./src/core/hal.c.o: unsupported ELF machine number 183`
<heat> an aarch64 gold
<alpha2023> I don't have one installed, this might take a minute
<ddevault> why tf doesn't my EFI environment have a device tree
<ddevault> did I waste my entire week on this
<heat> EFI doesn't have a device tree
<heat> they parse it into ACPI afaik
<heat> cc j`ey
<j`ey> you can also pass a device tree ina configuration table, I think EDK2 supports that..
<ddevault> please don't make me go to ACPI
<ddevault> I'll sooner dump it on the boot disk and open it as a file
<ddevault> it /should/ be in a config table
<sbalmos> ACPI is your friend
<ddevault> I have all of these guids in the config table https://paste.sr.ht/~sircmpwn/0f58621f9b2c23e4f31b044e2847ce48252d5433
<bslsk05> ​paste.sr.ht: paste.txt — paste.sr.ht
<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> ​arm-software.github.io: Embedded Base Boot Requirements (EBBR) Specification v2.1.0-1-ge2bc7a4 documentation
<heat> I don't know if your $system is ebbr compliant
<alpha2023> heat: I can't find a copy of gold for aarch64 as a binary, gonna have to compile it if I want to try it...
<ddevault> grr
<ddevault> I have an ACPI table
<ddevault> this is edk2
<heat> SBBR also agrees
<heat> "Firmware can use a minimal Devicetree to provide necessary information to the OS bootloader,
<heat> description is provided using ACPI abstractions."
<heat> as long as this does NOT include any platform hardware description. The platform hardware
<ddevault> what the fuck man
<ddevault> just gimme a device tree
<ddevault> day ruined
xenos1984 has quit [Ping timeout: 256 seconds]
<ddevault> I think I am just going to dump it into the boot disk
gog has joined #osdev
<alpha2023> ok, got a binary of ld.gold here's the output https://pastebin.com/z4iHHRL8 @heat
<bslsk05> ​pastebin.com: linked with gold - Pastebin.com
<alpha2023> it seems only gnu ld is being fucky
<heat> I can't tell what's wrong
<heat> try and --verbose your way into some debug output i guess
<heat> and/or ask them directly
<gog> hi
<alpha2023> what's super weird is an almost identical linker script on x86 doesn't expose that error
<alpha2023> s/error/warning/
<epony> the fun with non-funny lack of standards between junkboards vendors https://en.wikipedia.org/wiki/Server_Base_System_Architecture
<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> ​pastebin.com: Linker Fix - Pastebin.com
<pog> Ermine: there's really not though
<pog> afaik
<pog> is it possible to just run the whole OS in EL0?
<pog> or 1 or whatever supervisor mode is
<pog> i don't know anything about arm
<j`ey> EL0 is userspace
<pog> ok
<ddevault> Ermine: device trees (re: riscv64)
<ddevault> Ermine: yes (re: EFI on arm64)
<ddevault> at least EFI is standardized
<ddevault> and u-boot provides a free implementation of it
xenos1984 has quit [Ping timeout: 260 seconds]
bauen1 has quit [Ping timeout: 252 seconds]
FreeFull has joined #osdev
xenos1984 has joined #osdev
heat_ has joined #osdev
<alpha2023> Modified the wiki https://wiki.osdev.org/Linker_Scripts#SECTIONS to make sure no one else runs into this same issue
<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
dude12312414 has joined #osdev
<heat> alpha2023, if you could try something like https://github.com/heatd/Onyx/blob/master/kernel/arch/arm64/linker.ld on bfd for SCIENCE and PROFITS it would be cool
<bslsk05> ​github.com: Onyx/linker.ld at master · heatd/Onyx · GitHub
<heat> everything is carefully placed in phdrs here
<alpha2023> the PHDRS directive area or just use the whole thing?
FreeFull has joined #osdev
<zid> I just phdrs everything anyway
<heat> the whole thing and slightly adapt for your own sections
<zid> manual phdrs for life
<zid> letting ld do things automatically never works :P
<heat> yeah manual phdrs works pretty well
<heat> I'm proud to say that my linker scripts work on all linkers (bfd, gold, lld)
<heat> which was a battle and a half tbf
<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]
vdamewood has joined #osdev
<heat> pogchamp
<heat> pogchamp
<heat> pogchamp
<pogchamp> heat
<heat> 🅱️🅱️🅱️🅱️🅱️🅱️🅱️
<pogchamp> huehuehue
<heat> u brazillian now
<bslsk05> ​'Red bird laughing meme HD' by Plumboos (00:00:06)
<bslsk05> ​'The Bang Bang Theory' by Podel (00:00:35)
<pogchamp> baking soda
<heat> when I die tragically at a young age I want these videos to be an insight into my state of mind and genius
<pogchamp> true
* Ermine tries to remember Rio song he heard in Alitalia plane.
<heat> when I get chosen as the CEO of Alphabet I will rename Bazel to Bazelinga
<kaichiuchi> heat: son
<kaichiuchi> it is almost time for arch
fwg has joined #osdev
Burgundy has quit [Ping timeout: 260 seconds]
xenos1984 has quit [Quit: Leaving.]
MiningMarsh has quit [Ping timeout: 268 seconds]
<heat> arch lonix time
<pogchamp> balinux
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
dra has joined #osdev
<mjg> burp