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
<geist> kof123: i think NT inheirited some of that with the whole system vs user variables stuff
netbsduser` has quit [Ping timeout: 256 seconds]
<geist> i betcha those get expanded at a lower level than a posixy person would expect
dutch has joined #osdev
freakazoid332 has quit [Ping timeout: 246 seconds]
Yoofie has quit [Read error: Connection reset by peer]
<kof123> that just leads to: daaaaaaaaaave cutler <unix person airballs> </baseketball>
Yoofie has joined #osdev
<mjg> heat: openbsd has (or at least had until recently) a globally-locked kernel malloc
<heat> what
<heat> how?
<mjg> ?
<heat> i'm starting to think literally no one uses openbsd
<geist> hell, zircon does. it's a bottleneck in certain operations, but not most
<mjg> they use it on their 4-cored laptops
<heat> that's going to be a big contention point
<geist> ther'es always a bottleneck, it's bottlenecks all the way down
<geist> for openbsd that may not be the biggest one
<mjg> *some* shit scales geist
<mjg> like linearly
<mjg> multicore-wise
<geist> omg you're right!
<geist> shit!!!!!111
<heat> SHIT!
<heat> poopy
<geist> CRAAAAAAAP
<heat> fart fart fart
<mjg> applause MOTHERF^W
<geist> ia64
<heat> rut
<geist> QED
<mjg> ia64 is the shit innit
<mjg> fuchsia port when
<mjg> did you ask Larry if this can be your 20%
<heat> big tech doesn't want itanium to succeed!!!!
<mjg> FUCKING CONSPIRACY INNIT
<geist> gosh i'd love to port to ia64
<geist> i still should do an LK port
<geist> if i didn't just waste time with vidjagames and irc
<heat> everyone stfu
<heat> let geist concentrate
<geist> nah it's all my fault
<heat> mjg, no way to do lockless/atomic-less fd allocation right?
<mjg> with unix smenatics?
<mjg> no
<mjg> (unix semantics == *always* pick lowest fd)
<mjg> otherwise totally doable
frkazoid333 has joined #osdev
<qookie> atomicless?
<mjg> you assign fd ranges to threads and are done with it
<mjg> "big enough"
<mjg> this assumes some other constraints tho
<heat> yeah i thought so too
<qookie> okay yeah, i was thinking one everincreasing counter per process for allocating fds
<mjg> for examlpe now you can have lolthread1 open and lolthread2 close it
<mjg> without atomics
<mjg> but if you can suffer atomics, while achieving scalability for the most part, ranges are the way to go
<mjg> but then, if you have a prog where you can consistently guarantee no fd overlap
<mjg> ... then maybe spawn a bunch of processes and maybe share some memory with mmap?
<mjg> :]
<mjg> ultra win
<mjg> erm, that's "you CAN NOT have" in the first sentence
CaCode has quit [Ping timeout: 256 seconds]
<geist> yeah unix semantics of fd allocation has to be one of the top 3 things that ended up being a bad idea
<geist> its so limiting and a huge source of bugs/exploits
<mjg> another fd-related funzy is processes blindly asuming they got 0/1/2 open
<mjg> to rust's credit, they sanity check this state on binary startup
<mjg> and the way they do it is least bad i can think of on unix (poll of the 3)
<heat> musl does that on AT_SECURE
<mjg> now that i wrote it a have a better idea, but it is kind of a hack
<heat> (when suid, sgid, or special caps are involved)
<mjg> brah suid is another great unix shitter innit
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mjg> did you know that fucking SOLARIS respected LD_PRELOAD for suid binaries? :D
<mjg> non plus ultra kek
<mjg> in general if you were at least a teenager in 2005, were not an idiot and wanted to do some security
<mjg> facepalm-worthy bugs were everywhere
<mjg> quite frankly embarassing
<moon-child> lol
<kof123> re. env vars i think anything with multiple "personalities" (or subsystems) is going to have to decide hierarchy for which get passed on to a process of a specific kind, or which takes priority, or do different types of processes pull from different places to start out, etc.
<GreaseMonkey> i wonder which versions did LD_PRELOAD on suid binaries because part of me wants to try exploiting that... but another part of me is aware that doing such an exploit is borderline trivial and not that interesting
MiningMarsh has quit [Ping timeout: 256 seconds]
<mjg> it was something just after they released opensolaris
<mjg> one of the components they *did not* open was the linekr
<mjg> that was sus so people started poking around and BAM
<bslsk05> ​www.cve.org: cve-website
<mjg> oh it was LD_AUDIT
<mjg> apologies
<mjg> solaris only 95% stupid
<mjg> :[
<mjg> i coudl swear someone fucked up LD_PRELOAD
<moon-child> how could you mislead me like this
<mjg> it's 3 am here
<mjg> that's how
<mjg> also at that time i was your age
<mjg> :d
eddof13 has joined #osdev
arminweigl has quit [Ping timeout: 244 seconds]
eddof13 has quit [Client Quit]
<heat> mjg, fstat1_threads scales very well under RCU :v
<heat> 6M single threaded, 22M 4 threads
arminweigl has joined #osdev
<mjg> we have been over this
<mjg> lookups with different terminal entries avoid any cacheline ping pong even on freebsd
<mjg> everything goes to shit if you have the same target
<mjg> interestingly this can also be made to scale perfectly in the common case
<mjg> i even had a prototype for freebsd
<heat> what
<heat> mate i had a spinlock before, and added rcu
<mjg> oh you mean in your kernel?
<heat> yes
<mjg> you really should have specified IDI^W
<mjg> are you sure you are leapfrogging correctly
<heat> leapfrogging what?
<mjg> between components mofer
<mjg> yoloing from one to the next is wrong
<heat> i'm not yoloing
<mjg> what are you doing
<heat> adding RCU, and now i added fd_table RCU support similar to how linux does things
<mjg> what are you doing to secure the corssing you fuck
<heat> wdym secure the crossing?
<mjg> so you are yoloing
<heat> pal
<heat> first im testing the RCU impl for bugs
<heat> then i'll enable KASAN and look at what pops up
<mjg> i know nobody named heat
<heat> there's nothing else I can do
<mjg> do you understand what sequence counters are for in this shite
<heat> what shite?
<mjg> i'm going to sleep
<heat> you're not making any sense
<mjg> read "Fast path lookup protected with SMR and sequence counters" in vfs_cache.c on freebsd
<heat> erm
<heat> dude
<heat> this is not path lookup
<mjg> you are scaling fd lookup? :d
<heat> yes
<mjg> brah
<heat> <heat> mate i had a spinlock before, and added rcu
<mjg> that's so 2004
<mjg> you did have spinlocked lookup previously?
<heat> yep
<mjg> i mean path lookup
<mjg> look man, my brain is high on vfs
<mjg> so
<mjg> you gotta be more specific
<heat> oh no
<heat> lookup is rwspin locked
<mjg> SHITE
<heat> for path
<heat> s
<heat> it's not good but, again, i just needed a quick testbench for RCU
<heat> and this is a super great improvement on its own
<heat> my fd lookup scaled backwards with contention :v
<mjg> chances are your locks suKKK
vdamewood has joined #osdev
Yoofie has quit [Read error: Connection reset by peer]
Yoofie has joined #osdev
<linkdd> well, it was in fact way easier to put my logical cpu index in the gs register, add swapgs to my ISRs, and then use that index to return the correct percpu data structure in my get_percpu_data() function
<heat> oh ew
<heat> why
<linkdd> so, i don't really use the gs register as a segment with gs:0 pointing to the structure
<heat> that's far worse
<linkdd> how so? it works
<heat> having gs_base = percpu data means %gs:0 gives you a direct pointer (no yucky codegen), %gs:2 gives you the data member at offset 2, etc
nvmd has joined #osdev
<linkdd> maybe it's because it's 4am, and i haven't manipulated segmented memory layouts in the last 15 years, but it's currently unclear to me how to put a 64 bits pointer into a 16 bits register
xenos1984 has quit [Read error: Connection reset by peer]
joe9 has quit [Quit: leaving]
<heat> haha
<heat> %gs hasn't worked like that for 20 years
<heat> you have a GS_BASE msr to set the segment's base
<heat> and a KERNEL_GS_BASE for a banked copy for the kernel
<zid> that's just how *gs* has worked for 20 years, segments haven't worked like that for 40
<linkdd> swapgs swaps the content of the gs register with the msr one
<Cindy> what's gs?
<linkdd> so i do have to write to gs, or read from gs at some point
<qookie> it swaps the contents of the gsbase and kernelgsbase msrs
<linkdd> Cindy: the x86_64 register
<heat> what qookie said
<linkdd> qookie: oh, i must have misread the doc then
<linkdd> 4am again
<linkdd> i should go to sleep
<zid> (protected mode made those nice 16bit integers an index into a table instead, so 40 years since you put an actual address directly into a segment reg)
<linkdd> so the gs register is totally useless, and i should use the apic to read from/write to the msr?
<heat> why the apic?
<heat> the APIC has nothing to do with MSRs
<linkdd> https://bpa.st/URAA that's because i have this code somewhere, but maybe it's for a completely different purpose and my brain is as useful as a rock
<bslsk05> ​bpa.st: View paste URAA
<linkdd> 4am is not a good time for my brain
<heat> that has nothing to do with %gs or its base
<zid> you probably wrote your rdmsr functions
<zid> so you could mess with the apic
<linkdd> zid: yes
<zid> so your mine has conflated the two
<zid> mind*
<Cindy> oh i see, fs and gs
<Cindy> the 2 useless registers in x86_64
<heat> what
<heat> ???
<heat> is everyone on crack tonight
<qookie> well the selector registers are quite useless :^)
<zid> no, it's perfectly cromulent
<Cindy> no seriously
<Cindy> they should have called it address register number 8 or 9
<linkdd> sooooooo, gs_value = rdmsr(0xC0000101) ?
<linkdd> kernel_gs_value = rdmsr(0xC0000102) ?
<zid> #define IA32_KERNEL_GS_BASE 0xC0000102
<zid> can confirm
<zid> does linux let you do anything fun with userspace gs heat
<qookie> wine needs it so yeah
<heat> erm
<heat> fsgsbase (the instructions) will work
<zid> ah yea wine has a *lot* of one off behaviors like that
<heat> but userspace sets it uing arch_prctl(2)
<zid> afaik they added an entirely new syscall mechanism for them fairly recently
<zid> so that they could trap kernel32.dll doing `syscall` and redirect it back to wine
<heat> in fact you'll see arch_prctl ARCH_SET_FS (iirc?) on every strace, that's where they set up TLS
<zid> yea I knew fs was TLS
<zid> wasn't sure if gs had anything
<heat> ARCH_SET_GS also works
<zid> I think that syscall thing ended up going through the security engine or something? The thread was fun
<zid> but had lots of ideas in it and I stopped following it
<heat> i vaguely know what you're talking about but i don't know what ended up happening
<zid> same
<zid> I read the first 20 or so posts cus I happened across it, then never saw the end
<zid> usually someone just drops a patchset later on and it ends up in someone's tree
<zid> there's no "this is the resolution to all that discussion!" alert
<heat> https://i.imgur.com/oA0OK1y.png i need expedited grace periods and some congestion control :v
<bslsk05> ​i.imgur.com <no title>
<heat> (rcu callback handling more or less during a context switch/softirq)
<linkdd> ok, i fixed the code to use rdmsr/wrmsr and put a real pointer there
<linkdd> now, time to bed
<linkdd> good bye, and thanks for all the fish!
wblue has quit [Quit: wblue]
<klys> is there a recent linux .config tailored to hacking posted somewhere
<heat> define hacking
<klys> operating in kernel mode
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<klys> debugging such operations
xenos1984 has joined #osdev
[itchyjunk] has quit [Remote host closed the connection]
<heat> oh i dunno sorry
<klys> and disabling security measures like kaslr
<klys> kk
<klys> also makes me wonder if linux still has /dev/kmem this year if you tell it to
<heat> sure
<heat> .. actually im not so sure now
<Cindy> is there like... crack tailored to linux patching kernel memory?
<Cindy> oops sorry
<Cindy> my mind is fucked up
<Cindy> i mean like, can you patch another process' memory
<heat> yes
<Cindy> i see
<Cindy> how would i do this in linux?
<heat> process_vm_writev
<heat> or ptrace
<Cindy> ooo ptrace
<Cindy> i remember doing some shit like "print (*((uint32_t *)0xffffed01) = 0x0)" in gdb
<bslsk05> ​scm.linefinity.com: drivers/char: remove /dev/kmem for good · bbcd53c960 - linux-stable - linefinity scm
<heat> oh you still have kcore though
<bslsk05> ​github.com: linux/arch/x86/Kconfig at 13b9372068660fe4f7023f43081067376582ef3c · torvalds/linux · GitHub
<klange> I think all that says is it's a boolean and defaults to yes.
<heat> x86 does not support nommu i'm pretty sure
CaCode has joined #osdev
stolen has joined #osdev
<AmyMalik> i had a very stupid idea
<sham1> why
<sham1> why would you do that
<AmyMalik> the idea is to start writing a... sidecar OS. so you see, I want to do some fuckery with DOS. and I want to do that fuckery on multi-core computers. and i want to do multi-core fuckery. this, as long as basically all routines that could conflict with hardware the sidecar OS needs to use are trapped, and a block of memory is shaded from view of DOS programs, could be interesting to muck about with.
<AmyMalik> it's likely impossible, without effectively implementing an emulator as the OS. but i have to try it
<AmyMalik> even though what I want to write is not an OS and would take great pains to not call itself an OS, the problem space is essentially the OSdev problem space, because I have to do things only OSes have to do.
<kof123> well, "bytecode" or similar is another way to basically control what instructions can be executed
<kof123> but i would say that falls under "emulator"
<Mutabah> AmyMalik: sounds interesting...
<Mutabah> like a very thin hypervisor with DOS-era devices?
fkrauthan has quit [Quit: ZNC - https://znc.in]
fkrauthan has joined #osdev
\Test_User has quit [Quit: \Test_User]
\Test_User has joined #osdev
heat has quit [Ping timeout: 246 seconds]
<AmyMalik> Mutabah: um
<AmyMalik> idk
bgs has quit [Remote host closed the connection]
goliath has joined #osdev
zxrom has joined #osdev
nyah has joined #osdev
Terlisimo has quit [Quit: Connection reset by beer]
gildasio1 has joined #osdev
gildasio has quit [Ping timeout: 240 seconds]
stolen has quit [Quit: Connection closed for inactivity]
Terlisimo has joined #osdev
stolen has joined #osdev
air has quit [Ping timeout: 246 seconds]
CaCode has quit [Ping timeout: 246 seconds]
zxrom has quit [Quit: Leaving]
zxrom has joined #osdev
danilogondolfo has joined #osdev
CaCode has joined #osdev
air has joined #osdev
austincheney_ has joined #osdev
austincheney has quit [Ping timeout: 260 seconds]
phoooo has joined #osdev
phoooo has quit [Client Quit]
air has quit [Ping timeout: 256 seconds]
air has joined #osdev
phoooo has joined #osdev
Burgundy has joined #osdev
phoooo has quit [Ping timeout: 246 seconds]
gog has joined #osdev
austincheney_ is now known as austincheney
GeDaMo has joined #osdev
Left_Turn has joined #osdev
stolen has quit [Quit: Connection closed for inactivity]
phoooo has joined #osdev
TheCatCollective has quit [Ping timeout: 246 seconds]
ebb has quit [Ping timeout: 240 seconds]
Cindy has quit [Ping timeout: 246 seconds]
hl has quit [Ping timeout: 252 seconds]
j`ey has quit [Ping timeout: 250 seconds]
<phoooo> hello, when switching to supervisor mode in my riscv kernel while having paging enabled, i seem to get a fault with an mstatus of 1 (instruction failure), any idea why this happens?
<phoooo> if i allow supervisor mode to access the entire physical address space as is, it simply works
<Mutabah> Do you have the current PC pointing to a page that will be present once paging is on?
<phoooo> it should, i have checked with the info mem command
hl has joined #osdev
<phoooo> note that im switching to supervisor with mret, if that has anything to do with it
TheCatCollective has joined #osdev
j`ey has joined #osdev
bnchs has joined #osdev
ebb has joined #osdev
eck has quit [Ping timeout: 260 seconds]
eck has joined #osdev
sortie has joined #osdev
gareppa has joined #osdev
<phoooo> Mutabah: wait, one question regarding pmpaddr... if i set it to the entire physical address space, will the supervisor mode be able to access physical memory as is? or will every memory access be through virtual memory?
* Mutabah is away (Misc)
<phoooo> i think i'm misunderstanding something
phoooo68 has joined #osdev
phoooo68 has quit [Client Quit]
phoooo10 has joined #osdev
phoooo10 has quit [Client Quit]
phoooo15 has joined #osdev
phoooo15 is now known as phoooo_
phoooo has quit [Ping timeout: 246 seconds]
phoooo_ is now known as phoooo
Burgundy has quit [Ping timeout: 256 seconds]
<linkdd> https://bpa.st/73RQ using this snippet to wait (in the bootstrap processor) for the AP processors to finish something. is it dumb?
<bslsk05> ​bpa.st: View paste 73RQ
<ddevault> shell! https://l.sr.ht/5JpX.png
<zid> I mean, idk if it's dumb, but the conditional logic is weird
<zid> while(count) { ... }
<linkdd> zid: yeah the code could be refactored, even with a do..while
<zid> why is there locking around the read to begin with?
<linkdd> because my dumbass mind wasn't sure size_t reads were atomics
<zid> and if they aren't?
<linkdd> i lock
<zid> I mean, what goes wrong if they're not?
<zid> That'd be a fun bug to try and trigger irl
<linkdd> i might get a 0 when it was not supposed to be 0?
<zid> "First, I need 65536+ writers..." is always a good sentence
<linkdd> that or a cosmic bit flip
<zid> don't think atomics are going to save you from a bit flip
<zid> if anything, close proximity to atomics is what causes bit flips :P
<linkdd> no but it's a fun bug to try and trigger irl
<linkdd> so, while(count > 0) { pause(); } should be enough, i was being paranoid?
<zid> yea, but you'll need to teach the compiler to use the right barriers ofc
<zid> (a compiler barrier to stop it caching the value of count)
<linkdd> volatile is enough?
<zid> usually achieved via volatile, but I'm sure you have something tastier if you're doing locking code
<linkdd> my spinlock implementation is built on an atomic bool
<zid> like a sem_t or whatever that you typedef'd and made some helpers for
<linkdd> with compare-and-swap
<zid> cmpxchg is for people who don't like races
<zid> aka racists.
<zid> hlelo ,owldr!
<linkdd> i don't like races, as in: i don't like to run
ebb has quit [Quit: Somebody set up us the bomb]
hl has quit [Ping timeout: 246 seconds]
bnchs has quit [Quit: ZNC 1.8.2 - https://znc.in]
j`ey has quit [Remote host closed the connection]
bnchs has joined #osdev
hl has joined #osdev
ebb has joined #osdev
netbsduser` has joined #osdev
j`ey has joined #osdev
ebb has quit [Max SendQ exceeded]
MiningMarsh has joined #osdev
Harriet has quit [Quit: WeeChat 4.0.2]
Harriet has joined #osdev
Burgundy has joined #osdev
ebb has joined #osdev
bnchs has quit [Ping timeout: 246 seconds]
Burgundy has quit [Ping timeout: 240 seconds]
phoooo has quit [Quit: Client closed]
<Ermine> A smol bug in my firmware: sometimes it uses weird colors, like purple instead of black and green instead of white
<Ermine> probably has something to do with my amd card, since I have never observed it with previous nvidia card
awita has joined #osdev
awita has quit [Remote host closed the connection]
lanodan has quit [*.net *.split]
danlarkin has quit [*.net *.split]
MaxLeiter has quit [*.net *.split]
kazinsal has quit [*.net *.split]
Ameisen has quit [*.net *.split]
ggherdov has quit [*.net *.split]
dragestil has quit [*.net *.split]
XgF has quit [*.net *.split]
Amanieu has quit [*.net *.split]
Ameisen has joined #osdev
ggherdov has joined #osdev
XgF has joined #osdev
Amanieu has joined #osdev
danlarkin has joined #osdev
kazinsal has joined #osdev
lanodan has joined #osdev
dragestil has joined #osdev
MaxLeiter has joined #osdev
ggherdov has quit [Ping timeout: 258 seconds]
pounce has quit [Ping timeout: 244 seconds]
ggherdov has joined #osdev
pounce has joined #osdev
dutch has quit [Quit: WeeChat 4.0.2]
ebb has quit [Quit: Somebody set up us the bomb]
hl has quit [Ping timeout: 244 seconds]
j`ey has quit [Ping timeout: 244 seconds]
bnchs has joined #osdev
hl has joined #osdev
ebb has joined #osdev
j`ey has joined #osdev
foudfou has quit [Ping timeout: 240 seconds]
CaCode has quit [Quit: Leaving]
CaCode has joined #osdev
<mjg> looks chatgpt-generated
<mjg> s/chatgpt/ai
<nortti> what shell is the one with the "mercury %" prompt? asking since your previous image with rc has that have a different prompt
<ddevault> it's the built-in not-a-shell in the init program
<ddevault> only supports running other programs and a small number of built-ins
<ddevault> debugging tool
<mjg> what are the goals of your project?
<ddevault> uh
<mjg> tl;dr are you just messing around
<ddevault> not exactly
<ddevault> I'd like to make something useful but you know how it goes
<mjg> uh indeed
<ddevault> it'll be years
<mjg> i think sortie knows ;)
k4m1_ has quit [Read error: Connection reset by peer]
k4m1 has joined #osdev
<sortie> mjg, admittedly $dayjob and $fun has taken away much time from $osdev and made it take many more years than was strictly needed :)
<AmyMalik> arf :3
<AmyMalik> ddevault: what's in bin?
<ddevault> binaries?
<AmyMalik> oh i see
<AmyMalik> was in previous img
dutch has joined #osdev
<FireFly> clearly /bin is where you put the trash,
<mjg> that's /bin/tmp
phoooo has joined #osdev
phoooo has quit [Client Quit]
<zid> no, trash goes in the garbage, rubbish goes in a bin
<zid> You're mixing latin and greek smh
<FireFly> yeah my bad
dude12312414 has joined #osdev
dutch has quit [Quit: WeeChat 4.0.2]
dutch has joined #osdev
m3a has joined #osdev
<ddevault> what was that ACPI implementation we like
<ddevault> *not* ACPIA
<ddevault> ah, lai, via managarm
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<gog> MEOW
<zid> jiaou
<zid> I am a foreigner cat
<zid> I have a accent
<gog> mjá
melonai has quit [Ping timeout: 256 seconds]
<Ermine> gog: may I pet you
<gog> j'a
<gog> já
* Ermine pets gog in Icelandic
zxrom has quit [Quit: Leaving]
melonai has joined #osdev
<gog> klappa
<nortti> "1. (transitive, with dative) to pat
<nortti> 2. (transitive, with dative) to chisel, to hew"
<gog> íslensku ert erfittstungumálan
bnchs has quit [Ping timeout: 256 seconds]
<Ermine> Fine
<zid> (iceland is deciduousless)
<zid> I am excellent translator
bnchs has joined #osdev
<AmyMalik> deciduate
eddof13 has joined #osdev
<zid> deciduain't
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
goliath has quit [Quit: SIGSEGV]
Burgundy has joined #osdev
heat has joined #osdev
<heat> hi
<Ermine> hi warm^W heat
<heat> is 700us too long for a single softirq?
<heat> i can't tell honestly, it seems so but 700us is so little time
<heat> https://i.imgur.com/qOvavng.png see those blank spaces? I think I have a bug
<bslsk05> ​i.imgur.com <no title>
bnchs is now known as Cindy
Harriet is now known as Andrew
dutch has quit [Quit: WeeChat 4.0.2]
<ddevault> self-hosting here we come https://l.sr.ht/VmVM.png
<heat> why are you passing fsgsbase?
<ddevault> leftover from ages ago when I was testing it
<ddevault> don't actually use it I think
Andrew is now known as Harriet
eddof13 has joined #osdev
gareppa has quit [Quit: WeeChat 3.8]
heat has quit [Remote host closed the connection]
heat has joined #osdev
FreeFull has joined #osdev
stolen has joined #osdev
bgs has joined #osdev
k0valski18891 has quit [Quit: Peace out !]
<heat> hah, found the bug
<heat> it's the tracing code that's doing huge read()s with irqs off
Harriet has quit [Quit: WeeChat 4.0.2]
Harriet has joined #osdev
xenos1984 has quit [Ping timeout: 246 seconds]
danilogondolfo has quit [Quit: Leaving]
xenos1984 has joined #osdev
<zid> heat: 700us is massive
<zid> smh not realtime
xenos1984 has quit [Ping timeout: 246 seconds]
zxrom has joined #osdev
<heat> yeah its not realtime but oh well
<zid> how you don't enjoy low latency audio
<heat> the problem here is that ideally i'd like to spawn a thread if need be, and handle this there
<heat> but i don't have that code yet
<heat> and boohoo low latency audio
<heat> i dont even have audio
<moon-child> that means all your audio has 0 latency
<moon-child> incredible
<zid> true fact
<zid> For all the supported sample rates, none have a latency above 0
joe9 has joined #osdev
xenos1984 has joined #osdev
netbsduser` has quit [Ping timeout: 246 seconds]
gog has quit [Quit: Konversation terminated!]
netbsduser` has joined #osdev
Burgundy has quit [Ping timeout: 245 seconds]
phoooo has joined #osdev
<phoooo> one small question, is specifying an entry needed in my riscv linker script?
<phoooo> asking because the hardware just jumps to some address, and the entry is ignored
phoooo has quit [Quit: Client closed]
heat has quit [Remote host closed the connection]
heat has joined #osdev
<zid> only if you're producing an ELF, nothing says you have to
<zid> but I'd just set the entry to that.. entry point you clearly have
<zid> so that you can either kexec it, or, reboot
<heat> riscv has a funny there
<heat> i can't remember how opensbi loads kernels exactly
<heat> but there was a gotcha there
<zid> I hear you are opens bi, heat
phoooo has joined #osdev
<phoooo> zid: it is indeed an elf
<phoooo> so you are suggesting to let it be for the sake of making it clear?
<zid> yep
<zid> and also more versatile
<zid> and it costs you nothing
<zid> that field is still in the ELF header regardless of whether you fill it out with a valid or invalid address
<phoooo> cool, thanks
phoooo has quit [Quit: Client closed]
<sham1> He looks very surprised in the picture
heat has quit [Ping timeout: 240 seconds]
heat_ has joined #osdev
zxrom_ has joined #osdev
<moon-child> he is trying to figure out how to deal with his newly-discovered attraction to women
zxrom has quit [Ping timeout: 246 seconds]
Burgundy has joined #osdev
CaCode has quit [Remote host closed the connection]
xenos1984 has quit [Read error: Connection reset by peer]
zxrom_ is now known as zxrom
gog has joined #osdev
xenos1984 has joined #osdev
<clever> switching gears a bit, building my dwc2 driver for aarch64 now
<clever> just had to fill in some blanks, for virt->phys, cache management, and deal with all of the 32bit casting
heat_ has quit [Ping timeout: 240 seconds]
<clever> it seems to mostly work, but randomly faults due to a null pointer
<clever> and is abnormally slow at times
<bslsk05> ​'You're dereferencing a null pointer!' by gigagigagilgamesh (00:00:09)
heat has joined #osdev
<clever> lol
<clever> once i realized that, i added an assert to fail more gracefully
<clever> along with an if before it, to print more context
CaCode has joined #osdev
wblue has joined #osdev
goliath has joined #osdev
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
Jari-- has joined #osdev
<sham1> hi
<Ermine> hey
<Ermine> How it's going
wblue has quit [Quit: wblue]
<sham1> Gotta try and try to sleep
bgs has quit [Remote host closed the connection]
Turn_Left has joined #osdev
<mcrod> hi
<Ermine> hey
<mcrod> how are you
<Ermine> I'm sleepy
<mcrod> oh
<mcrod> do you want a plushie
Left_Turn has quit [Ping timeout: 246 seconds]
<Ermine> No
<Ermine> I have two nearby
<Ermine> I'm thinking of figurine though
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
heat has quit [Remote host closed the connection]
<Ermine> how are you mcrod ?
heat has joined #osdev
<heat> football's back baby
<heat> none of this pansy ass programming bullshit
<bl4ckb0ne> did you see that ludicrous display last night
<mcrod> i am fine Ermine
<Ermine> Conversations with people are more lively when I don't talk about programming and linux
<mcrod> however
<mcrod> one thing is for sure
<mcrod> oh sadly that'll change
<Ermine> what happened?
<mcrod> printf() on embedded systems is pathetically slow
<Ermine> Ah, printf bad actually
<mcrod> i used a tiny printf implementation
<Ermine> Its formatting language is turing complete
<mcrod> and it was still not fast enough
<Ermine> So you may want to write() directly
eddof13 has joined #osdev
<mcrod> essentially, i'm trying to figure out a way where we can have logs coming out of the debug port like every other application on the earth
<Ermine> you mean, you want logs on the serial cable?
xenos1984 has quit [Read error: Connection reset by peer]
<mcrod> yeah, printf() goes over the J-Link
<mcrod> i.e., SWO
<Ermine> Ah, that's jtag kind of thing
<mcrod> yeah
<Ermine> idk how it works, but i want to try
<mcrod> embedded is a blessing and a curse
<mcrod> there are things most people take for granted that we simply don't have the ability to use
<Ermine> jtag stuff is apparently super expensive though
<mcrod> yeah, i recommend a SEGGER J-Link
<mcrod> and you're talking... thousands of dollars
<Ermine> or one kidney
<Ermine> But it can help resurrect my old phone probably
<heat> this is so embedded im getting sick
<mcrod> embedded is love
<mcrod> embedded is life
<mcrod> embedded is heat
<heat> i am love and life
heat has quit [Remote host closed the connection]
xenos1984 has joined #osdev
heat has joined #osdev
<heat> mcrod: fyi dumping messages in modern serial ports is also measurable in modern systems
<heat> that's why firmware is mostly silent, cuz its fucking slow to dump to serial
<mcrod> it is just exceedingly difficult for us to get any sort of logging
<mcrod> and I doubt I'm going to be able to fix that situation at all
<mcrod> otherwise we'd have fast log streams and everyone would've done it by now
<mcrod> in short debugging is very hard on embedded
<mcrod> breakpoints for the most part are fine
<mcrod> but... debugging a *really* complicated issue, where breakpoints can screw up timing
<mcrod> not good. not good at all.
<heat> try debugging and logging on a horrendously concurrent system
<mcrod> no thanks
<mcrod> it's already bad enough
<mcrod> we might be going multicore though
stolen has quit [Quit: Connection closed for inactivity]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Cindy is now known as bnchs
Turn_Left has quit [Read error: Connection reset by peer]
gog has quit [Ping timeout: 260 seconds]
heat has quit [Quit: Client closed]
heat has joined #osdev
Matt|home has quit [Quit: Leaving]
nyah has quit [Quit: leaving]
<mcrod> zid: hi