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
<klange> < radens> I'm on aarch64 btw ← gold
<moon-child> I thought if you set the return address as null, it'll consider that to be the bottom of the stack?
<Mutabah> oh, aarch64 is relatively easy
<Mutabah> ... wait, I thought I had it implemeted, maybe not
zid has quit [Ping timeout: 248 seconds]
zid has joined #osdev
Matt|home has quit [Quit: Leaving]
<jjuran> moon-child: Typically it's a null stack frame pointer that terminates a stack crawl.
gog has quit [Quit: byee]
gog has joined #osdev
isaacwoods has quit [Quit: WeeChat 3.7.1]
Matt|home has joined #osdev
smach has joined #osdev
[itchyjunk] has quit [Read error: Connection reset by peer]
sortiecat has quit [Quit: Leaving]
dude12312414 has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
smach has quit []
dutch has joined #osdev
spikeheron has quit [Ping timeout: 256 seconds]
ka80 has quit [Ping timeout: 260 seconds]
ka80 has joined #osdev
ka80 has quit [Quit: Leaving]
smach has joined #osdev
heat has quit [Ping timeout: 256 seconds]
epony has quit [Ping timeout: 268 seconds]
TkTech has quit [Ping timeout: 256 seconds]
ckie has quit [Quit: *poof*]
ckie has joined #osdev
JerryXiao has quit [Quit: Bye]
JerryXiao has joined #osdev
Burgundy has joined #osdev
bgs has joined #osdev
SGautam has joined #osdev
Burgundy has quit [Ping timeout: 256 seconds]
epony has joined #osdev
jafarlihi has joined #osdev
<jafarlihi> Hey, I'm trying to learn more about UEFI and have already read osdev wiki material. I picked up Quick Boot and Beyond BIOS books but they are too complicated and I have hard time understanding them. Can you suggest some material for me to learn more about UEFI so I can create a bootloader and UEFI apps?
<jafarlihi> pls
<jafarlihi> Is reading 2500 pages of spec the only way?
bgs has quit [Remote host closed the connection]
xenos1984 has quit [Quit: Leaving.]
<Mutabah> Find examples elsewhere? E.g. pre-existing projects
<Mutabah> I forget where I got my initial direction, but https://github.com/thepowersgang/rust_os/tree/master/Bootloaders/uefi
<bslsk05> ​github.com: rust_os/Bootloaders/uefi at master · thepowersgang/rust_os · GitHub
<jafarlihi> I need a more complete treatment so I can write UEFI apps
<jafarlihi> is Beyond BIOS the only UEFI book out there?
<Mutabah> Grab the spec and just jump to the relevant section?
<jafarlihi> Ok, guess that's the only way
<jafarlihi> Thanks
<Mutabah> I'm not saying it's the only way... but it's the only one I know of
<Mutabah> With specs, you don't need to read every page - just the ones that matter
<Mutabah> You can usually skim of a LARGE amount (e.g. all of the detailed method descriptions)
jafarlihi has quit [Quit: WeeChat 3.5]
xenos1984 has joined #osdev
Burgundy has joined #osdev
gog has quit [Ping timeout: 256 seconds]
smach has quit []
ZipCPU has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
chibill has quit [Quit: You have been kicked for being idle]
ZipCPU has joined #osdev
SGautam has quit [Quit: Connection closed for inactivity]
Burgundy has quit [Ping timeout: 260 seconds]
ElementW_ has quit [Ping timeout: 255 seconds]
ElementW has joined #osdev
GeDaMo has joined #osdev
heat has joined #osdev
<heat> beyond the bios is the only UEFI book useful for muggles (non-fw devs)
<heat> well, from the ones I can remember. I can't think of another UEFI book like that
<heat> certainly not a better one
<heat> (to be clear, not that you really need a book for a basic UEFI bootloader)
<zid> heat: Fix my day 12, I wrote out the skeleton but it gives infinite loop and now I am reading a book
smach has joined #osdev
smach has quit [Client Quit]
sortiecat has joined #osdev
sortiecat has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
smach has joined #osdev
Burgundy has joined #osdev
<zid> Okay my tail tracking needs special casing for if the list goes empty but then gets re-pushed to apparently? TIL
<bslsk05> ​gist.github.com: 2011-day12.c · GitHub
<zid> line 63/64 needed adding, wonder if there's a better impl.
lkurusa has joined #osdev
netbsduser has quit [Quit: Leaving]
heat has quit [Read error: Connection reset by peer]
heat_ has joined #osdev
lkurusa has quit [Ping timeout: 252 seconds]
heat_ is now known as heat
heat has quit [Remote host closed the connection]
heat has joined #osdev
<heat> zid, bazinga
<heat> I guess i'll finally do some aoc's I've been putting down for some days
<zid> nice
awita has joined #osdev
nyah has joined #osdev
netbsduser has joined #osdev
sav_ has joined #osdev
sav_ has quit [Client Quit]
<bslsk05> ​github.com: aoc2022/day7.c at main · heatd/aoc2022 · GitHub
<zid> nice
<heat> i kinda cheated and stole the linked list from myself
<zid> s/ kinda//
<heat> i aint playin by yo rules playa
<zid> You missed a couple of optimizations that I made
vdamewood has quit [Quit: Life beckons]
<heat> i didn't need the files, just the dirs
<zid> yep
<heat> that's an easy one
<zid> Looks like you're parsing too much
gildasio has quit [Quit: WeeChat 3.6]
<zid> I only check for ^c, and ^[0-9], everything else is ignored
gildasio has joined #osdev
<zid> ls and dir are superfluous
<heat> the strncmp could just be cmd = *buf == 'c' ? CMD_CD : CMD_LS;
<zid> CMD_LS is pointless
<heat> and then an unconditional += 3;
<bslsk05> ​gist.github.com: 2022-day7.c · GitHub
<zid> I wrote dir but left it commented, I realized it wasn't needed, cd implements the same thing, and never even handled ls
<zid> Your 'walk the parents and update the size' thing is cute, I just do a depth first search at the end
<zid> so needs a small amount of recursion, but no parent pointers
<zid> oh I do have parents anyway
<zid> cus of cd ..
<zid> didn't think to use them to calculate the sizes inline to the additions
<zid> I'd do it at cd . time though
netbsduser has quit [Ping timeout: 246 seconds]
<heat> nothing tells you you'll end up at / though
<zid> or EOL
<zid> EOF
<zid> which is why I did it by walking forwards, easier to not fuck up :D
<heat> day8 looks odd
<shikhin> Anyone doing anything on RISC-V?
<zid> let me remember last week
<zid> ah the trees
<zid> (actual trees, not computer trees)
<zid> I'm surprised this was the first time in AoC this year I wrote a macro to stop me going outside the bounds of a 2D grid
<heat> shikhin, yes
<heat> what do you need
<shikhin> Thinking of starting an OS project for it, trying to decide what development board to target first.
<heat> oh
<heat> use qemu lol
<shikhin> Not QEMU, that's no fun.
<heat> most riscv boards are unobtanium or 32-bit and notveryobtanium
<shikhin> Aw.
<shikhin> The only thing on the list yet is https://www.clockworkpi.com/ but that's a) a bit pricey, b) 60 to 90 day lead time.
<bslsk05> ​www.clockworkpi.com: ClockworkPi | Open Source Hardware
<heat> oh yeah most of them are also pricey for sure
<shikhin> :(
Burgundy has quit [Ping timeout: 260 seconds]
<heat> particularly the "proper" sifive ones with pci and shit
<shikhin> Don't think having PCI is such a necessity.
<heat> so, suit yourself with QEMU or go for another arch
<heat> arm64 is much cheaper and more available
<heat> I got a pi zero 2 w for like 15 euro
<heat> quad core, 512MB, 64-bit, wireless, all the GPIO you want, etc
<heat> granted, it's slow, but it's also 15 euro
<heat> not like you're getting speed with the riscv boards anyway
<heat> even the top of the line stuff is slow af
<shikhin> Mh, well, I'm not the only one on this project, and RISC-V it shall be, me thinks.
<heat> haaaaaaaaaaaaaaaaaave you considered x86
<shikhin> Haha.
<heat> 👻descriptor tables👻
<shikhin> RISC-V -> x86, seems reasonable.
<heat> well you lose a good bit of the cheesyness of riscv
<mrvn> zid: You can just recurse every time you see a "cd dir" and return the accumulated size at "cd .." or EOF.
<heat> i'm not gonna say riscv is a trashy architecture, but it kinda is a trashy architecture
<heat> the spec still has the default LaTeX look, it's that bad
<heat> it also... reads weird
<heat> otoh it's much simpler than x86 so for a first experience it's a good choice
<shikhin> This isn't a first experience, mh.
gildasio has quit [Ping timeout: 255 seconds]
isaacwoods has joined #osdev
gildasio has joined #osdev
<mrvn> heat: is that look a bad thing? Better than a M$ Word look.
<heat> >M$
<zid> heat stop getting distracted
<zid> you're not up to 12 yt
<heat> zid stop
<heat> you're hurting my feelings
<zid> stop getting distraced by your feelings too
* mrvn sends heat to the Kolinahr
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
<zid> A real man bottles that shit up until he takes out all of his co-workers in a rage spree
<Ermine> heat: do you consider arm64 a good arch?
<heat> yes
<Ermine> xv6 was redone in RISC-V btw.
<zid> heat: how are your trees?
<bslsk05> ​lwn.net: Introducing maple trees [LWN.net]
<zid> >(actual trees, not computer trees)
<Ermine> Maple trees are real.
<Ermine> s/real/actual/
<zid> and yet, the link is not about them
vdamewood has joined #osdev
bgs has joined #osdev
heat_ has joined #osdev
heat has quit [Read error: Connection reset by peer]
xenos1984 has quit [Quit: Leaving.]
<heat_> zid, im doing things that I need to do
<heat_> I'll have to postpone aoc a bit
heat_ is now known as heat
<zid> no
<heat> do my day8 then
<heat> glhf
<zid> I alrady did
<zid> should I write it in the style of you
<heat> yes
<zid> tr -d 'static '
<heat> what?
<zid> Remove all the static keywords from mine
<heat> how is that my style
<heat> at the very least make it STATIC VOID and wrap it in EFI protocols
<zid> everything you've posted for aoc
<zid> not edk2
<zid> I've never looked at edk2, I'm sane
<bslsk05> ​github.com: aoc2022/day7.c at main · heatd/aoc2022 · GitHub
<heat> i bet you look pretty dumb right now
<zid> you copy pasted that
<zid> from outside of aoc
<zid> you even admitted to it
<heat> static void init_list_head(struct list_head *lh) was written from scratch
<heat> with a static
<zid> this is the important thing you had to do is it
<heat> no I'm writting haskell for uni
<heat> (shoot me)
<GeDaMo> fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
dude12312414 has joined #osdev
awita has quit [Ping timeout: 260 seconds]
awita has joined #osdev
Burgundy has joined #osdev
gog has joined #osdev
FreeFull has joined #osdev
nanovad has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
nanovad has joined #osdev
sortiecat has joined #osdev
<zid> heat: oi, michaelsoft binbows, where day
<heat> still on the haskell
<heat> this thing fucking sucks
<heat> it's completely alien to me
<heat> pointer where
<zid> good thing about haskell is that it's illegal for it to show you the result
<zid> just compile if it was calculable
<zid> so you can just interchange every haskell program for while(1);
gxt__ has joined #osdev
gxt_ has quit [Ping timeout: 255 seconds]
vdamewood has quit [Read error: Connection reset by peer]
<GeDaMo> At least it's not Prolog :P
vdamewood has joined #osdev
<zid> GeDaMo: Do advent in prolog
<GeDaMo> No thanks :|
<zid> prolog looks like a scripting lanaguage designed to solve einstein puzzles
<zid> (Jim lives next door to the man who smokes a pipe, the man with the cat has a yellow front door, ...)
wootehfoot has joined #osdev
awita has quit [Remote host closed the connection]
gog` has joined #osdev
gog` has quit [Client Quit]
gxt__ has quit [Remote host closed the connection]
xenos1984 has joined #osdev
gxt__ has joined #osdev
wootehfoot has quit [Read error: Connection reset by peer]
nyah has quit [Quit: leaving]
bgs 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!]
<linearcannon> honestly prolog might actually be good for advent of code, i might give it a shot
<linearcannon> wouldn't try writing a kernel in it though
<mrvn> but it has so many pros and is so logical :)
gxt__ has quit [Remote host closed the connection]
gxt__ has joined #osdev
<kaichiuchi> so
<kaichiuchi> for once I come on a mission
<kaichiuchi> a mission of actually asking an osdev question
<kaichiuchi> how difficult is it to get a kernel debuggable with gdb?
<kaichiuchi> because I want to just play with it on real hardware from the get-go
<gog> with qemu, fairly trivial if you're using a compiler that generates DWARF symbols
<gog> real hardware not so easy
<kaichiuchi> well, can't I just pipe shit to a serial port?
<mrvn> kaichiuchi: 7
<kaichiuchi> 7
<mrvn> on scale from 5 to 10
<kaichiuchi> you mean 7 out of 10 on the difficulty scale?
<kaichiuchi> oh
<kaichiuchi> hm, I see
<zid> The problem is that gdb needs software support to respond to messages
<zid> so it's fairly useless in debugging kernel crashes etc
<mrvn> you need a serial driver, multitasking (or at least IRQs) and a few lines of gdb stubs.
<zid> That's why hw debugging over jtag etc exists
<kaichiuchi> so what I'm hearing is: "please, for the love of god, start with an emulator"
<mrvn> If you have multiple cores you can halt cores when they crash but keep the serial IRQ running for gdb.
<mrvn> kaichiuchi: it's always best to start with an emulator. booting real hardware takes too long
<mrvn> Note: qemu has builtin GDB support, no kernel stubs needed
<mrvn> greate for debugging your gdb stubs by connecting 2 GDB, one internal and one on the serial.
<zid> I think your best bet would just be to run under a hypervisor that implements a gdb stub
* geist yawns
terrorjack has quit [Ping timeout: 265 seconds]
terrorjack has joined #osdev
smach has quit [Ping timeout: 260 seconds]
<mrvn> PIZZAAAAAAAAA
<mrvn> zid: oh damn, now you give me even more ideas for raspbootin
smach has joined #osdev
gxt__ has quit [Remote host closed the connection]
gxt__ has joined #osdev
<gog> i want pizza
<gog> mrvn: bring me pizza
* Ermine is cooking pizza
<Ermine> or baking?
vdamewood has quit [Quit: Life beckons]
<mrvn> Ermine: grilling?
<mrvn> are you making pizza or just heating it?
<Ermine> Let's assume I'm making it.
<mrvn> so much work. Have to double size it to make up all the calories lost.
<zid> rip honzuki, is it monday yet?
<mrvn> it's still monday, for an cruciatingly long 21 more minutes
<heat> non-GMT moment
<zid> heat we're timezone buddies, can you wake me up at 10pm on monday?
<heat> next week? for sure
<zid> okay sleepy time
<zid> maybe 9pm monday, so that I can do 7 days of advent before 10pm
<jjuran> But can you do six impossible things before breakfast
<heat> yes
<mrvn> survived another monday
<heat> central european moment
<heat> i have escaped the hell that is functional programming
<heat> shoot me
<Ermine> tfw word cannot render its own documents properly.
<heat> typical MICROSHIT WINCRAP