channel logs for 2004 - 2010 are archived at http://tunes.org/~nef/logs/old/ ·· can't be searched
#osdev2 = #osdev @ Libera from 23may2021 to present
#osdev @ OPN/FreeNode from 3apr2001 to 23may2021
all other channels are on OPN/FreeNode from 2004 to present
Tuesday, 5 September 2023
04:06:00 <zid> Hours since last timezone issue: -24:30
04:22:00 <clever> zid: https://www.youtube.com/watch?v=QCwpVtqcqNE
04:22:00 <bslsk05> 'The Zip Line Across Time Zones' by Tom Scott (00:02:03)
06:42:00 <zid> That's how heat gets home from watching the football
09:01:00 <papaya> \q
09:52:00 <Ermine> vendors still ship cds with drivers in 2023
09:52:00 <nikolar> yup
09:52:00 <sham1> Might as well. Also, not everyone has internet connectivity
09:55:00 <FireFly> can confirm, I got a new driver CD yesterday
09:57:00 <Ermine> And driver installer is in Chinese
09:58:00 <gog> who has an optical drive though
09:58:00 <gog> the last two computers i've owned don't include them
10:00:00 <Ermine> I have one but it's damaged
10:00:00 <GeDaMo> I have on e in this machine
10:01:00 <nikolar> i should probably get a usb optical drive
10:13:00 <Ermine> tfw it works under linux but not under windows
10:33:00 <FireFly> I got a cheap USB optical drive at some point, it's very noisy but works in a pinch
10:34:00 <FireFly> admittedly it's somewhere in my storage unit
10:34:00 <FireFly> but yeah never really use CDs anyway
10:47:00 <Hammdist> what's a good resource that explains paging on arm64?
10:56:00 <sham1> The ISA docs
10:56:00 <Hammdist> lol
10:56:00 <Hammdist> found this at least: https://github.com/bztsrc/raspi3-tutorial/tree/master/10_virtualmemory
10:56:00 <bslsk05> github.com: raspi3-tutorial/10_virtualmemory at master · bztsrc/raspi3-tutorial · GitHub
11:04:00 <Ermine> Will it work under freebsd?..
11:38:00 <zid> virgin did network maint or something and turned the internet off, I had to sit here rocking back and forth doing nothing for hours. What did you do while the internet was off?
11:44:00 <zid> I appear to have 370Mbit interwebs now
12:51:00 <netbsduser> i got that not some little time ago
12:51:00 <netbsduser> zen phoned me to inform that fibre to the premises was available
13:39:00 <gog> hi
13:44:00 <Ermine> hi gog, may I pet you
13:44:00 <gog> yes
13:56:00 <Hammdist> it seems I've done something to confuse gdb: https://paste.ee/p/3uXhO any ideas what might be wrong? basically I set PHYS_BASE to 0x40000020 in the linker script of onyx which I copied into my project and now gdb is confused. what I'm trying to do at a high level is switch to a 1:1-ish mapping where previously things were set up that the kernel
13:56:00 <Hammdist> mapping would be offset by PHYS_BASE
13:56:00 <bslsk05> paste.ee: Paste.ee - View paste 3uXhO
13:58:00 <Hammdist> I should mention I am connecting to qemu arm64 emulation with gdb
13:58:00 <Hammdist> this is happening before page tables are installed
14:01:00 <Hammdist> basically, when I ask to print 0x40000020, I am getting the memory at 0x40200000 ... onwards (with the contents I would expect to be at 0x40000020)
14:06:00 <Hammdist> well actually the load address 0x40000020 is a bit suspicious, as it's not a proper boundary. but the code at 0x40000000 branches there all right ...
14:12:00 <Hammdist> ah it was the star symbol before the address. it works if I don't specify that
14:17:00 <FireFly> presumably the value at 0x40000020 is a pointer to 0x40200000 ?
14:17:00 <FireFly> so dereferencing it yields the latter and then you're printing the instructions there
14:23:00 <Hammdist> ah thanks for the explanation of this phenomenon. gdb is confusing since the breakpoint instruction requires a star to work with a raw address
14:24:00 <gog> 0x420
14:24:00 <gog> 0x69
14:24:00 <gog> gdb console has a sort of REPL for c code
14:29:00 * Ermine pets gog
14:33:00 * gog prr
15:31:00 <Hammdist> yay it seems to have booted up into a 1:1-ish mode I think. I rigged it so converting a physical address to a kernel address just means prepending 0xffffffff... and vice versa just stripping this prefix.
17:34:00 <geist> woot
17:34:00 <geist> this is an arm64 qemu instance?
17:51:00 <jimbzy> Hmm. I read a forum post a while back (I think it was on 6502.org) that suggested daisy-chaining bus lines was acceptable, but the forums seem to be down. Have any of you ever seen this done?
17:52:00 <jimbzy> So, instead of going from CPU -> RAM, CPU -> ROM, etc you'd go CPU -> RAM -> ROM.
18:01:00 <nortti> jimbzy: if it genuinely is a bus electrically that ought to work yeah
18:08:00 <jimbzy> nortti, Yeah I guess it would. I just never thought about it and seemed kind of greasy.
18:11:00 <kof123> unless i am wildly misunderstanding, that sounds like caching all the way down (if item is not found in A, lookup in B instead)
18:12:00 <jimbzy> kof123, I mean instead of running a direct line from A0-A15 from the CPU to the RAM and ROM chips run it from the CPU to to the RAM, and then from the RAM to the ROM.
18:13:00 * kof123 whoosh sound over kof's head
18:13:00 <jimbzy> Just the address and data lines, though. CEB, OEB and WEB would all have to be direct so only one chip is active at a time.
18:13:00 <jimbzy> I guess technically it would be A0-A13 with A14 and A15 being used to determine the appropatie chip.
18:14:00 <kof123> well dumb q from the software POV ...how is rom and ram accessed? is this transparent to the asm instructions, is what i was getting at
18:14:00 <kof123> like some addresses go to x, others go to y
18:16:00 <jimbzy> From what I can tell it's all the same to the 6502. You got $0000-$FFFF for RAM, ROM and I/O
18:17:00 <kof123> makes sense. that is the only part i am vaguely familiar with, the rest is just a black box
18:31:00 <jimbzy> Here are a couple of ideas I had for the address decoding logic. https://i.imgur.com/qD5n1yO.jpg
18:31:00 <bslsk05> i.imgur.com <no title>
18:42:00 <GeDaMo> jimbzy: I believe that was common in the 8-bit days
18:42:00 <jimbzy> Daisy-chaining?
18:42:00 <GeDaMo> Yeah
18:43:00 <GeDaMo> RAM usually consisted of multiple chips too
18:43:00 <jimbzy> Ah, that's a good point.
18:45:00 <jimbzy> I was thinking about doing it because I'm wrapping my board and I didn't want to have a bunch of connections emanating from the CPU.
18:55:00 <bl4ckb0ne> is there a maximum of EFI_MEMORY_DESCRIPTOR for GetMemoryMap defined in the spec?
18:56:00 <yyp> doesn't look like it
18:57:00 <bl4ckb0ne> gonna put 512 but i feel like this is going to bust me up in the ass later
18:58:00 <yyp> that's probably reasonable, though requesting MemoryMapSize and requesting that much memory from some allocator wouldn't ever backfire
18:58:00 <yyp> and if you don't have enough memory for that ... what kind of memory map does the system have
18:59:00 <bl4ckb0ne> i can just catch EFI_BUFFER_TOO_SMALL and worry later
18:59:00 <yyp> maybe
19:01:00 <yyp> my silly risc-v kernel allowed max 32 descriptors lol
20:46:00 <geist> jimbzy: i think that's fine if the clock is relatively slow
20:46:00 <geist> like, <100mhz, etc
20:47:00 <gog> hi
20:47:00 <geist> gog!
20:47:00 <gog> geist!
20:47:00 * gog prr
20:47:00 <gog> i'm not a very good web developer
20:48:00 <sham1> Be proud. That means that you're not a lost cause
20:48:00 <gog> i think i might just not be a good programmer at all
20:48:00 <nikolar> kek
20:48:00 <gog> i might be a hack and a fraud
20:48:00 <sham1> And this, my friends, is what we call impostor syndrome
20:49:00 <gog> i don't have impostor syndrome, i'm just not good at my profession and i don't belong there and i only still have a job because they feel sorry for me
20:50:00 <zid> Ljót Bergljót Ljótsdóttir
20:51:00 <gog> :|
20:51:00 <gog> guess i'm ugly too
20:51:00 <zid> oh so that translation was true then
20:51:00 <gog> daughter of ugly
20:51:00 <zid> I saw it earlier and had it on my cut buffer
20:51:00 * sham1 squints at zid
20:52:00 <zid> gog: We call that winning, btw
20:52:00 <zid> like, even if it were true, scamming THE MAN out of wages? 10/10 powerplay move.
20:54:00 <jimbzy> geist, Yeah it's going to be slow.
20:54:00 <gog> i'm an imposter in every way
20:55:00 <jimbzy> My EEPROM's 150ns access time pretty much rules out going fast. ;)
20:56:00 <kof123> i agree with zid that is like master tao programmer, body is invisible
20:58:00 <zid> I should read today's scrollback, my ISP turned the internet off all day though
20:58:00 <zid> so there shouldn't be anything there
20:58:00 <zid> with the internet being turned off and all
20:59:00 <gog> there might be some me being sad
20:59:00 <zid> *might* be, k :D
21:00:00 <gog> or saying that i'm sad
21:00:00 <gog> i'm pretty sad rn idk
21:00:00 <zid> You're obviously having THOUGHTS
21:00:00 <zid> bad idea imo
21:01:00 <gog> yeah
21:01:00 * kazinsal hugs gog
21:01:00 <kazinsal> no being sad allowed :(
21:01:00 * gog hug
21:01:00 <zid> where wife?
21:02:00 <gog> i already told her i'm sad and she told me some comforting things but it didn't help
21:02:00 <zid> just go hang off her leg and let her drag you around the house
21:02:00 <gog> i don't think that's going to work
21:05:00 <ChavGPT> lol
21:05:00 <ChavGPT> watch some self help guru gogs
21:05:00 <ChavGPT> or perhaps you would like non-comforting thigns?
21:06:00 <kazinsal> a nice cup of tea and fuzzy socks while watching relaxing youtube videos is a favourite of mine
21:10:00 <gog> idk
21:13:00 <gog> i'm gonna stop now tho
21:13:00 <gog> sorry
21:16:00 <jimbzy> https://i.imgur.com/nFWKA5q.jpg
21:16:00 <bslsk05> i.imgur.com <no title>
21:17:00 <zid> jimbzy: Your diagram makes my brain itch
21:18:00 <zid> I see the nand gate taking the same input twice, realize it's because you're only using nand gates, and make myself sad because it's a not gate really
21:20:00 <gog> sosig
21:24:00 <jimbzy> All sosig all the time.
21:26:00 <gog> i had borgar
21:26:00 <gog> for dinner
21:26:00 <zid> I had nothing, I was anslep
21:26:00 <gog> i had an avocado hummus foccacia bread for lunch
21:26:00 <gog> it was literally avocado toast
21:26:00 <zid> hipster alert
21:26:00 <zid> wee woo wee woo
21:26:00 <gog> it was delicious
21:26:00 <zid> I made cheese and onion baps for lunch
21:27:00 <zid> It's like avocado foccacia, but 100% less middleclass
21:29:00 <gog> i'm not middle class
21:29:00 <jimbzy> borgar
21:29:00 <gog> jimbzy: borgar
21:29:00 <zid> your diet says you are
21:29:00 <jimbzy> humborgar?
21:29:00 <zid> middle class gastrointestinal tract
21:29:00 <gog> it was a 900isk prepack sandwich
21:29:00 <gog> i got it because i needed something
21:29:00 <zid> You picked it
21:29:00 <gog> it was the cheapest prepack sandwich
21:29:00 <zid> no excuse sorry
21:30:00 <gog> :<
21:30:00 <gog> i'm proletarian
21:30:00 <gog> i'm a real working class gal
21:30:00 <zid> A real working class peasant would have just eaten the rich
21:30:00 <gog> workers of the world unite
21:30:00 <gog> shit you're right
21:30:00 <gog> i _am_ a fraud
21:30:00 <zid> We all are :(
21:30:00 <zid> bezos is looking *very* undercooked still
21:30:00 <gog> in minecraft
21:30:00 <jimbzy> Gotta get you a lunch pail, gog.
21:31:00 <jimbzy> Old school.
21:31:00 <gog> yes
21:31:00 <gog> a steel lunch pail
21:31:00 <jimbzy> Damn straight.
21:31:00 <zid> I take it pail means something else in this context
21:31:00 <gog> that i'll eat from halfway through my 7 hour day at the code mines'
21:31:00 <zid> unless americans really do eat from buckets.. maybe they do, given the size of them
21:32:00 <gog> https://www.lunchbox.com/products/plain-metal-dome-lunch-box-silver
21:32:00 <jimbzy> I use my old man's Stanley Classic lunchbox.
21:32:00 <zid> wrenches for dinner
21:32:00 <gog> ok this one has rosie the riveter sticker that comes with it
21:32:00 <gog> that's kinda dope i want it
21:32:00 <zid> while sitting on exposed scaffolding on the under-construction empire state building
21:33:00 <jimbzy> If not that one get you a Thermos-brand Victory.
21:33:00 <gog> our services are like a construction site
21:33:00 <gog> dangerous and over budget
21:34:00 <zid> https://collectionhero.s3.us-east-2.amazonaws.com/lunchbox/60d726c025a97.jpg
21:34:00 <zid> me_irl
21:36:00 <gog> https://www.etsy.com/listing/1428222582/vintage-annie-metal-lunchbox-and-thermos i had this when i was a kid
21:36:00 <bslsk05> www.etsy.com: Vintage Annie Metal Lunchbox and Thermos - Etsy.de
21:36:00 <gog> then people made fun of me so i stopped carrying it
21:36:00 <zid> I'd also have made fun of you, the 80s were simpler times.
21:38:00 <gog> it was 1995 tyvm
21:38:00 <zid> The 70s were simpler times.
21:38:00 <gog> :<
21:38:00 <zid> (I was also at school in the 90s not the 80s)
21:39:00 <gog> i graduated in 2006
21:39:00 <zid> we were still calling each other gay by the time I'd left
21:39:00 <gog> yeah same
21:39:00 <gog> turns out they were right
21:39:00 <gog> ¯\_(ツ)_/¯
21:39:00 <zid> we had gay friends, it wasn't really *about* that, it's weird
21:39:00 <zid> it was but it wasn't
21:40:00 <gog> we had a lesbian teacher but she was the only openly gay person i was aware of
21:40:00 <zid> There were a few gay lads, nobody as far as I know, really used that fact to abuse them
21:40:00 <zid> the gay as insult thing was more "haha, outgroup"
21:40:00 <zid> than actually about sex
21:41:00 <gog> i lived in a rural area in a red state
21:41:00 <zid> rural area in blue (== american red) here
21:41:00 <zid> but america's overton window is significantly farther over
21:42:00 <zid> we had real insults for gay people, they weren't used
21:44:00 <gog> same
21:44:00 <gog> that were
21:44:00 <gog> against me a lot
21:44:00 <zid> not same then
21:44:00 <gog> i think i'm traumatized about gender and sexuality things
21:45:00 <gog> because thinking about it made me severely sad again
21:45:00 <zid> I mean, yes duh?
21:45:00 <gog> i'm way off topic
21:45:00 <gog> ima go
21:45:00 <jimbzy> Bah
21:46:00 <jimbzy> This is #osdev.
21:46:00 <jimbzy> 95% of the convo is offtopic.
21:46:00 <zid> That means the topic is "whatever the osdev people are talking about" :p
21:46:00 <gog> is there a kernel module i can use to mitigate my trauma
21:46:00 <jimbzy> Yeah, if it were strict I would have been kbanned about 20 years ago... XD
21:47:00 <gog> BUG_BROKEN_BRAIN
21:47:00 <gog> or something
21:47:00 <zid> fuggeddaboudit
21:47:00 <zid> .ko
21:47:00 <kazinsal> kernel module that hooks syslog messages up to a bluetooth sex toy
21:47:00 <ChavGPT> ey gogs
21:47:00 <ChavGPT> got something funny for you
21:47:00 <ChavGPT> you ready
21:47:00 <kazinsal> severity of the event increases the power
21:48:00 <ChavGPT> i was just browing glibc git log and a name looked familiar
21:48:00 <ChavGPT> turns out one of the lead glibc contributors is the guy committing to hurd
21:48:00 <ChavGPT> :d
21:48:00 <jimbzy> Is hurd still a thing?
21:48:00 <ChavGPT> yein
21:48:00 <ChavGPT> it's a thing the same way netbsd is
21:48:00 <jimbzy> Or supposed to be a thing, I guess I should say.
21:49:00 <ChavGPT> i think debian made an unofficial release again in not so distant past
21:49:00 <zid> yea
21:49:00 <ChavGPT> but all dev there is basically jokez
21:49:00 <zid> someone from hurd was here recently
21:49:00 <ChavGPT> what
21:49:00 <zid> asking 1970s questions about os design
21:49:00 <ChavGPT> :d
21:49:00 <ChavGPT> ? :D
21:49:00 <zid> paging out page tables, probably
21:50:00 <jimbzy> Did you tell them to read the dinosaur book, zid?
21:50:00 <zid> was failing to understand that we don't use machines like that anymore, we use virtualization if we want to swap out OS images at runtime so that our 'mainframe' can support more clients on less ram
21:50:00 <ChavGPT> sorry my pdp11 died
21:51:00 <ChavGPT> :d lmao
21:51:00 <ChavGPT> that hurd guy
21:51:00 <ChavGPT> turns ut glibc has hurd support(!!!)
21:51:00 <ChavGPT> and his contributions are to that code
21:52:00 <ChavGPT> now i am genuinely flabbergasted
21:54:00 <gog> hurd
21:54:00 <ChavGPT> who hurd you
21:54:00 <gog> what you refer to as hurd is actrually GNU/hurd'
21:55:00 <jimbzy> I heard if you say "hurd" three times in front of a mirror RMS will appear and ask you to use your cellphone.
21:55:00 <nortti> what you refer to as hurd is actally GNU
21:55:00 <kazinsal> if someone ports the bsd userland to hurd, will it cause rms to collapse into a black hole of toe fungus
21:55:00 <kazinsal> kinda like an inverse debian/kfreebsd
21:58:00 <gog> doe sgentoo still ship kfreebsd
21:58:00 <zid> if I leave my WSL alone long enough
21:58:00 <gog> also can one literally just replace linux with freebsd as long as you support all the syscalls and pseudofses
21:58:00 <zid> I can no longer type into it
21:59:00 <zid> [ Results for search key : kfreebsd ]
21:59:00 <zid> [ Applications found : 0 ]
21:59:00 <zid> Searching...
21:59:00 <gog> https://wiki.gentoo.org/wiki/Gentoo_FreeBSD
21:59:00 <gog> oh right
21:59:00 <bslsk05> wiki.gentoo.org: Gentoo FreeBSD - Gentoo Wiki
22:00:00 <ChavGPT> and old friend recently reached out, turns out he is using a freebsd desktop (lol)
22:01:00 <jimbzy> Hardcore
22:02:00 <jimbzy> That's the type of person who tries to open up a mosh pit at a funeral.
22:02:00 <zid> I bet it works
22:02:00 <zid> just a bunch of configure scripts are busted for various packages
22:02:00 <zid> if you don't install old ones
22:04:00 <ChavGPT> mosh pit at a funeral sounds like a plan tho
22:04:00 <ChavGPT> just make sure to not kick the coffin
22:05:00 <jimbzy> That'd be the first thing I kicked unless I was in it.
22:05:00 <ChavGPT> are you a funeral crasher?
22:06:00 <ChavGPT> show up to eat, collect some prayer cards
22:06:00 <jimbzy> Oh yeah.
22:07:00 <jimbzy> I was asked to leave the last funeral I went to because I wasn't dressed "appropriately". I left work early just so I could be there to pay my respects and the family didn't think I looked the part. :p
22:09:00 <zid> woo ritual
22:09:00 <ChavGPT> "right after the mosh pit ma'am"
22:12:00 <jimbzy> Hah
22:15:00 <gog> when i die my "funeral" better be the wildest party
22:16:00 <gog> i don't want a bunch of people sad that i'm dead, i want a bunch of people who think it's metal that i died and drink and do drugs to my honor
22:16:00 <zid> Best I can do is "thank fuck, now I can have her cool stuff"
22:16:00 <ChavGPT> "gog was a wanker... but our wanker"
22:16:00 <gog> the only cool things i own are clothes so i hope you like dresses
22:17:00 <zid> sounds like someone needs to go 'cool mug' shopping
22:28:00 <zid> today's crap
22:28:00 <zid> It's hot at night, I don't feel rested, my book was depressing, and I don't want any of the food I have
22:30:00 <x8dcc> Hello, I am trying to monitor performance by debugging on branch changes and checking the Time-Stamp Counter. I managed to get it working using the EFLAGS.TF bit and MSR.IA32_DEBUGCTL.BTF bit, but the problem is that it's throwing an exception when leaving the Debug ISR, so it calls it again
22:30:00 <zid> that'll happen yea
22:30:00 <zid> unless you fix the problem
22:30:00 <x8dcc> Maybe you know a way of getting around this or a better way of checking TSC/checking performance
22:31:00 <x8dcc> zid: by problem you mean the fact that it's calling itself, or something else?
22:31:00 <zid> something triggered the exception
22:32:00 <zid> you then handled the exception, and jumped back to the thing that triggered the exception
22:32:00 <x8dcc> no
22:33:00 <x8dcc> the EFLAGS.TF bit makes it so the cpu throws a Debug (1) exception every instruction (afaik), and with the BTF bit, it makes it so instead of every instruction, it throws one every branch change
22:33:00 <x8dcc> so I am enabling those 2 bits, and when I jump anywhere, it generates a Debug exception (expected), but when returning from the Debug exception ISR, it generates another exception because its jumping again with iretd
22:34:00 <x8dcc> I disable the TF bit inside the Debug ISR, but I obviously have to enable it again before returning
22:37:00 <zid> sounds like you've properly identified the problem at least, debugging ring0 code in ring0 means you end up debugging your debugger :p
22:39:00 <x8dcc> I guess what I am doing is not really possible in ring0 without calling myself all the time
22:40:00 <x8dcc> another way would be to manually put breakpoints and then read the TSC in there
22:40:00 <x8dcc> but this whole "print the TSC in every branch change" sounded like pretty much what I wanted
22:40:00 <x8dcc> if someone else reads this and has a solution/alternative, let me know
22:48:00 <kof123> probably does not help but: https://xem.github.io/minix86/manual/intel-x86-and-64-manual-vol3/o_fe12b1e2a880e0ce-587.html
22:48:00 <bslsk05> xem.github.io: Page 587
22:48:00 <kof123> > 1. Executions of CALL, IRET, and JMP that cause task switches never cause single-step debug exceptions (regardless of the value of the BTF flag). A debugger desiring debug exceptions on switches to a task should set the T flag (debug trap flag) in the TSS of that task.
22:49:00 <x8dcc> yeah, that's exactly what I was looking when adding it
22:49:00 <kof123> :D
22:50:00 <x8dcc> the quote you sent is only useful for task changes, which is not my case currently
22:51:00 <x8dcc> I can always just "int 0x1" everytime I want to check the TSC and check performance that way
22:52:00 <kof123> yeah, that is what i figured...that says it does suppress raising (maybe wrong word) an exception for iret, but that is for tasks...
22:55:00 <x8dcc> yeah, to make it would make sense to not count IRET's as branch change, or at least add a bit toggle for it somewhere in DR6 or DR7
23:50:00 <vdamewood> gog: #c isn't as tolerant of chit chat as here and ##programming, so...
23:50:00 * vdamewood gives gog a fishy
23:50:00 <gog> haha
23:50:00 * gog chomp fishy
23:51:00 <klange> We're more of a community than a topic-oriented channel.
23:51:00 <vdamewood> Yeah, we kind of run ##programming like that, too.
23:53:00 <zid> ya, like I said, this is the channel for the os dev people to talk in
23:54:00 <zid> we a church
23:54:00 * vdamewood gives zid a copy of the Bible
23:54:00 <zid> which animal is on the front?
23:54:00 <vdamewood> zid: Tannenbaum or Silberschatz?
23:54:00 <zid> kernighan
23:55:00 <vdamewood> Kernighan wrote an OSdev book?
23:55:00 <zid> and his diety son, who died for our sins, ritchie
23:55:00 <vdamewood> Oh, you mean that bible.
23:56:00 <vdamewood> zid: Wuld you like a bible with a camel on the cover?
23:56:00 <vdamewood> Would*
23:56:00 <x8dcc> I do