[BACK]Return to cpufunc.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / aarch64 / include

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/arch/aarch64/include/cpufunc.h between version 1.18 and 1.19

version 1.18, 2020/08/03 06:30:00 version 1.19, 2020/12/04 08:29:11
Line 191  aarch64_addressspace(vaddr_t va)
Line 191  aarch64_addressspace(vaddr_t va)
 {  {
         uint64_t addrtop, tbi;          uint64_t addrtop, tbi;
   
         addrtop = (uint64_t)va & AARCH64_ADDRTOP_TAG;          addrtop = va & AARCH64_ADDRTOP_TAG;
         tbi = addrtop ? TCR_TBI1 : TCR_TBI0;          tbi = addrtop ? TCR_TBI1 : TCR_TBI0;
         if (reg_tcr_el1_read() & tbi) {          if (reg_tcr_el1_read() & tbi) {
                 if (addrtop == 0) {                  if (addrtop == 0) {
Line 206  aarch64_addressspace(vaddr_t va)
Line 206  aarch64_addressspace(vaddr_t va)
                 return AARCH64_ADDRSPACE_UPPER;                  return AARCH64_ADDRSPACE_UPPER;
         }          }
   
         addrtop = (uint64_t)va & AARCH64_ADDRTOP_MSB;          addrtop = va & AARCH64_ADDRTOP_MSB;
         if (addrtop == 0) {          if (addrtop == 0) {
                 /* lower address, and TBI0 disabled */                  /* lower address, and TBI0 disabled */
                 if ((va & AARCH64_ADDRESS_TAGPAC_MASK) != 0)                  if ((va & AARCH64_ADDRESS_TAGPAC_MASK) != 0)
Line 224  aarch64_untag_address(vaddr_t va)
Line 224  aarch64_untag_address(vaddr_t va)
 {  {
         uint64_t addrtop, tbi;          uint64_t addrtop, tbi;
   
         addrtop = (uint64_t)va & AARCH64_ADDRTOP_TAG;          addrtop = va & AARCH64_ADDRTOP_TAG;
         tbi = addrtop ? TCR_TBI1 : TCR_TBI0;          tbi = addrtop ? TCR_TBI1 : TCR_TBI0;
         if (reg_tcr_el1_read() & tbi) {          if (reg_tcr_el1_read() & tbi) {
                 if (addrtop == 0) {                  if (addrtop == 0) {
                         /* lower address, and TBI0 enabled */                          /* lower address, and TBI0 enabled */
                         return (uint64_t)va & ~AARCH64_ADDRESS_TAG_MASK;                          return va & ~AARCH64_ADDRESS_TAG_MASK;
                 }                  }
                 /* upper address, and TBI1 enabled */                  /* upper address, and TBI1 enabled */
                 return (uint64_t)va | AARCH64_ADDRESS_TAG_MASK;                  return va | AARCH64_ADDRESS_TAG_MASK;
         }          }
   
         /* TBI[01] is disabled, nothing to do */          /* TBI[01] is disabled, nothing to do */

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

CVSweb <webmaster@jp.NetBSD.org>