head.S 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  1. /* $Id: head.S,v 1.87 2002/02/09 19:49:31 davem Exp $
  2. * head.S: Initial boot code for the Sparc64 port of Linux.
  3. *
  4. * Copyright (C) 1996,1997 David S. Miller (davem@caip.rutgers.edu)
  5. * Copyright (C) 1996 David Sitsky (David.Sitsky@anu.edu.au)
  6. * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
  7. * Copyright (C) 1997 Miguel de Icaza (miguel@nuclecu.unam.mx)
  8. */
  9. #include <linux/config.h>
  10. #include <linux/version.h>
  11. #include <linux/errno.h>
  12. #include <asm/thread_info.h>
  13. #include <asm/asi.h>
  14. #include <asm/pstate.h>
  15. #include <asm/ptrace.h>
  16. #include <asm/spitfire.h>
  17. #include <asm/page.h>
  18. #include <asm/pgtable.h>
  19. #include <asm/errno.h>
  20. #include <asm/signal.h>
  21. #include <asm/processor.h>
  22. #include <asm/lsu.h>
  23. #include <asm/dcr.h>
  24. #include <asm/dcu.h>
  25. #include <asm/head.h>
  26. #include <asm/ttable.h>
  27. #include <asm/mmu.h>
  28. /* This section from from _start to sparc64_boot_end should fit into
  29. * 0x0000.0000.0040.4000 to 0x0000.0000.0040.8000 and will be sharing space
  30. * with bootup_user_stack, which is from 0x0000.0000.0040.4000 to
  31. * 0x0000.0000.0040.6000 and empty_bad_page, which is from
  32. * 0x0000.0000.0040.6000 to 0x0000.0000.0040.8000.
  33. */
  34. .text
  35. .globl start, _start, stext, _stext
  36. _start:
  37. start:
  38. _stext:
  39. stext:
  40. bootup_user_stack:
  41. ! 0x0000000000404000
  42. b sparc64_boot
  43. flushw /* Flush register file. */
  44. /* This stuff has to be in sync with SILO and other potential boot loaders
  45. * Fields should be kept upward compatible and whenever any change is made,
  46. * HdrS version should be incremented.
  47. */
  48. .global root_flags, ram_flags, root_dev
  49. .global sparc_ramdisk_image, sparc_ramdisk_size
  50. .global sparc_ramdisk_image64
  51. .ascii "HdrS"
  52. .word LINUX_VERSION_CODE
  53. /* History:
  54. *
  55. * 0x0300 : Supports being located at other than 0x4000
  56. * 0x0202 : Supports kernel params string
  57. * 0x0201 : Supports reboot_command
  58. */
  59. .half 0x0301 /* HdrS version */
  60. root_flags:
  61. .half 1
  62. root_dev:
  63. .half 0
  64. ram_flags:
  65. .half 0
  66. sparc_ramdisk_image:
  67. .word 0
  68. sparc_ramdisk_size:
  69. .word 0
  70. .xword reboot_command
  71. .xword bootstr_info
  72. sparc_ramdisk_image64:
  73. .xword 0
  74. .word _end
  75. /* PROM cif handler code address is in %o4. */
  76. sparc64_boot:
  77. 1: rd %pc, %g7
  78. set 1b, %g1
  79. cmp %g1, %g7
  80. be,pn %xcc, sparc64_boot_after_remap
  81. mov %o4, %l7
  82. /* We need to remap the kernel. Use position independant
  83. * code to remap us to KERNBASE.
  84. *
  85. * SILO can invoke us with 32-bit address masking enabled,
  86. * so make sure that's clear.
  87. */
  88. rdpr %pstate, %g1
  89. andn %g1, PSTATE_AM, %g1
  90. wrpr %g1, 0x0, %pstate
  91. ba,a,pt %xcc, 1f
  92. .globl prom_finddev_name, prom_chosen_path
  93. .globl prom_getprop_name, prom_mmu_name
  94. .globl prom_callmethod_name, prom_translate_name
  95. .globl prom_map_name, prom_unmap_name, prom_mmu_ihandle_cache
  96. .globl prom_boot_mapped_pc, prom_boot_mapping_mode
  97. .globl prom_boot_mapping_phys_high, prom_boot_mapping_phys_low
  98. prom_finddev_name:
  99. .asciz "finddevice"
  100. prom_chosen_path:
  101. .asciz "/chosen"
  102. prom_getprop_name:
  103. .asciz "getprop"
  104. prom_mmu_name:
  105. .asciz "mmu"
  106. prom_callmethod_name:
  107. .asciz "call-method"
  108. prom_translate_name:
  109. .asciz "translate"
  110. prom_map_name:
  111. .asciz "map"
  112. prom_unmap_name:
  113. .asciz "unmap"
  114. .align 4
  115. prom_mmu_ihandle_cache:
  116. .word 0
  117. prom_boot_mapped_pc:
  118. .word 0
  119. prom_boot_mapping_mode:
  120. .word 0
  121. .align 8
  122. prom_boot_mapping_phys_high:
  123. .xword 0
  124. prom_boot_mapping_phys_low:
  125. .xword 0
  126. 1:
  127. rd %pc, %l0
  128. mov (1b - prom_finddev_name), %l1
  129. mov (1b - prom_chosen_path), %l2
  130. mov (1b - prom_boot_mapped_pc), %l3
  131. sub %l0, %l1, %l1
  132. sub %l0, %l2, %l2
  133. sub %l0, %l3, %l3
  134. stw %l0, [%l3]
  135. sub %sp, (192 + 128), %sp
  136. /* chosen_node = prom_finddevice("/chosen") */
  137. stx %l1, [%sp + 2047 + 128 + 0x00] ! service, "finddevice"
  138. mov 1, %l3
  139. stx %l3, [%sp + 2047 + 128 + 0x08] ! num_args, 1
  140. stx %l3, [%sp + 2047 + 128 + 0x10] ! num_rets, 1
  141. stx %l2, [%sp + 2047 + 128 + 0x18] ! arg1, "/chosen"
  142. stx %g0, [%sp + 2047 + 128 + 0x20] ! ret1
  143. call %l7
  144. add %sp, (2047 + 128), %o0 ! argument array
  145. ldx [%sp + 2047 + 128 + 0x20], %l4 ! chosen device node
  146. mov (1b - prom_getprop_name), %l1
  147. mov (1b - prom_mmu_name), %l2
  148. mov (1b - prom_mmu_ihandle_cache), %l5
  149. sub %l0, %l1, %l1
  150. sub %l0, %l2, %l2
  151. sub %l0, %l5, %l5
  152. /* prom_mmu_ihandle_cache = prom_getint(chosen_node, "mmu") */
  153. stx %l1, [%sp + 2047 + 128 + 0x00] ! service, "getprop"
  154. mov 4, %l3
  155. stx %l3, [%sp + 2047 + 128 + 0x08] ! num_args, 4
  156. mov 1, %l3
  157. stx %l3, [%sp + 2047 + 128 + 0x10] ! num_rets, 1
  158. stx %l4, [%sp + 2047 + 128 + 0x18] ! arg1, chosen_node
  159. stx %l2, [%sp + 2047 + 128 + 0x20] ! arg2, "mmu"
  160. stx %l5, [%sp + 2047 + 128 + 0x28] ! arg3, &prom_mmu_ihandle_cache
  161. mov 4, %l3
  162. stx %l3, [%sp + 2047 + 128 + 0x30] ! arg4, sizeof(arg3)
  163. stx %g0, [%sp + 2047 + 128 + 0x38] ! ret1
  164. call %l7
  165. add %sp, (2047 + 128), %o0 ! argument array
  166. mov (1b - prom_callmethod_name), %l1
  167. mov (1b - prom_translate_name), %l2
  168. sub %l0, %l1, %l1
  169. sub %l0, %l2, %l2
  170. lduw [%l5], %l5 ! prom_mmu_ihandle_cache
  171. stx %l1, [%sp + 2047 + 128 + 0x00] ! service, "call-method"
  172. mov 3, %l3
  173. stx %l3, [%sp + 2047 + 128 + 0x08] ! num_args, 3
  174. mov 5, %l3
  175. stx %l3, [%sp + 2047 + 128 + 0x10] ! num_rets, 5
  176. stx %l2, [%sp + 2047 + 128 + 0x18] ! arg1: "translate"
  177. stx %l5, [%sp + 2047 + 128 + 0x20] ! arg2: prom_mmu_ihandle_cache
  178. /* PAGE align */
  179. srlx %l0, 13, %l3
  180. sllx %l3, 13, %l3
  181. stx %l3, [%sp + 2047 + 128 + 0x28] ! arg3: vaddr, our PC
  182. stx %g0, [%sp + 2047 + 128 + 0x30] ! res1
  183. stx %g0, [%sp + 2047 + 128 + 0x38] ! res2
  184. stx %g0, [%sp + 2047 + 128 + 0x40] ! res3
  185. stx %g0, [%sp + 2047 + 128 + 0x48] ! res4
  186. stx %g0, [%sp + 2047 + 128 + 0x50] ! res5
  187. call %l7
  188. add %sp, (2047 + 128), %o0 ! argument array
  189. ldx [%sp + 2047 + 128 + 0x40], %l1 ! translation mode
  190. mov (1b - prom_boot_mapping_mode), %l4
  191. sub %l0, %l4, %l4
  192. stw %l1, [%l4]
  193. mov (1b - prom_boot_mapping_phys_high), %l4
  194. sub %l0, %l4, %l4
  195. ldx [%sp + 2047 + 128 + 0x48], %l2 ! physaddr high
  196. stx %l2, [%l4 + 0x0]
  197. ldx [%sp + 2047 + 128 + 0x50], %l3 ! physaddr low
  198. /* 4MB align */
  199. srlx %l3, 22, %l3
  200. sllx %l3, 22, %l3
  201. stx %l3, [%l4 + 0x8]
  202. /* Leave service as-is, "call-method" */
  203. mov 7, %l3
  204. stx %l3, [%sp + 2047 + 128 + 0x08] ! num_args, 7
  205. mov 1, %l3
  206. stx %l3, [%sp + 2047 + 128 + 0x10] ! num_rets, 1
  207. mov (1b - prom_map_name), %l3
  208. sub %l0, %l3, %l3
  209. stx %l3, [%sp + 2047 + 128 + 0x18] ! arg1: "map"
  210. /* Leave arg2 as-is, prom_mmu_ihandle_cache */
  211. mov -1, %l3
  212. stx %l3, [%sp + 2047 + 128 + 0x28] ! arg3: mode (-1 default)
  213. sethi %hi(8 * 1024 * 1024), %l3
  214. stx %l3, [%sp + 2047 + 128 + 0x30] ! arg4: size (8MB)
  215. sethi %hi(KERNBASE), %l3
  216. stx %l3, [%sp + 2047 + 128 + 0x38] ! arg5: vaddr (KERNBASE)
  217. stx %g0, [%sp + 2047 + 128 + 0x40] ! arg6: empty
  218. mov (1b - prom_boot_mapping_phys_low), %l3
  219. sub %l0, %l3, %l3
  220. ldx [%l3], %l3
  221. stx %l3, [%sp + 2047 + 128 + 0x48] ! arg7: phys addr
  222. call %l7
  223. add %sp, (2047 + 128), %o0 ! argument array
  224. add %sp, (192 + 128), %sp
  225. sparc64_boot_after_remap:
  226. BRANCH_IF_CHEETAH_BASE(g1,g7,cheetah_boot)
  227. BRANCH_IF_CHEETAH_PLUS_OR_FOLLOWON(g1,g7,cheetah_plus_boot)
  228. ba,pt %xcc, spitfire_boot
  229. nop
  230. cheetah_plus_boot:
  231. /* Preserve OBP chosen DCU and DCR register settings. */
  232. ba,pt %xcc, cheetah_generic_boot
  233. nop
  234. cheetah_boot:
  235. mov DCR_BPE | DCR_RPE | DCR_SI | DCR_IFPOE | DCR_MS, %g1
  236. wr %g1, %asr18
  237. sethi %uhi(DCU_ME|DCU_RE|DCU_HPE|DCU_SPE|DCU_SL|DCU_WE), %g7
  238. or %g7, %ulo(DCU_ME|DCU_RE|DCU_HPE|DCU_SPE|DCU_SL|DCU_WE), %g7
  239. sllx %g7, 32, %g7
  240. or %g7, DCU_DM | DCU_IM | DCU_DC | DCU_IC, %g7
  241. stxa %g7, [%g0] ASI_DCU_CONTROL_REG
  242. membar #Sync
  243. cheetah_generic_boot:
  244. mov TSB_EXTENSION_P, %g3
  245. stxa %g0, [%g3] ASI_DMMU
  246. stxa %g0, [%g3] ASI_IMMU
  247. membar #Sync
  248. mov TSB_EXTENSION_S, %g3
  249. stxa %g0, [%g3] ASI_DMMU
  250. membar #Sync
  251. mov TSB_EXTENSION_N, %g3
  252. stxa %g0, [%g3] ASI_DMMU
  253. stxa %g0, [%g3] ASI_IMMU
  254. membar #Sync
  255. ba,a,pt %xcc, jump_to_sun4u_init
  256. spitfire_boot:
  257. /* Typically PROM has already enabled both MMU's and both on-chip
  258. * caches, but we do it here anyway just to be paranoid.
  259. */
  260. mov (LSU_CONTROL_IC|LSU_CONTROL_DC|LSU_CONTROL_IM|LSU_CONTROL_DM), %g1
  261. stxa %g1, [%g0] ASI_LSU_CONTROL
  262. membar #Sync
  263. jump_to_sun4u_init:
  264. /*
  265. * Make sure we are in privileged mode, have address masking,
  266. * using the ordinary globals and have enabled floating
  267. * point.
  268. *
  269. * Again, typically PROM has left %pil at 13 or similar, and
  270. * (PSTATE_PRIV | PSTATE_PEF | PSTATE_IE) in %pstate.
  271. */
  272. wrpr %g0, (PSTATE_PRIV|PSTATE_PEF|PSTATE_IE), %pstate
  273. wr %g0, 0, %fprs
  274. set sun4u_init, %g2
  275. jmpl %g2 + %g0, %g0
  276. nop
  277. sun4u_init:
  278. /* Set ctx 0 */
  279. mov PRIMARY_CONTEXT, %g7
  280. stxa %g0, [%g7] ASI_DMMU
  281. membar #Sync
  282. mov SECONDARY_CONTEXT, %g7
  283. stxa %g0, [%g7] ASI_DMMU
  284. membar #Sync
  285. BRANCH_IF_ANY_CHEETAH(g1,g7,cheetah_tlb_fixup)
  286. ba,pt %xcc, spitfire_tlb_fixup
  287. nop
  288. cheetah_tlb_fixup:
  289. mov 2, %g2 /* Set TLB type to cheetah+. */
  290. BRANCH_IF_CHEETAH_PLUS_OR_FOLLOWON(g1,g7,1f)
  291. mov 1, %g2 /* Set TLB type to cheetah. */
  292. 1: sethi %hi(tlb_type), %g1
  293. stw %g2, [%g1 + %lo(tlb_type)]
  294. /* Patch copy/page operations to cheetah optimized versions. */
  295. call cheetah_patch_copyops
  296. nop
  297. call cheetah_patch_copy_page
  298. nop
  299. call cheetah_patch_cachetlbops
  300. nop
  301. ba,pt %xcc, tlb_fixup_done
  302. nop
  303. spitfire_tlb_fixup:
  304. /* Set TLB type to spitfire. */
  305. mov 0, %g2
  306. sethi %hi(tlb_type), %g1
  307. stw %g2, [%g1 + %lo(tlb_type)]
  308. tlb_fixup_done:
  309. sethi %hi(init_thread_union), %g6
  310. or %g6, %lo(init_thread_union), %g6
  311. ldx [%g6 + TI_TASK], %g4
  312. mov %sp, %l6
  313. mov %o4, %l7
  314. wr %g0, ASI_P, %asi
  315. mov 1, %g1
  316. sllx %g1, THREAD_SHIFT, %g1
  317. sub %g1, (STACKFRAME_SZ + STACK_BIAS), %g1
  318. add %g6, %g1, %sp
  319. mov 0, %fp
  320. /* Set per-cpu pointer initially to zero, this makes
  321. * the boot-cpu use the in-kernel-image per-cpu areas
  322. * before setup_per_cpu_area() is invoked.
  323. */
  324. clr %g5
  325. wrpr %g0, 0, %wstate
  326. wrpr %g0, 0x0, %tl
  327. /* Clear the bss */
  328. sethi %hi(__bss_start), %o0
  329. or %o0, %lo(__bss_start), %o0
  330. sethi %hi(_end), %o1
  331. or %o1, %lo(_end), %o1
  332. call __bzero
  333. sub %o1, %o0, %o1
  334. mov %l6, %o1 ! OpenPROM stack
  335. call prom_init
  336. mov %l7, %o0 ! OpenPROM cif handler
  337. /* Off we go.... */
  338. call start_kernel
  339. nop
  340. /* Not reached... */
  341. /* This is meant to allow the sharing of this code between
  342. * boot processor invocation (via setup_tba() below) and
  343. * secondary processor startup (via trampoline.S). The
  344. * former does use this code, the latter does not yet due
  345. * to some complexities. That should be fixed up at some
  346. * point.
  347. */
  348. .globl setup_trap_table
  349. setup_trap_table:
  350. save %sp, -192, %sp
  351. /* Force interrupts to be disabled. Transferring over to
  352. * the Linux trap table is a very delicate operation.
  353. * Until we are actually on the Linux trap table, we cannot
  354. * get the PAGE_OFFSET linear mappings translated. We need
  355. * that mapping to be setup in order to initialize the firmware
  356. * page tables.
  357. *
  358. * So there is this window of time, from the return from
  359. * prom_set_trap_table() until inherit_prom_mappings_post()
  360. * (in arch/sparc64/mm/init.c) completes, during which no
  361. * firmware address space accesses can be made.
  362. */
  363. rdpr %pstate, %o1
  364. andn %o1, PSTATE_IE, %o1
  365. wrpr %o1, 0x0, %pstate
  366. wrpr %g0, 15, %pil
  367. /* Ok, now make the final valid firmware call to jump over
  368. * to the Linux trap table.
  369. */
  370. call prom_set_trap_table
  371. sethi %hi(sparc64_ttable_tl0), %o0
  372. /* Start using proper page size encodings in ctx register. */
  373. sethi %hi(sparc64_kern_pri_context), %g3
  374. ldx [%g3 + %lo(sparc64_kern_pri_context)], %g2
  375. mov PRIMARY_CONTEXT, %g1
  376. stxa %g2, [%g1] ASI_DMMU
  377. membar #Sync
  378. /* The Linux trap handlers expect various trap global registers
  379. * to be setup with some fixed values. So here we set these
  380. * up very carefully. These globals are:
  381. *
  382. * Alternate Globals (PSTATE_AG):
  383. *
  384. * %g6 --> current_thread_info()
  385. *
  386. * MMU Globals (PSTATE_MG):
  387. *
  388. * %g1 --> TLB_SFSR
  389. * %g2 --> ((_PAGE_VALID | _PAGE_SZ4MB |
  390. * _PAGE_CP | _PAGE_CV | _PAGE_P | _PAGE_W)
  391. * ^ 0xfffff80000000000)
  392. * (this %g2 value is used for computing the PAGE_OFFSET kernel
  393. * TLB entries quickly, the virtual address of the fault XOR'd
  394. * with this %g2 value is the PTE to load into the TLB)
  395. * %g3 --> VPTE_BASE_CHEETAH or VPTE_BASE_SPITFIRE
  396. *
  397. * Interrupt Globals (PSTATE_IG, setup by init_irqwork_curcpu()):
  398. *
  399. * %g6 --> __irq_work[smp_processor_id()]
  400. */
  401. rdpr %pstate, %o1
  402. mov %g6, %o2
  403. wrpr %o1, PSTATE_AG, %pstate
  404. mov %o2, %g6
  405. #define KERN_HIGHBITS ((_PAGE_VALID|_PAGE_SZ4MB)^0xfffff80000000000)
  406. #define KERN_LOWBITS (_PAGE_CP | _PAGE_CV | _PAGE_P | _PAGE_W)
  407. wrpr %o1, PSTATE_MG, %pstate
  408. mov TSB_REG, %g1
  409. stxa %g0, [%g1] ASI_DMMU
  410. membar #Sync
  411. stxa %g0, [%g1] ASI_IMMU
  412. membar #Sync
  413. mov TLB_SFSR, %g1
  414. sethi %uhi(KERN_HIGHBITS), %g2
  415. or %g2, %ulo(KERN_HIGHBITS), %g2
  416. sllx %g2, 32, %g2
  417. or %g2, KERN_LOWBITS, %g2
  418. BRANCH_IF_ANY_CHEETAH(g3,g7,8f)
  419. ba,pt %xcc, 9f
  420. nop
  421. 8:
  422. sethi %uhi(VPTE_BASE_CHEETAH), %g3
  423. or %g3, %ulo(VPTE_BASE_CHEETAH), %g3
  424. ba,pt %xcc, 2f
  425. sllx %g3, 32, %g3
  426. 9:
  427. sethi %uhi(VPTE_BASE_SPITFIRE), %g3
  428. or %g3, %ulo(VPTE_BASE_SPITFIRE), %g3
  429. sllx %g3, 32, %g3
  430. 2:
  431. clr %g7
  432. #undef KERN_HIGHBITS
  433. #undef KERN_LOWBITS
  434. /* Kill PROM timer */
  435. sethi %hi(0x80000000), %o2
  436. sllx %o2, 32, %o2
  437. wr %o2, 0, %tick_cmpr
  438. BRANCH_IF_ANY_CHEETAH(o2,o3,1f)
  439. ba,pt %xcc, 2f
  440. nop
  441. /* Disable STICK_INT interrupts. */
  442. 1:
  443. sethi %hi(0x80000000), %o2
  444. sllx %o2, 32, %o2
  445. wr %o2, %asr25
  446. 2:
  447. wrpr %g0, %g0, %wstate
  448. wrpr %o1, 0x0, %pstate
  449. call init_irqwork_curcpu
  450. nop
  451. /* Now we can turn interrupts back on. */
  452. rdpr %pstate, %o1
  453. or %o1, PSTATE_IE, %o1
  454. wrpr %o1, 0, %pstate
  455. wrpr %g0, 0x0, %pil
  456. ret
  457. restore
  458. .globl setup_tba
  459. setup_tba: /* i0 = is_starfire */
  460. save %sp, -192, %sp
  461. /* The boot processor is the only cpu which invokes this
  462. * routine, the other cpus set things up via trampoline.S.
  463. * So save the OBP trap table address here.
  464. */
  465. rdpr %tba, %g7
  466. sethi %hi(prom_tba), %o1
  467. or %o1, %lo(prom_tba), %o1
  468. stx %g7, [%o1]
  469. call setup_trap_table
  470. nop
  471. ret
  472. restore
  473. /*
  474. * The following skips make sure the trap table in ttable.S is aligned
  475. * on a 32K boundary as required by the v9 specs for TBA register.
  476. */
  477. sparc64_boot_end:
  478. .skip 0x2000 + _start - sparc64_boot_end
  479. bootup_user_stack_end:
  480. .skip 0x2000
  481. #ifdef CONFIG_SBUS
  482. /* This is just a hack to fool make depend config.h discovering
  483. strategy: As the .S files below need config.h, but
  484. make depend does not find it for them, we include config.h
  485. in head.S */
  486. #endif
  487. ! 0x0000000000408000
  488. #include "ttable.S"
  489. #include "systbls.S"
  490. #include "ktlb.S"
  491. #include "etrap.S"
  492. #include "rtrap.S"
  493. #include "winfixup.S"
  494. #include "entry.S"
  495. /* This is just anal retentiveness on my part... */
  496. .align 16384
  497. .data
  498. .align 8
  499. .globl prom_tba, tlb_type
  500. prom_tba: .xword 0
  501. tlb_type: .word 0 /* Must NOT end up in BSS */
  502. .section ".fixup",#alloc,#execinstr
  503. .globl __ret_efault, __retl_efault
  504. __ret_efault:
  505. ret
  506. restore %g0, -EFAULT, %o0
  507. __retl_efault:
  508. retl
  509. mov -EFAULT, %o0