Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pmap_bootstrap - mtsrin args backwards?



        The asm for mtsrin looks backwards to me.  For example, osfmk uses:

unsigned int kernel_seg_regs[] = {
        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
};

__inline__ void mtsrin(unsigned int val, unsigned int reg)
{
        __asm__ volatile("mtsrin %0, %1" : : "r" (val), "r" (reg));
        return;
}

/* ... */
        for (i=0; i<16; i++) {
                mtsrin(kernel_seg_regs[i], i * 0x10000000);
        }
/* ... */

David
===============================================================================
David Edelsohn                                      T.J. Watson Research Center
dje%watson.ibm.com@localhost                                  P.O. Box 218
+1 914 945 4364 (TL 862)                            Yorktown Heights, NY 10598



Home | Main Index | Thread Index | Old Index