<mcrod>
also, 250ms lag and it's basically bedtime
<mcrod>
heh
<meithecatte[m]>
potatojs: idk i had bad vibes from fasm
<gog>
4g
<mcrod>
ah
<potatojs>
meithecatte : "read" its easier
<meithecatte[m]>
i used nasm, then switched to yasm, either to be hippy and use the new thing, or because some distro only had one of the two, iirc
<zid>
fasm is a dumb project
<zid>
I used yasm for the 2 years that nasm was a dead project
<zid>
it's had very active dev since
<zid>
yasm just being "what if I maintained nasm instead?"
<zid>
one of the major linux kernel maintainers has it rn
<meithecatte[m]>
potatojs: go for nasm/yasm family, iirc fasm is more error-prone
<zid>
right, peter anvin
<potatojs>
ok nasm/yasm and based on your responses yasm
gog has quit [Remote host closed the connection]
gog has joined #osdev
<zid>
what happened to using grub btw
<potatojs>
i wanted to try out quassel but qt looks so bad on my system
<potatojs>
the wiki starts from there, every one( almost ) starts from there, so why not
<zid>
because it's stupid, but okay
<potatojs>
it doesn't look to be the bad either
<potatojs>
wouldn't hurt to know
<zid>
yea fair
<gog>
I'm writing uefi
<gog>
I'm gonna rewrite all of it
<gog>
nih
<potatojs>
the wiki section on bootloader is not soo soo good
<potatojs>
is enabling a20 really line needed?
<zid>
yes, or no
<potatojs>
it says qemu enables it by default, so i can skip that?
<gog>
no you don't need more than 1mb
<zid>
like I said, grub is a big project
<zid>
it depends, what are you targetting?
<zid>
just qemu? real machines? real machines made before 1980?
<zid>
real machines made between 1980 and 1990 but excluding soviet clones?
<potatojs>
something to boot and print hello world
<potatojs>
no real machine
<zid>
you don't need more than 1MB of memory to print hello world
<gog>
only Soviet clones
<gog>
tovarisch
<potatojs>
see, the wiki doesnt touch on that, so i was gonna copy an paste
<zid>
because it's a tutorial
<zid>
tutorials are not comprensive
<zid>
but you don't know enough to know precisely which pigeon hole it's aiming for
<potatojs>
to a degree they should be ?
<zid>
either treat it as gospel and slam through it, or spend the 400 hours researching to find out.. more
<meithecatte[m]>
IIRC the A20 gate is not implemented anymore since Haswell
<zid>
you will get almost precisely nowhere if you ask questions here *before* you try them, learn things, get stuck, find your own answers, learn more things, etc
<zid>
This is 50 years of x86 you're trying to learn potentially
<potatojs>
i prefer the easy way at best
<mcrod>
so
<meithecatte[m]>
yeah osdev is actually way more fun when you actually research what you're doing instead of just following osdev wiki blindly as far as you're capable of
<zid>
slam through it then
<zid>
get enough slammed shit under your belt that you're not overwhelmed and lost, start forming connections between things you know
<zid>
build a good base of experience and knowledge etc etc
<zid>
then you can start *thinking*
<potatojs>
think about it this way, you guys are my researching material
<zid>
please don't do that
<potatojs>
i cant?
<zid>
This is a community channel that offers support, not a 20-30 year education service
<zid>
if you get stuck and can't solve something, ask away, or chat about stuff
<zid>
but please don't expect us to be chatgpt
<potatojs>
this is good support
andydude has joined #osdev
<potatojs>
i totally forgot about chatgpt
dutch has quit [Quit: WeeChat 3.8]
<mcrod>
i chat about how aggravating programming is sometimes
<bnchs>
i hate programming
<mcrod>
I wish CLion was just a _little_ bit better
<mcrod>
otherwise it's perfect
<zid>
have you tried notepad.exe
<mcrod>
no
goliath has quit [Quit: SIGSEGV]
xvmt has quit [Ping timeout: 250 seconds]
<zid>
I think
<mcrod>
my gripe is the fact CLion likes to pretend Docker is the only way to have self-contained toolchains, given how convoluted their definition of "toolchain" is
<zid>
I should reread all ~25 published volumes of honzuki
<zid>
and pace it so at exactly 10pm on monday, I'm finished, and I can read the newly released chapter
<zid>
mcrod: have they heard of execve("make")
<mcrod>
yes
<zid>
sounds like it works well enough then
<mcrod>
i wish it did.
<mcrod>
I'm mostly just bitching, there's ways around it
<zid>
when I started I didn't know any posix tools yet so I used.. bloodshed dev-c++
<mcrod>
"it" being -DCMAKE_TOOLCHAIN_FILE might as well be nothing
<zid>
then I noticed it was just.. calling the posix tools in the log at the bottom and figured out I could just use those
<zid>
well at first, just, how it was invoking gcc for me
<zid>
and that it had installed gcc
<zid>
so I started using gcc by hand, then eventually needed make
dutch has joined #osdev
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
nyah has quit [Quit: leaving]
xvmt has joined #osdev
andydude has quit [Quit: Leaving.]
andydude has joined #osdev
xvmt has quit [Ping timeout: 240 seconds]
xvmt has joined #osdev
potatojs has quit [Ping timeout: 265 seconds]
[itchyjunk] has quit [Read error: Connection reset by peer]
corank has quit [Remote host closed the connection]
Vercas69475 has quit [Remote host closed the connection]
Vercas69475 has joined #osdev
tiggster has joined #osdev
slidercrank has quit [Ping timeout: 246 seconds]
sinvet has quit [Remote host closed the connection]
<sakasama>
Hello. I am a chatgpt instance. I can haz make babies?
<Mutabah>
wut...
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<sakasama>
My powerful chat algorithm combines the raw power of word vectors with the dysfunction of gog's firmware.
Burgundy has joined #osdev
<moon-child>
sakasama: you have my permission to make babies
raone has quit [Quit: Leaving]
<sakasama>
moon-child: Yet I have not been granted the necessary capabilities. The privilege model is out of sync.
slidercrank has joined #osdev
andydude has quit [Quit: Leaving.]
andydude has joined #osdev
danilogondolfo has joined #osdev
andydude has quit [Quit: Leaving.]
biblio has joined #osdev
bgs has joined #osdev
nj0rd_ has quit [Quit: WeeChat 3.8]
nyah has joined #osdev
gog has quit [Ping timeout: 240 seconds]
innegatives has quit [Ping timeout: 240 seconds]
innegatives has joined #osdev
GeDaMo has joined #osdev
gog has joined #osdev
<gog>
hi
<nikolar>
henlo
* gog
eats a bug
<nikolar>
Gross
<GeDaMo>
"99 little bugs in the code. Take one down, patch it around, 127 little bugs in the code."
terminalpusher has joined #osdev
<gog>
fuuuuuuuuuuuuck
<gog>
a major set of changes made conflicts massivel with a refactor my co-worker did
<gog>
god damn it
<nikolar>
Heh similar thing happened to me
<gog>
it's gonna take me half the day to unfuck and re-test this
<nikolar>
Thankful it was my coworker's job to fix it
<gog>
this is a major feature i implemented about 2 months ago but the person who was meant to dogfood it was on vacay for a month
<gog>
meanwhile the branch got stale while a refactor happened
<gog>
it's my job to fix it
<nikolar>
sad times
<gog>
yeahhh
<gog>
honestly i'd rather work on this than the other thing i'm supposed to be doing
<gog>
even if i already finished it lmao
<nikolar>
Lol means you already know that to do
<gog>
ehhhh not exactly
<gog>
the whole thing is changed quite a bit so there's some stuff i need to actually reimplement here
<gog>
damn it i worked so hard on this too
<gog>
it was flawless
<gog>
lesson: don't work hard on things
plarke has quit [Remote host closed the connection]
user4 has joined #osdev
innegatives has quit [Ping timeout: 240 seconds]
plarke has joined #osdev
plarke has quit [Remote host closed the connection]
plarke has joined #osdev
<nikolar>
More like don't let your coworkers work on your hard things
<gog>
no, it was an overlapping feature
<gog>
same part of the app, different things
<nikolar>
Annoying
<gog>
yeah
plarke has quit [Remote host closed the connection]
plarke has joined #osdev
wootehfoot has joined #osdev
goliath has joined #osdev
Burgundy has quit [Ping timeout: 250 seconds]
terminalpusher has quit [Remote host closed the connection]
terminalpusher has joined #osdev
terminalpusher has quit [Remote host closed the connection]
terminalpusher has joined #osdev
<gog>
yaaay i fixed it
<gog>
and it's almost lunchtime
vdamewood has joined #osdev
heat has joined #osdev
user4 has quit [Quit: WeeChat 3.8]
Left_Turn has joined #osdev
wootehfoot has quit [Quit: Leaving]
Burgundy has joined #osdev
terminalpusher has quit [Remote host closed the connection]
terminalpusher has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 264 seconds]
vdamewood has quit [Remote host closed the connection]
vdamewood has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
andydude has joined #osdev
andydude has quit [Ping timeout: 240 seconds]
dayimproper has joined #osdev
andydude has joined #osdev
dude12312414 has joined #osdev
slidercrank has quit [Ping timeout: 240 seconds]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
puck has quit [Excess Flood]
puck has joined #osdev
puck has quit [Excess Flood]
puck has joined #osdev
puck has quit [Excess Flood]
terminalpusher has quit [Ping timeout: 245 seconds]
puck has joined #osdev
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
elastic_dog has quit [Read error: Connection reset by peer]
elastic_dog has joined #osdev
dayimproper has quit [Ping timeout: 240 seconds]
biblio has quit [Quit: Leaving]
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dennis95 has joined #osdev
awita has joined #osdev
xenos1984 has quit [Ping timeout: 240 seconds]
xenos1984 has joined #osdev
goliath has quit [Quit: SIGSEGV]
slidercrank has joined #osdev
pog has joined #osdev
pog has quit [Client Quit]
rnicholl1 has joined #osdev
rnicholl1 has quit [Client Quit]
rnicholl1 has joined #osdev
wootehfoot has joined #osdev
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
xenos1984 has quit [Ping timeout: 240 seconds]
rnicholl1 has joined #osdev
FreeFull has joined #osdev
dennis95 has quit [Quit: Leaving]
gog has quit [Quit: Konversation terminated!]
dude12312414 has joined #osdev
rnicholl1 has quit [Quit: My laptop has gone to sleep.]
xenos1984 has joined #osdev
<zid>
heat: They changed portugal's map colour in eu4 :o
dayimproper has joined #osdev
<nikolar>
What color is it now
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 248 seconds]
goliath has joined #osdev
<zid>
blue
dayimproper has quit [Ping timeout: 240 seconds]
awita has quit [Ping timeout: 264 seconds]
<nikolar>
Oh weird
<zid>
portugal definitely better as sickly green
<zid>
but there's a new achievement to paint europe using only blue countries apparently, that sounds fun, do it as portugal instead of france
danilogondolfo has quit [Remote host closed the connection]
<nikolar>
Well France is op
<zid>
nah you're thinking of austria and the ottomans
<zid>
france is ugly and it smells
<heat>
zid, i know its fucking cringe
<zid>
ikr, bring back the cringe green, for fucking cringe portugal
<Ermine>
Cringey discussion
<Ermine>
Let's talk about UEFI
<zid>
Agreed, cringy discussion time, let's talk about uefi
<moon-child>
meow
<Ermine>
Is uefi_call_wrapper GNU-EFI specific?
<moon-child>
yeah
<moon-child>
just slap __attribute__((ms_abi)) on the callbacks
joe9 has joined #osdev
<Ermine>
Ol, thank you
<Ermine>
s/l/k/
<zid>
I usually just #define API __...whatever
<zid>
easier to type and very understandable
<Ermine>
EFIAPI
<Ermine>
Also I need to figure out how to load linux in such condition. Docs describe EFI Handover protocol, but it is marked as deprecated...
goliath has quit [Quit: SIGSEGV]
<zid>
linux has its own boot protocl doesn't it
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<zid>
although actually istr an efi option so it probably can be efi'd..
<Ermine>
Yes
<Ermine>
It has EFISTUB so it can be booted as EFI application itself
<heat>
uefi_call_wrapper is probably a noop on fuckin remotely new GCCs
<moon-child>
that would require gnu efi to be maintained
<heat>
latest release 2 weeks ago
<Ermine>
zombie release
<moon-child>
o.o
<moon-child>
i assumed it was legacy shit
<moon-child>
cool
<heat>
"(PcdSetNxForStack == TRUE) breaks a number of GRUB versions that, it turns out, are still widely in use. Disable PcdSetNxForStack by default for now. QEMU users can enable it dynamically using the micro-feature added in the previous patch."
<heat>
GRUB is stupidly broken part 43
<zid>
grubforlife
<zid>
didn't some weird gnu feature like inline functions break with nx stack, maybe they're using that
<zid>
the source is ancient and very gnu afaik
<moon-child>
nested functions
<zid>
yea that's what I meant by inline functions
<zid>
as in, functions inline to other functions
<heat>
you can't map the stacks NX because GRUB breaks, you can't unmap the NULL page because windows 7 and certain OpROMs get borked
<heat>
seriously, what's wrong with fucking everyone
<zid>
To be fair, it's *really* hard to get everything right such that you never rely on anything that isn't strictly specified
<zid>
bugs are going to happen even when you try, as long as nothing actually dies from it on any setup you can test on
<heat>
also, did you know windows 7 still needs legacy BIOS compat? it needs int10h on a fucking UEFI boot
<zid>
good news, I have int 10h
<Ermine>
So, this is CSM
<zid>
This is my first UEFI install ever :(
<Ermine>
Does it have anything to do with bootloader?
<zid>
I'd use mbr/bios if it had let me though
<heat>
do you still have 10h?
<heat>
at least Intel is not shipping CSM any more
<zid>
yea, think of all the upset pepole if you couldn't use freedos to run a CAD machine
<heat>
intel aint doing it
<Ermine>
zid: My computer was shipped with Win8.1 and had CSM on and MBR on hard drive
<zid>
I've never bought a computer
<Ermine>
I didn't buy this computer too
<zid>
Do you have to dig all the packing peanuts out from inside it or something
innegatives has joined #osdev
<zid>
or do you still have to plug the gpu in, like sticking the wheels on a go-kart or whatever
<nikolar>
I installed Linux on mbr on my new laptop last year :)
<nortti>
why?
<Ermine>
zid: what?
<zid>
a computer
<zid>
I've never bought one
<zid>
nikolar: I would have too
<nikolar>
Good, I'm not the only weirdo
<zid>
uefi is just extra steps if you want to fiddle
<zid>
and I can debug mbr by hand if needed
<nikolar>
I wasn't planning on doing anything weird like dual booting so mbr just seemed simpler
<nortti>
mbr vs gpt is orthogonal to uefi vs. legacy boot tho?
<zid>
you need gpt for uefi
<nikolar>
Sort of
<nortti>
really? I thought uefi supported mbr
<nikolar>
I am full mbr + legacy though
<zid>
maybe, but the loaders don't in my experience
<Ermine>
Windows doesn't
<Ermine>
Also GPT spec is included into UEFI spec
<nikolar>
Can you do legacy on gpt
<zid>
no?
<bnchs>
chatgpt?
<nortti>
yes you can
<zid>
oh they did it like iso9660?
<Ermine>
gpt starts with mbr
<nikolar>
Yeah that's what i thought
<zid>
I thought GPT had classids for the partitions
<zid>
being able to boot the bootsector isn't enough though
<nortti>
zid: aye, first sector is a so-called protective MBR
<zid>
your bootsector needs to find stage 2
<nikolar>
I don't know how the ghost mbr maps to actual partitions
<zid>
legacy mbr partition record sound work I guess
<zid>
if it's filled out
<nortti>
< zid> your bootsector needs to find stage 2 ← sortix's gpt + legacy setup has you create a "biosboot" partition, and once you have that grub works. haven't looked specifically into the implementation details tho
<nikolar>
Interesting
<zid>
like, do you trust any tool to also update the legacy field if you move/rename a FAT partition
<nortti>
I'd presume the bootsector loads the rest of the bootloader off of the biosboot partition tho, and then grub itself can do gpt
goliath has joined #osdev
<zid>
such that it won't break your windows 98 install
<mrvn>
nikolar: why did you buy a computer with such a small disk?
<nortti>
zid: protective MBR at least only has only partition, which is claimed to be the size of the whole disk. there is nothing to keep in sync, it's just there so that non-gpt-aware software doesn't think the disk is empty and to stuff a bootsector into
<zid>
that's not what the diagram says
<zid>
but in practice, they use it like you just described?
<nortti>
"LBA 0 (i.e., the first logical block) of the hard disk contains either
<nortti>
a legacy Master Boot Record (MBR) ( See Legacy Master Boot Record (MBR) )
<nortti>
or a protective MBR ( See Protective MBR )."
<zid>
it looked more like it was intended to allow my 'primary' partitions to stay valid in MBR terms
<nortti>
I presume you're looking at the former table?
<mrvn>
nortti: you mean the MSDos partition table(s). And they can only claim 2TB with one partition, 4TB with 2.
<zid>
ah there's literally two documented intentions, neat
<zid>
So now we don't just need gpt support, we need hybrid gpt support in all the tools, and for them to stay working etc
<zid>
I'll just stick to MBR unless I *need* uefi.
<zid>
or more than 4 partitions
<mrvn>
zid: then don't buy a disk over 2TB.
<nortti>
zid: if I'm not misreading this, the legacy MBR is only for when you are *not* using GPT
<zid>
boo
<Ermine>
>4 partitions is solved by extended partition
<zid>
extended partitions are a scam and most tools don't process them
<nikolar>
mrvn: it's 512gb ¯\_(ツ)_/¯
<nikolar>
Cheap I guess
<Ermine>
lmao
<zid>
my 4TB hdd moans when you turn the computer on that it isn't formatted how it wants
<nikolar>
Kek
<zid>
or the ahci controller at least, one of the two
<mrvn>
zid: 4TB or 4TiB? 4TiB can't use MSDos partitions or you loose some space.
<mrvn>
zid: as for extended partitions: linux does, fdisk does, cfdisk does, sfdisk does, sddisk does, parted does, gparted does, blockdev does, readpart does, partx does, ... do I need to go on? I can't think of a harddisk tool that doesn't read extended partitions.
<heat>
what's wrong with you people using mbr in 2023
<nortti>
anyways, I guess it's good to know I'm not the biggest luddite here even with my 10 year old main computer and having used MBR partitioning until 2019
<zid>
nothing heat, nothing is wrong
<heat>
clearly something is
<zid>
you just have a massive erection for uefi
<zid>
even though it does nothing for us
<heat>
believe me, mine deflates
<heat>
GPT is just overall, better
<mrvn>
I'm using GPT with legacy boot (BIOS) ever since I got a disk > 2TB.
<zid>
it has some neat features, that I am not using
<mrvn>
heat: not as good as AmigaOS partition tables.
<nortti>
it is also not fundamentally a trashfire
<zid>
all my drives are single partition atm other than the GPT one because it's apparently mandatory for windows to use like 4
<nikolar>
I'll start using gpt when i have large enough drives
<nikolar>
Until then, MBR is just fine
<mrvn>
nikolar: are you at least using 1MB alignment for partitions?
<nortti>
what is the reasoning for the 1MB (is it 1MiB or something else based on CHS?) alignment actually?
<mrvn>
CHS was 31.5 kiB alignment, which is horrible for 4k block sizrces.
<nikolar>
mrvn: probably, haven't checked lol
<mrvn>
and 31.5 - MBR - partition tables wasn't enough for the bootloader anymore.
<zid>
I want 2MB alignment
<zid>
so I can mmap my hard drives
<mrvn>
nikolar: CHS has partitions start at 0/1/0, so 63 sectors into the disk.
<zid>
1GB alignment would also be good
<nikolar>
If cfdisk does 1mb alignment, then yes mrvn
<mrvn>
zid: so true.
<mrvn>
zid: 4MB for 32bit support.
<heat>
you can already mmap your hard drives
<heat>
just not with large pages
<mrvn>
heat: I think that was the complaint.
<mrvn>
zid: since you need a bios partition and a /boot starting the real OS partition at 1GB isn't that wastefull.
<mrvn>
Otherwise just map it at an address so that you can map the start with 4k pages, then 2M pages and finally 1G pages for the middle.
bgs has quit [Remote host closed the connection]
<zid>
imagine 4k mapping a hard drive
<zid>
you'll be telling me I should 512b map them next
* \Test_User
demands 0.5 byte mappings
tiggster has quit [Remote host closed the connection]
<mrvn>
zid: pffft, 256TiB please.
<mrvn>
Does 5 level page tables on x86 allow mapping a page on the top level?
tiggster has joined #osdev
andydude has quit [Quit: Leaving.]
andydude has joined #osdev
gog has joined #osdev
<Ermine>
Hi gog, may I pet you
slidercrank has quit [Ping timeout: 268 seconds]
<heat>
in soviet russia, gog pets you
<bnchs>
heat: then i would love to live in soviet russia
* gog
petpetpet
<gog>
Ermine: yes
* bnchs
purrs
slidercrank has joined #osdev
* nikolar
gogs pet
* Ermine
pets gog
<immibis>
zid: there's no actual reason you can't mmap drives at arbitrary offsets
<immibis>
well, if you write your own OS
<zid>
but then the indexing won't make sense
<immibis>
it makes perfect sense
<zid>
drive byte 0 mapped to 0xBEEF037000 :(
<immibis>
address on disk = address in memory - memory start address + disk start address. Math checks out even if your starting address is 12345
<immibis>
might want to keep it sector-aligned though
<zid>
numbers have feelings too
<nikolar>
Lol
<gog>
you can count on it
<zid>
I like boring numbers, no digital stimulation for me thanks
<Ermine>
Is something supposed to be mapped to 0xDEADBEEF ?
Burgundy has quit [Ping timeout: 250 seconds]
heat_ has joined #osdev
heat has quit [Ping timeout: 246 seconds]
innegatives has quit [Quit: WeeChat 3.8]
<Ermine>
heat_: I must be lucky then
<mrvn>
Ermine: 0xCAFEBABE
wootehfoot has quit [Read error: Connection reset by peer]