#Nyaux
1 messages ยท Page 14 of 1
Is your bash compiled with readline
name=bash
version=5.2.26
revision=1
tarball_url="https://ftp.gnu.org/gnu/bash/bash-5.2.21.tar.gz"
tarball_blake2b="6789c9a0d9eb1ad167d4199bf1438d77934a7bbeae9f9fdd7167cae006b17b3894852440248db1bb6e9cf6d930e8a18b6448a3bb4db8831b2e6d1445b56a2065"
source_allow_network=yes
source_imagedeps="curl"
source_hostdeps="autoconf automake libtool pkg-config"
imagedeps="gcc"
hostdeps="gcc autoconf automake libtool pkg-config"
deps="core-libs ncurses readline"
regenerate() {
curl -Lo bash52-022 https://ftp.gnu.org/gnu/bash/bash-5.2-patches/bash52-022
curl -Lo bash52-023 https://ftp.gnu.org/gnu/bash/bash-5.2-patches/bash52-023
curl -Lo bash52-024 https://ftp.gnu.org/gnu/bash/bash-5.2-patches/bash52-024
curl -Lo bash52-025 https://ftp.gnu.org/gnu/bash/bash-5.2-patches/bash52-025
curl -Lo bash52-026 https://ftp.gnu.org/gnu/bash/bash-5.2-patches/bash52-026
for f in bash52-02*; do
patch -p0 < $f
done
AUTOHEADER=true \
autotools_recursive_regen
}
build() {
autotools_configure \
--with-curses \
--enable-readline \
--without-bash-malloc \
--with-installed-readline="${sysroot}/usr/lib"
make -j${parallelism}
}
package() {
make install DESTDIR="${dest_dir}"
ln -s bash "${dest_dir}${prefix}"/bin/sh
# post_package_strip
}
copied from vinix
you have --enable-readline so im guessing it is using readline :^)
you could try remove it and recompile
Yeah remove the readline flags
might explicitly need --disable-readline?
if it looks for it on it's own by default
umm?
using this flag causes these errors
works without enable readline tho
clearly still dying
fuck
does my bash recipe look wrong?
remove the --with-installed-readline too
do you actually print stderr now?
you should just always print that
void syscall_write(struct syscall_frame *frame, struct per_thread_cpu_info_t *ptr)
{
int fd = frame->rsi;
void *buf = (void*)frame->rdx;
size_t count = frame->r10;
if (fd == 1)
{
// SINCE WE DONT HAVE DEVICES WE JUST WRITE DIRECTLY TO FLANTERM
flanterm_write(ctx, buf, count);
frame->rdx = 0;
frame->rax = count;
return;
}
else if (fd == 2)
{
flanterm_write(ctx, buf, count);
frame->rdx = 0;
frame->rax = count;
}
else {
kprintf("syscall_write: failure at fd: %d\n", fd);
frame->rdx = -1;
return;
}
}
i clearly do
wait
im stupid
it did get to
bash
but then it exited
lemme remove all the debug messages
unknown error code?
its looking for bashrc
like what
that shouldn't be fatal
okay this is what cleaner output looks like
I think the reason why it exits is orobably related to your read
why?
-1 if err
void syscall_read(struct syscall_frame *frame, struct per_thread_cpu_info_t *ptr)
{
int fd = frame->rsi;
void *buf = (void*)frame->rdx;
size_t size_of_buf = frame->r10;
struct process_info *pro = get_cur_process_info();
struct FileDescriptor *d = &pro->Descriptors[fd];
if (d)
{
if (d->ptr)
{
kprintf("Buf: %p Offset: %d, fd: %d\n", buf, d->offset, fd);
kprintf("Addr of vnode: %p\n", d->ptr);
int hm = d->ptr->ops->v_rdwr(d->ptr, size_of_buf, d->offset, buf, 0);
if (hm != -1)
{
kprintf("old offset is %d ", d->offset);
d->offset += hm;
kprintf("new offset is %d\n", d->offset);
frame->rdx = 0;
return;
}
frame->rdx = -1;
return;
}
else {
kprintf("Clearly exists\n");
frame->rdx = -1;
return;
}
}
frame->rdx = -1;
return;
}
legit the entire function
Do you have a stdin
no
Thats probably it then
add a log to syscall_read and log the fd
allocated?
as in
used
i have a bitmap that says which fds are used
and which fds are not used
do you know what stdin is
standard input
okay that is probably your issue
fair
to test it you can even make it infinitely return "a" or smth
on read?
yea
in syscall_read add a special case for fd 0 that always returns "a"
in principle that means that your bash prompt will just be filled with "a"
ok
something like this i suppose
you need to return the amount of data writteen
^
presumably because exit is unimplemented?
what does your sys_read look like?
void syscall_read(struct syscall_frame *frame, struct per_thread_cpu_info_t *ptr)
{
int fd = frame->rsi;
void *buf = (void*)frame->rdx;
size_t size_of_buf = frame->r10;
if (fd == 0)
{
// stdin
if (size_of_buf > sizeof(char))
{
((char*)buf)[0] = '\n';
frame->rdx = 0;
return;
}
}
struct process_info *pro = get_cur_process_info();
struct FileDescriptor *d = &pro->Descriptors[fd];
//kprintf("syscall_read: reading fd %d\n", fd);
if (d)
{
if (d->ptr)
{
// kprintf("Buf: %p Offset: %d, fd: %d\n", buf, d->offset, fd);
// kprintf("Addr of vnode: %p\n", d->ptr);
int hm = d->ptr->ops->v_rdwr(d->ptr, size_of_buf, d->offset, buf, 0);
if (hm != -1)
{
// kprintf("old offset is %d ", d->offset);
d->offset += hm;
// kprintf("new offset is %d\n", d->offset);
frame->rdx = 0;
return;
}
frame->rdx = -1;
return;
}
else {
// kprintf("Clearly exists\n");
frame->rdx = -1;
return;
}
}
frame->rdx = -1;
return;
}
I dont see you returning the amount of bytes read?
its because i do this in my syscall

