oldgalileo has quit [Remote host closed the connection]
oldgalileo has joined #osdev
xenos1984 has quit [Ping timeout: 268 seconds]
oldgalileo has quit [Remote host closed the connection]
oldgalileo has joined #osdev
oldgalileo has quit [Remote host closed the connection]
oldgalileo has joined #osdev
netbsduser has quit [Ping timeout: 264 seconds]
oldgalileo has quit [Ping timeout: 246 seconds]
josuedhg has quit [Quit: Client closed]
Matt|home has quit [Remote host closed the connection]
<kof673>
all i meant was "compartmentalization" "reductionism" is the norm...and not necessarily for entirely bad reasons...not that i trust random "holistic" people either lol
oldgalileo has quit [Remote host closed the connection]
oldgalileo has joined #osdev
oldgalileo has quit [Remote host closed the connection]
oldgalileo has joined #osdev
oldgalileo has quit [Remote host closed the connection]
oldgalileo has joined #osdev
osdev199 has joined #osdev
<osdev199>
Hi, how to detect the RAM starting and ending physical addresses on an x86-64 PC that uses UEFI boot? I need it for writing my memory manager.
oldgalileo has quit [Remote host closed the connection]
oldgalileo has joined #osdev
<zid>
uefi has an api for it
<osdev199>
zid: maybe you are talking about EFI_BOOT_SERVICES.GetMemoryMap()
<osdev199>
In that case, I need to compare each descriptor's starting physical address to check for the highest and the lowest addresses.
oldgalileo has quit [Remote host closed the connection]
<zid>
do that then?
oldgalileo has joined #osdev
<zid>
But, it's not very useful information
<osdev199>
how?
<zid>
you care about contiguous regions
<zid>
not minimum and maximums
<zid>
and contigous regions is exactly what getmemorymap provides to begin with
<zid>
What was your plan if the memory map said there's 1GB at 0-1GB and 1GB at 256.000TB-256.001TB, claim the system has 256TB of ram?
oldgalileo has quit [Remote host closed the connection]
oldgalileo has joined #osdev
<osdev199>
Sorry, I didn't understand that.
<osdev199>
afaik, i can create a bitmap for 4 KiB pages starting from the start address of RAM to the end address and then from the UEFI's memory map, I can set and mark the reserved and/or corrupted memory pages.
<osdev199>
Rest I can use for malloc() as for now!
<osdev199>
I'm doing it. Thanks zid.
oldgalileo has quit [Remote host closed the connection]
oldgalileo has joined #osdev
osdev199 has quit [Remote host closed the connection]
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #osdev
gsekulski has joined #osdev
<geist>
yep the answer is you gotta do that
<geist>
oh they left
osdev199 has joined #osdev
osdev199 has quit [Remote host closed the connection]
oldgalileo has quit [Ping timeout: 256 seconds]
oldgalileo has joined #osdev
vdamewood has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rustyy has quit [Quit: leaving]
spare has joined #osdev
tjf has quit [Ping timeout: 264 seconds]
gbowne1 has quit [Read error: Connection reset by peer]
tjf has joined #osdev
oldgalileo has quit [Ping timeout: 260 seconds]
zxrom has quit [Quit: Leaving]
Left_Turn has joined #osdev
CryptoDavid has joined #osdev
GeDaMo has joined #osdev
Vercas has quit [Read error: Connection reset by peer]
spare has quit [Remote host closed the connection]
ZipCPU has joined #osdev
kof673 has quit [Ping timeout: 255 seconds]
op has joined #osdev
gsekulski has quit [Ping timeout: 255 seconds]
<dostoyevsky2>
Isn't hibernation mostly an OS feature? And yet it seems difficult for Linux to get it implemented in a way that works... I mean you'd just load all your RAM and saved state from disk on boot
<kazinsal>
hibernation depends on the ability for all the processes and drivers in use on the system to be able to be re-initialized into a saved system state
<kazinsal>
some devices can be "woken up" from the cold into an existing state better than others
<zid>
lots of device driver shenanigans to get the actual hw to go into suspend required
<zid>
especially the actual main board, that tends to rewrite gobs of acpi
<zid>
require*
<kazinsal>
you generally can't just shut the machine down, power it back up, and expect it to be 1:1 to how it was before the hibernate command got sent
<dostoyevsky2>
kazinsal: So the Linux drivers are not designed well enough to be able to restart from a saved system state?
<kazinsal>
I can't attest to the state of Linux driver design past the real early ones that have comments like "if you are reading this, go buy another ethernet card"
<dostoyevsky2>
I guess it can be hard to reinitialize and save io trapped memory regions
<zid>
fun fact, acpi tables have a 'windows' and a 'not windows and is totally broken' versions
<dostoyevsky2>
and maybe drivers have to cope with a great variety of possible setups depending on the actual hardware also
<kazinsal>
it's smartest to have an implementation that can parse the Windows versions
antranigv has joined #osdev
Vercas has quit [Ping timeout: 260 seconds]
netbsduser has joined #osdev
<xtex>
is there any simpl way to detect if a serial port is present, on x86?
<dostoyevsky2>
xtex: Should be doable with some outb'ing
<xtex>
What will happen if I try to outb without a serial port connected?
<zid>
can't you just try to read and see if you get 0xff or something
navi has joined #osdev
rustyy has joined #osdev
<dostoyevsky2>
when you then `in' after the out you will notice that it doesn't identify as a serial port
valshaped7424880 has quit [Read error: Connection reset by peer]
valshaped7424880 has joined #osdev
<xtex>
thanks!
<zid>
Do people actually make PCs without serial ports though
<zid>
even if they're not hooked up, the superio still has the port endpoint captured I'd imagine
<zid>
hooked up externally that is
CryptoDavid has quit [Quit: Connection closed for inactivity]
ddevault has quit [Ping timeout: 255 seconds]
dostoyevsky has quit [Ping timeout: 252 seconds]
dostoyevsky has joined #osdev
dostoyevsky2 has quit [Remote host closed the connection]
osdev199 has joined #osdev
dostoyevsky2 has joined #osdev
ddevault has joined #osdev
osdev199 has quit [Ping timeout: 255 seconds]
zxrom has joined #osdev
goliath has joined #osdev
oldgalileo has quit [Ping timeout: 240 seconds]
GreaseMonkey has quit [Remote host closed the connection]
oldgalileo has joined #osdev
rustyy has quit [Ping timeout: 240 seconds]
Vercas has joined #osdev
rustyy has joined #osdev
edr has joined #osdev
rustyy has quit [Ping timeout: 260 seconds]
xenos1984 has quit [Read error: Connection reset by peer]
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 240 seconds]
xenos1984 has joined #osdev
rustyy has joined #osdev
rustyy has quit [Ping timeout: 264 seconds]
gsekulski has joined #osdev
rustyy has joined #osdev
erai has joined #osdev
zxrom has quit [Remote host closed the connection]
zxrom has joined #osdev
gsekulski has left #osdev [#osdev]
mctpyt has quit [Remote host closed the connection]
mctpyt has joined #osdev
<immibis>
dostoyevsky: linux is a volunteer project which means if someone doesn't feel like doing it, it doesn't get done.
netbsduser has quit [Remote host closed the connection]
netbsduser has joined #osdev
vikn has joined #osdev
zxrom has quit [Remote host closed the connection]
zxrom has joined #osdev
dalme has joined #osdev
op has quit [Remote host closed the connection]
zxrom has quit [Ping timeout: 252 seconds]
netbsduser has quit [Ping timeout: 256 seconds]
netbsduser has joined #osdev
gorgonical has quit [Ping timeout: 252 seconds]
Matt|home has joined #osdev
node1 has joined #osdev
xenos1984 has quit [Ping timeout: 272 seconds]
xenos1984 has joined #osdev
goliath has quit [Quit: SIGSEGV]
josuedhg has joined #osdev
rustyy has quit [Ping timeout: 240 seconds]
<node1>
Hi
<node1>
Anyone good in falstad? circuit drawing and understanding?
xenos1984 has quit [Ping timeout: 272 seconds]
xenos1984 has joined #osdev
node1 has quit [Ping timeout: 250 seconds]
k4m1 has quit [Ping timeout: 252 seconds]
k4m1 has joined #osdev
gorgonical has joined #osdev
zxrom has joined #osdev
lukflug has joined #osdev
Matt|home has quit [Ping timeout: 268 seconds]
goliath has joined #osdev
<lukflug>
Hello, I've noticed that due to recent vandalism, the "Tutorials" page on the OSDev Wiki has been deleted, but has not been restored yet.
node1 has joined #osdev
<zid>
ngl that sounds like an improvement
node1 has quit [Ping timeout: 250 seconds]
<geist>
zid: re: serial ports a lot of modern pcs dont have superio chips
<geist>
my experience is if you look around in consumer space the gamer/enthusiast boards may still have ps2 keyboard ports because gamer stuff
<geist>
and then they end up witha superio and then they have a little 10 pin header on the mobo for serial, sometimes
<geist>
but otherwise if it's a cheaper board that's 100% usb lots of times there's just no superio chip
<geist>
or it's a micro atx or mini atx they might not spend real estate on a 10 pin header
node1 has joined #osdev
<gorgonical>
lukflug: there's an edit message that doesn't make it sound like vandalism to me
<gorgonical>
oh wait, I can't read
<gorgonical>
you are indeed right, it's vandalism
<lukflug>
gorgonical: that's the default edit message when deleting a page
<gorgonical>
yep yep. I mistook the content of the page as the person's remark about why they deleted it
<gorgonical>
cause I can't read
<geist>
huh can anyone resurrect a page? ie, is the page stil lthere, just deleted and yo ujust have to revert the delete?
<lukflug>
deletion is actually hiding
<lukflug>
so only a sysop can see and restore it
<lukflug>
so yeah, someone who has administrator permissions on the wiki can easily revert it
<zid>
whoa no superio? crazy
<zid>
how do they *checks notes* Infrared receiver!?
<zid>
I guess that explains why I've seen laptops that had the touchpad and keyboard show up via usb
<nikolapdp>
my laptop emulates ps2 keyboard and mouse
<nikolapdp>
at least in early boot
<zid>
if they don't bother with any good external ports, and just.. use 2 wires of usb
<nikolapdp>
though i am using csm so that's probably why
<zid>
instead of a superio
<zid>
yea ps/2 is normal because you have the superio just sat there waiting for pins to be hooked up
<zid>
you don't need to waste any of the ports on your internal hubs
josuedhg has quit [Quit: Client closed]
node1 has quit [Quit: Client closed]
node1 has joined #osdev
<dostoyevsky2>
So over on #linux they said that hibernation is difficult because the standards seem incomplete. And what's happening is that hardware vendors just create their own windows drivers that work... But Linux only supports the official standards, and then it breaks. Commercial OSes can usually limit the exact hardware they are running on, so for that they can just write their own drivers
<dostoyevsky2>
I guess the other thing is that Linux is quite fast to boot, especially on ssds... and then many UI apps and window managers have persistent session features, where you can resume from where you did shutdown the OS... So it's not much of an annoyance if hibernation is not supported
<geist>
right
dalme has quit [Read error: Connection reset by peer]
<mjg>
machines take longer to POST than they take to boot
<mjg>
i dont' know about with windows tho :X
<dostoyevsky2>
mjg: I think windows also boots fast but the problem is that the OS is usually user hostile, e.g. the first apps to open on my Windows 10 work computer are always Skype and Teams... so you have to close them... and then OneDrive as well... Whereas on Linux the start can be frictionless
<mjg>
i have no idea about desktop realiteis for Normies(tm)
<dostoyevsky2>
Best thing I did for my windows work computer was to install intel's overclocking tools... and then clocked the CPU down to like 10%, so that mcafee's virus scanner wouldn't always let the fan run non-stop
node1 has quit [Quit: Client closed]
node1 has joined #osdev
node1 has quit [Client Quit]
node1 has joined #osdev
<zid>
dostoyevsky: I'd be surprised if like, half the drivers in drivers/ in linux even supported suspend, because it just.. was never reverse engineered
<zid>
only to the point of "it makes the device function"
<zid>
(as in, proper power management, for hibernate, and not just suspend to disk)
node1 has quit [Ping timeout: 250 seconds]
<gorgonical>
a hn post gave me a wild idea. How much work/difficulty would it be to send sixel information over serial?
Matt|home has joined #osdev
<gorgonical>
The work I'm doing right now involves camera images and interacting with the device over serial, and I briefly wondered if sending thumbnails of captured images via sixel would be reasonable
<zid>
sixel?
<gorgonical>
old (?) protocol for displaying images in a terminal
<zid>
oh heh
<zid>
That's interesting, it's specifically designed for 7-bit links
<zid>
all my serial is 1:8:1 though so not that useful
<zid>
I could just transmit a png directly
<gorgonical>
The advantage would come in being able to continue receiving regular console messages, as well as if gnu screen already can speak sixel
<gorgonical>
like, having the thumbnails interspersed with continuously scrolling logs
<zid>
yea, that's neat
<gorgonical>
hmm... Might waste some time on this soon lol
<zid>
I've used a scope that spat out an animated gif before
<zid>
you can just keep adding frames onto the end of the transfer, and it will add them as animation frames
<zid>
so you can just.. use gif for realtime video streaming
<gorgonical>
wait lmao what
<gorgonical>
I mean you must have in-place frame overwriting for this to be a reasonable thing
tjf has quit [Ping timeout: 268 seconds]
<zid>
yes, that's what the 'animated' part of animated gif does
<zid>
redraws over itself a bunch of times
<gorgonical>
oh really
tjf has joined #osdev
<zid>
and thanks to persistence of vision
wantyapps has quit [Ping timeout: 260 seconds]
<zid>
it looks like it's smoothly animated despite being a sequence of discrete pictures
<zid>
(this is called 'video')
<nikolapdp>
gorgonical, if you're working in a graphical environment, you can use ueberzug
<nikolapdp>
it's basically a hack to display images "in terminal"
wantyapps has joined #osdev
<zid>
konsole already supports sixel at least, judging by the wikipedia page for it
<nikolapdp>
zid yeah i think sixel support is relatively rare
<zid>
I didn't know there were escapes for 'arbitrary box drawing', which is basically what it appears to be, at least
<zid>
it's like using cp437 but it's a character per row instead
<nikolapdp>
though tmux can apparently intercept it and render it the best way your terminal supports
<zid>
I don't know of any like.. encoding filterers in the unix toolbag? In retrospect that seems odd.
<zid>
Like, there's no tool I can think of where you can say, take a telnet encoded stream, and have it strip the telnet parts and give you the payload, etc
<nikolapdp>
encoding filterers?
<zid>
or ansi escapes, or whatever else
<nikolapdp>
ah
<nikolapdp>
maybe you can use the telnet command itself for that
<nikolapdp>
but yeah that's definitely on case by case basis type of thing
<nikolapdp>
yeah, so 0xff is technically an invalid byte in a utf8 stream
<zid>
yea so there's literally no escaping you need to do in a text session at least
<geist>
i dunno precisely how runtime escaping happens but i'm guessing it's 0xff <some info>
<geist>
like terminal size change
<nikolapdp>
yeah that would make sense
<zid>
yea it's 0xff 0xfe or something, for literal 0xff
<zid>
and 0xfc 0xfd etc are the 'will' 'wont' etc, I forget the exact values
<zid>
If utf-8 had 0xff be valid, then you'd need an ugly state machine to know if you were 'inside' a utf-8 glyph or not if you wanted to do the equivalent of comment stripping, like how you can't just strip // from C source because it might be inside a string
<nikolapdp>
if it's not a big protocol, might be a fun weekend project to just implement a telnet client
<geist>
i actually hit things like this when playing withreally old unices and openvms and whatnot, where they dont support all the will/wont/term size stuff
<zid>
yea I wrote one for nethack like.. 20 years ago
<zid>
and muds
<zid>
so I could try write bots
<nikolapdp>
how did try write bots go
<zid>
not very well, nethack bots are incredibly difficult
<nikolapdp>
eh i can imagine that
<nikolapdp>
a lot of state to keep track of and information to parse
<zid>
bots for most games are very very difficult unless the objective is incredibly simple to describe
<nikolapdp>
yeah
<nikolapdp>
or you could train an "ai" to do the thing :P
<zid>
like, it was a huge ML breakthrough when they managed to play atari 2600 games passably, after thousands of hours of training on a cloud cluster
<zid>
I think you need one of those double ML setups, like google's chess thing used
<zid>
where one engine was evaluating boards, and another was evaluating positions, combined
<nikolapdp>
well depending on the game, you can probably get by with relatively simple networks
<nikolapdp>
i think a guy beat several mario levels with a tiny network trained on his cpu
<zid>
You'd need one ML solving for "How do I path from here to here and not die to the monster on the way" and another controlling "How do I beat nethack?"
<zid>
mario 1 levels are all basically autoscrollers
<nikolapdp>
oh yeah for that sort of game, it would be massively more complicated
<geist>
yah i think 2600 and mario and whqtnot are good starters in the sense that the way of measuring progress can be fairly simple
<geist>
ie, move to the right
<nikolapdp>
yeah that's true
<zid>
Try them on a mario maker one screen puzzle
<nikolapdp>
heh yeah no
<geist>
i have thought it'd be fun to start from the very basics and write like a 10 neuron net from scratch, and start buildin gup from there
<zid>
tbh I think most of these 'AI' projects for games are just benefitting from how much faster GPUs are these days
<geist>
like, train that input is A B C, output is 1
<zid>
you could probably implement the 90s style guided bruteforce bots and get just as good results
<nikolapdp>
zid the one i was referring to was trained on cpu
<zid>
even cpus are significantly better
<nikolapdp>
true true
<zid>
like, it used to be all the rage to make little cars that optimized themselves along a track using genetic algos
<zid>
that research is all dead, but tbh we have enough gpu power now that it'd be really interesting to revisit
<zid>
you could give them 100x the genes now
<nikolapdp>
yeah for fixed nets, that would definitely help
<nikolapdp>
but a lot of those genetic algorithms had dynamic networks so gpus are basically useless there
<nikolapdp>
at least the ones i've seen in the wild
<bslsk05>
kukuruku.co: Using the Quick Raise of Matrices to a Power to Write a Very Fast Interpreter of a Simple Programming Language
<zid>
I mean, it's literally just a difference in how the shit is expressed, the fundamental idea hasn't really changed
<zid>
study some badly expressed input data, weigh up some weights for what to do, spit out an action. Just now instead of if(input > weight4) direction += thing4(); it's direction += thing4 * pow(input, weight4);
<zid>
Hopefully you use a better transfer function than pow but I couldn't remember any others
<zid>
The fact I know about transfer functions at all is deeply shameful
<nikolapdp>
tanh
<nikolapdp>
or relu
<nikolapdp>
kek
h3xc0re has quit [Quit: Leaving]
gbowne1 has joined #osdev
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
gsekulski has quit [Remote host closed the connection]
<dostoyevsky2>
nikolapdp: new shell that uses a new terminal, shmif... I think it's short for shared memory interface
<dostoyevsky2>
but last time I asked letoram about it shmif didn't work over ssh...
<dostoyevsky2>
but since shmif doesn't use escape sequences, and rather lets you use video memory directly it can be faster... but I guess turtle graphics works better over ssh
<dostoyevsky2>
But then if you were to have direct memory access, video codecs should have no problem with a 80x25 bytes terminal screen... and even for video remote desktop can be snappy with x264
scaleww has joined #osdev
scaleww has quit [Client Quit]
kof673 has joined #osdev
<Ermine>
Vscode crosses out deprecated stuff. Quite poor ui choice
<dostoyevsky2>
Ermine: they deprecated the close window button?
<Ermine>
huh?
oldgalileo has quit [Ping timeout: 252 seconds]
theyneversleep has joined #osdev
xenos1984 has quit [Read error: Connection reset by peer]
<netbsduser>
i am finally making a start on unmounting
<netbsduser>
i want to support a clean shutdown and this is the elephant in the room
<netbsduser>
most hobby kernels don't seem to bother with clean shutdown but i have lazy page write-back so it must be done
xenos1984 has joined #osdev
dude12312414 has joined #osdev
<dostoyevsky2>
netbsduser: does linux actually unmount when you do a `reboot'?
<netbsduser>
dostoyevsky2: if it doesn't, it certainly reuses such infrastructure as it uses for unmounting
<netbsduser>
i would however think it must do
<dostoyevsky2>
I thought they'd only do an sync
<netbsduser>
some filesystems when mounted read-write will have something be marked in their superblock to indicate they were mounted, and if that mark is found at mount-time, complain
<dostoyevsky2>
ah, yeah... that's true
<dostoyevsky2>
Yesterday I managed to fill up the harddisk of this OpenBSD server with my mmap experiments... And on reboot OpenBSD wants to relink the kernel but the disk was full, so I couldn't login after the reboot
<netbsduser>
they love relinking their kernel in openbsd land
<dostoyevsky2>
it's only a question of time until they will relink the kernel in the background while your OS is running
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<kof673>
one small step towards story of mel j/k
<kof673>
that would be interesting if they did end up being more and more "dynamic" for totally different reasons though
<dostoyevsky2>
I mean they could just make the first kernel an instance of VMM and maybe swap things during runtime, could also vmm in general