diff options
author | Jesper Nilsson <jespern@axis.com> | 2012-06-20 11:17:10 -0400 |
---|---|---|
committer | Jesper Nilsson <jespern@axis.com> | 2012-10-03 03:57:01 -0400 |
commit | d75d806cbbfb9c775e87779cd281c9c408c7aba3 (patch) | |
tree | 64abfceb6e6a084c90cf7b2be60c72fc5935de84 /arch/cris/arch-v32/kernel | |
parent | 227c6fc296cb84577a4ec54b3c682d48a9ca09b3 (diff) |
CRIS: Remove VCS simulator specific code
The VCS simulator was a tool used in the development of the chip
and is no longer used or necessary.
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Diffstat (limited to 'arch/cris/arch-v32/kernel')
-rw-r--r-- | arch/cris/arch-v32/kernel/head.S | 58 | ||||
-rw-r--r-- | arch/cris/arch-v32/kernel/kgdb.c | 14 |
2 files changed, 2 insertions, 70 deletions
diff --git a/arch/cris/arch-v32/kernel/head.S b/arch/cris/arch-v32/kernel/head.S index 5d502b9ab56d..51e34165ece7 100644 --- a/arch/cris/arch-v32/kernel/head.S +++ b/arch/cris/arch-v32/kernel/head.S | |||
@@ -36,13 +36,6 @@ | |||
36 | .global nand_boot | 36 | .global nand_boot |
37 | .global swapper_pg_dir | 37 | .global swapper_pg_dir |
38 | 38 | ||
39 | ;; Dummy section to make it bootable with current VCS simulator | ||
40 | #ifdef CONFIG_ETRAX_VCS_SIM | ||
41 | .section ".boot", "ax" | ||
42 | ba tstart | ||
43 | nop | ||
44 | #endif | ||
45 | |||
46 | .text | 39 | .text |
47 | tstart: | 40 | tstart: |
48 | ;; This is the entry point of the kernel. The CPU is currently in | 41 | ;; This is the entry point of the kernel. The CPU is currently in |
@@ -75,17 +68,10 @@ secondary_cpu_entry: /* Entry point for secondary CPUs */ | |||
75 | | REG_FIELD(mmu, rw_mm_kbase_hi, base_c, 4) \ | 68 | | REG_FIELD(mmu, rw_mm_kbase_hi, base_c, 4) \ |
76 | | REG_FIELD(mmu, rw_mm_kbase_hi, base_d, 5) \ | 69 | | REG_FIELD(mmu, rw_mm_kbase_hi, base_d, 5) \ |
77 | | REG_FIELD(mmu, rw_mm_kbase_hi, base_b, 0xb), $r0 | 70 | | REG_FIELD(mmu, rw_mm_kbase_hi, base_b, 0xb), $r0 |
78 | #elif !defined(CONFIG_ETRAX_VCS_SIM) | ||
79 | move.d REG_FIELD(mmu, rw_mm_kbase_hi, base_e, 8) \ | ||
80 | | REG_FIELD(mmu, rw_mm_kbase_hi, base_c, 4) \ | ||
81 | | REG_FIELD(mmu, rw_mm_kbase_hi, base_b, 0xb), $r0 | ||
82 | #else | 71 | #else |
83 | ;; Map the virtual DRAM to the RW eprom area at address 0. | ||
84 | ;; Also map 0xa for the hook calls, | ||
85 | move.d REG_FIELD(mmu, rw_mm_kbase_hi, base_e, 8) \ | 72 | move.d REG_FIELD(mmu, rw_mm_kbase_hi, base_e, 8) \ |
86 | | REG_FIELD(mmu, rw_mm_kbase_hi, base_c, 4) \ | 73 | | REG_FIELD(mmu, rw_mm_kbase_hi, base_c, 4) \ |
87 | | REG_FIELD(mmu, rw_mm_kbase_hi, base_b, 0xb) \ | 74 | | REG_FIELD(mmu, rw_mm_kbase_hi, base_b, 0xb), $r0 |
88 | | REG_FIELD(mmu, rw_mm_kbase_hi, base_a, 0xa), $r0 | ||
89 | #endif | 75 | #endif |
90 | 76 | ||
91 | ;; Temporary map of 0x40 -> 0x40 and 0x00 -> 0x00. | 77 | ;; Temporary map of 0x40 -> 0x40 and 0x00 -> 0x00. |
@@ -126,27 +112,6 @@ secondary_cpu_entry: /* Entry point for secondary CPUs */ | |||
126 | | REG_STATE(mmu, rw_mm_cfg, seg_2, page) \ | 112 | | REG_STATE(mmu, rw_mm_cfg, seg_2, page) \ |
127 | | REG_STATE(mmu, rw_mm_cfg, seg_1, page) \ | 113 | | REG_STATE(mmu, rw_mm_cfg, seg_1, page) \ |
128 | | REG_STATE(mmu, rw_mm_cfg, seg_0, linear), $r2 | 114 | | REG_STATE(mmu, rw_mm_cfg, seg_0, linear), $r2 |
129 | #elif !defined(CONFIG_ETRAX_VCS_SIM) | ||
130 | move.d REG_STATE(mmu, rw_mm_cfg, we, on) \ | ||
131 | | REG_STATE(mmu, rw_mm_cfg, acc, on) \ | ||
132 | | REG_STATE(mmu, rw_mm_cfg, ex, on) \ | ||
133 | | REG_STATE(mmu, rw_mm_cfg, inv, on) \ | ||
134 | | REG_STATE(mmu, rw_mm_cfg, seg_f, linear) \ | ||
135 | | REG_STATE(mmu, rw_mm_cfg, seg_e, linear) \ | ||
136 | | REG_STATE(mmu, rw_mm_cfg, seg_d, page) \ | ||
137 | | REG_STATE(mmu, rw_mm_cfg, seg_c, linear) \ | ||
138 | | REG_STATE(mmu, rw_mm_cfg, seg_b, linear) \ | ||
139 | | REG_STATE(mmu, rw_mm_cfg, seg_a, page) \ | ||
140 | | REG_STATE(mmu, rw_mm_cfg, seg_9, page) \ | ||
141 | | REG_STATE(mmu, rw_mm_cfg, seg_8, page) \ | ||
142 | | REG_STATE(mmu, rw_mm_cfg, seg_7, page) \ | ||
143 | | REG_STATE(mmu, rw_mm_cfg, seg_6, page) \ | ||
144 | | REG_STATE(mmu, rw_mm_cfg, seg_5, page) \ | ||
145 | | REG_STATE(mmu, rw_mm_cfg, seg_4, linear) \ | ||
146 | | REG_STATE(mmu, rw_mm_cfg, seg_3, page) \ | ||
147 | | REG_STATE(mmu, rw_mm_cfg, seg_2, page) \ | ||
148 | | REG_STATE(mmu, rw_mm_cfg, seg_1, page) \ | ||
149 | | REG_STATE(mmu, rw_mm_cfg, seg_0, linear), $r2 | ||
150 | #else | 115 | #else |
151 | move.d REG_STATE(mmu, rw_mm_cfg, we, on) \ | 116 | move.d REG_STATE(mmu, rw_mm_cfg, we, on) \ |
152 | | REG_STATE(mmu, rw_mm_cfg, acc, on) \ | 117 | | REG_STATE(mmu, rw_mm_cfg, acc, on) \ |
@@ -157,7 +122,7 @@ secondary_cpu_entry: /* Entry point for secondary CPUs */ | |||
157 | | REG_STATE(mmu, rw_mm_cfg, seg_d, page) \ | 122 | | REG_STATE(mmu, rw_mm_cfg, seg_d, page) \ |
158 | | REG_STATE(mmu, rw_mm_cfg, seg_c, linear) \ | 123 | | REG_STATE(mmu, rw_mm_cfg, seg_c, linear) \ |
159 | | REG_STATE(mmu, rw_mm_cfg, seg_b, linear) \ | 124 | | REG_STATE(mmu, rw_mm_cfg, seg_b, linear) \ |
160 | | REG_STATE(mmu, rw_mm_cfg, seg_a, linear) \ | 125 | | REG_STATE(mmu, rw_mm_cfg, seg_a, page) \ |
161 | | REG_STATE(mmu, rw_mm_cfg, seg_9, page) \ | 126 | | REG_STATE(mmu, rw_mm_cfg, seg_9, page) \ |
162 | | REG_STATE(mmu, rw_mm_cfg, seg_8, page) \ | 127 | | REG_STATE(mmu, rw_mm_cfg, seg_8, page) \ |
163 | | REG_STATE(mmu, rw_mm_cfg, seg_7, page) \ | 128 | | REG_STATE(mmu, rw_mm_cfg, seg_7, page) \ |
@@ -226,7 +191,6 @@ master_cpu: | |||
226 | move.d secondary_cpu_entry, $r1 | 191 | move.d secondary_cpu_entry, $r1 |
227 | move.d $r1, [$r0] | 192 | move.d $r1, [$r0] |
228 | #endif | 193 | #endif |
229 | #ifndef CONFIG_ETRAX_VCS_SIM | ||
230 | ; Check if starting from DRAM (network->RAM boot or unpacked | 194 | ; Check if starting from DRAM (network->RAM boot or unpacked |
231 | ; compressed kernel), or directly from flash. | 195 | ; compressed kernel), or directly from flash. |
232 | lapcq ., $r0 | 196 | lapcq ., $r0 |
@@ -234,7 +198,6 @@ master_cpu: | |||
234 | cmp.d 0x10000, $r0 ; Arbitrary, something above this code. | 198 | cmp.d 0x10000, $r0 ; Arbitrary, something above this code. |
235 | blo _inflash0 | 199 | blo _inflash0 |
236 | nop | 200 | nop |
237 | #endif | ||
238 | 201 | ||
239 | jump _inram ; Jump to cached RAM. | 202 | jump _inram ; Jump to cached RAM. |
240 | nop | 203 | nop |
@@ -326,7 +289,6 @@ move_cramfs: | |||
326 | move.d romfs_length, $r1 | 289 | move.d romfs_length, $r1 |
327 | move.d $r0, [$r1] | 290 | move.d $r0, [$r1] |
328 | 291 | ||
329 | #ifndef CONFIG_ETRAX_VCS_SIM | ||
330 | ;; The kernel could have been unpacked to DRAM by the loader, but | 292 | ;; The kernel could have been unpacked to DRAM by the loader, but |
331 | ;; the cramfs image could still be in the flash immediately | 293 | ;; the cramfs image could still be in the flash immediately |
332 | ;; following the compressed kernel image. The loader passes the address | 294 | ;; following the compressed kernel image. The loader passes the address |
@@ -335,10 +297,6 @@ move_cramfs: | |||
335 | cmp.d 0x0ffffff8, $r9 | 297 | cmp.d 0x0ffffff8, $r9 |
336 | bhs _no_romfs_in_flash ; R9 points outside the flash area. | 298 | bhs _no_romfs_in_flash ; R9 points outside the flash area. |
337 | nop | 299 | nop |
338 | #else | ||
339 | ba _no_romfs_in_flash | ||
340 | nop | ||
341 | #endif | ||
342 | ;; cramfs rootfs might to be in flash. Check for it. | 300 | ;; cramfs rootfs might to be in flash. Check for it. |
343 | move.d [$r9], $r0 ; cramfs_super.magic | 301 | move.d [$r9], $r0 ; cramfs_super.magic |
344 | cmp.d CRAMFS_MAGIC, $r0 | 302 | cmp.d CRAMFS_MAGIC, $r0 |
@@ -396,7 +354,6 @@ _no_romfs_in_flash: | |||
396 | move.d romfs_length, $r3 | 354 | move.d romfs_length, $r3 |
397 | move.d $r2, [$r3] ; store size at romfs_length | 355 | move.d $r2, [$r3] ; store size at romfs_length |
398 | 356 | ||
399 | #ifndef CONFIG_ETRAX_VCS_SIM | ||
400 | add.d $r2, $r0 ; copy from end and downwards | 357 | add.d $r2, $r0 ; copy from end and downwards |
401 | add.d $r2, $r1 | 358 | add.d $r2, $r1 |
402 | 359 | ||
@@ -410,7 +367,6 @@ _no_romfs_in_flash: | |||
410 | subq 1, $r2 | 367 | subq 1, $r2 |
411 | bne 1b | 368 | bne 1b |
412 | nop | 369 | nop |
413 | #endif | ||
414 | 370 | ||
415 | 4: | 371 | 4: |
416 | ;; BSS move done. | 372 | ;; BSS move done. |
@@ -455,7 +411,6 @@ no_command_line: | |||
455 | move.d etrax_irv, $r1 ; Set the exception base register and pointer. | 411 | move.d etrax_irv, $r1 ; Set the exception base register and pointer. |
456 | move.d $r0, [$r1] | 412 | move.d $r0, [$r1] |
457 | 413 | ||
458 | #ifndef CONFIG_ETRAX_VCS_SIM | ||
459 | ;; Clear the BSS region from _bss_start to _end. | 414 | ;; Clear the BSS region from _bss_start to _end. |
460 | move.d __bss_start, $r0 | 415 | move.d __bss_start, $r0 |
461 | move.d _end, $r1 | 416 | move.d _end, $r1 |
@@ -463,15 +418,6 @@ no_command_line: | |||
463 | cmp.d $r1, $r0 | 418 | cmp.d $r1, $r0 |
464 | blo 1b | 419 | blo 1b |
465 | nop | 420 | nop |
466 | #endif | ||
467 | |||
468 | #ifdef CONFIG_ETRAX_VCS_SIM | ||
469 | /* Set the watchdog timeout to something big. Will be removed when */ | ||
470 | /* watchdog can be disabled with command line option */ | ||
471 | move.d 0x7fffffff, $r10 | ||
472 | jsr CPU_WATCHDOG_TIMEOUT | ||
473 | nop | ||
474 | #endif | ||
475 | 421 | ||
476 | ; Initialize registers to increase determinism | 422 | ; Initialize registers to increase determinism |
477 | move.d __bss_start, $r0 | 423 | move.d __bss_start, $r0 |
diff --git a/arch/cris/arch-v32/kernel/kgdb.c b/arch/cris/arch-v32/kernel/kgdb.c index 8c1d35cdf00a..b06813aeb120 100644 --- a/arch/cris/arch-v32/kernel/kgdb.c +++ b/arch/cris/arch-v32/kernel/kgdb.c | |||
@@ -381,23 +381,9 @@ static int read_register(char regno, unsigned int *valptr); | |||
381 | /* Serial port, reads one character. ETRAX 100 specific. from debugport.c */ | 381 | /* Serial port, reads one character. ETRAX 100 specific. from debugport.c */ |
382 | int getDebugChar(void); | 382 | int getDebugChar(void); |
383 | 383 | ||
384 | #ifdef CONFIG_ETRAX_VCS_SIM | ||
385 | int getDebugChar(void) | ||
386 | { | ||
387 | return socketread(); | ||
388 | } | ||
389 | #endif | ||
390 | |||
391 | /* Serial port, writes one character. ETRAX 100 specific. from debugport.c */ | 384 | /* Serial port, writes one character. ETRAX 100 specific. from debugport.c */ |
392 | void putDebugChar(int val); | 385 | void putDebugChar(int val); |
393 | 386 | ||
394 | #ifdef CONFIG_ETRAX_VCS_SIM | ||
395 | void putDebugChar(int val) | ||
396 | { | ||
397 | socketwrite((char *)&val, 1); | ||
398 | } | ||
399 | #endif | ||
400 | |||
401 | /* Returns the integer equivalent of a hexadecimal character. */ | 387 | /* Returns the integer equivalent of a hexadecimal character. */ |
402 | static int hex(char ch); | 388 | static int hex(char ch); |
403 | 389 | ||