*bytes_read = count
returning bytes_read properly doesnt solve it tho

i return the amount of bytes read
properly
as asked
still dont know why bash is quitting tho
its like fuck this shit im out
bash is actually running but the little gremlins inside your computer are typing exit every time
just to mess with u
bash instantly exits if it thinks it's not getting any more input, something like that
does it actually get as far as calling sys_read()?
maybe it bails because of poll failing?
i had this problem when i first ported bash, it instantly exited, i forgot the details of what was going on
likewise
didn't you say somewhere you would take a break from osdev because school
i did
for studying
i have the exams in a few days but
i've done my studies
i can breath now
anyways last thing we were trying to do on nyaux
hmm
that was bash unexecpectingly quitting
ah yes
i did ngl
because it happened before like twice
that's true
Are you sure about that?
absolutely
Indeed
just wanna let yall know that nyaux is not dead im just not feeling up mentally
to be honest
so its difficult to do anything really atm
im sorry
ill try to resolve these mental issues as soon as possible so i can continue to work on the project
take it easy bro no pressure
i will be back on monday tomorrow
to work on nyaux
i had an appointment with my therapist and i feel a little better
thanks bro means a lot
Do a little bit every day, dont work for hours on end
fair
anyways okay so what we were doing
right
bash
so we loaded bash
but uhhhhh
no stdin
so bash goes like fuck u
right
and ofc
weird ass page fault
happening on my system
cause im using wsl this time
great
which is like wtf
and ofc make run-uefi isnt working on wsl cause fuck me
hmmmmmmmmmmmmmmmmmmmm
how tf am i gonna debug this
lovely
its a general protection fault
when using xsave????
bru
Check alignment
Of the address you pass to xsave
It has to be 16 bytes aligned iirc
wha
its happening at line 22
in this function
on the asm instruction
what i do
its not happening on task switch
its happening here for some reason
cause the cpu hates me
like usual
yea i dont see an issue?
Protected Mode Exceptions
okay so its def not cause of cpl
not xcr either
could be the third exception
umm
hmmm
ughhh what is the issue 
i lit set xcr 0 to 7
if the cpu has avx
i cant remember how the layout of the xcr registers are but
im sure thats valid
as it worked before
why now is there an issue
Does your host cpu have avx? Idk if qemu software emulation emulates it
Try running with kvm and see what it does
Then the checking code is bad or smth or its a qemu issue
i believe this is correct
yea
so like wtf???
?????
maybe this is not worth fixing, ill just make a linux vm or smthin
fuck wsl honestly
whats wrong with that
wait
oh
yea
but wait
no wait
shouldnt it like
wait
my brain is confused
shouldnt it work fine cause like its a
if statement-ish
Read that statement slowly
no
sorry
my brain is actually tard
poop
i dont know
like im ANDing the bit
so i should get just that one bit right???
why is this statement an issue
as u can tell its been quite a while
i forgot a lot of things
and maybe minus 20iq points
Youre checking the edx register for something in the ecx register......
oh my god
am i
that stupid
wtf
โ ๏ธ
๐ญ
anyways more issues yay
setting xcr 0 to value 2 is an issue for some reason
fuck where was that diagram of the xcr registers in the sdm again
Currently, only XCR0 is supported. Thus, all other values of ECX are reserved and will cause a #GP(0). Note that bit 0 of XCR0 (corresponding to x87 state) must be set to 1; the instruction will cause a #GP(0) if an attempt is made to clear this bit
the value of 2 does not clear bit 0
wait no
it does
โ ๏ธ
it should be 3
okay now thats fixed
now we have vfs issues
yay !!!!
fuckin hell
truly a
moment
oh
bash is not compiling???
wheres my mlibc???
WHERES MY SHIT
๐
YO JINX
WHERES MY USERSPACE
yea where tf is my userspace huh
why didnt jinx build mlibc or
bash
or anything
you made an os and a somewhat usable but still shitty userspace in a span of a month yet my dumb autistic possibly adhd brain still can't figure out how to do smp and apic
my mistake
u sound like me a bit ago
i dont even have smp in my kernel
and apic is actually kinda easy
its just
lol
a bunch of registers u write to
i do have smp though its still somewhat shit
can we eat jinx
im actually quite mad
wheres my damn userspace
compile it jinx
rawr
The kernel can have a little instabilty as a treat, it adds risk and reward to the computing experience
i somewhat have problems with doing apic since theres no comprehensive code and docs for apic that i can reference
maybe i need to do dist clean?
maybe something fucked up with the build or something
and jinx didnt compile bash and mlibc for some whatever reason
this compile may take like
30-40 minutes
and some apic code written in zig doesn't really fit in with (how i setup) my code
(my kernel
)
anyways i will try to run
make dist-clean
and see if jinx will be epic gamer and compile mlibc and shit for me
bro
why isnt jinx
compiling bash
i did dist clean
STILL

