<kof673>
hmm...i'd actually argue glibc or whatever else is not late stage c though, unless they did something to the language itself, made a custom compiler, etc.
<kof673>
even if it was very idiomatic, full of macros and the like......still just a lowly "downstream"
<gog>
hi
<nikolar>
oi
<ring0_starr>
i've seen xv6 around a lot and i should know more seeing as how it comes from my own school, why would you say it won't teach you about OSes?
<ring0_starr>
i really haven't read much
<ring0_starr>
it seems like basic barebones code to do basic OS things for rv64
<Jari-->
hi
<heat>
it teaches you about UNIX v6
<heat>
it doesn't teach you about anything else
<ring0_starr>
what, it's got a scheduler, syscalls, etc.
<ring0_starr>
what do you think a teaching OS should consist of
<heat>
sure, it can teach you about some things
<ring0_starr>
minix?? lol
<heat>
a teaching OS should be better documented, better code style, more modern
<ring0_starr>
when you say "modern" do you mean "more complex subsystems"?
netbsduser` has quit [Ping timeout: 245 seconds]
<heat>
more complex and better written
Turn_Left has quit [Ping timeout: 260 seconds]
<heat>
the way read() and write() works in v6 is delightfully cute but strays very far from what a modern operating system does
<ring0_starr>
you don't like bsd very much i notice
<ring0_starr>
the style kinda reminds me of bsd
<heat>
hm? i literally said BSD would be a much better teaching OS
d1rg has quit [Ping timeout: 260 seconds]
<kof673>
he said it was better than what was before...that is the nicest thing he has ever said about bsd :D
<gog>
which bsd
<heat>
when the berkeley folks got their hands on unix is when UNIX started to become real
<kof673>
^ this is rare moment
<gog>
they got nerfed by the at&t lawsuit
<ring0_starr>
wow
<heat>
maybe 3BSD, 4BSD
<ring0_starr>
they have "safestrcpy" with the same interface as strlcpy but they can't call it that because that would be too BSD i guess
<ring0_starr>
oh, xv6 is also really barebones because it's meant for students to extend it as part of various assignments
<heat>
yes but it's also kind of appropriately barebones for the era it's trying to emulate
<heat>
os161 IMO is much nicer
<ring0_starr>
i do kind of agree with you on this
<ring0_starr>
the code itself isn't bad per se but it's not how i would write it if i wanted to demonstrate something
<ring0_starr>
did they think they were going to print it on some appendix at the end of a book or something?
<heat>
lol
<heat>
i do want to mention that i dont hate BSD
<heat>
it feels a little alien to me but that's all
<gog>
heatbsd
<ring0_starr>
it's kind of upsetting how they don't use posix standard interfaces where it wouldn't hurt them to
<ring0_starr>
did malloc really need to take a uint?
<heat>
yes gog it would be exactly like a normal BSD but it would suck even harder
<heat>
ring0_starr, yep, if unix v6 did it then so do they
d1rg has joined #osdev
d1rg has quit [Read error: Connection reset by peer]
d1rg has joined #osdev
gog has quit [Quit: byee]
<kof673>
size_t malloc() is e.g. ansi c, but yes :D not sure about k&r and such...
<kof673>
why they can't they use the standard ansi /s
Halofreak1990 has quit [Ping timeout: 265 seconds]
xenos1984 has quit [Ping timeout: 252 seconds]
xenos1984 has joined #osdev
osmten has quit [Quit: Client closed]
alifib has quit [Ping timeout: 246 seconds]
netbsduser` has joined #osdev
surabax has joined #osdev
Celelibi has quit [Read error: Connection reset by peer]
Celelibi has joined #osdev
agent314 has quit [Quit: WeeChat 4.3.1]
agent314 has joined #osdev
demindiro has joined #osdev
<demindiro>
Why is the wiki not letting me edit pages? "The action you have requested is limited to users in the group: Users.". Did something change and is belonging to the wiki group on the forum insufficient now?
jedesa has joined #osdev
<demindiro>
"OSDev_Wiki:Editing" still says simply belonging to the wiki group is sufficient
<demindiro>
Looking more closely: I seem to be getting logged out every time I hit the submit button
<demindiro>
hmm
<demindiro>
Okay, seems like uMatrix was doing something funky
demindiro has quit [Quit: Client closed]
gildasio has quit [Remote host closed the connection]
gildasio has joined #osdev
q3lont has quit [Quit: Leaving]
jedesa has quit [Remote host closed the connection]
d1rg has quit [Ping timeout: 246 seconds]
d1rg has joined #osdev
hwpplayer1 has joined #osdev
ionut_f_ has quit [Remote host closed the connection]
<demindiro>
The makefiles used in the edk2 repository break if you use the -j flag (in MAKEFLAGS, which I have set to -j32 by default)
<demindiro>
Amazing
<heat>
yes
hwpplayer1 has quit [Read error: Connection reset by peer]
<heat>
why are you compiling OVMF?
craigo has joined #osdev
<demindiro>
I'm going to modify it to figure out why it rejects my executable
<heat>
how are you making the PE file?
<demindiro>
With a Python script which basically concatenates headers + raw binary together
Halofreak1990 has quit [Ping timeout: 252 seconds]
<heat>
oh yeah that's prone to getting problems
<demindiro>
A goal of mine is to minimize the number of dependencies needed. I'm eventually going to replace the Python script with a custom language too, but I first want to make sure I understand how the whole UEFI boot thing works before doing even more hacky things
Turn_Left has joined #osdev
hwpplayer1 has joined #osdev
<nikolar>
heat: how does linux do it
<nikolar>
generating pe
<nikolar>
for uefi
<heat>
its in asm
<heat>
equally problematic ofc
<nikolar>
nice
<nikolar>
you can probably write a linker script to output a minimal pe file
<nikolar>
but that's probably problematic too
<demindiro>
As far as I can tell my PE headers should be correct, given that tools like readpe can parse it correctly
Left_Turn has quit [Ping timeout: 246 seconds]
<demindiro>
I'm guessing the issue is something with the single section header I defined
<bslsk05>
github.com: Onyx/kernel/arch/x86_64/boot.S at master · heatd/Onyx · GitHub
<heat>
here's my header, it might help
hwpplayer1 has quit [Read error: Connection reset by peer]
hwpplayer1 has joined #osdev
wgrant has joined #osdev
<demindiro>
heat: thanks. I think there's a (minor) bug in it: .word pe_header - dos_header should be .long. Only an issue if the linker decides to insert non-zero padding bytes.
<demindiro>
(readpe couldn't read it until I made that change)
Left_Turn has joined #osdev
<heat>
ah yes, good point
<heat>
thanks
netbsduser` has quit [Ping timeout: 252 seconds]
<heat>
i guess with the .align 4 plus zero padding everything ends up working out anyway
Turn_Left has quit [Ping timeout: 252 seconds]
<Ermine>
clang just can produce pe binaries
Arthuria has joined #osdev
netbsduser` has joined #osdev
Halofreak1990 has joined #osdev
<demindiro>
oh
<demindiro>
I no longer get booted to the shell
<demindiro>
Just the tianocore logo stuck, which makes sense since I just loop on hlt
<demindiro>
I take this as a great success
<demindiro>
I'm not sure what exactly I did wrong, but I think it's that I set raw data size to the actual size and virtual size to 0x1000 instead of making them equal
<heat>
virtual size has to be >= raw data size IIRC
<heat>
i think that's where they do the .bss stuff
<demindiro>
Raw data size was definitely smaller than virtual size
arminweigl_ has joined #osdev
<demindiro>
FWIW edk2's HelloWorld.efi is pretty useful
arminweigl has quit [Ping timeout: 260 seconds]
arminweigl_ is now known as arminweigl
<demindiro>
Checking with GDB, it's apparently not stuck in my code but somewhere else
<demindiro>
crud
<heat>
are you gdb'ing properly?
<heat>
efi images are relocated in memory
<demindiro>
I'm using it with layout asm
<demindiro>
So plain instructions
Turn_Left has joined #osdev
<heat>
that doesn't mean anything
<heat>
efi images are relocated in memory and gdb won't know where or what they are
<demindiro>
I'm not telling gdb anything about efi images, I'm just connecting it to qemu with target remote localhost:1234
<heat>
well obviously that does not work
<demindiro>
and if I do e.g. x/5i $rip it shows stuff that isn't my code
<demindiro>
debug.log remains empty, if anything is supposed to appear in it (I'm not using the custom OVMF firmware yet, if that's required)
<heat>
huh, i thought release ovmf also did debug logging
<heat>
well could you build one?
<demindiro>
Certainly, but gtg for now
netbsduser` has quit [Ping timeout: 272 seconds]
stolen has joined #osdev
xenos1984 has joined #osdev
wgrant has quit [Ping timeout: 252 seconds]
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 244 seconds]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 268 seconds]
Halofreak1990 has quit [Ping timeout: 260 seconds]
Left_Turn has joined #osdev
Turn_Left has quit [Ping timeout: 276 seconds]
bauen1 has quit [Ping timeout: 268 seconds]
eddof13 has quit [Quit: eddof13]
wgrant has joined #osdev
xenos1984 has quit [Ping timeout: 268 seconds]
<heat>
i was lost trying to figure out it was mysteriously segfaulting, until i realized i botched the glibc port such that the kernel was smashing the stack with tcgetattr
<heat>
oopsie
<heat>
and then i fixed it, then i realized i yet again botched the fix
<heat>
HEAT BEST PROGRAMMER
<nikolar>
obviously
xenos1984 has joined #osdev
<sortie>
heat: tcgetattr your stack, today!
bauen1 has joined #osdev
<demindiro>
I figured out the issue: I forgot that I was aligning the code part to 4096 and didn't update entry address accordingly
<demindiro>
I've removed the padding and now things are as expected
<demindiro>
It seems to be impossible to create a .efi file smaller than 4096 bytes without OVMF yelling
<demindiro>
Oh well
<demindiro>
I do wonder where it is getting the SectionAlignment = 0x40 from though, definitely not from the PE file (and only if file size != 4096)
ryoskzypu has quit [Ping timeout: 264 seconds]
Turn_Left has joined #osdev
ryoskzypu has joined #osdev
Left_Turn has quit [Ping timeout: 276 seconds]
cow321 has quit [Ping timeout: 248 seconds]
d1rg has quit [Ping timeout: 268 seconds]
d1rg has joined #osdev
tahtui has joined #osdev
tahtui is now known as pimyn
pimyn has quit [Remote host closed the connection]
pimyn has joined #osdev
pimyn has quit [Remote host closed the connection]
eddof13 has quit [Quit: eddof13]
pimyn has joined #osdev
pimyn has quit [Remote host closed the connection]
Halofreak1990 has joined #osdev
eddof13 has joined #osdev
<sham1>
Hating C++ is a natural reaction
getz has quit [Quit: A mystery...]
<geist>
RUUUUUST
getz has joined #osdev
<heat>
hi geist
<demindiro>
Fucking finally, I've managed to print stuff to the console
<demindiro>
Had a off-by-one error
Whooa21 has joined #osdev
<demindiro>
uh
<demindiro>
Why is the wiki asking me to review a change for the System V ABI page?
KitsuWhooa has quit [Ping timeout: 252 seconds]
<demindiro>
" Added that floating point parameters are passed in `xmm0` to `xmm7. Made some slight changes in the first paragraph with the help of ChatGPT"
<heat>
wtf
eddof13 has quit [Quit: eddof13]
<demindiro>
Meh, diff seems fine. APPROVED
<demindiro>
"There is currently no text in this page. You can search for this page title in other pages, or search the related logs, but you do not have permission to create this page. "
<demindiro>
What the fuck?
<demindiro>
LET ME CREATE A PAGE
<demindiro>
Wait I'm logged out again
<demindiro>
What the hell even
<pog>
'rost
Yoofie646446 has quit [Read error: Connection reset by peer]
Yoofie646446 has joined #osdev
stolen has quit [Quit: Connection closed for inactivity]
<bslsk05>
wiki.osdev.org: User:Demindiro/Super Tiny UEFI Hello World - OSDev Wiki
<heat>
why did you puke base64
<demindiro>
It's a 48K xz compressed image with the UEFI hello world
<heat>
please dont spam irc channels like that
<demindiro>
Sorry
hwpplayer1 has quit [Quit: tomorrow is another day, I'll be back in hours]
<heat>
np, using a paste service is friendlier
* geist
waves
<geist>
also grats demindiro
<pog>
geist
<pog>
should i learn rust
<heat>
probably
<pog>
i will not
<pog>
fuck off
<heat>
ok
<pog>
sorry that was rude
<geist>
i have to admit i've been actually doing rust for reals at work the last few weeks
<geist>
starting to get over that first big hill and see the valleys and mountains beyond
<geist>
mostly still fighting it now, but i'm getting paid to do it so <shrug>
<pog>
i think i'm spending too much time learning functional patterns and constructs in c# because when i go to c i find myself thinking "god this would be better if i had a lambda"
<heat>
oh you're doing rust in the kernel now?
<pog>
yes
<pog>
i mean no
<geist>
heat: not in zircon, no
<heat>
ah ok
<heat>
are you doing !zircon things now?
<geist>
i dunno!
<geist>
anyway, but it involves rust this week, so finally forced to understand bare metal rust
<geist>
and i'm starting to get used to unsafe {} and starting to grok how this works at the bottom
<geist>
as is always, the lesson when learning this stuff bare metal: *always* disassemble the biary you just generated and *always* cross reference what the compiler is doing with what you want it to
<geist>
you learn so much that way
<heat>
UNSAFE
<heat>
the rust for linux project is more jeopardized than ever soooooo
<heat>
C!!!
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
demindiro has quit [Quit: Client closed]
Turn_Left has quit [Ping timeout: 246 seconds]
<sham1>
Should have used Lisp
<cloudowind>
lips
cow321 has joined #osdev
<pog>
breki
<cloudowind>
sp this demindiro fellow cam to share what has achieved and left.. how cool is that , goodays people goodays gog