[snip] >>> > +unrecognized: >>> > + �� ��cpu_abort(env, "Wrong register (%d) or wrong operation (%d) in >>> cp0_set!\n", >>> > + �� �� �� �� �� ��creg, cop); >>> >>> The call to cpu_abort() would mean that the guest is able to terminate >>> QEMU at will, which is not OK. What does real HW do? >> In my opinion, I just want to terminate qemu when any unhandled or >> unknown operations happen. > > This can make the emulator vulnerable in the security sense. Probably > Unicore CPUs are not used now in an environment where the guest can > not be trusted (like cloud computing), but who knows the future? Is it proper to print such information to monitor? by using monitor_printf().
[snip] >> >>> >>> The printout should be enabled only for DEBUG_UC32. >> Here, I just want to print a char in the text console. >> I tried printw and addch under curses environment, but their color >> schemes had some problems in my server, and I must call scrollok() at >> every new-line. (scrl() didn't work) So, I left printf here to output a >> character from ocd_console in kernel, and it works. > > It breaks the abstraction layer. CPUs very rarely have any direct > instructions for high level I/O (like console output), instead I/O is > handled via devices which are accessible via MMIO (or I/O ports for > x86). > > For debugging, anything can be possible, but that's why I suggested > using DEBUG_UC32. > I've found my errors. I'm going to use waddch() here. Please see my next version. Thanks & Regards, Guan Xuetao