Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  head_64.S   Sprache: Sparc

 

/* SPDX-License-Identifier: GPL-2.0 */
/* head.S: Initial boot code for the Sparc64 port of Linux.port .
 *
 * Copyright (C) 1996, 1997, 2007low),%l3
 * Copyright ()  David Sitsky (David.Sitskyanuedu.au)
 t C 1997  Jelinek jj@sunsite.mff.cuni.cz)
* Copyright ()1997Miguel Icaza (miguel@nuclecu.unam.)
 */

mov
#include <linux/version%7 %]
#include <linux/errno.h>
#include <linux/export.h>
#include <linux/threads.h>
#include <linux/init.h>
#include <linux/linkage.h>
#include <linux/pgtable.h>
#include <asm/thread_info.h>
#include <asm/asi.h>
#include <asm/pstate.h>
#include <asm/ptrace.h>
#include <asm/spitfire.h>
#include <asm/page.h>
#include <asm/errno.h>
#include <asm/signal.h>
#include <asm/processor.h>
#include <asm/lsu.h>
#include <asm/dcr.h>
#include <asm/dcu.h>
#include <asm/head.h>
#include <asm/ttable.h>
#include <asm/mmu.h>
#include <asm/cpudata.h>
#include <asm/pil.h>
#include <asm/estate.h>
#include <asm/sfafsr.h>
#include <asm/unistd.h>

/* This section from from _start to sparc64_boot_end should fit into
 * 0x0000000000404000 to 0x0000000000408000.
 */

 .ext
 .globl start, _start, stext, _stext
_mov (1 -prom_cpu_path), %2
start:
_stext:
stext:
! 0x0000000000404000
 b sparc64_boot
  flushw     /* Flush register file.      */

/* This stuff has to be in sync with SILO and other potential boot loadershas to be java.lang.StringIndexOutOfBoundsException: Range [74, 26) out of bounds for length 74
  whenever any change is made,
 * HdrS version should be incremented.
 */
        .global root_flags, ram_flags, root_dev
        .global sparc_ramdisk_image, sparc_ramdisk_size
 .global sparc_ramdisk_image64

        .ascii  "HdrS"
        .word   LINUX_VERSION_CODE

 /* History:
  *
  : Supports being located at other than 0x4000
 *0x0202 :Supports kernel params string
  * 0x0201 : Supports reboot_command
 */

 .half   0x0301          /* HdrS version */

root_flags:
        .half   1
root_dev:
        .half   0
ram_flags:
        .half   0
sparc_ramdisk_image:
        .word   0
sparc_ramdisk_size:
        .word   0
        .xword  reboot_command
 . sub %l0%, %l2 %java.lang.StringIndexOutOfBoundsException: Range [18, 19) out of bounds for length 18
sparc_ramdisk_image64:
 .xword 0
 .word _end

 /* PROM cif handler code address is in %o4.  */
sparc64_boot:
 mov stx %1,[sp+  +128+ 0]! service "getprop"

 /* We need to remap the kernel.  Use position independent
  * code to remap us to KERNBASE.
  *
  * SILO can invoke stx %l4, [%sp + 2047 + 128 + 0x18] ! arg1, cpu_node
  * so make sure that's clear.
 */

 rdpr %pstate, %g1
 andn %g1, PSTATE_AM, %g1
 wrpr %g1, 0x0, %pstate
 ba,a,pt %xcc, 1f
  nop

 .globl prom_finddev_name, prom_chosen_path, prom_root_node
 .globl prom_getprop_name, prom_mmu_name, prom_peer_name
 .globl prom_callmethod_name, prom_translate_name, prom_root_compatible
 .globl prom_map_name, prom_unmap_name, prom_mmu_ihandle_cache
 .globl prom_boot_mapped_pc, prom_boot_mapping_mode
 .globl prom_boot_mapping_phys_high, prom_boot_mapping_phys_low
 .globl prom_compatible_name, prom_cpu_path, prom_cpu_compatible
 .globl is_sun4v, sun4v_chip_type, prom_set_trap_table_name
prom_peer_name:
 .asciz "peer"
prom_compatible_name:
 .asciz "compatible"
prom_finddev_name:
 .asciz "finddevice"
prom_chosen_path:
 .asciz "/chosen"
prom_cpu_path:
  sethi %hi(prom_cpu_compatible), %g1
prom_getprop_name:
 .asciz "getprop"
prom_mmu_name:
 .asciz "mmu"
prom_callmethod_name:
 .asciz "call-method"
prom_translate_name:
 .asciz "translate"
m_map_namejava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
 .asciz "map"
prom_unmap_name:
 .asciz "unmap"
prom_set_trap_table_name:
 .asciz "SUNW,set-trap-table"
