head.S 14 KB

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