Ignore:
Timestamp:
Dec 4, 2013, 7:59:21 PM (11 years ago)
Author:
alain
Message:

Modify the name "boot" to "reset" to avoid confusion
between the pre-loader and the boot-loader...
Increase the size of the segment containing the stacks.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/softs/tsar_boot/src/reset_tty.c

    r570 r586  
    1 #include <boot_tty.h>
     1#include <reset_tty.h>
     2#include <io.h>
    23#include <defs.h>
    34
    4 int boot_getc(char *c)
     5///////////////////////
     6int reset_getc(char *c)
    57{
    6     unsigned int* tty_address = (unsigned int*) TTY_BASE;
     8    unsigned int* tty_address = (unsigned int*) TTY_PADDR_BASE;
    79    if (ioread32(&tty_address[TTY_STATUS]) == 0)
    810        return 0;
     
    1214}
    1315
    14 void boot_putc(const char c)
     16/////////////////////////////
     17void reset_putc(const char c)
    1518{
    16     unsigned int* tty_address = (unsigned int*) TTY_BASE;
     19    unsigned int* tty_address = (unsigned int*) TTY_PADDR_BASE;
    1720    iowrite32(&tty_address[TTY_WRITE], (unsigned int)c);
    1821
     
    2326}
    2427
    25 void boot_puts(const char *buffer)
     28///////////////////////////////////
     29void reset_puts(const char *buffer)
    2630{
    2731    unsigned int n;
     
    3135        if (buffer[n] == 0) break;
    3236
    33         boot_putc(buffer[n]);
     37        reset_putc(buffer[n]);
    3438    }
    3539}
    3640
    37 void boot_putx(unsigned int val)
     41/////////////////////////////////
     42void reset_putx(unsigned int val)
    3843{
    3944    static const char HexaTab[] = "0123456789ABCDEF";
     
    5055        val = val >> 4;
    5156    }
    52     boot_puts(buf);
     57    reset_puts(buf);
    5358}
    5459
    55 void boot_putd(unsigned int val)
     60/////////////////////////////////
     61void reset_putd(unsigned int val)
    5662{
    5763    static const char DecTab[] = "0123456789";
     
    7581        val /= 10;
    7682    }
    77     boot_puts( &buf[first] );
     83    reset_puts( &buf[first] );
    7884}
    7985
    80 void boot_exit()
     86/////////////////
     87void reset_exit()
    8188{
    8289    register int pid;
    8390    asm volatile( "mfc0 %0, $15, 1": "=r"(pid) );
    8491
    85     boot_puts("\n!!! Exit Processor ");
    86     boot_putx(pid);
    87     boot_puts(" !!!\n");
     92    reset_puts("\n!!! Exit Processor ");
     93    reset_putx(pid);
     94    reset_puts(" !!!\n");
    8895
    8996    while(1) asm volatile("nop");   // infinite loop...
    9097}
    9198
     99
     100
Note: See TracChangeset for help on using the changeset viewer.