Oleg Drokin wrote:
>
> Hello!
>
> Anybody home?
> Seems that things stopped to happen after 26 Aug.
> CVS snapshot today is identical to fmw-19990826a.tar.gz from ftp.
Still here. I need to take a small window of time and run
through all the strategies we've talked about thus far before
I'm comfortable with the next step of coding. Keep getting
sidetracked working for a living. :^)
>
> Anyway, here is the patch. Without it freemware oopses on me,
> leaving interrupt controller in disabled state.
> (Well, it not oopses. Kernel claims about Divide error: 0000)
> Tried with 2.2.6 and 2.3.18ac5
>
> Please CC me on reply, as I'm not member of your mail list.
>
> --- freemware/kernel/host-linux.c Tue Sep 7 23:23:35 1999
> +++ freemware.work/kernel/host-linux.c Sat Sep 18 20:27:05 1999
> @@ -330,7 +330,7 @@
>
> switch ( monitor_info.ret_because ) {
> case RET_BECAUSE_REDIR:
> - soft_int(monitor_info.vector);
> + soft_int((u8)monitor_info.vector);
> redir_cnt[monitor_info.vector]++;
>
> // Check whether we have any more CPU time
Good find. I made the fix by changing the soft_int() macro,
so all calls are protected against this. The host-beos.c
file also had a copy of soft_int(), so I moved the macro
into kernel/include/fmw.h. I think the following macro
should work:
#define soft_int(n) \
asm volatile ( \
" movb %b0, __soft_int_vector \n" \
" jmp __soft_int_n \n" \
"__soft_int_n: \n" \
" sti \n" \
" .byte 0xcd \n" \
"__soft_int_vector: \n" \
" .byte 0x00 \n" \
: \
: "r" ((u8) (n) ) \
: "memory" \
)
Is there a modifier to the "r" that will tell GCC the same info
as the (u8) cast?
-Kevin