i believe it was my makefile
should be solved now hopefully
๐ค
ok
now we are back to the same point we were before
where bash poopies for some reaosn
reason*
uhhhhh
okay so why does bash do this hmm

Likely because it thinks it hit an end of file
See what read returns
this doesnt get printed
nor this
so clearly something else is happening???
huh???
is it cause i error out when someone asks to duplicate a file descriptor?
You dont need dup for a basic bash promot
Whats your whiole read function both mlibc and kernel side
void syscall_read(struct syscall_frame *frame, struct per_thread_cpu_info_t *ptr)
{
int fd = frame->rsi;
void *buf = (void*)frame->rdx;
size_t size_of_buf = frame->r10;
if (fd == 0)
{
// stdin
if (size_of_buf > sizeof(char))
{
((char*)buf)[0] = '\n';
frame->rdx = 0;
frame->rax = sizeof(char);
kprintf("read(): stdin was read\n");
return;
}
}
struct process_info *pro = get_cur_process_info();
struct FileDescriptor *d = &pro->Descriptors[fd];
//kprintf("syscall_read: reading fd %d\n", fd);
if (d)
{
if (d->ptr)
{
// kprintf("Buf: %p Offset: %d, fd: %d\n", buf, d->offset, fd);
// kprintf("Addr of vnode: %p\n", d->ptr);
int hm = d->ptr->ops->v_rdwr(d->ptr, size_of_buf, d->offset, buf, 0);
if (hm != -1)
{
// kprintf("old offset is %d ", d->offset);
d->offset += hm;
// kprintf("new offset is %d\n", d->offset);
frame->rdx = 0;
frame->rax = hm;
return;
}
frame->rdx = -1;
return;
}
else {
kprintf("read(): descriptor of value %d was not found\n", fd);
frame->rdx = -1;
return;
}
}
frame->rdx = -1;
return;
}
mlibc:
int sys_read(int fd, void *buf, size_t count, ssize_t *bytes_read)
{
__syscall_ret ret = __syscall(3, fd, buf, count);
if (ret.errno != 0)
{
return ret.errno;
}
*bytes_read = count;
return 0;
}
You should add a system call log
Also fix the bytes read to be what you return from the read syscall
What fd is it trying to read from?
Is mlibc complaining about any missing functions? How is your bash recipe
i dont think so?
doesnt seem like it?
this is my bash recipe
name=bash
version=5.2.26
revision=1
tarball_url="https://ftp.gnu.org/gnu/bash/bash-5.2.21.tar.gz"
tarball_blake2b="6789c9a0d9eb1ad167d4199bf1438d77934a7bbeae9f9fdd7167cae006b17b3894852440248db1bb6e9cf6d930e8a18b6448a3bb4db8831b2e6d1445b56a2065"
source_allow_network=yes
source_imagedeps="curl"
source_hostdeps="autoconf automake libtool pkg-config"
imagedeps="gcc"
hostdeps="gcc autoconf automake libtool pkg-config"
deps="core-libs ncurses readline"
regenerate() {
curl -Lo bash52-022 https://ftp.gnu.org/gnu/bash/bash-5.2-patches/bash52-022
curl -Lo bash52-023 https://ftp.gnu.org/gnu/bash/bash-5.2-patches/bash52-023
curl -Lo bash52-024 https://ftp.gnu.org/gnu/bash/bash-5.2-patches/bash52-024
curl -Lo bash52-025 https://ftp.gnu.org/gnu/bash/bash-5.2-patches/bash52-025
curl -Lo bash52-026 https://ftp.gnu.org/gnu/bash/bash-5.2-patches/bash52-026
for f in bash52-02*; do
patch -p0 < $f
done
AUTOHEADER=true \
autotools_recursive_regen
}
build() {
autotools_configure \
--with-curses \
--without-bash-malloc
make -j${parallelism}
}
package() {
make install DESTDIR="${dest_dir}"
ln -s bash "${dest_dir}${prefix}"/bin/sh
# post_package_strip
}
Well id seems like youre building with readline. Did you stub poll
yes
What lets you line edit in bash
huh
ok building without readline
still same issue
so sad
what is ncursers
do i remove that
is that causing the issue
??
Could be, try removing it too
okay
compiles now
OKAY IT WORKS
LETS GO
AND MY FUNNY \n STDIN SHANNGAINS
WORKS TOO
WOHO!
okay do i hook up my ps2 driver to stdin
or what
that would be a solid next step
You make it a device
i dont have devices
You create them
Theyre vnodes just like any other file
uh huh yea
i get that
but what extra functionality do dev devices need or whatever
They have major and minor numbers you use to see what device the vnode points to
not much except they have different implementations of read() and write()
and sometimes seek is meaningless on them
wha
my brain has just exploded
๐ฅ
you don't need that
device files are just files which are not backed by a filesystem but instead by some mechanism
for example /dev/zero is just a file with a read() function that looks like
int read(char *data, size_t amount) {
memset(data, '\0', amount);
return amount;
}```
so for my case
i could have a file like
/dev/keyboard
and its read could look like
it could return the thing in the keyboard buffer and stuff
and its write??? will do nothing i suppose
is this a good way of implmenting this?
For terminal io it gets a bit more complex
oh
But yeah for a keyboard file its p much that
please explain
i want to implment this correctly
You have to do some processing on the data you receive
Look up tty demistified
I think thats the name of that article
And ig you can also look at astral shittyโข๏ธ code for some implementation
reading the article is just making everything even more confusing
๐ฅ

read it again
Is that when you put the terminal in the oven
nyaux
yah and then add it to a stir fry
1 whole egg
2 flour
1 cool bean
mix together
anyways i may take a nap
be back in 2 hours
and all the other things probably
like mmap
ok back
procrastinating
i know i am
just opened a pr
fair
but im still not happy about it
i keep rereading the tty demystified article but nothing of what it says makes sense to me at all
maybe im stupid

yea
it wont work unless u write code in userspace to experiment
e.g. i wrote code to hijack a working tty's stdin and it helped me reinforce my understanding
the thing is i dont understand a single thing like at all
inb4 everything
often times u need multiple source to grasp something
google line discipline
see different explanations
look on youtube
different sources
if you dont put in effort you dont get the knowledge
i am
then you'll get it
looked through a bunch of resources and i still dont, i think im clearly braindead
maybe the 3 weeks of me being away from nyaux has made my iq go down by 20 points
i think i played too much valorant during that time
it processes a stream of bytes that come from, for example, a serial port
if you want an implementation to look at you can take a look at astral io/tty.c, io/pty.c (for the pseudo terminal backend) or io/console.c (for the /dev/console backend)
nya?
ux
master
4.0
OP
Jun 8, 2024
looked through a bunch of resources and i still dont, i think im clearly braindead
I think that message might have been meant for another thread unless I'm misunderstanding something
You are misunderstanding. Have a read of this message: #1230349543623757845 message
Ohh okay ๐
maybe the 3 weeks of me being away from nyaux has made my iq go down by 20 points
No it hasn't
you don't understand what is happening here
i think i played too much valorant during that time
I'm pretty sure it's physically impossible to lose 20 points of IQ in just 2 weeks
You need advanced stage brainrot to do that
yes, but by you replying to me like that, it makes me think you don't understand what is happening
Because they dont
did linuxmaster take over your account
lol
Looks like nyaux died
RIP
@surreal path You good?
There was a lot of progress fairly quickly at the start of this, and then it just seemed to die
I hope the thing that I tend to do is not happening, being incredibly interested in something for a while and then suddenly not really caring about it anymore
linuxmaster seems to have disappeared along with his OS
rip
i called it
It was obvious tbh
Tty ended up being too hard to understand
And people weren't spoon-feeding as much
i've been wanting to give up on my osdev journey for like 6 months at this point
writing code that doesn't suck and isn't fundamentally flawed too hard :D
I'd give up on osdev but I got nothing else to do
except game dev
but osdev > game dev
Its also completely wrong lol
But looks like hes alive at least which is nice
@surreal path
im good
im fine yea
just want to say sorry to everyone for being gone again
for the billionth time
my motivation to do anything is like nearly 0
๐ญ
so i just stopped doing any kind of anything
for a while
you did lmao
i dunno what to do now, continue the project. scrap and rewrite? not rewrite and just continue? idfk
im still alive (sadly)
which is the worst thing
time to check if nyaux still compiles
Where the f have you been
Its been like months lmao

i could not escape the big depression

anyways im gonna verify if nyaux still compiles and go from there
welcome back
you were making pretty good progress, so looking forward to see what's next
thank you !!!
time to wait forever to jinx do setup the container
or whatevs
lovely
clearly something bad
is jinx outdated
probs
okay got the newer jinx
oh yeah btw @kind root forgot to ask, hows life going with you? hows the uacpi project going?
welcome back
hi solar
howve you been
nice to see you too
gonna continue with nyaux?
yep
it was going pretty well last i recall
something with implmententing device files
this is where the fun begins!
yep !
i just finished doing that the other day actually
oh great !
Holy shit nyauxmaster 4.0 is back
welcome back
ive been on a bit of a hiatus as well but slowly getting back and wrapping uacpi up for a 1.0 release hopefully some time soon
nice to see that ur back
we can post it on hacker news and reddit
ought to be fun
"whats aml" incoming
it will be full of people denouncing ACPI as the devil's daughter
or that yes
that would be cool lmao
yep
thank youu
okay so gotta fix some of these
yeah this is new stuff
yea ik
okay got it to compile
huh weird
it takes forever
oh im running out of ram
lmao
huh it still stays stuck here
something weird
is happening
not cool
fun
yea clearly this is a nonsense address
Welcome back ๐
hi r4
Oh someone already posted it haha
difficult to debug when its one of those kind of issues
๐ญ
anything useful in the call stack?
good question
lovely
my favorite kind of error
truly
no interrupt happened as well
and no cpl change
so somehow the cpu is jumping to some weirdo address and just doing whatever tf
Maybe take a look at what the other codes are doing
im unsure
this shouldnt happen tho
cause all interrupts are handled with an iret
you might be messing the stack up before iret
possible
somewhere here
there seems to be an issue
oh
could be cause uacpi changed a fuck ton while i was gone
Yes it certainly has
yea i suppose
lovely that ossdev wiki is down for the billionth time
so i cant see how the api changed for uacpi
osdev.wiki is up for me
its hella slow for me
wait its coming back
i dont see a problem with how im trying to get the madt table
hmm
man i love maintaining really old code
ie code i wrote 3 months ago
okay
thats correct
also correct
why is table a pointer here
of course i do but i havent touched this code in 3 months
Nah it's fine. Hope you're okay now
There is a fork of the osdev wiki at https://osdev.wiki
The nyauxmaster has come to save us all
๐
okay so
the code in nyaux is WAY too crusty
difficult to wrap my head around what the fuck i was trying to do a few months ago, nearly unreadable code
i think the best option is to do a rewrite
NOW BEFORE anything hear me out
please no rust
๐ญ
i would personally advise against it
it takes longer to rewrite than to get used to your old code
ill see what i will do
on a trip on italy btw
nyauxmaster 4.0 travel arc
Have fun
okay got my laptop pluggedi n
brung it with me for italy
lets
fuckin
do this
rewriting nyaux day 1
Brung?
nyaux in rust real
isn't that "bring" but in past tense?
Brought
๐คฆ of course
LETS FUCKING GO
Is this a rewrite
yep
btw i got some nice pics of Italy, u wanna see @kind root ?
Yes
i do indeed
i get that a lot
anywayssss time to get some memory management goinggg
maybe ill do a bitmap allocator this time around
nah
bruh you look like a child
๐ญ ๐ญ
maybe even less
idk why i look that young
yea i guess
cool got memory entries
lets heckin
throw a bunch of freelist nodes into each free page ๐
๐
and link em all
then boom done finished freelist allocator
kkkk nice
isnt that bracelet one of those that they give you in hospitals/mental institutions
are you on the run
no ๐ญ
common rust L
truly
hi guys so still working on the PMM
im sorry im not at the speed i should be at
difficult when on holiday and doing it in a completely different language
but its a fun learning experience
๐ญ
i was expecting to use unsafe a lot more actually
only rlly needed it for dereferencing raw pointers
thats great btw it works
my memory allocation works !!!!
what abouttttttt
500 pages
it did it very nice
and its not even running under kvm
thank you @thorn bramble for the suggestion of using this kind of allocator
Don't worry about it
thanks for being really supportive
Always know that no one here is going to pressure you to work on this
thanks again
im def just gonna work on it whenever i have free time
problem now tho
when did you learn rust
like a month ago
You're the rust compiler you should know
exactly

actually the rust compiler has been really nice to me
i dont fight with it too much
only for raw pointers
anyways slab allocator is next
man i love
making the terminal look pretty
who doesn't
ikr
i got past the "must look pretty" phase
i like informative logs
i like to pack as much info as possible without making the line too long
my logs have mainly been:
bonjour``` for the past few days
ew frenchie
#1141057599584878645 message
there's this sticker on another discord I'm on
and I was thinking of something I could log in my irq handlers so I would know they got hit
so I chose 'bonjour'
and also 'hola'
don't worry I'm not french
thank god
my logs are
modulename: slop
I was just thinking that...
apologies i dont get much time
difficult to work
but im trying my best
anyways
we need a PMM working do we have that yes we do
but deallocation
oh hell nah
gonna be difficult
lets do this
if it's a freelist you just make a node add it to the list
no its a bit different
with a page count?
yep
right
you can ignore all from size_t nMemoryLeft = nPages * OBOS_PAGE_SIZE; to the end of the function
that's just so the kernel can wait for physical pages to be freed
top of file
npnp
yea i kinda trolled u with the pmm
but as oberrow said you can add single pages back to the list as new regions
but in general what i do in my kernel is i have N lists of free blocks of order N, what that means is that each block is of size 2^(N+12) and is aligned to that boundary
i still have that "memory region" thing just to make sure whenever im freeing memory it does belong to a valid memory region + i reserve some memory out of each usable region for the page info storage
bru

