Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 9280dd0 in mainline


Ignore:
Timestamp:
2017-11-16T17:12:03Z (3 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
efb9fd08
Parents:
92232331
git-author:
Jakub Jermar <jakub@…> (2017-11-16 17:10:36)
git-committer:
Jakub Jermar <jakub@…> (2017-11-16 17:12:03)
Message:

Remove the Simics SMP hack

We haven't had access to Simics for years so there is no reason to keep
this around.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • HelenOS.config

    r92232331 r9280dd0  
    397397! [PLATFORM=sparc64] CONFIG_VIRT_IDX_DCACHE (y/n)
    398398
    399 % Simics SMP Hack
    400 ! [PROCESSOR=sun4v&CONFIG_SMP=y] CONFIG_SIMICS_SMP_HACK (n/y)
    401 
    402399% Support for userspace debuggers
    403400! CONFIG_UDEBUG (y/n)
  • kernel/arch/sparc64/src/smp/sun4v/smp.c

    r92232331 r9280dd0  
    8181unsigned int max_core_strands = 0;
    8282
    83 #ifdef CONFIG_SIMICS_SMP_HACK
    84 /**
    85  * Copies a piece of HelenOS code to the place where OBP had its IPI handler.
    86  * By sending an IPI by the BSP to the AP the code will be executed.
    87  * The code will jump to the first instruction of the kernel. This is
    88  * a workaround how to make APs execute HelenOS code on Simics.
    89  */
    90 static void simics_smp_hack_init(void) {
    91         asm volatile (
    92                 "setx temp_cpu_mondo_handler, %g4, %g6 \n"
    93                 "setx 0x80200f80, %g4, %g7 \n"
    94 
    95                 "ldx [%g6], %g4 \n"
    96                 "stxa %g4, [%g7] 0x14 \n"
    97                 "membar #Sync \n"
    98 
    99                 "add %g7, 0x8, %g7 \n"
    100                 "ldx [%g6 + 0x8], %g4 \n"
    101                 "stxa %g4, [%g7] 0x14 \n"
    102                 "membar #Sync \n"
    103 
    104                 "add %g7, 0x8, %g7 \n"
    105                 "ldx [%g6 + 0x10], %g4 \n"
    106                 "stxa %g4, [%g7] 0x14 \n"
    107                 "membar #Sync \n"
    108 
    109                 "add %g7, 0x8, %g7 \n"
    110                 "ldx [%g6 + 0x18], %g4 \n"
    111                 "stxa %g4, [%g7] 0x14 \n"
    112                 "membar #Sync \n"
    113 
    114                 "add %g7, 0x8, %g7 \n"
    115                 "ldx [%g6 + 0x20], %g4 \n"
    116                 "stxa %g4, [%g7] 0x14 \n"
    117                 "membar #Sync \n"
    118 
    119                 "add %g7, 0x8, %g7 \n"
    120                 "ldx [%g6 + 0x28], %g4 \n"
    121                 "stxa %g4, [%g7] 0x14 \n"
    122                 "membar #Sync \n"
    123 
    124                 "add %g7, 0x8, %g7 \n"
    125                 "ldx [%g6 + 0x30], %g4 \n"
    126                 "stxa %g4, [%g7] 0x14 \n"
    127                 "membar #Sync \n"
    128 
    129                 "add %g7, 0x8, %g7 \n"
    130                 "ldx [%g6 + 0x38], %g4 \n"
    131                 "stxa %g4, [%g7] 0x14 \n"
    132                 "membar #Sync \n"
    133 
    134                 "add %g7, 0x8, %g7 \n"
    135                 "ldx [%g6 + 0x40], %g4 \n"
    136                 "stxa %g4, [%g7] 0x14 \n"
    137                 "membar #Sync \n"
    138 
    139                 "flush %i7"
    140 
    141                 );
    142 }
    143 #endif
    144 
    14583#if 0
    14684/**
     
    372310{
    373311        detect_execution_units();
    374 #ifdef CONFIG_SIMICS_SMP_HACK
    375         simics_smp_hack_init();
    376 #endif
    377312}
    378313
  • kernel/arch/sparc64/src/sun4v/start.S

    r92232331 r9280dd0  
    309309        ba,a %xcc, 0b
    310310
    311 .align 8
    312 SYMBOL(temp_cpu_mondo_handler)
    313 
    314         set 0x3c, %o0
    315         set 0x15, %o5
    316         ta 0x80
    317 
    318         mov 0, %o0
    319         setx before_ap_boots, %g1, %o1
    320         setx 0x80400000, %g1, %o2
    321         add %o1, %o2, %o1
    322         __HYPERCALL_FAST(MMU_ENABLE)
    323 
    324 before_ap_boots:
    325         setx 0x80400000, %g1, %o0
    326         ba,a %xcc, kernel_image_start
    327 
    328311.section K_DATA_START, "aw", @progbits
    329312
Note: See TracChangeset for help on using the changeset viewer.