Changeset 93b84b3 in mainline for generic/src/console/console.c


Ignore:
Timestamp:
2005-12-12T16:30:07Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ebbdb8f
Parents:
af9a7c5
Message:

Fixed weird simics panic.
Run kconsole, if we panic. This currently works in gxemul,
simics. In mips we need to modify the simulator.
On ia32 we need a function, that would speak directly to the chip
and fetch the character using polling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/console/console.c

    raf9a7c5 r93b84b3  
    3535#include <typedefs.h>
    3636#include <arch.h>
     37#include <func.h>
     38#include <print.h>
    3739
    3840/** Standard input character device. */
     
    5052        __u8 ch;
    5153        ipl_t ipl;
     54
     55        if (haltstate) {
     56                /* If we are here, we are hopefully on the processor, that
     57                 * issued the 'halt' command, so proceed to read the character
     58                 * directly from input
     59                 */
     60                if (chardev->op->read)
     61                        return chardev->op->read(chardev);
     62                /* no other way of interacting with user, halt */
     63                printf("cpu: halted - no kconsole\n");
     64                cpu_halt();
     65        }
    5266
    5367        waitq_sleep(&chardev->wq);
     
    115129void putchar(char c)
    116130{
    117         stdout->op->write(stdout, c);
     131        if (stdout->op->write)
     132                stdout->op->write(stdout, c);
    118133}
Note: See TracChangeset for help on using the changeset viewer.