im just gonna do a freelist
im not getting trolled
yea inserting it in EVERY page
is stupid
but idc
okay freelist is done actually
its the same simple one page allocation freelist
but it doesnt take forever to boot
thankfully
hi all just implmented the gdt into nyaux, cause rust is a bitch when it comes to asm files i have to fuckin do this janky ah system with using build.rs to compile my asm code
and
it uses
gas syntax
๐คฎ
so i got a tool online to convert nasm syntax to gas
cause i dont know how to write gas synta
call it skill issue idc
ull never find me writing gax syntax
Liquid syntax when
tf is a liquid syntax???
global_asm!(include_str!("myfile.asm"))
fucking thank you ๐ญ
and it uses intel syntax because its parsed by rust the same way as inline asm (well it is inline asm just loaded from a file)
wait nvm its still gas syntax
no
you have to use gas directives but the syntax is intel
meaning eg. instead of global you use .global
how do i do a relative jump in gas
its easy with nasm
but im unsure how to do it in nasm
gas*
lea rax, [rip + whatever]
works
lets gooo
๐
๐
triple fault!
lovely
time to see the issueeee
WHERES MY DAMN LOG QEMU ๐ญ
it should give me some
debug
where is the debug output
i see nothing in my terminal 
yea no matter what flags i put
no debug output
amazing !
normally itโs because of kvm
but you donโt seem to have it enabled
try logging to a file instead
how to do it again
sorry i havent used qemu in a while ๐ญ
-d int -D qemulog -serial file:seriallog
you could use .intel_syntax noprefix
but I do agree that at&t "GAS" syntax is dogshit
based
if you thought gas syntax was dogshit, you haven't seen plan9 syntax
they use untypeable unicode symbols
that you need to either copypaste or type with the compose key if you have that
Will be back soon me and my family going to the beach
have fun
thanks Omar
:
nekoneko nokonoko dostantan
didn't intend to send this lol??
Lies.
u cannot escape the brainrot
they changed the qemu logging ๐ญ
nvm
page fault
fun
me when rust
how tf
am i supposed to debug this
help
so its happening at reload cs
how do i make this possible to debug with rust
look at the disassembly
oh im idiot
i forgot i dont have a tss
done
now we have gdt
๐
uhhhh whats next
right
page tables
fun
lets open the sdm and get to work!!!
okay i did the things for the flags and stuff
love bitflags great crate
now im uhhhshit
my brain is gone
There's a crate for... flags?
yk like uhhhh what u call it
#define FLAG_w (1 << 2)
things like this right
this crate gives me that functionality
Why is a crate needed for that?
when rust:
literarly
okay im gonna go read back all the things from last month
from everyone explaining paging to me
and be back in like 20 minutes
will have a page table manager done then after like 25 minutes hopefully
1 << 1 should be wallowed
walloed?
okay i renamed it
one thing im guessing is i need to map the kernel binary
if im going to create a new page map
as well as the hhdm?
wait
no looking back at my old code
now im completely confused
my brain has exploded fuck
okay thank god old rayan made a diagarm for me to go off by
i need to copy the hhdm and the kernel virtual mappings into the new pagemap
right in order to map the kernel
i need the kernel size in bytes
which i do NOT know how to get in rust
C its easy with the linker script



