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
arch_angel has joined #osdev
arch_angel has quit [Remote host closed the connection]
arch_angel has joined #osdev
vai has joined #osdev
<vai> hi
<heat> jello
<zid> heat is an evo sort of person
<heat> whats that
<zid> like pro but not
<heat> im a professional osdever
<heat> i swear
<zid> I meant as a person
<heat> how about
<heat> no
<zid> You can pay for the upgrade if you like
<zid> check samsung's website
<heat> i do have an evo mofo
<heat> is there a problem
<heat> pros are for newbs
lkurusa has joined #osdev
[itchyjunk] has joined #osdev
<vai> I get coronavirus on OSDEV
<vai> development is stalled
<vai> JTMOS
sprock has quit [Ping timeout: 252 seconds]
sprock has joined #osdev
nyah has quit [Ping timeout: 245 seconds]
gog has quit [Ping timeout: 240 seconds]
Starfoxxes has joined #osdev
gog has joined #osdev
zaquest has quit [Remote host closed the connection]
troseman has joined #osdev
troseman has quit [Read error: Connection reset by peer]
troseman has joined #osdev
zaquest has joined #osdev
<Griwes> cables for the cable god
<heat> i got a good chunk of bringup working
<heat> my arm64 percpu accesses seem busted
<heat> we shall keep going tomorrow
heat has quit [Ping timeout: 240 seconds]
<vancz> does anyone here know much about linux ftrace or where I could ask about it?
dude12312414 has joined #osdev
gildasio has quit [Ping timeout: 268 seconds]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
gildasio has joined #osdev
[itchyjunk] has quit [Read error: Connection reset by peer]
frkzoid has quit [Ping timeout: 244 seconds]
poyking16 has joined #osdev
bradd has quit [Ping timeout: 240 seconds]
arch_angel has quit [Ping timeout: 240 seconds]
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
srjek has quit [Ping timeout: 244 seconds]
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
GeDaMo has joined #osdev
MiningMarsh has quit [Quit: ZNC 1.8.2 - https://znc.in]
MiningMarsh has joined #osdev
the_lanetly_052 has joined #osdev
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
bradd has joined #osdev
vai has quit [Quit: Lost terminal]
bauen1 has quit [Ping timeout: 240 seconds]
arch_angel has joined #osdev
bauen1 has joined #osdev
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
gog` has joined #osdev
psykose has quit [Remote host closed the connection]
psykose has joined #osdev
poyking16 has quit [Ping timeout: 268 seconds]
poyking16 has joined #osdev
socksonme_ has joined #osdev
Starfoxxes has quit [Ping timeout: 268 seconds]
Starfoxxes has joined #osdev
arch_angel has quit [Quit: Leaving]
heat has joined #osdev
Celelibi has quit [Ping timeout: 260 seconds]
xenos1984 has quit [Read error: Connection reset by peer]
kof123 has joined #osdev
h4zel has joined #osdev
Celelibi has joined #osdev
vdamewood has joined #osdev
xenos1984 has joined #osdev
kof123 has quit [Ping timeout: 268 seconds]
kingoffrance has joined #osdev
nyah has joined #osdev
[itchyjunk] has joined #osdev
dude12312414 has joined #osdev
gdd1 is now known as gdd
lkurusa has quit [Quit: I probably fell asleep (or went out). Who will ever know.]
lkurusa has joined #osdev
the_lanetly_052 has quit [Ping timeout: 268 seconds]
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
lkurusa has quit [Quit: I probably fell asleep (or went out). Who will ever know.]
srjek has joined #osdev
lkurusa has joined #osdev
h4zel has quit [Ping timeout: 268 seconds]
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
gog has quit [Ping timeout: 240 seconds]
lkurusa has quit [Quit: I probably fell asleep (or went out). Who will ever know.]
lkurusa has joined #osdev
lkurusa has quit [Ping timeout: 268 seconds]
frkzoid has joined #osdev
gog has joined #osdev
bauen1 has quit [Ping timeout: 245 seconds]
bauen1 has joined #osdev
<gog> nya
gmacd has joined #osdev
<gmacd> I'm running qemu as raspi3b.  I want to test accessing the dtb, so I've passed a dtb file using the `-dtb` option. How can I find this DTB in memory? I thought the pointer would be in x0, but that's 0...
<heat> how are you running your kernel?
<heat> if you run it as a linux image (flat binary, with the linux boot protocol's header), it will be in x0
<heat> iirc that's not the case for regular elfs ran through -kernel
<mrvn> gmacd: raspi load the dtb from the boot medium in the firmware.
* vdamewood gives gog a 魚.
<mrvn> kind of broken in qemu
<gmacd> currently loading via `-kernel`
* gog eat 魚.
<mrvn> gmacd: but what type of file do you load? flat binary or elf?
jafarlihi has joined #osdev
<jafarlihi> Can IPv6 multicast address be assigned to an interface?
<gmacd> mrvn: loading an elf via kernel option
<heat> jafarlihi, no
<heat> how would it?
<heat> "you know this mcast address that is used to address a lot of hosts at once? yeah, now it's mine"
<heat> gmacd, try and flatten it
<heat> $(OBJCOPY) -O binary kernel.bin kernel.bin
<mrvn> heat: but they can
<heat> they can what?
<mrvn> jafarlihi: assigning a multicast address to a NIC is a quite old way of making it work with multicast. Modern kernels you bind and subscribe to multicast IPs and the kernel handles this dynamically internaly.
<heat> but erm, thats not the question
<heat> he's trying to assign a mcast address in fuchsia's net stack
<heat> that's not working because that's not how you assign a mcast address
<mrvn> fuchsia? jafarlihi usually asks linux questions
<heat> i.e ip addr add ff02::
<heat> yes, he shifted to fuchsia
andydude has joined #osdev
<mrvn> Doubtfull fuchsia implemented that old way to configure multicast
<mrvn> You might be able to assign a multicast IP to a NIC but it brobably doesn't do anything.
<gorgonical> qemu is wild, guys
<heat> damn right
<gorgonical> I just realized that I had not set up the FPU in my kernel and qemu was like "lol whatever that's fine"
<heat> maybe it defaults to set up?
<gorgonical> Possibly, but I have noticed risc-v support on qemu is weird anyway
<gorgonical> I should check that, though
<heat> I don't remember how my FPU experience went
<mrvn> or you don't use it?
<heat> gorgonical, erm, how did you setup sstatus?
<heat> you probably had it set up by mistake
<gorgonical> I am just checking and I can confirm the kernel doesn't have it set in qemu
<gorgonical> heat: I think I literally forgot to set it up. I set up FPU context switching but clearly not FS
jafarlihi has quit [Quit: WeeChat 3.6]
<heat> i can't remember how that field works
<heat> but I remember it was kinda tricky?
<gorgonical> The unmatched manual basically only says you have to enable FS and set up your fcsr for it to work
<heat> see the actual isa manual
gildasio has quit [Ping timeout: 268 seconds]
<gorgonical> The manual specifies almost nothing about requirements
<gorgonical> The only "illegal instruction" references are to some precision rounding error
<heat> it tells you how the sstatus register works
<gorgonical> Oh that
gildasio has joined #osdev
<heat> qemu's FS logic must be correct because IIRC linux uses it for lazy FPU switching, etc
<gorgonical> hmm
<gorgonical> It is possible opensbi is controlling the fpu. That's one major difference between my qemu boot and the unmatched boot
<gorgonical> I'm re-using sifive's sd card image to freeload on their working uboot+opensbi package
<heat> qemu also uses opensbi
<gorgonical> Yeah that's what my qemu boot uses. But it's just bare opensbi, no u-boot
<heat> and erm, no, I don't think that's possible
<heat> opensbi will have its mstatus
<gorgonical> I agree. I mean I'm looking at gdb right now and it says the FS field in mstatus is 0
<gorgonical> Hold on, thinking
gmacd has quit [Quit: Client closed]
gmacd has joined #osdev
<gmacd> ok, so I used `$(OBJCOPY) -O binary kernel.bin kernel.bin` to convert my elf into a binary, so how should I load it in qemu, if I shouldn't use the `-kernel` option?
<gorgonical> you don't want to use the -kernel option?
<gorgonical> just making sure I understand
<gorgonical> In the case you don't want to use the -kernel option you need to provide a bootloader
<gmacd> actually, I might have jumped the gun.  If I run with kernel, I do see an address in x0.  Now I need to see if it points to anything sensible.  Thanks for the help
<gorgonical> is this arm or risc?
<gorgonical> Since you have x0
<gmacd> arm
<gorgonical> Fun!
<gmacd> yeah, lots to work through, but when progress is occasionally made, it's fun :)
jafarlihi has joined #osdev
<jafarlihi> Rule 2 here: https://datatracker.ietf.org/doc/html/rfc6724#section-5 says that if Scope(SourceAddress) < Scope(DestinationAddress), but it doesn't define "<" operator. Are multicast scopes always considered higher than unicast scopes?
<bslsk05> ​datatracker.ietf.org: RFC 6724 - Default Address Selection for Internet Protocol Version 6 (IPv6)
andydude has quit [Quit: andydude]
gmacd has quit [Quit: Ping timeout (120 seconds)]
andydude has joined #osdev
Ram-Z has quit [Ping timeout: 268 seconds]
gmacd has joined #osdev
gmacd has quit [Quit: Client closed]
<heat> gorgonical, -kernel also works for flat binaries
Ram-Z has joined #osdev
gildasio has quit [Write error: Broken pipe]
dude12312414 has quit [Write error: Broken pipe]
opal has quit [Write error: Broken pipe]
opal has joined #osdev
gildasio has joined #osdev
dude12312414 has joined #osdev
[itchyjunk] has quit [Ping timeout: 255 seconds]
[itchyjunk] has joined #osdev
<geist> have to be a little careful there: -kernel works differently on different arches
poyking16 has quit [Quit: WeeChat 3.6]
<geist> for purely arbitrary reasons
<geist> but, in *general* it supports ELF files and in *general* supports flat binaries, but not the same way on all arches
<geist> reason being the -kernel switch is basically implemented per arch, so it's not entirely consistent
jafarlihi has quit [Quit: WeeChat 3.6]
bauen1 has quit [Ping timeout: 268 seconds]
<zid> anyone happen to remember a blog post or article or whatever
<zid> describing the phenomena of how people start writing programming languages
<zid> and just end up with a language good for writing compilers in once they start to try and self-host
<zid> it's a bit of a meme but I can't find any sources
<geist> heh, dunno, but it makes a lot of sense
<GeDaMo> Sounds familiar
<zid> ikr, it makes sense and I know other people know it
<zid> but I can't find anybody talking about it so I can link to it
<zid> even as a throwawy reddit comment or whatever
<kingoffrance> well, tangent, it is well known as a "law" about things re-implementing lisp..including lisp itself IIRC
<kingoffrance> so does not surprise me
<kingoffrance> conway's law :D
<j`ey> greenspun law
<zid> heh not quite but close
_xor has quit [Quit: WeeChat 3.0]
dh` has quit [Quit: brb]
GeDaMo has quit [Quit: A program is just a bunch of functions in a trenchcoat.]
sprock has quit [Ping timeout: 252 seconds]
sprock has joined #osdev
mykernel has joined #osdev
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dh` has joined #osdev
<gorgonical> I am still confused about how the FS flag is getting set lol
<gorgonical> Unless there's some borrowed code I overlooked or the flag is getting set in some non-obvious way it almost looks like the mstatus register is getting manipulated while in userspace. That's very confusing
<heat> the mstatus?
<heat> you mean sstatus?
<gorgonical> either one
<gorgonical> The FS flag is exposed through both of them
<heat> sstatus is the only one relevant here
<heat> you are in S mode right?
<gorgonical> Yeah the kernel is in S mode but there is firmware running below it
<geist> lemme see which one is the fs flag?
<gorgonical> enable fpu flag
<gorgonical> or rather fpu state 2-bits
<geist> ah yes, the fpu state
<geist> so what is happening in your case?
<gorgonical> I have neglected to set it (I think) in my kernel and so the kernel/initrd on the unmatched does not work, but it does on qemu. In fact the bits get set when running on qemu and I have no idea how
<geist> get set from what to what, precisely?
<geist> some bits may get set by hardware, depending
<gorgonical> from disabled to dirty (0 to 3)
<geist> hmm, okay that's a transition that should not happen unless software does it
<geist> which i guess narrows it down, since now you know it can't happen magically
<gorgonical> right. I realized I have fpu context switch implemented but never explicitly told tasks they had fpu access. But on qemu the bits get set somehow
<geist> something could have transitioned it from disabled to clean or initial though, and then used the fpu
<geist> does the code you'r compiling use the fpu at all?
<geist> sure, does the codegen generate any fpu instructions?
<heat> weren't you using some sort of modified linux?
<gorgonical> Yeah it's hpcg, a common performance benchmark
<gorgonical> heat: More like vaguely linux-compatible simplified kernel
<geist> okay so that seems to be the situation. something is triggering the fpu context switch. if you want to know i'd stick a trace in the exception handler logic for that
<geist> and just print the PC
<gorgonical> I did try that and the only clue I got was that when we syscall in from gettimeofday the sstatus register already has the FS bits set
<gorgonical> I'm currently watchpointing on mstatus but ofc that's extremely slow in gdb
<heat> oh yeah geist now that you're around, have you seen https://arm-software.github.io/ebbr/index.html#document-chapter2-uefi ?
<bslsk05> ​arm-software.github.io: Embedded Base Boot Requirements (EBBR) Specification v2.0.1-8-gc90b128 documentation
<geist> yeah you linked it the other day. i have an action item to go digest that
<geist> gorgonical: well, clearly you're on the right track, there should be no other way to set it
<gorgonical> I'm tracing on context save/restore to see exactly when it gets set. We restore a non-FPU enabled state and then on the next syscall in at context save it's set. Very confusing
<geist> *unless* the code that enters user space for the first time starts off with it enabled
<gorgonical> That's what I considered, but this is deep into the code
<geist> say for example it initialies fs to INITIAL when it first branches into user space
* geist nods
<geist> you could hack qemu to just print when it gets set
<geist> i do that sort of trickery all the time, may be faster to do that
<gorgonical> hopefully this waiting on watchpointing doesn't take too much longer
<geist> find the internal routine where the status bits are latched and stuff in a printf
<gorgonical> I'm nearly (?) there in the code
<geist> silver lining to these sort of deep dives to track stuff down: you usually end up learning a lot about how the sausage is made
<geist> i learned so much by having to do precisely these sorts of things
<geist> maybe annoying at the time, but probably at least pretty educational
<gog> sosig
<heat> I personally find it super hard to do for big, hairy pieces of QEMU code
<heat> like emulation itself
<geist> true though after a while you get a feel for it, and it should be far simpler on simpler arches like riscv
<geist> the size of the TCG stuff is just wayyy less
<heat> yesterday I was trying to track down a page fault for a good amount of time, tried looking at qemu's arm64 code, noped out very quickly
<geist> yah arm64 mmu code is super hairy
<heat> iirc it was arm + arm64 in the same package
<heat> cray-cray
<j`ey> geist: +1 on hacking QEMU to print when stuff gets set
<heat> also funnily enough I spent like 1 or 2 hours looking at the wrong place because in my mind L3 = top where they say its the bottom
<heat> intel vs arm I guess
<j`ey> there's L-1 btw
<geist> yeah, that numbering i disagree with. i think they should have numbered L0 at the root and counted up as you go 'down' through the page tables since based on how you set up the mmu there are variable number of levels
<geist> then it'd be consistent
<heat> but thats what they did?
<heat> L0 is the top, L3 is the bottom level
<geist> well you said L3 == top
<geist> well, okay now we have to define what top and bottom means
<heat> yes, in my mind, as in Intel
<geist> oooh ooh okay yeah if L3 == top that's dumb
<heat> PML4 -> PML3 (PDPT) -> PML2 (PD) -> PML1 (PT) -> page
<geist> L0 should be top and count down (assumign page tables grow 'down')
<geist> yeah i hate intel naming convention
<geist> but it grew out of 30 years of extensions and nonsense
frkzoid has quit [Ping timeout: 244 seconds]
<heat> at the end of the day computing is just extensions and nonsense
<geist> i forget honestly as i switch between the mmus but in my code i always call L0 top
<geist> indeed. the only reason the numbering matters in arm is if you decode some of the ESR bits in page faults it actually tells you at what level something or other happens
<heat> yes
<geist> though that's generally just informational, but as a result they have to actually define it
<heat> that's where I got confused
<geist> i think it's personally far cleaner to just think of page tables in the riscv and arm style: it starts at a L0, and at ever level you either have no entry, an additional level entry (another page table), or a terminal entry (page entry)
<geist> with various limitations as to how far you can keep going
<geist> x86 code tends to treat each level like a special snowflake when they aren't at all
<geist> (except for various hard coded limitations about page sizes and if you can make a large page here, etc)
* heat . o 0 ( I sell propane and propane accessories -> I sell nonsense and nonsense extensions)
<j`ey> heat: i tell you hwat
<gorgonical> With watchpoints on both mstatus and sstatus it still mysteriously gets set
opal has quit [Remote host closed the connection]
<gorgonical> I give up and no longer care
<gorgonical> >:(
<geist> what watchpoints are you setting and where?
<gorgonical> hardware watchpoints on mstatus and sstatus
<geist> remember the fs bit can also be set implicitly by fiddling with something before an sret that causes it to get restored
<gorgonical> Hmm
<geist> does that trap during an sret?
<gorgonical> Probably not
<geist> oh wait no, actually it doesn't :) there is not a saved copy of .fs
<geist> well, i'd suspect the watchpoint mechanism. how about testing it by explicitly writing code that sets the fs field and verify the watchpoint works
<heat> j`ey, i hope you feel responsible as our local ARM representative
gildasio has quit [Remote host closed the connection]
<geist> yah we used to have another one until we ran them off
<j`ey> heat: dont hate the player hate the game
<geist> i think they're still here but we sucked all their life out and now they just lurk as a dry husk
<geist> j`ey: you're not at the APM? isn't that starting right now?
<geist> i skipped out this year and sent some others in my stead
<j`ey> Im not the kinda person that goes to those things
opal has joined #osdev
<geist> wait no i thik it started a few days ago
<geist> are yo in the area?
<j`ey> yeah
gildasio has joined #osdev
<geist> well maybe next year can grab a beer
<geist> mmmm, luke warm UK beer with a side of peas
<heat> luke warm?
<heat> yuck
<geist> UK knows their warm beer
<gog> I love warm beed
<j`ey> I just bumped into one of the arm64 linux maintainers on the train (a googler too)
<gog> beer
<geist> yah i think one of the bigwigs lives here on the island, think i've seen him on the ferry
<heat> hot take: most kernel people are just crummy europeans
<j`ey> :{
<geist> or PNW dwellers
<heat> oh yeah for sure
<gorgonical> I'm a smelly Pennsylvanian usually
<j`ey> i think the LK author lives in PNW
<geist> rainy and cold(ish), just like a lot of crummy europe, most of the time
<heat> like half of intel is in oregon
<gorgonical> Which is also rainy and cold
<heat> j`ey, who?
<kingoffrance> eh, its not that cold. they freak out at snow
<kingoffrance> the wind maybe
<j`ey> heat: tradis gestlebricht
<heat> i don't know him
<geist> kingoffrance: that's why i had to suffix it with cold(ish)
<geist> since i know folks will go 'ACKCHTUALLY...'
<kingoffrance> yeah folks like heat :D
<heat> although I know famous zircon kernel hacker geist lives in PNW though
<kingoffrance> *gorgon
<heat> yeah it's pretty fucking hot here pal
<heat> this is both crummy and hot
<geist> heat: i forgot where here is?
<heat> here is there
<heat> kinda depends on where you are
<geist> i need to keep a spreadsheet of where folks are, but kinda would actually feel icky if i did
<geist> (not that i really would but the notion of doing that is icky)
air has quit [Ping timeout: 255 seconds]
mykernel has quit [Ping timeout: 245 seconds]
<heat> yeah erm, depends
<heat> strangers? creepy
<geist> stranger danger!
<heat> people you know relatively well? sure
<heat> OTOH my location is listed on my github profile
<heat> come get me strangers
<geist> yah i always found it to be useful from purely a conversational thing of nothing else to know where people are approximately located, in i think a completely non creepy way
<geist> at least gives you something to chat about or know what time zone they're in
<geist> oh that remuinds me i wonder what that guy on twitter that has a whole account tweeting about how i'm actually sergey doing fishy stuff is doing
<geist> my first actual crazy stalker that i know of
<heat> wait what
<gorgonical> lol what
<heat> please, tell us more
<geist> yeah someone linked it to me the other day. has this whole crazy twitter account about how i'm actually Sergey doing nefarious stuff through fuchsia
<gog> lmao
<heat> who's sergey?
<j`ey> sergey brin
<geist> one of the two founders of google
<gog> amazing
<j`ey> along with larry wall
<gorgonical> lol holy moly
<geist> who as far as i know is AWOL. i havne't heard of him in years
<geist> IT LINES UP
<geist> i already forgot the account, most certainly didn't follow it or anything
<raggi> Isn't part of the reason he's awol that x split out into alphabet?
<gorgonical> So I cannot find any evidence that some instruction indirectly sets FS
mykernel has joined #osdev
<gorgonical> Only these "instructions to enable unit" which I don't fully understand
<geist> gorgonical: yeah sorry for that misdirection. for a moment there i was thinking it was one of the bits that gets copied and moved during sret
<gorgonical> No that's okay, it's a legitimate idea. Considering the privilege mode and interrupt settings
<geist> possible there's a SBI call? i dont think so
<geist> did you test if the watchpoint even works?
<gorgonical> That's my running hunch, that somehow the firmware is getting involved. Qemu does tend to skip over calls down to firmware for some reason
<gorgonical> I am gonna check it now that I'm done consulting the manual
<gorgonical> I know the watchpoint catches other writes to [ms]status but I haven't checked explicitly FS bits
<geist> yah possible it only triggers on certain bits, depends on how the watch point mechanism works
<geist> or certain instructions that modify it
<geist> since there are a few different ways to modify CSR regsisters in riscv
<gorgonical> Is this transition table just being thorough? It says "execute instruction to enable unit" but as far as I know do you have to turn on the FPU? I thought just configure fcsr and set FS to 1?
<gorgonical> At least the sifive manual says all you have to do is set FS to 0x1
<gorgonical> So wtf lol
<geist> yeah that's my understanding too. i recently added context switch code to LK and that's my gist
<gorgonical> Then gremlins is the only answer
<geist> there's no automatic enabling of things (if it's disabled) but once it gets enabled there's a bit of a state diagram where it moves from initial/clean -> dirty
<geist> and really initial & clean are mostly for the OSes benefit
matt__ has joined #osdev
matt__ is now known as freakazoid333
bauen1 has joined #osdev
<gorgonical> The good news is that with the FS state correction the kernel runs hpcg on the hardware
tz has joined #osdev
<geist> woot
<gorgonical> I am still disturbed by my mystery
<j`ey> hpcg?
air has joined #osdev
<geist> i forget, are you seeing this on qemu or on real hardware?
<geist> or qemu emulating real hardware?
andydude has quit [Quit: andydude]
<gorgonical> geist: this weird behavior is on qemu
socksonme_ has quit [Ping timeout: 268 seconds]
<gorgonical> the real hardware was throwing illegal instruction because I had not set FS
<gorgonical> j`ey: hpcg is a standard hpc benchmark
<j`ey> ah
<gog> high performance computing gobbledygook
andydude has joined #osdev
andydude has quit [Client Quit]
<gorgonical> HPC is a good, natural home for system work
MA-SA-YU-KI has joined #osdev
<MA-SA-YU-KI> This working
kingoffrance has quit [Quit: Leaving.]
<MA-SA-YU-KI> \quit
MA-SA-YU-KI has quit [Client Quit]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
MA-SA-YU-KI has joined #osdev
<heat> \quit
freakazoid333 has quit [Ping timeout: 255 seconds]
<zid> \n
<MA-SA-YU-KI> Anyone willing spend 1 hours solving two C++ programming problems (one using GitHub CoPilot and the other without) for $50 CAD? It's for a master's thesis at University of Waterloo to see the quality of code produced when aided by CoPilot.
<zid> Only if I'm allowed to actually use C
<MA-SA-YU-KI> @zid The programming problems are written in C++ so they may not be compatible with C.
<zid> No then
<zid> (I can't write C++, even if paid)
<MA-SA-YU-KI> But you are welcome to write C code in C++ and as long as it compiles with g++ -std=c++17 then you're good.
<MA-SA-YU-KI> @zid Thank you!
<mjg> funny channel to ask something like this though
<zid> although funnily, that might be the best reason to use copilot
<zid> to write in a language I don't know
<zid> MA-SA-YU-KI: I'm a UK national and would need paypaling, is that also fine?
<mjg> wait you are atually going for this?
air has quit [Ping timeout: 244 seconds]
<zid> sure why not? I've never used co-pilot
<zid> what's 50 cad in money, like £4.20?
<mjg> well have fun
<klange> £32ish
kof123 has joined #osdev
gildasio has quit [Write error: Connection reset by peer]
opal has quit [Remote host closed the connection]
opal has joined #osdev
<gog> I will never code again
<zid> neat
<zid> can I have all your spare brackets then
gildasio has joined #osdev
<klange> I'll take the parens.
<gog> sure
<zid> I was using brackets as a group + mass + collective noun sorry klange
<mjg> don't use lisp, problem solved
<gog> all of my enclosing tokens are up for grabs
<klange> You get the squares and the squigglies and you'll like it, dammit, those parentheses are MINE
* mjg will take hte bugs
<zid> I think you mean round brackets
<gog> roumd
<zid> gorge, did you throw anything cool into the volcano yet?
<gog> no I'm gonna go down there with a dump truck of ice cubes
<heat> mjg, plenty of people here write C++
<heat> or R U S T
<zid> I wrote like 10 lines of rust
<mjg> i'm sure you will even find JAVA aficionaods
<mjg> i was commenting on trying tihs out, not using the lang
<zid> I was trying to figure out how to add two numbers together it took me a while
<heat> yeah they wanted some "system programmers"
<heat> or professional osdevers or whatever they said a few weeks ago
<gog> I'm the most unprofessional osdevver
<heat> and we are the professional osdevers
<mjg> i'm an osdever, but defiintely not professional
<mjg> you should see my comments
<zid> Nothing good came out today, hmm, now what do I read
<gorgonical> what is it if I'm a student
<MA-SA-YU-KI> @heat yes and yes.
<zid> this isn't twitter fyi
<heat> mjg, freebsd is a hobby project, change my mind
<heat> or don't, whatevs
<heat> i'm not needy
<gorgonical> if freebsd is a hobby project then what does that make dragonflybsd
<heat> defo not doing this for attention
<gog> i am
<zid> I am needy also
<heat> dragonflybsd go brrrrrrrrrrrr fire flying
<MA-SA-YU-KI> we've had close to 18 graduate students from UW. We thought professional osdevers would use CoPilot slightly differently.
<zid> I think osdevers just won't need it
<j`ey> MA-SA-YU-KI: by not using it :p
<zid> I am hugely cynical about the benefits it provides to systems code
<heat> CoPilot won't help me write arm64 mmu code
<zid> compared to boilerplate web-code
<gorgonical> zid: because we are all supersmart professional hackermen
<MA-SA-YU-KI> So there is no way to "at" people?
<zid> gorgonical: I mean, heat is at least
air has joined #osdev
<zid> MA-SA-YU-KI:
<zid> like you keep seeing people do
<MA-SA-YU-KI> zid: did this 'at' you?
<heat> thank you zid for understanding what I am deep down
<gog> also because we have divergent philosophies and a "I'll make my own" attitude
<zid> I don't have an 'at' feature, same as on discord, I turn it off :P
<heat> a gay m- supersmart professional hackerman
<gog> that pair programming tends to not be an thing
<mjg> heat: well it is a hobby which pays :p
<j`ey> zid: zid zid zid zid zid zid zid
<zid> I like pair programming
<zid> it's fun
<mjg> heat: but you do have a point
<gorgonical> i prefer apple programming myself
<zid> It's like hanging out watching a movie, but you're watching someone code
<zid> but if you say something during a movie nothing happens
<klange> pair programming not pear programming!
<zid> if you say something during pair programming they feel embarassed! it's amazing
<heat> h`ey j`ey h`ow`s t`he r`ust a`rm64 k`ernel
<zid> "You spelled constraints wrong idiot"
<j`ey> heat: nonexistant :{
<gorgonical> can someone explain the backtick to me
<heat> j`ey, didn't you have one?
kof123 has quit [Ping timeout: 268 seconds]
<zid> fuck knows why he has one in the MIDDLE of his shit
<zid> but I have one on the end of my alt-nick because _ is ugly
<j`ey> heat: only some really basic rubbish
<heat> it's great, don't say that
<zid> and irc says you get _ and `
<gog> oh my alt with the backtick is already here
<heat> you are the professional osdever, j`ey
<j`ey> gorgonical: idk, I made it in 2007 or so
<MA-SA-YU-KI> j`ey: this true?
<MA-SA-YU-KI> professional?
<heat> zid, _Zid is cooler
<j`ey> MA-SA-YU-KI: i guess
<zid> it bloody isn't
<heat> the true reserved namespace name
<mjg> i'm freezer
<MA-SA-YU-KI> would you be willing j`ey?
<heat> i made a mistake
<j`ey> MA-SA-YU-KI: no
<zid> I'm a pressional layabout
<heat> here's a tip: pestering people doesn't work
<MA-SA-YU-KI> Okay. Thank you!
<psykose> heat: are you a heating professional
<psykose> can you insulate my home
<heat> i am a professional in the thermal industry
<psykose> could you copilot me some insulation for a tenner
<zid> HVAC = heat values assisting caterpillars
<j`ey> MA-SA-YU-KI: try the osdev discord?
<MA-SA-YU-KI> heat: j`ey: I am so sorry. I didn't think that was pestering.
<psykose> generally an announcement is okay, like your first message. if anyone was interested they would tell you
<psykose> (they didn't though, so)
<MA-SA-YU-KI> j`ey: They told me to check the IRC.
<zid> kek
<j`ey> heh
<psykose> lmao
<MA-SA-YU-KI> I also checked out serenityOS and SkiftOS
<j`ey> MA-SA-YU-KI: I think that answers your question then ;)
<psykose> check out the osdev bookclub
<gorgonical> we have a discord?
<zid> we do not
<zid> there is one, it's shit
<gorgonical> oh lol
<MA-SA-YU-KI> psykose: Thanks for the warning. I also can't seem to the find the book club.
<zid> it's ran by some kid who isn't very good who likes to ban people who disagree with him
<zid> but there's a lot of "putting up with abusive people because it's a hard industry" sort of mentality there, like being a chef
<\Test_User> I use \ bc it's both non-standard and makes no sense as to why it's there :P
<zid> also makes it so your name is annoying to tab complete
<gog> est_user
<\Test_User> fair enough
<\Test_User> lol
air has quit [Ping timeout: 255 seconds]
<psykose> i still don't get that one, is it actually '\', because my client sees a pipe
<psykose> pipe user
<zid> your client is broken congratulations
<psykose> :)
<psykose> (i do prefer the pipe, so this is a feature)
<zid> gaaay
<psykose> look who's talking
<zid> ikr
<psykose> :p
<\Test_User> it's an actual \, though you wouldn't be the first to have their client act up with it (for them it's just a tab autocomplete to | though)
<psykose> hmm
<\Test_User> then my client doesn't see |Test_User as a valid ping
<zid> It completes fine for me but \ is near tab on my layout but uses similar fingers which makes it fun
<zid> \n is nice, alternating hands, \[tab] is gross
<gog> disco elysium but instead of a cop you're a programmer
<gog> "I don't wanna be a programmer."
air has joined #osdev
<mjg> you reminded me of Pandorum
<mjg> pretty decent sci-fi movie, recommended to check out
<mjg> albeit if you read 'orphans of the sky' you are going to get familiar vibes
<heat> my client says \Test_User == |Test_User
<heat> and that they're both valid pings
<zid> I've got an inflamed taste bud and I can't stop gnawing on it
kof123 has joined #osdev
<gog> owie
<psykose> bet it feels good, jealous
<zid> It's got a choice, either get so bad that I fuck it up and turn it into a pulpy mess I can no longer bite
<zid> or heal
<mjg> i see you have a no bullshit approach to your taste buds
<mjg> goggins right there
<zid> I'm just a realist, that WILL be what happens
<mjg> [if you don't know the guy, don't google him]
<zid> *mmediately types into wikipedia*
<zid> Rodney Goggins (born 1978), Irish snooker player
<mjg> phew, wrong guy
<mjg> you got lucky
<mjg> the don't-google guy's name is david
<zid> I checked them all and none of them had "horrific injury" sections of their pages
<zid> even david
<mjg> i did not see his wiki page
<zid> what did you see then
<mjg> but rest assured, injuries is not osmething he is a stranger to
<mjg> well now you are making me admit i listened to his audiobook :s
<zid> and what did he say?
<zid> I'm not pirating an audiobook of some weirdo just to find out
<mjg> (:
<mjg> for example he was running a marathon, fucked up his leg, but figured "screw it" and continued
<mjg> then he started vomitting something black
<zid> yea it's very not like that
<zid> I just know that I will pick at it
<zid> there is no other outcome
<mjg> according to the doctor this was kidneys giving up or somethign similar
<mjg> basically the guy almost killed himself numerous times
<heat> david goggins is fucking hilarious
<mjg> heat: not saying no
<mjg> heat: STAY HARD
<kof123> i always heard only the weak die, something about building a throne of skulls of your enemies
<mjg> personally i think the guy is harmful when taken seriously though
MiningMarsh has quit [Ping timeout: 252 seconds]
<heat> oh for sure
<kof123> i want to say a reference, to what i do not know
<heat> these alpha male energy trillionaire grindset dudes are very harmful to society
<heat> but also hilarious
<zid> maoschism brings you closer to god something something heaven
<mjg> most notably he claims that "rest for muscle building" is just lazy fucks not wanting to push themselves
<heat> my favorite is gary vee
<mjg> haha, screw that guy, for real
<kof123> rhymes with zid ....9/11 sorry
<mjg> goggins is at least living what he preaches
<zid> kof123: what?
<mjg> gv is a full time grifter
<kof123> silly south park lol
<zid> no idea what you're talking about
<bslsk05> ​'GARY V MOTIVATION!!!' by BarbershopTalk (00:00:37)
<kof123> it was joking how that got worked into music
<mjg> heat: not clicking that
<heat> please do
dennisschagt has quit [Ping timeout: 244 seconds]
<heat> it's hilarious
<mjg> i got enough bad suggestions on my youtube page :[
<zid> you can.. dlete it from your history
<heat> do it in private browsing
MiningMarsh has joined #osdev
<heat> there's also a lot worse than gary vee
<zid> 'never recommend this channel'
<mjg> heat: i have a browser dedicated for lol content
<gog> ewwwww
<mjg> the problem is G picks up on it anyway
<zid> you really need to learn how to use youtube, shit as it is, it can at leat be tolerable
<gog> i watched a video about him yesterday
<mjg> coffezilla?
<gog> really disturbing stuff
<heat> zid, problem with this tate guy is that he tells his followers to create accounts on social media and post his shit
<mjg> heat: so i watched it, defo worse than i thought
<zid> your problem is using social media
<mjg> heat: i expected the standard "work 20h a day you lazy f"
<gog> no illuminaughtii
dennisschagt has joined #osdev
<heat> zid, in this context social media = youtube as well
<mjg> that's viral marketing, not "problem"111
<zid> You're just bad at youtube, stop watching harmful dogshit and it won't suggest more of it
<mjg> you just don't have what it takes to succeed
<zid> or at least delete it from history
<gog> i wiped my whole YouTube history
<gog> and started from scratch
<gog> carefully curated
<mjg> wiped from where
<gog> settings i think
<mjg> in your g account?
<mjg> i browse crap while not being logged in
<gog> in history
<mjg> from a separate browser
<gog> clear all watch history
<zid> It's literally just
<zid> a huge button on the right of 'history'
<mjg> well removing shit from your browser does not change what youtube recommends
<zid> youtube
<zid> nothing to do with your browser
<heat> adsense has a pretty good knowledge of who you are
<heat> i doubt they don't use it for youtube as well
<zid> adsense has no idea who I am, unless they've been cheating (which I don't trust google not to do, to be fair)
<zid> I've never loaded content from any of those domains
<mjg> no buttons of the sort withoutl oggin in
<zid> (doubleclick.net, mainly)
<mjg> and as i mentioned i only watch this crap as unlogged
<mjg> maybe i should create a lol account
<bslsk05> ​redirect -> myaccount.google.com: Account settings: Your browser is not supported.
<heat> check it
<zid> Ad personalization is OFF
<mjg> adblock
<mjg> just sayin
<zid> Like I said, I've never loaded anything from doubleclick.net
<heat> mjg, it's not just adblock
<heat> they know I've been searching for internships
<heat> I have adblock permanently on
<heat> :)
<mjg> funny you say that
<mjg> i got a job offer from G years back sent to my gmail account
<heat> so google search, maybe even careers.google?
<zid> heat was it you at cloudflare
<heat> was it me that what
<mjg> i had tons of unixy stuff in serach history at the time
<zid> guess not then
<heat> what happened
<zid> nothing happened?
<mjg> is that the outage joke again?
<zid> what
<heat> i'm not aware something happened
<zid> nothing happened
nyah has quit [Ping timeout: 252 seconds]
<mjg> *someone* is tripping
<zid> yes, heat
<mjg> it may be me
<heat> am I tripping
<mjg> if you have to ask...
<zid> gog: Who was it who was at cloudflare?
<heat> me
<gog> heat
<zid> so if I ask heat it doesn't work, if I ask gog, heat answers, interesting
<heat> ah, you were asking if I was at cloudflare
<heat> lol
<zid> gog: (for heat) Your CSFR tokens including IP address has fucked my proxies ty
<mjg> are they the same cat
<heat> I didn't understand
<heat> mjg, I've gotten some offers cuz of my OS work
<heat> not unreasonable that you got pinged for freebsd
<zid> A website I use that hosts masses of illegal pornography started using cloudflare, I had it set up to use a socks tunnel via URI regex
<zid> but now I just get invalid csrf token unless I switch my entire browser to the proxy before I load that domain
<zid> because I access cf and the site itself using a different IP, I think
<heat> /shrug
<pie_> I come to osdev for the porn
<kof123> yall gonna get fired when the bots read the logs j/k
<gog> preposterous
<gog> i don't post any here
<heat> $ python -c 'print("Production Engineering - Greetings from Facebook")'
<heat> tell me this doesn't look like a corny newsletter
<zid> no
<heat> it reads like a stack overflow newletter man
<mjg> heat: job offer before it was cool
<mjg> i unregistered from SO
<mjg> life is better
<pie_> then heat cooled down?
<heat> I accidentally found out I had this a year ago
<heat> this was in 2018
<zid> covid?
<heat> covid what
<heat> i'm not grokking you today zidders
<heat> either I'm dumber than usual today or you're dumber than usual today
<zid> "I accidentally fout out I had this a year ago" "covid?"
<heat> someone lost IQ points
<heat> no, the fucking email from facebook
<heat> sorry, that came out a bit agressively
<heat> s/fucking//
<zid> covid can cause brain fog and rage, I think I am right
<heat> i've never had covid I think
<mjg> how did this get so grim
<heat> python -c 'print("idk man")'
<mjg> perl -e 'print "kids today\n"'
<heat> sh -c 'echo "I have poopy in my diaper"'
<gog> y'all are making me feel smart rn and that's a feat because i am dumb as hell
<mjg> i don't know how to do a php one-liner
<mjg> i think that's good
<mjg> [is that even a thing?]
<heat> yes
<heat> idk
<zid> I can do a subliner
<zid> <?php echo "tits;" >
<heat> who tf knows php
<mjg> zid: how do you ship it to the interpreter
<heat> see, we've went full intellectual here at #osdev
<mjg> apart from piping it
<zid> I don't know, I only know how to do subliners
<heat> this is why we're not professional osdevers
<gog> I remember php
<mjg> i think it is time for the first os in ph
<mjg> php
<gog> it'll never work
<mjg> it already works in my dreams
<heat> it won't be big and professional like linux
<mjg> php -r 'echo "you cannot unsee it\n";'
<heat> why do I have php installed
<mjg> i don't!
<mjg> although there is a nasty review prog (phabricator) which has tooling requiring it :[
<klange> kuroko -c 'print("please post code using a pastebin/gist")'
<moon-child> <p>what are all these languages? I only know html5</p>
<mjg> first people laughed at claims that html is a programming language
<heat> ah I know why, arcanist
<heat> yeah
<mjg> then they found about js
<mjg> out*
<mjg> ye screw arcanist
<mjg> i tried to use it but i could never be sure what it is going to do
<heat> phabricator is dying though soooo
<mjg> gave up on it
<mjg> let it rot
<heat> llvm is thinking about switching to something else
<gog> I'm gonna reimplement php but good
<mjg> are there any svn users left?
<mjg> gog: i think that is missing the point
<gog> so?
<mjg> could also be a great joke
<gog> tbf tho the language rests on such questionable design choices that i don't think it's possible
<heat> mjg, don't most BSDs use non-git?
<heat> netbsd uses cvs
<mjg> 2 use git
<mjg> so it is kind of a tie
<heat> non-git are all equally shit
<kof123> its a fractal. you will need fibonacci numbers or phi and pi and such perhaps
<kof123> good luck <watches gog disappear into a spiral>
<mjg> hg?
<heat> also shit
<mjg> :)
* gog fibbonacc
<mjg> fwiw netbsd was trying to switch to it, i don't know what happened there
<heat> lack of manpower? :)
<mjg> fbsd moved from svn 2 years ago
<mjg> maybe manpower, maybe flamewars
<mjg> at some point someone needs to put on the hazmat suit, do the work and tell people who complain to gtfo
<heat> freebsd has substantially more manpower than all the other ones afaik
<mjg> sure
<mjg> and you think git was a universally agreed upon choice? :)(
<heat> shrug
<mjg> open is also on cvs
<mjg> but they are working on their own variant of git, or at least used to
<mjg> "game of trees" or so
<heat> whyyyyyyyyyyy
<heat> let me guess
<heat> it's "safer"
<heat> cant wait for the sha-1024 checksums
<heat> for the Safety(tm)(r)
<heat> "Got uses Git repositories to store versioned data." huh?
<heat> this is a git-like but slightly different?
<moon-child> it's an implementation of git
<moon-child> iirc
<mjg> heat: 1. nih 2. license
<heat> so erm
<heat> it's a big waste of time
<heat> #osdev-like
<moon-child> :D
<gog> it'll be secure by default tho
xenos1984 has quit [Read error: Connection reset by peer]
<heat> after 7 years I'm allowed to say this
<heat> the only thing you get are stack overfl-facebook recruiting emails
<bslsk05> ​github.com: Onyx/percpu.h at master · heatd/Onyx · GitHub
<heat> vars are 0-addressed like in lunix
<mjg> i have no clue about arm. do you have preemption in arbitrary places?
<heat> yes but that's not the issue here
<mjg> wait, that's 'trhead pointer'?
<heat> this doesn't work while there's no preemption (still doing bringupwork)
<heat> what's in tpidr_el1, the percpu base
<dh`> check the compiler output
<bslsk05> ​godbolt.org: Compiler Explorer
<heat> this looks correct no?
<dh`> mrs x8, TPIDR_EL1
<dh`> str x9, [x8, x10]
<dh`> unless I have completely forgotten my arm or there's something markedly different about aargh64, that's storing an uninitialized value in a wild pointer generated by adding the thread pointer to the address of var
<heat> x9 is 10 because of w9
<dh`> oh
<dh`> not familiar enough with aargh64 I guess
<heat> and that's not a wild pointer because TPIDR_EL1 will have the percpu base while &var will be 0-based (so close to NULL, just so its an offset, like linux does)
<zid> ARGHm is a great arch name
<dh`> it's not though, it's just in .data
<dh`> unless you're doing wild things with your segments, you probably want to dump it in a thread-local segment and apply the thread-local relocations to it
<dh`> or if you don't want to touch the TLS crap, use explicit thread or cpu structures
<dh`> anyway it does appear to be reading the register correctly
<heat> dh`, my kernel does special stuff with percpu variables
<heat> puts them in a separate section and then sets the base of that to 0
<heat> this is just a tiny example
<dh`> fair enough I guess
xenos1984 has joined #osdev
<dh`> (also, can I interest you in using vaddr_t instead of unsigned long?)
<heat> str x10, [x8, x9] <-- x10 has the correct value, x8 does as well, and so does x9. dumping x8 + x9 doesn't give me x10, but 0
<dh`> an ordinary store instruction can hardly go wrong that badly
<heat> dh`, why :(
<heat> yeah erm maybe there's something I'm missing?
<dh`> possibly your debugging is lying to you
<dh`> er, debugger
<heat> no, qemu agrees with me
<dh`> re vaddr_t, mostly because the extra semantic information in the typedef name makes the code more readable
<dh`> I'll grant it's unlikely you'll ever hit a machine where vaddr_t isn't unsigned long under the covers
qubasa has quit [Ping timeout: 240 seconds]
<heat> oh wait....
<heat> found the issue! lol
<clever> what was it?
<heat> I was mapping to the wrong address
<clever> ah
<heat> I forgot to change the percpu code to add the load bias when remapping stuff
<heat> so it was probably mapping it to the dtb
<heat> the dtb isn't readable so ROM
<heat> s/readable/writable/
<dh`> also if you're going to need access macros/functions to get at the percpu vars anyway, I would really lean towards having struct cpu {} and accessing it via a curcpu() macro or similar
<dh`> one of the reasons being that this makes it clearer where you need to disable preemption (or whatnot) to make sure your thread doesn't teleport to a different cpu in the middle of accessing percpu stuff
qubasa has joined #osdev
<dh`> but I suppose rearranging how your backend stuff works isn't on the agenda right now :-)
<clever> you can also decide between it being percpu or perthread
<clever> if its perthread, then teleporting to another cpu shouldnt matter
<heat> dh`, idk, i've been basing my percpu work on how linux does it
<heat> I haven't dealt with the preemption issue because right now my scheduler can't migrate threads :v
<clever> thats one way to fix it!
<heat> although yes that's an issue
<dh`> thread migration accidents are something os161 currently handles badly
<dh`> anyway my experience has been that while in theory it's nice to be able to have per-cpu or per-thread data that's also file-static rather than stuffed in some global struct cpu or struct thread
<dh`> the gyrations necessary to make it work aren't worthwhile
<clever> the arch i work on has a dedicated register, `tp` that can hold a thread pointer
<dh`> most architectures have some provision for this sort of thing
<dh`> e.g. on mips the way the designers expect you to do it is to give each cpu its own private mappings somewhere in high memory so the current cpu's cpu structure is at a fixed address
<heat> except x86 baby!
<heat> question: shouldn't I get an external abort if I try and write to ROM?
<bslsk05> ​github.com: toaruos/process.h at master · klange/toaruos · GitHub
<clever> dh`: and on LK, the kernel expects the arch to implement a arch_get_current_thread() and arch_set_current_thread()
<klange> And for the x18 thing, you can tell gcc/clang to not use it for other things with `-ffixed-x18`
<clever> dh`: and i think i mis-remembered it, the code i just checked, calls it r29
<dh`> in os161 on mips for reasons curthread is $23 and there's no special mappings