#Serpyntyne: micropython but for real computers

1 messages ยท Page 2 of 1

timber pendant
#

So I must not be putting it into periodic mode correctly trl

#

Ok so why is this so dysfunctional

timber pendant
#

I'm an idiot lol I forgot to send an EOI

#

Boom it works

#

Also this is the 1001th message ๐Ÿ’€ why is my crap OS the most active thread in no-ai lol

timber pendant
#

Alright time to work on the scheduler today

timber pendant
#

Global variables are not liking me today

#

Even though I initialize it it's being set to null

#

I think this is some C noobism

#

So I'm not getting any panic messages and it appears it's because the kprintf is spunlocked when it tries to panic but because there's no way for it to unlock it hangs

#

Yep I force-unlock the terminal and it's fine

#

Except it page faults still ofc

#

So for the chat stalkers the scheduler I'm working on goes through the linked list of "processes" (which are just dummies right now) and finds the one of the highest overall priority

#

It calls an absolutely diabolical inline function to find the total priority which is kinda jank but it shouldn't page fault

#

I'm clearly passing a null pointer somewhere but it's unclear where so far

timber pendant
#

Fixed this ^

#

Scheduler doesn't reload tho

timber pendant
#

Actually it does I just had an underflow at first apparently lol

odd tartan
#

Why micropython

timber pendant
# odd tartan Why micropython

It's a bit of a joke. I'm not actually porting micropython to bare metal, I'm making an OS that can (should, someday) run python in kernel-space or in user-space on the kernel

#

LOL ur username change KEKW

odd tartan
#

Yeah, I hate Python with every fibre of my being

#

So don't trust my opinion on Python lol

timber pendant
#

It's just the other language I know well

#

And I thought this would be a fun exercise

timber pendant
#

I'm SO FRICKING CLOSE to getting task switching done

#

Either it just hangs or it launches into a task, either way no interrupts

#

After the switch I mean

wanton stratus
timber pendant
#

And I set it and it just hangs flesh

wanton stratus
#

hangs where?

timber pendant
wanton stratus
#

it will tell you

timber pendant
wanton stratus
#

wdym...

#

you don't need to set it up

#

you just run and connect to qemu

timber pendant
#

I've gotten this far with just printf debugging and objdump

timber pendant
wanton stratus
#

add the -s flag to qemu

#

and -S to make qemu wait for the debugger

#

then run gdb like: gdb <kernel elf>

timber pendant
#

Alr

wanton stratus
#

and then : target remote : 1234 (without space)

#

and you are in

timber pendant
#

And it's hanging in one of the test procedures

wanton stratus
#

f

timber pendant
#

On a sub

sage yacht
timber pendant
#

Doesn't even make sense to hang on a sub

timber pendant
#

So I've figured out what's happening I think (no help to you gdb)

#

It's hanging on random instructions

#

In the test processes

#

So I think it's actually the first interrupt after the processes hanging, probably because the task switch means that it never went back to unlock the scheduler

#

I get two task switches now before hang, it's an upgrade

#

It appears that it does not like returning the task to the interrupt handler after its first preemption

#

Removed an unnecessary STI and it doesn't hang but it also doesn't preempt lol

#

Time to simplify priority nonsense

timber pendant
#

It preempts once and as hard as the scheduler tries it doesn't preempt again nooo

#

I suspect my task switching assembly is borked

timber pendant
#

Hmm is it overriding the wrong rsp?

#

Yep definitely

blazing kindle
#

how is his going? cool project !!

timber pendant
#

I'm working on a fantasy computer rn

blazing kindle
#

ahhhhh