Ignore:
Timestamp:
Nov 14, 2019, 4:03:25 PM (4 years ago)
Author:
alain
Message:

euh...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/core/hal_uspace.c

    r647 r654  
    3636// It works in a critical section, as it modifies two CP2 registers:
    3737// It activates briefly the DATA_MMU by writing into the CP2_MODE register to access the
    38 // user buffer, and modifies the CP2_DATA_EXT register to access the kernel buffer.
     38// user buffer, and modifies the CP2_DEXT register to access the kernel buffer.
    3939// If the two buffers are aligned on a word boundary, it moves the data word per word
    4040// in a first loop, and moves byte per byte the remaining bytes in a second loop.
     
    8080                  "ori    $13,   $12,   0x4       \n"   /* $13 <= MMU_MODE with DTLB  */
    8181
    82                   /* save old MMU_DATA_EXT and set cxy in it                      */
    83                   "mfc2   $16,   $24          \n"   /* $16 <= old MMU_DATA_EXT    */
    84                   "mtc2   %4,    $24          \n"   /* MMU_DATA_EXT <= cxy        */
     82                  /* save MMU_DEXT register                                       */
     83                  "mfc2   $16,   $24          \n"   /* $16 <= old MMU_DEXT        */
     84                  "mtc2   %4,    $24          \n"   /* MMU_DEXT <= dst_cxy        */
    8585
    8686                  /* transfer one word per iteration in first loop if aligned     */
     
    113113                  "addi   $9,    $9,    1     \n"   /* dst += 1 byte              */
    114114
    115                   /* restore old MMU_DATA_EXT register                            */
     115                  /* restore MMU_DEXT register                                    */
    116116                  "4:                         \n"
    117                   "mtc2   $16,   $24          \n"   /* MMU__DATA_EXT <= $16       */
     117                  "mtc2   $16,   $24          \n"   /* MMU_DEXT <= $16            */
    118118                  ".set reorder               \n"
    119119                  :
     
    139139// It works in a critical section, as it modifies two CP2 registers:
    140140// It activates briefly the DATA_MMU by writing into the CP2_MODE register to access the
    141 // user buffer, and modifies the CP2_DATA_EXT register to access the kernel buffer.
     141// user buffer, and modifies the CP2_DEXT register to access the kernel buffer.
    142142// If the two buffers are aligned on a word boundary, it moves the data word per word
    143143// in a first loop, and moves byte per byte the remaining bytes in a second loop.
     
    182182                  "ori    $13,   $12,   0x4       \n"   /* $13 <= MMU_MODE with DTLB  */
    183183
    184                   /* save old MMU_DATA_EXT and set cxy in it                      */
    185                   "mfc2   $16,   $24          \n"   /* $16 <= old MMU_DATA_EXT    */
    186                   "mtc2   %4,    $24          \n"   /* MMU_DATA_EXT <= cxy        */
     184                  /* save MMU_DEXT register                                       */
     185                  "mfc2   $16,   $24          \n"   /* $16 <= old MMU_DEXT        */
     186                  "mtc2   %4,    $24          \n"   /* MMU_DEXT <= cxy            */
    187187
    188188                  /* transfer one word per iteration in first loop if aligned     */
     
    215215                  "addi   $9,    $9,    1     \n"   /* dst += 1 byte              */
    216216
    217                   /* restore old MMU_DATA_EXT register                            */
     217                  /* restore MMU_DEXT register                                    */
    218218                  "4:                         \n"
    219                   "mtc2   $16,   $24          \n"   /* MMU__DATA_EXT <= $16       */
     219                  "mtc2   $16,   $24          \n"   /* MMU_DEXT <= $16            */
    220220                  ".set reorder               \n"
    221221                  :
     
    252252        ".set noreorder             \n"
    253253
    254         /* save old MMU_DATA_EXT and set cxy in it                          */
    255         "mfc2   $16,   $24          \n"   /* $16 <= old MMU_DATA_EXT        */
    256         "mtc2   %3,    $24          \n"   /* MMU_DATA_EXT <= cxy            */
     254        /* save old MMU_DEXT and set cxy in it                              */
     255        "mfc2   $16,   $24          \n"   /* $16 <= old MMU_DEXT            */
     256        "mtc2   %3,    $24          \n"   /* MMU_DEXT <= cxy                */
    257257
    258258        "move   $11,   %0           \n"   /* $11 <= count == size           */
     
    276276        "nop                        \n"
    277277
    278         /* restore old MMU_DATA_EXT register                                */
    279         "mtc2   $16,   $24          \n"   /* MMU_DATA_EXT <= $16            */
     278        /* restore old MMU_DEXT register                                    */
     279        "mtc2   $16,   $24          \n"   /* MMU_DEXT <= $16                */
    280280
    281281        ".set reorder               \n"
     
    305305        ".set noreorder             \n"
    306306
    307         /* save old MMU_DATA_EXT and set cxy in it                          */
    308         "mfc2   $16,   $24          \n"   /* $16 <= old MMU_DATA_EXT        */
    309         "mtc2   %3,    $24          \n"   /* MMU_DATA_EXT <= cxy            */
     307        /* save old MMU_DEXT and set cxy in it                              */
     308        "mfc2   $16,   $24          \n"   /* $16 <= old MMU_DEXT            */
     309        "mtc2   %3,    $24          \n"   /* MMU_DEXT <= cxy                */
    310310
    311311        "move   $11,   %0           \n"   /* $11 <= count == size           */
     
    329329        "nop                        \n"
    330330
    331         /* restore old MMU_DATA_EXT register                                */
    332         "mtc2   $16,   $24          \n"   /* MMU_DATA_EXT <= $16            */
     331        /* restore old MMU_DEXT register                                    */
     332        "mtc2   $16,   $24          \n"   /* MMU_DEXT <= $16                */
    333333
    334334        ".set reorder               \n"
Note: See TracChangeset for help on using the changeset viewer.