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
heat_ has joined #osdev
<heat_> f'ing router
<heat_> <heat> oh, that's a mutex btw. i also have a local git stash with rwlock support there, but i need some finer-grained logic when mapping tables
<heat_> <heat> ie a spinlock per table
<heat_> <heat> and/or retry, plus releasing the rwlock if i am blocking, etc
heat has quit [Ping timeout: 240 seconds]
rselim has joined #osdev
<heat_> in general i'd like a nice rework on vm stuff for a few weeks. getting O(log n) mmap (and vmalloc, same algo) allocation, /maybe/ maple syroup tree
* mjg <-- triggered
<heat_> i read an interesting range locking linux vm paper that could be put to use
<heat_> also ditching vm_objects for anon memory, efficient rmap using interval trees
<zid> you should upgrade it to a sycamore tree
<heat_> and *swapping*
<mjg> i ghoutght they ditched rangelocking idea?
<heat_> yeah they did
<mjg> did you mean the vma stuff?
<heat_> no
<mjg> per-vma lock
<heat_> i think their per-vma lock is kinda half-assed
<mjg> i totes agree
<mjg> well, 80%
<mjg> there is /some/ doubt
<mjg> real page fault handling speed is fully with sequence counters and rcu mofo
<mjg> oh dave dice
<mjg> careful with that dude
<mjg> he is mostly wanking over how to do something multicore and then slap it on supposed practical use
<geist> oh hye ubuntu 23.04 has an image for visionfive 2 now
<geist> with proper 6.2 upstream kernel support
heat_ has quit [Remote host closed the connection]
heat_ has joined #osdev
<heat_> noice
heat_ is now known as heat
<heat> geist, im here to announce I HAVE KVM BAYBEEEEEEEEEEEEE
<geist> hey nice, did you have to futz with the timer thing?
<heat> i haven't tested it yet
<heat> but kvm is enabled
<heat> let me install the correct package(s)
<mjg> kvm?
<heat> for arm64
<mjg> :O
<mjg> ey mofo, a c++ question for you
<mjg> scoped_lock g{cache->lock};
<mjg> slab = kmem_cache_create_slab(cache, flags);
<mjg> is the lock kept across the call?
<heat> yes
<mjg> what if the callee wants to drop it?
<heat> which is why g.unlock(); in my slab.patch i linked
<heat> if the callee wanted to drop it, it would drop it and then re-acquire it
<heat> but that's not very explicit so i didn't opt for that
<mjg> do you have something to validate the lock is still held when callee returns?
<heat> no
<heat> if I had my spinlocks properly annotated with clang's thread safety stuff, it would probably detect it
<heat> although it struggles with things like conditional locking
<mjg> nab question, is linux rolling with about 1 rc every week, about 7-8 per release?
<mjg> seems so
<mjg> i mean who here even tracks this
<heat> roughly
<mjg> when did this start?
<heat> i unno
<heat> why?
<mjg> just noted rc5 showed up
<mjg> now i'm kind of curious
wblue has joined #osdev
<heat> geist, i was going to say the arm timer seems to be broken but no, my code seems to be broken :v
<geist> is this the first time you've tried running on 'real' hardware?
<heat> yep
<heat> linux seems to boot fine
<heat> OH
<heat> duh
<heat> // TODO(pedro): We don't know if we're hooked up to IRQ27. While we likely are, please see the
<heat> // device tree.
<heat> install_irq(27, arm64_irq_timer, dev, IRQ_FLAG_REGULAR, nullptr);
<heat> i bet its hooked up differently
<heat> ... no, that's not it
nyah has quit [Quit: leaving]
netbsduser` has quit [Ping timeout: 246 seconds]
CaCode has quit [Ping timeout: 246 seconds]
heat has quit [Remote host closed the connection]
heat has joined #osdev
<heat> geist, i'm confused... something is clearing the IRQ?
<heat> it never reaches my handler but qemu clears the IRQ???
<geist> it’s level triggered, a <= comparator
<geist> double check that’s the right IRQ, youmight be looking at the wrong one
<heat> no, it's the right irq
<geist> i dont remember having to ack or clear it, but iirc there’s an enable bit and the comparator
<geist> and of course it’s per cpu
<geist> i dont have it in front of me though, at a starbux
MiningMarsh has quit [Quit: ZNC 1.8.2 - https://znc.in]
<heat> geist, am i supposed to use cntvct and not cntpct?
<heat> assuming i want to use the virtual registers?
<geist> yes
<geist> you are being virtualized, thus expecting to access the physical registers is not realistic
<geist> i think that’s mentioned in the device tree, but the generally safe default is to use the virtual registers, and if you know you’rerunning on the ‘root’ of the machine (ie, have EL2 available, etc) you can use the physical timer
<geist> but then you’d probably endupusing the physical timer for virtualization time keeping anyway
<heat> haha
<heat> there it is
<heat> that was the problem
<geist> if you straight boot on a machine or the machine is being fully emulated the physicla timer is probably present
<geist> neat thing with the virtual timer is even if you have the physical one available, there’s no real reason not to use it, if nothing else because you can add an offset to the physical one, and thus make sure your timer starts at 0
<heat> when would you use physical then?
<geist> if you’re in EL2, or otherwise acting as a hypervisor
<geist> either in EL2 hypervisor, or using VHE. you could use it as thereal baseline time, and then each virtual machine has it’s ownvirtual timer with its own offset added
<heat> ah yes, because everyone shares the same registers?
<geist> i dont know precisely what linux does withit, but that’s what we do on fuchsia. for user space access to the current timer counter (via the VDSO) it reads the virtual counter
<geist> either because we might be emulated, or because even if we aren’t we program the virtual counter to start at 0 at boot time
<geist> there’s only only physical counter (non secure) on the whole system, so via a set of control regs at EL3 and EL2 you can make it off limits to the lower levels
<geist> there’s technically only one virtual counter on the system, but it can be reprogrammed at machine context switch to have its own delta from the physical counter
<geist> so it can be made to appear to be a private counter per vm
<geist> but since you have to reprogram it, youstill want some sort of higher truth, and that’swhat the physical counter does
<geist> also lets viortual machines set their own timer, even have IRQs fire, without needing to exit the VM, whereas the hypervisor can still have its own independent timer running
* heat nods
<heat> can you hide the physical counter from the hypervisor?
<heat> or is that always an info leak?
<geist> good question, dunno
<geist> iirc there are 4 timers: virtual, physical secure, physical insecure, and EL3? i forget the last one
<geist> it might be consistent and each level can be hidden from the layer below, but i forget., you’ll have to dig through the ARM Tome for that
<geist> bound in human flesh
<geist> keep in mind they all count at the same rate, off the same clock, so functionally speaking each of them is just a 64bit counter, a match register, and an IRQ wired up, so not that difficult
<geist> (and the virtual one has an offset register)
<geist> all of this is off memory so i’m only about 80% sure of the precise details, but i think the shape of what i’m describing is accurate
<heat> yeah
<heat> i suspect i have my memory ordering fucked?
<heat> gic_set_irq irq 27 level 0 cpumask 0x1 target 0x1
<heat> gic_acknowledge_irq cpu 0 acknowledged irq 1023
<heat> gic_cpu_read cpu 0 iface read at 0x0000000c: 0x000003ff
<heat> ubsan: out of bounds in kernel/irq.cpp:121:43
<heat> ===================================UBSAN error===================================
<heat> index 1023 out of range for type 'irq_line [223]' (3ff)
<heat> =================================================================================
<heat> gic_cpu_write cpu 0 iface write at 0x00000010 0x000003ff
wblue has quit [Quit: wblue]
<heat> given i only ack what I get from IAR, I don't see where that 1023 could be coming from
<heat> there's no prior IAR read
<heat> oh, i forgot to set any memory as device
<geist> yes you will need to do that
<heat> Device-nGnRE ?
<geist> yyyyyy es. that's seems right
<geist> it's one level removed from strongly ordered which is nGnRnE
<heat> i still don't quite understand 1) wtf all these letters mean 2) inner vs outer
<geist> nGnRnE == no gathering, no reordering, no... what was E mean
<geist> basically nE == wait for the write to complete
<geist> E == allowed it to 'post' a write and move on
xenos1984 has quit [Read error: Connection reset by peer]
<heat> ohhhhhhh
<geist> but gathering and reordering are more obvious: gathering == combining read/writes, and reordering == doing things out of order
<heat> yeah i see
<geist> it's effectively 16 permutations, though only 3 or 4 of them are useful
<geist> also 'device' memory (vs regular memory) has some limitations re: the cpu cant speculate into it, etc
<heat> setting these bits for higher-level PTEs controls caching for the page tables themselves right?
xenos1984 has joined #osdev
<geist> iirc ti's in the TTBRn
<geist> there's some bits there that tell the cpu how to cache the page tables
<geist> there's no reason to use it any other way than full caching
<geist> with the caveat that you should perform a memory barrier after pdating PTEs before you should expect the cpu to read them in
<heat> something's really wrong and i dont't see what
<geist> welcome to working with arm64
<geist> stuff can fail by omission, the worst kinda of failure
<geist> do not despair, this is how you learn the Really Good Stuff
<heat> if i set all mappings to device nGnRE i get no serial
<geist> now keep in mind this is on qemu so it should just be faulting and trapping
<geist> so i dont necessarily think the mapping is incorrect necessarily. may be something else
<geist> assume nothing, verify everything
<heat> not kvm though?
<heat> erm, what
<heat> not the gic though*
<heat> ?
<heat> since its all automagically emulated I think? or... hrm
<heat> great point
<heat> -trace gic gives me output, so it *has* to be trapping
<geist> no. the gic is being trapped and emulated too. only really high end gicv3s can do that
<geist> and anyway the uart is what you're dealing with ehre, which is definitely being trapped n emulated
<geist> so my guess is you're blowing up much earlier on, throwing some exception that gets it stuck in some loop
<geist> start with `-d int` and see whats up
<heat> no, and in any case i rolled back the EVERYTHING IS UNCACHED change
<heat> also -d int doesn't work in KVM does it?
<heat> (not on x86 at least)
<geist> it does
<geist> well, okay tyeah maybe not for every case
<heat> yeah doesnt work here
<heat> oh ok i see
<heat> i feel stupid now
<geist> got it going?
<heat> no, but i see what's going on much more clearly
<heat> i was off the deep end in "wtf is up with caching??" but this is probably a much sillier problem
<geist> yeah, sounds more basic
<geist> getting my visionfive 2 board updated to ubuntu 23.04. now it's a bit more modern
<geist> using 6.2 kernel stock, though that's actually *behind* the visionfive fork in terms of hardware support (no PCI, no USB) but it's not a fork
<geist> before iw as runningon some debian fork
<heat> me find the pdf i want challenge [IMPOSSIBLE] [GONE WILD]
<heat> i thought i had found it but it was the gicv3/4 pdf
<heat> im pretty sure i never downloaded the v2 spec
<Cindy> me trying to search methods of subdividing polygons in google patents
<Cindy> i get results from 1872
<heat> i found every itanium manual i have
<heat> but not the thing im looking for
SGautam has quit [Quit: Connection closed for inactivity]
<heat> geist, the arm timer is defo real right?
<geist> yep
<geist> it's sometimes called the 'architectural timer'
<geist> mandatory as per armv8 (and most of v7)
<bl4ckb0ne> are those "arm timer" with us right now
<Cindy> arm timer is bloat on my CPU die
<geist> timers are for children that can't get stuff done on their own
<heat> ouch
<geist> yeah i dont need the 'system' taking the cpu awawy from me
<geist> timers are for losers that need supervision
<kof123> rtfm... "the man"ual is always at it, never lets up
<Cindy> geist: back in MYY DAY
<Cindy> the timer used to be a seperate chip
<clever> geist: after more futzing around with threadstats, i round that the tga decoder was just not able to decode at 30fps, and i didnt need 24bit images, so i made my own video firmat, just raw 1bpp frames, and the usb is easily able to keep up and do full video playback!
<geist> yeah probably. the tga decoder is not even remotely optimized
<clever> yeah, it would need a unique function, for every source and dest pixel format
<geist> i thinki slammed that out like 15 years ago to display a logo on a Palm Pre
<clever> and variants that can memcpy whole strips
<clever> and thats just too much complexity
<geist> the palm bootloader used it for images to load at boot
<clever> its great for loading a single logo on boot
<clever> trying to play video thru it is a mistake, heh
<geist> well, yeah.
<geist> i mean if you wanna do a nice bad apple, define your own delta format from the previous frame
<geist> and at least do 1bpp
<clever> i dont even have compression right now
<clever> its just a raw (480*360)/8 bytes per frame
<clever> and i dont even manipulate it in cpu, (if you ignore the memcpy in ext2)
<clever> dwc dma into ram, ext2 memcpy to copy from bcache->buffer, hvs dma treating it as a 1bpp palette image
<clever> with the throttle removed, it can do the entire video in 19 seconds
<clever> RLE or delta encoding would massively reduce the bandwidth usage, but increase cpu
[itchyjunk] has quit [Remote host closed the connection]
<clever> but ext4 is sorta giving some crude RLE, if a 4kb block is all 0, ext4 just doesnt store it, sparse hole
<geist> keep in mind that TGA has RLE too
<clever> yep
<clever> but the tga decoder is taking 3 bytes from the tga file, bit-shifting them into an RGBA8888, then calling putpixel
<clever> and then repeating that for every pixel in the RLE
<clever> doing the shift once, and then just bliting that with a memcpy into an uint32_t[] would likely speed it up a lot, but only for 32bpp gfx layers
<clever> and now you need a unique function, for every source and dest pixel format, and for RLE vs not
<clever> it could be done, but i dont think its worth the time investment
<clever> if your trying to tga at 30fps, your(me) doing it wrong
<clever> this is one of my early versions
<clever> i was playing 1 frame on every vsync, but ntsc vsync's at 60hz, so it was playing at double speed
<clever> i then found an ext4 extent bug in code i wrote ages ago
<clever> oh, and that reminds me of a Q i wanted to ask
<clever> i was doing mutex's in a timer callback, and then it blew up in my face
<clever> should the mutex functions assert that its not in irq?
gorgonical has quit [Ping timeout: 245 seconds]
<geist> doesn't know it's in an irq
<geist> but yes dont do that
<clever> i only realized my mistake, when the same thread grabbed a mutex twice
<clever> but it could be discovered faster, if there was just an assert(arch_int_enabled());`
<clever> does that sound PR worthy?
<clever> hmmm but that would falsely trigger during non-irq too, i think there is an `is_isr()` function...
<CompanionCube> clever: btw, upgrading from a pi3 to a pi400 ~soon, anything i should try on the new one before i switch the sdcards over (can i do that?) or even on the current pi3
<clever> CompanionCube: as long as you have a recent start4.elf, the sd should just boot on either model
<clever> so you can swap between them whenever you want
<CompanionCube> oh, i meant to put 'cool' or similar there
<clever> ive been working on a custom bootcode.bin to play bad apple
<clever> it works on the whole pi0-pi3 range, it will mount a usb drive, load bad-apple.bin, and then play the video on the composite out
<clever> -rwxr-xr-x 1 clever users 115K Aug 6 18:27 build-vc4-stage1/bootcode.bin
<CompanionCube> not hdmi?
<clever> just this one 115kb file, is enough to turn the pi into a working video player
<clever> i havent figured out how to do hdmi init
<CompanionCube> ah, can't do that then
<clever> so your only options are VGA or composite
<bslsk05> ​www.pishop.ca: Gert VGA 666 - Hardware VGA for Raspberry Pi
<CompanionCube> huh of course that's a thing, but i won't be getting it
<bslsk05> ​www.adafruit.com: Pimoroni HyperPixel - 4.0 Hi-Res Display for Raspberry Pi : ID 3578 : $64.95 : Adafruit Industries, Unique & fun DIY electronics and kits
<clever> this uses the same interface, and is a pure digital link
<CompanionCube> any thoughts on rpi4 hardware vs rpi3?
<clever> the internals of the bcm2711 have changed massively in many areas
<clever> for low-level stuff, it can be a learning curve, but under linux, its all automated for the most part
* CompanionCube knows that at minimum, there's actually a standard interrupt controller in the newer one, which is useful for kvm
<clever> only bit difference i can think of, the bcm2711C0T uses less energy and produces less waste heat
<clever> big*
<clever> the bcm2711B0T is more energy wasteful
<clever> the pi400 always uses the C0T, but the pi4 has a mix, depending on when it was made
<clever> and yeah, the bcm2711 has a GIV for the arm
<clever> but its got some ugly bits, all PL011 uart's share a single irq
<CompanionCube> cursed?
<clever> and you need to poll a non-standard register to figure out which one is to blame
<clever> from what ive heard from the engineers, the vc6 design wasnt finished in time
<clever> so they glued chunks of the vc6 core onto the side of a vc4 core
<CompanionCube> sounds unholy
<clever> so the 2711 is a hybrid of the old core and the new hw blocks
<clever> pi0-pi3 are largely identical internally, the only real difference is swapping the arm core out
<clever> oh, and beware of 1366x768 displays on the pi4/pi400
<clever> some of them have odd numbers in the horizontal front/back porch, and the bcm2711 only supports even numbers
<heat> <clever> so they glued chunks of the vc6 core onto the side of a vc4 core
<heat> the fuck
<clever> to support 4k60, the 2d core runs the hdmi in a DDR fashion, rather then double the clock, they just doubled the bus width, it produces 2 pixels per clock
<CompanionCube> no problem, the monitor is 1440p :p
<clever> but because its producing 2 pixels per clock, all of your horizontal timing params must be even
<clever> internally, you have to halve them before passing it off to the hw
<CompanionCube> the console looks acceptable in 1080p, but could maybe overclock the pi3 gpu for full res:
<bslsk05> ​'Chaos, 13 sprites randomly bouncing around' by michael bishop (00:00:12)
<CompanionCube> (not really going to bother, but maybe it's a thing)
<clever> CompanionCube: this is a demo of what the 2d core on the rpi can do, its basically just a sprite-only gpu, so moving that much around consumes <1% cpu time
<clever> but what you cant see, is that its putting load on the dram interface, and contention with other bus masters could tip it over the edge
<geist> oh my, i'm building qemu on this visionfive 2 right now and it's going to literally take all night
* geist whines like heat
<clever> https://youtu.be/u7DzPvkzEGA in here, i under-clocked it to make the edge easier to hit, when too many sprites enter the same scanline, it fails to keep up
<bslsk05> ​'ntsc dance v2, interlacing fixed' by michael bishop (00:00:22)
<clever> but its 1:30 am now, i should get some sleep!
<clever> and then tomorrow, try to implement .wav playback on the rpi
<Cindy> i wonder
heat has quit [Ping timeout: 246 seconds]
Maja has quit [Ping timeout: 260 seconds]
vdamewood has joined #osdev
Maja_ has joined #osdev
goliath has quit [Quit: SIGSEGV]
eck has quit [Quit: PIRCH98:WIN 95/98/WIN NT:1.0 (build 1.0.1.1190)]
eck has joined #osdev
Harriet has quit [Quit: WeeChat 4.0.2]
Harriet has joined #osdev
bgs has joined #osdev
vinc has joined #osdev
Maja_ has quit [Ping timeout: 260 seconds]
bgs has quit [Remote host closed the connection]
DrMushroom has quit [Quit: WeeChat 3.8]
goliath has joined #osdev
air has quit [Quit: cria 0.2.9cvs17 -- http://cria.sf.net]
Burgundy has joined #osdev
air has joined #osdev
Burgundy has quit [Remote host closed the connection]
GeDaMo has joined #osdev
elastic_dog has quit [Ping timeout: 246 seconds]
elastic_dog has joined #osdev
xenos1984 has quit [Read error: Connection reset by peer]
xenos1984 has joined #osdev
SGautam has joined #osdev
MiningMarsh has joined #osdev
elastic_dog has quit [Ping timeout: 246 seconds]
gog` has joined #osdev
nyah has joined #osdev
elastic_dog has joined #osdev
zxrom has quit [Ping timeout: 246 seconds]
MiningMarsh has quit [Ping timeout: 252 seconds]
vinc has quit [Read error: Connection reset by peer]
vinc has joined #osdev
zxrom has joined #osdev
<SGautam> https://usercontent.irccloud-cdn.com/file/ndmOLYg3/image.png Does anyone know what this sequence is? Python's pip uses it to print its progressbar but my terminal is obviously doesn't implement UTF-8. I mean the sequence I'm getting is 0xE2 0x82 so its definitely UTF-8
vinc has quit [Read error: Connection reset by peer]
gog has quit [Quit: byee]
gog` is now known as gog
<GeDaMo> Should be 3 bytes
<zid> yea
<zid> high bit is still set
<zid> e2 83 91 is my guess
<zid> that's a terrible guess wtf
vinc has joined #osdev
<zid> I think.. e2 82 80 - e2 82 bF are valid?
<GeDaMo> 3F I think
<zid> e2 82 3f is invalid
<zid> last byte has to be >= 0x80
<GeDaMo> Yeah, you're right
<zid> anything non-ascii is outside it
<zid> for every byte
netbsduser` has joined #osdev
<zid> 1110xxxx 10xxxxxx 10xxxxxx
<zid> and 10xx can't go above B, so you have 80-BF
vinc has quit [Read error: Connection reset by peer]
Harriet has quit [Quit: I need a rest]
[itchyjunk] has joined #osdev
gildasio has joined #osdev
Lian has joined #osdev
MiningMarsh has joined #osdev
vinc has joined #osdev
vinc has quit [Read error: Connection reset by peer]
Lian has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
vinc has joined #osdev
<SGautam> oh yeah i did this and it works: https://usercontent.irccloud-cdn.com/file/4eqxSdGE/image.png
<SGautam> Is there a better way to determine how many bytes a unicode character is needed without that switch statement?
<SGautam> I'm trying to think of a function
<zid> just ignore anything >=0x80 if you're just stripping
<SGautam> 10 - > 1, 14 -> 2, 15 -> 3
<SGautam> Nah, I want to show the unicode character as a blank
<zid> fair enough
<nortti> < SGautam> Is there a better way to determine how many bytes a unicode character is needed without that switch statement? ← https://nullprogram.com/blog/2017/10/06/
<bslsk05> ​nullprogram.com: A Branchless UTF-8 Decoder
<SGautam> oh wow, so this is a bit of a complex issue it seems.
<zid> no, it's just that cpus are fast in weird ways
<zid> all he's really doing is ptr += c>>5; with a fixup
<zid> and then doing UB
<zid> There's actually avx512 utf-8 decoders, but it needs pascal strings for the same reason, it's UB to over-read the end
<nortti> yeah, and realistically in a terminal emulator utf-8 decoding is not going to be a bottleneck
<nortti> you might find it useful to use a table and lookup on the high nybble to get the length, if you want to avoid a switch statement, tho
<Ermine> Somewhy my efi app hangs at EFI_SIMPLE_FILE_SYSTEM_PROTOCOL.OpenVolume
<Ermine> ... applied to ESP
<SGautam> hm, we can at least run mapscii in somewhat readable mode https://usercontent.irccloud-cdn.com/file/zR7VQc2p/image.png
<zid> I just use unifont, it's got the lowest 16k glyphs or whatever
<zid> and you just index it as an array
<zid> gg
<zid> it's good enough for all the normal box drawing and european language stuff
<zid> ttf is for noobs
<bslsk05> ​paste.sr.ht: main.c — paste.sr.ht
<Ermine> It stalls after printing "Opening ESP Root..."
<Ermine> Also, tried copying file on the same partition with uefi shell's copy command, and it stalled as well. Maybe some bug?
ZipCPU has quit [Ping timeout: 264 seconds]
zxrom has quit [Ping timeout: 246 seconds]
gareppa has joined #osdev
phoooo has joined #osdev
<phoooo> hi, i am doing some baremetal programming for the qemu riscv64 virt board, and i came across a weird problem. even though i specify an entry in my linker script, that's not the first instruction in the resulting elf. i need to add a .text.boot section inside the .text section of the linker script to force the linker to put the boot label into the
<phoooo> very start of the file. any idea on why this is happening?
ZipCPU has joined #osdev
* phoooo cries on the linker
mhall has joined #osdev
stolen has joined #osdev
vinc has quit [Read error: Connection reset by peer]
vinc has joined #osdev
<mjg> We used to implement the lockless slab shrink with SRCU [1], but then kernel
<mjg> test robot reported -88.8% regression in stress-ng.ramfs.ops_per_sec test
<mjg> case [2], so we reverted it [3].
<mjg> lol
<Ermine> Lmao, is it fbsd?
<mcrod> hi
<mjg> lol @ thinking freebsd has a kernel test robot
<bslsk05> ​lore.kernel.org: [PATCH v4 00/48] use refcount+RCU method to implement lockless slab shrink
<Ermine> heat is offline btw
<mjg> :p
<phoooo> hmmm
sparklysara has joined #osdev
<zid> mcrod: did you dark any soul?
<zid> phoooo: because that isn't how it works, basically
<zid> you grouped some input sections to some output sections, there's nothing you can do to order it unless you explicitly invented a mechanism to do it, like you did
<zid> ELF has an entry point so it isn't really needed generally, and it gets in the way of optimizations if it *must* be in the order specified on the command line, for example
<mcrod> zid: bed of chaos now
<mcrod> once that's over, i have all 4 souls
<zid> oh, I missed you killing six kings and seath then
<zid> how was crystal caves and dragon daddy?
<mcrod> i hate it
<zid> nice
<zid> how far towards bed are you, still in blight town or are you saved deep in ruins already?
<mcrod> i'm literally at the boss
<zid> ah so you just need to PERFORM THE ACTIONS
<mcrod> i've been told what you actually have to kill dies in one hit
<zid> yea it's a puzzle boss
<zid> not a fighty fight boss
<zid> more like a zelda boss than a devil may cry boss
<phoooo> zid: ohhhh, thanks!
<mcrod> DS1 is by far the hardest dark souls though
<mcrod> DS2 and DS3 are cakewalk
<zid> ds3 is WAY harder
<mcrod> no it isn't
<mcrod> not even close
<zid> like, doesn't even *compare*
<mcrod> ds3 I can beat with my hands tied behind my back
<zid> go compare like, dancer, to any boss in dark souls
<zid> the ones in dark souls die in 4 hits and are trivially cheesed in multiple ways, and have very simplistic attack patterns
<mcrod> the bosses aren't the issue
<zid> the only boss that feels remotely similar to the complexity of a ds3 boss is kalameet
<mcrod> it's the areas
<zid> I f ucking *hated* learning the ds3 areas
<mcrod> 9 times out of 10 the areas are much harder to traverse
<zid> the director decided that 'ganks are funny'
<mcrod> and walking on invisible platforms is not
<zid> fuck the snow area, fuck the cathedral area, etc
<zid> it's all total aids until you learn it
<zid> and some of it stays aids even after
<zid> ds1 is very "it's bad, but then you learn about streaking and it's trivial"
<mcrod> I would say DS2 is much more annoying than DS1 or DS3 though
phoooo has quit [Quit: Client closed]
goliath has quit [Quit: SIGSEGV]
<zid> ds2 was super super vanilla
<zid> it was just corridors with fights in
<zid> other than like, the blacksmithing castle place
<mcrod> hollowing is annoying in DS2 but a lot less annoying compared to DS1
<mcrod> in DS3 it's just whatever
[itchyjunk] has quit [Read error: Connection reset by peer]
<zid> ds3 is just ds1 but *aggresively* more of everything
<mcrod> DS1 it's "sacrifice these items that only drop a few fucking times"
<zid> bro
<zid> you know there are like 90 raw humanity pickups in the world right?
<zid> and like, 20 bonfires?
<zid> plus you get free soft humanity for killing mobs, plus mob drops
[itchyjunk] has joined #osdev
Burgundy has joined #osdev
zxrom has joined #osdev
y0m0n has joined #osdev
y0m0n has quit [Remote host closed the connection]
Burgundy has quit [Remote host closed the connection]
Burgundy has joined #osdev
<Mutabah> mcrod: rats drop humanities with a decent rate
<zid> and the foetuses
<zid> and are much more fun to smash with a giant hammer than rats
<Mutabah> yeah, but that's late in DLC
<zid> no
<zid> where even are those in the DLC?
<Mutabah> wait, which ones?
<zid> oh you mean the soul mass people?
<zid> I mean the literal child skeletons in nito's area
<Mutabah> The sprites in the DLC drop humanities... ah, those one
<zid> smashy smashy
<Mutabah> yeah. also a good source, but also kinda late-game (although not DLC late)
<zid> he's past it
<zid> it's up to gwyn
<zid> well, he's at bed of chaos
<zid> should probably do the DLC after bed
[itchyjunk] has quit [Read error: Connection reset by peer]
[itchyjunk] has joined #osdev
phoooo has joined #osdev
[itchyjunk] has quit [Ping timeout: 245 seconds]
<phoooo> hi, it's me again! is it more recommendable to put the stack inside the bss section or just after it in my linker script? i mean, it should make no difference, but im curious whether there's some general consensus.
bgs has joined #osdev
vinc has quit [Read error: Connection reset by peer]
[itchyjunk] has joined #osdev
phoooo has quit [Quit: Client closed]
vinc has joined #osdev
phoooo has joined #osdev
Harriet has joined #osdev
phoooo has quit [Quit: Client closed]
heat has joined #osdev
<heat> hi IDIO^W friends
phoooo has joined #osdev
<heat> mjg, toppest of keks
<mjg> sup MORO^W mate
<mjg> ikr
<phoooo> :o
<heat> phoooo, btw, yes put the stack in .bss
<heat> everything(*) thats zero-initialized should be .bss
<phoooo> hmmm, but should the stack be zero initialized?
<phoooo> like, does it really matter?
<gog> yes
<phoooo> oh, okay
<heat> erm
<heat> why not?
<heat> you save file space that way
<gog> or rather, if you're declaring the stack as a block of uninitialized data somewhere you might as well put it in .bss
<heat> there's a reason why C variables with static duration all get zero-initialized as well
<gog> because as heat says you save space in the image
<Ermine> Hi ASSH^W heat
<gog> Ermine: may i pet you
<phoooo> heat: but stack variables might be garbage
<Ermine> gog: no, but I can pet you
<Ermine> if you want
<gog> yes
* Ermine pets gog
* gog prr
<heat> phoooo, but that's after you're running on that stack
<heat> and have pushed/popped enough for the stack memory to get leftovers
<Ermine> heat: what do you think of my uefi issue
<heat> what issue?
<mjg> heat: btw fucker, that kek is an excellent example why you fucking benchmark before even posting
<phoooo> heat: oh, didn't know that
<phoooo> thankies
<Ermine> heat: https://paste.sr.ht/~ermine/51779bb06aad2268945f31a3baf500a41116fa80 -- stalls after "Opening ESP Root..."
<bslsk05> ​paste.sr.ht: main.c — paste.sr.ht
<heat> have you tried handling errors?
<Ermine> Yes
<heat> UINTN DataSize = 258;
<heat> CHAR8 Data[256];
<heat> ??
<phoooo> and regarding the saving space thing, you are referring to the fact that bss just says allocate from here to there, and creating a new section for the stack implies wasting extra space, right?
<phoooo> whereas putting it inside the bss is basically free in terms of elf space
<gog> it has to do with the PHDR for the data segment, it has two attributes that define its size in ELF
<heat> yes, there's no need to save the contents of char stack[4096]; if they're all 0
<gog> filesz and memsz
<heat> ^^
<Ermine> Good question, but it doesn't reach the point those vars are even used
<heat> Ermine, you're saying the shell's copy hangs?
<Ermine> Yes
<heat> on a clean boot
SGautam has quit [Quit: Connection closed for inactivity]
<Ermine> wdym clean boot
<gog> Ermine: have you determined that loaded image protocol is returning a valid protocol?
<heat> without your DIRTY code running first
<Ermine> yes
<gog> anyhow, the elf loader will allocate for memsz, read filesz bytes from the image and then zero out memsz - filesz bytes
<heat> Ermine, can you link me the fs image you're using? plus repro steps
<heat> wait, you're using FAT right?
<Ermine> Yes
<Ermine> that's ESP
<Ermine> Of my computer
<heat> so you're rebooting into your bootloader?
<Ermine> yes
<heat> risky
<heat> i would suggest you test on OVMF first
<Ermine> I like risk
<gog> yes
<gog> i thought youwer e testing this with OVMF first
<mcrod> gog may I hug you
<gog> mcrod: yes
<heat> that introduces a whole new problem vector
* mcrod hug gog
<heat> i would not be surprised if you had the great chance of getting a fucked FAT32 Write() implementation
<heat> which has happened in the past
<heat> many times
<Ermine> Time to learn mformat, mcopy and friends
<heat> (these people don't know how to write reliable, correct software)
<bslsk05> ​github.com: Carbon/scripts/make_efi_iso.sh at master · heatd/Carbon · GitHub
<heat> anyway I do *NOT* advise trying to write
<heat> this is why my ext4 driver does not support writing
<heat> the IBVs are nuts
<heat> AMI has a whole custom fork with a custom build system that replaces tiano's (this build system is also arcane and sucks), everything got reorganized and nothing makes sense
<heat> these people *do not* know what they're doing
<Ermine> Maybe it's time for coreboot
<Ermine> my board is one step away from being supported
<heat> coreboot's code isnt all that much better, just with less crap on top :/
<Ermine> It can theoretically be modified, while stock firmware is EOL probably
phoooo has quit [Quit: Client closed]
<heat> Ermine, have you tested with ovmf?
<Ermine> Not yet
vinc has quit [Read error: Connection reset by peer]
Jari-- has joined #osdev
<heat> mjg, did you grok why synchronize_srcu shits itself there? i didn't
[itchyjunk] has quit [Read error: Connection reset by peer]
<mjg> where
<mjg> in their patchset?
<mjg> i was too busy getting work done to look
<heat> sorry mr "working"
<heat> lmao
<heat> proletariat my ass
<mjg> check out this turing award winner https://lkml.org/lkml/2023/8/7/1118
<bslsk05> ​lkml.org: LKML: Mateusz Guzik: [PATCH] cred: add get_cred_many and put_cred_many
<heat> genius
<mjg> ikr
<mjg> i hope for less than 80% perf loss though
<mjg> maybe i should add a sleep there or something
goliath has joined #osdev
<heat> >It really shouldn't be prefixed with vma.
<heat> get fucked
<Ermine> Hm, in OVMF it fails to get SIMPLE_FILE_SYSTEM_PROTOCOL, though it succeeds on my computer
<bslsk05> ​marc.info: '+ mm-move-dummy_vm_ops-out-of-a-header.patch added to mm-unstable branch' - MARC
<mjg> heat: what now fucker^W
<mjg> the real q is how did this happen to begin with
<mjg> liek wtf
<heat> andrew morton is crap and poopy and does not respect the great unix code style
<mjg> unix dame: v_d_op
<heat> struct vmops defvmo;
<mjg> and _ are there if you are lucky
vinc has joined #osdev
<Ermine> Second time it succeeded
<Ermine> ... and stalled at OpenVolume
sparklysara has quit [Changing host]
sparklysara has joined #osdev
phoooo has joined #osdev
phoooo has quit [Quit: Client closed]
<mcrod> heat: ok I lit the whole kiln on fire
<mcrod> my job is done
<mcrod> wait a minute...
<mcrod> does... does it make you start the whole fucking game over again?
<mcrod> what.
[itchyjunk] has joined #osdev
sparklysara has quit [Quit: Leaving]
m3a has quit [Ping timeout: 246 seconds]
<heat> yep
<heat> hahaha
<bslsk05> ​paste.sr.ht: e6352ac — paste.sr.ht
<Ermine> clang generated pdb, wow
<bl4ckb0ne> looks like you have a triple fault there
<Ermine> shouldn't real machine reboot if that's a triple fault?
stolen has quit [Quit: Connection closed for inactivity]
dutch has quit [Quit: WeeChat 4.0.1]
<heat> no
<heat> that's not a triple fault
<heat> #PF - Page-Fault
<Ermine> I've checked, everything before OpenVolume returns EFI_SUCCESS
<heat> bro
<heat> found the bug
dutch has joined #osdev
<heat> turn on -Wall -Wextra
<heat> SystemTable->BootServices->HandleProtocol(
<heat> LoadedImage->DeviceHandle,
<heat> &SimpleFSProtocolGuid,
<heat> (VOID**)ESP);
<heat> C is ass
<mcrod> it is lovely
<Ermine> Loool
<Ermine> thank you heat very much!
<Ermine> Though -Wall -Wextra didn't point to anything
<heat> -O2?
<heat> or do you need to turn on UBSAN for this lol
benlyn has joined #osdev
<Ermine> no
<heat> Wuninitialized seems to work properly here
<heat> (for a very reduced sample)
<Ermine> Time to figure out how to use debugger
<heat> don't?
<Ermine> Why?
<Ermine> In userspace I find this kind of shit easily with debugger
<heat> why would you?
<heat> these EFI images are all relocatable, aka unfun
<Ermine> Well ok
Jari-- has quit [Remote host closed the connection]
<Ermine> Will ubsan work in efi?
<mcrod> i wish ubsan wasn't so big
<heat> no
<mcrod> it would be so useful for us
<Ermine> Okay
Jari-- has joined #osdev
<sham1> heat: the thing that's ass there is not C, but EFI
<heat> no, its definitely C
<mcrod> why aren't designated intializers a thing in C++
<Ermine> Why those images are relocatable?
<mcrod> oh C++20
<heat> because the EFI address space is dynamic
<Jari--> paging?
<heat> 2 images say "i want to run at 16MiB" and you're donged
<heat> this is firmware, single address space
<Ermine> Well, so in OSes images are not relocatable?
<Ermine> So debuggers work?
* geist yawns
<heat> you need heaps of magic to get all of that working properly
<heat> so for a bootloader, you find your bug and move on
<heat> OSes already have that magic built in
Harriet has quit [Quit: WeeChat 4.0.2]
vinc has quit [Read error: Connection reset by peer]
<heat> geist, im giving up on arm64 for now
<geist> aww just one day!
<heat> i think its a timer problem but i really dont see it
<geist> oh gosh thats an easy one. you can do it!
<heat> i think the frequency is too low and its screwing with some math
<geist> well, it is fairly low, what does it say it's at?
<heat> 19200000Hz
<heat> around 55ns period
<geist> yah 19.2Mhz is pretty common
gorgonical has joined #osdev
gorzon has joined #osdev
<gorzon> How much worse off am I, if my kernel doesn't allow pages of page tables which only have PTEs referring to swapped out pages, to themselves be swapped out?
<zid> better off
<zid> we had this conversation last week
<nortti> generally speaking modern kernels do not swap out page tables due to the knock-on effect that has on performance and the complexity it adds
<heat> these 3 messages above me, but in portuguese
stolen has joined #osdev
<gorzon> Unfortunately I do not speak Portuguese. Well, I've been warned, on another community
<heat> yet
<zid> still holding out hope for that portugal as superpower ending?
<heat> everybody gangsta until a bunch of slightly tanned guys arrive on a caravel
<gorzon> I was told ~ if you don't make page tables which have no PTEs for resident pages to be themselves swappable - you got a problem because now if you have a lot of virtual memory, but only a smaller fraction of that physical, then when you are using significant virtual memory, you use a disproportionate share of physical.
<zid> good news, it's not the 80s
<heat> are you the indian book guy?
<zid> yes
<zid> and you're not writing for a timesharing machine
<gorzon> I'm from Europe
<zid> running 800 processes per 1MHz cpu
<heat> right
<heat> we had 2 "should i swap page tables" guys
<heat> you're the 2nd
<zid> no way
<gorzon> zid: I'm writing for amd64 computers, maybe someday I will port to another architecture.
<heat> yeah and the other guy was writing for riscv64
<heat> ANYWAY
<heat> 1) this is not a realistic case
<heat> 2) swapping kernel internal critical data structures in/out is very expensive in runtime and complexity
<zid> gorzon: exactly my point
<gorzon> heat: But what about the major operating systems? Linux, Windows, macOS, FreeBSD, Fuschia. What do they do?
<heat> they don't swap page tables
<zid> It's just nto a useful thing to do on a modern machine. It *might* be useful on a *very* specific type of old mainframe
<zid> running a very specific load
<Ermine> Btw does linux allow processs to lock their pages in memory so they don't ger swapped
<heat> linux and windows take it a step further and store important bookkeeping data in PTEs
<heat> yes
<heat> mlock()
<qookie> Ermine: see mlock(2)
<qookie> oh too slow
<heat> in fact, mlock is POSIX
<Ermine> qookie, heat: thank you
<heat> aktshually
<heat> mjg, does freebsd swap em?
<heat> i assume not but freebsd is weird sometimes
<heat> note that trivially you would not swap page tables but rather duplicate all that data in internal data structures and then tear them and rebuild them as you'd like
<heat> which AFAIK in theory works for freebsd pmap and maybe fuchsia
<mjg> bro don't ask me about fbsd stuff
<mjg> assume it is doing something stupid and get on with your life
<Ermine> First rule of fbsd club: never ask about fbsd stuff
<gorzon> heat: Yes, I remember that from college. 4.4BSD uses it's own special structures to describe the address space and generates page tables on-the-fly with them. But I assumed that those special structures can get swapped out.
<heat> no
<heat> windows is actually swappable in the kernel but AFAIK not on these core areas
<gorzon> heat: I do it the Linux/Windows way. For example, when I swap out a page which is used only by one process (for example, it's a page in a MAP_PRIVATE mapping that got COW, or just MAP_ANONYMOUS | MAP_PRIVATE), I replace the PTE with an invalid PTE which is coded to show that it's a swapfile index.
<heat> mjg, are u linkux ekrenal developer now
<heat> known performance expert in the lkml
<mjg> no need to be nasty
<mjg> i consider myself a developer without a project
<heat> fuck you mjg59, i am the mjg now
vdamewood has quit [Read error: Connection reset by peer]
terminalpusher has joined #osdev
vdamewood has joined #osdev
<Ermine> > ekrenal
<gog> hi
<Ermine> hi gog
<gog> hi Ermine
<gorzon> Which existing kernel did most users here design their kernel?
<sortie> People have used lots of different designs
<sortie> I'm guessing that a monolithic kernel in the style of Linux is probably the most common
<mjg> i think the most common is claiming your have micro kernel
<mjg> when you are in fact monolithic
<sortie> I actually have user-space filesystems
<mjg> mostly happens with end users though
<mjg> i experienced people saying most outrageous things about os internals
<gorzon> I claim that my kernel a hybrid kernel, because it sounds cool, but infact it means whatever you want it to mean.
<mjg> normally it was fanboys of whtatever os
<mjg> your kernel is automatically cool if it ends with an 'x'
<sortie> My OS ends in -ix for plan 9 compatibility
<heat> i have budget linux
Reinhilde is now known as AmyMalik
<sham1> nanokernel!
<mjg> freenux
<GeDaMo> sux
<sham1> mux
<gog> mux
<mcrod> hi
<sortie> tix
<heat> tux
<moon-child> moew
<GeDaMo> dux
<heat> linux kernal operatingsystem
<heat> gnu slash linux, or as ive recently taken to call it, gnu plus linux
<mjg> gnu plus linux SLASH LIBRE KURWA^W
<moon-child> mateusz guzik or, as i've recently taken to calling him, matthew garrett
<heat> 💯
<heat> same letters, same nick, at this point i'd just take his fucking name and move on
<sham1> fart fart fart
<mcrod> firefox is shitting out everywhere on me today
<heat> use chrome
<moon-child> 'firefox is shit'
<mcrod> it is shit
<mcrod> but I don't use chrome because of the war against adblockers
<heat> <sham1> fart fart fart <-- sortie can we make this the channel's topic? thanks
<mcrod> does anyone have an issue where they suddenly cannot search without explicitly going to google.com
<mcrod> on every machine I have it is just hanging
<sortie> heat, yes can do that
<nortti> mcrod: works for me without any issues if I try on a clean profile
<mcrod> hm okay
<mcrod> maybe it's an extension killing me
<mcrod> well on mac it's okay now
<moon-child> tbf
<moon-child> chrome is also shit
<mcrod> on Linux it's killing me
<moon-child> but in different ways
<moon-child> :)
<mcrod> chrome is shit in the sense that the internet is now whatever chrome decides to do, even if it isn't the standard
<mcrod> it's also shit, because google
<mcrod> i remember when I was 14 (i'm 28 now) and firefox was the shit
<mcrod> then chrome came in and killed it like a cockroach
<mcrod> i have difficulty explaining to some real life friends that no one thinks about firefox anymore when doing web dev
<sham1> Chrome is shite and using it is anti-open web
<mcrod> it's usually Edge or Chrome these days that people care about
<gog> meowpen web
<moon-child> no I just mean like in terms of usability
<moon-child> idgaf about what happens to the world anymore
<moon-child> it can fend for itself
<Ermine> now instead of two shitty browsers we have two shitty browsers
joe9 has joined #osdev
<gog> hi
<Ermine> I feel like doing opengl tutorial
<mcrod> in usability yes, firefox is still slightly better
<mcrod> if only because adblockers will be protected
<mcrod> Ermine: hey I'm doing a tutorial of sorts too
<mcrod> not for opengl
<zid> we have chrome, and firefox that wishes it had enough money to be chrome
<mcrod> but it is a part of it
<zid> woo
<mcrod> gog: goggles may I pet you
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<gog> yes
terminalpusher has quit [Remote host closed the connection]
<zid> is it an hour from now yet
<zid> it is mynesday my dudes
terminalpusher has joined #osdev
* mcrod pets gog
* gog prr
<mcrod> in 11 days I move
<mcrod> who is going to crash at my apartment and have beers
<gog> me
<mcrod> yay
nanovad has quit [Ping timeout: 260 seconds]
<zid> where is it
<mcrod> the US
<zid> ah no thanks
<mcrod> if it was in europe I think it'd be easier
<mcrod> i've thought about going to the UK for a trip
gorzon has quit [Quit: Turtle]
<sham1> That's tad far
<zid> Have you not died to a no knock raid then had all your stuff civil forfeitured yet, fake american
<zid> hasn't even died in a school shooting yet
<geist> okay now
nanovad has joined #osdev
<sham1> Yeah, that's a tad too much
<Ermine> #osdev conference when
<mcrod> it'd be cool
nanovad has quit [Client Quit]
nanovad has joined #osdev
zxrom has quit [Quit: Leaving]
<mjg> you go to an osdev conference
<mjg> and it turns out nobody is doing osdev
<mjg> but i already made that ocmment
Cindy has quit [Quit: ZNC 1.8.2 - https://znc.in]
TheCatCollective has quit [Quit: Meow Meow Meow Meow Meow Meow Meow Meow]
TheCatCollective has joined #osdev
joe9 has quit [Read error: Connection reset by peer]
TheCatCollective has quit [Quit: Meow Meow Meow Meow Meow Meow Meow Meow]
joe9 has joined #osdev
TheCatCollective has joined #osdev
<gog> osdev convention here
<gog> but instead it's just ermine petting me
<gog> speaking of which i got a kitty sticker for my computer
<sham1> :3
<gog> yes
<gog> the kitty is doing that face
<bslsk05> ​i.imgur.com <no title>
bnchs has joined #osdev
bnchs is now known as Cindy
joe9 has quit [Read error: Connection reset by peer]
vinc has joined #osdev
joe9 has joined #osdev
<bslsk05> ​i.imgur.com <no title>
<heat> mjg, you go to bsdcan
<heat> and it turns out nobody is using BSD
<zid> people don't use bsd, it's like, a classic car
<zid> you own it so you can repair it
<zid> not so you can drive it
<heat> and so you can tell people you have it
<zid> yep
<zid> classic ferrar^BSD owners club
<zid> It gets 2mpg and has 14 horsepower, but it looks pretty!
<jimbzy> Then you have to join a club/
joe9 has quit [Read error: Connection reset by peer]
joe9 has joined #osdev
gareppa has quit [Quit: WeeChat 3.8]
joe9 has quit [Quit: leaving]
\Test_User has quit [Ping timeout: 245 seconds]
<zid> It is 9:02 UTC monday my friends
<zid> is time.. for book
<sham1> 9:02? You mean 21:02?
<sham1> And by now 21:09 UTC
<zid> 9:02 ANNO MEDIUM LEG
<zid> POST MILLENIAL
<zid> fucking thing is late, the discord is absolutely on fire
<mcrod> so, this sucks
<zid> agreed
<mcrod> somehow I didn't realize that audio generation incurs a _lot_ of data
ZipCPU has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
<zid> Usually at least 44100 * 2 * 2 bytes/sec
ZipCPU has joined #osdev
<mcrod> completely skipping over the required 1 second of silence and the other thing which can be up to 25 seconds
<zid> That's why a CD could only hold 70 minutes or whatever
<zid> 2 seconds
<zid> PREGAP
<mcrod> I have 268 characters maximum, and each bit of the character has to be transmitted every 1.92 milliseconds
<mcrod> so basically, {'a', 'b', 'c', 'd'}, 1.92ms='a', another 1.92ms later, 'b'
<zid> better than dialup!
<mcrod> so I have (268*8*84) at MOST, because (0.000192*44100)==~84
<mcrod> but that's only for one aspect of this problem
<zid> I have no idea what the context here is btw
<zid> and I can't figure it out either
<bslsk05> ​www.ecfr.gov: eCFR :: 47 CFR 11.31 -- EAS protocol.
<heat> the gang breaks federal US law
<mcrod> only if you transmit
<mcrod> which, if you do, guarantee the FCC will come and kill you for this
<zid> That's what the black helicopters are for
<mcrod> at any rate
<heat> so you're writing something you can't test?
<mcrod> no I can test it
<heat> how?
<zid> do it locally
<mcrod> I can put it through SeaTTY
<mcrod> and see if it can decode it properly
<mcrod> anyway this is scarcely the point
<mcrod> point is I'm looking at like 1MB of data
<zid> So far I've found out you're trying to encode something, and it has something to do with audio
<zid> but not why that's hard
<mcrod> and I don't want to use dynamic allocation, in some cases I wouldn't be able to (e.g., embedded targets)
<mcrod> thought: for every sample, call a function to handle that sample
<heat> char buffer[0x100000];
<heat> paypal me later, thanks
<mcrod> but a call instruction would kill the performance
<mcrod> heat: on windows as far as I'm aware the stack limit is 1MB
<zid> usually for audio you have a small ringbuffer and an interrupt/callback happens/whatever when it starts getting low
<heat> make it a global
<mcrod> the good thing about all of this is I know ahead of time what the limits are
<mcrod> the maximum size of a header is 268 characters (counting the dashes, preamble bytes), but what you pass to it may not be 268 characters
<mcrod> also, we're not even discussing the double sine wave that can last up to 25 seconds
<heat> this is so embedded it's making me sick
<mcrod> you make me SICK
<heat> quick, make it scale
<heat> flamegraph it
<heat> does it scale to 64 CPUs? if not, why are you stupid?
<mcrod> why are *you* stupid
<mcrod> you didn't even tell me not to link the fire until I was done with that playthrough
<heat> fuck you
<heat> dude
<mcrod> :(
<heat> you did that on your own
<heat> didn't even ask
<mcrod> because in every other dark souls game it asks
<heat> not in the best dark souls
<mcrod> gwyn was piss easy though
<heat> it was?
<mcrod> i thought it'd be much harder
<mcrod> yeah I killed him on my first try
<heat> i find gwyn horrendously difficult sometimes
<heat> you either get all the parries with the parry strategy or the thing becomes a hella more difficult
<mcrod> no I just bonked him to death
<heat> he gives you very little time to breathe, very punishing
<heat> somewhat ds3-like?
<mcrod> also helps that I was able to poise through all of his attacks
<mcrod> thanks havel
<heat> btw
<heat> new playthrough for the DLC?
<mcrod> i've been thinking about deprived
<heat> did you even kill all bosses?
<mcrod> no
<heat> which ones did you miss?
<mcrod> all of the optional ones
<heat> gwyndolin, stray?
<mcrod> man I wanted to rank up in the covenant
<mcrod> and that's.. almost impossible
<heat> i remembered you killed the moonlight butterfly
<mcrod> oh i thought that was mandatory
<heat> no
<heat> oh, painting world too, you never went there did ya
<mcrod> nope
<mcrod> "The Attention Signal must be made up of the fundamental frequencies of 853 and 960 Hz. The two tones must be transmitted simultaneously." <- I guess this means "do two sin() calls and add the results together"
<heat> "regular" playthough is asylum -> taurus -> gargs -> capra -> gaping -> spidey -> iron golem -> O&S -> 3 lords ... -> eventually ceaseless -> other 3 bosses in this "lord" storyline -> gwyn
<heat> oh and sif too somewhere along the path for the 4 kings
<mcrod> at least now I'll have a better idea of what I'm doing when I go deprived
<mcrod> I usually do a deprived run in every DS I beat
<heat> my pathing is usually asylum -> gargoyles -> spidey -> ceaseless -> golem -> O&S -> then whatever lords i feel like
<heat> very rarely do I kill the stray demon, and sometimes I kill moonlight or taurus from the garden for more souls if im in need
<sortie> I'm not allowed to talk about the thing between ceaseless and O&S
\Test_User has joined #osdev
<mcrod> heat: i'm going to name my new deprived class after you
<mcrod> heat3d should be your 3D game engine name if you ever make one.
<heat> thats cool
<geist> High Expectations And Trash 3d
bgs has quit [Remote host closed the connection]
<heat> that's a good description of a game engine written by me
<kof123> game engine writes you! </yakov conway>
<zid> You can use my game engine skeleton I made a few weeks ago as a basie
<gog> jimbzy: he is kenough
<jimbzy> Heee
<heat> sortie, i didnt get the joke btw
<sortie> heat, no joke, nda
dutch has quit [Quit: WeeChat 4.0.2]
MiningMarsh has quit [Ping timeout: 245 seconds]
<gog> heat: hi barbie
<heat> hi goggie
<mjg> heat: there is always at least one bsd fanboy
<gog> i luuurrrv freebsd
<gog> freebsd is so amazern
<heat> freebsd changed my life
<heat> ever since i started using freebsd women started avoiding me on the street
<mjg> are you sure it's not arch
<heat> might be linux in general
<mjg> btw, i installed freebsd on computers of 2 girlfriends
<mjg> bad call
<mjg> in my defense i was about 18 and 20 respectively i think
<mjg> heat, if you had a gf, would you install onyx on her laptop
<heat> why do i not have wireless mateusz
<heat> fuck no
<heat> one does not install onyx
<mjg> want to hear a workaround p[eople consider viable
<mjg> install a linux vm and passthrough the wifi card :d
<heat> one runs the exact same command(s) i run
<heat> oh fuck off
<heat> now you're trolling
<mjg> for real man
<mjg> no jokes
<sortie> heat, try Sortix and the popstars will throw themselves at you
<mjg> that's nothing
<mjg> Debian GNU/Hurd is the ultimate wingman
<mjg> check this out
<heat> debian GNU/kFreeBSD
<mjg> gog: ey gogs, guess what i just installed
<heat> solaris
<mjg> heat: i would let bmc write an autograph on my asscheek
stolen has quit [Quit: Connection closed for inactivity]
<heat> he created your whole shtick
<heat> no dtrace no mjg im afraid
<sortie> mjg, nah, GNU/Hurd only lets you pull fsf fanboys
<mjg> heat: dude there is more to tracing and profiling than dtrace
<mjg> heat: i was using OPROFILE in 2008 or so
<mjg> the fuck were you doing
<mjg> oh i know, making your pampers heavier
<heat> in 2008?
<heat> i was finishing kindergarten
wblue has joined #osdev
<heat> mjg, where were you during 9/11
<mjg> that i remember
<mjg> i came back home from middle school
<mjg> turned on tv
<mjg> and bam, footage of the plane flying into wtc
<heat> "mission accomp-^W^W"
<heat> you know where I was?
<heat> nowhere
<mjg> in thew omb?
<heat> wasn't even fucking born
<zid> unreal
<zid> I was in highschool
<mjg> boomer
<heat> OLDIES
<heat> OLDIES EVERYWHERE
* mjg takes pills for alzheimer
<zid> That's why I play good, modern games, like dark souls 1 and diablo 2
<heat> cs1.6
<gog> mjg: illumos
<heat> gog, you're a haiku gal right?
<mjg> that's right up geist's alley
<mjg> real q tho, in what sense haiku
<mjg> are you contributing?
<heat> in the joking sense im afraid
<gog> i haven't contributed to haiku
<gog> but i like it a lot
<mjg> i recently ran into serenity os again
<mjg> they make monhty summaries on youtube
<gog> i've never even looked at serenity os
<mjg> not my cup of tea but you should check it out
<mjg> they have a unix-like sysrtem with windows-esque gui
<heat> i stan good traditional hobby OSes like toaruos and sortix
<sortie> I like operating systems that I can download. If I want to compile huge sttuff I got my own monstrosity
<gog> i don't like operating systems
<heat> i dont want none of that hokey pokey smile for the camera hobby OS give me donations bullshit
<zid> If you like your OS you're weird, tbh
<zid> It's basically firmware, it should be invisible and always work
<gog> like me
<heat> >firmware
<heat> >always work
<heat> pick 1
<zid> (the should also applies to the firmware)
<zid> load-bearing should
gog has left #osdev [byee]
gog has joined #osdev
<gog> whoopsie
<gog> i hit actual ctrl-w instead of typing ^W
<zid> gog, /part and /quit were in a boat but /part fell overboard, who was left on the boat?
<gog> /quit
dutch has joined #osdev
<gog> i don't get the joke zid why don't you explain it to me one word at a time
heat has left #osdev [Leaving]
<zid> heat got the answer wrong :( It was a tricky riddle to be fair.
heat has joined #osdev
<heat> hehehe
<heat> he
<heat> hehehe
<gog> hehehehehehehehehehehe
<mjg> prefix your message with /disco to have it printed in colors!!
<heat> btw mjg i've just found out/remebered that x86 has NMI timer capabilities
<heat> so irq_save/restore isn't really a profiling barrier
<mjg> it is not
<mjg> unless you are using dtrace
<mjg> even freebsd can profile interrupts
<mjg> buty ou need to arm the actual profiling support in the cpu
<Ermine> heat, do you like solaris
<heat> yes
<moon-child> zid: i play fort knight and amogus
<moon-child> that's how you can tell I'm hip with the kids
<zid> I don't think you should admit to grooming so readily
<moon-child> oh no
<moon-child> am I being groomed by myself?
<heat> amogus sus
netbsduser` has quit [Remote host closed the connection]
netbsduser` has joined #osdev
<gog> sus amogus
<mcrod> legit question
<mcrod> perhaps too broad; how difficult would it be to target ARM
<heat> target ARM for what?
<moon-child> and which arm?
<mcrod> i dunno, let's say RPI
<heat> target for what?
<mcrod> what the hell do you mean what
<heat> for an OS? what's the scale here?
<mcrod> oh I thought "legit question" made OS implied
<mcrod> an OS targeting RPI
<heat> i can only speak about arm64 but it's not too hard
<mcrod> scale is "i have no idea, but I want to get something onto a screen and be happy"
<heat> the RPI is a piece of shit with plenty of shit hardware though
<mcrod> that may be true
<mcrod> but it also means people can test easier since everyone and their mom has an rpi in their house
<mcrod> however, I think my approach is backwards
<mcrod> most people _do_ start with x86 for a reason
<mcrod> and I suppose as a matter of tradition and there's 8923742937429 resources out there compared to arm
<heat> yes
<heat> riscv is simpler than both honestly
<geist> word
<heat> EXCEL
<mcrod> i think what i'm trying to say is "x86-64 is a beast, so start with the beast first, since if you understand the beast, your abstraction layers will probably be REALLY good for the next arch"
<geist> visicalc
<geist> it's a different kind of beast
<mcrod> although I have no idea if that's true and I may just be talking out of my ass
<heat> in terms of caching, multicore arm is probably the best for "solid, portable code"
<geist> maybe an analogy is x86 is like learning how to drive a big rig truck. lots of crap you have to deal with but then it goes down the road
<heat> heck, alpha? lol
<geist> and arm is more like a F1 car, and lots of details you need to know
<heat> in terms of caching, multicore,*
<geist> i dunno, not really a good analogy since both are the same
<mcrod> nah I see what you mean
<geist> just sort of a different set of details
<heat> x86 is forgiving on many details
<geist> arm has more footguns, x86 has more up front stuff you gotta just learn to ignore
<heat> UNDEFINED
<mcrod> but I feel like x86 is filled to the brim with debates which I don't really care about, buuuuut
<mcrod> "debates" in the sense of "a mov?! how DARE YOU"
<heat> huh?
<mcrod> i'm not quite sure how to articulate this into works
<mcrod> words
<klange> target all the things
<klange> klange: rv64 toaru port when
<mcrod> best way I can put it is x86 seems like "there are 400 ways to do things, and none of them are correct"
<heat> no?
<mcrod> then I suppose it's straightforward in the sense that what you need to do is well-defined
<heat> as soon as you get to complex problems/tasks, you get complex, varied solutions
<heat> for any arch
<geist> yeah i wouldn't categorize x86 as debates
<mcrod> and that's kind of what scares the shit out of me
<geist> more like folks love to complain about a lot of the old stuff
<heat> the difference is maybe that people care a lot more about x86
<geist> but it's also just people complaining
<mcrod> first if I would write an OS I have no plans nor desire to support any of the legacy shit if I can help it
<jimbzy> Since when have people been complainers?
<heat> like "hurr durr this is PESSIMAL for this and this hardware" is a lot more important in x86 land where you're trying to squeeze everything out of really complex systems
<heat> versus ARM garbage SoCs
<heat> BCM SoCs go brrrrrrrrrrrrrrr and that's about it
<geist> mcrod: sure that helps too, you can just declare that you only support the current gen stuff
<mcrod> i dunno, perhaps my perceptions are exaggerated
<geist> and then go directly to assuming current gen stuff exists
<mcrod> the architecture abstraction stuff is honestly what scares me
<mcrod> not that I should be thinking about that right now
<GreaseMonkey> if you ever want to do something really funky you could target the 286
<GreaseMonkey> 86Box is your friend here
<geist> that's the complexium that mostly exists in x86 world really: layers of backwards compatibility. knowing where the layers are is what makes your a PC expert, but at the end of the day its just some details of a thing
<mcrod> i have a 486 in my back porch
<jimbzy> This is why I'm building a 6502 SBC.
<geist> but it's just stuff. i wouldn't be afraid of it, it's just details of any thing you undertake tahts compluicated
<jimbzy> I like easy.
<GreaseMonkey> the 486 isn't brain-damaged enough to require you to reset the damn thing to leave protected mode
<mcrod> geist: yeah, fair
<klange> i wish i had a back porch
<geist> its like knowing what kind of wood to use in particular carpentry projects
<geist> or the right kinda nail, etc. you dont *have* to be an expert, but knowing the stuff helps you refine the solution
<heat> at the end of the day you push bytes to your 8257 that your chipset emulates using horrendously complex modern interrupt controllers
<geist> that's why there's lots of written up stuff about this. like most of the osdev wiki is talking about these sort of details
<GreaseMonkey> the crazy thing is that the CPU which made working with segments less painful by adding 2 registers was the 386 which also made segmentation optional due to being able to do a flat 4 GB address space
<geist> is it a pain? yeah i guess so, but i personally find that stuff fun
<GreaseMonkey> there are several reasons to write an OS, some of it pertains to the hardware you're targeting and some of it pertains to the actual software architecture you want to run stuff on top of
<geist> re: architecture abstraction, dont worry about that now. that'll be obvious as time goes on
<geist> as you learn more arches you'll start to see where the lines are cut
<mcrod> very well
<jimbzy> That's a good point.
<geist> that's pretty much where i learned all that stuff. do it once, you have a working kernel, then try to port it and you'll find where you went wrong. then you fix that, and you port it again the 3rd time gets way simpler, etc
<geist> over time it's pretty obvious
<geist> first serious OS for me was newos, and i remember porting it from x86 to SH-4, which is about as opposite as you can get. really good learning experience
<heat> i agree
<Matt|home> hm?
<heat> also, CI helps fight port rotting
<heat> it's very easy to break configurations you're not regularly testing
<mjg> spoken like a devops
<gog> hi
<jimbzy> Hello
goliath has quit [Quit: SIGSEGV]
m3a has joined #osdev
Burgundy has quit [Ping timeout: 246 seconds]
gog has quit [Ping timeout: 246 seconds]