diff --git a/boot-programs/init.ccp b/boot-programs/init.ccp index f518666..fa1d7f1 100644 --- a/boot-programs/init.ccp +++ b/boot-programs/init.ccp @@ -61,7 +61,7 @@ char const *decode_kbd = "0123456789abcdefghijklmnopqrstuvwxyz!@#$%^&*() T\n[],. int main (): // Set up lcd first - schedule () + //schedule () kdebug ("start init\n") setup () kdebug ("run init\n") diff --git a/boot-programs/lcd.ccp b/boot-programs/lcd.ccp index b3da451..7410463 100644 --- a/boot-programs/lcd.ccp +++ b/boot-programs/lcd.ccp @@ -121,8 +121,6 @@ static void log_msg (Message *msg): log_char ('\n') int main (): - __asm__ volatile ("break") - map_lcd () map_cpm () diff --git a/iris.h b/iris.h index 23adb8e..d3277c3 100644 --- a/iris.h +++ b/iris.h @@ -212,7 +212,7 @@ static void invoke (Capability target, Message *msg) static void wait (Message *msg, Capability r0, Capability r1, Capability r2, Capability r3) { - __asm__ volatile ("li $v0, 0x80000000\n" + __asm__ volatile ("li $v0, ~0\n" "\tlw $t4, %1\n" "\tlw $t5, %2\n" "\tlw $t6, %3\n" @@ -1004,7 +1004,7 @@ static void caps_set (Capability caps, Capability cap, unsigned index) #else #define kdebug_char(c) do {} while (0) #endif -#define kdebug(str) do { const char *s = (str); while (*s) kdebug_char (*s++); } while (0) +#define kdebug(str) do { const char *s = (str); while (*s) { kdebug_char (*s); ++s; } } while (0) static void kdebug_num (unsigned n) { diff --git a/mips/interrupts.ccp b/mips/interrupts.ccp index 8e52db0..505de59 100644 --- a/mips/interrupts.ccp +++ b/mips/interrupts.ccp @@ -149,13 +149,11 @@ static void arch_invoke (): c.data[2] = old_current->arch.t2 c.data[3] = old_current->arch.t3 target->invoke (&c) - if do_schedule: - // If the call was to schedule without wait, it isn't done yet. - if !wait: + if do_schedule && !wait: + // If the call was to schedule without wait, it isn't done yet. schedule () - //else: - // If the caller received an immediate reply from the kernel, it is no longer set as current. Don't let it lose its timeslice. - if old_current != current && (old_current->flags & (THREAD_FLAG_RUNNING | THREAD_FLAG_WAITING)) == THREAD_FLAG_RUNNING: + else if old_current != current && (old_current->flags & (THREAD_FLAG_RUNNING | THREAD_FLAG_WAITING)) == THREAD_FLAG_RUNNING: + // If the caller received an immediate reply from the kernel, it is no longer set as current. Don't let it lose its timeslice. current = old_current /// A general exception has occurred. diff --git a/panic.ccp b/panic.ccp index 3666388..59b4790 100644 --- a/panic.ccp +++ b/panic.ccp @@ -93,7 +93,7 @@ void set_leds (bool a, bool b): void dbg_log_char (unsigned ch): void dbg_log (char const *str): void dbg_log_num (unsigned num): -void send (unsigned n): +static void send (unsigned n): for unsigned i = 0; i < 32; ++i: bool v = n & (1 << 31) set_leds (v, !v) diff --git a/plan b/plan new file mode 100644 index 0000000..c4b06cb --- /dev/null +++ b/plan @@ -0,0 +1,4 @@ +kernel capabilities: 1 per aktie; bevat code in plaats van bitmask. CREATE ipv DEGRADE. +activation address in receiver +message: a0-a3: data; protectedL; protectedH; caps +caps zonder size limit?