Changeset 586 for trunk/softs/tsar_boot/src/reset_tty.c
- Timestamp:
- Dec 4, 2013, 7:59:21 PM (11 years ago)
- 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> 2 3 #include <defs.h> 3 4 4 int boot_getc(char *c) 5 /////////////////////// 6 int reset_getc(char *c) 5 7 { 6 unsigned int* tty_address = (unsigned int*) TTY_ BASE;8 unsigned int* tty_address = (unsigned int*) TTY_PADDR_BASE; 7 9 if (ioread32(&tty_address[TTY_STATUS]) == 0) 8 10 return 0; … … 12 14 } 13 15 14 void boot_putc(const char c) 16 ///////////////////////////// 17 void reset_putc(const char c) 15 18 { 16 unsigned int* tty_address = (unsigned int*) TTY_ BASE;19 unsigned int* tty_address = (unsigned int*) TTY_PADDR_BASE; 17 20 iowrite32(&tty_address[TTY_WRITE], (unsigned int)c); 18 21 … … 23 26 } 24 27 25 void boot_puts(const char *buffer) 28 /////////////////////////////////// 29 void reset_puts(const char *buffer) 26 30 { 27 31 unsigned int n; … … 31 35 if (buffer[n] == 0) break; 32 36 33 boot_putc(buffer[n]);37 reset_putc(buffer[n]); 34 38 } 35 39 } 36 40 37 void boot_putx(unsigned int val) 41 ///////////////////////////////// 42 void reset_putx(unsigned int val) 38 43 { 39 44 static const char HexaTab[] = "0123456789ABCDEF"; … … 50 55 val = val >> 4; 51 56 } 52 boot_puts(buf);57 reset_puts(buf); 53 58 } 54 59 55 void boot_putd(unsigned int val) 60 ///////////////////////////////// 61 void reset_putd(unsigned int val) 56 62 { 57 63 static const char DecTab[] = "0123456789"; … … 75 81 val /= 10; 76 82 } 77 boot_puts( &buf[first] );83 reset_puts( &buf[first] ); 78 84 } 79 85 80 void boot_exit() 86 ///////////////// 87 void reset_exit() 81 88 { 82 89 register int pid; 83 90 asm volatile( "mfc0 %0, $15, 1": "=r"(pid) ); 84 91 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"); 88 95 89 96 while(1) asm volatile("nop"); // infinite loop... 90 97 } 91 98 99 100
Note: See TracChangeset
for help on using the changeset viewer.