klange changed the topic of #osdev to: Operating System Development || Don't ask to ask---just ask! || For 3+ LoC, use a pastebin (for example https://gist.github.com/) || Stats + Old logs: http://osdev-logs.qzx.com New Logs: https://libera.irclog.whitequark.org/osdev || Visit https://wiki.osdev.org and https://forum.osdev.org || Books: https://wiki.osdev.org/Books
srjek has joined #osdev
pretty_dumm_guy has quit [Ping timeout: 245 seconds]
pretty_dumm_guy has joined #osdev
<dormito> hmmm is this channel crazy bait or something? It feels like I see a lot more... "uniqe" spam/blathering here than elsewhere.
<clever> dormito: just look at temple os, and youll see what kind of unique crazy OS development can attract! lol
<clever> either that, os os development drives people insane
<dormito> lol
* gog spams blather
<dormito> I dont know, klange and sortie have never struck me as too crazy
<gog> they're the exception
<dormito> Hmmm no that I think about it. I dont remember klange from my early days in #osdev
<dormito> s/no/now/
<zid> dormito: It's mainly the one gu
<zid> guy*
<nanovad> Can anybody remember when they met klange? All I know is that one day he was here.
<zid> But yea, things like astrophysics and embedded development etc attract the crazy
<clever> nanovad: according to my irc logs, he was already in here when i first joined in 2017-04, and i saw him and sortie talking that same day
<zid> It's the atheist version of the crazies who say god has told them the government is listening to their teeth, they think the NSA has backdoored their pocket calculator. And that instead of being jesus reborn and are here to save us, they're going to write an amazing piece of software
<zid> that nobody else could possibly have managed
<dormito> lol. I rememeber when I was first getting into OS dev. I came across and article raving on about how the MBR's signature AA 55 was how like the CIA kept control of peoples machines or something.
<gog> :|
<zid> Oh no, dormito knows, dispatch the agents
<kazinsal> rip ol' Terry
<kazinsal> thought of the CIA and walked into a train
<clever> dormito: but checking the irc logs, i think i was here before 2017-04, i dont see my original questions
<dormito> I think I joined somewhere around 2013-ish. I was still had a windows machine back then.
<clever> my original reason for joining, is that i wanted to run a xen unikernel, under qemu
<clever> but still have the xen api
<dormito> zid: sort of the sick Irony: things like the ME show us how that sort of thing would be done (two bytes is obviously too small to be any sort of real back door)
<nanovad> I think I joined sometime around 2015, which would have been after I started using Linux as my primary OS and I took an interest in MikeOS
<clever> so i wanted to create a custom x86 bios for qemu, that would drop into 64bit paged most, as quickly as possible
<dormito> that reminds me: someone add the "disputed" tag to the wiki's paging page, but then didn't post any reason for it
<nanovad> Obviously paging is up for debate
<nanovad> I mean have you ever seen two page tables in the same room at the same time?
<clever> lol
<dormito> so interesting story: basically powerpc64 allows two simultanious page tables to be loaded (technically the arch reserves space for 4, but AFaIK only two are ever used, one for the hypervisor, and one for the OS)
<dormito> the upper 2 bits determin which page table set is used (that is if I'm recalling all my details correctly. never actually implemented paging for it, so it doesn't stick quite as well)
<clever> arm and x86 kinda have similar, and i think they call them nested paging tables
<clever> when enabled on arm, the "physical addr" coming out of the main kernel paging tables, is then translated a second time, thru the tables set by the hypervisor
<dormito> yup same with power, expect, as I said, the hypervisor's page table maps to 0xC0000000_00000000, the OS gets one or two of the other slots (IIRC that means the hypervisor can trivially use kernel addresses).
<klange> for what it's worth, terry wasn't a regular here any time during its history, and I don't think mart's an osdever - he just chanced upon us and stuck.
<kazinsal> yeah, terry was more active on the forums for a while
<kazinsal> ate a few bans then left for browner pastures
<kazinsal> attempted to get some cred on SA, got banned within days for the expected reasons
<kazinsal> also one of the few people to get banned from hackernews for being too shitty even for them
<zid> idk why people suddenly found out about ME and lost their shit
<kazinsal> performative security consciousness
<zid> like.. yes people are able to log into their motherboards and check temps and change their bios settings via VPN, yes this requires a coprocessor
<kazinsal> a lot of foss nerds love to think they're the kind of person who would be the target of a nation state actor grade backdoor attack
<kazinsal> because I'm sure mossad really wants your e621 dumps
<zid> mossad's after my acpi tables
<gog> the NSA is trying to steal my lewds
<clever> kazinsal: several FOSS guys have been chewing me out for hosting images on discord/imgur and linking videos directly on youtube
<zid> lewds of you, or ones you downloaded?
<gog> ;)
<clever> "oh the horror, you made me download a file from discord, dont do it again" lol
<kazinsal> clever: yeah, I've seen that a bunch. like, fuck, I'm not going to run a video streaming server to show off a demo of something
<clever> kazinsal: for video, they instead say to use an alternative youtube frontend, like https://invidious.snopyta.org/watch?v=GHDh9RYg6WI
<bslsk05> ​'2d and 3d demo' by michael bishop (00:00:21)
<kazinsal> b-b-b-but cookies and javascri-- who gives a shit you are ALREADY OWNED
<clever> that blocks the google tracking
<kazinsal> you can not exist in the modern world at ALL without being already owned
<zid> I hate youtube because it runs 10MB of javascript before anything even appears
<zid> so you need to be running -latest-master-nightly chrome to get enough perf for it to be usable
<kazinsal> FAANG already knows everything about you whether you use their products directly or not
<clever> zid: you may like invidious then
<zid> much less support the stupid extensions
<clever> zid: or the local client, freetube i think it was
<klange> Can't win.
<zid> I cbf to rewrite the urls and deal with the breakage THAT causes though
<klange> You use your own VPS for images, they complain it's sooo sloooow
<klange> To be fair, though, please don't use imgur unless you're linking something uploaded there a millenia ago, it's just garbage now
<clever> zid: i also rely on the youtube playlists, and like the algorithm recommendations, so i'm only using invidious when i link my own vids in those foss channels
<kazinsal> you write an OS and TCP stack and HTTP server, they complain that it doesn't support TLS 1.3
<klange> I'm working on it, dammit!
<kazinsal> you hack in LibreSSL and they complain you're not using GNU software
<zid> imgur is still fine.. as an image host
<zid> idk why people try to use it as a social media platform
<clever> klange: my problem is that i open imgur to upload one picture, and then an hour later discover i have 20 tabs open with random pictures from the front page, lol
<kazinsal> trying to please your average FOSS weirdo is like trying to stop a chlorine trifluoride fire
dormito has quit [Quit: WeeChat 3.1]
<clever> but that might just be a lack of self control :P
<klange> Nah, it's garbage that loves to redirect direct image links to a webpage, and then the ads they try to show don't even load
<klange> also they broke albums massively and I can't add anything to my multi-year history archive
<kazinsal> in my experience it's great for direct embedding and that's about it
doppler has quit [Read error: Connection reset by peer]
<kazinsal> it'll work fine for <img> tags etc. but anything else is a gamble
<zid> I've never seen it redirect an image to an album
<kazinsal> uuuuuusually it'll work fine for rich embeds on eg. discord
<zid> https://i.imgur.com/RR8ahQO.jpg That just.. gives me a picture
<clever> zid: i have sometimes seen the url from a <img> tag redirect to an html page, when i tried to zoom in
<klange> Discord is a better host as they're just throwing shit at a CDN with no funny business.
<clever> it seems to happen randomly, i havent found the cause yet
<zid> discord needs to fix their URL length
<clever> klange: i have had discord falsely flag images as porn, and refuse to host them
<kazinsal> yeah, for a while Discord was playing with hotlinking but then they stopped caring lol
doppler has joined #osdev
<[itchyjunk]> I am waiting for the gcc channel to help but curious if there is some easy fix for my problem :P https://bpa.st/XJ2A
<bslsk05> ​bpa.st: View paste XJ2A
<clever> [itchyjunk]: you need to use -ffree-standing and a few others, to omit libc and libgloss, and crt
<clever> standard baremetal kernel stuff, should all be in wiki.osdev.org
<[itchyjunk]> ah so it's not broken gcc , i just don't know how to use it
<clever> it is semi broken, in that it lacks a libc and libgloss
<clever> but thats very common with baremetal stuff
<clever> you often write your own anyways
<clever> libgloss is part of newlibc
<[itchyjunk]> ;_;
<clever> you can either try installing a risc-v newlibc, or you can just go without libc
gog has quit []
h4zel has joined #osdev
<zid> trying to learn a hell of a lot of things at once, I see
<zid> linux, gnu, binutils, programming, osdev, etc
<[itchyjunk]> Yes i am not well organized :(
<[itchyjunk]> Might take a break from this and go back to what i was previously trying to learn
<kazinsal> wind is picking up again. right in time for the yoshi-p livestream, god dammit my power better not go out
<geist> i know! actual weather
brettgilio has quit [Quit: The Lounge - https://thelounge.chat]
brettgilio has joined #osdev
AssKoala has joined #osdev
[itchyjunk] has quit [Quit: Leaving]
Elbeeo has joined #osdev
ahalaney has quit [Remote host closed the connection]
sts-q has quit [Ping timeout: 265 seconds]
AssKoala has quit [Ping timeout: 268 seconds]
h4zel has quit [Ping timeout: 252 seconds]
pretty_dumm_guy has quit [Quit: WeeChat 3.2.1]
chartreuse has quit [Ping timeout: 268 seconds]
chartreuse has joined #osdev
srjek has quit [Ping timeout: 260 seconds]
Elbeeo has quit [Ping timeout: 252 seconds]
diamondbond has joined #osdev
devcpu has quit [Quit: leaving]
h4zel has joined #osdev
h4zel has quit [Read error: Connection reset by peer]
Elbeeo has joined #osdev
Elbeeo is now known as AssKoala
diamondbond has quit [Ping timeout: 252 seconds]
diamondbond has joined #osdev
diamondbond has quit [Read error: Connection reset by peer]
mahmutov has joined #osdev
AssKoala has quit [Ping timeout: 265 seconds]
ElectronApps has joined #osdev
System123 has joined #osdev
pieguy128 has quit [Quit: ZNC 1.8.2 - https://znc.in]
System123 has quit [Ping timeout: 252 seconds]
pieguy128 has joined #osdev
ElectronApps has quit [Remote host closed the connection]
ElectronApps has joined #osdev
ElectronApps has quit [Remote host closed the connection]
ElectronApps has joined #osdev
ElectronApps has quit [Remote host closed the connection]
ElectronApps has joined #osdev
Belxjander has quit [Ping timeout: 252 seconds]
Burgundy has joined #osdev
<bslsk05> ​github.com: Release ToaruOS v1.99.6 · klange/toaruos · GitHub
<zid> neato
<mjg> klange: does toaruos come with observability tooling?
<mjg> e.g., a profiler or things a'la ebpf/dtrace/systemtap/whatever
<klange> it has `top` now, have fun :P
<zid> and soon, time, now you have infra? :p
<klange> I have a `time` and it does do something that _appears_ to be user/sys/real time.
<mjg> top is so 80's
<klange> mine has pretty meters inspired by htop
zaquest has quit [Quit: Leaving]
vdamewood has joined #osdev
vinleod has joined #osdev
vdamewood has quit [Ping timeout: 260 seconds]
vinleod is now known as vdamewood
chordtoll has quit [Ping timeout: 252 seconds]
zaquest has joined #osdev
transistor has quit [Ping timeout: 265 seconds]
cvsgeeksvn has joined #osdev
sprock has quit [Quit: brb]
sprock has joined #osdev
<cvsgeeksvn> And when you look at this issue, it's only some new thin glibc and couple of other things to be authored, there in real systems that means a little PIC i.e position independend code or COPY_REL i.e relocatable container code, just the linking is done in multiplexed memory, it can open as much as memory you can ever imagine, and work low-power and fast at the same time, no one wants to deal with me because of you freaks, the work on my side has been
<cvsgeeksvn> done for some time, though old friends of course are all on/at my side, and i still have more than enough to squash you lunatics, there is nearly no code involved to get to the needed or desired state in the world, and as said with some methods court can not do anything to avoid public domain implementations either, once again there are no laws to avoid anything like this. when container does encode something in memory, and you derive some source
<cvsgeeksvn> code of the presentation.
cvsgeeksvn has quit [Quit: Leaving]
elastic_dog has quit [Ping timeout: 268 seconds]
elastic_dog has joined #osdev
sprock has quit [Ping timeout: 252 seconds]
sprock has joined #osdev
jjuran has quit [Ping timeout: 265 seconds]
<klange> I miss when mard's rambling was actually something semi-coherent about graphics cards
<kazinsal> especially because at that point we could flag someone down before it hit the "bizarre death threats" phase
<kazinsal> now it all comes through in one unhinged abusive paste
<Mutabah> I assume he's no longer PMing abuse at the op who bans him?
devcpu has joined #osdev
<klange> I have the flag that stops PMs from unapproved sources, but I haven't gotten the "X is trying to message you" from him.
<kazinsal> I think now he mostly just PMs abuse to whoever alerts an op
<klange> I have had a few from SkyZ.
<kazinsal> klange: oh, neat, didn't know there was a flag for that. nickserv-based, I assume?
<klange> I don't actually know, but it's +g and it's called "caller-id".
<klange> There's also +G which does it for users you don't share channels with.
<kazinsal> aha, neat, thanks
<klange> +R is no unidentified (not-logged-in) users, similar to whatever the channel mode is
<klange> I am... +QZgiw. No forwards, TLS, caller-id, only shared channels in /WHOIS, and wallops subscriber.
<klange> libera wallops is mainly just advanced notice of planned server outages
Vercas5 has joined #osdev
Vercas has quit [Remote host closed the connection]
Vercas5 is now known as Vercas
jjuran has joined #osdev
rwb has quit [Ping timeout: 252 seconds]
rwb has joined #osdev
Vercas has quit [Remote host closed the connection]
Vercas has joined #osdev
dude12312414 has joined #osdev
<kingoffrance> eh, i think terry and mart excepted, its mostly smear. the thing is, its predicated on lone single crazy person. the alternative, is having to answer "why cannot one person, with exponential more ram/cpu/etc. than <insert date here>, create a reasonable kernel/whatever/else" it seems more of a protective/defensive mechanism
<kingoffrance> its a way to avoid having to answer "why are things so complex?". same thing happned in 80s with games, the "lone wolf coder" was obsolete
<kingoffrance> its a larger debate about waht "personal computer" means
<kingoffrance> and probably mostly offtopic
<dzwdz> are there any stb-style implementations of the c stdlib?
<dzwdz> stb-style as in contained in just a single header file
<klange> libc can't be implemented that way, for various silly reasons around requirements for how things are defined in the spec
<dzwdz> what if i don't want to be fully spec-compliant?
<klange> What do you actually want? A single header with everything, or a libc that is a single source file?
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
<dzwdz> well, i don't want literally the whole libc in a single file
<dzwdz> but i want to contain e.g. string.h in a single file, which also includes the implementation
<dzwdz> so if you want to use string functions in an embedded project you can just include that file, without messing around with linking
<klange> Note that generally stb_ stuff expects you to have a separate object file that includes it with the macro set to enable the definitions...
<dzwdz> i know
<dzwdz> that's what i want to do
<moon-child> but you could just say 'static void *strcpy(...'
<klange> ^ Having done this in the past for my bootloader and some other stuff, would not recommend.
<dzwdz> and how about the stb approach? do you think it's a good idea?
<dzwdz> or at least not a horrible one
<klange> Mod cap off for this. I'm not a fan of the stb approach to anything, really. I say this as someone who _also_ makes liberally-licensed, subpar, generally-single-file implementations of similar things, but in a different context.
<dzwdz> oh, why?
<klange> I'm all for new, built-from-the-ground-up implementations of common technologies, and I love doing it, but the whole stb project encourages baking in these libs that offer few actual benefits over mature counterparts. Being a few hundred kilobytes smaller isn't really a feature.
<kingoffrance> ^^^^ coming from the king of ugly hacks....it seems like trying to work around toolchain or language issue
<klange> And being a single file is a gimmick. It's actively worse for compilation than having separate sources built into separate objects.
<jjuran> What does "stb" expand to?
<dzwdz> i don't want a feature-packed, mature stdlib though - i just want to avoid implementing memcmp over and over again
<dzwdz> jjuran: the author's initials
<jjuran> thanks
aleamb has joined #osdev
<klange> Original author's initials, there are a few contributors, and they're actively developed... something their target delivery mechanism can't easily benefit from.
<moon-child> 'single file is a gimmick' indeed, this is the thing I like least about them. However I will say that they almost always have a sane api, which the mature counterpart may not
<moon-child> granted, mature counterpart may be more robust, and some of this may be reflected in the api
<klange> I think my real problem is that I see stb libs misused. From what I've seen, Sean's original aim was games, where your target market is probably Windows, and where you want to distribute a single bundled executable with no spurious dependencies.
<klange> When I see an stb lib end up, say, in an osdev project, I just think... why did you pick that instead of the 'gold standard' mainstream implementation? Is it a crutch? Are you trying to hide the fact that you are using a third-party implementation?
<kingoffrance> that makes a lot of sense.
<kingoffrance> and likewise, kernel maybe can argue "no spurious dependencies, but i want some of libc" .......for userland, why?
<kingoffrance> i see the "use case" there
jjuran has quit [Quit: Killing Colloquy first, before it kills me…]
<dzwdz> to avoid duplicating code? if you're using it in the kernel already, why use a different implementation in userland
jjuran has joined #osdev
<kingoffrance> i agree actually, just few ppl think like me on that
<kingoffrance> i think most ppl purposely want a hard split
<klange> some of my kernel stuff used to be symlinks to the userspace sources
<klange> My suggestion: If you want to grab off-the-shelf stuff for libc functions, go poach from musl - it's appropriately licensed and well organized for snatching individual bits.
<klange> It's probably the closest you'll get to the sort of single-purpose-all-inclusive style of an stb header.
<dzwdz> i've already done that for a project in the past
GeDaMo has joined #osdev
<dzwdz> but i still think it'd just be neat to have it be like the stb libs
Arthuria has joined #osdev
<kingoffrance> yeah, i dont disagree, i just think for c the answer is "implementation-defined" what i mean is: how do i layout my directory for a "library"? up to you. how about headers versus source files, where does code live, how many functions per file? up to you. etc. up to the build system (or lack thereof0 from what i see.
Vercas2 has joined #osdev
<kingoffrance> i am implying stuff beyond libc
<kingoffrance> has the same issues basically
<kingoffrance> the price we pay for not mandating a build system maybe
Vercas has quit [Ping timeout: 276 seconds]
Vercas2 is now known as Vercas
Arthuria has quit [Ping timeout: 268 seconds]
[itchyjunk] has joined #osdev
<kingoffrance> im very interested in such things, just i think the answer boils down to "choose/make some build system, try to make everything (whether code you write, or import) use it, then you can build anything x different ways"
<klange> I'm one of those weirdos still using `make` everywhere, and some of my Makefiles look like...
<klange> CFLAGS=-std=c11 -I. -g -Itoaru
<klange> esh: rline.o hashmap.o list.o
<klange> That's it. That's the whole file.
<kingoffrance> that sounds refreshingly simple actually
X-Scale` has joined #osdev
X-Scale has quit [Ping timeout: 252 seconds]
X-Scale` is now known as X-Scale
sm2n_ has joined #osdev
sm2n has quit [Ping timeout: 268 seconds]
gog has joined #osdev
X-Scale has quit [Ping timeout: 260 seconds]
X-Scale` has joined #osdev
isaacwoods has joined #osdev
X-Scale` is now known as X-Scale
mahmutov has quit [Ping timeout: 265 seconds]
AssKoala has joined #osdev
dutch has quit [Quit: WeeChat 3.2.1]
dutch has joined #osdev
srjek has joined #osdev
elastic_dog has quit [Ping timeout: 268 seconds]
elastic_dog has joined #osdev
mahmutov has joined #osdev
ElectronApps has quit [Remote host closed the connection]
AssKoala has quit [Ping timeout: 260 seconds]
srjek has quit [Quit: Leaving]
freakazoid343 has joined #osdev
AssKoala has joined #osdev
freakazoid333 has quit [Ping timeout: 268 seconds]
srjek has joined #osdev
[itchyjunk] has quit [Remote host closed the connection]
AssKoala has quit [Read error: Connection reset by peer]
AssKoala has joined #osdev
<Griwes> geist: I think I'll keep my first userspace process a flat binary, but I'll link it with symbol definitions extracted from the vdso, so that while it doesn't _contain_ the vdso, it just statically knows where everything is (and does a checksum, and does int3 or something if it detects a problem)
<Griwes> I think this also means I need to move it to a different directory, and I think figuring that out will take me a moment ;D
<Griwes> Thanks again for the conversation yesterday, it was quite insightful :)
<zid> glhf!
<ZetItUp> i may have over commented on my header file, well it sure explains alot :P
gareppa has joined #osdev
gareppa has quit [Remote host closed the connection]
Vercas has quit [Remote host closed the connection]
Vercas has joined #osdev
AssKoala has quit [Ping timeout: 252 seconds]
transistor has joined #osdev
YuutaW has quit [Ping timeout: 252 seconds]
<junon> I've considered using Make for most of my stuff tbh. I'm getting really tired of fighting with CMake all the time, or thinking "I wish I could set up this custom toolchain" only to have to write 100 lines of clever CMake crap just to get it to work.
<junon> (continuation of klange's messages above)
YuutaW has joined #osdev
wootehfoot has joined #osdev
AssKoala has joined #osdev
diamondbond has joined #osdev
diamondbond has quit [Client Quit]
Arthuria has joined #osdev
Arthuria has quit [Ping timeout: 252 seconds]
<geist> Griwes: sure thing! and yeah you dont *have* to make the vdso be a full ELF or whatnot. could arrange for it to have a flat table of entry points at the start or something
<geist> junon: i share klange's weirdoness re: make
<geist> though i tend to use gnu make syntax, but that's also pretty easy to find everywhere
[itchyjunk] has joined #osdev
[_] has joined #osdev
[_] has quit [Remote host closed the connection]
[itchyjunk] has quit [Remote host closed the connection]
[itchyjunk] has joined #osdev
GeDaMo has quit [Quit: Leaving.]
<Griwes> geist: yeah I know, but it's probably easier if it _is_ an elf, because then the loader can just treat it as any other shared object
<geist> yep, that's the idea
<Griwes> Hmm, how do fuchsia programs link with it to resolve symbols?
<geist> shared libs can directly link to it, etc
<Griwes> Do you have a stub library somewhere?
<geist> it's just naother shared lib
<geist> you mean how does the loader work?
<Griwes> Or just reuse the actual build artifact?
<Griwes> No, link time
<geist> oh, yeah it's just a .so
<geist> so usual link rules
<Griwes> So just reuse the build artifact?
<geist> yes
<geist> i guess that's what you mean there yes
<geist> ie. build vdso.so, compile time link with it like any other shared lib, runtime link with it like any other shared lib
<geist> only real tricky part is that at runtime linkage it has to be side loaded into the process prior to the process being able to use any syscalls to link more things
<Griwes> I'm thinking about having a stub instead, possibly one that hides some symbols
<Griwes> Though I may be over thinking it
<geist> since fuchsia does a fairly standard user space runtime linker
<Griwes> Yeah
<geist> if it had a fully outside-of-process runtime linker it would be nothing strange about it
<geist> but there's a bit of security there anyway: the vdso gets its mapping selected in the process randomly and exactly once
<Griwes> I think I'll be doing an outside of process loader
<geist> it's 'locked' in place. kinda the one hack in the VM to support the vdso. that particular VMO that backs the vdso is known to the kernel, so it senses when it's getting mapped and allows it to be mapped precisely once and cannot be fiddled with after the fact
<Griwes> But that can still have the kernel never produce an address space without the vdso mapped _somewhere_
<geist> correct
<geist> there's some upcoming work to allow the system to select from multiple vdsos
<geist> for various security situations, though mostly for v1, v2, v3 sort of syscall stuff
<geist> but it ends up being basically the same thing, most of the work ison the kernel side knowing which vdso is being used and behaving differently
<geist> all this aside i get that you're interested in this stuff but dont spend too much time on it up front
<geist> when getting started it's generally more important to make constant forward progress, you can always redo this later
<geist> though i'm sure you're aware of it
Arthuria has joined #osdev
freakazoid12345 has joined #osdev
freakazoid343 has quit [Ping timeout: 268 seconds]
Arthuria has quit [Remote host closed the connection]
mahmutov has quit [Ping timeout: 265 seconds]
mahmutov has joined #osdev
System123 has joined #osdev
mahmutov has quit [Ping timeout: 252 seconds]
Arthuria has joined #osdev
AssKoala has quit [Ping timeout: 268 seconds]
brettgilio has quit [Ping timeout: 252 seconds]
mahmutov has joined #osdev
h4zel has joined #osdev
h4zel has quit [Client Quit]
System123 has quit [Read error: Connection reset by peer]
System123 has joined #osdev
h4zel has joined #osdev
gog has quit []
terrorjack has quit [Remote host closed the connection]
h4zel has quit [Ping timeout: 252 seconds]
h4zel has joined #osdev
terrorjack has joined #osdev
System123 has quit [Remote host closed the connection]
h4zel has quit [Ping timeout: 268 seconds]
dutch has quit [Quit: WeeChat 3.2.1]
dutch has joined #osdev
h4zel has joined #osdev
h4zel has quit [Ping timeout: 260 seconds]
h4zel has joined #osdev
brettgilio has joined #osdev
mahmutov has quit [Ping timeout: 245 seconds]
gog has joined #osdev
h4zel has quit [Ping timeout: 265 seconds]
Arthuria has quit [Remote host closed the connection]
<Griwes> geist: oh yeah - but on the other hand I'm really bad at keeping track of todos, so I prefer to get a thing working to the point where all attempts to use beyond of what I have fail catastrophically (if this sentence makes enough sense ;D)
<Griwes> When things explode in my face with a disgruntled todo message, I know what to do; if they just mysteriously misbehave, I may just end up putting the project away for a while
<geist> oh 100%
<zid> Yea that's what ENO* is for
<geist> i also have found that having things catastrophically fail instead of limping along is a great idea
<zid> return -ENOPLSDONT;
<geist> also why i assert early and often
<Griwes> I've had that happen a while ago, and actually picking debugging up while away and camping turned out to be precisely the thing I needed
<Griwes> I've had mysterious things happening to my functions, turns out I wasn't explicit enough to the compiler while changing the stack in the middle of a function ;D
<clever> 8 double frexp(double x, int *exp) {
<clever> 9 panic("TODO\n");
<clever> ive been using this in some of my unfinished code
<geist> Griwes: generally rule: never ever modify the stack in the middle of a C function
<geist> unless you dont intend to continue, or it's something like setjmp, in which case you should also reconsider
<clever> i just finished implementing setjmp in asm
<Griwes> geist: if you were to look at my c++ stdlib headers, you'd see this in action - I copy synopses from the standard, then comment out everything, and fill in enough for a use site to compile
<clever> my biggest mistake, was not saving/restoring the registers that are preserved thru function calls
<geist> yes, setjmp is one of those 'oh god why is this code doing this?' sort of things
<clever> geist: lua uses setjmp/longjmp or c++ exceptions, for its error handling
<Griwes> Oh yeah, I thought that giving it enough of space above the stack pointers would be enough, turns out it wasn't
<geist> indeed. also one of those reason to perhaps reconsider using lua
<clever> would you rather micropython? lol
<Griwes> I just went ahead and created a new stack frame for the rest of the function with an iife
<clever> that also uses setjmp, but i dont know its internals as well
<Griwes> Funny thing is, function calls worked fine because the lower stack frames were being set up from scratch, just trying to use the stack at the top frame was fucked (even without accessing earlier variables)
<Griwes> I really should've known better, but oh well
<Griwes> Previously I've always set the stack up before going to C(++), this time I tried to be clever ;>
<clever> yeah, i also always setup the stack and clear bss before i enter c
<clever> but ive heard that cortex-m is weird, and lets you skip the stack setup, by design
<Griwes> Anyway once I've forced a new stack frame, everything turned out to be fine
<clever> the reset vector in cortex-m is both an initial stackpointer and initial pc
<Griwes> The only pre-c environment I have right now is the AP trampoline
<Griwes> Otherwise it all starts in c++ in an uefi loader and every context transfer (until a jump to userspace) is just a function call
<Griwes> It feels better than random asm hacks I've done before
<clever> youve got things easy :P
<Griwes> Tho I'm sure once I start porting, things will get funny
<clever> i have 4 context transfers i'm bordering, and the stack gets re-made in asm at every one of them
<clever> rom -> bootcode.bin -> lk.elf -> arm.bin -> zImage
<kazinsal> int setjmp(jmp_buf env) { panic("no don't do this what the hell"); }
<Griwes> I just let the kernel reuse the loader stack until such a moment where everything else is set up and I can unmap the lower half
<Griwes> And that'll be the protocol on other arches too
<Griwes> I'm really tempted to obtain one of those riscv atx-or-what-it-was boards, and it's taking a lot of willpower to wait with that until I'm actually starting a riscv port
Burgundy has quit [Ping timeout: 260 seconds]
System123 has joined #osdev
Arthuria has joined #osdev
System123 has quit [Ping timeout: 252 seconds]