head.S 14 KB

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