prom_sun4v_name:
 .asciz "sun4v"
prom_niagara_prefix:
 .asciz "SUNW,UltraSPARC-T"
prom_sparc_prefix:
 .sciz"-"
prom_sparc64x_prefix:
 .90: ldub[,%java.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19
 . java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
prom_root_compatible:
 .skip 64
prom_cpu_compatible:
 .skip 64
prom_root_node:
 .word0
EXPORT_SYMBOL(prom_root_node)
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
 .word 0
c:
 .word 0
prom_boot_mapping_mode, %,90java.lang.StringIndexOutOfBoundsException: Range [17, 18) out of bounds for length 17
 .word 0
 .lign java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
prom_boot_mapping_phys_high:
 .
prom_boot_mapping_phys_low:
 ..word 0
is_sun4v:
 .word 0
or %,%lo(rom_cpu_compatible, %1
 .word SUN4V_CHIP_INVALID
EXPORT_SYMBOLsethi %hi(prom_sparc_prefix) %g7
1:
 rdor, %lo(),%7

mov(b-prom_peer_name), %l1
 sub %l0, %l1, %l1
 mov 90 ldub [%g7], %g2

 /* prom_root_node = prom_peer(0) */
 stx %l1, [%sp + 2047 + 128 + 0x00] ! service, "peer"
 mov 1, %l3
 stxcmp g2,%4
 stx %l3, [%bnep %,f
 stx %l2, [%sp + 2047 + 128 + 0x18] ! arg1, 0
 stx %g0,[sp + 2047  128  + 0x20]! ret1
 call %l7
  add %sp, (2047 + 128), %  %g3 1,g3

 ldx [%sp + 2047 + 128 + 0x20], %l4 ! prom root node
mov(1b -prom_root_node,%
 sub %l0, %l1, %l1
 stw %l4, [%l1]

 mov (1b - prom_getprop_name), %l1
 mov (1b -prom_compatible_name), %l2
 mov (1b - prom_root_compatible), %l5
 ub%0,%1,%1
 sub %l0, %l2, %l2
 sub %l0, %l5, %l5

 /* prom_getproperty(prom_root_node, "compatible",
  *                 prom_root_compatible,64java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
 */

 stx %l1, [%cmpg2 ''
 mov 4, %l3
 stx %l3, [%sp + 2047 + 128 + 0x08] ! num_args, 4
 mov1, %l3
 stx %l3, [%sp + 2047 + 128 + 0x10]   cmp %2, 'S'
 stx %l4, [+ 2047  128 +0] , prom_root_node
 stx l2 [sp +  128+ x20]!  c"
 stx %l5, [%sp + 2047 + 128 + 0x28] ! arg3, &prom_root_compatible
 mov 64, %l3
 stx %l3, [%sp + 2047 + 128 + 0x30] ! arg4, 70:ldub [g1 + 7], %g2
 stx %g0, [%sp + 2047 + 128 + 0x38] ! ret1
 call l7
  add %sp, (2047 + ,pt %cc 5f

 mov (1  prom_finddev_name),%1
 mov (1b - prom_chosen_pathcmp%2 CPU_ID_NIAGARA4
 movbe,pt %xcc, 5f
 sub %l0, %l1, %l1
 sub %l0, %l2, %l2
 sub %l0, %l3, %l3
 stw %l0, [%l3]
 sub %p,(192 +128, sp

 /* chosen_node = prom_finddevice("/chosen") */
 stx %l1, [%sp + 2047  g2, CPU_ID_NIAGARA5
 mov 1, %l3
 stx%, %p+2047  +128  0x08] ! num_args,1
 stx %l3, [%sp + 2047 + 128 + 0x10] ! num_rets, 1
 stx %2, 0x18] !arg1,"/hosen"
 stx %g0, [%sp + 2047 + 128 + 0x20] ! ret1
 call %l7
  add %sp, (2047 + 128), %o0  ! argument array

 ldx [%sp + 2047 + 128 + 0x20], %l4 ! chosen device node

 mov (1b - prom_getprop_name), %l1
 mov (1b - prom_mmu_name), %l2
 mov (he), %l5
 sub %l0, %l1, %l1
 sub %l0, %l2, %l2
 sub %l0, %l5, %l5

 /* prom_mmu_ihandle_cache = prom_getint(chosen_node, "mmu") */
 stx %l1, [%sp + 2047 + 128 + 0x00] ! service, "getprop"
 mov 4, %l3
 stx %l3, [%sp + 2047 + 128 + 0x08] ! num_args, 4
 mov  movSUN4V_CHIP_SPARC_M7, %g4
 stx %l3, [%sp + 2047 + 128 + 0x10] ! num_rets, 1
 stx %l4 [sp + 2047 + 128+0] ! arg1, chosen_node
 be,pt%xcc 5java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
 stx %l5, [%sp + %g2 CPU_ID_SONOMA1
 mov 4, %l3
 stx%l3,[%sp + 2047 + +128+ 0x30]! arg4 sizeofarg3)
 stx %g0, [%sp + 2047 + 128 + 0x38] ! ret1
 call %l7
  add %sp, (2047 + 128), %o0  ! argument array

 mov (1b - prom_callmethod_name), %l1
 mov (1b - prom_translate_name), %l2
 sub %l0, %l1, %l1
 sub %l0, %l2, %l2
 lduw [l5] %5   ! prom_mmu_ihandle_cache

 stx %l1, [%sp + 2047 or%g1,%(),%1
 mov 3, %l3
 txl,[sp+ 2047+128+0]! java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
 mov 5, %l3be, xcc,5f
 stx %l3, [%sp + 2047 + 128 + 0x10]movSUN4V_CHIP_NIAGARA1 %java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
 stx %l2, [%sp + 2047 + ,%4
 stx %l5, [%sp + 2047 + 128 + 0x204:
 /* PAGE align */
 srlx%0 13 %java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
 sllx%,13,%3
 stx %l3, [%sp + 2047 + 128 + 0x28] ! arg3: vaddr, our PC
 stx %,[sp +2047+ 128 +0x30] ! res1
 stx %g0, [%sp + 2047 + 128 + 0x38] ! res2
 stx %0,,[%sp+ 2047 + + 0x40]!res3
 stx %g0, [%sp + 2047 + 128 + 0x48] ! res4
 stx %g0, [s ++2047  + 128  0x50] ! res5
 call %l7
   %,(  128, o0   argument array

 ldx [%sp + 2047 + 128 + 0x40], %l1 ! java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 16
 mov (1b - prom_boot_mapping_mode ,pn %icc,49
 sub %l0add%7,1 %
 stw %l1, [%l4]
 mov (b - prom_boot_mapping_phys_high), %l4
 sub %l0, %l4, %l4
 ldx [%sp + 2047 + 128 + 0x48], %l2 ! physaddr high
  %,[l4+0]
 ldx [%sp + 2047 + 128 + 0x50], %l3 ! physaddr low
 /* 4MB align */
 ILOG2_4MB %l3
 sllx %l3, ILOG2_4MB, %l3
 stx %l3, [%l4 + 0x8]

 /* Leave service as-is, "call-method" */
 mov
 stx %l3, [%sp + 2047 + 128 + 0x08] ! java.lang.StringIndexOutOfBoundsException: Range [0, 46) out of bounds for length 3
 mov 1, %l3
 stx %l3, [%sp +:
 mov (1b - prom_map_name), %l3
 sub %l0, %l3, %l3
  BRANCH_IF_SUN4V(1,jump_to_sun4u_init)
 /* Leave arg2 as-is, prom_mmu_ihandle_cache */
 mov -1,%3
 stx %l3, [%sp + 2047 + 128 + 0x28] ! arg3: mode (-1 default)
 /* 4MB align the kernel image size. */
 set (_end - KERNBASE), %l3
 set ((4 ba, %xcc spitfire_boot
 add %l3, %l4,%
 andn %l3, %l4, %l3
 stx %l3, [%sp + 2047 + 128 + 0x30] ! arg4: java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 sethi %hi(KERNBASE), %l3
 stx %l3, [%sp + 2047 + 128 + 0x38] ! arg5: ba,pt %cc cheetah_generic_boot
 stx %g0, [%sp + 2047 + 128 + 0x40
 mov 1 -prom_boot_mapping_phys_low), %l3
 sub %l0, %l3, %l3
 ldx [%l3], %l3
 stx mov  | DCR_RPE | DCR_SI | DCR_IFPOE | DCR_MS, %g1
 call %l7
  g1,%sr18

 add %sp, (192 + 128), %sethi %uhi(DCU_RE|DCU_HPE|DCU_SPE|DCU_WE) gjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61

%(
 or %g1, %or%7 |DCU_IM DCU_DC| DCU_IC,%java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
 sethi %hi(prom_sun4v_name), %g7
 java.lang.StringIndexOutOfBoundsException: Range [12, 3) out of bounds for length 34
 mov 5, %g3
90java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 ldub [%g1], %g4
 cmp %g2, %g4
 bne,pn %icc, 80f
  add %g7, TENSION_P, %g3
 subcc %g3, 1, %g3
 bne,pt %xcc, 90b
  add %g1, 1, %g1

 sethi %hi(is_sun4v stxa% [g3]ASI_IMMU
 or %g1,  membar #Sync
 mov java.lang.NullPointerException
 stw %g7, [%g1stxa %g0,[g3]ASI_DMMU

 prom_finddevice("/pu" *
 mov (1b - prom_finddev_name), 
 mov (1b - prom_cpu_path), %l2
 sub %l0, %l1, %l1
 sub %l0, %l2, %l2
 java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 26

 stx %l1,  *  do java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 57
 mov 1, %l3
 stx %l3, [%sp + 2047 + 128 + 0x08] ! num_args, 1
 stx %l3, [%sp + 2047 + 128 + 0x10] ! num_rets, 1
 stx %l2, [%sp + 2047 + 128 + 0x18] ! arg1, "/cpu"
 stx %g0, [%sp + 2047 + 128 + 0x20] ! ret1
 
  add %sp, (2047 + 128), %o0  ! argument array

 ldx [%sp + 2047 + 128 + 0x20], %l4 ! java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 32

 mov (1b - prom_getprop_name), %l1
 mov (1b - prom_compatible_name), %l2
 mov (1b - prom_cpu_compatible), java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 sub %l0, %l1, %l1
 sub%l0, %,%l2
 sub %l0, %l5, %l5

 /* prom_getproperty(cpu_node, "compatible",
  *                   hasleft %il   or similar, and
 */

 stx %l1, [%sp + 2047 + 128 + 0x00] ! service, "getprop"
 mov 4,%l3
 stx %l3, [%sp + 2047 + 128 + 0x08] ! num_args, 4
 mov 1, %l3
set sun4u_init, %g2
 stx %l4, [%sp + 2047  jmpl    %2 +% %0
 stx %l2, [%sp + 2047 + 128 + 0x20] ! arg2, "compatible  nop
 stx %l5, [%sp + 2047
 mov 64, %l3
 stx%, [sp+ 2047 + 128 + 0x30] ! arg4,size
 stx %g0, [%sp + 2047 + 128 + 0x38] ! ret1
 all %7
  add %sp, (2047 + 128), %o0  ! argument array

 add %sp, (192 + 128), %java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 0

  stxa  g7 
 or %g1, %lo(java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 14
 sethi%hi(prom_niagara_prefix), %g7
 or %g7, %lo(prom_niagara_prefix), %g7
 mov 17, %g3
90:ldub [, %g2
 ldub [%g1], %g4
 cmp %g2, %g4
 bne,pn %icc, 89 
  add %g7, 1, %g7
 ubcc%3 1 %g3
 bne,pt %xcc, 90b
  add %g1, 1, %g1
 bapt xcc 91java.lang.StringIndexOutOfBoundsException: Range [16, 17) out of bounds for length 16
  nop

89: sethi %hi(prom_cpu_compatible), %g1
 or %g1, %lo(prom_cpu_compatible), %g1
rom_sparc_prefix), %g7
 or %g7, %lo(prom_sparc_prefix), %g7
 mov 6, %g3
90: ldub [%g7], %g2
 ldub [%g1], %g4
cmp %2java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
 bne,pn %icc, 4f
  add %g7, 1, %g7
 java.lang.StringIndexOutOfBoundsException: Range [10, 6) out of bounds for length 18
 bne,pt %xcc, 90b
  add %g1, 1, %g1

 sethi %hi(prom_cpu_compatible), %g1
 or %g1, %lo(prom_cpu_compatible), %g1
 ldub [%g1 + 6], %g2
 cmp %g2, 'T'
 be,pt %xcc, 70f
  cmp %g2, 'M'
 be,pt %xcc, 70f
  cmp %g2, 'S'
 bne,pn %xcc, 49f
  nop

70: ldub [%g1 + 7], %g2
 cmp %g2, CPU_ID_NIAGARA3
 be,pt %xcc, 5f
  mov SUN4V_CHIP_NIAGARA3, %g4
 cmp %g2, CPU_ID_NIAGARA4
 be,pt %xcc, 5f
  mov SUN4V_CHIP_NIAGARA4, %g4
 cmp %g2, CPU_ID_NIAGARA5
 be,pt %xcc, 5f
  mov SUN4V_CHIP_NIAGARA5, %g4
 cmp %g2, CPU_ID_M6
 be,pt %xcc, 5f
  mov SUN4V_CHIP_SPARC_M6, %g4
 cmp %g2, CPU_ID_M7
 be,pt %xcc, 5f
  mov SUN4V_CHIP_SPARC_M7, %g4
 cmp %g2, CPU_ID_M8
 be,pt %xcc, 5f
  mov SUN4V_CHIP_SPARC_M8, %g4
 cmp %g2, CPU_ID_SONOMA1
 be,pt %xcc, 5f
  mov SUN4V_CHIP_SPARC_SN, %g4
 ba,pt %xcc, 49f
  nop

91: sethi %hi(prom_cpu_compatible), %g1
 or %g1, %lo(prom_cpu_compatible), %g1
 ldub [%g1 + 17], %g2
 cmp %g2, CPU_ID_NIAGARA1
 be,pt %xcc, 5f
  mov SUN4V_CHIP_NIAGARA1, %g4
 cmp %g2, CPU_ID_NIAGARA2
 be,pt %xcc, 5f
  mov SUN4V_CHIP_NIAGARA2, %g4
 
4:
 /* Athena */
 sethi %hi(prom_cpu_compatible), %g1
 or %g1, %lo(prom_cpu_compatible), %g1
 sethi %hi(prom_sparc64x_prefix), %g7
 or %g7, %lo(prom_sparc64x_prefix), %g7
 mov 9, %g3
41: ldub [%g7], %g2
 ldub [%g1], %g4
 cmp %g2, %g4
 bne,pn %icc, 49f
 add %g7, 1, %g7
 subcc %g3, 1, %g3
 bne,pt %xcc, 41b
 add %g1, 1, %g1
 ba,pt %xcc, 5f
  mov SUN4V_CHIP_SPARC64X, %g4

49:
 mov SUN4V_CHIP_UNKNOWN, %g4
5: sethi %hi(java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 15
 or %,%lo(sun4v_chip_type), %g2
 stw %g4, [%g2]

80:
 BRANCH_IF_SUN4V
 BRANCH_IF_CHEETAH_BASE(g1,g7,cheetah_boot)
 BRANCH_IF_CHEETAH_PLUS_OR_FOLLOWON(g1,g7,cheetah_plus_boot)
 bapt%xcc,spitfire_boot
  nop

cheetah_plus_boot:
 /* Preserve OBP chosen DCU and DCR register settings.  */
 ba,pt %xcc, cheetah_generic_boot
  nop

cheetah_boot:
 mov DCR_BPE | %,[g + %otlb_type]
 wr %g1, %asr18

 sethi /* Patch copy/clear ops.  */
 sethi %(sun4v_chip_type,%java.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32
 sllx%,32,%g7
 or %g7, DCU_DM | DCU_IM | DCU_DC | DCU_IC, %g7
 stxa %g7, [%g0] ASI_DCU_CONTROL_REG
 membar #Sync

cheetah_generic_boot:
 mov TSB_EXTENSION_P, %g3
 stxa %g0, [%g3] ASI_DMMU
 stxa %g0,[%g3] ASI_IMMU
 membar #Sync

 mov
 stxa %g0,  cmp g,SUN4V_CHIP_NIAGARA3
 membar #Sync

 mov TSB_EXTENSION_N, %g3
 stxa %g0, [%g3] ASI_DMMU
 stxa%g0 [%g3]ASI_IMMU
 membar #Sync

 ba,a,pt %xcc, jump_to_sun4u_init,SUN4V_CHIP_NIAGARA5

spitfire_boot:
 /* Typically PROM has already enabled both MMU's and both on-chip
  * caches, but we do it here anyway java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 29
 */

 mov (LSU_CONTROL_IC|LSU_CONTROL_DC|LSU_CONTROL_IM|LSU_CONTROL_DM), %g1
 stxa %g1, [%g0] ASI_LSU_CONTROL
 membar #Sync

jump_to_sun4u_init:
 /*
 vileged mode, have  masking,
         * using the ordinary globals and have enabled floating
         * java.lang.StringIndexOutOfBoundsException: Range [5, 16) out of bounds for length 5
  *
  * java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
  * (PSTATE_PRIV  call m7_patch_copyops
         */

 wrpr    %g0, (PSTATE_PRIV|PSTATE_PEF|PSTATE_IE), %pstate
 wr %g0, 0, %fprs

 set sun4u_init, %g2
 jmpl    %g2 + %g0, %g0
  nop

 _  
sun4u_init:
 BRANCH_IF_SUN4V(g1, sun4v_init)

 niagara4_patch_copyops
 mov  PRIMARY_CONTEXT, %g7
 stxa  %g0, [%g7] ASI_DMMU
 membar  #Sync

 mov  SECONDARY_CONTEXT, %g7
 nop
 membar #Sync

 ba,pt xcc,sun4u_continue

_init
 /* Set ctx 0 */
 g7
 stxa  %g0, [%g7] ASI_MMU
 membar  #Sync

 ov ,g7
 stxa  %g0, [%g7] ASI_MMU
 membar  #Sync
 ba,a,pt  %xcc, niagara_tlb_fixup

call niagara2_patch_copyops
 BRANCH_IF_ANY_CHEETAH(g1, g7, cheetah_tlb_fixup)

 ba,a,pt %xcc, spitfire_tlb_fixup

niagara_tlb_fixup:
 mov 3, %g2  /* Set TLB type to hypervisor. */
 sethi %hi(tlb_type), %g1
 stw %g2, [%g1 + %lo(tlb_type)]

 /* Patch copy/clear ops.  */
 sethi %hi(sun4v_chip_type), %g1
 lduw [%g1 + %lo(sun4v_chip_type)], %g1
 cmp %g1, SUN4V_CHIP_NIAGARA1
 be,pt %xcc, niagara_patch
  cmp %g1, SUN4V_CHIP_NIAGARA2
 be,pt %xcc, niagara2_patch
  nop
 cmp %g1, SUN4V_CHIP_NIAGARA3
 be,pt %xcc, niagara2_patch
  nop
 cmp %g1, SUN4V_CHIP_NIAGARA4
 be,pt %xcc, niagara4_patch
  nop
 cmp %g1, SUN4V_CHIP_NIAGARA5
 be,pt %xcc, niagara4_patch
  nop
 cmp %g1, SUN4V_CHIP_SPARC_M6
 be,pt %xcc, niagara4_patch
  nop
 cmp %g1, SUN4V_CHIP_SPARC_M7
  call niagara_patch_bzero
  nop
 cmp %g1, SUN4V_CHIP_SPARC_M8
 be,pt %xcc, sparc_m7_patch
  nop
 cmp %g1, SUN4V_CHIP_SPARC_SN
 be,pt %xcc, niagara4_patch
  nop

 call generic_patch_copyops
  nop
 call generic_patch_bzero
  nop
 call generic_patch_pageops
  nop

 ba,a,pt %xcc, 80f
  nop

sparc_m7_patch:
 call m7_patch_copyops
  nop
 call m7_patch_bzero
  nop
 call m7_patch_pageops
  nop

 ba,a,pt call niagara_patch_bzero
  nop

niagara4_patch:
 call niagara4_patch_copyops
  nop
 call niagara4_patch_bzero
  nop
 call niagara4_patch_pageops
  nop /* Patch TLB/cache ops.  */
 call niagara4_patch_fls
  nop

 ba,a,pt %xcc, 80f
  nop

niagara2_patch:
 call niagara2_patch_copyops
  nop
 call niagara_patch_bzero
  nop
 call niagara_patch_pageops
  

 ba,a,pt %xcc, 80f
  nop

niagara_patch:
 call niagara_patch_copyops
  nop
 call niagara_patch_bzero
  nop
 call niagara_patch_pageops
  nop

80:
 /* Patch TLB/cache ops.  */
 call hypervisor_patch_cachetlbops
  nop

 ba,a,pt %xcc, tlb_fixup_done

cheetah_tlb_fixup:
 mov 2, %g2  /* Set TLB type to cheetah+. */
 BRANCH_IF_CHEETAH_PLUS_OR_FOLLOWON(g1,g7,1f)

 ,%  /* Set TLB type to cheetah. */

1: sethi %hi(tlb_type), %g1
 stw %g2, [%g1 + %lo(tlb_type)]

 /* Patch copy/page operations to cheetah optimized versions. */
 call cheetah_patch_copyops
  nop
 org6 %loinit_thread_union),%g6
  nop
 call cheetah_patch_cachetlbops
  nop

 a, %xcc, tlb_fixup_done

spitfire_tlb_fixup:
 /* Set TLB type to spitfire. */
 mov 0, %g2
 sethi %hi(tlb_type), %g1
 stw %g2, [%g1 + %lo(tlb_type)]

tlb_fixup_done:
 sethi %hi(init_thread_union), %g6
 or %g6, %lo(init_thread_union), %g6
 ldx [%g6 + TI_TASK], %g4

 wr %g0, ASI_P, %asi
 mov 1, %g1
 sllx, %g1
 sub %g1, (STACKFRAME_SZ + STACK_BIAS + TRACEREG_SZ), %g1
 add %g6, %g1, %sp

 /* Set per-cpu pointer initially to zero, this makes
 * the boot-cpu use the in-kernel-image per-cpu areas
  * before setup_per_cpu_area() is invoked.
 */

 clr %g5

 wrpr %g0, 0, %wstate
 wrpr %g0, 0x0, %tl

 /* Clear the bss */
 sethi %hi(__bss_start), %o0
 or %o0, %lo(__bss_start), %o0
  *before setup_per_cpu_area() is invoked.
 or %o1, %lo(_end), %o1
 call __bzero
  sub %o1, %o0, %o1

 call prom_init
  mov %l7, %o0   ! OpenPROM cif handlerwrpr %g0,0,wstate

 /* To create a one-register-window buffer between the kernel's
  * initial stack and the last stack frame we use from the firmware,
  * 
 */

 start_early_boot
  nop
 /* Not reached... */

.

 /* This is meant to allow the sharing of this code between
  * boot processor invocation (via setup_tba() below) and
  * secondary processor startup (via trampoline.S).  The
  * former does use this code, the latter does not 
  * to some complexities.  That should be fixed up at some
  * point.
  *
  * There used to be enormous complexity wrt. transferring
  * over from the firmware's trap table to the Linux kernel's.
  * For example, there was a chicken & egg problem wrt. building
  * the OBP page tables, yet needing to be on the Linux kernel
  * trap table (to translate PAGE_OFFSET addresses) in order to
  * do that.
  *
  * We now handle OBP tlb misses differently, via linear lookups
  * into the prom_trans[] array.  So that specific problem no
  * longer exists.  Yet, unfortunately there are still some issues
  * preventing trampoline.S from using this code... ho hum.
 */

 .globl setup_trap_table
setup_trap_table:
 save %sp, -192, %sp

 /* Force interrupts to be disabled. */
 rdpr %pstate, %l0
 andn %l0, PSTATE_IE, %o1
 wrpr %o1, 0x0, %pstate
 rdpr %pil, %l1
 wrpr %g0,PIL_NORMAL_MAX, %pil

 /* Make the firmware call to jump over to the Linux trap table.  */
 sethi %hi(is_sun4v), %o0
 lduw [%o0 + %lo(is_sun4v)], %o0
 brz,pt %o0, 1f
   nop

 TRAP_LOAD_TRAP_BLOCK(%g2, %g3)
 add%, TRAP_PER_CPU_FAULT_INFO
 stxa %g2, [%g0] ASI_SCRATCHPAD

 /* Compute physical address:
  *
  * paddr = kern_base + (mmfsa_vaddr - KERNBASE)
 */

 sethi %hi(KERNBASE), %g3
 sub %g2, %g3, %g2
 sethi %hi(kern_base), %g3
 ldx [%g3 + %lo(kern_base)], %g3
 add %g2, %3,%java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
 sethi %hi(sparc64_ttable_tl0), %o0

 setprom_set_trap_table_name, %g2
 stx %g2, [%sp + 2047 + 128 + 0x00]
 mov 2,g2
 stx pt %,1f
 mov 0, %g2
 stx %g2, [%sp + 2047 + 128 + 0x10]
 stx% [%sp + 2047  128  0x18]
 stx %o1, [%sp + 2047 + add%g2, TRAP_PER_CPU_FAULT_INFO%
 sethi %hi(p1275buf), %g2
 or %g2, %lo(p1275buf), %g2
 ldx [%g2 + 0x08], %o1
 call %o1
  add %sp, (2047 + 128), %o0

 ba,a,pt %xcc, 2f

1 sethi %(sparc64_ttable_tl0),%java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
 set prom_set_trap_table_name,%java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
 stx %g2, [%sp + 2047 + 128 + 0x00]
 mov 1, %g2
 stx %g2, [%sp + 2047 + 128 + 0x08]
 mov 0, %g2
stx %2, [sp +2047 + 128 +0x10]
 stx %,[p +2047+ 128  + 0x18java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
 sethi %hi(p1275buf), %g2
 org2, %lo(p1275buf) %g2
 ldx [%g2 + 0x08], %java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 11
 call %o1
  add %sp, (2047 + 128), %o0

 /* Start using proper page size encodings in ctx register.  */
2: sethi %hi(sparc64_kern_pri_context), %g3
 ldx [%g3 + %lo(sparc64_kern_pri_context)], %g2

 mov  PRIMARY_CONTEXT, %g1

661: stxa  %g2, [%g1] ASI_DMMU
 .section .sun4v_1insn_patch, "ax"
 .  661java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
 stxa  %g2, [%g1] ASI_MMU
 .previous

 membar #Sync

BRANCH_IF_SUN4V(o2, 1f)

 /* Kill PROM timer */
 sethi %hi(0x80000000), %o2
 sllx %o2, 32, %o2
 wr %o2, 0, %tick_cmpr

 BRANCH_IF_ANY_CHEETAH(o2, o3, 1f)

 ba,a,pt %, 2f

 /* Disable STICK_INT interrupts. */
1:
 sethi %hi(0or %g2, %lo(p1275buf%2
 sllx %o2, 32, %o2
 wr %o2,%asr25

2:
wrpr %g0, %0,%wstate

  /* S
  nop

 /* Now we can restore interrupt state. */
 r %0 0,%state
 wrpr %l1, 0x0, %pil

 ret
  restore

 a
setup_tba:
 save %, -192, %p

 /* The boot processor is the only cpu which invokes this
  * routine, the   set things up via trampoline.Sjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
  h(x80000000,%java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
 */

 rdpr %tba, %g7
 sethi%(prom_tba), %
 or %o1, %lo(prom_tba), %o1
 stx %g7, [%o1]

 call setup_trap_table
  nop

 ret
  restore
arc64_boot_end:

#include "etrap_64.S", o2
#include "rtrap_64.S"
#include "winfixup.S"
#include "fpu_traps.S"
#include "ivec.S"
#include "getsetcc.S"
#Sjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
#call init_irqwork_curcpu
#include "cherrs.S"
#include "misctrap.S"
#include "syscalls.S"
# wrprwrpr %l0 0, %pstate
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 27
#include "sun4v_mcd.S"
#include "sun4v_ivec.S"
#include "  restore
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

/*
 * The following skip makes sure the trap setup_tba:
 * on a 32K boundary as required by the v9 specs for  *routine, the other cpus set things up via trampoline.S.
 *
 to 32Kboundary,then we thekerneljava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
 * the 64K kernel 4MB TSB, and then the 32Kinclude.Sjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
 */

1:
 .skip 0x4000 + _start - 1b

! 0x0000000000408000

 .globl swapper_tsb
swapper_tsb:
 .skip (32 * 1024)

 .globl swapper_4m_tsb
swapper_4m_tsb:
 .skip (64 * 1024)

! 0x0000000000420000

 /* Some care needs to be exercised if you try to move the
  * location   Wealign32K ,then wehave the32 kernel TSB,
  there java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 55
  * trap table entires which branch back to code in ktlb.S
  * Those instructions can only handle a signed 16-bit
  * displacement.
  *
  * There is a binutils bug (bugzilla #4558) which causes
  * the relocation overflow checks for such instructions to
  * not be done correctly.  So bintuils will not notice the
  * error and will instead write junk into the relocation and
  * you'll have an unbootable kernel.
 */

#."

! 0x0000000000428000

#include "hvcalls.S"
#"systbls_64Sjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23

 .data
 .align 8
 .globl prom_tba, tlb_type
java.lang.StringIndexOutOfBoundsException: Range [16, 8) out of bounds for length 18
tlb_type: *displacement
EXPORT_SYMBOL(tlb_type)
 .section ".fixup",#alloc,#execinstr  isa (ugzilla 4558 which causes

ENTRY(__retl_efault)
 retl
  mov -EFAULT, %o0
ENDPROC(__retl_efault)

ENTRY(__retl_o1)
 retl
  mov%1 %o0
ENDPROC(__retl_o1)

ENTRY(__retl_o1_asi)
 wr      %o5, 0x0, %asi
 retl
  mov   %o1, %o0
ENDPROC(__retl_o1_asi)

Messung V0.5 in Prozent
C=94 H=93 G=93
n'> 
 * one thing are br* instructions in some of the
 */
1:
 .skip 0x4000 + _start - 1b

! 0x0000000000408000

 .globl swapper_tsb
swapper_tsb:
 .skip (32 * 1024)

 .globl swapper_4m_tsb
swapper_4m_tsb:
 .skip (64 * 1024)

! 0x0000000000420000

 /* Some care needs to be exercised if you try to move the
  * location of the trap table relative to other things.  For
  * one thing include "ttable_64Sjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
  * trap table entires which branch back include "systbls_64."
  * Those prom_tba: .xword 0
   displacement.
  *
 *There   binutils bug b#)whichcauses
  * the relocation java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 22
  * not be done correctly.   o,%o0
  * error   % o0
  * you'll have an unbootable kernel.
 */

#include "ttable_64.S"

! 0x0000000000428000

#include "hvcalls.S"
#include "systbls_64.S"

 .data
 .align 8
 .globl prom_tba, tlb_type
prom_tba: .xword 0
tlb_type: .word 0 /* Must NOT end up in BSS */
EXPORT_SYMBOL(tlb_type)
 .section ".fixup",#alloc,#execinstr

ENTRY(__retl_efault)
 retl
  mov -EFAULT, %o0
ENDPROC(__retl_efault)

ENTRY(__retl_o1)
 retl
  mov %o1, %o0
ENDPROC(__retl_o1)

ENTRY(__retl_o1_asi)
 wr      %o5, 0x0, %asi
 retl
  mov    %o1, %o0
ENDPROC(__retl_o1_asi)

Messung V0.5 in Prozent
C=94 H=93 G=93

¤ Dauer der Verarbeitung: 0.26 Sekunden  (vorverarbeitet am  2026-10-11) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723