1 | # |
---|
2 | # $Id$ |
---|
3 | # |
---|
4 | # Author: Alexandra Kossovsky <sasha@oktet.ru> |
---|
5 | # Victor Vengerov <vvv@oktet.ru> |
---|
6 | # OKTET Ltd, http://www.oktet.ru |
---|
7 | # |
---|
8 | |
---|
9 | BSP NAME: generic SH4 (gensh4) |
---|
10 | BOARD: n/a |
---|
11 | BUS: n/a |
---|
12 | CPU FAMILY: Hitachi SH |
---|
13 | CPU: SH 7750 |
---|
14 | COPROCESSORS: none |
---|
15 | MODE: n/a |
---|
16 | |
---|
17 | DEBUG MONITOR: gdb (sh-ipl-g+ loader/stub) |
---|
18 | |
---|
19 | PERIPHERALS |
---|
20 | =========== |
---|
21 | TIMERS: on-chip |
---|
22 | SERIAL PORTS: on-chip (with 2 ports) |
---|
23 | REAL-TIME CLOCK: none |
---|
24 | DMA: not used |
---|
25 | VIDEO: none |
---|
26 | SCSI: none |
---|
27 | NETWORKING: none |
---|
28 | |
---|
29 | DRIVER INFORMATION |
---|
30 | ================== |
---|
31 | CLOCK DRIVER: on-chip timer |
---|
32 | IOSUPP DRIVER: default |
---|
33 | SHMSUPP: n/a |
---|
34 | TIMER DRIVER: on-chip timer |
---|
35 | TTY DRIVER: /dev/console |
---|
36 | |
---|
37 | STDIO |
---|
38 | ===== |
---|
39 | PORT: /dev/console |
---|
40 | ELECTRICAL: n/a |
---|
41 | BAUD: n/a |
---|
42 | BITS PER CHARACTER: n/a |
---|
43 | PARITY: n/a |
---|
44 | STOP BITS: n/a |
---|
45 | |
---|
46 | NOTES |
---|
47 | ===== |
---|
48 | |
---|
49 | (1) Driver for the on-chip serial devices is tested only with 1st serial |
---|
50 | port. We cannot test it on serial port with FIFO. |
---|
51 | |
---|
52 | Console driver has 4 modes -- 2 with termios (interrupt-driven & |
---|
53 | poll-driven modes), one raw mode working with serial port directly, |
---|
54 | without termios, and one mode working with gdb stub (using 'trapa' |
---|
55 | handled by sh-ipl-g+). |
---|
56 | |
---|
57 | (2) The present 'hw_init.c' file provides 'early_hw_init'(void) which |
---|
58 | is normally called from 'start.S' to provide such minimal HW setup. |
---|
59 | It is written in C, but it should be noted that any accesses to memory |
---|
60 | (except hardware registers) are prohibited until hardware not |
---|
61 | initialized. To avoid access to stack, hw_init.c should be compiled with |
---|
62 | -fomit-frame-pointer. |
---|
63 | |
---|
64 | hw_init.c also provides 'bsp_cache_on'(void) normally called from |
---|
65 | 'start.S' after copying all data from rom to ram. |
---|
66 | |
---|
67 | (3) In 'configure.ac' you should properly set 'CPU_CLOCK_RATE_HZ'. |
---|
68 | It is frequency fed to the CPU core (external clock frequency can be |
---|
69 | multiplied by on-chip PLLs). Please note that it is not a frequency of |
---|
70 | external oscillator! See Hardware Manual, section 10, for details. |
---|
71 | Global variable 'SH4_CPU_HZ_Frequency' is declared in 'bsp.h' and |
---|
72 | initilized in 'bspstart.c' to ${HZ}. It is used by sci driver, |
---|
73 | which exists in 'libcpu/sh/sh7750'. |
---|
74 | |
---|
75 | (4) There is SH4_WITH_IPL macro in console driver 'sh4_uart.h'. |
---|
76 | When it is defined, the application works under |
---|
77 | gdb-stub (it is able to turn cache on by 'trapa', use gdb mode in console |
---|
78 | driver and get out from gdb to use other console modes). |
---|
79 | |
---|
80 | (5) There are 3 likcmds: |
---|
81 | - linkcmds: code and data loaded to RAM. No code/data moving required. |
---|
82 | - linkcmds.rom: code executed from the ROM; .data section moved to the |
---|
83 | RAM on initialization. |
---|
84 | - linkcmds.rom2ram: execution started from the ROM (after reset); code |
---|
85 | and data moved to the RAM and execution continued from RAM. |
---|
86 | |
---|
87 | The same 'start.S' is used for all cases. |
---|
88 | |
---|
89 | (6) You can get gdb stub from http://www.oktet.ru/download/sh4/sh-ipl.tar.gz. |
---|
90 | It is based on 'sh-ipl-g+' package used in sh-linux project. |
---|
91 | |
---|
92 | (7) This project was done in cooperation with Transas company |
---|
93 | http://www.transas.com |
---|
94 | |
---|