Changeset 9280dd0 in mainline
- Timestamp:
- 2017-11-16T17:12:03Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- 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)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
r92232331 r9280dd0 397 397 ! [PLATFORM=sparc64] CONFIG_VIRT_IDX_DCACHE (y/n) 398 398 399 % Simics SMP Hack400 ! [PROCESSOR=sun4v&CONFIG_SMP=y] CONFIG_SIMICS_SMP_HACK (n/y)401 402 399 % Support for userspace debuggers 403 400 ! CONFIG_UDEBUG (y/n) -
kernel/arch/sparc64/src/smp/sun4v/smp.c
r92232331 r9280dd0 81 81 unsigned int max_core_strands = 0; 82 82 83 #ifdef CONFIG_SIMICS_SMP_HACK84 /**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 is88 * 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 #endif144 145 83 #if 0 146 84 /** … … 372 310 { 373 311 detect_execution_units(); 374 #ifdef CONFIG_SIMICS_SMP_HACK375 simics_smp_hack_init();376 #endif377 312 } 378 313 -
kernel/arch/sparc64/src/sun4v/start.S
r92232331 r9280dd0 309 309 ba,a %xcc, 0b 310 310 311 .align 8312 SYMBOL(temp_cpu_mondo_handler)313 314 set 0x3c, %o0315 set 0x15, %o5316 ta 0x80317 318 mov 0, %o0319 setx before_ap_boots, %g1, %o1320 setx 0x80400000, %g1, %o2321 add %o1, %o2, %o1322 __HYPERCALL_FAST(MMU_ENABLE)323 324 before_ap_boots:325 setx 0x80400000, %g1, %o0326 ba,a %xcc, kernel_image_start327 328 311 .section K_DATA_START, "aw", @progbits 329 312
Note:
See TracChangeset
for help on using the changeset viewer.