Ticket #4115: ppc-isync-relocation-final.diff

File ppc-isync-relocation-final.diff, 3.7 KB (added by kallisti5, 15 years ago)

Fix for this issue.

  • src/system/kernel/arch/ppc/arch_elf.cpp

     
    197197                        "addend 0x%lx\n", __FUNCTION__, i, ELF32_R_TYPE(rel[i].r_info),
    198198                        rel[i].r_offset, ELF32_R_SYM(rel[i].r_info),
    199199                        rel[i].r_addend);
     200                    #ifndef _BOOT_MODE // We only need to return if this is during runtime.
    200201                    return vlErr;
     202                    #endif
    201203                }
    202204                break;
    203205        }
  • src/system/kernel/arch/ppc/arch_cpu_asm.S

     
    3131 *             r3                    r4
    3232 */
    3333FUNCTION(set_sr):
     34    isync
    3435    mtsrin  %r4, %r3
     36    isync
    3537    blr
    3638
    3739/* uint32 get_msr(void);
     
    4547 */
    4648FUNCTION(set_msr):
    4749    mtmsr   %r3
     50    isync
    4851    blr
    4952
    5053/* uint32 get_pvr(void);
  • src/system/kernel/arch/ppc/arch_cpu.cpp

     
    4848}
    4949
    5050status_t
     51arch_cpu_init_percpu(kernel_args *args, int curr_cpu)
     52{
     53        //detect_cpu(curr_cpu);
     54
     55        // we only support one on ppc anyway at the moment...
     56        return 0;
     57}
     58
     59status_t
    5160arch_cpu_init_post_modules(kernel_args *args)
    5261{
    5362    return B_OK;
  • src/system/kernel/arch/ppc/arch_asm.S

     
    2626        // sets bit 15, EE
    2727
    2828    mtmsr   %r3                         // put it back into the msr
     29    isync
    2930    blr
    3031
    3132
     
    4041        // clears bit 15, EE
    4142
    4243    mtmsr   %r4                         // put it back into the msr
     44    isync
    4345    blr
    4446
    4547
     
    5355        // clear or set bit 15, EE to the same state as in r3, oldState
    5456
    5557    mtmsr   %r4
     58    isync
    5659    blr
    5760
    5861/* bool arch_int_are_interrupts_enabled(void) */
     
    175178
    176179// void sethid0(unsigned int val);
    177180FUNCTION(sethid0):
     181    isync
    178182    mtspr       1008, %r3
     183    isync
    179184    blr
    180185
    181186// unsigned int getl2cr();
     
    185190
    186191// void setl2cr(unsigned int val);
    187192FUNCTION(setl2cr):
     193    isync
    188194    mtspr       1017, %r3
     195    isync
    189196    blr
    190197
    191198   
  • src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp

     
    991991    // set up new page table and turn on translation again
    992992
    993993    for (int32 i = 0; i < 16; i++) {
    994         isync();
    995 
    996994        ppc_set_segment_register((void *)(i * 0x10000000), sSegments[i]);
    997995            // one segment describes 256 MB of memory
    998 
    999         ppc_sync();
    1000996    }
    1001997
    1002998    ppc_set_page_table(physicalTable, tableSize);
  • headers/private/kernel/user_atomic.h

     
    99 * in userspace, they are implemented as these syscalls.
    1010 */
    1111
     12#ifdef __cplusplus
     13extern "C" {
     14#endif
     15
    1216int32 _user_atomic_set(vint32 *value, int32 newValue);
    1317int32 _user_atomic_test_and_set(vint32 *value, int32 newValue, int32 testAgainst);
    1418int32 _user_atomic_add(vint32 *value, int32 addValue);
     
    2327int64 _user_atomic_or64(vint64 *value, int64 orValue); 
    2428int64 _user_atomic_get64(vint64 *value);
    2529
     30#ifdef __cplusplus
     31}
     32#endif
     33
     34
    2635#endif  /* _KERNEL_USER_ATOMIC_H */