Search logs:

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


http://bespin.org/~qz/search/?view=1&c=osdev&y=19&m=8&d=7

Wednesday, 7 August 2019

01:22:25 <zid> I think geist died, I get half his stuff right?
01:26:26 <_mjg> if he died he should stop idling on irc
04:24:01 <Shockk> does anyone know where grub loads its stage2 in memory?
04:24:39 <zid> grub source does ;)
04:24:52 <Shockk> I looked at grub source exactly once and it was an interesting experience
04:25:03 <Shockk> for some definition of interesting
04:25:06 <zid> I looked once and it seemed reasonable
04:25:26 <Shockk> I think the part I looked at had like 20 nops in a row in assembly
04:25:41 <zid> I was looking at elf code though
04:26:13 <zid> https://www.gnu.org/software/grub/manual/legacy/Memory-map.html
04:26:18 <zid> idk about grub2
04:26:25 <zid> 0x8000 apparently
04:26:37 <Shockk> ahhh right
04:26:39 <Shockk> thanks
04:27:27 <zid> I just let it load me to 1MB then ignore all memory below 1MB afterwards :D
05:22:52 <ybyourmom> geist: have you heard of Google's packetdrill project?
09:46:20 <geist> huh?
09:55:12 <bcos> geist: Maybe this: https://github.com/google/packetdrill
10:07:44 <j`ey> geist: im confused, does LK support userspace? I see there is arch_enter_uspace, but it doesnt look used
10:08:00 <geist> j`ey: it does not
10:08:11 <geist> in the main repository. there are overlays that implement user space
10:08:41 <j`ey> geist: ah
10:08:59 <j`ey> geist: also the context switch only saves high registers on aarch64?
10:09:05 <geist> that's correct
10:09:21 <geist> on all arches, you only need to save the callee saved stuff
10:09:24 <j`ey> Im not sure what that implies or means
10:09:34 <geist> the rest of the registers are saved in the callers' frames
10:12:02 <j`ey> if you were context switching to userspace.. would you need to save all of them?
10:14:53 <geist> that would be saved on the interrupt frame when it originally switched to kernel space
10:15:01 <geist> doesn't affect the core context switch
10:15:30 <geist> ie, the core context switch is switching between *kernel* contexts, which is largely indepedent of user space context
10:15:41 <j`ey> hm
10:16:09 <j`ey> is this in LK, or just in general?
10:16:13 <geist> in general
10:16:35 <j`ey> Ok, then I understand less than I thought :)
10:16:40 <geist> it's a little more complicated than that, but that's a standard pattern
10:24:03 <rememberthepig> actually VLIW cards 2pixel shader version from upto 4 on intel, has been registered to have 16*16 queue arbitration , the calcs are actual numpixshaders*alus in square/2, so the 4pixel shader version GMA950 has 4*16*16/2, pretty deeps 512 entry queues, and 64 alus can be working in parallel if they are not dependent
10:24:40 <rememberthepig> for instance on sandy bridge cards, which are theoretically a weaker arch, on 6 core version only 24 alus can work in parallel
10:24:59 <rememberthepig> so the compression ways of computing can be done pretty much better on VLIW cards
10:27:07 <j`ey> geist: I managed to get the switch to EL1 working yesteerday
10:27:14 <geist> yay, from what EL2?
10:27:30 <j`ey> EL3, but EL2 shouldnt be hard to add support for
10:27:45 <geist> ah, qemu started you in EL3?
10:27:47 <j`ey> (qemu boots into EL1 by default, but I just want to try get something "simple" working)
10:27:57 <geist> aaah got it. yeah qemu usually starts in EL1
10:28:06 <geist> you can tell it to drop you in EL2, but you need a flag for that
10:28:15 <geist> virtualization=true i think in the cpu flags
10:28:24 <j`ey> I thought a simple EL switch would be a good thing to start with
10:28:42 <j`ey> Im getting an undefined instruction on something im adding next
10:28:48 <geist> indeed, plus it introduces you to the banked control registers and eret and whatnot
10:28:52 <j`ey> but the ELR is 0x0, so Im not sure what is going on
10:29:08 <geist> sounds like you're eretting to 0
10:29:49 <j`ey> This is after the eret. Im trying to write something into a buffer on the stack
10:30:08 <j`ey> so maybe my stack isnt set up properly, I also dont clear BSS yet, and that may be an issue too
10:30:16 <j`ey> (but I dont see why that would get me to ELR 0x0)
10:30:18 * geist nods
10:30:26 <geist> most likely the ELR0 is a secondary failure
10:30:40 <geist> as in it fails, then it fails again and you're seeing that
10:30:47 <geist> you have to always find the first place it goes awry
10:31:08 <j`ey> yeah. I managed to make a small-ish function that calls the failure
10:31:29 <j`ey> and I think it was accessing something in BSS, but it got too late, so Ill have to look again tonight
10:31:52 <j`ey> I also couldnt find a way to disable SIMD instructions being generated by LLVM
10:31:59 <j`ey> (I had a movi being generated somewhere)
10:37:26 <rememberthepig> hence i told 12core version has 60threads in flight max on SNB GPU, but arbiter arbitrates on 4*12*4/2 , so those gpus in my opinion is crap though enough powerful, but vliw cards were better of course
10:38:09 <rememberthepig> as control flow works in queues differently than that of fetch counter changing i.e what the flow instruction on gpu do
10:38:23 <rememberthepig> then this is not a stopper on gma vliw cards
10:39:44 <geist> j`ey: -mgeneral-regs-only
10:40:02 <geist> that'll generally force it to use integer instructions only
10:40:54 <rememberthepig> one 4 is amount of the vector lanes, another 4 or 5 is amount of alus in the bundle of a core on SNB and 12 is the number of cores
10:41:23 <rememberthepig> they have smaller queues always because scoreboard costs resources in hw
10:42:38 <rememberthepig> https://github.com/attila-gpu/attila-sim/blob/a64b57240b4e10dc4df7f21eff0232b28df09532/src/bgpu/bGPUx2.ini
10:42:51 <j`ey> geist: what does LK do? I looked around to see if you enabled that option
10:42:53 <rememberthepig> all those parameters which i mentioned in calculation are taken from attile gpu
10:43:09 <geist> j`ey: that
10:43:30 <j`ey> geist: I also looked in LLVMs code, and it looked like the MOVI instruction didnt have any "feature predicate", so it might just be an llvm bug
10:43:38 <rememberthepig> j`ey: little kernel does some mode switching similar to real mode to protected mode transition, and also inits some of gpios
10:44:00 <rememberthepig> you can look from the source code
10:44:08 <geist> i dont remember movi off the top of my head, but if one of the regs is a vector, then that's why it's faulting
10:44:34 <geist> there's a fpu/vector enable/disable bit that you probably didn't set, so it's triggering a sync exception
10:44:34 <j`ey> rememberthepig: I have been reading, but Im new to it :P
10:45:29 <geist> anyhoo gotta go. will be back later this evening, probably
10:47:10 <j`ey> geist: thanks for the help
11:18:59 <englosh> So I can print a string by using the BIOS interrupt 0x10, 0xE however then I have to do a system call for every single character which is not very efficient. I noticed there's the BIOS interrupt 0x10, 0x13 which seems to print whole string at once. But how do I use this BIOS interrupt? I tried MOV AL, MSG but that did not work.
11:24:35 <Nuclear_> unless you're talking either a real-mode system, or about early boot code of a protected mode system (which runs in real mode), I would suggest not using the BIOS to print characters
11:24:57 <Nuclear_> just point a pointer to 0xb8000 and write directly to the VGA buffer
11:25:13 <Nuclear_> then use the CRTC registers for scrolling and cursor management
11:26:09 <Nuclear_> if you really want to use the BIOS, I suggest going to the ralf brown interrupt list for the details on how to use that call
11:26:46 <Nuclear_> http://www.ctyme.com/intr/rb-0210.htm
11:27:25 <englosh> thanks, for now I will use the BIOS to print strings
15:57:34 * Bitweasil yawns
20:42:28 <griddle> page tables contain physical addresses, right?
20:42:49 <griddle> when a dir contains a pointer to a table, its of the tables physical address?
20:45:28 <zid> Page tables are all physical yes
20:45:43 <zid> you wouldn't get very far trying to make a virtual->physical lookup table system using virtual->virtual mappings
20:51:32 <Bitweasil> Correct. Though be aware that the lower 12 bits contain lots of "not a physical address" things.
20:51:52 <Bitweasil> ... and I'm not 100% sure how PAE mode works. I've only mucked with the pure 32-bit and pure 64-bit tables.
20:53:26 <bcos> Bitweasil: PAE is almost exactly the same as long mode; except there's no PML4, CR3 points to a "mini-PDPT"
20:54:21 <bcos> Oh, and CR3 is only 32-bit which is a little annoying when everything else has a 36-bit or larger physical addresses
20:55:20 <zid> ah well who has more than 4GB of ram
20:56:15 * zid unplugs 20GB of ram
21:00:57 <mrvn> I find PAE to be a total waste of time. Unless you have one of the9ose exceedingly rare systems that have PAE but not long mode simply use long mode. It's simpler and faster.
21:01:41 <Bitweasil> Certainly, it was a hack at the time.
21:01:46 <Bitweasil> And has no business being used these days.
21:03:06 <zid> PAE was pentium pro right
21:03:11 <zid> made more sense back then
21:03:30 <Bitweasil> Yeah, that era.
21:03:35 <Bitweasil> And P2/P3/etc.
21:03:42 <Bitweasil> I think Pentium 4 was the first ia32e chip at some point.
21:03:47 <acidx> in some scenarios, PAE makes sense. for instance, zephyr OS enables it not because of the need to support more memory, but because of the NX flag.
21:04:07 <zid> ooh forgot about that
21:12:29 <mrvn> acidx: sure it makes sense. But all the reasons for PAE apply to long mode too and then some. The only reason to not use long mode is if you don't have it.
21:13:09 <acidx> mrvn: agreed.
21:17:36 <geist> and NX came along with 64bit machines, so if you have NX you have 64bit
21:17:51 <geist> except maybe early atom... dunno if they have NX despite not having 64
21:17:58 <zid> oh geist is back
21:18:01 <zid> we were looking for you
21:18:13 <zid> looks like you spoke about it though
21:19:57 <j`ey> yeah, but I didnt progress any in the end :(
21:23:01 <zid> did you at least stop asking if he's fat
21:24:18 <zid> hrmph my gentoo has exploded
21:26:16 <zid> dormito: Does your name, dormito, imply the existence of a legendary much larger thing called a Dorm?
21:27:22 <dormito> it's the (possibly butchered) latin word for 'sleeper'
21:28:23 <zid> dormire, not somnus?
21:28:43 <zid> somnus entered english for sure, struggling to think if dormire did
21:30:05 <geist> iirc dormir is sleep in spanish
21:30:10 <froggey> dormitory
21:30:18 <leelotungal> well needing memory in excess of 4gb and wasting it for code cause of memory operands by application usage requests some data in memory could be perhaps designed to be avoided
21:30:19 <geist> i always assumed that dormitory is latin
21:30:20 <j`ey> geist: same in french
21:30:22 <zid> froggey: oh as in like a sleep house, is that actually cognate?
21:30:33 <froggey> I have no idea, I'm just guessing
21:30:39 <zid> yea it is
21:30:53 <zid> dormitory (1400-1500) Latin dormitorium, from dormire “to sleep”
21:31:02 <zid> sleephouse
21:31:20 <geist> so then the question is where does the som- prefix come from
21:31:28 <zid> latin :P
21:31:28 <geist> is it latin too? if so, what's the difference?
21:31:46 <zid> might be greek vs early latin but both entered late latin
21:32:02 <zid> It's in english as somnolent at least
21:32:20 <zid> hypnos is greek
21:32:35 <j`ey> hypnotoad?
21:32:38 <zid> yes
21:32:39 <leelotungal> i dunno if there have been many to state that , but imo. ddr memory seems a bit pointless for the most part during runtime
21:32:46 <zid> hypno the sleep pokemon too
21:32:47 <acidx> in portuguese, "dormir" is the act of going to sleep, but "sono" is the feeling of sleepiness.
21:33:11 <zid> insomnia
21:33:14 <zid> another cognate
21:33:20 <geist> yah
21:33:30 <zid> that's literally just latin though
21:33:55 <zid> I've no idea how hypnos turned from greek to roman somnus
21:45:52 <jjuran> somnambulance: sleepwalking
21:48:58 <zid> if you don't watch out I'll need to call you a sonnambulance okay
22:17:27 <jjuran> I've always wanted to catch someone in the act of sleepwalking
22:17:42 <jjuran> I guess that makes me a somnambulance chaser
23:44:52 <w1d3m0d3> random question: has anyone tried using meson as their OSes build system
23:45:01 <w1d3m0d3> I wonder whether it would be even near possible to use it
23:47:08 <ybyourmom> Never even heard of it tbh
23:59:40 <w1d3m0d3> it's pretty nice for "normal" C and C++