head.S 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685
  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. #if CONFIG_DEBUG_KERNEL_START
  397. debug_kernel_start_trap:
  398. /* Set up a temp stack in L1 - SDRAM might not be working */
  399. P0.L = lo(L1_DATA_A_START + 0x100);
  400. P0.H = hi(L1_DATA_A_START + 0x100);
  401. SP = P0;
  402. /* Make sure the Clocks are the way I think they should be */
  403. r0 = CONFIG_VCO_MULT & 63; /* Load the VCO multiplier */
  404. r0 = r0 << 9; /* Shift it over, */
  405. r1 = CLKIN_HALF; /* Do we need to divide CLKIN by 2?*/
  406. r0 = r1 | r0;
  407. r1 = PLL_BYPASS; /* Bypass the PLL? */
  408. r1 = r1 << 8; /* Shift it over */
  409. r0 = r1 | r0; /* add them all together */
  410. p0.h = hi(PLL_CTL);
  411. p0.l = lo(PLL_CTL); /* Load the address */
  412. cli r2; /* Disable interrupts */
  413. ssync;
  414. w[p0] = r0.l; /* Set the value */
  415. idle; /* Wait for the PLL to stablize */
  416. sti r2; /* Enable interrupts */
  417. .Lcheck_again1:
  418. p0.h = hi(PLL_STAT);
  419. p0.l = lo(PLL_STAT);
  420. R0 = W[P0](Z);
  421. CC = BITTST(R0,5);
  422. if ! CC jump .Lcheck_again1;
  423. /* Configure SCLK & CCLK Dividers */
  424. r0 = (CONFIG_CCLK_ACT_DIV | CONFIG_SCLK_DIV);
  425. p0.h = hi(PLL_DIV);
  426. p0.l = lo(PLL_DIV);
  427. w[p0] = r0.l;
  428. ssync;
  429. /* Make sure UART is enabled - you can never be sure */
  430. /*
  431. * Setup for console. Argument comes from the menuconfig
  432. */
  433. #ifdef CONFIG_BAUD_9600
  434. #define CONSOLE_BAUD_RATE 9600
  435. #elif CONFIG_BAUD_19200
  436. #define CONSOLE_BAUD_RATE 19200
  437. #elif CONFIG_BAUD_38400
  438. #define CONSOLE_BAUD_RATE 38400
  439. #elif CONFIG_BAUD_57600
  440. #define CONSOLE_BAUD_RATE 57600
  441. #elif CONFIG_BAUD_115200
  442. #define CONSOLE_BAUD_RATE 115200
  443. #endif
  444. p0.h = hi(UART_GCTL);
  445. p0.l = lo(UART_GCTL);
  446. r0 = 0x00(Z);
  447. w[p0] = r0.L; /* To Turn off UART clocks */
  448. ssync;
  449. p0.h = hi(UART_LCR);
  450. p0.l = lo(UART_LCR);
  451. r0 = 0x83(Z);
  452. w[p0] = r0.L; /* To enable DLL writes */
  453. ssync;
  454. R1 = (((CONFIG_CLKIN_HZ * CONFIG_VCO_MULT) / CONFIG_SCLK_DIV) / (CONSOLE_BAUD_RATE * 16));
  455. p0.h = hi(UART_DLL);
  456. p0.l = lo(UART_DLL);
  457. r0 = 0xFF(Z);
  458. r0 = R1 & R0;
  459. w[p0] = r0.L;
  460. ssync;
  461. p0.h = hi(UART_DLH);
  462. p0.l = lo(UART_DLH);
  463. r1 >>= 8 ;
  464. w[p0] = r1.L;
  465. ssync;
  466. p0.h = hi(UART_GCTL);
  467. p0.l = lo(UART_GCTL);
  468. r0 = 0x0(Z);
  469. w[p0] = r0.L; /* To enable UART clock */
  470. ssync;
  471. p0.h = hi(UART_LCR);
  472. p0.l = lo(UART_LCR);
  473. r0 = 0x03(Z);
  474. w[p0] = r0.L; /* To Turn on UART */
  475. ssync;
  476. p0.h = hi(UART_GCTL);
  477. p0.l = lo(UART_GCTL);
  478. r0 = 0x01(Z);
  479. w[p0] = r0.L; /* To Turn on UART Clocks */
  480. ssync;
  481. P0.h = hi(UART_THR);
  482. P0.l = lo(UART_THR);
  483. P1.h = hi(UART_LSR);
  484. P1.l = lo(UART_LSR);
  485. R0.L = 'K';
  486. call .Lwait_char;
  487. R0.L='e';
  488. call .Lwait_char;
  489. R0.L='r';
  490. call .Lwait_char;
  491. R0.L='n'
  492. call .Lwait_char;
  493. R0.L='e'
  494. call .Lwait_char;
  495. R0.L='l';
  496. call .Lwait_char;
  497. R0.L=' ';
  498. call .Lwait_char;
  499. R0.L='c';
  500. call .Lwait_char;
  501. R0.L='r';
  502. call .Lwait_char;
  503. R0.L='a';
  504. call .Lwait_char;
  505. R0.L='s';
  506. call .Lwait_char;
  507. R0.L='h';
  508. call .Lwait_char;
  509. R0.L='\r';
  510. call .Lwait_char;
  511. R0.L='\n';
  512. call .Lwait_char;
  513. R0.L='S';
  514. call .Lwait_char;
  515. R0.L='E';
  516. call .Lwait_char;
  517. R0.L='Q'
  518. call .Lwait_char;
  519. R0.L='S'
  520. call .Lwait_char;
  521. R0.L='T';
  522. call .Lwait_char;
  523. R0.L='A';
  524. call .Lwait_char;
  525. R0.L='T';
  526. call .Lwait_char;
  527. R0.L='=';
  528. call .Lwait_char;
  529. R2 = SEQSTAT;
  530. call .Ldump_reg;
  531. R0.L=' ';
  532. call .Lwait_char;
  533. R0.L='R';
  534. call .Lwait_char;
  535. R0.L='E'
  536. call .Lwait_char;
  537. R0.L='T'
  538. call .Lwait_char;
  539. R0.L='X';
  540. call .Lwait_char;
  541. R0.L='=';
  542. call .Lwait_char;
  543. R2 = RETX;
  544. call .Ldump_reg;
  545. R0.L='\r';
  546. call .Lwait_char;
  547. R0.L='\n';
  548. call .Lwait_char;
  549. .Ldebug_kernel_start_trap_done:
  550. JUMP .Ldebug_kernel_start_trap_done;
  551. .Ldump_reg:
  552. R3 = 32;
  553. R4 = 0x0F;
  554. R5 = ':'; /* one past 9 */
  555. .Ldump_reg2:
  556. R0 = R2;
  557. R3 += -4;
  558. R0 >>>= R3;
  559. R0 = R0 & R4;
  560. R0 += 0x30;
  561. CC = R0 <= R5;
  562. if CC JUMP .Ldump_reg1;
  563. R0 += 7;
  564. .Ldump_reg1:
  565. R1.l = W[P1];
  566. CC = BITTST(R1, 5);
  567. if !CC JUMP .Ldump_reg1;
  568. W[P0] = r0;
  569. CC = R3 == 0;
  570. if !CC JUMP .Ldump_reg2
  571. RTS;
  572. .Lwait_char:
  573. R1.l = W[P1];
  574. CC = BITTST(R1, 5);
  575. if !CC JUMP .Lwait_char;
  576. W[P0] = r0;
  577. RTS;
  578. #endif /* CONFIG_DEBUG_KERNEL_START */
  579. .data
  580. /*
  581. * Set up the usable of RAM stuff. Size of RAM is determined then
  582. * an initial stack set up at the end.
  583. */
  584. .align 4
  585. __rambase:
  586. .long 0
  587. __ramstart:
  588. .long 0
  589. __ramend:
  590. .long 0