#bentobox
1 messages ยท Page 4 of 1
they are the same thing
i know that
i prefer the hex repr tho
rather than octal
its fun seeing all the abi breakages ive had in the past 7 months
(a LOT)
just a few linker errors
this is more like what i was expecting lol
oh my god it can't just be this easy
:(
but holy shit i can use the serial tty just fine
it actually works
so of course it had to have some issue
i can't run more than one command in bash before it will crash
not sure if this is aarch64 specific or what (probably is tho) but its calling sigaction with some funky arguments
and since i dont have a safe user copy fail i just panic
[ 2.992875] EL1-EL1 fault: Data Abort (current EL) on CPU 0
[ 2.993222] // System consumed all the paper for paging!
[ 2.993492] x0: 0x0000000000000001 x1: 0x0000555555b80000 x2: 0x0000555555bbeec0 x3: 0x000000000003ff90
[ 2.993924] x4: 0x0000000000000000 x5: 0x0000555555b3ef00 x6: 0x0000000000000000 x7: 0x0000000000518000
[ 2.994380] x8: 0x000000000000001a x9: 0x0000000000000000 x10: 0x0000000000000000 x11: 0x0000000000000000
[ 2.994809] x12: 0x000000000000002c x13: 0x0000000000000000 x14: 0x0000000000000000 x15: 0x0000000000000000
[ 2.995247] x16: 0x000000000050e598 x17: 0x000000004126df48 x18: 0x000000000000002d x19: 0x0000555555bbeec0
[ 2.995597] x20: 0x00000000413220a0 x21: 0x00000000ffffffff x22: 0x00000000ffffffff x23: 0x0000555555bbef20
[ 2.995895] x24: 0x0000000000000000 x25: 0x0000555555bbeea0 x26: 0x0000555555bbef10 x27: 0x0000000000000001
[ 2.996191] x28: 0x000000000051ec30 x29: 0x0000555555653ac0 x30: 0x000000000042eb4c PC: 0xffffffff8000d95c
[ 2.996484] ESR_ELx: 0x0000000096000046
[ 2.996643] FAR_ELx: 0x000000000003ff91
[ 2.996796] SPSR_ELx: 0x0000000020000345
[ 2.996950] Call Trace:
[ 2.997085] #0 0x000000000042eb4c in (userspace)
[ 2.997269] #1 0x000000000043207c in (userspace)
[ 2.997434] #2 0x0000000000432a2c in (userspace)
[ 2.997595] #3 0x00000000004186d4 in (userspace)
[ 2.997754] #4 0x00000000004166c4 in (userspace)
[ 2.997911] #5 0x0000000041217214 in (userspace)
[ 2.998064] #6 0x00000000004171d8 in (userspace)
i have no fucking clue what is going on
seems like a race where the context is saved incorrectly but i can't even fucking find who is calling memset
i mean memcpy
yes
XD
welp its the next day and i fixed it
i... forgot to set current_irq in fault handlers so interrupts were being enabled by some stuff and kaboom
specifically do_cow
ty
i could never
-smp 8 also seems to work (gicv2 cpu limit)
(ignore the mangled output i don't have working virtio drivers on aarch64 yet, i got rid of the mmio one since it sucked and i haven't gotten my pci one working there yet)
no particular reason
just what i came up with
segfaults work
user copy is safe on arm now
(i had to borrow arm's own assembly memcpy implementation to be able to do this properly)
just trust your userspace
just a few changes
i had bigger changes on my os
like 3.5k lines added 500 lines removed
for a single commit
and i didnt even know what i added
so i just said "Big refactor (see diff)"
in the commit
๐ญ๐ญ
41 files changed, 524 insertions(+), 681 deletions(-)
one time i switched to busybox userspace and deleted my own userspace
7k lines removed
๐ญ
not bad
sdfjghskdlfjghskldfg
virtio tablet scaling is COMPLETELY fucked in xorg
not just in the y axis but also the x axis somehow??
it was pointer accel ๐ญ
fvwm3 time
hmm the wallpaper doesn't work for some reason and opening st will just have it hang and after a bit it will crash
i like the // messages in ur panics, is it randomized?
yes
[ 9.156978] /usr/libexec/fvwm3/1.1.4/FvwmIconMan: Segmentation fault
hmm
might be missing something
hmmm

and its only when i launch st where everything breaks
its specifically running bash that's fucking everything because i can open vim in st just fine
bash is pretty difficult to get working perfectly
im still working on fixing my syscalls
so it works
๐ญ
yeah no it dosent print unless i specifically press a key after i pressed enter
and pipe2 isnt implemented
๐ญ
so it dosent really work
mmm
gives ENOSYS
yeah no i have like over 100 syscalls but thats still not enough
for to run something properly
i have ~70
ahh its not posix, right?
anyway yeah its spamming shit with signals wtf
i think it wants to setup the signal frame
yea it shouldnt be able to do that
the mouse cursor isn't feeling too good
i have absolutely no clue what would be causing this but its hilarious
the mouse cursor turned to ash

this honestly feels about as stable as fvwm3 was on x86-64 when i first ported it
hmmm
i mean the arch-specific code is around from that time so idk
except that i've changed a bunch of it
i'm confused
at first it seems to be a heap address that's just big but that's unusally big no?
oh nvm it isn't actually
its only 21mb so seems like a not properly mapped page?
which one is the instruction pointer
PC

it should be at around 0x100000000, no?
not necessarily
if you look at rtld code its at around 0x41000000 iirc
and the fault is not at PC its at FAR_ELx
its a page fault reading from that address
maybe my cow code is fucked
so this is a flood of SIGSESVs
not sure why the handling is not working... but i should probably fix the reason why its doing this
the issue now is that its just good old memory corruption
so i think i have fixed one of the two issues
one was with signals and it was a mismatch between my arm and x86 code
and this one is still it trying to access something that's not mapped...
woah this is trippy
wtf happened to the background
something touching your framebuffer?
no shit
i think i have to rebuild my entire toolchain yay
oh and the userspace too
yeah i think that'll be the easiest solution
because i have zero fucking scrap registers to do what i want to do in arm
i cant just msr TPIDR_EL1, sp
but if i have x18 then i can do what i wanna do
(x18 is reserved in some abis from what i could find)
oops
kernel is overpanicking
yay i got it working without reserving a register
and yayyy it doesn't crash like this anymore
so yeah it was it using x16 which i was also using ๐
i call that fully working
so yeah my instincts were right
i still need to get virtio interrupts working but the system works and im happy
of course it couldn't be the last issue of course... not sure why this happens from time to time
but other than that seems pretty stable
bruh i just realized gcc 16 released like a month after this ๐
the temptation to write an esoteric kernel...
i want to experiment with some real mode multitasking
but tomorrow
its literally 4am
Real mode multiprocessing seems more interesting
that'd be ultra cursed
i'd have to use unreal mode to be able to set up the apic tho
which is even more cursed
got back to work on the sdl2 port
https://github.com/ObaraEmmanuel/NES works but it runs slow at 52fps
the issue is that my scheduler has quite a bit of latency if you sleep
Good job tho
if i reduce the timeslice from 5ms to 1ms it does 58fps but i think i can fix it without doing that hack
but yeah i had my sdl2 port stashed for a while cause i couldn't get the emulator running
turns it was just really picky about wanting audio support
and i had to dig through the source code to remove the bail
but now it works
i think my terminal is fucked
ok reset fixed it
not bad
still a little bit of latency
i don't think i can do much about it, i reckon on real hardware it'll be fully smooth
are you doing hda?
which one are you doing?
What was that thing measuring then lmao
ah
lol
i just realized how outdated this post's first message is
bentobox is a 64-bit SMP-enabled operating system targeting x86_64.
It can do cool stuff like running bash, busybox, doomgeneric and figlet
dang i can't make it embed the github link after removing the old screenshot
oh well
slightly better but i don't have an embed anymore :(
tried booting it on my main rig and ps2 emulation does work if i boot with csm
but for some reason the mouse is broken and if i move it then the keyboard stops working
quake soon
it works
next time i work on this maybe i will do msix
and maybe nvme or virtioblk
cause polling virtio drivers aint too good ๐ค
so uh i tried running it on my laptop and my other rig and its freezing on both machines initializing the idt ๐
not sure how i'll fix this
apparently acquiring the vma's lock in vma->expand was causing a deadlock???
what the fuck man
im so confused
because i swear the crash was before mmu_initialize
whatever
i rearanged some code so i could remove that lock and it boots again
oh my i think i know why
maybe it was the vma calling itself recursively? idfk man ive been trying to get this to boot for an hour ๐
havent worked on this at all in the past few days 
while i want to work on more virtio drivers i do want to write nvme and xhci drivers as well and they defeat the point of doing that
so yeah i may be writing an nvme driver soon or something
also why is gcc being mean to me again ๐ญ
i literally fixed this in my latest patch
i fucking love debian
im trying to bootstrap aarch64 on my laptop to see if it works instead and every fucking time i run jinx init some random package will fail to download
and i have to make it download everything fucking again only for it to give me some other random package that failed to download
thanks jinx
literally unusable
i guess i wont be working on this today either
maybe today i can actually fucking work on this?
nope
Yes
it failed to download libcap-ng0
and now the whole jinx bootstrap will fail
thank you movistar
i dont control this shit ๐ญ
i cant use my mikrotik because i still havent figured out how to get iptv fully working
since the mikrotik seems to fix everything
(i tried to ssh into my other desktop and cloned my repo there and it bootstraps just fine)
and increasing the apt timeout to 3 minutes doesnt fucking fix it
:(
:)
wip c64 emulator a friend and i have been working on
when ps5 emulator
ps5 emulator
looks inside, libc and gfx api hooks
do you NEED any more?
ps5 is an x86_64 machine

