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
airplanemodes has joined #osdev
wand has quit [Remote host closed the connection]
terminalpusher has quit [Remote host closed the connection]
slidercrank has quit [Ping timeout: 255 seconds]
<gog> mew
<lav> mew
heat has quit [Remote host closed the connection]
heat has joined #osdev
LostFrog has quit [Ping timeout: 252 seconds]
wand has joined #osdev
[itchyjunk] has quit [Remote host closed the connection]
zid` has joined #osdev
_xor has joined #osdev
PapaFrog has joined #osdev
wand has quit [Remote host closed the connection]
airplanemodes has quit [Quit: WeeChat 3.8]
wand has joined #osdev
heat has quit [Ping timeout: 246 seconds]
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 248 seconds]
* geist pets
nyah has quit [Quit: leaving]
<gog> =^w^=
wand has quit [Ping timeout: 255 seconds]
wand has joined #osdev
coso has joined #osdev
<coso> hi. im trying to understand how syscalls work (at least on linux)
<coso> is a call to syscall just a call to the address at LSTAR, + privilege?
<zid`> yea, handler address is in LSTAR
<zid`> STAR has the selectors, FMASK has some flags
gog has quit [Ping timeout: 246 seconds]
Turn_Left has joined #osdev
<zid`> (you'll also want a specific gdt setup and a tss, if you're implementing this, and not just asking how it works)
Left_Turn has quit [Ping timeout: 255 seconds]
<coso> im trying to understand it before i dare implementing it lol
<zid`> The reference page is prethe felix cloutier reference pretty good
<coso> i just tried checking that site but it wont load
<coso> but yeah its good
<zid`> click the .. then hit cached
<zid`> I just had to do the same thing
<coso> hmm weird! thanks
<zid`> it's just temporarily down
<coso> isnt a TSS for amd64's hardware task switching stuff? i read linux doesnt use that
<zid`> you need one, but for a single field, rsp0
<coso> ahh nice
<zid`> need to get a stack pointer from somewhere for IRQs
<coso> so if you wanted to use hardware task switching you'd use more TSS ..entries?
<zid`> I'm not sure it even works in amd64
<coso> it doesnt
<coso> i just checked the amd guide
<coso> manual*
<coso> lol x86 is such a mess
<coso> gotta go, thanks zid`!
coso has left #osdev [#osdev]
Arthuria has joined #osdev
FreeFull has quit []
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #osdev
smach has joined #osdev
smach has quit []
wand has quit [Remote host closed the connection]
bradd has joined #osdev
wand has joined #osdev
[itchyjunk] has joined #osdev
SGautam has joined #osdev
<mrvn> zid`: you need rsp1 in the TSS too. Only way to handle a stack/double fault.
<mrvn> .oO(And one TTS per core and multiple GDTs at some core count)
<mrvn> Poll: Do you have one GDT per core or a single GDT with many TSSes?
elastic_dog is now known as Guest25
Guest25 has quit [Killed (cadmium.libera.chat (Nickname regained by services))]
elastic_dog has joined #osdev
lanodan has quit [Ping timeout: 248 seconds]
craigo has quit [Ping timeout: 268 seconds]
elderK has joined #osdev
GeDaMo has joined #osdev
slidercrank has joined #osdev
Arthuria has quit [Remote host closed the connection]
[itchyjunk] has quit [Read error: Connection reset by peer]
<geist> i've generally done the latter, but both work about the same
<mrvn> any systems with too many cores for a single GDT?
<Mutabah> hmm... 64 in a threadripper
<Mutabah> Which is pushing into the numbers where you might need a second GDT
<mrvn> Yeah, close enough that one should care about the GDT overflowing.
<Mutabah> Hmm.. is there an upper limit on the GDT size? Excluding the 16-bit limit field?
<Mutabah> If not, then the limit is ~4090 cores :)
<mrvn> why should there be a second limit? Amd is it 16-bit?
<Mutabah> (4096 16 byte GDT entries, but only the TSS is 16 byte)
<Mutabah> I mean: Is there another limiting factor to the GDT size than just the 16 bits available for the "limit" field on the gdt pointer (and in the selectors)
<mrvn> Looks like you really can use all of 64k.
<mrvn> Why did I think you only had 256 entries?
<geist> really at the point at which you're worried abut 256+ or so cores, you had better have a lot more ducks in a row that just the size of the GDT
<zid`> the gdt limit is the only real limit yea, all the selectors are masked to the same size elsewhere like CSTAR etc
<mrvn> can the TSS be in the LDT?
<zid`> seems like a relativley simple whitepaper too, extended gdtr, check with cpuid, enable in control reg, lgdt now reads a 20 bit limit, blah blah
<mrvn> 4 extra bits? You want to go from 80 to 84bit for the descriptor?
<mrvn> zid`: Instead of extending the limit why not make the limit be multiples of descriptor?
<zid`> https://0x0.st/Hs5q.08.png coolguide courtesy of moon-child
<zid`> useful for heat
CaptainIRS has quit [Quit: You have been kicked for being idle]
<mrvn> most people will fail at the first question
<mrvn> observation: There is only one case with "const" but "const" should be the default because the compiler will complain when it shouldn't.
<GeDaMo> I don't even know what "perfectly forwarded" means :|
<mrvn> GeDaMo: means rvalues are forwarded as rvalues and lvalues are fowarded as lvalues and preserves constness.
danilogondolfo has joined #osdev
<mrvn> "This overload makes it possible to forward a result of an expression (such as function call), which may be rvalue or lvalue, as the original value category of a forwarding reference argument."
<zid`> Not even the gcc authors do, dw, they just nod and write stuff praying nobody notices nobody knows what the actual behavior should be
<zid`> and*
<mrvn> Without it you have to write (up to?) 6 cases to forward an argument. 36 with 2 arguments, and so on
<immibis> why would you need a 20-bit GDT limit if you can give each CPU a separate GDT?
<mrvn> so you don't need to give each CPU a separate GDT.
<zid`> I have absolutely no idea.
<mrvn> But I think the choice they made to extend the GDT is the LDT.
<mrvn> Has anyone used an LDT? Call gates? Task Gates?
fedorafan has joined #osdev
<Mutabah> I think I once used a LDT...
<Mutabah> and I used a task gate for #DF support in 32-bit mode
mlombard has quit [Quit: Leaving]
SGautam has quit [Quit: Connection closed for inactivity]
<zid`> I saw a picture of an LDT once
elderK has quit [Quit: Connection closed for inactivity]
fedorafan has quit [Ping timeout: 248 seconds]
fedorafan has joined #osdev
mavhq has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
mavhq has joined #osdev
fedorafan has quit [Ping timeout: 248 seconds]
fedorafan has joined #osdev
nyah has joined #osdev
gog has joined #osdev
bgs has joined #osdev
dennis95 has joined #osdev
<gog> hi
<sortie> sup
<mjg> watap
<gog> i write progarm
<Amorphia> y tho
<gog> idk anymore
<Amorphia> y not make progarm to write porgam
<Amorphia> simple
<mjg> chatgpt wroten alredy
<Amorphia> o:
bitterlollipop has joined #osdev
<bnchs> hi Amorphia
<Amorphia> ey
* lav writes progleg
<bnchs> oops wrong chanel
<gog> bnchs
<gog> hi
<bnchs> hi gog
<gog> lav hi
<lav> hi gog
<Amorphia> the trans agenda is plushy sharks and taking over the osdev scene
<lav> progarm aka. john petrucci's limb
bradd has quit [Ping timeout: 268 seconds]
<bnchs> i'm not trans but.. i would like stripey socks and plushy shark
<Amorphia> everybody wants this
<gog> brb rebot
gog has quit [Quit: byee]
<Amorphia> hey lav remember that code you sent me ages ago
<Amorphia> some UEFI thingy
<Amorphia> i wanna maybe try and make it worky
<lav> right
<zid`> can you make me worky after
<Amorphia> ld: cannot open linker script file /usr/lib64/elf_x86_64_efi.lds: No such file or directory
<Amorphia> i am missing a thing
<Amorphia> how i get
gog has joined #osdev
<zid`> that's a linker script
<zid`> you can tell because it says linker script
<gog> hi
<zid`> Hello gog.
<Amorphia> ok but where do i get this linker script
<lav> idk iirc only thing i installed for that was gnu-efi, idk tho
<zid`> if it's in /usr/lib64 I assume it's part of some system package from some distro
<gog> yeah it's in gnu-efi
<zid`> like gnu-efi for example
<zid`> yea google confirms
* gog efi expert
<zid`> gnu-efi/gnuefi/elf_x86_64_efi.lds · Go to file T · Go to line L · Copy path · Copy permalink.
<Amorphia> but i already have that installed :<
<zid`> first result on the googs
<zid`> well, make a symlink or adjust the path in the build
<zid`> so that it finds it
<Amorphia> mkay
<zid`> cus it ain't right now
<gog> i should update my efi tutorial
<gog> it no longer needs gnu-efi
<Amorphia> ahhh okay mine is in /usr/lib not /usr/lib64
<Amorphia> :O it compiled
<Amorphia> poggies
<gog> poggies
gog is now known as pog
* Amorphia pogs pog
* pog flips
* lav is apog at gog
<Amorphia> Could not prepare Boot variable: No such file or directory <-- output of 'efibootmgr -c'
<Amorphia> am i using this command wrong
<Amorphia> if i run it without args it gives me a buncha boot numbers
<Amorphia> like numbered boot item thingies
<lav> i have no idea i just chucked it in /boot and added the entry to grub
<Amorphia> Note: efibootmgr requires that the kernel support access to EFI non-volatile variables through /sys/firmware/efi/vars or /sys/firmware/efi/efivars/.
<Amorphia> hmmmmm
<Amorphia> lav: what is GRUB
<lav> grand unified boot loader
<Amorphia> yeah i know but do we still use that in the bright new land of UEFI
<Amorphia> oh yeah we do
* Amorphia has grub stuff in /boot
<lav> you just bokt the linux efistub directly?
<lav> yeah grub2 it's called
<lav> s/k/o/
<lav> you add it as a chainloader in this case iirc
<Amorphia> should be possible to run it directly from the EFI boot menu tho
<Amorphia> surely
<lav> sure prolly
* Amorphia will reboot and try poking thins in boot menu
<lav> i actually chain refind and grub because grub has theming and other pog things
<Amorphia> whats refind
<lav> boot manager thing i use because the apple one kinda sucks
bitterlollipop has quit [Quit: system sleep - ZZZzzz...]
fedorafan has quit [Ping timeout: 248 seconds]
<dzwdz> it's great on pcs too
lanodan has joined #osdev
<dzwdz> it makes even the weirder dualbooting setups just work
<dzwdz> tm
fedorafan has joined #osdev
FreeFull has joined #osdev
terminalpusher has joined #osdev
<pog> oops
<pog> undefined behavior
<pog> :'D
<Amorphia> pog: do we need to define your expected behaviour more strictly
<pog> yers
* Amorphia draws up a program for pog to follow
<Amorphia> item 1) do as I say at all times
<mrvn> 2) Do what I mean, not what I say.
<Amorphia> mrvn: lmao i was just thinking that
<pog> >:3
<pog> unknown parametesr, shutting down
<lav> tbh they should make a compiler that just does the Right thing on UB
<pog> yes
<pog> i need to re-order the way i load my kernel
<levitating> lav: Rust?
<pog> so i can actually collect boot data correctly
<zid`> booty data
<pog> RUST RUST RUST RUST
<levitating> 1515 pog: so i can actually collect boot data correctly
<pog> yes
* lav oxidizes
* pog reduces
<lav> wanna form a bond? ><
<levitating> What kind of bond?
<mrvn> covalent
<lav> james
<levitating> james
<lav> bond
<lav> though actually, shouldn't it be a co-lav-ent bond?
<zid`> struct booty_data { struct e820 *e; .. };
<zid`> I need more things to fill my booty
<mrvn> e820 is the memory map, right? Use grub and multiboot
fedorafansuper has joined #osdev
fedorafan has quit [Ping timeout: 252 seconds]
<mrvn> lav: have you asked chatgpt?
<lav> i asked catgpt, it gave me a very insightful answer
<pog> meow
<lav> meow
<mrvn> Wuff, Wuff!
<pog> yay i got it to work but i don't like it
<lav> I'll be off IRC for a few days. see y'all then :3
<levitating> lav: I think covalent is correct.
<lav> it was a joke about my nick
<levitating> oh
<levitating> *wooos*
lav has quit [Quit: So long, and thanks for all the fish!]
<pog> mewwww
<zid`> mewsh
<pog> :o it worked
<pog> 0x464c457f
<pog> \7f E L F
<Amorphia> pog: that's pog
<Amorphia> pog: did i ever tell you about the time me and some IRC pals had a competition to see who could write the smallest binary to print hello world
<Amorphia> we had an a.out category and an ELF category
<pog> nice
<Amorphia> i think i won the a.out :>
<Amorphia> a.out support is gone tho :<
* Amorphia reminisces about back in the day
<bslsk05> ​www.muppetlabs.com: A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux
<pog> you can still support it with a binfmt_misc driver
<Amorphia> zid`: *eyes*
<pog> just provide your own interpreter
<zid`> I love that page
Left_Turn has joined #osdev
<Amorphia> we did funny things like put code in headers
<zid`> this goes crazy
<Amorphia> i dont remember how or why that was allowed
<Amorphia> but
<zid`> it overlaps all the headers with each other
<zid`> and the code
<Amorphia> hahaha
<Amorphia> nice
<zid`> the final bi nary is smaller than an elf header
Turn_Left has quit [Ping timeout: 260 seconds]
<pog> bi nary
<pog> on the contrary
<zid`> program header is inside the elf header, and the elf header is truncated because all the later fields are fine as 0
<Amorphia> zid`: wat
<Amorphia> :o
<Amorphia> neato
<Amorphia> zid`: not finished article yet but i think we got x86 ELF down to ~50 bytes and a.out ~30ish bytes
<Amorphia> but it was 15 years ago so i might be remembering that totally wrong
<Amorphia> closer to 20 years ago maybe
heat has joined #osdev
<heat> linux
<pog> how do i write operating systems development
<heat> ask linux torval
fedorafansuper has quit [Ping timeout: 252 seconds]
<Amorphia> one of my buddies met torval before
<Amorphia> apparently his wife is a badass and will fuck you up with her mad judo moves
fedorafan has joined #osdev
heat has quit [Remote host closed the connection]
[itchyjunk] has joined #osdev
sinvet has quit [Remote host closed the connection]
sinvet has joined #osdev
<mats1> hot
fedorafansuper has joined #osdev
dennis95 has quit [Quit: Leaving]
fedorafan has quit [Ping timeout: 252 seconds]
mctpyt has joined #osdev
<Ermine> pog: may I pet you
<pog> yes
mctpyt has quit [Ping timeout: 252 seconds]
<bnchs> may i also pet pog?
<pog> yes
* bnchs pets pog
* pog prrr
* Ermine also pets gog
<Ermine> pog, I mean
* pog prr
<pog> i am gog and pog
<Amorphia> gog is pog
<Amorphia> pog is gog
* Amorphia petpet pog
* pog prrprprr
<mats1> super hot
<pog> this is a cat literally getting "patpatpatpatpatpt" https://www.youtube.com/watch?v=YtAGxKrj3Qs
<bslsk05> ​www.youtube.com: Tia Bongo Cat 1 - YouTube
<bslsk05> ​'soqg01kqd5s81' by [idk] (--:--:--)
<pog> pumpkin cat
dude12312414 has joined #osdev
terminalpusher has quit [Remote host closed the connection]
* nikolar pets {p,g}og
zid` has quit [Ping timeout: 255 seconds]
Arthuria has joined #osdev
craigo has joined #osdev
* sortie merges openssh-9.2p1 to the official branch.
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
pog has quit [Quit: byee]
bitterlollipop has joined #osdev
<mjg> anyone here running gentoo and willing to strace -f a simple pport build for me?
gog has joined #osdev
<mjg> shipped with portage
bitterlollipop has quit [Quit: system sleep - ZZZzzz...]
dutch has quit [Quit: WeeChat 3.7.1]
danilogondolfo has quit [Remote host closed the connection]
dutch has joined #osdev
* sortie merges a web browser into his official branch
<sortie> ssh, web browser, what more could you need?
<mrvn> what web browser?
<sham1> Hardware-accelerated graphics
* sham1 runs
<sortie> links :)
<mrvn> sham1: accekerated or 3D/vide decoding?
<mrvn> sortie: rechts
<sortie> lol I actually got that joke
fedorafa_ has joined #osdev
fedorafansuper has quit [Ping timeout: 248 seconds]
<mrvn> Who else has a Rock5 Model B?
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 248 seconds]
epony 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!]
slidercrank has quit [Ping timeout: 246 seconds]
_xor has quit [Quit: bbiab]
dutch has quit [Quit: WeeChat 3.7.1]
Terlisimo has quit [Ping timeout: 246 seconds]
Terlisimo has joined #osdev
epony has quit [Remote host closed the connection]
epony has joined #osdev
Arthuria has quit [Remote host closed the connection]
dutch has joined #osdev
bgs has quit [Remote host closed the connection]
fedorafa_ has quit [Ping timeout: 248 seconds]
fedorafan has joined #osdev