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
bxh7 has quit [Ping timeout: 250 seconds]
sdfgsdfg has quit [Quit: ayo yoyo ayo yoyo hololo, hololo.]
vdamewood has quit [Read error: Connection reset by peer]
vdamewood has joined #osdev
sdfgsdfg has joined #osdev
Burgundy has quit [Ping timeout: 240 seconds]
<sonny> I guess your ports system metadata is regular?
<sortie> Well release version numbers can be parsed with regular expression :)
<sonny> that's good
<sonny> (I'm not sure what makes this complex)
<sortie> Variance, really :)
<sortie> ^ Consider e.g. this upgrade. The new version is 2.4.3 but it's published through a github tag that-s R_2_4_3.
<sortie> That means I need to parse the version number and then using a template construct the download URL
<bslsk05> ​github.com: Page not found · GitHub · GitHub
<sonny> oof
<sortie> None of this is advanced computer science, the complexity lies in many different upstreams organizing their releases weirdly and varied, so the difficulty lies in managing this variance and reducing it to something expressible in a simple manner
<sortie> https://www.python.org/ftp/python/3.11.0/ ← Python is another case. If my script scraped https://www.python.org/ftp/python/ for the latest release, it would see 3.11.0 is released, but the directory only contains alpha releases and it's not released yet
<bslsk05> ​www.python.org: Index of /ftp/python/3.11.0/
<bslsk05> ​www.python.org: Index of /ftp/python/
<sortie> UPSTREAM_VERSION_PAGE="https://www.python.org/downloads/source/" ← Instead I define that the script should scrape the official website to find the actually published versions
<bslsk05> ​www.python.org: Python Source Releases | Python.org
<sonny> I can't think of a solution other than hoping these all use git and having the ability to be able to build from a tag, but that's a lot more work even if it's easier to automate
<sortie> Unfortunately then you run into a lot of stuff using e.g. autoconf where ./configure needs to be generated with the right autoconf version, and you want the upstream to do it for you
<sonny> grrr
<sortie> Plus, well, lots of stuff doesn't actually use git..
<sonny> yeah, that too
<sortie> So there's a few weird cases like this and I'm sure I'll run into more in the future. The good news is that in most cases, the tarball has a neat systematic name in a single directory with directory listings on, so it can be easily scraped by default.
<sonny> ok, that's good to know. It seemed like it would be more chaotic
<sortie> So MOST ports really just need to define the upstream site and the name of the tarball, and my script can figure out the rest
<sortie> E.g. https://ftp.gnu.org/gnu/ is a pretty wonderful place in most cases where it's organized and is super easy to scrape
<bslsk05> ​ftp.gnu.org: Index of /gnu
<sortie> (the contents of those tarballs may leave something to be desired but at least they're pretty well organized)
<sortie> sonny, yeah so I have 67+ ports, so I run into LOTS AND LOTS of weird stuff where the upstream deviate from the norms and fuck up in all sorts of ways. It requires a whole lot of good design work and happily patching workarounds for problems, but I'm very proud I managed to WIN and get these kittens herded
<sonny> good work
<sortie> E.g. I can 1) cross-compile all of those ports (totally does NOT work out of the box, took a lot of patching and investment 2) compile all of those ports natively on my OS.
<sonny> interesting so, this forms a test for posix compliance?
<sonny> or is it just software you needed?
<sortie> It more is a test for meeting the de-facto Unix spirit
<sonny> I see
<sortie> Definitely I need to do POSIX properly enough, but it also tests a lot of those assumptions baked into things that aren't part of POSIX
<sonny> I keep wondering what a posix subsystem would be like, I can only see something that is very system specific
<sonny> ah, in that case you report a bug?
<sortie> Well if I don't implement POSIX properly I do have to fix my bug, or add my own little patch temporarily working around the problem
<sortie> If the upstream software assumes something non-POSIX such as the filesystem layout or whatever extensions, I either have to provide that extension, or if I don't like it, try to remove that bad assumption
<nomagno> POSIX should probably at the very least guarantee /bin/sh existing.
<sortie> E.g. you might see programs including <poll.h> which is non-standard and the standard POSIX header is <sys/poll.h>. Or things including <sys/param.h> for no reason as it's not standardized to contain anything in particular and rarely anything from it is actually needed, so I don't have that header, but so much uses it.
<sortie> nomagno, that is literally one of the very FEW paths POSIX requires to work, along with /dev/tty
<nomagno> Does it?
<nomagno> I read up on it not that long ago and found POSIX expliticly says there's no way to run a script portably without modifying the shebang during installation
wgrant has quit [Ping timeout: 256 seconds]
<nomagno> Might be misremembering
<sortie> I could've sworm but I don't spot it right now
<sortie> I'll check in the morning when I'm clear in the head :)
<sonny> I'm surely going to ignore posix
gog has quit [Quit: byee]
<sortie> I have a design principle that my OS is *just itself*. It must not try to fight who it is. I either embrace an aspect into my OS or I actively fight it.
<sortie> E.g. that means the kernel lives in kernel/, libc in libc/, init is init/init.c.
<sortie> It's not branded names. These things are just themselves in the trust form. It's just ls.c.
<sortie> Likewise with system calls, in libc they are just plain wrappers that directly and immediately unconditionally call the actual system call with the very same function signature.
<sonny> don't you want to be independent of your source layout?
<sortie> There's no ‘POSIX subsystem’ because that'd violate the principle of embracing what it is.
<sortie> If I had some other better native API, that should be used instead to embrace what the system is
<zid> I think your system calls doing the same thing your 'OS' does makes sense
<klys> libc is somewhat less a cohesive category than if one were to categorize its functionality. app/ls.c
<zid> linux and posix try, at least
<nomagno> I get this is osdev, but I just get dizzy thinking how much work it is to code up an OS that starts to be usable.
<zid> but I'm not certain how well it pulls it off, certain things are definitely 1:1, some aren't
<sonny> define usable ;)
<nomagno> I suffer from quite a bit of analysis paralysis...
<sortie> E.g. my libc only supports my kernel, and the versions need to match ABI versions. There's no #ifdef Linux. The libc and kernel are built to work together. It's simple and things can be relied on because it's not portable to other systems.
<klys> what's next a libpy/
<sortie> I do have a python3 port :D
<zid> Only thing I'd worry about is overspecialization, lest you end up with .NET inside your kernel :P
<sortie> nomagno, I use my OS to run an irc channel where people are only allowed to say ‘:D’ or they are auto kicked
<sortie> The rest of it is just a tech loop for that purpose
<sortie> https://xkcd.com/1579/ ← osdev
<bslsk05> ​xkcd - Tech Loops
<nomagno> HM... Have you punished it anywhere?
gorgonical has quit [Ping timeout: 240 seconds]
<sortie> Punished?
<nomagno> Punished*
<nomagno> errr, published
<sortie> Ah yeah https://sortix.org/
<bslsk05> ​sortix.org: The Sortix Operating System
<sortie> It also runs its own website
<klys> app/ls-l--color.c ; dat/ls-b.c
<sortie> nomagno, I like to think I've actually reached the point where my OS can be useful because I have networking (in a WIP branch I'm finishing up) and I make it easy to spin up a VM running a server
<sortie> In practice, your OS being a daily driver for you and the people is really difficult and hard to be useful
<sortie> My current bet is on being being easy to deploy my OS to the cloud and being a fun development platform that's really hackable
<kazinsal> yeah you really need to have a super specific goal in mind in order to get anywhere near developing an OS that's "useful"
<sortie> Because these properties means people can actually set up some online services running on my OS (even made people run a few bots on there)
<nomagno> My current project definitely doesn't know what/who it is.
<sortie> That's OK :) osdev can be a journey of self-discovery
<klys> useful software is a journey or a destination?
<nomagno> I know it's a racing game. I know the racing game is portable enough it'll eventually be fit to be its own operating system, as well as a userspace program
<sortie> Yeah klys makes an EXCELLENT POINT: You don't need to be osdev.
<sortie> *to be useful
<sortie> osdev can be all about the journey if you'd like.
<sonny> I need a language for osdev first
<klys> that kind of sounded like me
<sonny> I think better in terms of environments
<sortie> Right now I'm enjoying the journey but I'd like to be useful, defined as people trying out my OS and setting up some random services to run on it
<klys> so I started hacking together a simple parser for rpn -> asm
<sonny> nice
<nomagno> How would I organize a codebase that is horrible unfit to be performant but works on a toaster, into progressively less portable but more performant ports?
<nomagno> In such a way it's not a mess to navigate, I mean.
<sortie> nomagno, gradually?
<zid> rewrite it nicely
<nomagno> Well yeah, but the rewrites won't replace the portable version
<zid> I generally go for what I would consider the ideal (in the platonic sense), by thinking about what it *would* look like if it were nice
EtherNet has quit [Quit: WeeChat 3.5-dev]
<sortie> Completely overhauling something or rewriting usually means you end up in a state where you have something that doesn't work or you can't release
<zid> "I'd just have some file that has a couple of calls out of it and there's a few small files that implement those things in a different way for each platform" or whatever
* sonny actually likes rewrites
<sortie> It's generally the better option to evolve in the right direction in chunks where everything works at the same time
<zid> local maxima/minima are a thing though
<sortie> Rewrites are fine. You just don't want a situation where the old thing is competing against the new thing.
<zid> sometimes it's just outright better to rewrite it, but that complexity also scales with how nicely it was written in the first place
<zid> If it was shit to begin with, rewriting it will feel shitty and hard
<zid> if it was nice to begin with, rewriting it will be nice
<nomagno> My project is already structured what I'd call nicely. Issue is I'm unsure how to organize different implementations of interfaces
<sortie> nomagno, my OS began back in 2011 and honestly it was a mess for a while, and it's been a long evolution to become well organized
<zid> nomagno: arch/blah implements a common API, typically
<sortie> With time, I came to see the principles guiding my OS and doubled down on them
<zid> and you just link against the correct implementation, and that spits out the code specialized for that arch
<nomagno> My project is lowkey overspecified already and the bulk of the code is yet to be written
<kingoffrance> go on :)
<sortie> Well it was fun talking to some new people in here I haven't said much hello to before :)
<zid> so there is no "sound.c" with a thousand sound hardware implementations, there's "sound.c" which routes calls to a *specific* arch/blah.o depending on what it links to
<kingoffrance> explain :) "overspecified" :)
<sonny> klys: this file is rather spartan, what does sis() do?
<sortie> It's 2 AM and STORMING. That's right. It's a dark and stormy night. And I'm off to bed :)
<sonny> cya
* sortie . o O (the inverse of the bro function)
<klys> sonny, main loop
<nomagno> kingoffrance: The project derives from the desire to specify something in the first place, so essentially the bulk of its merit is in interfaces being crystal clear and clean
<nomagno> Just as data structures
<nomagno> This also results in writing code not being the most time-consuming task
skipwich has quit [Ping timeout: 268 seconds]
<klys> sonny, the loop in sis() does some lexing
<nomagno> I'm stuck in an almost-over analysis paralysis period, but I'm unsure I can keep tackling the rest from this bottom-up approach
gog has joined #osdev
<kingoffrance> i guess i feel similar, but i never have a "what to do next?" issue. there are infinite things to do, and many skeletons with no implementation, etc.
<klys> if it finds whitespace it skips that, if it finds a valid token (any token which has been duly processed) it runs push( token );
<kingoffrance> but i dont regret overdesign, slowly is forming
<zid> nomagno: I didn't hear what your actual thing is, do you have a brief description?
<zid> or a long one I guess :p
<sonny> klys: more than 3 letters are allowed! `enum { NIL, NUM, LTR, OPS, QUO, ETC, SPC, REG, PRN, PRM, BKT, IDX, CLN };`
skipwich has joined #osdev
<zid> nope, ask my assembler
PyR3X_ is now known as PyR3X
<sonny> this isn't an assembler :P
<sonny> just lexical elements
* kingoffrance jedi handwaves, there is no assembler spoon
<zid> Nope it's literally not possible, my assembler is extant, therefore nothing else is possible
<zid> qed
<zid> tla
<klys> nil, number, letter, operator, quote, everything else, space, register name, open paren, close paren, open bracket, close bracket, colon
<sonny> klys: are you content with just rpn?
<klys> sonny, to a point, mostly
<sonny> hardcore
<sonny> I think my goal was just a uniform way to get concurrency
<klys> uniform among assemblers?
<kingoffrance> what languages are you targetting nomagno ?
<sonny> klys: no, for my OS implementation
<klys> so, you have a portable os idea, and what's the difference for uniformity?
<sonny> no, my ideas are not very portable
<klys> so, you mentioned uniformity, is that a goal?
<sonny> I want the representation to be consistent
<sonny> yeah
<klys> the uniform representation of concurrency, except what's the background?
<klys> architectures?
<sonny> there is none, that language will provide concurrency primitives, which in turn builds the OS
<klys> ah, so you could proceed to make a meta thing all you need is a parser that suits you
<sonny> yeah
<sonny> seeing the smalltalk demo from back in the day is mind blowing, I think an OS can be that easy :-)
epony has quit [Ping timeout: 240 seconds]
wgrant has joined #osdev
sonny has quit [Remote host closed the connection]
Oli has quit [Ping timeout: 240 seconds]
dequbed has joined #osdev
ElectronApps has joined #osdev
skipwich has quit [Ping timeout: 240 seconds]
epony has joined #osdev
<klange> hm, two different compilation units are calculating different addresses for a thread-local... there's only one actual relocation for it, and they are off by 0x10... https://gist.github.com/klange/f30a8f46cc340801e62c446c922d778d
<bslsk05> ​gist.github.com: gist:f30a8f46cc340801e62c446c922d778d · GitHub
<klange> The second of the two is the one I believe to be correct based on where I've placed the TLS data and the offset ld.so is assigning (0x10)
<klange> oh I think I need to add a symbol value first...
<klange> oh because it's an exported static
<klange> static-tls
freakazoid343 has quit [Quit: Leaving]
ZombieChicken has quit [Ping timeout: 276 seconds]
pieguy128 has quit [Ping timeout: 240 seconds]
nyah has quit [Ping timeout: 260 seconds]
vdamewood has quit [Read error: Connection reset by peer]
pieguy128 has joined #osdev
vdamewood has joined #osdev
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #osdev
nopenope[m] has quit [K-Lined]
paulusASol has quit [K-Lined]
Irvise_ has quit [K-Lined]
nomagno has quit [K-Lined]
junon has quit [K-Lined]
heat has quit [Ping timeout: 250 seconds]
togooroo has joined #osdev
<klange> https://klange.dev/s/Screenshot%20from%202022-01-30%2013-10-54.png threads are still broken, but kuroko (which at least uses thread-locals) works, and more things are launching now
sonny has joined #osdev
ravan has quit [Ping timeout: 240 seconds]
sonny has left #osdev [#osdev]
* moon-child wonders how klange is getting on with only 0MiB of ram
srjek has quit [Ping timeout: 240 seconds]
<zid> It's just running out of rom and has its stack in sram, which is close but doesn't count as ram
<klange> I haven't done RAM discovery, the function that exposes total RAM to userspace is stubbed, and I should probably do that stuff next.
<clever> for a moment, you had me thinking about how much i could do from just rom and the L2 cache-as-ram, lol
<zid> I mean, basically everything
<clever> but then i remembered, the rom is true rom, so the 128kb L2 is all i got
<clever> not even a 640x480xRGBA8888 framebuffer would fit there!
<zid> shove that in device memory?
<zid> external vram
<clever> zid: the 2d scanout engine of the rpi cant read memory over a non-standard interface, so my only option to expand is the proper ddr dram controller, which i lack drivers for on some models
<zid> plug in a voodoo 2
<clever> i was more thinking, how much can i do if i turn off the dram
<zid> You'll just need devices that don't need dma
<zid> and everything should *work* at least
<clever> hmmmm, could i drive an isa bus? .....
<clever> with some level shifters, maybe!
Irvise_ has joined #osdev
paulusASol has joined #osdev
nopenope[m] has joined #osdev
junon has joined #osdev
gog has quit [Quit: byee]
the_lanetly_052_ has joined #osdev
Irvise_ has quit [Quit: Client limit exceeded: 20000]
nopenope[m] has quit [Quit: Client limit exceeded: 20000]
paulusASol has quit [Quit: Client limit exceeded: 20000]
Brnocrist has quit [Ping timeout: 240 seconds]
Brnocrist has joined #osdev
freakazoid333 has joined #osdev
mahmutov has quit [Ping timeout: 256 seconds]
zaquest has quit [Remote host closed the connection]
zaquest has joined #osdev
lleo has joined #osdev
lleo has quit [Quit: institute budget]
g1n has quit [Read error: Connection reset by peer]
GeDaMo has joined #osdev
Burgundy has joined #osdev
mahmutov has joined #osdev
mahmutov has quit [Ping timeout: 256 seconds]
g1n has joined #osdev
<g1n> hello
Irvise_ has joined #osdev
paulusASol has joined #osdev
nopenope[m] has joined #osdev
biblio has joined #osdev
<GeDaMo> Hi g1n :)
<g1n> whats up GeDaMo?
<GeDaMo> Hmmm ... not much, you?
<g1n> just woke up, going to continue orion rewrite :)
<g1n> currently on global constructors stage
<klange> geist: have you spun up anything graphical in hvf on an m1 yet?
<geist> negative
<klange> After much work I got things to boot and run under it, but my framebuffer is super slow
<geist> might try an ubuntu install or something though
<geist> ah interesting
<geist> how are you mapping the framebuffer?
<geist> this may be a case of actual hardware actually honoring caching parameters and whatnot that are complicated to set up in the page tables on arm
<geist> since presumably you haven't tested on qemu-kvm?
<klange> I've tried all sorts of caching and noncaching configs to no avail, but for all I know they're trapping every write or something
biblio has quit [Ping timeout: 260 seconds]
<geist> true, though possibly just didn't get it right. how are you setting up the page tables? specifically the MAIR and how you're using those indexes in the page tables
<klange> I know I'm setting and referencing MAIRs correctly because I had to set normal memory for exclusive loads to not trap on this hardware.
<geist> kk. and you're mapping the framebuffer as normal memory i guess
<klange> And I've tried every combination of caching options for the framebuffer with no effect; showed a video to marcan and he thinks it's totally trapping
ephemer0l has joined #osdev
<geist> yeah kinda curious now. i should try installing ubuntu or whatnot on it
togooroo has quit [Remote host closed the connection]
C-Man has quit [Ping timeout: 256 seconds]
elastic_dog has quit [Ping timeout: 250 seconds]
elastic_dog has joined #osdev
fwg has quit [Ping timeout: 250 seconds]
fwg has joined #osdev
fwg has quit [Quit: .oO( zzZzZzz ...]
mahmutov has joined #osdev
fwg has joined #osdev
<klange> with apologies for this being a screencap of a poor quality video capture of an rpi400, I have things working in KVM (I had to tweak a few things) there and the framebuffer is not slow: https://klange.dev/s/Screenshot%20from%202022-01-30%2020-15-05.png
mahmutov_ has joined #osdev
mahmutov has quit [Ping timeout: 250 seconds]
heat has joined #osdev
<heat> klange, really impressive, how much time did it take to get the arm64 port up to that point?
sdfgsdfg has quit [Quit: ayo yoyo ayo yoyo hololo, hololo.]
<heat> geist: does riscv specify how mappings go into the TLB? like huge 512GB ones for example
<geist> no
<heat> i want to get the big kernel mapping going but I don't see any info on caching and TLB stuff
<geist> AFAICT there's no spec at all about how the TLB works
<heat> hmm
<heat> so a big 512GB mapping will just work magically eh?
<heat> i know x86 has issues with that
<geist> but it shouldn't matter that much *except* when tlb flushing. it'd be nice if it specced how you flush with regards to TLB fixes
<geist> x86 has issues in the sense that it's not implemented (unless it is in 5 level paging)
<heat> well if a 512GB mapping takes up all my TLB it's bound to matter ;)
<heat> but yeah, great
<geist> but yeah iirc riscv 512GB pages work fine. how the cpu slices that up into smaller TLBs or whatnot is an implementation detail
<geist> side note: info mem and/or info tlb works in qemu on riscv
<heat> oh i noticed
<heat> it's a godsend
<heat> is aarch64 still lacking info mem/tlb?
<geist> yeah, and now that klange has seen how complicated the arm mmu is it's probalby pretty clear why
<geist> i've thought of multiple ties sitting down and trying to write at least a first level approximation for it
<heat> well wouldn't you just need to traverse the page tables, normally?
<heat> or is that just Not A Thing(tm)
<geist> i actually rolled one teensy trivial patch into qemu last year, some formatting in the `info registers` on riscv
<geist> so now i kinda know it
<geist> know how to pus changes in that is
<geist> re: page table traversal, yeah
<geist> but... arm page tables have a *ton* of options so it'd take a fairly complex amount of code to handle them
<geist> based on what EL you're in, two sets of page tables at the same time, each of which have different options, different page sizes, etc
<geist> it's just a lot more complicated than x86 or riscv
<geist> even just displaying cache paramters via indirects through the MAIR register would be hard
<heat> how are you supposed to debug mmu issues then? lol
<klange> trial and error it seems :)
<heat> info mem was nice because I could see whether or not things were getting mapped
<geist> yah same way you always did: trial and error and get it right :)
<geist> biut yeah info mem is nice
heat_ has joined #osdev
<geist> heat_: are you having connection problems?
<heat_> yup
<heat_> this router is crap I tell you :)
heat has quit [Ping timeout: 245 seconds]
heat_ is now known as heat
<geist> i neve rhave figured it out but my mac laptop gets a lot of connection changed out fro underneath you errors
<geist> i forget the precise error, will have to wait until i see it again but i'll happen when i'm refreshing a page
<heat> I've noticed sometimes the router stops replying to ARP requests (and NDP requests) so my linux (linux + android) devices lose connection
<heat> both ethernet and wireless
<heat> it's annoying
<heat> doesn't happen on windows though
mavhq has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
mavhq has joined #osdev
C-Man has joined #osdev
sdfgsdfg has joined #osdev
sdfgsdfg has quit [Quit: ayo yoyo ayo yoyo hololo, hololo.]
<klange> The doc page for the 'virt' machine makes a claim that virtio-gpu-pci is the only display device that works "correctly" with KVM; bochs one seems to work fine in actual KVM, but maybe that's a hint that it is missing something critical to memory access performance in other accel backends
eryjus has quit [Remote host closed the connection]
heat has quit [Ping timeout: 245 seconds]
<klange> i pushed the branch
g1n has quit [Read error: Connection reset by peer]
mahmutov has joined #osdev
mahmutov_ has quit [Ping timeout: 250 seconds]
gog has joined #osdev
fwg has quit [Quit: .oO( zzZzZzz ...]
nyah has joined #osdev
dennis95 has joined #osdev
fwg has joined #osdev
g1n has joined #osdev
dennis95_ has joined #osdev
dennis95 has quit [Ping timeout: 256 seconds]
srjek has joined #osdev
gorgonical has joined #osdev
gorgonical has quit [Ping timeout: 252 seconds]
jjuran has quit [Quit: Killing Colloquy first, before it kills me…]
jjuran has joined #osdev
eryjus has joined #osdev
EtherNet_ has joined #osdev
EtherNet_ has quit [Client Quit]
immibis has quit [Ping timeout: 240 seconds]
EtherNet has joined #osdev
MiningMarsh has quit [Quit: ZNC 1.8.2 - https://znc.in]
MiningMarsh has joined #osdev
ElectronApps has quit [Remote host closed the connection]
heat has joined #osdev
dude12312414 has joined #osdev
puck has quit [Excess Flood]
puck has joined #osdev
the_lanetly_052 has joined #osdev
the_lanetly_052_ has quit [Ping timeout: 256 seconds]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
heat has quit [Ping timeout: 250 seconds]
htsnk has joined #osdev
<htsnk> hello everyone!
<GeDaMo> Hi htsnk :)
<gog> hi
<htsnk> I'm new to osdev and there's something I'm wondering about the terminal_putchar() function inside the tty.c file of the Meaty Skeleton
<htsnk> Hi GeDaMo and gog :)
<vdamewood> Slurp!
<htsnk> why is it that we need to convert the char c to an unsigned char uc?
<htsnk> Hello!
<gog> mostly to avoid the compiler complaining about signedness
<gog> because iirc the text buffer is declared as an unsigned char[]
<gog> or unsigned short[]
<htsnk> I see
<htsnk> I thought it had something to do with the fact that the ASCII table doesn't use negative numbers or something lol
<gog> it's also posssible that weird arithmetic things might happen when doing bitwise operations on it
<vdamewood> Actually, every valid ascii value is the same with signed or unsigned chars.
<htsnk> is that because ascii doesn't exceed the 7 bits limit?
<vdamewood> Yep, and char's are required to have at least 8 bits.
<htsnk> Thanks for the clarification! :)
dude12312414 has joined #osdev
<vdamewood> And yeah, if you shift right a signed value, You get extra 1's.
<vdamewood> 1000 0000 >>1 is 1100 0000 signed, but 0100 0000 unsigned.
<vdamewood> and bare char's could be either signed or unsigned depending on the compiler and system.
<htsnk> interesting
skipwich has joined #osdev
* vdamewood gives gog a fishy
* gog chomps
<sham1> That's rather fishy
<htsnk> indeed
<gog> fishy is subjective
[itchyjunk] has joined #osdev
<vdamewood> fishy is delicious
<gog> some smoked salmon on a bagel would slap
* g1n complited meaty skeleton
* vdamewood compiles fishy skeleton
<g1n> i have taken some parts that i needed (libk) from my libc implementation, so it is not very same
Vercas has quit [Remote host closed the connection]
Vercas has joined #osdev
Vercas has quit [Client Quit]
Vercas has joined #osdev
Vercas has quit [Client Quit]
Vercas has joined #osdev
heat has joined #osdev
<heat> g1n, i recommend you ditch the libk concept from the meaty skeleton
<heat> i don't like it, it splits your kernel's build system into two and just makes your life more difficult in general
heat has quit [Remote host closed the connection]
kspalaiologos has joined #osdev
htsnk has quit [Ping timeout: 252 seconds]
<g1n> oh they exited
<g1n> i meant i am not following meaty skeleton fully, i just used it as roadmap
<g1n> for now i make whole build system in one makefile
the_lanetly_052 has quit [Ping timeout: 256 seconds]
mahmutov_ has joined #osdev
mahmutov has quit [Ping timeout: 256 seconds]
pretty_dumm_guy has joined #osdev
biblio has joined #osdev
biblio has quit [Client Quit]
_xor has quit [Read error: Connection reset by peer]
_xor has joined #osdev
troseman has joined #osdev
junon has quit [Quit: Bridge terminating on SIGTERM]
nopenope[m] has quit [Quit: Bridge terminating on SIGTERM]
paulusASol has quit [Quit: Bridge terminating on SIGTERM]
Irvise_ has quit [Quit: Bridge terminating on SIGTERM]
Irvise_ has joined #osdev
paulusASol has joined #osdev
nopenope[m] has joined #osdev
junon has joined #osdev
[_] has joined #osdev
[itchyjunk] has quit [Ping timeout: 250 seconds]
kspalaiologos has quit [Quit: Leaving]
Irvise_ has quit [Quit: Client limit exceeded: 20000]
Raito_Bezarius has quit [Quit: free()]
nopenope[m] has quit [Quit: Client limit exceeded: 20000]
nomagno has joined #osdev
<nomagno> ski: I got logged out, sorry. It's a racing game, I think I did mention it
<nomagno> the way I'm focusing it it's probably going to be its own OS, but that's just one way of running it
<nomagno> Hopefully it doesn't expand to be able to send mail :ap
Raito_Bezarius has joined #osdev
tomaw_ has joined #osdev
Raito_Bezarius has quit [Quit: free()]
tomaw is now known as Guest256
Guest256 has quit [Killed (tungsten.libera.chat (Nickname regained by services))]
tomaw_ is now known as tomaw
sdfgsdfg has joined #osdev
[_] has quit [Ping timeout: 250 seconds]
<geist> yawn. good morning everyone!
Irvise_ has joined #osdev
nopenope[m] has joined #osdev
[itchyjunk] has joined #osdev
<GeDaMo> It's Sunday evening here :|
<Griwes> just spent an hour debugging what turned out to be an operator precedence bug :|
<gog> geist says morning but means "afternoon"
<jimbzy> gog, Metric time :p
<gog> haha yes
<geist> well this is true, but i didn't expect anyone to actually look up my time zone
<gog> i just remember you're GMT-8 :p
<asymptotically> Griwes: mesa also had a recent operator precedence bug by not putting macro args in parens: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14148/diffs
<bslsk05> ​gitlab.freedesktop.org: turnip: Fix operator precedence in address calculation macros for queries (!14148) · Merge requests · Mesa / mesa · GitLab
g1n has quit [Read error: Connection reset by peer]
<Griwes> mine was more embarrassing, no macros in sight
<zid> I'm surprised I don't write more of them, my memory of the actual precedence is weak
<zid> I guess I just managed to judge precisely *how* much I don't know correctly and put the right amount of defensive () in :P
<GeDaMo> I always add more parentheses in :|
<GeDaMo> Or I use Forth :P
<geist> same. but parenthesis around arguments in macros are a requirement
<zid> I think the only thing I actively like, have to 'remember' relative to just going on instinct is right side of shifts, and (*a)->b
<geist> also ternarys will mess you up because they're always lower precedence than you think
Raito_Bezarius has joined #osdev
Raito_Bezarius has quit [Max SendQ exceeded]
Raito_Bezarius has joined #osdev
GeDaMo has quit [Remote host closed the connection]
[itchyjunk] has quit [Remote host closed the connection]
sdfgsdfg has quit [Quit: ayo yoyo ayo yoyo hololo, hololo.]
sdfgsdfg has joined #osdev
sdfgsdfg has quit [Client Quit]
dennis95_ has quit [Quit: Leaving]
sdfgsdfg has joined #osdev
sdfgsdfg has quit [Quit: ayo yoyo ayo yoyo hololo, hololo.]
<geist> klange: doing an install of ubuntu server on a qemu-hvf image on m1 now. thus far screen seems fine
<geist> but it's doing text mode and i'm currently using virtio-gpu
<geist> will switch to bochs-display once it gets installed
<geist> also i really can't find the desktop installers like i remember in the past. i wonder what happened to them
<klange> I did take a quick look and virtio-gpu is doing its video memory completely differently than how the bochs-display backend does it
<geist> exactly
<geist> you send commands to blit explicitly
<klange> and it's regular system memory while the bochs display has to be behind PCI
<geist> right
<geist> like i said, i know it's different, but i'm doing the isntall now and i know the UEFI stuff likes virtio-gpu
<geist> but i dont think it initializes bochs-display, so i'm using what works for the installer
<geist> yap, with bochs-display it's mega slow
<geist> and seems to have lots of corruption
<geist> (doing a ls -lR on the console)
<geist> looks like it has cache flushing issues even (or lack of memory barriers)
<klange> thanks for helping to check, guess it's time for a virtio-gpu driver :)
<geist> what are you using for input/output?
<geist> i have virtio-input here but didn't know if you had virtio support for that stuff
<klange> Nothing yet. I was thinking about just going in on USB now...
<geist> yah or xhci yeah
<geist> i'd invest a bit in virtio. once you get the basic stuff working you can then have net/block/input/etc mostly for 'free'
<geist> gpu is not too bad, in the simple mode you just set up a scanout buffer and then the main difference between that and a standard framebuffer is you have to explicitly kick it to blit the output
<geist> but you can just set up a 60hz timer that kicks it if you want
<geist> fwiw this is the command line i'm using to drive this:
<bslsk05> ​IRCCloud pastebin | Raw link: https://irccloud.com/pastebin/raw/vTSlD56u
mahmutov_ has quit [Ping timeout: 250 seconds]
<geist> the commented out .iso image was what i used to isntall it
<geist> and i got the QEMU_EFI.fd from an ubuntu package
<geist> the highmem=off switch if oudn i need on the M1 but not the M1pro. it tells the virt machine to not emit the high PCI ECAM and the mmio aperture up there, because it tries to configure it > amount of virtualized physical address space on the M1 (36 bits)
<geist> seems to be a cleaner way than doing -M virt-2.12 or whatnot we were doing before i think
<klange> this is the mess I'm using:
<klange> qemu-system-aarch64 -M virt-2.12,highmem=off -accel hvf -m 4G -smp 1 -cpu cortex-a72 -serial mon:stdio -device bochs-display -device nec-usb-xhci -device usb-tablet -device usb-kbd -d guest_errors -kernel bootstub -append "root=/dev/ram0 migrate start=live-session vid=auto" -fw_cfg name=opt/org.toaruos.initrd,file=ramdisk.igz -fw_cfg name=opt/org.toaruos.kernel,file=misaka-kernel
<geist> cool
<klange> Anyway, surprisingly productive weekend, now back to work work. Really didn't think I'd have the GUI running this quickly.
fwg has quit [Ping timeout: 260 seconds]
Burgundy has quit [Ping timeout: 250 seconds]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
fwg has joined #osdev
<gog> i keep meaning to put aside some time to pick my memory management apart and refactor it but i've just been busy as hell and too exhausted to think clearly
<gog> trying to abdicate all responsibilities and make time for it wednesday
<zid> Wednesday ends in y though so I couldn't possibly do anything productive
<gog> i just want one fucken day to myself T_T
sdfgsdfg has joined #osdev
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ElectronApps has joined #osdev