<netbsduser>
well, this is a new one to me (for some reason happens when using KVM acceleration and writing back the value of the higher part of a 64-bit bar's place in config space, after having written all 1s and read it to determine length)
<zid>
looks like a case if you needing to do it in the other order
<zid>
cus it's trying to move the bar to the intermediate value and it's waaay too high
<zid>
wrapping off the end of the address space
<netbsduser>
no luck that way either unfortunately
<zid>
64bit write? :P
<heat>
did you try disabling memory decode while touching those BARs?
<zid>
oh that's a thing you can do?
<heat>
yes
<zid>
that sounds like an excellent idea
<heat>
it's a thing you should do per the spec
<netbsduser>
that sounds like an excellent suggestion
<netbsduser>
yeah, did the trick, cheers heat
<heat>
:)) np
<heat>
what device is this btw?
<zid>
I take it that's just in the pcie config space somwhere?
<zid>
Don't recall noticing it before
<heat>
i've never seen qemu behave like this
<heat>
zid, command register for each reg
<heat>
s/reg/device/
<zid>
that sounds like pcie config space
<heat>
yes
<netbsduser>
it's virtio-fs, this is the first time i ran into this issue
<heat>
yeah, I guess setting some virtio BARs wildly may have different effects
vinleod has joined #osdev
vdamewood has quit [Read error: Connection reset by peer]
<zid>
heat did you get me my xeon pencilcase yet
gog has quit [Ping timeout: 246 seconds]
<epony>
you can always reclaim your xenon coloured enis cape anytime from the nearest vendromat
<heat>
no
baine has quit [Ping timeout: 255 seconds]
baine has joined #osdev
gabi-250_ has quit [Remote host closed the connection]
<bslsk05>
github.com: bootloader/boot.s at main · rust-osdev/bootloader · GitHub
<mrvn>
.oO(Do you trust a project that starts by lying about it's contents?)
<gog>
it's not really that hard to roll your own if you intend to support UEFI
<gog>
if you just want something that'll get files into memory
<mrvn>
but then you have to suffer PE
<Irvise_>
mrvn: I think you meant ilovethinking :)
<mrvn>
Irvise_: If he now starts writing a bootloader then that is a gog problem
<Irvise_>
mrvn: I mean that maybe you wanted to ping "ilove...". I have not spoken here for a while x) and I have not been following this discussion :)
<mrvn>
oh, right. sorry. stupid tab completion
<Irvise_>
No worries, happens to all of us :)
<gog>
:D
<gog>
they pinged out
<gog>
also i will not recommend him to do that because i don't want to help with that because it's hard to debug
<gog>
i only reluctantly change mine now because it works and i don't want to attempt debugging it again
slidercrank has joined #osdev
<pitust>
why is he so set on NOT using limine though
mctpyt has joined #osdev
<sham1>
Maybe it's too liminal
<gog>
because he thinks it's the reason he's having stack problems
<gog>
rather than not really knowing what he's doing and just changing random things in a pre-existing codebase he doesn't understand very well
<gog>
which is fine
<zid>
which amazing individual is it this time
<gog>
the thinking lover
<zid>
ah, the thinker
<gog>
the loving thinker
<gog>
like it's fine to not understand the code you're working with
<gog>
but it's not helping to just come here and repeatedly have the same complaint
<zid>
The only thing up for debate is whether he's incapable or just inept
<gog>
i don't think i can judge incapacity, but ineptitude yeah
<gog>
he doesn't really seem to understand programming very well conceptually
<gog>
ineptitude is fine too
<gog>
just takes work to overcome
<sham1>
Definition of insanity being that you keep doing the same thing over and over again expecting things to change
Ellenor is now known as AmyMalik
<gog>
instead of begging for people to tell you
<mrvn>
sham1: Definition of scientist being that you keep doing the same thing over and over again checking if things change.
<mrvn>
it's a thing line between genius and insanity :)
<mrvn>
thin even
sebonirc has quit [Ping timeout: 252 seconds]
randm has quit [Ping timeout: 252 seconds]
sebonirc has joined #osdev
Irvise_ has quit [Ping timeout: 246 seconds]
yuriko has quit [Ping timeout: 246 seconds]
novasharper has quit [Ping timeout: 252 seconds]
divine has quit [Ping timeout: 252 seconds]
selve has quit [Ping timeout: 252 seconds]
sham1 has quit [Ping timeout: 248 seconds]
acharles has quit [Ping timeout: 264 seconds]
divine has joined #osdev
chibill has quit [Ping timeout: 265 seconds]
sakasama has quit [Ping timeout: 264 seconds]
friedy has joined #osdev
randm has joined #osdev
thinkpol has quit [Remote host closed the connection]
heat has joined #osdev
thinkpol has joined #osdev
yuriko has joined #osdev
<friedy>
Hi guys, I'm doing some work with the image sensor processor on the RK3399 soc in Linux. I'm trying to access the control registers for the ISP, so I mapped in the registers with ioremap like normal. But for some reason when I try to read from that region of memory readl() doesn't return and the system hangs. I've never had this happen to me
<friedy>
before, so I don't know why this is happening.
<mrvn>
then maybe ask opn a linux channel
<bnchs>
mew
<bnchs>
i should focus on one thing instead of trying to multitask
<bnchs>
ugh think brain THINK
<heat>
gog
<gog>
heat
<gog>
what's shakin
<heat>
nothing
<heat>
everything seems pretty stable and motionless to me
<gog>
that's good
mctpyt has quit [Ping timeout: 248 seconds]
Irvise_ has joined #osdev
<mrvn>
heat: if the earth has stopped shakin then the reports that the core has stopped rotating must be true.,
kfv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dude12312414 has quit [Remote host closed the connection]
chibill has joined #osdev
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
baine has joined #osdev
kristinam has quit [Ping timeout: 248 seconds]
kristinam has joined #osdev
SerHack has quit [Ping timeout: 255 seconds]
bliminse_ has joined #osdev
danilogondolfo has quit [*.net *.split]
sebonirc has quit [*.net *.split]
alpha2023 has quit [*.net *.split]
qxz2 has quit [*.net *.split]
Terlisimo has quit [*.net *.split]
bliminse has quit [*.net *.split]
frkazoid333 has quit [*.net *.split]
Amanieu has quit [*.net *.split]
tomaw has quit [*.net *.split]
ghostbuster has quit [*.net *.split]
colona_ has quit [*.net *.split]
XgF has quit [*.net *.split]
Ameisen has quit [*.net *.split]
ceremony has quit [*.net *.split]
troseman has quit [*.net *.split]
rb has quit [*.net *.split]
jeaye has quit [*.net *.split]
LambdaComplex has quit [*.net *.split]
moberg has quit [*.net *.split]
doppler has quit [*.net *.split]
jeaye has joined #osdev
danilogondolfo has joined #osdev
qxz2 has joined #osdev
alpha2023 has joined #osdev
Terlisimo has joined #osdev
ceremony has joined #osdev
Amanieu has joined #osdev
frkazoid333 has joined #osdev
tomaw has joined #osdev
colona_ has joined #osdev
XgF has joined #osdev
Ameisen has joined #osdev
troseman has joined #osdev
ghostbuster has joined #osdev
rb has joined #osdev
LambdaComplex has joined #osdev
moberg has joined #osdev
doppler has joined #osdev
sebonirc has joined #osdev
frkazoid333 has quit [Remote host closed the connection]
<gog>
:) :) :)
<gog>
i submitted 3 PRs for work
<gog>
i have a 4th cooking
<gog>
productive day
<gog>
i don't think i'll finish it before it's time to go tho
bauen1 has quit [Ping timeout: 246 seconds]
elastic_dog has quit [Remote host closed the connection]
<zid>
I don't think you should tell us how many times you went to the toilet like this
<zid>
it's weird they make you apply to flush it though ngl
elastic_dog has joined #osdev
<gog>
i'll tell you exactly how many times i go to the toilet
<FireFly>
I managed to be sleepy and not really get anything done all day :<
<zid>
I rescued big hat logan from a prison cell
<heat>
nooooooooo
<zid>
I agree, sorcery is a ghastly hobby
<zid>
but needs must
<heat>
are you doing a int build?
<zid>
yes I have 44 int
<zid>
and 9 end
<zid>
I keep getting ganked because I have to stop for stamina in weird spots that I am not used to doing :P
<zid>
I need to put a bullet through seathe so I can get a massively better catalyst
<zid>
seath
<gog>
ok time to go
gog has quit [Quit: Konversation terminated!]
craigo has joined #osdev
selve has joined #osdev
craigo has quit [Client Quit]
frkazoid333 has joined #osdev
ilovethinking has joined #osdev
<ilovethinking>
hey
joe9 has joined #osdev
<heat>
zid, just go dlc?
ilovethinking has quit [Ping timeout: 248 seconds]
bauen1 has joined #osdev
<mjg>
burp
<mjg>
geist: heat: i figured out the one weird trick re rseq et al
<mjg>
geist: heat: you carve out some area, let's call it struct thread_lolstate { } and map pages to fit them. you map rw in userspace and have a *separate* rw mapping in the kernel, perhaps just using the direct map
<mjg>
geist: heat: et voila. with understanding that the content is arbitrarily messed up by userspace, you can still 1. trivially indicate target thread on/off cpu 2. spot being in a rseq or equivalent section
<mjg>
so for examplethe on/off thing -- you would store the addr of the byte against dmap. you go off cpu -- currentthread->user_cpustate = 0; you go on -- currentthread->uesr_cpustate = 1;
<mjg>
et voila mofo
<mjg>
no SMAP trips
<zid>
heat: dlc catalyst is manus'
ilovethinking has joined #osdev
<heat>
mjg, yes
<heat>
that was part of my original idea I'm pretty sure
<mjg>
i don't ercall that bit, but it is pretty obvious in hindsight, so can't rule that out
<mjg>
:]
<zid>
tin is also stronger than manus for the spells I actually have
<heat>
mjg, but rseq people clearly didn't agree so clac/stac it is!
<mjg>
i don't know the upsteram rseq discussion
<heat>
me neither but the solution is kind of stupid
<mjg>
i don't know what they did specifically either
<mjg>
but it being crap would not be out of the question
<mjg>
there is a history of people coming to their senses later
<heat>
the problem with using struct thread_lolstate is that you need some sort of primitive RCU there
<mjg>
you don't if you have uucopy
<heat>
but I don't want uucopy
<heat>
nor is it any sort of actual valid solution for linux
<mjg>
anyhow, my idea for rseq would be store the address of magic table in mythread->magicrseqtable
<mjg>
et voila
<mjg>
one branch neeed in kernel to figure out you are in a section
<mjg>
and it is all laid out
<heat>
a good question is who defines the layout
<mjg>
no fences (modulo compiler fence) neeeded either
<heat>
if the kernel does, you need some versioning system to keep track of various valid ABI layouts for that crap
<mjg>
that is the downside, you would probably bool isoncpu; rseq_shit_goes_here; char spare[FUNNYNUM]; }
<mjg>
this is the classic syscall debacle
<mjg>
see the venerable stat problem
<heat>
i was thinking of just having a version num
<mjg>
version will be needed anyway if spares run out\
<heat>
no reason why anyone would want to pay for [FUNNYNUM] of crap forever
<heat>
except *maybe* to increment the version slower
<mjg>
it is not perfect buti t is how things are done
<mjg>
also note if you have to branch on version to know what to do
<mjg>
you are already slowing things down
<mjg>
so tradeoffs
<mjg>
funnyonym could align it up to a cacheline
<mjg>
or two
<heat>
you are slowing things down, but it's just a single branch, that's ok really
<heat>
at least IMO
<mjg>
it is a switch statement
<mjg>
with one branch for each version
<zid>
you two should just get married or something idk
<heat>
and I don't think real world measurements would show it has impact
<mjg>
now that's geezer
<heat>
i need a patch before I can actually measure
<heat>
sorry
<mjg>
you need to demonstrate benefit for adding a branch toa cmmon hot path
<mjg>
it may be real versioning is worth it
<mjg>
geezer thing is to assume what's the problem adding branchez
<mjg>
it is how you end up with slowness evrywhere
<heat>
like the real problem here is that you would end up locking extra memory
<heat>
and how that may influence mlock limits
<mjg>
i already ocmmented on mlock
<heat>
if you make this thread page count for mlock you start severely thread limiting and breaking users
<mjg>
you don't
<mjg>
... count iin mlock
<mjg>
you add a rlimit for threads per user
<heat>
can't do that
<mjg>
which should be present anyway regardless of any of this
<mjg>
sure you can
<mjg>
and then that limit implicitly limits extra pages you slap in there
<heat>
you keep picturing a nice pretty green field with sun
<heat>
i picture actually merging this to upstream linux
<mjg>
what's the problem adding a rlimit for threads
<mjg>
you do know linxu already has a de facto rlimit for threads
<mjg>
which is their nproc limit
<mjg>
due to the artifact of their implementation which they never cleaned up
<heat>
right
<mjg>
so i had freebsd in mind here fwiw
<mjg>
which does not
<heat>
max user processes (-u) 31222
<mjg>
that's nothing. this has to work for literally 1 million or more
<heat>
gives me around 1952KiB for an "ideal" struct with size = 64 (cache line size)
<heat>
this is ways off of the mlock limit
<heat>
... actually, maybe it's not?
<mjg>
do not count this towards mlock
<mjg>
you dn't count kernel-side stack pages to mlock, do you?
<heat>
you do not
<heat>
but this is atm a rw page
<mjg>
and you don't swpa hem out either
<mjg>
by you i mean linux
<mjg>
:]
<heat>
at least mark it RO
<mrvn>
mjg: why would you need that versioning thing? can't you wrap the user side in vdso so any changes can be made transparent to the user space binary?
<mjg>
so i don't see any benefit to counting this towards mlock. i do agree there has to be a limit of sorts and for that see the tread limit
<mjg>
mrvn: for sme of it you could
<mjg>
mrvn: but you would not want that for the rseq thing as it wouldbe extra 2 func calls
<mjg>
mrvn: to set it up and clean it up
<mjg>
opposed to a plain store twice
<heat>
the problem here is (I think) to avoid accidental wild resource exhaustion exploits through "haha I can mlock 2MiB pretty easily"
<heat>
otoh, kernel stacks are a good counter point
<mjg>
you do realize this requires spawning fuckton of threads
<heat>
this is not an easy problem
<heat>
yes I do
<mjg>
and the extra memory stemming from the above is a very small addition
<mjg>
stack aside it is literally kilobytes to get ne thread going
<mrvn>
mjg: 2 functions calls used once. Or are you setting this up over and over?
<mjg>
mrvn: over and over, for example for malloc fast path
<mrvn>
mjg: that would register the mapping once and then directly access the pages.
<mjg>
what?
<mjg>
i don't think we are on the same page
<mjg>
regardless of size
<mrvn>
likely
<mjg>
well i throuwn my idea out there
<mjg>
time to do some work now
danilogondolfo has quit [Remote host closed the connection]
<mrvn>
mjg: My thought would be to make the struct rseq_* opaque. The vdso segment provides functions for creating those structures in whatever version flavour the kernel supports using a stable API. It also has the function to setup the shared memory block which returns an "opaque**" and then the malloc() code stores the opaque object there on entry and NULL on exit of the critical section.
<mjg>
but you stil need to know *where* to put it
<mjg>
which is the abi part
<mjg>
and then you are back to versioning
<mrvn>
That's the "opaque**" the setup returned
<mjg>
per thread?
<mjg>
good grief
gog has joined #osdev
<mjg>
i concede this can work but a girl not asked to a dance pretty
<mrvn>
As you said, you have to know where to put it.
<mrvn>
You would set this up as thread local variable with initialization. So that works out of the box without you having to do anything per thread.
<mrvn>
(you == the source code)
<ilovethinking>
im trying to use qemu's -kernel flag but i get an error saying Error loading uncompressed kernel without PVH ELF Note and i compile the assembly files with -f elf64
<ilovethinking>
or is that the incorrect way to do it?
<mrvn>
it's wrong. you need 32bit
<ilovethinking>
but ill be able to jump to long later right?
<mrvn>
You have to setup page tables and switch to long mode yourself.
<ilovethinking>
thanks
<mrvn>
see the wiki
<ilovethinking>
ffs it still pushse the same error :cry:
<ilovethinking>
im just taking a look at this guys mb writeup, he does it with x86_64 somehow?
<bslsk05>
os.phil-opp.com: A minimal Multiboot Kernel | Writing an OS in Rust (First Edition)
epony has quit [Read error: Connection reset by peer]
baine has quit [Ping timeout: 252 seconds]
baine has joined #osdev
<ilovethinking>
i guess it's because he uses xorisso
<ilovethinking>
hmmm
<ilovethinking>
no i have no clue
<gog>
i do not understand elasticsearch even a little
<gog>
but that's not on topic
* geist
pets gog
* gog
prr
<gog>
ilovethinking: -machine type=pc-i440fx-3.1
craigo has joined #osdev
<gog>
i have a confession
<gog>
i've never gotten to long mode from protected mode
<gog>
i've gotten to protected mode from real mode though
xvanc has joined #osdev
<gog>
that's not as annoying
<ilovethinking>
gog: i saw that on the forums but i have no clue what that does
<gog>
does it matter exactly what it does?
<gog>
or that it works and gets you moving forward
<ilovethinking>
i don't think that's the mindset but alright
<ilovethinking>
sure
<gog>
you don't need to perfectly understand every aspect of the tools you're using to develop
<ilovethinking>
alright
epony has joined #osdev
<ilovethinking>
-kernel only supports mb1 right
<gog>
yes
<gog>
so in this case what that -machine argument does is load the qemu-3.1 profile for a pc emulating the i440fx chipset
frkazoid333 has quit [Remote host closed the connection]
<heat>
gog, long mode is ez
<heat>
just set up paging and the appropriate bits (EFER MSR), mov to cr3, now you're in IA-32 compat mode
<heat>
then you switch your code segment to 64-bit, boom, 64-bit
<ilovethinking>
ok so i know why my code doesn't work
<ilovethinking>
it's cuz i have mb2 headers
<ilovethinking>
:kekw:
<heat>
:omegalul:
<heat>
:kappa: :kappapride:
<gog>
loooooomg mode
<gog>
borzoi mode
<mrvn>
sanity mode
<gog>
also that
<gog>
long mode is the most sane mode of the x86
<mrvn>
for the little that is worth
<gog>
i mean
<gog>
you could use 286 protected mode
<gog>
that's bonkers
<CompanionCube>
i mean, protected mode in general is sane, and in the middle there's unreal mode?
<pitust>
ilovethinking: plz don't use grub
<pitust>
and especially not -kernel
<gog>
unreal mode is also wild
<pitust>
not on x86 anyway
<heat>
CompanionCube, protected mode still has a boatload of weird-ass extremely weirdly packed tables and S E G M E N T A T I O N
<gog>
yes
<gog>
which is why i specified 286 protected mode
<gog>
where you do not have the benefit of the mmu
<heat>
i kinda really want to have an old unix-like system with segmentation
<gog>
also unreal mode is more of a liminal space rather than an actual operating mode
<gog>
heat: you absolute madman
<heat>
just a growing brk setting the ds size
<mrvn>
heat: then emulate it, it's easy with the MMU
<heat>
what
<mrvn>
you can also do swapping instead of paging.
<heat>
"i want an old unix-like system with segmentation" "why don't you do that but without segmentation"
<xvanc>
lol
xvanc has quit [Remote host closed the connection]
<geist>
heat: well duh. it doesn't make sense because amigas didn't have segmentation
<geist>
what you're asking is a complete impossibility
xvanc has joined #osdev
<mrvn>
nor did they have MMUs. Not even MPUs because Comodore had to save 50c.
<geist>
*gasp*
<mrvn>
AmigaOS with a Memory Protection Unit would have been so cool.
<geist>
might be worth reading about the MPU, i thought one of the early MPU or MMU chips added a whole extra cycle to mempry accesses
<geist>
and thus wasn't really used by anyone
<geist>
probably the mmu chip
<gog>
mmu
<gog>
(read: mew)
<mrvn>
probably the external MMUs
<mrvn>
but that's a few years down the line from the original Amigas.
<heat>
mooooooooooooooooooooooooooo
<mrvn>
(__)
<mrvn>
/------\/
<mrvn>
(oo)
<mrvn>
/ | ||
<mrvn>
* /\---/\
<mrvn>
~~ ~~
<mrvn>
..."Have you mooed today?"...
<mjg>
:]
<gog>
i want an amiga 3000 :(
<mjg>
wtf no cowsay on this box
<heat>
____________
<heat>
< fork sucks >
<heat>
\ (oo)\_______
<heat>
\ ^__^
<heat>
------------
<geist>
i kinda want one of those old cat clocks
<heat>
(__)\ )\/\
<heat>
||----w |
<heat>
|| ||
<geist>
nice, chopped up heats thing
<heat>
you heard the cow
<mrvn>
you forked it
tomaw has quit [Quit: Quitting]
tomaw has joined #osdev
<gog>
a cat clock
<gog>
like the one where the tail is the pendulum
<gog>
and the eyes go back and forth
<mjg>
fun fact, at my first job there was only a bunch of machines
<mjg>
and each had a unique cowsay output
<mjg>
in motd
<mjg>
with some bullshit said
<mjg>
i miss that
<heat>
________________________
<heat>
< copy_from_user is free >
<heat>
\ (oo)\_______
<heat>
\ ^__^
<heat>
------------------------
<heat>
(__)\ )\/\
<heat>
||----w |
<heat>
|| ||
<heat>
^^mjg
<mjg>
it is free on templeos
<mjg>
you just use the target area
<heat>
some days ago I found the little corner in youtube that worships templeos
<mjg>
is that terry's channel
<heat>
it's like they think he's some sort of genius
<heat>
i don't think he has a channel (anymore?)
<geist>
gog: yeah that kinda one. saw one in the store the other day and wsas remindd
<geist>
they're still making em even
<mjg>
hmm give mew few
<heat>
mjg, I did sit through 20 minutes of him rambling about complexity and linux and spinlocks(?). mostly coherent, I can mostly understand everything he's saying, but they're just bad opinions
<mjg>
ye i think i said he was basically mistaken a lot
<mjg>
anyhow looks like the channel is indeed gone
<klange>
^ The first real Kuroko GUI app, port of the old Python minesweeper with some improvements.
<mrvn>
klange: a,b,* = f()?
<klange>
?
<mrvn>
(star expressions in assignment targets?)
<klange>
That's not what that means.
<klange>
a,b,*c = f()
<mrvn>
that's why I asked
<klange>
Sorry, I should say "*-expressions need to have an assignable expression"
<klange>
a,b,c,*extra,d,e,f = iter # will unpack the first three elements to a, b, c, the last three elements to d, e, f, and put the middle remainder in a list and store that in extra.
<klange>
Obscure Python stuff I haven't really used, but showed up in a blog post and I was like "huh, I should add that to Kuroko I guess"
<pog>
:)
<klange>
The other side, *-expressions in collection expressions, was something I knew about and just hadn't gotten around to.
<heat>
smiley face
<heat>
or colon parenthesis
<klange>
That's [*foo, bar, *baz] making a list with the elements of foo, then the value bar, then the lements of baz, all expanded out. Works for lists, tuples (slight pain as I have two codepaths to make tuple expressions, and I had to add a *third* to support bare "*foo, bar" as opposed to "foo, *bar")
<klange>
sets, and also dicts with **
<heat>
klange, you've got some thicccccc C files in there
<heat>
compiler.c takes 10s to compile
<klange>
That is the largest, but it's only ~4k lines?
<klange>
What are you compiling them on, a toaster?
<heat>
ouch
<heat>
not really, just my laptop
<heat>
it doesn't even like any of the smaller files