<brunothedev>
why dont i use "multiboot_tag_vbe" ?
brunothedev has quit [Quit: WeeChat 3.6]
thatcher has joined #osdev
xvanc has joined #osdev
<klange>
That tag is for locating the VESA BIOS extensions, with which you could theroetically perform modesetting operations, except VBE 2 only has a BIOS interface to do that, and VBE 3 doesn't actually exist.
<klange>
Sorry, misspoke. VBE 2 has a protected mode interface nothing implements, and VBE 3 data is not provided by GRUB through that interface (and doesn't really exist anyway)
xvanc has quit [Ping timeout: 276 seconds]
<klange>
If you were thinking of using the mode information to understand your framebuffer, note that this information is only provided if VBE was used to perform modesetting by GRUB which may not necessarily be the case. GRUB actually has a handful of other modesetting drivers, or may be running through EFI and using GOP rather than VBE.
[itchyjunk] has joined #osdev
antranigv has joined #osdev
xvanc has joined #osdev
xvanc has quit [Remote host closed the connection]
<heat>
again, what a great nap
<heat>
this is neat
<zid>
heat what do I do now I am an amd fanboi
troseman has joined #osdev
<heat>
OH
<heat>
I have a benchmark for you to run zid
<zid>
kk
<heat>
1) install google benchmark (probably just "benchmark on your gentoo thingy)
zaquest has quit [Remote host closed the connection]
<zid>
I've not got vmware installed yet
<zid>
but now I can do vmware 17!
<heat>
ok do that then
<heat>
i wanna test how rep movsb works in your new shiny thing
<heat>
5800x right?
<zid>
*exctracts some zips to rar parts* *extracts some rars*
<geist>
general observation: if you're benchmarking your routines you *really* want to also benchmarks unaligned bits
<geist>
doubleplus so on memcpy. it's easy to build super fast ass routines that work great when everything is aligned and collapse to nothing otherwise
<heat>
yeah
<heat>
but I think that in this case you just want to do unaligned stores
<geist>
what i have done for my test hardness is allocate a large buffer by some overshoot and then run with varying stc and dst offsets
<heat>
per mjg
<geist>
well, sure, but that's the point. if you're making a fast implementation you have to be able to deal with all of them
<heat>
btw could you run this too geist? on your zen
<geist>
what kinda zen are you interested in? i dont have a 4, only up through a 3
<heat>
yeah 3 works, just want to make sure zid's vm isn't influencing the results
<geist>
ah
<heat>
not that it *should*
<geist>
yah can't quite this minute but might in a little bit
<heat>
i'm fairly sure the benching hot loop doesn't do rdtsc, etc. but it's really weird that speed just falls off a cliff in 4096 -> 8192
<heat>
yeah thats fine
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xvanc has joined #osdev
<heat>
surely this cant be a cache thing, 32KiB L1 per core
<geist>
i need benchmark.h
<geist>
and probably whatever that came with
<heat>
google benchmark
<heat>
probably just sudo apt install benchmark? or similar, usually named "benchmark"
<ghostbuster>
dumb question but what does it mean to say the stack is aligned, eg. on a 16-byte boundary. is it that ESP must be evenly divisible by 16? or EBP-ESP? or both?
<heat>
yeah those results seem to match up
<heat>
with, erm, logic
<Mutabah>
ghostbuster: ESP must be evenly divisible
<ghostbuster>
ty
<Mutabah>
and EBP will most likely also be... if frame pointers are in use
<heat>
no, ebp will most likely be misaligned
<heat>
wait, actually
<heat>
per x86_64 sysv, push %rbp should re-align the stack
<Mutabah>
yep.
<heat>
but ebp should still be misaligned i think
<geist>
not so sure. or, it may be that there is no such requireent to ebp
<geist>
but rsp being aligned is
<Mutabah>
The prelude is usually `push %rbp; mov %rbp, %rsp`
ne0ac2g_ has joined #osdev
ne0ac2g has quit [Ping timeout: 260 seconds]
slidercrank has quit [Ping timeout: 248 seconds]
heat has quit [Ping timeout: 248 seconds]
bradd has joined #osdev
sympt5 has joined #osdev
xvanc has quit []
sympt has quit [Ping timeout: 255 seconds]
sympt5 is now known as sympt
slidercrank has joined #osdev
vdamewood has joined #osdev
levitating has quit [Ping timeout: 276 seconds]
levitating has joined #osdev
ne0ac2g has joined #osdev
LostCarcosa has joined #osdev
ne0ac2g_ has quit [Ping timeout: 248 seconds]
bgs has joined #osdev
nlocalhost has joined #osdev
sympt has quit [Ping timeout: 276 seconds]
LostCarcosa has quit [Remote host closed the connection]
xvmt has quit [Read error: Connection reset by peer]
xvmt has joined #osdev
slidercrank has quit [Quit: Why not ask me about Sevastopol's safety protocols?]
slidercrank has joined #osdev
ne0ac2g has quit [Quit: WeeChat 3.8]
ne0ac2g has joined #osdev
ne0ac2g has quit [Client Quit]
danilogondolfo has joined #osdev
marshmallow has quit [Quit: ZNC 1.9.x-git-170-9be0cae1 - https://znc.in]
GeDaMo has joined #osdev
marshmallow has joined #osdev
gog has joined #osdev
marshmallow has quit [Quit: ZNC 1.9.x-git-170-9be0cae1 - https://znc.in]
marshmallow has joined #osdev
bauen1 has quit [Ping timeout: 268 seconds]
vdamewood has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
marshmallow has quit [Quit: ZNC 1.9.x-git-170-9be0cae1 - https://znc.in]
nyah has joined #osdev
theWeaver has quit [Quit: fuck fuck fucking fuck shit fuck]
marshmallow has joined #osdev
slidercrank has quit [Remote host closed the connection]
slidercrank has joined #osdev
<zid>
heat's not gu nna believe what the new bench.cpp does lol
<zid>
it now drops off a cliff still, but at 16k instead of 4k
Terlisimo has quit [Quit: Connection reset by beer]
Terlisimo has joined #osdev
bauen1 has joined #osdev
wand has quit [Ping timeout: 255 seconds]
craigo has joined #osdev
brunothedev has joined #osdev
bauen1 has quit [Ping timeout: 248 seconds]
kivikakk has quit [Ping timeout: 255 seconds]
kivikakk has joined #osdev
levitating has quit [Ping timeout: 255 seconds]
levitating has joined #osdev
IdentityInFlux has joined #osdev
bauen1 has joined #osdev
<brunothedev>
i think i am gonna make a virtual 8086 mode to write my vesa driver
<brunothedev>
multiboot framebuffer is too much of a hastle
<gog>
i guarantee you v86 mode is going to be more of a hassle
<brunothedev>
gog: then pure real-mode
<gog>
more hassle
<gog>
and neither technique is forward-compatible
<brunothedev>
ok, so can you reference me some os who uses multiboot_tag_framebuffer, the example code by grub is very weird, and dont draw actual things
<gog>
i don't have a reference
<gog>
personally i use EFI GOP to get the framebuffer properties
<gog>
the principle is the same though
<brunothedev>
gog: so, no simple os that uses multiboot_tag_framebuffer
<gog>
well, anyway, int10h v86 or real mode is going to be more difficult and slower than than a planar bitmap
<brunothedev>
oh well, still, i am gonna try vesa, think i am gonna write assembly code who sets the thing in real mode and then provide as args on a c function
<gog>
that's what grub is doing for you but ok
<brunothedev>
i've also seen multiboot_tag_vbe too
<brunothedev>
vbe has more docs, but there is no docs on ^
<gog>
ok
<gog>
i'm not gonna tell you not to do something but the framebuffer tag is way easier if all you want to do is draw some stuff on screen
<gog>
the vbe tag is lower-level and i guarantee you're going to have a worse time with that than you will understanding what you're doing wrong with the framebuffer tag
sylviabsd has joined #osdev
Left_Turn has joined #osdev
<brunothedev>
what is the best resolution for a 80x24 terminal?
<brunothedev>
so that i can write a good "findmode" function
<gog>
depends on the font size
les has quit [Quit: Adios]
slidercrank has quit [Read error: Connection reset by peer]
<brunothedev>
8x8 asounds good
<gog>
80x24 iirc was the 640x400 CGA
les has joined #osdev
<gog>
that would be 8x12 for 640x400
<gog>
8x13 for 640x480
<gog>
but these are legacy modes
<gog>
my code just uses 8x13 font on whatever size it gets because i just used a font i found
brunothedev has quit [Quit: WeeChat 3.6]
funno has joined #osdev
<funno>
checking for bison 3.0.4 or newer... 3.8.2, bad
<funno>
configure: error: Building gprofng requires bison 3.0.4 or later.
<funno>
Hello, I'm trying to build binutils on Ubuntu as described here https://wiki.osdev.org/Building_GCC but my bison version seems too new? I get this error ^
<bslsk05>
wiki.osdev.org: Building GCC - OSDev Wiki
<bslsk05>
github.com: RetroArch/cheat_manager.c at 7e74d830ca97ccfdf18395e95bd9130b8046ff5f · libretro/RetroArch · GitHub
<bnchs>
holy shit, they don't use shifts, they use MULTIPLY
<bnchs>
like * 256 * 256 * 256 * 256
<sham1>
That's horrible, although it does work obviously
<bnchs>
yeah, it does work, but that sounds horribly inefficient than shifting
<bnchs>
lest the compiler doesn't optimize it
<sham1>
How would it be inefficient? The compiler would optimise that. It knows that that's 2^8 * 2^8 * 2^8 * 2^8 = 2^32
<bnchs>
i mean if the compiler doesn't optimize it
<nortti>
I think that's pretty unlikely. it can be implemented as two peephole passes (constant folding, conversion of multiplies to shifts), and I'd expect any compiler able to build retroarch to implement peephole optimization
<bnchs>
true
Brnocrist has quit [Ping timeout: 246 seconds]
Vercas has quit [Remote host closed the connection]
Vercas has joined #osdev
<heat>
i'm a HACKER
<heat>
I use shifts
<bnchs>
heat: i shift my ass in chairs, is that how it works?
<heat>
yes
theboringkid has joined #osdev
shikhin has quit [Quit: Quittin'.]
shikhin has joined #osdev
theboringkid has quit [Ping timeout: 255 seconds]
bauen1 has joined #osdev
eddof13 has joined #osdev
slidercrank has quit [Ping timeout: 268 seconds]
Arthuria has joined #osdev
gog has quit [Quit: Konversation terminated!]
sylviabsd has joined #osdev
sylviabsd is now known as sylvbsd
xenos1984 has quit [Ping timeout: 248 seconds]
xenos1984 has joined #osdev
<bnchs>
hi friends
<bnchs>
and people who are not friends
<zid>
heat: I need more benchmarks
sylvbsd has quit [Remote host closed the connection]
demindiro has joined #osdev
<mjg>
did osmeone say benchmark?
<mjg>
> Benchmarking; by which I mean any computer system that is driven by a controlled workload, is the ultimate in performance testing and simulation. Aside from being a form of institutionalized cheating, it also offer countless opportunities for systematic mistakes in the way the workloads are applied and the resulting measurements interpreted.
<mjg>
:S
foudfou has joined #osdev
<heat>
mjg, did you see the weird unaligned ERMS results on ryzen?
<heat>
its bizarre
<heat>
i guess i'll need to find a way to align it here
<mjg>
now
<mjg>
no
<mjg>
where
<demindiro>
heat: which ryzen CPU?
<mjg>
did not i mention rep likes aligned bufs?
<mjg>
ignoring fsrm
<mjg>
16 bytes minimum
<demindiro>
With ermsb it should matter less / not at all though
<heat>
mjg, erms is blind rep movsb, memcpy is glibc memcpy, our_memcpy = my GPR-only+erms memcpy
<mjg>
so what's the alignment of the target buf
<heat>
whatever new[] was giving me
<mjg>
's not the way to bench dawg
<heat>
it's very interesting how ERMS starts sucking after 4K
<mjg>
you aligned_alloc to control it
<heat>
like look at that shit, why
<mjg>
this format is shit to read mate
<heat>
why
<mjg>
also does not help mb vs gb
<mjg>
woudl be best to graph it
<heat>
lmao
<heat>
do you want a powerpoint too?
<mjg>
dude get some basic gnuplot fu
<mjg>
it really is not difficult
<heat>
anyway i probably want to align erms
<heat>
but to what? I see you align to 16
<heat>
it doesn't help that the amd opt manual is completely silent about any of this
<sham1>
Why do a PowerPoint when Jupyter do the job
<mjg>
i found haswell is affected by anything < 32
<mjg>
newer archs are fine with just 16
<mjg>
no clue about amd
<mjg>
i picked 16 as a tradeoff
<mjg>
it already helps evne on haswell
<mjg>
and i could not be fucked o timplement more and runtime switch on it
<mjg>
on that note, i gave slight thought to that comparison of addresses target vs source upfront
<mjg>
even if direction of copying affects stuff, i'm 99% confident the very fact there is a branch and a possible mispredict on it
<mjg>
maeks the check pessimal
<mjg>
it possibly makes sense if you are resorting to rep
<mjg>
that will is ot verified, along with the abve claim
<mjg>
that is to be verified*
<mjg>
wtf
<mjg>
i'm trying to declutter my backlog here though
<mjg>
and the fact that automemcpy machinery des not work ootb is not helping
<mjg>
re gnuplot, split this one func per file
<heat>
i'm not plotting for you, sorry
<heat>
i can read this just fine
<mjg>
lol
<mjg>
i'm sayin give yourself a shot at plottin, you will see it is EZAF
<mjg>
and if you don';t like it anyway, so be it
<heat>
i use google benchmark because it's the easiest and highest quality framework for me to use
<heat>
i'm not going to handroll some shitty code for gnuplot
<heat>
in fact this thing can spit out json and csv so if you really want to, glhf
<heat>
you can literally use this in ppt :))
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xenos1984 has quit [Ping timeout: 246 seconds]
<mjg>
i would think that's boomer
<mjg>
grew up without a graphical interface and now does not want graphs
<mjg>
btw gnuplot can do ascii :p
<mjg>
and here you are, genz. is that neoboomer?
<mjg>
anyhow a benchmark were yu did not control aigment for the target buffer is totally geezered
<mjg>
also you probably want falign-loops=32
<heat>
you're so fucking annoying it's not even funny
<mjg>
see the above quote
<heat>
you are the real unix geezer
<mjg>
> Benchmarking; by which I mean any computer system that is driven by a controlled workload, is the ultimate in performance testing and simulation. Aside from being a form of institutionalized cheating, it also offer countless opportunities for systematic mistakes in the way the workloads are applied and the resulting measurements interpreted.
<mjg>
it is hard to do a sensible test for things like this. by not controlling for the stuff like i mentioned above you are not even trying
demindiro has quit [Ping timeout: 260 seconds]
<bnchs>
did retroarch just suddenly become worse?
<bnchs>
>trying to modify the memory value for current level to 5
<bnchs>
>get taken to the 8th circle of hell, because retroarch makes it 327680
<heat>
I have realised my rename is not implemented correctly and is not atomic
<heat>
yay?
<mjg>
ok mjg@
eddof13 has joined #osdev
<heat>
i'm fairly scared of touching any of my dcache code
<heat>
basically so full of fucking locks, most of which I don't even remember what they cover
<mjg>
they cover pragmatically picked vars
<zid>
mjg is broken
<zid>
he didn't say pessimal in that sentence
[itchyjunk] has quit [Ping timeout: 255 seconds]
[itchyjunk] has joined #osdev
<heat>
mjg is pessimal
<zid>
my audio is dropping out, look at my VM to see what it's doing
<zid>
"emerge: (433 of 589) dev-lang/rust-1.68.1 Compile"
theboringkid has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 255 seconds]
Lumia has joined #osdev
<geist>
rUUUUST
Lumia has quit [Ping timeout: 252 seconds]
Lumia has joined #osdev
theboringkid has quit [Quit: Bye]
theboringkid has joined #osdev
<zid>
I ran out of thermal paste at last, got some mx-4 for my Q6600
<zid>
I quickly googled for a graph in case any of the modern brands are any better than 20 year old stuff
<zid>
nope, mayonnaise beats noctua.
<geist>
huh really? was gonna say noctua is okay
<zid>
It's basically "Is it wet? Yes? Then within a tenth of a degree"
<geist>
well, sure. but there is also whether or not it'll remain that way in a week or a year
<geist>
obbiously mayonaise will work, but it'll dry out, etc
<zid>
yea that's why they exist
<zid>
but it's funny still
<geist>
yah
<geist>
my guess is the way you apply it is probably generally more important
<geist>
and i honestly dunno if i ever do the right thing nowadays. too much? not enough? beats me!
<geist>
also i wonder if i should every year or so reapply the stuff
<zid>
I think it's basically self correcting
<zid>
as long as you have enough mounting pressure you're good to go
<zid>
as theoretically it only exists to fill voids
<geist>
yah, unless you put way too little i guess
<geist>
but i usually do the fairly decent sized blob in the middle and it seems to spread out properly, so i think i'm basically doing the right thing
<geist>
doesn't seem that smearing it out ahead of time or whatnot really makes a difference
<zid>
yea it's funny to watch people fight over the best 'technique'
<zid>
I've always done 'just squirt it around a bit until it looks like the last frame of a porno'
<zid>
works great
<geist>
it's possible there's a teeensy bit of difference if you're extreme overclocking
<geist>
like too much may actually not like it touch as efficiency as it could, etc etc. but yeah, i think for the vast majority of cases you're within a C or two of ideal if you just get some of it basically on there
<zid>
Butter the toats.
<zid>
I think the weird pattern people might actually end up having air bubbles sometimes
<geist>
but annoyingly i think it might matter a teensy bit for Zen 4 vs other cores at the moment, since zen 4 will run right up to the thermal limit and then throttle itself, and it's designed to do that
<zid>
yea all modern cpus are
<geist>
not entirely, actually. zen 4 takes it to the next level
<zid>
derbaur dropped a chat with an intel engineer.. today
<zid>
saying they do exactly the same thing too
<zid>
and any wasted heat below the limit is unused potential
<geist>
zen 4 *wants* you to go right to the limit, and that's part of the design, whereas a lot of the other fairly modern stuff is more like they'll throttle to avoid damange
<geist>
possible the 13th gen intel stuff is more okay with it
<geist>
and laptops yeah have been doing that sort of thing for a while
<zid>
That they used to design for 100C once you saturated the part entirely in heat over 20 minutes, but now the power density is so high and the heat governer exists etc so they just turbo up to 'hot' then stay there by modulating freq
<geist>
but in that particular situation, the cooler and effiiency of it actually does equate to more 'speed' out of your core
<zid>
I have package temp 60C but 30C core temps cus.. power density hotspots
<geist>
yah when i unlock PBO on my 5950x it'll eventually get up to 80C or so after a bit of running, but i'm okay with that
<geist>
normally it runs a nice 60-70C when under load
<zid>
I'm up to 75C, building llvm
<zid>
but the L3 is only at 40C, millimeters away
<zid>
power density ho
<geist>
yah
<zid>
I think I'm good to ignore my thermal paste situation until I can be bothered to play around with overclocking
<zid>
70C on a chip that's actively trying to be hot is great
<geist>
yah agreed
<zid>
I was going to get a 'new' cooler for it but prices were absolutely nuts
<zid>
£150 for an aio, I can get the full radiator from a ford focus for £25
<zid>
So I ended up finding a £6 bracket adapter for my 212
<zid>
(and it was delivered within 12 hours, heh)
Turn_Left has quit [Ping timeout: 276 seconds]
Lumia has quit [Remote host closed the connection]
Lumia has joined #osdev
<mjg>
zid: can you strace -fo /tmp/crap emerge media-sound/rexima
<mjg>
zid: it is an almost hello-world port
<zid>
(562 of 589)
<zid>
maybe soon
slidercrank has joined #osdev
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
ZombieChicken has joined #osdev
<heat>
zid: can you send me one of your kidneys
<heat>
i need it for a benchmark
ZombieChicken has quit [Quit: WeeChat 3.8]
theboringkid has quit [Quit: Bye]
brunothedev has joined #osdev
<brunothedev>
to write my vbe driver, i am going to real mode, make a call, store the info, go into protected mode, make a call to my c function and provide the info as args, does this works?
<heat>
🚨🚨🚨 bad idea alert 🚨🚨🚨
<brunothedev>
heat: i love bad ideas, i am one myself, tho, does it compile and works?
<nortti>
if you want to make your life worse for zero benefit, I think so, though you need to maintain real mode environment intact into your kernek
<heat>
fuck do i know
<heat>
please stop
<nortti>
*kernel
<nortti>
which might necesitate writing your own bootloader since I don't know if grub might have already trampled over that by the time you hit your kernel entry point
<heat>
do understand that you're very much alone if everyone tells you "its a bad idea" and you go ahead and do it
<brunothedev>
heat: is that i have no other options
<heat>
yes you fucking do
<brunothedev>
heat: what?
<heat>
klange has been through it with you like 4 times
<heat>
multiboot 1 and 2 give you a framebuffer
<heat>
please use it
<brunothedev>
ok so what simple os uses it? The grub example is not a good reference
<heat>
yes it is
<nortti>
what have you gotten working thus far? I've not fully followed all this conversation but you are able to get the framebuffer address and its parameters, right? have you been able to blast some garbage onto the screen yet?
<nortti>
(not a value judgement on what your OS is going to do, literally just "can you write random bytes and have that cause an effect on-screen?")
<brunothedev>
nortti: the grub example at best nearly hides the software to write a pixel, and at worst dont have a implementaion for it
<bnchs>
heat: so what if you listen to the alphabet
<bnchs>
A, B, C.....
<heat>
D
<heat>
heheheheehehehehehe
<sham1>
heat: tbf, that signature for printf is semantically valid, you do want at least to have a '\
<sham1>
A \0 there
<nortti>
yeah, the coding style advocated by modern c makes sense, even if it is unconventional
<brunothedev>
most learning c resources should be called: Learning libc (and a little bit of c)
<heat>
it's a travesty
<heat>
it is barely C
<nortti>
in the sense that C sucks majorly and that sucks marginally less, yes
<heat>
how does it suck less?
<heat>
please parse the syntax "char const format[static 1]"
<nortti>
it makes a part of the interface that would traditionally be left implicit part of the type system
<heat>
wth is the static and the 1?
<heat>
why are keywords inside []
<nortti>
"at least one char"
<nortti>
it's part of c99 iirc
<heat>
how is it at least? this is not consistent with any other bit of the language
<nortti>
yeah, it's a messy syntax due to backcompat (can't have new resrved words unless they're _Reserved, aiui ppl were already putting shit in there and expecting it to do nothing)
<nortti>
so why not repurpose the one that already has two different meanings
<heat>
because it looks horrible and makes no sense
<brunothedev>
it is funny how a recommendation to i read an old c book sparked a c specifications argument
<heat>
file scope static makes sense, block scope static isn't too great but still makes some sense, static to denote "at least N elements" does not make sense
<nortti>
do you have a better suggestion for how to mark it, given the constraints?
<heat>
define a new keyword and stop being stupidly backwards compat
<heat>
or new syntax
<mjg>
heat: so according to agner that up/down thing is about bypassing false memory dependency problems
<mjg>
i can slap together a bench which intentinally runs into them
<sham1>
heat: static there is yet another way that keyword is being overloaded. But yeah, it means that the pointer points to a thing that has at least one element. I.e. it's not a NULL
<mjg>
we will see what happens
<heat>
mjg, what up/down thing?
<sham1>
Also IIRC the correct one would be "int printf(char format[const 1], ...);"
<nortti>
wait, printf is not defined to not mutate the format string?
<sham1>
Because if printf modifies the format string, that'd be just some veritable BS
<heat>
it cant mutate the format string
<nortti>
yeah, posix uses const char *restrict format, even
<sham1>
That's some veritable BS on the standard's part
<mjg>
heat: if (dst < src)
<mjg>
in memcpy
<nortti>
sham1: hm?
<brunothedev>
is there any os that use multiboot_tag_framebuffer? Literally anyone simple enough to understand the code
<mjg>
totally gonna check for it now
<heat>
learn C
<sham1>
nortti: it's absolutely disgusting and it shouldn't be like that.
<brunothedev>
heat: i asked for a os that uses the thing, this is not a c problem
<heat>
yes it's a C problem because you clearly don't understand pointers
<nortti>
sham1: wait, I just read you wrote `[const 1]` and not `[static 1]`, are you saying the standard should express a const char* with const inside the brackets instead of outside them?
<brunothedev>
heat: pointers are a reference to a memory address
<bnchs>
brunothedev: the hint is, you cast the void pointer to a pointer of your type, aka uint32_t
<sham1>
nortti: yes.
xenos1984 has quit [Read error: Connection reset by peer]
<heat>
i'm fairly sure char str[const 10] is correct
<heat>
no idea if char const str[10] is semantically the same thing
<brunothedev>
bnchs: oh ok, i thought pointers in this context is just a pointer to a certainmemory address that i can write literally anything
<nortti>
heat: I think char const str[10] is semantically same as char const *str, that is, without static it's just ignored
<sham1>
In a parameter listing like this one, char format[const 1] is basically just const char *format, except that the compiler is allowed to assume that there is at least one element there
<sham1>
And yeah, const str[10] is just a lie in a parameter context
Lumia has quit [Ping timeout: 248 seconds]
<heat>
mjg, anyway erm, isn't all that stuff supposed to be memmove?
<sham1>
Or was it equivalent to char *const format. I don't remember, I'll admit
<sham1>
But yeah, projects like LLVM treat foo bar[static 1] as basically saying "this cannot be NULL" and for example clang will give you a warning if it can prove that you're maybe possibly passing one in
<sham1>
You can even put "restrict" within the square brackets there and suddenly it's restrict-qualified
<nortti>
sham1: afaict, looking at C17, `char foo[const 10]` is equivalent to `char * const foo`
<nortti>
that is, the function body is allowed to do *foo = 0, but not foo = 0
<sham1>
Yeah okay, so for printf the actual thing to do would be "int printf(const char format[static 1], ...)"
<nortti>
yeah
<sham1>
Or at least that's my opinionated take on it, because to me modifying the format string is heresy
<heat>
we should make rodata writeable
<nortti>
read-ourite data
<sham1>
On a related note, I need to figure out how to have ld separate .rodata from .text, just so I can make .rodata not executable
<sham1>
So it'd be its very own program segment
xenos1984 has joined #osdev
<heat>
doesn't yours do it by default?
<sham1>
Nah, it just shoves it into the R-X segment alongside .text. Not to mention that also happening outside of OSDev as well like with Linux binaries
<heat>
-z separate-code
<sham1>
Ah. Good to know
<heat>
i think that should work, but please try
dude12312414 has joined #osdev
craigo has quit [Ping timeout: 252 seconds]
kof123 has left #osdev [#osdev]
brunothedev has left #osdev [j'aime de onion frite a huile!]
brunothedev has joined #osdev
bgs has quit [Remote host closed the connection]
brunothedev has left #osdev [as a troll, my mission is to fill libera.chat #osdev room with some thing, here a song: I was born in a Dublin street, where the loyal drums did beat,]
brunothedev has joined #osdev
<moon-child>
'Obvious oversights. Textbook mistakes. Surely not in the OpenBSD console code?'
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]