head.S 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742
  1. /*
  2. * File: arch/blackfin/mach-bf533/head.S
  3. * Based on:
  4. * Author: Jeff Dionne <jeff@uclinux.org> COPYRIGHT 1998 D. Jeff Dionne
  5. *
  6. * Created: 1998
  7. * Description: bf533 startup file
  8. *
  9. * Modified:
  10. * Copyright 2004-2006 Analog Devices Inc.
  11. *
  12. * Bugs: Enter bugs at http://blackfin.uclinux.org/
  13. *
  14. * This program is free software; you can redistribute it and/or modify
  15. * it under the terms of the GNU General Public License as published by
  16. * the Free Software Foundation; either version 2 of the License, or
  17. * (at your option) any later version.
  18. *
  19. * This program is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. * GNU General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU General Public License
  25. * along with this program; if not, see the file COPYING, or write
  26. * to the Free Software Foundation, Inc.,
  27. * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  28. */
  29. #include <linux/linkage.h>
  30. #include <linux/init.h>
  31. #include <asm/blackfin.h>
  32. #include <asm/trace.h>
  33. #if CONFIG_BFIN_KERNEL_CLOCK
  34. #include <asm/mach/mem_init.h>
  35. #endif
  36. #if CONFIG_DEBUG_KERNEL_START
  37. #include <asm/mach-common/def_LPBlackfin.h>
  38. #endif
  39. .global __rambase
  40. .global __ramstart
  41. .global __ramend
  42. .extern ___bss_stop
  43. .extern ___bss_start
  44. .extern _bf53x_relocate_l1_mem
  45. #define INITIAL_STACK 0xFFB01000
  46. __INIT
  47. ENTRY(__start)
  48. /* R0: argument of command line string, passed from uboot, save it */
  49. R7 = R0;
  50. /* Set the SYSCFG register:
  51. * Enable Cycle Counter and Nesting Of Interrupts (3rd Bit)
  52. */
  53. R0 = 0x36;
  54. SYSCFG = R0;
  55. R0 = 0;
  56. /* Clear Out All the data and pointer Registers */
  57. R1 = R0;
  58. R2 = R0;
  59. R3 = R0;
  60. R4 = R0;
  61. R5 = R0;
  62. R6 = R0;
  63. P0 = R0;
  64. P1 = R0;
  65. P2 = R0;
  66. P3 = R0;
  67. P4 = R0;
  68. P5 = R0;
  69. LC0 = r0;
  70. LC1 = r0;
  71. L0 = r0;
  72. L1 = r0;
  73. L2 = r0;
  74. L3 = r0;
  75. /* Clear Out All the DAG Registers */
  76. B0 = r0;
  77. B1 = r0;
  78. B2 = r0;
  79. B3 = r0;
  80. I0 = r0;
  81. I1 = r0;
  82. I2 = r0;
  83. I3 = r0;
  84. M0 = r0;
  85. M1 = r0;
  86. M2 = r0;
  87. M3 = r0;
  88. trace_buffer_start(p0,r0);
  89. P0 = R1;
  90. R0 = R1;
  91. #if CONFIG_DEBUG_KERNEL_START
  92. /*
  93. * Set up a temporary Event Vector Table, so if something bad happens before
  94. * the kernel is fully started, it doesn't vector off into the bootloaders
  95. * table
  96. */
  97. P0.l = lo(EVT2);
  98. P0.h = hi(EVT2);
  99. P1.l = lo(EVT15);
  100. P1.h = hi(EVT15);
  101. P2.l = debug_kernel_start_trap;
  102. P2.h = debug_kernel_start_trap;
  103. RTS = P2;
  104. RTI = P2;
  105. RTX = P2;
  106. RTN = P2;
  107. RTE = P2;
  108. .Lfill_temp_vector_table:
  109. [P0++] = P2; /* Core Event Vector Table */
  110. CC = P0 == P1;
  111. if !CC JUMP .Lfill_temp_vector_table
  112. P0 = r0;
  113. P1 = r0;
  114. P2 = r0;
  115. #endif
  116. p0.h = hi(FIO_MASKA_C);
  117. p0.l = lo(FIO_MASKA_C);
  118. r0 = 0xFFFF(Z);
  119. w[p0] = r0.L; /* Disable all interrupts */
  120. ssync;
  121. p0.h = hi(FIO_MASKB_C);
  122. p0.l = lo(FIO_MASKB_C);
  123. r0 = 0xFFFF(Z);
  124. w[p0] = r0.L; /* Disable all interrupts */
  125. ssync;
  126. /* Turn off the icache */
  127. p0.l = (IMEM_CONTROL & 0xFFFF);
  128. p0.h = (IMEM_CONTROL >> 16);
  129. R1 = [p0];
  130. R0 = ~ENICPLB;
  131. R0 = R0 & R1;
  132. /* Anomaly 05000125 */
  133. #ifdef ANOMALY_05000125
  134. CLI R2;
  135. SSYNC;
  136. #endif
  137. [p0] = R0;
  138. SSYNC;
  139. #ifdef ANOMALY_05000125
  140. STI R2;
  141. #endif
  142. /* Turn off the dcache */
  143. p0.l = (DMEM_CONTROL & 0xFFFF);
  144. p0.h = (DMEM_CONTROL >> 16);
  145. R1 = [p0];
  146. R0 = ~ENDCPLB;
  147. R0 = R0 & R1;
  148. /* Anomaly 05000125 */
  149. #ifdef ANOMALY_05000125
  150. CLI R2;
  151. SSYNC;
  152. #endif
  153. [p0] = R0;
  154. SSYNC;
  155. #ifdef ANOMALY_05000125
  156. STI R2;
  157. #endif
  158. /* Initialise UART - when booting from u-boot, the UART is not disabled
  159. * so if we dont initalize here, our serial console gets hosed */
  160. p0.h = hi(UART_LCR);
  161. p0.l = lo(UART_LCR);
  162. r0 = 0x0(Z);
  163. w[p0] = r0.L; /* To enable DLL writes */
  164. ssync;
  165. p0.h = hi(UART_DLL);
  166. p0.l = lo(UART_DLL);
  167. r0 = 0x0(Z);
  168. w[p0] = r0.L;
  169. ssync;
  170. p0.h = hi(UART_DLH);
  171. p0.l = lo(UART_DLH);
  172. r0 = 0x00(Z);
  173. w[p0] = r0.L;
  174. ssync;
  175. p0.h = hi(UART_GCTL);
  176. p0.l = lo(UART_GCTL);
  177. r0 = 0x0(Z);
  178. w[p0] = r0.L; /* To enable UART clock */
  179. ssync;
  180. /* Initialize stack pointer */
  181. sp.l = lo(INITIAL_STACK);
  182. sp.h = hi(INITIAL_STACK);
  183. fp = sp;
  184. usp = sp;
  185. /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */
  186. call _bf53x_relocate_l1_mem;
  187. #if CONFIG_BFIN_KERNEL_CLOCK
  188. call _start_dma_code;
  189. #endif
  190. /* Code for initializing Async memory banks */
  191. p2.h = hi(EBIU_AMBCTL1);
  192. p2.l = lo(EBIU_AMBCTL1);
  193. r0.h = hi(AMBCTL1VAL);
  194. r0.l = lo(AMBCTL1VAL);
  195. [p2] = r0;
  196. ssync;
  197. p2.h = hi(EBIU_AMBCTL0);
  198. p2.l = lo(EBIU_AMBCTL0);
  199. r0.h = hi(AMBCTL0VAL);
  200. r0.l = lo(AMBCTL0VAL);
  201. [p2] = r0;
  202. ssync;
  203. p2.h = hi(EBIU_AMGCTL);
  204. p2.l = lo(EBIU_AMGCTL);
  205. r0 = AMGCTLVAL;
  206. w[p2] = r0;
  207. ssync;
  208. /* This section keeps the processor in supervisor mode
  209. * during kernel boot. Switches to user mode at end of boot.
  210. * See page 3-9 of Hardware Reference manual for documentation.
  211. */
  212. /* EVT15 = _real_start */
  213. p0.l = lo(EVT15);
  214. p0.h = hi(EVT15);
  215. p1.l = _real_start;
  216. p1.h = _real_start;
  217. [p0] = p1;
  218. csync;
  219. p0.l = lo(IMASK);
  220. p0.h = hi(IMASK);
  221. p1.l = IMASK_IVG15;
  222. p1.h = 0x0;
  223. [p0] = p1;
  224. csync;
  225. raise 15;
  226. p0.l = .LWAIT_HERE;
  227. p0.h = .LWAIT_HERE;
  228. reti = p0;
  229. #if defined(ANOMALY_05000281)
  230. nop; nop; nop;
  231. #endif
  232. rti;
  233. .LWAIT_HERE:
  234. jump .LWAIT_HERE;
  235. ENDPROC(__start)
  236. ENTRY(_real_start)
  237. [ -- sp ] = reti;
  238. p0.l = lo(WDOG_CTL);
  239. p0.h = hi(WDOG_CTL);
  240. r0 = 0xAD6(z);
  241. w[p0] = r0; /* watchdog off for now */
  242. ssync;
  243. /* Code update for BSS size == 0
  244. * Zero out the bss region.
  245. */
  246. p1.l = ___bss_start;
  247. p1.h = ___bss_start;
  248. p2.l = ___bss_stop;
  249. p2.h = ___bss_stop;
  250. r0 = 0;
  251. p2 -= p1;
  252. lsetup (.L_clear_bss, .L_clear_bss) lc0 = p2;
  253. .L_clear_bss:
  254. B[p1++] = r0;
  255. /* In case there is a NULL pointer reference
  256. * Zero out region before stext
  257. */
  258. p1.l = 0x0;
  259. p1.h = 0x0;
  260. r0.l = __stext;
  261. r0.h = __stext;
  262. r0 = r0 >> 1;
  263. p2 = r0;
  264. r0 = 0;
  265. lsetup (.L_clear_zero, .L_clear_zero) lc0 = p2;
  266. .L_clear_zero:
  267. W[p1++] = r0;
  268. /* pass the uboot arguments to the global value command line */
  269. R0 = R7;
  270. call _cmdline_init;
  271. p1.l = __rambase;
  272. p1.h = __rambase;
  273. r0.l = __sdata;
  274. r0.h = __sdata;
  275. [p1] = r0;
  276. p1.l = __ramstart;
  277. p1.h = __ramstart;
  278. p3.l = ___bss_stop;
  279. p3.h = ___bss_stop;
  280. r1 = p3;
  281. [p1] = r1;
  282. /*
  283. * load the current thread pointer and stack
  284. */
  285. r1.l = _init_thread_union;
  286. r1.h = _init_thread_union;
  287. r2.l = 0x2000;
  288. r2.h = 0x0000;
  289. r1 = r1 + r2;
  290. sp = r1;
  291. usp = sp;
  292. fp = sp;
  293. jump.l _start_kernel;
  294. ENDPROC(_real_start)
  295. __FINIT
  296. .section .l1.text
  297. #if CONFIG_BFIN_KERNEL_CLOCK
  298. ENTRY(_start_dma_code)
  299. p0.h = hi(SIC_IWR);
  300. p0.l = lo(SIC_IWR);
  301. r0.l = 0x1;
  302. r0.h = 0x0;
  303. [p0] = r0;
  304. SSYNC;
  305. /*
  306. * Set PLL_CTL
  307. * - [14:09] = MSEL[5:0] : CLKIN / VCO multiplication factors
  308. * - [8] = BYPASS : BYPASS the PLL, run CLKIN into CCLK/SCLK
  309. * - [7] = output delay (add 200ps of delay to mem signals)
  310. * - [6] = input delay (add 200ps of input delay to mem signals)
  311. * - [5] = PDWN : 1=All Clocks off
  312. * - [3] = STOPCK : 1=Core Clock off
  313. * - [1] = PLL_OFF : 1=Disable Power to PLL
  314. * - [0] = DF : 1=Pass CLKIN/2 to PLL / 0=Pass CLKIN to PLL
  315. * all other bits set to zero
  316. */
  317. p0.h = hi(PLL_LOCKCNT);
  318. p0.l = lo(PLL_LOCKCNT);
  319. r0 = 0x300(Z);
  320. w[p0] = r0.l;
  321. ssync;
  322. P2.H = hi(EBIU_SDGCTL);
  323. P2.L = lo(EBIU_SDGCTL);
  324. R0 = [P2];
  325. BITSET (R0, 24);
  326. [P2] = R0;
  327. SSYNC;
  328. r0 = CONFIG_VCO_MULT & 63; /* Load the VCO multiplier */
  329. r0 = r0 << 9; /* Shift it over, */
  330. r1 = CLKIN_HALF; /* Do we need to divide CLKIN by 2?*/
  331. r0 = r1 | r0;
  332. r1 = PLL_BYPASS; /* Bypass the PLL? */
  333. r1 = r1 << 8; /* Shift it over */
  334. r0 = r1 | r0; /* add them all together */
  335. p0.h = hi(PLL_CTL);
  336. p0.l = lo(PLL_CTL); /* Load the address */
  337. cli r2; /* Disable interrupts */
  338. ssync;
  339. w[p0] = r0.l; /* Set the value */
  340. idle; /* Wait for the PLL to stablize */
  341. sti r2; /* Enable interrupts */
  342. .Lcheck_again:
  343. p0.h = hi(PLL_STAT);
  344. p0.l = lo(PLL_STAT);
  345. R0 = W[P0](Z);
  346. CC = BITTST(R0,5);
  347. if ! CC jump .Lcheck_again;
  348. /* Configure SCLK & CCLK Dividers */
  349. r0 = (CONFIG_CCLK_ACT_DIV | CONFIG_SCLK_DIV);
  350. p0.h = hi(PLL_DIV);
  351. p0.l = lo(PLL_DIV);
  352. w[p0] = r0.l;
  353. ssync;
  354. p0.l = lo(EBIU_SDRRC);
  355. p0.h = hi(EBIU_SDRRC);
  356. r0 = mem_SDRRC;
  357. w[p0] = r0.l;
  358. ssync;
  359. p0.l = (EBIU_SDBCTL & 0xFFFF);
  360. p0.h = (EBIU_SDBCTL >> 16); /* SDRAM Memory Bank Control Register */
  361. r0 = mem_SDBCTL;
  362. w[p0] = r0.l;
  363. ssync;
  364. P2.H = hi(EBIU_SDGCTL);
  365. P2.L = lo(EBIU_SDGCTL);
  366. R0 = [P2];
  367. BITCLR (R0, 24);
  368. p0.h = hi(EBIU_SDSTAT);
  369. p0.l = lo(EBIU_SDSTAT);
  370. r2.l = w[p0];
  371. cc = bittst(r2,3);
  372. if !cc jump .Lskip;
  373. NOP;
  374. BITSET (R0, 23);
  375. .Lskip:
  376. [P2] = R0;
  377. SSYNC;
  378. R0.L = lo(mem_SDGCTL);
  379. R0.H = hi(mem_SDGCTL);
  380. R1 = [p2];
  381. R1 = R1 | R0;
  382. [P2] = R1;
  383. SSYNC;
  384. p0.h = hi(SIC_IWR);
  385. p0.l = lo(SIC_IWR);
  386. r0.l = lo(IWR_ENABLE_ALL);
  387. r0.h = hi(IWR_ENABLE_ALL);
  388. [p0] = r0;
  389. SSYNC;
  390. RTS;
  391. ENDPROC(_start_dma_code)
  392. #endif /* CONFIG_BFIN_KERNEL_CLOCK */
  393. ENTRY(_bfin_reset)
  394. /* No more interrupts to be handled*/
  395. CLI R6;
  396. SSYNC;
  397. #if defined(CONFIG_BFIN_SHARED_FLASH_ENET)
  398. p0.h = hi(FIO_INEN);
  399. p0.l = lo(FIO_INEN);
  400. r0.l = ~(1 << CONFIG_ENET_FLASH_PIN);
  401. w[p0] = r0.l;
  402. p0.h = hi(FIO_DIR);
  403. p0.l = lo(FIO_DIR);
  404. r0.l = (1 << CONFIG_ENET_FLASH_PIN);
  405. w[p0] = r0.l;
  406. p0.h = hi(FIO_FLAG_C);
  407. p0.l = lo(FIO_FLAG_C);
  408. r0.l = (1 << CONFIG_ENET_FLASH_PIN);
  409. w[p0] = r0.l;
  410. #endif
  411. /* Clear the IMASK register */
  412. p0.h = hi(IMASK);
  413. p0.l = lo(IMASK);
  414. r0 = 0x0;
  415. [p0] = r0;
  416. /* Clear the ILAT register */
  417. p0.h = hi(ILAT);
  418. p0.l = lo(ILAT);
  419. r0 = [p0];
  420. [p0] = r0;
  421. SSYNC;
  422. /* make sure SYSCR is set to use BMODE */
  423. P0.h = hi(SYSCR);
  424. P0.l = lo(SYSCR);
  425. R0.l = 0x0;
  426. W[P0] = R0.l;
  427. SSYNC;
  428. /* issue a system soft reset */
  429. P1.h = hi(SWRST);
  430. P1.l = lo(SWRST);
  431. R1.l = 0x0007;
  432. W[P1] = R1;
  433. SSYNC;
  434. /* clear system soft reset */
  435. R0.l = 0x0000;
  436. W[P0] = R0;
  437. SSYNC;
  438. /* issue core reset */
  439. raise 1;
  440. RTS;
  441. ENDPROC(_bfin_reset)
  442. #if CONFIG_DEBUG_KERNEL_START
  443. debug_kernel_start_trap:
  444. /* Set up a temp stack in L1 - SDRAM might not be working */
  445. P0.L = lo(L1_DATA_A_START + 0x100);
  446. P0.H = hi(L1_DATA_A_START + 0x100);
  447. SP = P0;
  448. /* Make sure the Clocks are the way I think they should be */
  449. r0 = CONFIG_VCO_MULT & 63; /* Load the VCO multiplier */
  450. r0 = r0 << 9; /* Shift it over, */
  451. r1 = CLKIN_HALF; /* Do we need to divide CLKIN by 2?*/
  452. r0 = r1 | r0;
  453. r1 = PLL_BYPASS; /* Bypass the PLL? */
  454. r1 = r1 << 8; /* Shift it over */
  455. r0 = r1 | r0; /* add them all together */
  456. p0.h = hi(PLL_CTL);
  457. p0.l = lo(PLL_CTL); /* Load the address */
  458. cli r2; /* Disable interrupts */
  459. ssync;
  460. w[p0] = r0.l; /* Set the value */
  461. idle; /* Wait for the PLL to stablize */
  462. sti r2; /* Enable interrupts */
  463. .Lcheck_again1:
  464. p0.h = hi(PLL_STAT);
  465. p0.l = lo(PLL_STAT);
  466. R0 = W[P0](Z);
  467. CC = BITTST(R0,5);
  468. if ! CC jump .Lcheck_again1;
  469. /* Configure SCLK & CCLK Dividers */
  470. r0 = (CONFIG_CCLK_ACT_DIV | CONFIG_SCLK_DIV);
  471. p0.h = hi(PLL_DIV);
  472. p0.l = lo(PLL_DIV);
  473. w[p0] = r0.l;
  474. ssync;
  475. /* Make sure UART is enabled - you can never be sure */
  476. /*
  477. * Setup for console. Argument comes from the menuconfig
  478. */
  479. #ifdef CONFIG_BAUD_9600
  480. #define CONSOLE_BAUD_RATE 9600
  481. #elif CONFIG_BAUD_19200
  482. #define CONSOLE_BAUD_RATE 19200
  483. #elif CONFIG_BAUD_38400
  484. #define CONSOLE_BAUD_RATE 38400
  485. #elif CONFIG_BAUD_57600
  486. #define CONSOLE_BAUD_RATE 57600
  487. #elif CONFIG_BAUD_115200
  488. #define CONSOLE_BAUD_RATE 115200
  489. #endif
  490. p0.h = hi(UART_GCTL);
  491. p0.l = lo(UART_GCTL);
  492. r0 = 0x00(Z);
  493. w[p0] = r0.L; /* To Turn off UART clocks */
  494. ssync;
  495. p0.h = hi(UART_LCR);
  496. p0.l = lo(UART_LCR);
  497. r0 = 0x83(Z);
  498. w[p0] = r0.L; /* To enable DLL writes */
  499. ssync;
  500. R1 = (((CONFIG_CLKIN_HZ * CONFIG_VCO_MULT) / CONFIG_SCLK_DIV) / (CONSOLE_BAUD_RATE * 16));
  501. p0.h = hi(UART_DLL);
  502. p0.l = lo(UART_DLL);
  503. r0 = 0xFF(Z);
  504. r0 = R1 & R0;
  505. w[p0] = r0.L;
  506. ssync;
  507. p0.h = hi(UART_DLH);
  508. p0.l = lo(UART_DLH);
  509. r1 >>= 8 ;
  510. w[p0] = r1.L;
  511. ssync;
  512. p0.h = hi(UART_GCTL);
  513. p0.l = lo(UART_GCTL);
  514. r0 = 0x0(Z);
  515. w[p0] = r0.L; /* To enable UART clock */
  516. ssync;
  517. p0.h = hi(UART_LCR);
  518. p0.l = lo(UART_LCR);
  519. r0 = 0x03(Z);
  520. w[p0] = r0.L; /* To Turn on UART */
  521. ssync;
  522. p0.h = hi(UART_GCTL);
  523. p0.l = lo(UART_GCTL);
  524. r0 = 0x01(Z);
  525. w[p0] = r0.L; /* To Turn on UART Clocks */
  526. ssync;
  527. P0.h = hi(UART_THR);
  528. P0.l = lo(UART_THR);
  529. P1.h = hi(UART_LSR);
  530. P1.l = lo(UART_LSR);
  531. R0.L = 'K';
  532. call .Lwait_char;
  533. R0.L='e';
  534. call .Lwait_char;
  535. R0.L='r';
  536. call .Lwait_char;
  537. R0.L='n'
  538. call .Lwait_char;
  539. R0.L='e'
  540. call .Lwait_char;
  541. R0.L='l';
  542. call .Lwait_char;
  543. R0.L=' ';
  544. call .Lwait_char;
  545. R0.L='c';
  546. call .Lwait_char;
  547. R0.L='r';
  548. call .Lwait_char;
  549. R0.L='a';
  550. call .Lwait_char;
  551. R0.L='s';
  552. call .Lwait_char;
  553. R0.L='h';
  554. call .Lwait_char;
  555. R0.L='\r';
  556. call .Lwait_char;
  557. R0.L='\n';
  558. call .Lwait_char;
  559. R0.L='S';
  560. call .Lwait_char;
  561. R0.L='E';
  562. call .Lwait_char;
  563. R0.L='Q'
  564. call .Lwait_char;
  565. R0.L='S'
  566. call .Lwait_char;
  567. R0.L='T';
  568. call .Lwait_char;
  569. R0.L='A';
  570. call .Lwait_char;
  571. R0.L='T';
  572. call .Lwait_char;
  573. R0.L='=';
  574. call .Lwait_char;
  575. R2 = SEQSTAT;
  576. call .Ldump_reg;
  577. R0.L=' ';
  578. call .Lwait_char;
  579. R0.L='R';
  580. call .Lwait_char;
  581. R0.L='E'
  582. call .Lwait_char;
  583. R0.L='T'
  584. call .Lwait_char;
  585. R0.L='X';
  586. call .Lwait_char;
  587. R0.L='=';
  588. call .Lwait_char;
  589. R2 = RETX;
  590. call .Ldump_reg;
  591. R0.L='\r';
  592. call .Lwait_char;
  593. R0.L='\n';
  594. call .Lwait_char;
  595. .Ldebug_kernel_start_trap_done:
  596. JUMP .Ldebug_kernel_start_trap_done;
  597. .Ldump_reg:
  598. R3 = 32;
  599. R4 = 0x0F;
  600. R5 = ':'; /* one past 9 */
  601. .Ldump_reg2:
  602. R0 = R2;
  603. R3 += -4;
  604. R0 >>>= R3;
  605. R0 = R0 & R4;
  606. R0 += 0x30;
  607. CC = R0 <= R5;
  608. if CC JUMP .Ldump_reg1;
  609. R0 += 7;
  610. .Ldump_reg1:
  611. R1.l = W[P1];
  612. CC = BITTST(R1, 5);
  613. if !CC JUMP .Ldump_reg1;
  614. W[P0] = r0;
  615. CC = R3 == 0;
  616. if !CC JUMP .Ldump_reg2
  617. RTS;
  618. .Lwait_char:
  619. R1.l = W[P1];
  620. CC = BITTST(R1, 5);
  621. if !CC JUMP .Lwait_char;
  622. W[P0] = r0;
  623. RTS;
  624. #endif /* CONFIG_DEBUG_KERNEL_START */
  625. .data
  626. /*
  627. * Set up the usable of RAM stuff. Size of RAM is determined then
  628. * an initial stack set up at the end.
  629. */
  630. .align 4
  631. __rambase:
  632. .long 0
  633. __ramstart:
  634. .long 0
  635. __ramend:
  636. .long 0