<bslsk05>
539kernel.com: A Journey in Creating an Operating System Kernel: The 539kernel Book - Home
<heat>
geist, seems that linux is keeping ia64 support after all
<heat>
ia-64 stronk
<gaxar77>
I think I'll read that tomorrow.
<gaxar77>
Or at least get started.
<gaxar77>
Can a kernel load and unload modules of itself while running?
<gog>
msmsqs
<gaxar77>
Like drivers and all kinds of stuff like that
<gog>
yes
<gog>
that's a basic function of a kernel
<gaxar77>
I see.
<gaxar77>
Well, if that's the basic function of a kernel, why do I have to restart Windows after every update?
<nikolar>
Well there are also kernel updates
<lav>
windows lacks basic functionality /j
<gaxar77>
LOL
<gaxar77>
lol
<gaxar77>
Sorry, caps was on.
<nikolar>
You should also restart when you update the Linux kernel
<nikolar>
Or things eventually start braking
<gaxar77>
I see,
<gog>
in part it's to ensure that the updated components are actually updated
<gog>
another reason is that sometimes files are scheduled to be overwritten at shutdown or boot up
<gog>
so as not to disrupt running applications
<gaxar77>
I see.
<gaxar77>
Could experience developing an OS help me get a job working on an actual OS?
<nikolar>
I once had an uptime of 70 days, and after a couple of kernel updates the kernel stopped recognizing USB devices for whatever reason
<gaxar77>
Tomorrow morning, I hopefully will begin reading this book on kernel development.
<gaxar77>
I see.
<gog>
idk my experience programming in general got me a web dev job
<gog>
which i was reluctant to do but i actually enjoy it a lot
<gaxar77>
cool
<gog>
mostly the company i work for
<gaxar77>
Well, I did work at a small startup.
<gog>
the job itself is mid
<morgan>
yeah I had a system with some distro that a) didn't load whatever kernel module was responsible for USB block devices on startup and b) aggressively removed old kernel module trees and so every time i updated the kernel on there USB drivers wouldn't work until i restarted it
<gaxar77>
Doing .NET, SharePoint, and CRM stuff.
<gaxar77>
How long does it usually take for one person to implement a fully functional OS?
<morgan>
depends on how good you are at programming and what your threshold for "fully functional" is
<morgan>
so somewhere between one day and eighty years
<gaxar77>
Like, GUI, and TCP/UDP support, and WiFI.
<gaxar77>
And everything prerequisite.
<gaxar77>
And file systems.
<gaxar77>
And stuff.
<morgan>
"a while"
<morgan>
none of those are particularly easy
<gaxar77>
Oh ok.
<gaxar77>
I knew that WiFi was not easy
<gaxar77>
I figured I could do GUI.
<morgan>
wifi might be the easiest of those, assuming you're only targeting one hardware configuration
<gaxar77>
But I don't know how to do region shaped Windows and Widgets.
<gaxar77>
I only have ideas about rectangular ones.
<morgan>
hell writing a *good* TCP/IP stack might literally be impossible for one person to do
<gaxar77>
oh
Turn_Left has joined #osdev
<gaxar77>
Why don't any of you form OS Dev teams?
<gaxar77>
If you did, you could build more powerful systems.
<heat>
morgan, not true
<klys>
gaxar77, are you part of the discord server
<gaxar77>
What is that?
<heat>
morgan, 1) define good tcp/ip stack
<heat>
2) sortie's stack is pretty high quality. probably not very performant, but high quality
<morgan>
i'll do no such thing
Left_Turn has quit [Ping timeout: 246 seconds]
<heat>
can I copy one google chrome's data to the other (other operating system)?
<heat>
does it keep my preference data and logins
<gaxar77>
Has anyone here written a full web browser for their OS?
<CompanionCube>
lol no
<heat>
i wanted to give chrome another shot but damn I do not feel like re-logging in
<gaxar77>
lol
<heat>
shit
<CompanionCube>
heat: maybe you could try copying the profile dir
<CompanionCube>
i wouldn't know, i use firefox
<heat>
yeah i'm just tired of firefox
<morgan>
or whatever chrome's equivalent of the profile dir is
<heat>
also seems to keep working worse over time
<gaxar77>
What's harder? Writing a Web Browser or writing an OS?
<morgan>
web browser, 100%
<gaxar77>
Why?
<heat>
lately I've been having a ff bug where sometimes the text cursor just disappears randomly and I need to refocus it on the URL bar and back to where I was typing
<CompanionCube>
gaxar77: consider that microsoft gave up on developing their own web browser
<gaxar77>
Yeah. Why did they do that?
<klys>
gaxar77, because you have to implement html5, javascript, dom, etc.
<gaxar77>
They couldn't do that?
<morgan>
go have a quick read through the HTML5 and JS specs for us would you
<heat>
CompanionCube, the serenityOS people gave up on developing their own operating system and now almost solely develop their web browser :v
<gaxar77>
I know it's large...
<CompanionCube>
isn't that mostly one person?
<gaxar77>
But MS should have been able to do it.
<heat>
no
<morgan>
keep in mind you've gotta implement all of that if you want modern websites to work. oh also you'll have to keep it up to date with standards changes if you want websites to keep working. oh also all of this has incredible performance and security concerns about it
<klys>
your eyes are bigger than your stomach
* gog
eyes klys
<klys>
^,,^
<heat>
:3
<gaxar77>
I'm not saying I can build a browser.
<heat>
morgan, chrome's security record is pretty impressive
<gaxar77>
But I want to learn how to build a kernel.
<heat>
they are soooo goooooooood at what they do
<heat>
chromium people, v8 people, etc
<gaxar77>
Will there ever be something to replace HTML5, CSS3, etc?
<gog>
probably
<gaxar77>
When?
<morgan>
yes and if they're paying less than $10,000,000 a year in salary to the people responsible for keeping that security record up i'd be astonished
<gog>
but more like supersede
<klys>
they'll prolly call them html6 and css4, etc.
<gog>
yes
<gaxar77>
oh
<gaxar77>
If a bunch of you worked on one OS project what would happen?
<morgan>
arguments, presumably
<gaxar77>
lol
<geist>
not a chance
<gaxar77>
Why not?
<klys>
if you thorw a bunch of noodles into a pot it doesn't form a mind easily
<geist>
right there needs to be a vision, some sort of direction, and then everyone would need to be paid full time for many years
<gaxar77>
I see.
<geist>
but cloeset i've seen is the haiku project
<gog>
herding cats
<gog>
haiku is so good though
<geist>
they had a vision and a direction, which was to directly reimplement beos, which i think helped immensely
<heat>
tbf I think I could work with geist pretty well
<gog>
i should really try to get into working on it again
<heat>
although I would probably want to implement UNIX
<geist>
probably yeah
<geist>
yah i dont ind implementing unix
<heat>
and geist thinks thats laaaaaaaaame
<geist>
it's fun
<geist>
gosh no. why do you think that?
<morgan>
but we already have unix
<gog>
do y'all wanna implement unix poorly together?
<klys>
svr4?
<gaxar77>
Is Minix slower than Linux?
<heat>
geist, because you work on the opposite of unix :P
<geist>
heat: note the phrase 'work'
<geist>
ie i'm paid to do what others want me to do, so i work within those constructs
<gog>
minix is an academic project not a mainstream OS
<gog>
it's not as performant in a lot of ways
<gaxar77>
oh
* heat
nods
<heat>
<gog> do y'all wanna implement unix poorly together? <-- don't steal my shtick
<gog>
sorry
<gog>
won't happen again
<sakasama>
gog: Can it be on a mixed ternary/quaternary computer, so we can make our mistakes on an experimental architecture?
<geist>
if when i ever get uninterrupted time and motivation i want to take the lkuser project to a real posix thing
<geist>
because why the hell not
<gog>
sakasama: where are we going to get one of those
<gog>
which channel am i in wtf
<gaxar77>
How can a flash drive have a boot sector?
<gaxar77>
Or an SSD?
<gog>
depends on the firmware the computer has
<klys>
sector zero is used, and it has the 55 AA magic
<morgan>
well the boot sector is just sector 0
<gog>
if it's booting with standard BIOS you write to sector 0 with the correct format
<sakasama>
gog: I'll design one and entrap someone to manufacture it or perhaps emulate it using neurons harvested from snails.
<gaxar77>
I thought sectors were something to do with magnetic disks.
<gog>
sakasama: neat
<geist>
you thought wrong
<gog>
a sector is the right word for a segment of a cylinder
<gog>
but the terminology carried over
<klys>
a track is
<gaxar77>
oh ok
<gog>
right
<geist>
now it just generally means a unit of a block oriented device
<gog>
no a sector is a segment of a track, a cylinder is the projection of all tracks
<gog>
yes
<geist>
and on many types of computer, the 0th sector can be loaded by firmware and booted, and thus it's the boot sector
<gog>
yes
<geist>
0th sector because why not. the standard could be the 1st or 2nd, but 0th seems like simple enough
<gaxar77>
Or just some bytes on the drive that the bootloader loads?
<gaxar77>
file or set of files
<gog>
yes
<geist>
excalty. if you're building a piece of firmware you could, for exmaple, declare that the 0th sector has some sort of descriptor that points to the real boot sector, or some sort of hardware description, or whatnot
<gog>
it can be any of that
<klys>
in this command I specify the logical cylinders heads and sectors-per-track values for my nvme ssd
<geist>
but PCs are simple devices, and PC bios just loads 0 into ram and branches into it
<geist>
and that has generally stuck
<gaxar77>
I see.
<heat>
gog, I think i'm going to try and make sic into an EFI irc client
<heat>
for shits and giggles
<geist>
moder UEFI desn't use a boot sector, for example, bcause it parses soething more complicated
<gog>
heat: :O
<zid>
uefi has some funny class ids for the partition types afaik?
<gaxar77>
Now I'm thinking about the name bootloader...
<geist>
yeh and thats how it finds the BSP partition (boot something partition) and then thats formatted FAT and holds the thing it'll start, etc
<morgan>
uefi is basically a whole ass operating system that exists to find your actual OS and load that
<heat>
zid, yeah partitions have GUIDs
<gaxar77>
I think the bootloader's job is to load the something more basic than the kernel.
<geist>
yah basically what morgan said
<heat>
note that they don't actually matter AFAIK
<gaxar77>
Considering it's called the "boot" "loader"
<heat>
they are just part of the boot path
<gog>
yeah it loads your boots
<zid>
guids matter they're the best
<klys>
the bootloader traditionally loads the grub2 core.img file which loads a kernel via a module that recognizes that kernel's format
<zid>
21686148-6449-6E6F-744E-656564454649
<zid>
that's the bios one
<gaxar77>
I see.
<morgan>
idk grub2 core.img is also part of the bootloader imo
<zid>
'!haHdInotNeedEFI'
<morgan>
bootloader-ing stops when you get to the kernel
<geist>
but there are 100s or 1000s of type of machines that have existed over the years, with varying amounts of boot schemes
<zid>
idk how to properly endian flip it
<geist>
the PC one is particularly simple (prior to UEFI) but it's nice
<gaxar77>
Can anyone think of an fs object besides files and folders?
<klys>
inodes?
<gaxar77>
Or is that a dangerous brain exercise?
<gaxar77>
What's that?
<gog>
files and folders are abstractions
<zid>
'Hah! I don't Need EFI' is the GUID for a dos partition, heat, now tell me GUIDs don't matter
<morgan>
inodes are what modern filesystems actually track. files and folders are certain types of inodes
<gaxar77>
oh ok
<morgan>
you can also have symbolic links! there may be others
<FireFly>
there's def other kinds of things in filesystems
<heat>
zid, heh that's pretty funny
<gaxar77>
Yeah, I read about them in the Java tutorials.
<geist>
i'm always fairly foind of older machinse where the boot mechanism is some human keys in the bootloader with switches
<morgan>
i've done that! it's a total pain in the ass
<geist>
or the next step: the main machine is booted by another machine that loads the system into ram and then resets the main machine
<geist>
lots of mainframes did it that way
<morgan>
though even on those you're usually toggling in the first stage of a multi-stage bootloader
<geist>
yah or you're keying in the load address for the ROM that does it
<zid>
heat: make sure you write if(efi_guid_strcmp("Hah! I don't Need EFI", partition) == 0) somewhere
<geist>
i have an altair machine where when you boot it you have to halt, set the address to FF00 and then release the cpu
<geist>
since that's where the ROM block is that loads something off a disk
<morgan>
i'm sort of surprised they couldn't just make it do that
<morgan>
or y'know put that block at 0000
<geist>
you could, and lots of later 8080 and z80 machines did exactly that
<geist>
trouble is the 8080/z80 has fixed exception vector at 0, and the reset vector
<geist>
so you eventually want to put ram there
<morgan>
ah right
<geist>
so that means yo need a piece of logic to move the ROM out of the way once it's booted
<gaxar77>
Okay. I'm going to go for now. Thank you for the insight and conversation.
<geist>
and that's probably a whole nother board, etc
<morgan>
or a piece of logic to bonk the CPU over to 0xFF00 at startup
<geist>
yah but you still want ram at 0 eventually because code expects to fiddle with the exception table
gaxar77 has quit [Quit: Leaving]
<morgan>
oh does it end up remapping it
<geist>
depends on the machine. i dont remember what a lot of them do. the altair in particular being very early does nothing of the sort
<geist>
soince itwas doing good to just get a cpu and like 4K of ram in the same box
<geist>
later stuff, like say a Kaypro CP/M machine had more sophisticated autostart rom that i think it did the zero remap thing
<morgan>
i should fuck around on cp/m someday
<geist>
iirc the kaypro does something like you hit a register and it swaps either the bottom 32k or top 32k with a ROM where a lot of the BIOS was iplement
<geist>
dont remember if it was bottom or top
<geist>
but normally you're running with a full 64k RAM, and CP/M is running in the top banks
<geist>
so something simple like the altair just starts filling in rom from the very top, and CP/M loads to just under that, and then something like 0x100 - bottom_of_cpm is user memory basically
<geist>
where 0 - 0x100 or so is the exception vectors. i think 0x100, maybe more like 0x300. there was some sort of file control block stuff down there i think
<morgan>
and then someday we invented the memory management unit
<geist>
cp/ms big advancment at least was you could actually write a real program that could actually run on different cp/M machines, because it actually abstracted enough of the hardware via OS and bios calls so that you didn't really need to know
<geist>
obviously meant only one program could be loaded at a time realistically, but the load address was known because cp/m got out of the way
<geist>
now it seems kinda obvious, but that was a big win vs a bunch of homebrew stuff that tended to pop up around one or another of the many machines floating around
SpikeHeron has quit [Quit: WeeChat 3.8]
<zid>
DOS was abstract until you needed to do audio :P
<geist>
yah DOS more or less copied the CP/M model
<zid>
"What is the exact model of your sound card, what are all of its jumpers set to, which slot is it inserted into, what is your mother's maiden name?"
<zid>
"initialization failed"
dude12312414 has joined #osdev
<morgan>
audio might as well still be like that honestly
<zid>
audio's worked fine on windows since forever, linux's had alsa for.. also nearly forever
gog has quit [Ping timeout: 255 seconds]
<heat>
i give up
<heat>
efi networking is so complex
<zid>
on audio?
<heat>
fucc this
<zid>
oh
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<heat>
all this for a joke? nah im good
gog has joined #osdev
<heat>
gog, gave up, sorry
<gog>
hm?
<heat>
on the efi irc client
<gog>
o
<gog>
why?
<heat>
have you looked at the networking protocols?
<gog>
not really lol
<zid>
important announcement, dosh has finished his sushi belt playthrough of factorio and uploaded
<heat>
the basic EFI_TCP4_PROTOCOL::Configure() takes like 30 parameters no joke
<heat>
can I set it up? probably, but honestly screw that
<geist>
ooh did your 850 pro die because of the known issue with dead 850s?
<geist>
if so you might be able to get a refund from samsung
<zid>
no idea, it just went bang
<geist>
oh no that's 950s i think
<geist>
er 980s and 990 pros
<geist>
oh it went bang and took out a bunch of your computer?
<zid>
no even fucking worse
<zid>
my computer went bang
<zid>
2 days of trying to revive it and beg/borrow/stealing parts to make a new PC
<zid>
finally get it POSTing, windows installing
<geist>
well i mean yeah your power supply probably went bang and took out the rest of it maybe?
<geist>
oh i see. but that killed your 850 too?
<zid>
I go to chown C:/windows.old/
<zid>
and it died half way through
<zid>
losing me all my files, and the windows install I just spent 2 days getting back
<zid>
I cried
<zid>
god samsung's website is crappy
<geist>
it's the universes gentle reminder to back up your data
<zid>
most of it is, but windows isn't exactly "yea just copy /etc"
<zid>
it's harder to try restore it than start fresh
<geist>
yah i usually just start fresh in these situations
<geist>
if possible copy out all your appdata/roaming somewhere, start clean and then try to page back in what you needed
<geist>
half the tmie you only end up reinstalling half of what you had before anyway
<zid>
yea I lost most of that, so I lose all my video game saves and stuff
fedorafan has joined #osdev
<geist>
yah that you should back up
<geist>
i should double check mie is till running it's backups
<geist>
windows file backup is such a piece of shit. it seems to eventualy stumble over something that it can't backup, so it just starts generating logs somewhere that says it cant
<geist>
have had this happen more than once
<geist>
i'd loe for it to tell me "i failed to back up your data you ight want to look at it"
<zid>
can't even find the email for buying this ssd
<zid>
it's.. pretty old :D
<geist>
yah would you look at that. windows file backup last ran 5 days ago
<geist>
and now it's completely lost it's configuration. silent
<geist>
says 'nope. no backups here!'
<geist>
piece of shit!
<geist>
and now i dont trust it either, because it told it to run and it returned back like 5 seconds later: "okay! done!"
<geist>
like, did you really back anything up? goddamnit
<zid>
let's see if the person whose amazon account I used still has the order info I guess
<geist>
reminds me i shold flash the firmware on my 980 pro. it's a later version than the affected one, but still one back from mainline
<geist>
looks like if you grub around on samsungs site yuo can get to the download part where you can get an iso boot disk for it
<zid>
I can just samsung wizard it on windows probably, or I could
<zid>
except it's gone from the bus
<zid>
total paperweight
<zid>
They *really* need to stop making SSD firmware that just stops the pci-e/sata/etc controller working if the flash goes bad
<zid>
it seems comically normal
<geist>
usually samsung is good at that. they just go read only
<zid>
depends how they fail
<geist>
huh looks like my windows NVME drive is at 50%
<zid>
if they fail while updating the internal journalling / wear levelling etc
<geist>
lower than i'd like
<zid>
they fail dead
<geist>
about 50TB written (2TB drive)
<zid>
the controller just abort()'s
<zid>
and it never turns on
<geist>
hmm, this drive *should* be like 1200 TBW endurance rating. the fact that it's at 50% after only 50TBW is a bit concerning
<geist>
unless the smart entry isn't read that way
<zid>
1200BTW is insane
<zid>
I've only seen hundreds
<geist>
yah, that's what it says at least. 970 EVO 2TB
<zid>
I just saw some voodoo, apparently leaving it plugged in but with no sata cable for an hour
<zid>
can make it come back to life a bit
<zid>
maybe
<geist>
yah i actually have an 850 pro here
<geist>
it's my old root disk that now i just use as D:
<zid>
I turned hotplug on on all the sata ports, we'll give it a bit then add a sata cable I guess
<zid>
if it comes back I can at least grab Roaming/
<geist>
well, i guess it is 5 years old, so it's had a good run. apparently i bought it back in 2018
bnchs has quit [Remote host closed the connection]
V-T60 has quit [Ping timeout: 265 seconds]
<zid>
ah I think the big capacity ones just scale the TBW linearly
<geist>
yah, in general yeah
<zid>
so it has 8x the TBW of my 150TBW or whatever on the 256
<zid>
which adds up about perfect
<geist>
though it's possible that thats in perfect condition (ie, completely empty and trimmed drive)
<geist>
whereas since i've had it mostly filled it's really having a lot of internal write amplification
<geist>
but i dnot think they report the internal amount of writes/erases that have happened, only the amount of writes at the interface
<zid>
yea that's what killed my ssd I think, installing windows again on it a second time (windows moves to windows.old)
<zid>
then doing the big chown so that I could access the files
<zid>
was lots of writes on a fullish drive
<geist>
yah i've had mine about 80% for some time, and who knows how much windows slams stuff to the drive
<zid>
windows fucking rapes ssds
<geist>
i fairly recentlyish moved my temp dir over to d: and whatnot
<zid>
temp barely ges touched
<geist>
probably not yeah
<zid>
windows just loves molesting random files
<geist>
and the stupid 'run trim every night' thing i've set just doesn't do it most of the time
<geist>
i can even leave the computer on, nope. i dont think i choose to run tonight
<geist>
i dont know precisely what planets need to align for it to decide to actually do it
<geist>
it's a frustrating mess. tis why i mostly just use windows for games n browser. no heavy lifting
<zid>
my computer woke me up, some 5am scheduled task + mech drive = omg the army is invadi- oh it's just the drive
<zid>
usually my drives just get 20GB .mkvs on them or whatever, not used to them going absolutely nuts :P
<geist>
that's what i have a NAS for
<geist>
but it can do nuts all it wants, thats its job
<zid>
I'd have had to pull the nas apart to install windows on it regardless
<zid>
firefox has decided I don't deserve.. fonts?
<zid>
all text missing
<geist>
hieroglyphics FTW!
<zid>
did my hdd just fucking die now or something
<zid>
maybe plugging that sata power in upset things
<zid>
my drives are unsresponsive
<geist>
you're not using the same power supply are you?
<geist>
from the old dead computer
zid has quit [Read error: Connection reset by peer]
matheusmoreira has left #osdev [#osdev]
zid has joined #osdev
<zid>
*aggressive windows startup mech drive noises*
<zid>
firefox vs discord vs steam, let's see who wins
<zid>
steam made its window first, but firefox loads up first, steam second, discord third
<zid>
discord *still* loading, infact.
<geist>
noice
genpaku has quit [Remote host closed the connection]
genpaku has joined #osdev
<zid>
well, the voodoo didn't help it seems
<zid>
unless my hotplug didn't work
fedorafan has quit [Ping timeout: 248 seconds]
ThinkT510 has quit [Quit: WeeChat 3.8]
fedorafan has joined #osdev
ThinkT510 has joined #osdev
elastic_dog is now known as Guest9568
Guest9568 has quit [Killed (zinc.libera.chat (Nickname regained by services))]
elastic_dog has joined #osdev
danilogondolfo has joined #osdev
<sortie>
<heat> 2) sortie's stack is pretty high quality. probably not very performant, but high quality
<mjg>
that's not very high quality
<sortie>
^ I wouldn't say it's unperformant though. I've been able to push 20 MiB/s downloads through it using qemu slirp on my old desktop. I got gigabit though and it'd download more like 100 MiB/s on my Linux host.
<mjg>
so you are beating openbsd/ :]
<sortie>
Overall that's a decent enough speed and I haven't done much big optimizations
<sortie>
But hey I did try to focus more on having a good implementation and that's way more performant than none and I wouldn't want it to be badly insecure
<mjg>
so how do you look like weird-shit wise
<mjg>
there is no way following rfcs results in a real-world usable stack
<zid>
Gotta start with something readable, then patch some dirty disgusting performance hacks in
<zid>
so there's a paper trail
zxrom has joined #osdev
<sortie>
mjg, what do you mean? I followed the RFCs and it worked
<sortie>
I didn't implement all the features just yet but I didn't intentionally deviate
<zid>
did you try talking to a windows vista machine using a cheap realtek yet
<zid>
that's the true test
<sortie>
I don't really recall any workarounds for stuff yet
<sortie>
zid, has Windows Vista realtek talked TO ME??
<sortie>
So far nobody has reported trouble connecting to my irc.sortix.org network and people have done so from a range of devices
SGautam has joined #osdev
<zid>
everybody always asks WHAT is vista, but nobody asks HOW is vista
<sortie>
It's running my network stack with TLS on top
<zid>
you're behind the router you're behind though, you get the nice sanitized version of everything :(
<mjg>
sortie: there are stupid bugs all over
<mjg>
sortie: if it worked, you mean you barely use it
<zid>
my desktop's internet is fucky and needs tuning hard to make torrents work which is fun
<sortie>
mjg, I mean I'm running my own infrastructure natively so it is really being put to use
<sortie>
Though these days everyone is running Linux
fedorafan has quit [Ping timeout: 246 seconds]
<SerHack>
Does multiboot support RGB with alpha channel? Or only RGB?
Vercas has quit [Quit: Ping timeout (120 seconds)]
bgs has joined #osdev
Vercas has joined #osdev
fedorafan has joined #osdev
GeDaMo has joined #osdev
<zid>
GeDaMo: Did you get otto'd?
<GeDaMo>
wassat?
<zid>
some storm that hit up norf
<zid>
friend's internet was dying on its arse cus of it
<GeDaMo>
Oh, yeah it was a bit windy yesterday
<GeDaMo>
Lots of small branches down but I didn't see any major damage
<zid>
squardle resets at such a weird time
<zid>
11am
<GeDaMo>
I have a similar game on my phone called Lexica, it's on F-Droid
<zid>
I'll have to play weird shit like cell tower
<GeDaMo>
Which is a pity but I use a lot of guesses :P
<zid>
10 seconds in 1 guess is 70 points or whatever, 10 seconds in 2 guesses is 35
<zid>
so you wanna do few guesses as possible, but still be fast ish
<gog>
mew
wootehfoot has joined #osdev
craigo has joined #osdev
<zid>
k finished my squardle
<zid>
maybe it's time for napple
Left_Turn has joined #osdev
<gog>
i'm gonna write codle
<gog>
i remembered what i was working on
morgan has quit [Ping timeout: 248 seconds]
Turn_Left has quit [Ping timeout: 252 seconds]
morgan has joined #osdev
bnchs has joined #osdev
bradd has quit [Ping timeout: 252 seconds]
GeDaMo has quit [Ping timeout: 252 seconds]
slidercrank has quit [Ping timeout: 255 seconds]
bnchs has quit [Remote host closed the connection]
SpikeHeron has quit [Quit: WeeChat 3.8]
SpikeHeron has joined #osdev
<SerHack>
I guess no
gaxar77 has joined #osdev
<gaxar77>
I wanted to begin a tutorial on OSDev today, but thought I should become familiar with the tools first.
<gaxar77>
What do you think?
zxrom has quit [Ping timeout: 255 seconds]
<gaxar77>
Why does the bare bones tutorial have one function taking a color as an enum, and another function taking a color as an integer?
<gog>
enums in C are stored as integers
<gaxar77>
I know.
<gog>
well there's your answer
<gog>
you can use them interchangably
<gaxar77>
But that's not the point.
<gog>
that is the point
<gaxar77>
Should I actually follow this tutorial?
<gaxar77>
As a first tutorial on OS Dev?
<gog>
yes
<gog>
and if it helps you can change the other function taking color as an int to an enum
<gog>
it
<gog>
's the same thing
<gog>
you can change these tutorials all you want and see what happens
<gog>
the point is familiarizing yourself with the basics
<gog>
and the tools
<gaxar77>
Joke: You know what's a good software for ensuring that everyone agrees with one another? SharePoint
gildasio1 has quit [Remote host closed the connection]
gildasio1 has joined #osdev
<gaxar77>
I know, but, I don't understand everything in the code samples (assembly), and I'm not sure if reading the tutorial will be enough.
<gaxar77>
Yeah, doesn't this tutorial assume you already know assembly?
<gog>
it assumes you have a familiarity with it
<gog>
and if not that you can grasp the basics
<gaxar77>
I see.
<gog>
you don't need to be a veteran expert you just need to be able to learn and be ok with having to maybe go find the answers yourself
<gaxar77>
ok
<gaxar77>
I'd prefer a book that teaches the assembly while teaching me to write an OS.
<gog>
i don't know of any such book
<gaxar77>
ok
<gaxar77>
Well, I feel kind of sluggish right now.
<gaxar77>
It may not be the right time to do this tutorial.
<gog>
then maybe have a rest and come back to it another time
<gaxar77>
ok
<gaxar77>
Maybe I need coffee.
<gaxar77>
I ate scoops of whipped cream.
<gaxar77>
Maybe that's why I'm sluggish.
<gaxar77>
I mean spoon fulls.
<gaxar77>
See, I think that the C code is the easy part.
<gaxar77>
Even easier than building a cross-compiler.
<gaxar77>
I don't understand assembly. And I don't like GAS; I like NASM.
<gaxar77>
gog, what are the prerequisites for building an OS? I think they are: knowledge of assembly, linker script, high-level systems language, compiler and linker tools, Intel architecture, hardware protocols (for writing drivers), etc.
<gog>
those are prerequisites that will help you, but nobody can master this knowledge in a reasonable amount of time and the only way to do it is to find some task and do it
<gog>
so, you start with the tutorial. the "hello world" type thing
<gog>
and then decide where you want to go next with it
<gog>
maybe you want to be able to have virtual memory
<gog>
maybe you want to have a timer
<gog>
maybe you want to be able to switch contexts
<gog>
maybe you want keyboard input
heat has joined #osdev
<gaxar77>
So, do you think I should start with the bare bones tutorial, then?
<gog>
i do
<gaxar77>
ok.
<gaxar77>
I will see if I can try it. I'll have to look up a lot of stuff, and I'll have to get the GNU tools and build a cross-compiler.
<gaxar77>
I don't have GNU, neither the source nor the binaries.
<gaxar77>
I don't think.
<gaxar77>
I'll be back later.
gaxar77 has quit [Quit: Leaving]
<heat>
gog, hello gogert langdon world renowned symbologist
<gog>
hello uh
<gog>
heat
<gog>
wow just read a synopsis of angels & demons
<gog>
sounds liek rubbish
<gog>
and i saw the film version of the da vinci code
<gog>
actual rubbish
<heat>
the dan brown books were actually so bad they're good
* gog
mews sadly
<gog>
i'm a rubbish person
<heat>
no
* Amorphia
raises an eyebrow
<heat>
u have self worth
<heat>
u go queen
<Amorphia>
heat: damn right
<Amorphia>
gog: listen to heat
<gog>
yes miss
<gog>
thank you heat
<heat>
np
<Amorphia>
gog is good kitty
* Amorphia
give kitty feeshes
* gog
mew and chomp fishy
<SerHack>
Can anyone confirm that the framebuffer requested with multiboot can not handle alpha channel, but only rgb?
<gog>
yes
<gog>
generally it's going to be 32-bit but in BGRx or RGBx format
<gog>
where the x is an ignored byte
<gog>
what i don't know is whether tehre are any framebuffers with VBE/GOP that also do alpha blending in hardware
<gog>
they probably exist
<gog>
i just don't know
<gog>
s/framebuffers/devices
<Amorphia>
gog: there also exist VECTOR SCREENS
<Amorphia>
they're kinda rare and mega retro
<Amorphia>
but they exist
<Amorphia>
the Computerspiel Museum in Berlin has one
<mrvn>
SerHack: what is alpha supposed to do on a framebuffer?
<mrvn>
unless you have an additional input that you could blend into it alpha simply makes no sense.
<mrvn>
Amorphia: it's too bad the polygon count for those is so low.
<gog>
Amorphia: have you seen techmoan
<gog>
he has a vectrex that he's taken apart and fixed
<gog>
documented the whole thing
<Amorphia>
no :o
<gog>
i think he has two vectrexes actually
<gog>
vectrices??
<Amorphia>
vectrex is the thingy they had at the Computespiel Museum
<Amorphia>
iirc
<gog>
yeh it was a popular home arcade machine
<Amorphia>
there was a small one sold for home use but it wasn't very popular
<Amorphia>
and didn't have that many games
<SerHack>
mrvn: I do not know, I just asked
airplanemodes has joined #osdev
SpikeHeron has quit [Quit: WeeChat 3.8]
SpikeHeron has joined #osdev
SGautam has quit [Quit: Connection closed for inactivity]
<mrvn>
SerHack: there is some hardware that uses RGBA mixing in a black background. So the A is basically brightness.
<mrvn>
I'm sure the RPi can do that too.
<gog>
i want to ask whether there are any with a hardware blit that takes a foreground and background and alpha blends but that's just EGL
<gog>
heh
<mrvn>
every GPU does that
<gog>
yes
<gog>
i'm not very smart
<gog>
maybe i should go do things that don't make me feel like shit
<mrvn>
that's how green screen functions
gog has quit [Quit: byee]
airplanemodes has quit [Quit: WeeChat 3.8]
gaxar77 has joined #osdev
Arthuria has joined #osdev
<gaxar77>
How do I install GCC on Windows? Someone said not to use MinGW.
<gaxar77>
I don't want to use WSL.
<zid>
then install mingw
<gaxar77>
Ok.
<gaxar77>
actually, I already installed cygwin? Will that interfere?
<gaxar77>
I'm installing the compilers and dev tools now.
<zid>
I feel samsung's warranty process may be this obtuse intentionally to stop me trying.
<gaxar77>
Can an OS be written in objective-C?
<gaxar77>
a kernel I mean.
<Ermine>
gog: may I pet you
<lav>
she left
dude12312414 has joined #osdev
<zid>
Ermine: no but you could help me do this warranty claim if you like
<gaxar77>
Okay. I installed MingGW, but I don't know where it is installed, so I can't set the env variable path.
<zid>
see if you can find me *anything* but a email address that doesn't respond
<Ermine>
zid: I have samsung phone and I decided it would be my last samsung phone
Arthuria has quit [Ping timeout: 260 seconds]
<gaxar77>
Okay. I set the path variable.
<heat>
i really like samsung
<gaxar77>
So now I have installed MinGW.
<gaxar77>
So now I need to build a cross-compiler.
<heat>
i became a samsung stan over the last few years
<heat>
really like their products
<gaxar77>
I shall procrastinate for a while.
<zid>
okay heat you do the warranty claim
<heat>
no
<zid>
worst 'stan' ever
<heat>
my cat will do ur warranty claim
<gaxar77>
What are you doing a mobile OS?
<zid>
just think, you might get to interact with a samsung rep
<zid>
that's like meeting your idol
<heat>
lmao
<heat>
does he play foooooooootball
<zid>
ask him
<gaxar77>
So, to build a cross compiler, I need to download all those libraries plus the source code?
<zid>
"henlo, I would like to warranty, which football team do you supporb?"
<gaxar77>
libraries and programs
<heat>
if he's indian, it's man united
<heat>
there's no need to even ask that silly question
<zid>
no no that's what JAMES the character they play in the call center likes
<zid>
you need to get to know the real imran
<zid>
he prefers cricket.
<gaxar77>
heat, are you talking to me?
<heat>
isn't that more of a scammer thing?
<zid>
no all indian call centers use fake names and stuff
<zid>
sometimes one per business they're doing support for
<gaxar77>
I need help to understand some stuff.
<gaxar77>
Do I need to download everything in the table in that article to build a cross-compiler?
<gaxar77>
Bison, Make, Flex, GMP, MPC, etc?
<Ermine>
gaxar77: yes, you need those packages to build gcc and binutils from source
<Ermine>
Follow the wiki instructions
<gaxar77>
Okay.
<gaxar77>
But... this is a bit overwhelming...
foudfou has quit [Remote host closed the connection]
<gaxar77>
I have to build a cross-compiler, then write a multi-boot header and linker script, two things of which I have not a full understanding of how they function.
foudfou has joined #osdev
<gaxar77>
Well, I'm not sure what the boot thing is called, but the tutorial teaches how to use grub.
<mrvn>
you want multiboot for x86-64
<gaxar77>
So these captions are package managers?
<gaxar77>
Why?
<mrvn>
because it's simple, it works and you skip having to write a bootloader
<gaxar77>
ok
<gaxar77>
Uhm, which package manager am I supposed to use to download these things?
<gaxar77>
I have cygwin installed.
<mrvn>
the browser of your choice
<gaxar77>
I thought it would come with gcc but apparently it didn't.
<gaxar77>
So I should just download it via a link?
slidercrank has joined #osdev
<gaxar77>
The non-hyperlink ones are the ones already installed with the GNU right?
<gaxar77>
Like Make, etc.
<mrvn>
I have no idea what you have installed. just follow the wiki.
<gaxar77>
Or is make not part of GN?
<Ermine>
you need to install GNU make. See cygwin docs for instructions on how to install packages in it
<gaxar77>
What about the MinGW package GUI?
<gaxar77>
Can I use that instead of Cygwin?
<gaxar77>
I already installed MinGW from sourceforge.
<gaxar77>
separately from cygwin.
<gaxar77>
I did this whole thing once already a long time ago (building a cross-compiler).. I don't remember installing each one of these packages.
<gaxar77>
Ermine, can I install with cygwin even though I installed MinGW not with cygwin?
<Ermine>
Ah, make can be installed from mingw
<gaxar77>
What about the rest of the packages?
Arthuria has joined #osdev
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
<Ermine>
The same way
<gaxar77>
In MinGW?
<gaxar77>
Ok.
<gaxar77>
I can't find flex and bison.
<gaxar77>
I installed GMP and MPC, if I did it correctly.
<gaxar77>
I'm taking a break.
<mrvn>
isn't there a pre-build cross compiler for windows?
<Ermine>
It's better to install real linux. Or WSL at least.
<gaxar77>
true
<gaxar77>
mrvn, I don't know.
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<gaxar77>
Where do I download this pre-built cross compiler?
<gaxar77>
I give up. I'm not getting the necessary answers to my questions.
<gaxar77>
Ubuntu takes up too much space.
<gaxar77>
So I uninstalled it.
<Ermine>
Use alpine then
<mrvn>
too much space? Go to McDonalds and buy a happy meal with USB stick.
<Ermine>
Also yes, compared to Windows Ubuntu is not that big
xenos1984 has quit [Ping timeout: 246 seconds]
xenos1984 has joined #osdev
<gaxar77>
I don't have that much space on my SSD.
<gaxar77>
Most of it is occupied.
<gaxar77>
I just installed Alpine.
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
<gaxar77>
Well, thanks for all the help everyone, but I think I will work on something else for now.
<bslsk05>
www.youtube.com: Queen - Another One Bites the Dust (Official Video) - YouTube
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
xenos1984 has quit [Ping timeout: 248 seconds]
<Ermine>
First time I did bare bones, I had no clue how does it work, but running it was super satisfying
gog has joined #osdev
xenos1984 has joined #osdev
bnchs has joined #osdev
Vercas2 has joined #osdev
Vercas has quit [Ping timeout: 255 seconds]
Vercas2 is now known as Vercas
SGautam has joined #osdev
danilogondolfo has quit [Remote host closed the connection]
Arthuria has quit [Remote host closed the connection]
Arthuria has joined #osdev
nyah has joined #osdev
fedorafan has quit [Ping timeout: 246 seconds]
fedorafan has joined #osdev
demindiro has joined #osdev
<demindiro>
gaxar77: Have you considered getting a HDD? You should be able to get a 1TB one new for less than €50.
<demindiro>
Also, when using Linux it may be useful to use something like ZFS + enable compression on it, it can save a lot of space.
<demindiro>
(If only today's commonly used filesystems all had transparent compression, so many exabytes of space would be saved, but alas)
<mrvn>
it's not like porn compresses all that well
Arthuria has quit [Remote host closed the connection]
dude12312414 has joined #osdev
<geist>
hah great queen song
demindiro has quit [Quit: Client closed]
nj0rd has quit [Quit: WeeChat 3.8]
nj0rd has joined #osdev
demindiro has joined #osdev
<gog>
it does when you have the raws
<sakasama>
... or you can convert it with libcaca first.
<gog>
heh i remember doing that with aalib
Arthuria has joined #osdev
kof123 has joined #osdev
gildasio1 has quit [Ping timeout: 255 seconds]
<geist>
ugh. updated my firewall software yesterday and DNS forwarding has been generally unstable since
<geist>
i think it's because the newer version of unbound (the DNS forwarder/resolver) is more picky about DNSSEC
<geist>
seems to talk to the upstream servers (8.8.8.8, etc) and eventually decide they're bogus and gives up
<geist>
but the eventually seems to be like 10 minutes to 2 hours, so it's hard to debug
<geist>
disabled DNSSEC and it seems stable now
<geist>
ah there we go, right as i said that it seems to have decided that 3 out of 4 servers are 'lame'
gildasio1 has joined #osdev
slidercrank has quit [Ping timeout: 246 seconds]
dude12312414 has quit [Remote host closed the connection]
<geist>
hmm, it seems to just give up on an upstream server the instant it receives a no data from it
<geist>
and that seems to just sometimse happen
<geist>
once all the upstream servers do, it just stops doing dns
airplanemodes has joined #osdev
<heat>
lmao
<heat>
that's a bit broken
<geist>
well, i think that's whats going on. waiting for now to see what happens
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<geist>
i can watch it send outgoing queries with tcpdump on the firewall, and it still seems to talk to the ones its decided are lame, but seems to favor the one that it hasn't
<geist>
well, even that. it seems to use the other ones... so i dunno
<geist>
the logs aren't useful. though earlier it was bitching that it ca't do DNSSEC, but apoarently that's a known issue with dns forwarding (vs acting as a root dns resolver)
<geist>
(this is all on pfsense firewall)
<heat>
good luck debugging that lol
<heat>
cold take: sun microsystems was great
<gog>
better than fucking oracle
<geist>
well it's all educational if nothing else
<geist>
yah back in the day sun was fairly well respected
<geist>
they were like HP of old. a good company run by decent people. or at least in as much as a company can be good, etc
<gog>
:(
<geist>
i always use oracle buying sun and weaponizing existing patents as a cautionary tale of having companies you work for file patents
<geist>
you never know if you're gonna get dragged into some legal battle 10 years from now because of transfer of ownership of them
<heat>
sounds like you want yourself a patent for small kernels
<heat>
and new operating systems
<gog>
patented gog
<gog>
USPTO #42069
<geist>
no i dont like to be on patents at all
<geist>
or at lest software patents
<gog>
software patents bad anyway
<heat>
software bad
<gog>
yes
<gog>
best take
<geist>
sometimes it's hard to get out of it, since it's generally effectively part of your employment agreement
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
fedorafansuper has joined #osdev
fedorafan has quit [Ping timeout: 252 seconds]
Arthuria has quit [Killed (NickServ (GHOST command used by Guest684531))]
Arthuria has joined #osdev
Turn_Left has joined #osdev
Turn_Left has quit [Max SendQ exceeded]
Left_Turn has quit [Ping timeout: 264 seconds]
Turn_Left has joined #osdev
<heat>
geist, do you have a performance tab in your chrome settings?
<heat>
they seem to have added a memory saving and power saving feature that's supposed to be in that tab but I don't have it lol
<geist>
i dont know why but you may have to enable it in one of the settings panels
<geist>
i dunno if it's a percentage of users thing, or if it's per platform or what
SGautam has quit [Quit: Connection closed for inactivity]
<geist>
that features panel is what i'm talking about, it's under efficiency mode i think
<geist>
youll have to google for it, i dont have it offhand
<geist>
i think sometimes those features are turned on as an experiment by percentage of users over time. though this one isn't labelled experimental
<geist>
perhaps it's per platform. what OS are you on?
<heat>
i bing'd it just for a joke
<heat>
but man BING SUCKS
<heat>
arch linux using the flatpak
<gog>
AB testing software dang
<geist>
so my sample size is 2: my windows box had it enabled, my mac didn't
<heat>
gog, reject AB testing, just 🚢 it
<geist>
also it was added in 108 i think, so you need a chrome newer than that
<heat>
yeah im on 110
foudfou has quit [Quit: Bye]
<heat>
what is "it" here?
<heat>
the performance settings tab?
<geist>
the performance settings
<heat>
ah
foudfou has joined #osdev
<geist>
checking on my mint linux install
<geist>
yah not enabled here by default either
<geist>
sample size 3 now
<geist>
so may be only enabled on windows for now
<heat>
probably
<heat>
thanks
<geist>
probably needs the help more
<geist>
sample size 4, both of my macs dont have it enabled
<heat>
yeah linux doesn't need the help, the OOM killer and the Great Swapping take care of it
<geist>
macs in particular swap and compress like you wouldn't believe
<geist>
their VM is tuned to run hard into swap and it likes it
<heat>
my linux can swap pretty effectively
<heat>
but then you have some out of touch people like ingo molnar saying "who tf uses swap?"
<heat>
which is a big :rolls_eyes: moment as someone with freakin 8GB of ram
<clever>
i got units mixed up when configuring my latest laptop, it has 40mb of swap, lol
<geist>
yah on most of my machines i have a rc.local that sets swappiness to 100
<heat>
lol
<heat>
oh are you an openrc/sysvinit person?
<geist>
my VM machine is also fairly overcommittd and i'm relying on KSM and swap to deal with it
<geist>
no, but even with systemd there's a rc.local thing you can enable
joe9 has quit [Quit: leaving]
<heat>
ah
<heat>
i think there's also a "native" sysctl unit you can use to set sysctls at boot
<clever>
/etc/sysctl.conf and /etc/sysctl.d exist even on my ancient gentoo machine
<heat>
also something cute: booting VMs does trigger khugepaged pretty effectively
<clever>
/etc/init.d/sysctl deals with it on that system
<geist>
oh i'm sure there's almost certainly some cleaner way to set that
<geist>
rc.local FTW!
<kof123>
re: macs "their VM is tuned to run hard into swap and it likes it" that is something freebsd used to claim (or "lore") that it was "graceful" under load versus other systems. i'm assuming mac is unrelated, but dont know how the details/etc.
* kof123
ducks to avoid heat projectile
<geist>
agreed. back in the early 2000s i personally experienced this with my freebsd server and starting to piddle with trying to use linux as a replacement
<geist>
linux was a toy at the time under load. if the disk or swap was getting wailed on the console would literally just stop responding
<geist>
keypresses would take a minute,e tc
<heat>
kof123, why
<clever>
geist: ive once had a linux machine enter swap hell for 48 hours
<heat>
i'm literally writing a patch for freebsd
<geist>
freebsd would very gracefully handle it. that changed over time at least, but back then it was definitely not just lore
<heat>
my hater game only applies to openbsd
<clever>
i wasnt home, and it took 2 days just for ssh to respond enough to kill things
<gog>
heater game
vdamewood has quit [Quit: Life beckons]
<geist>
also gotta remember the early unix svrs and BSDs would run on machines that were very frequently overcommitted by a huge factor. swap was there so that you could let 100 people log into a machine that could only really deal with 10 at a time, because hardware was expensive
<bslsk05>
www.youtube.com: Chappelle's Show - The Playa Haters' Ball (ft. Ice T and Patrice O'Neal) - YouTube
<geist>
of course back then if your shell took a second to respond that was probably okay too. now folks would consider that insane
<geist>
i remember i worked at a company very briefly in like 2001 that for some reason, even then, had a single 'massive' linux box that you were expected to shell in and do all your work
<geist>
you h ad these little Dell thin client machines on your desk that used Exceed X windows app (on windows) to log into the single box, running remote X
<geist>
it was strange. also predictably it ran like shit
CryptoDavid has joined #osdev
<geist>
it was a 'big' box (ie, quad something processors, maybe GB ram, etc)
<geist>
but even then it was already somewhat oversubscribed
<geist>
i think they had some bug up their ass about security or whatnot and didn't want to deal with letting anything outside of their core network get access to software, etc
<geist>
might have had some node locked licensed stuff too
<geist>
even then it was a linux machine which was strange, considering the rest of the infrastructure was freebsd and solaris based. i dont remember why that was the case
<mrvn>
ilovethinking: those last 2 are still totaly screwed
<ilovethinking>
yeah...
<mrvn>
ilovethinking: did you zero out the page tables before use? Do you zero the .bss?
<heat>
we're telling you those addresses are bullcrap
<geist>
heat: might not be, remember they said they're mapping the framebuffer
<geist>
it could quite legitimately be up there
<heat>
there's no framebuffer at ~-2GB
<mrvn>
geist: fffffffff... is not a physical address
<heat>
I can guarantee you that
<geist>
sure there is, with an integrated GPU that's a perfectly reasonably place to be
<ilovethinking>
lol even if i don't map the fb these addresses are stil there
<ilovethinking>
funny
<geist>
i've seen those kinda address
<mrvn>
fdb are not the right flaghs either.
<heat>
geist, at minus 2GB??
<heat>
notice the *-*
<geist>
sure, if you have a 2GB machine that would be there the 'stolen graphics memory' is
<heat>
I mean -2GB in 64-bit space
<gog>
it can't be there on x86
<geist>
yes yes, i'm talking abot the 7fb... part
<gog>
oh
<geist>
the leading ffff is clearky shit
<gog>
lmfao
<geist>
as i pointe dout re: sign extension
<geist>
that's almost certainly because of the FLAGS_NX becaus ei've personally had that problem before
<heat>
geist, the 0x7fb... should be real memory
<geist>
ilovethinking: suggestion: remove the NX part in your code and see what it does
<ilovethinking>
alright
<geist>
since yo dont strictly need it
<mrvn>
Yeah, having the FB at near 2GB (7fb2b000) is possible.
<geist>
then that'll probaby prove that it's a sign extension issue
<geist>
ilovethinking: what hardware are you running on?
<heat>
what BIOS are you using on qemu? assuming this is QEMU
<ilovethinking>
how do i find that out
<heat>
wait, no, better question
<heat>
how much RAM are you giving it
<geist>
if it's qemu yeah dosen't make much sense, but a cpu with an integraded gpu i'd totally expect the framebuffer to be <sizeof(ram) - some number of MB>
<zid>
I have intel GMA atm, I've never had that before
<zid>
is there anything fun I can do with it
<heat>
probably not
<zid>
rip
<geist>
you can hold a door open
<heat>
i mean, you can try and program it
<heat>
that sounds fun
<ilovethinking>
heat: 2g
<geist>
is this real hardware or qemu?
<ilovethinking>
qemu
<heat>
yeah ok so the 0x7fb... addresses are fine
<heat>
the other ones aren't
<geist>
to double check, print those addresses before trying to map them
<heat>
geist, actually, fun trivia: qemu has had like 3 different ways to place ram and PCI space on x86
<geist>
huh interesting. someone at work told me to switch the order of my riscv CSR inline asm constraints from "rK" to "Kr" so it favors using an immediate first
<geist>
which makes sens,e but apparently that's no longer a thing either compiler cares about
<geist>
ie, the relative order of the constraints dont seem to be some sort of priority, or at least in that case
<heat>
clang can't do "rm"
<ilovethinking>
geist: guess what
<ilovethinking>
you are right
<heat>
and i'm still pissed
<geist>
ilovethinking: yah i've personally had exactly that bug before
<geist>
which is why it sticks out
<mrvn>
geist: that part gets lost in the optimizer because of how the register allocation stuff works. Known issue.
<geist>
mrvn: no my point is it actually works in ehtier direction
<mrvn>
So my guess would be the loop only goes up to 7fb2d001
<geist>
okay, so it's completely overwriting it
<geist>
so that's something
<geist>
when printing these entries later, are you sure they're witin the same page table? ie, not the last 3 entries and then printing whatever garbage is after it?
<geist>
also line 4 you want to expand that to 0xfff
<geist>
not 0x1ff. since it's a 12 bit field you're masking off
frkazoid333 has joined #osdev
<geist>
ah yeah that'd caus eyou to incorrectly compute the last index
<geist>
so depending on where it lines up it might wrap around and not set what you think
<ilovethinking>
let me fix that
<geist>
also assumptoin: alloc() always returns 4K aligned addresses?
<ilovethinking>
wait i should change all to fff? or the pt_offset one
<ilovethinking>
geist: eys
<ilovethinking>
yes
<geist>
no. just that one. see why? width of those entries
<geist>
the 0x1ff and 0xfff is a mask that corresponds to 9 and 12 bits
<ilovethinking>
oH
<ilovethinking>
sorry
<ilovethinking>
yeah
<ilovethinking>
still get the junk
terminalpusher has quit [Remote host closed the connection]
<geist>
you dont have to apologize to me about it
<zid>
1ff is 9 bit, if you think about it kind of obvious, 0xFF being 8.
<geist>
suggestion: print the entry as you set it
<geist>
not after the fact
<geist>
ie 'printf("setting entry at index w❌y:z to NNN");
<mrvn>
The IT (If-Then) instruction makes a single following instruction (the IT block) conditional. The conditional instruction must be from a restricted set of 16-bit instructions.
<geist>
it'll generate a lot, but then you can validate at the point at which it makes the change
<geist>
look i'm not going to debug it for you, i'm just giving you pointers to how to track it down
<geist>
so you'll quit just givnig up and feeling overwhemled
<ilovethinking>
im just using whatever the linker gives me
<ilovethinking>
and it seems like data and rodata is junk given by the linker
<geist>
cool, so now you jknow precisely when it tried to set the garbage
<geist>
now you can reverse back to where it goes wrong
<mrvn>
ilovethinking: your .rodata isn't aligned to a page
<moon-child>
mrvn: oh yeah we
<moon-child>
ll
<moon-child>
I like you the best
<ilovethinking>
geist: reverse?
<geist>
never mind. read mrvn's comment
<ilovethinking>
wdym now i know that my linker is fucked up
<mrvn>
ilovethinking: when you map a physical address you should mask out the lower 12 bit, or assert they are 0.
<geist>
well, no you're expecting it to be aligned in a way it isn't
<mrvn>
ilovethinking: as is your linker script lacks the 4k alignment for .rodata
<mrvn>
which by the way is broken in the wiki
<geist>
all this aside i'd highly recommed not worrying about these fine grained permissions right now
bnchs has quit [Remote host closed the connection]
<geist>
because that involves making sure the liker script, etc. you dont awnna mess with that right now
<geist>
it's a PITA even if you know what you're doing
<geist>
just map the whole thing as RWX and move on for now
<ilovethinking>
physical_address &= ~(0xFFF);
<ilovethinking>
that;s the way to align it?
<geist>
you can go back and tighten it up later
<mrvn>
ilovethinking: missing LLU
<geist>
yeah but you dont want to fiddle with that right now, because you'll end up mapping two things in the same page with different permissions
<geist>
that's just another bug unless the linker script is truly aligning them
<geist>
the last page will be shared between two permissions
<heat>
we did go through that already
<geist>
yeah but i dont think they get it
<geist>
so it's really not worth messing with right now
<heat>
my OG mission for them was "make sure writing to a string doesn't crash"
<ilovethinking>
mrvn: LLU?
<heat>
for an easy response to "why do I need paging?"
<mrvn>
0xFFF is an integer but you are working with 64bit addresses
<ilovethinking>
geist: yeah but then there is no explanation why i get a bogus address from the linker
<geist>
well, okay... i mean, this is a complicated task (making sur the kernel is mapped right with tight permissions) for a newbie to be fiddling with
<geist>
it's not bogus, it's just not aligned
<geist>
most likely that's because the linker script isbn't aligning them
<geist>
which requires fiddling with the linker script
<ilovethinking>
so do i cast the 0xfff to llu
<ilovethinking>
lol
<geist>
that's a valid binary, just not set up the way your code is expect
<geist>
LU yes
<mrvn>
ilovethinking: 0xFFFLLU is 64bit
<mrvn>
geist: pleae, no LU
<geist>
only need LU in this case, because x86-64
<geist>
no, LU is what it is on x86-64. not the same on all cpus
<ilovethinking>
wait i didn;t know you could do the same with hex
<mrvn>
geist: wrong, on windows LU is 32bit.
<geist>
yes, but they're not on windows
<ilovethinking>
like ik u can do 0LLU
<geist>
whatever, either way.
<mrvn>
geist: LLU is always 64bit on 64bit cpus.
<geist>
too many cooks.
<geist>
mrvn: yes i know this i'm trying to avoid a problem later on that i dont want to explain right now
<ilovethinking>
yeah now they look more sane
<ilovethinking>
hooray
<geist>
if yo ualign that it might be just making a more subtle bug... sigh
<mrvn>
it's just good practice to forget that "long" exists at all.
<geist>
mrvn: it is 100% *not* but i really dont want to argue about it
<ilovethinking>
so turns out my FB lives at 0xFD000003
<geist>
you really need to fix the linker script first before you try to do this
<gog>
3 is the page flags
<ilovethinking>
yes i know
<mrvn>
ilovethinking: highly unlikely. Why isn't that aligned to at least 4 byte?
* geist
steps out and lets the other cooks cook
<gog>
nope
<gog>
i'm nto cooking
<ilovethinking>
mrvn: cuz i print the pageflag
<mrvn>
ilovethinking: then say that
<mrvn>
2 is writable?
<ilovethinking>
1 << 2 is RW right
<ilovethinking>
cuz i set PRESENT and RW
<mrvn>
ilovethinking: 1 << 2 is 4 so it should be 0xFD000005
<ilovethinking>
no sorry rw is 1 << 1
<mrvn>
better
<ilovethinking>
well it still pagefaults on print either way
<ilovethinking>
lol
<mrvn>
so does printf work now?
<ilovethinking>
no error
<ilovethinking>
no
<ilovethinking>
it pagefaults when i try to print
<mrvn>
does your printf try to use the FPU?
<mrvn>
or sse
<mrvn>
wheck where it fails
<mrvn>
check
<ilovethinking>
on the printf
<ilovethinking>
printf("Virtual Memory Manager has been successfully initialized!\n");
<mrvn>
Note that if your printf supports %f or %g then it will use the FPU on entry.
<mrvn>
part of how VAARGS work
<ilovethinking>
well my printf just uses the limine terminal
<mrvn>
How so? Does limine have a callback to output text?
foudfou has quit [Remote host closed the connection]
<bslsk05>
github.com: limine/PROTOCOL.md at trunk · limine-bootloader/limine · GitHub
<ilovethinking>
wdym "keeping limine mapped"
foudfou has joined #osdev
<mrvn>
ilovethinking: if your page tables doesn't have entries to where limine has it's code and data with the right permissions then calling limine will fail.
<ilovethinking>
yeah makes sense
<ilovethinking>
anyways almost 2am
<ilovethinking>
forgot the it's
<ilovethinking>
lol
<ilovethinking>
anyways
<mrvn>
Which basically means you can't make your own page tables. You don't knwo where limine is unless it tells you somehow.
<mrvn>
ilovethinking: look into outputing text to the serial port to debug stuff
<ilovethinking>
yeah i really should
<ilovethinking>
it's getting annoying with limine
wootehfoot has quit [Quit: Leaving]
ilovethinking has quit [Quit: i probably locked my mac and i got disconnected]