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
<brunothedev> placeholder.com
<brunothedev> how did someone did not take that domain...
<brunothedev> sorry for bloating this channel
gxt__ has quit [Ping timeout: 240 seconds]
<brunothedev> debian.org
<brunothedev> its not up...
brunothedev has quit [Client Quit]
TkTech has quit [Ping timeout: 256 seconds]
gxt__ has joined #osdev
DynamiteDan has quit [Excess Flood]
gmacd has quit [Ping timeout: 268 seconds]
DynamiteDan has joined #osdev
Burgundy has joined #osdev
gmacd has joined #osdev
<geist> dunno but you can bet archive.zip is taken
gmacd has quit [Ping timeout: 240 seconds]
TkTech has joined #osdev
gmacd has joined #osdev
gmacd has quit [Ping timeout: 240 seconds]
Burgundy has quit [Ping timeout: 240 seconds]
Vercas has joined #osdev
Vercas3 has quit [Ping timeout: 240 seconds]
gmacd has joined #osdev
ethanxxxl has quit [Remote host closed the connection]
gmacd has quit [Ping timeout: 240 seconds]
Turn_Left has joined #osdev
innegatives has joined #osdev
<innegatives> Where can I find list of standard interrupt numbers for x86_64 and whether they come with an error code or not?
Turn_Left has quit [Read error: Connection reset by peer]
<gog> Ermine: pass null to memory map and map key for the first call, take the size and add two descriptor size before allocating
<gog> allocate, then another call to get memory map
<gog> then it should work
<gog> bedtime for me tho
dutch has quit [Quit: WeeChat 3.8]
gog has quit [Ping timeout: 265 seconds]
dutch has joined #osdev
<Mutabah> innegatives: The intel manuals have a list of all 32 exception vectors.
<innegatives> Mutabah: but what is, for example, interrupt 39? I'm looking at a kernel code that handles it as spurious interrupt
Arthuria has joined #osdev
<Mutabah> 39 is outside the first 32, so it's going to be from an external device
gmacd has joined #osdev
<Mutabah> which are completely configurable (on the device/interrupt controller)
goliath has quit [Quit: SIGSEGV]
<Mutabah> innegatives: ^
<innegatives> ok thanks
gmacd has quit [Ping timeout: 240 seconds]
<mi7> likely that they mapped irq0..15 to 32..47 so the handling of spurious irq7s shows up on "interrupt 39"
<Mutabah> That sounds reasonable, it's common to map the legacy PICs to IRQs 32-47
gmacd has joined #osdev
pmaz has joined #osdev
gmacd has quit [Ping timeout: 240 seconds]
[itchyjunk] has quit [Read error: Connection reset by peer]
innegatives has quit [Quit: WeeChat 3.8]
gmacd has joined #osdev
gmacd has quit [Ping timeout: 240 seconds]
elastic_dog has quit [Remote host closed the connection]
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
gmacd has joined #osdev
gmacd has quit [Ping timeout: 268 seconds]
gmacd has joined #osdev
elastic_dog has joined #osdev
elastic_dog has quit [Remote host closed the connection]
elastic_dog has joined #osdev
gmacd has quit [Ping timeout: 256 seconds]
elastic_dog has quit [Ping timeout: 240 seconds]
elastic_dog has joined #osdev
elastic_dog has quit [Ping timeout: 240 seconds]
gmacd has joined #osdev
gmacd has quit [Ping timeout: 240 seconds]
elastic_dog has joined #osdev
elastic_dog has quit [Remote host closed the connection]
elastic_dog has joined #osdev
elastic_dog has quit [Killed (calcium.libera.chat (Nickname regained by services))]
elastic_dog has joined #osdev
elastic_dog has quit [Read error: Connection reset by peer]
elastic_dog has joined #osdev
elastic_dog has quit [Remote host closed the connection]
elastic_dog has joined #osdev
Vercas has quit [Quit: buh bye]
elastic_dog has quit [Remote host closed the connection]
Vercas has joined #osdev
gmacd has joined #osdev
gmacd has quit [Ping timeout: 265 seconds]
elastic_dog has joined #osdev
elastic_dog has quit [Ping timeout: 248 seconds]
elastic_dog has joined #osdev
elastic_dog is now known as Guest6863
Guest6863 has quit [Ping timeout: 256 seconds]
elastic_dog has joined #osdev
elastic_dog has quit [Remote host closed the connection]
elastic_dog has joined #osdev
gmacd has joined #osdev
elastic_dog has quit [Remote host closed the connection]
elastic_dog has joined #osdev
gmacd has quit [Ping timeout: 240 seconds]
elastic_dog has quit [Remote host closed the connection]
Arthuria has quit [Ping timeout: 240 seconds]
GeDaMo has joined #osdev
elastic_dog has joined #osdev
elastic_dog has quit [Remote host closed the connection]
elastic_dog has joined #osdev
Pruepeura has joined #osdev
Pruepeura has left #osdev [#osdev]
Pruepeura has joined #osdev
Pruepeura has left #osdev [Leaving]
elastic_dog has quit [Remote host closed the connection]
gmacd has joined #osdev
elastic_dog has joined #osdev
gmacd has quit [Ping timeout: 268 seconds]
elastic_dog has quit [Remote host closed the connection]
gmacd has joined #osdev
elastic_dog has joined #osdev
Jari-- has quit [Ping timeout: 240 seconds]
gmacd has quit [Ping timeout: 240 seconds]
Vercas has quit [Remote host closed the connection]
elastic_dog has quit [Read error: Connection reset by peer]
Vercas has joined #osdev
gmacd has joined #osdev
elastic_dog has joined #osdev
elastic_dog has quit [Remote host closed the connection]
elastic_dog has joined #osdev
elastic_dog has quit [Remote host closed the connection]
elastic_dog has joined #osdev
gmacd has quit [Ping timeout: 240 seconds]
Jari-- has joined #osdev
elastic_dog has quit [Remote host closed the connection]
elastic_dog has joined #osdev
gmacd has joined #osdev
elastic_dog has quit [Remote host closed the connection]
elastic_dog has joined #osdev
gmacd has quit [Ping timeout: 265 seconds]
elastic_dog has quit [Remote host closed the connection]
elastic_dog has joined #osdev
zaquest has joined #osdev
elastic_dog has quit [Remote host closed the connection]
gmacd has joined #osdev
gmacd has quit [Ping timeout: 240 seconds]
elastic_dog has joined #osdev
elastic_dog has quit [Read error: Connection reset by peer]
elastic_dog has joined #osdev
elastic_dog has quit [Remote host closed the connection]
gmacd has joined #osdev
elastic_dog has joined #osdev
elastic_dog is now known as Guest2360
Guest2360 has quit [Remote host closed the connection]
elastic_dog has joined #osdev
gmacd has quit [Ping timeout: 256 seconds]
elastic_dog has quit [Remote host closed the connection]
xenos1984 has quit [Ping timeout: 240 seconds]
xenos1984 has joined #osdev
elastic_dog has joined #osdev
elastic_dog has quit [Remote host closed the connection]
elastic_dog has joined #osdev
xenos1984 has quit [Ping timeout: 240 seconds]
elastic_dog has quit [Remote host closed the connection]
cultpony has quit [Quit: ZNC - https://znc.in]
gmacd has joined #osdev
elastic_dog has joined #osdev
cultpony has joined #osdev
elastic_dog has quit [Remote host closed the connection]
elastic_dog has joined #osdev
gmacd has quit [Ping timeout: 265 seconds]
Jari-- has quit [Ping timeout: 240 seconds]
elastic_dog has quit [Remote host closed the connection]
elastic_dog has joined #osdev
elastic_dog has quit [Remote host closed the connection]
xenos1984 has joined #osdev
gmacd has joined #osdev
elastic_dog has joined #osdev
elastic_dog has quit [Remote host closed the connection]
Jari--- has joined #osdev
gmacd has quit [Ping timeout: 240 seconds]
elastic_dog has joined #osdev
elastic_dog has quit [Remote host closed the connection]
elastic_dog has joined #osdev
elastic_dog has quit [Remote host closed the connection]
elastic_dog has joined #osdev
elastic_dog has quit [Read error: Connection reset by peer]
gmacd has joined #osdev
elastic_dog has joined #osdev
gmacd has quit [Ping timeout: 268 seconds]
elastic_dog has quit [Remote host closed the connection]
gmacd has joined #osdev
elastic_dog has joined #osdev
elastic_dog has quit [Remote host closed the connection]
elastic_dog has joined #osdev
elastic_dog has quit [Remote host closed the connection]
gmacd has quit [Ping timeout: 240 seconds]
elastic_dog has joined #osdev
elastic_dog is now known as Guest7571
gmacd has joined #osdev
elastic_dog has joined #osdev
ZipCPU has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
ZipCPU has joined #osdev
cultpony has quit [Quit: ZNC - https://znc.in]
cultpony has joined #osdev
Jari--- has quit [Ping timeout: 240 seconds]
gmacd has quit [Ping timeout: 250 seconds]
nyah has joined #osdev
gmacd has joined #osdev
gmacd has quit [Ping timeout: 240 seconds]
gmacd has joined #osdev
gmacd has quit [Ping timeout: 240 seconds]
k0valski18891 has joined #osdev
gmacd has joined #osdev
Burgundy has joined #osdev
gmacd has quit [Ping timeout: 240 seconds]
<mrvn> How come shops are still allowed to sell washing machines? They are so racists, you have to separate the whites from the colors.
pmaz_ has joined #osdev
pmaz has quit [Ping timeout: 256 seconds]
pmaz_ has quit [Ping timeout: 248 seconds]
gog has joined #osdev
innegatives has joined #osdev
listentolist has joined #osdev
wootehfoot has joined #osdev
innegatives has quit [Ping timeout: 246 seconds]
innegatives has joined #osdev
goliath has joined #osdev
<innegatives> Since C++ compiler tends to generate more code than C, is it safe to say that kernel written purely in C++ will be slower than counterpart in C?
dude12312414 has joined #osdev
<gog> no
<gog> more code isn't necessarily slower
<nortti> also it is not hard to write c++ that desugars down to exact same code as less-easy-to-read c
<gog> yes
<innegatives> nortti: how would one achieve that?
<nortti> do you know how to program in c++?
<innegatives> somewhat
<nortti> okay so for example non-virtual methods are the exact same thing as normal function calls, just with a scoped name and implicit self parameter
<innegatives> but then what about vtable?
<nortti> if it's a case that needs virtual functions, you'll get a vtable in C too. if it's not, then don't make them virtual, and you will not have vtable
<innegatives> oh okay
<gog> but at the same time a vtable is a single indirection
<gog> it's a function pointer
<gog> it's one more load before a call
<gog> that can either be ok or wreak havoc on the cache
<nortti> (like for example VFS code in unices at least makes heavy use of vtables = arrays of function pointers to allow calling different filesystems' implementations)
<gog> same with c standard streams
bauen1 has quit [Ping timeout: 265 seconds]
bauen1 has joined #osdev
<Ermine> gog: may I pet you
<Ermine> gog: I did what you said, didn't I?
<gog> Ermine: yes, i reread your code
<gog> it was v late and i was tired when i read it the first time :P
<gog> and you may pet me
<Ermine> Happens
* Ermine pets gog to make her feel relaxed
* gog prr
Left_Turn has joined #osdev
foudfou has joined #osdev
xenos1984 has quit [Ping timeout: 240 seconds]
xenos1984 has joined #osdev
Burgundy has quit [Ping timeout: 240 seconds]
innegatives has quit [Ping timeout: 248 seconds]
[itchyjunk] has joined #osdev
innegatives has joined #osdev
<innegatives> I get framebuffer from GOP and clear screen by writing FFFFFFFF to all framebuffer memory. Issue is it only colors like half the screen, and that half is either more or less between each runs. Is this an QEMU issue? I mean the portion of screen it colors changes between runs. Sometimes "Tianocore" logo does not go away
<sham1> Do you use the proper stride
<innegatives> what is stride
<innegatives> for (unsigned long long i = 0; i < this->framebuffer->HorizontalRes * this->framebuffer->VerticalRes; i++)
<innegatives> *(unsigned int *)(pixel + i) = 0x00000000;
<innegatives> change 0000 to ffff
<innegatives> pixel is FrameBufferBase
<sham1> A stride on a bitmap tells you how many bytes to skip to get to the next line
<sham1> Because especially on hardware like what is being emulated here, it's not just a clean width * bytes_per_pixel
<GeDaMo> I don't see bytes per pixel there
<sham1> Well I do. They're attempting to go with 4 bytes per pixel
<sham1> Of course, the pointer arithmetic is also wrong for that
<GeDaMo> They're just adding 1 to i
<sham1> Yes. I suppose what they mean is something like *(((unsigned int *)pixel) + i)
<GeDaMo> If i was a pointer, that should work
<sham1> Where each unsigned int being pointed to is a single pixel
<GeDaMo> Maybe better with a separate counter and pointer
<GeDaMo> innegatives: you're storing 4 bytes but only increasing the address by 1 each iteration
<innegatives> right, thnaks
<innegatives> even with *(((unsigned int *)pixel) + i) it does something different on each run
<mrvn> innegatives: that code is implementation defined behavior.
<mrvn> If pixel is a pointer other than unsigned int * then it's wrong. If pixel is uintptr_t then it's also wrong. Only way it's clen code is if pixel is unsigned int * and then you don't need to cast.
<GeDaMo> What type is pixel?
<innegatives> it's void * casted to unsigned int *
<mrvn> You should use uint32_t or define a color_t with r,g,b,a
<mrvn> cast it once so you limit the implementation defined behavior to one place.
<mrvn> and "unsigned long long"? Unless "this->framebuffer->HorizontalRes" or "this->framebuffer->VerticalRes" is unsigned long long that does nothing good.
<mrvn> Maybe your product overflows and you only clear the remainder
<innegatives> how come it draws up to certain point and this point changes each time I run qemu?
<innegatives> res are unsigned ints
<mrvn> So everything up to 4 billion pixels will work.
<mrvn> Not sure why it's different every time but maybe stride changes between runs
<mrvn> Does gcc/clang turn that whole loop into a memset() call?
<innegatives> no idea
<mrvn> well, check it
<mrvn> when something goes fooey you have to check your source and what the compiler makes out of it.
<innegatives> do i just disassemble the elf and look for memset?
<mrvn> if you see a CALL memset then it's obvious.
<innegatives> i dont think it does
<sham1> You think or you know? You should know
<innegatives> the file is really small and i see 3 unique call addresses none of which look like memset
<mrvn> do you compile with -g?
<innegatives> no
<innegatives> does ndisasm show the symbols when you compile with g?
<mrvn> gnu tools do
<mrvn> check the .o file first, that won't have been linked yet so it must have the memset symbol.
<innegatives> no, none of the calls are memset or an unknown symbol
<innegatives> so next course of action would be to query PixelFormat from UEFI and pass it to kernel then use it as stride?
<sham1> Wait, you *didn't* pass the GOP data to the kernel?
<innegatives> I did, but not PixelFormat
<mrvn> pixel format sounds like what each pixel has as format. Not how much gap is between lines.
<sham1> ^
<bslsk05> ​wiki.osdev.org: GOP - OSDev Wiki
<innegatives> To get the same value as scanline in VESA (also commonly called pitch in many graphics libraries), you have to multiply PixelsPerScanLine by the number of bytes per pixel. That can be detected by examining the gop->Mode->Info->PixelFormat field. For example with 32 bit packed pixel formats,
<mrvn> You will need PixelFormat to know what bits are red, green, blue and alpha though.
<innegatives> isnt number of bytes per pixel == stride?
<mrvn> PixelsPerScanLine == stride
<mrvn> Your code doesn't use PixelsPerScanLine
<innegatives> i already multiplied with pixelsperscanline and it still did different shit each run
<innegatives> sometimes it fills the whole screen
<innegatives> most of the time it fills only half or so
<mrvn> You need "pixel[x + y * PixelsPerScanLine]"
<mrvn> and printf() all the framebuffer configuration
<mrvn> Do you get different address and size every time or something?
<innegatives> let me check
<innegatives> i dont have any facility for printing or serial
<mrvn> I recommend implementing serial before graphics
<innegatives> will do, thanks
<innegatives> even when i multiply the loop iteration count by 10000 it still most of the time fill like half the screen
<mrvn> try drawing a square
<innegatives> how does that help?
<mrvn> it shows you how screwed up your pixel calculation is
<innegatives> why pixel calculation matters, i fill everything starting from framebufferbase
<mrvn> because if they are wrong you don't know what you are clearing
<mrvn> plus you have to start checking somewhere
<innegatives> isnt it all some distance away from framebufferbase? i cleared billion bytes starting from the base
<mrvn> the fact that that doesn't crash tells me you are doing something wrong.
<mrvn> Different topic: When I bind a AF_INET socket to ANY it gets data from any IPv4 source. If I bind an AF_INET6 socket to ANY it gets data from IPv4 + IPv6. What if I want IPv6 only? Do I have to bind to the individual IPv6 of the host?
<mrvn> What if I want to bind to IP, IPX and AppleTalk? Do I need 3 sockets?
Burgundy has joined #osdev
innegatives has quit [Quit: WeeChat 3.8]
<bslsk05> ​www.man7.org: ipv6(7) - Linux manual page
<mrvn> GeDaMo: yes, missed that.
heat has joined #osdev
heat has quit [Remote host closed the connection]
heat has joined #osdev
bauen1 has quit [Ping timeout: 264 seconds]
bas1l has joined #osdev
basil has quit [Remote host closed the connection]
pharonix71 has quit [Ping timeout: 240 seconds]
pharonix71 has joined #osdev
<gog> oh he's gone
<gog> i was gonna show him the correct algo for calculating the pixel position
<gog> maybe i shouldn't be so eager to help
<heat> hi gog
<gog> hi heat
<gog> how's it heating
<heat> wahts heating
<gog> making something's molecules vibrate faster
<heat> poggers
* mrvn is thinking of importing the faster vibrating molecules.
bgs has joined #osdev
<mrvn> Have to decide between china and italy
<mrvn> Chicken Chop-Suey or Pizza, decisions, decisions, ...
bas1l is now known as basil
xenos1984 has quit [Ping timeout: 240 seconds]
xenos1984 has joined #osdev
<mrvn> I'm trying to open a bi-directional DGRAM socket to a host. SO I do getaddrinfo and then for each result I try to create a socket + bind + connect. But bind needs a "sockaddr" matching the ai_family of the result. Is there a better way than a switch/case over all ai_family types?
<mrvn> Something to get the local sockaddr that will be used when sending to the sockaddr in the result?
<mrvn> Never mind, I believe I need to run getaddrinfo with AI_PASSIVE and then match the results for that with the results for the host I want to talk to.
brunothedev has joined #osdev
slidercrank has quit [Ping timeout: 248 seconds]
xenos1984 has quit [Ping timeout: 240 seconds]
xenos1984 has joined #osdev
<Ameisen> I'm trying to figure out how to fix the licensing on vemips -- vemips' license is different from the libc++/libunwind/etc licenses that are required for the SDK part
<Ameisen> I'm guessing I need to turn those into their own projects
<Ameisen> vemips + vemips sdk
<Ameisen> apache2 vs mpl2
innegatives has joined #osdev
Ali_A has joined #osdev
<brunothedev> so, are you saying that the license of your project is different than the dependencies?
<Ameisen> the project itself doesn't technically have any LLVM dependencies, but the SDK I provide so people can actually target it effectively is LLVM-based
<Ameisen> (since it's basically clang + the libraries)
<Ameisen> the only dependency that vemips has directly, iirc, is xbyak
<Ameisen> and that's BSD-3
<brunothedev> i think gpl v3 and bsd is compatible
<Ameisen> I'm wanting to move it to MPL2
<heat> hottest legal take
<Ameisen> but that's also compatible, I believe
<Ameisen> hey, it's all my code.
<Ameisen> :||
<Ameisen> previous versions can (and would) stay GPL-3
<Ameisen> I'd been playing fast and loose with licensing but I want to fix it
<mcrod> hi
<Ameisen> my _guess_ is that I need to move the SDK components to their own project to make sure that they're distinct from vemips itself
<heat> ok so real question: how do i train my cat to give massages
<Ameisen> there are a few vemips things that I wrote that are specific to the sdk (like vevcbridge which lets MSVC build MIPS stuff)
<heat> his paws are perfect for massages
<Ameisen> cats give massages naturally
<Ameisen> it's called kneading
<Ameisen> it's usually very painful because they use their claws
<heat> nah, they only do that on soft shit
<Ameisen> but you grin and accept it because they're adorable.
<bnchs> Ameisen: if someone wanted to use your CPU emulator, then they would just fork a older version of it where GPL was used
<Ameisen> make yourself soft.
<bnchs> and update it that way
<heat> i want back massages
<Ameisen> bnchs - if they wanted GPL3
<heat> and he's not doing it there cuz IM FUCKIN RIPPED
<Ameisen> I'm guessing that most people would prefer MPL2 (which is what most of my stuff is licensed under)
<brunothedev> it says that it is both osi and fsf approved, aka: the vast majority of foss licenses are compatible
<heat> no
<Ameisen> I'm mainly wanting the licensing of my projects to be more consistent (and accurate)
<heat> GPLv3 and BSD are in no way shape or form compatible
<Ameisen> they don't even share any letters in their acronyms!
<Ameisen> which is the standard legal criteria for compatibility, I believe.
<bnchs> heat: are you talking about the crappy 4-clause BSD license that nobody uses?
<heat> i'm talking about every freaking clause
<heat> BSD doesn't even force you to share source code
<mrvn> If you are distributing source then the GPL doesn't infect anything and you can mix it with any license you want as long as you keep it to separate files.
<heat> GPL forces you to share sauce, "infects" based on binary linking, etc
<bnchs> 3-clause BSD license is compatible with GPLv3, but the other way around is not compatible
<bnchs> using BSD in GPLv3
<heat> GPL can use BSD shit, because BSD licenses/MIT/whatever are very weak
Arthuria has joined #osdev
<mrvn> BSD with the advertising clause is totaly non-free
<heat> but they are not compatible
<mrvn> and if you use BSD source in your project it becomes GPL.
<bslsk05> ​www.fsf.org: The Mozilla Public License version 2.0 is out—and GPL-compatible! — Free Software Foundation — Working together for free software
<heat> MPL is a budget GPL
<mcrod> it is hot
<mcrod> very hot
<bnchs> i think GPL was invented to make BSD people cry
<brunothedev> mcrod: ?
<mcrod> temperature wise, it is hot
<mcrod> in my area
<brunothedev> mcrod: where do u live?
<mcrod> the east coast of the united states
<brunothedev> isn't the east coast pretty chill?
<heat> BSD was invented to make BSD people cry
<mcrod> brunothedev: not in the summer, no
<brunothedev> here, it is around 25 to 30 (celsius)
<innegatives> mrvn: I fixed the issue by disabling interrupts
<mcrod> heat: also yay my toolchain script has life
<brunothedev> Vitória da Conquista, Brazil
<heat> mcrod, how hacky is it, from 1 - 10
<heat> 0 is an impossible value here
<bslsk05> ​github.com: samething/build_toolchain.sh at main · mcroddev/samething · GitHub
innegatives has quit [Quit: WeeChat 3.8]
<mcrod> at least this can download, build, and install cmake
<mcrod> so that's a start
<heat> i find it great that you added the whole license to your copyright header
<mcrod> I usually do if it's not the GPL
<mcrod> it's small enough
<heat> it's a terse copyright header
<mcrod> pffff
<mcrod> terse
<heat> GNU project vibes
<mcrod> but yeah I don't think this attempt is _god awful_
<heat> is it just me or did you steal half of it from mine
<mcrod> i was influenced by yours
<brunothedev> heat: his fbi agent questioning why he access choosealicense.com so much
<mcrod> influenced, not stolen
<heat> yes the influence is palpable
<heat> 1) has a lot of bash-specific garbage
<mcrod> yes
<mcrod> that it does
<mcrod> didn't think that would be a problem because this is meant to be used on Linux systems, which surely have bash in 99% of cases
<mcrod> however, it would indeed be more portable to use sh
<heat> right, and then you want to run that on mac or freebsd
<brunothedev> as a zsh user, im in tears rn
<heat> 2) that error ocurred thing seems useless
<mcrod> it's the #bash way of doing set -e
<mcrod> as in, literally the #bash channel, as in, literally in the FAQ
<heat> idiots
<mcrod> I thought it useless too
<mcrod> but
* mcrod shrug
<heat> idiots
<heat> 3) that VERBOSE switch is awful
<mcrod> well what the hell am I supposed to do
<mcrod> probably a function like run_command whatever which handles the verbose flag for me
<mcrod> because the way i'm doing it now is indeed garbage
<heat> i don't know
<mcrod> i don't either.
<mcrod> also I hate that curl's silent mode is quite literal
<mcrod> even for stderr
<heat> VERBOSE could expand to either "" or "-v", and that would work for most commands, then VERBOSE_REDIRECT for >&/dev/null
<mcrod> i don't know what you mean
<heat> VERBOSE="-v"
<heat> then e.g on tar
<heat> tar $VERBOSE xf "cmake-${CMAKE_VER}.tar.gz"
<heat> it expands properly
<mcrod> ahhhhhhhhhhhhhhh
<mcrod> that makes sense
<heat> and then when handling the -v switch in your script, also do 'VERBOSE_REDIRECT=">&/dev/null"'
<heat> so e.g ninja install $VERBOSE_REDIRECT
<heat> which should also work I think
<mcrod> the only problem with that is that'll shove everything into /dev/null including stderr
<mcrod> if something bitches on stderr the user should know about it
<heat> well, it's what you're doing
<heat> i thought it was on purpose?
<mcrod> i know :(
<heat> >/dev/null works just fine...
<mcrod> ah okay
<brunothedev> but >/dev/null sends ALL the output to the trash
* geist yawns
<mcrod> yeah, which is not what I want
<heat> no?
<heat> >/dev/null redirects stdout
<sham1> 2>&1 >/dev/null for the maximum trash disposal
<mcrod> are you sure
<heat> sham1, wrong order btw
<mcrod> hm
<heat> mcrod, yes
<sham1> hum
<sham1> You sure?
<sham1> Well okay then, >/dev/null 2>&1
<geist> it's always the opposite order than i expect for some reason
<heat> the POSIX compliant way to redirect stdout and stderr to null is: >/dev/null 2>&1
<geist> as heat says
<heat> because it's like the shell does operations
<heat> opens /dev/null over STDOUT_FILENO, then dup2(STDOUT_FILENO, STDERR_FILENO);
<mcrod> so
<mcrod> if I do `>&2 echo "heat is cool" >/dev/null`, I will still see "heat is cool"
<heat> i dont
<sham1> Well of course, the shell wouldn't lie now would it /s
<mcrod> i don't either.
<brunothedev> sham1: uh guddammit i would make that joke
<mcrod> i'm piping "heat is cool" to stderr, but trashing all of stdout
<gog> mcrod: may i pet you
<mcrod> gog: yes
* gog petpetpet
* mcrod purrpurrpurr
<mcrod> well you don't put a u in there
<mcrod> so
* mcrod prrprrprr
<bnchs> i need pets
<sham1> Yay, tomorrow I get back to work
<GeDaMo> Is it not a holiday where you are?
<brunothedev> bnchs: just be sure to not get a loud one (personal experience)
<brunothedev> GeDaMo: tomorrow?
<bnchs> brunothedev: no loud ones, i already have too many concussions :(
<gog> i don't work tomorrow
<GeDaMo> It's a bank holiday in the UK
<sham1> Well tomorrow is Monday for me and I don't think there's any bank holiday or anything tomorrow
<mcrod> it's a holiday in the US
<gog> it's second of whit sunday
<gog> and memorial day in the us yeah
<sham1> Hm
<sham1> Interesting
<bslsk05> ​www.gov.uk: UK bank holidays - GOV.UK
<brunothedev> there is going to be a school recess next month here
<heat> gog gog gog go gog gog ogg gog gog
<gog> heat hethet het heat het
<heat> hi
<gog> hi
<sham1> School summer vacation, i.e. work will be super hectic
<mcrod> i hate this.
<mcrod> this is so stupid
<mcrod> holy fuck
<gog> what
<sham1> It's good to do things while the kids are out in holiday
<mcrod> gog: bash scripting
<gog> oh yes
<brunothedev> here in the south we dont call summer holiday
<gog> stop doing that immediately it's very bad
<sham1> shell is indeed stupid
<mcrod> trying to take heat's advice, since it makes sense
<mcrod> but
<mcrod> I think I have the syntax wrong
<brunothedev> try to run your script in a posix-only shell like busybox
<sham1> Or dash
<heat> dash poggers
<mcrod> cmake -S . -B build -G Ninja "${CMAKE_BUILD_FLAGS[@]}" "${VERBOSE_REDIRECT}"
<mcrod> is that not right
<sham1> Or ash
<heat> that looks ok
<mcrod> i don't think so: CMake Warning:
<mcrod> Ignoring empty string ("") provided on the command line.
<gog> what does CMAKE_BUILD_FLAGS[@] expand to
<GeDaMo> Is there a shell called 'crash'? :|
<mcrod> gog: array elements
<gog> GeDaMo: there should be
<sham1> Is "[@]" actually a thing in POSIX sh?
<heat> ohhhhhhhhh so you're fucked
<mcrod> god hopefully this doesn't flood...
<mcrod> CMAKE_BUILD_FLAGS=(-DCMAKE_BUILD_TYPE:STRING=Release
<mcrod> -DCMAKE_INSTALL_PREFIX:STRING="${TARGET_DIR}"/cmake)
<mcrod> if [ "$USE_LTO" = true ]; then
<mcrod> CMAKE_BUILD_FLAGS+=(-DCMake_BUILD_LTO:BOOL=ON)
<mcrod> fi
<heat> "" still expands to an empty argument
<heat> that's annoying
<sham1> Of course it does. That's the point. You're explicitly using it to pass an empty
<heat> is 1>&1 defined to work?
<heat> or ";" maybe
<heat> yeah ; sounds like the perfect noop here
<mcrod> ok let us try
* geist yawns harder at everyone
<heat> btw using bash arrays is SO FUCKING CRINGE
<sham1> …I wish powershell wasn't so Microsoft, it would make things nicer
<sham1> geist: what is it
<mcrod> what the hell am I supposed to do heat
<heat> string
<brunothedev> sham1: powershell is not *nix
<mcrod> also, CMake Warning:
<mcrod> Ignoring extra path from command line:
<mcrod> ">&/dev/null"
<gog> geist: may i pet you
* geist stretches as if just woke up
<mcrod> when cmake -S . -B build -G Ninja "${CMAKE_BUILD_FLAGS[@]}" "${VERBOSE_REDIRECT}"
<heat> aw
<sham1> brunothedev: I know. It's great
* geist approves of the petting
<heat> maybe its the quotes? mcrod
<mcrod> that's my next guess
<mcrod> hang on
* gog petpetpet geist
<mcrod> nope.
<heat> welp
<heat> i guess you need a run_cmd yeah
<mcrod> vomit inducing
<mcrod> okay
<sham1> Oh this is annoying. My new chair can lean back, but I can't lock it when I'm leaning back
<mcrod> and yes for the record, I would like this script to be as portable as possible
<heat> i wonder... what if
<heat> >/dev/tty
<mcrod> but who the fuck is on Linux and _doesn't_ have bash somewhere
<gog> i'm not sure you should be redirecting cmake's stdout, only stderr
<sham1> If you want it to be portable: perl
<heat> wait, actually
* sham1 runs
<heat> >/dev/stdout
<brunothedev> mcrod: luke smith
<mcrod> gog: unless the user passes --verbose, they shouldn't see anything other than stderr in case something goes wrong
<heat> mcrod, like my idea right now is something like > $FILE, where FILE is either /dev/stdout or /dev/null
<gog> hm
<mcrod> i see
<mcrod> is there an example you can demonstrate
<heat> no
<mcrod> oh.
<mcrod> well
* mcrod sulks
<heat> redirecting to stdout by default should be a noop
<mcrod> sham1: I have to write a powershell script to do a similar thing as I'm doing here
<mcrod> for Windows hosts
<mcrod> .
<heat> so the idea is that $FILE expands based on -v
<heat> hahaha
<mcrod> and I don't know how well that's going to turn out
<brunothedev> run your script in a podman container
<mcrod> in a who
<sham1> On one hand, it should be nicer since Powershell actually has data structures worth a damn. On the other hand, it's Microsoft so you never know
<mcrod> to be clear, the whole point of this was to avoid docker/containerization
<mcrod> the user either builds or downloads a pre-built toolchain
<mcrod> and they're off to the races
<mcrod> and since it's been done since the 90s
<mcrod> i'm not going to just not do it
<heat> prebuilts are cringe
<sham1> ^
<mcrod> you're cringe
<gog> i'm based
<heat> hi based, im heat
<mcrod> i will come back to this in a bit
<mcrod> but
brunothedev is now known as based
<mcrod> i won't sleep until I figure out this monstrocity out.
<based> whos impersonating me?
<sham1> basedthedev
based is now known as brunothedev
<brunothedev> the nick is protected by nickserv sooooo
* brunothedev is smashed by a ban hammer
<sham1> Anyway, integrating an existing event loop to C++20 stop tokens was pain. Irritating
<sham1> Threads and event loops, what a bunch of fun!
<brunothedev> after i entered the linux mailing list i am getting a ton of spam
slidercrank has joined #osdev
ptrc has quit [Remote host closed the connection]
ptrc has joined #osdev
* mrvn vodes for: exec 2>/dev/null
<mrvn> votes even
<mrvn> Is there any way pre-c++23 to read some data into a string without initializing the storage for the string first?
<mrvn> s.resize_and_overwrite() replacement
<heat> mcrod, why is your project something that's erm, like, illegal to do
<mrvn> .oO(And who thought it a good idea to only "recommended to avoid unnecessary copies and allocations" in s.resize_and_overwrite()?
<gog> hi
<brunothedev> hi
<geist> huh that's odd. reading about the TMS9900 cpu. i had some sort of SPI looking IO port bus for talking to perpiherals
<geist> called CRU
Ali_A has quit [Ping timeout: 245 seconds]
<geist> basically you select a device via the A lines like you'd expect (presumably by your logic) but then within that there are 6 dediced register select lines (CRU S0-S5) and then you clock 32 bits of data via 3 CRU SPI looking things (CLOCK, IN, OUT)
<geist> so kinda like mmio *except* the data bus doesn't play
dutch has quit [Quit: WeeChat 3.8]
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
brunothedev has quit [Quit: WeeChat 3.8]
mctpyt has joined #osdev
<heat> geist, did you think about that vma merging problem thing again?
wootehfoot has quit [Quit: Leaving]
<heat> i'm not sure if there's value in explicitly supporting softmmu systems...
innegatives has joined #osdev
<heat> or, better, supporting softmmu systems in the "we don't know if there's a page table" way
<heat> because linux supports them just fine
gmacd has joined #osdev
bgs has quit [Remote host closed the connection]
slidercrank has quit [Remote host closed the connection]
slidercrank has joined #osdev
gmacd has quit [Ping timeout: 268 seconds]
gmacd has joined #osdev
<innegatives> If you write to serial, and then triple fault occurs, is it possible to QEMU not to flush serial into stdio before rebooting?
mctpyt has quit [Ping timeout: 264 seconds]
gmacd has quit [Ping timeout: 264 seconds]
<gog> are you certain that writing to serial isn't causing the triple fault?
<gog> or the initial fault at least?
<innegatives> it was faulting without any serial impl
<innegatives> i think it was faulting anyway, cuz it just reboot loops
<innegatives> i did -d int to qemu and it says Servicing interrupt 0x20
<gog> -no-reboot
<gog> get the IP
<gog> find where in the code it's faulting
<innegatives> with -no-reboot it just exits
<innegatives> SDM says 0x20 interrupt is virtualization fault in protected mode
<innegatives> is it same in long mode?
<gog> do -no-shutdown too
<gog> are you using uefi?
<innegatives> yes
<gog> 0x20 is the timer interrupt
<gog> that's where efi maps it
<heat> gog
<heat> bazel
<gog> heat
<innegatives> It says check_exception old: 0xffffffff new 0xd
<innegatives> What does that mean
<gog> 0xd is gpf
<gog> old 0xffff means there's no contributory fault
<heat> i'm putting a tenner on "doing naughty stuff without exiting boot services"
<innegatives> oh, i need to call ExitBootServices?
<innegatives> ok
<bslsk05> ​github.com: sophia/kc_main.c at main · adachristine/sophia · GitHub
<bslsk05> ​github.com: sophia/kc_main.c at main · adachristine/sophia · GitHub
<gog> specifically here
<gog> and everything it calls
<gog> some of the code is in loader/main_efi.c
<innegatives> lmao
<innegatives> exited boot services
<innegatives> not getting this after a while check_exception old: 0xffffffff new 0x6
<innegatives> !!!! X64 Exception Type - 06(#UD - Invalid Opcode) CPU Apic ID - 00000000 !!!!
gmacd has joined #osdev
<gog> can you show your work please
<innegatives> let me upload
<heat> yo gog what dat debug doin
<gog> uh i forgot
<gog> it was for something
<gog> it's dead code now i think
<gog> idk i'm playing super mario 64 rn
<heat> you do be muderin dat code tho
<gog> is that a compliment
<gog> or an insult
<gog> if it's an insult i agree
<heat> it's everything
gmacd has quit [Ping timeout: 256 seconds]
<gog> :|
bauen1 has joined #osdev
<innegatives> github push fails
<gog> ok
<innegatives> just give me a sec
<gog> no hurry i'm just chillin
<innegatives> is it possible that OVMF_CODE.fd gets blocked by github antivirus or something
<gog> you don't want that in your repo anyway it's a big binary blob
<innegatives> ok removed it and it worked
<bslsk05> ​jafarlihi/mepsitahl - [WIP] x86_64 OS (0 forks/0 stargazers/MIT)
<gog> header.e_entry
<heat> gog are you bing chilling
<gog> i'm bing chilling
<gog> idk how you link your kernel but your header.e_entry needs to be fixed-up to its actual location
<gog> ok i see
<gog> you link your kernel to 1M
<gog> so the pointer in header.e_entry is going to be somewhere after 1M
<gog> but you don't load your kernel to 1M
<gog> you're loading it to whererever it is the firmware gives you pages
<gog> ok i'm sorry you're using AllocateAddress
<gog> disregard
<innegatives> But with right params? int pages = (phdr->p_memsz + 0x1000 - 1) / 0x1000;
<gog> idk you made it this far
<gog> make sure your kernel is loading in the right place and tha tyou have your maths right
<gog> what i do see is taht you're not checking if AllocatePage succeeds
<gog> you're not checking if any of your calls to actually load the kernel succeed
<heat> gorggggggggggggggggggggrg give me code
<heat> feed big Onyx
<gog> heat: k
<gog> i'm gonna fork onyx
<heat> ok, will you feed changes back
<gog> no
<heat> or is this a hostile takeover
<heat> oh man
<heat> sorry, woman
* gog fingerguns
<heat> give me codez, let me take over the world
<heat> i want 2 b capitalist
<heat> free work = $$$$
<gog> i gotta ask tho what's with with these anonymous scopes
<heat> what anonymous scopes
<gog> in innegatives's efi loader
<innegatives> idk, copy pasted from poncho tutorial
<heat> yeah it's copypasted like the whole project
<gog> ohhhhh
<gog> sorry i assumed you wrote this and knew how and why you got this far
<gog> yeah, this is all jank
<innegatives> kernel is not copy pasted tho
<innegatives> i just didnt want to bother with booting
<heat> yes it is, its all osdev wiki code
<gog> this is some cargo cult stuff
<innegatives> where should i re-start?
<innegatives> how do i crack uefi
<innegatives> its so complicated
<gog> it's really not
<gog> it's less complicated than bios in fact
<heat> you should not crack, because cracking is immoral and hurts game developers
<gog> it hurts publishers, developers already got paid by the time it's released
<mjg> heat: cracking hurts oracle
<bnchs> heat: remember that it doesn't hurt developers
<gog> oracle deserves it
<bnchs> it just hurts the company
<heat> yes, and we can't hurt the company
<heat> because that hurts profits
<bnchs> the developers already got paid for the job
slidercrank has quit [Ping timeout: 240 seconds]
<mjg> hurtin the company hurts customers
<innegatives> Is "Beyond BIOS" book worth reading or is it too broad of a scope for osdev?
<innegatives> pls help, how do i git gud
<gog> focus on a project you care about
<innegatives> non-osdev?
<gog> osdev or non-osdev
<innegatives> ive done enough webshit
<gog> develop a more thorough understaning of programming
<gog> don't just copypaste code, grok what you're copypasting
<mjg> DOORS MOTHERFUCKER
<heat> solaris internals is a good good good good book
<heat> and solaris is a great operating system
<gog> what
<FireFly> solaris seems cute, also illumos
Left_Turn has quit [Read error: Connection reset by peer]
innegatives has quit [Ping timeout: 256 seconds]
<heat> mjg, what do you think of this take
innegatives has joined #osdev
<innegatives> In here https://wiki.osdev.org/C%2B%2B#Global_objects is "object1.object1()" means that you should call the constructor? When I do that I get "invalid use of constructor" error
<bslsk05> ​wiki.osdev.org: C++ - OSDev Wiki
<heat> that's bogus
<innegatives> you mean osdev entry?
<innegatives> how am i supposed to get global objects to work then?
<heat> wow that whole article is full of misinformation
<heat> "Note: This appears to be specific to the Itanium platform. For IA-32/x86/i386 and amd64/x86_64, please check out Calling_Global_Constructors instead."
<nortti> lol
<bslsk05> ​wiki.osdev.org: Calling Global Constructors - OSDev Wiki
<heat> this is slightly incorrect but still far more correct than "Itanium ABI is for itanium!!!"
<gog> blood for the itanium gods
<gog> pipeline stalls for the netburst gods
<Ermine> gog: may I pet you
<gog> yesplease
<mjg> heat: i am agreed
* Ermine pets gog
* gog prr
* mjg places a cucumber behind gog
* gog turns around
* gog leaps away because it's a snek
<heat> shrek
<moon-child> /em pets snek
* moon-child pets snek
<moon-child> gog: https://0x0.st/HqFP.jpg
<gog> snek girl and cat girl :o
* Ermine laughs while looking at gog
<moon-child> (it's me I'm the snek girl)
<heat> this is now a shrek channel
<Ermine> meanwhile my cat chomped ribbon of my badge :(
<gog> good kitty
<Ermine> >:(
<innegatives> https://wiki.osdev.org/Calling_Global_Constructors#x86_64_.2864-bit.29 in here it tells you to create two asm files with same symbols defined, but that leads to multiple definition error, what is meant by this
<bslsk05> ​wiki.osdev.org: Calling Global Constructors - OSDev Wiki
<innegatives> oh no
<innegatives> wait
<innegatives> fuck it, im gonna use limine
<gog> ok some of that doesn't apply in kernel code
<gog> you don't have crtbegin and crtend for example
<gog> you'll need to write code that finds _init and calls each function pointer in sequence'
<gog> and imo limine is more complicated than just rolling a simple uefi loader
<innegatives> in what ways?
<gog> in that limine is a full-featured bootloader and has a lot of things you aren't going to need
Burgundy has quit [Ping timeout: 265 seconds]
<gog> for example, the boot protocol
<gog> you'll need to link your kernel to the higher half
<gog> limine does most of that for you
<gog> i suppose that's a little easier
<gog> idk give it a try
<gog> huh, actually, i think i may even give limine a shot
<heat> noooooooooooooo
<heat> not the dark side gog
<gog> i see through the lies of the grub
<gog> i do not fear the dark side as you do
jimbzy has quit [Ping timeout: 240 seconds]
<bslsk05> ​i.redd.it: Reddit - Dive into anything
dutch has joined #osdev
<zid> heat_irl?
<heat> yes
Arthuria has quit [Ping timeout: 256 seconds]