Print this page
cpuid for ARMv7

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/armv7/vm/vm_dep.h
          +++ new/usr/src/uts/armv7/vm/vm_dep.h
↓ open down ↓ 260 lines elided ↑ open up ↑
 261  261  #define USERSZC_2_SZC(userszc)  userszc
 262  262  #define SZC_2_USERSZC(szc)      szc
 263  263  
 264  264  /*
 265  265   * for hw_page_map_t, sized to hold the ratio of large page to base
 266  266   * pagesize
 267  267   */
 268  268  typedef short   hpmctr_t;
 269  269  
 270  270  /*
 271      - * On ARMv6 the layer two cache isn't architecturally defined. A given
 272      - * implementation may or may not support it. The maximum size appears to be
 273      - * 64-bytes; however, we end up having to defer to the individual platforms for
 274      - * more information. Because of this, we also get and use the l1 cache
 275      - * information. This is further complicated by the fact that the I-cache and
 276      - * D-cache are separate usually; therefore we us the the l1 d-cache for
 277      - * CPUSETSIZE().
      271 + * get the setsize of the current cpu
      272 + *
      273 + * This is complicated by the fact that the I-cache and D-cache may be
      274 + * separate.
 278  275   */
 279      -extern int      armv6_cachesz, armv6_cache_assoc;
 280      -extern int      armv6_l2cache_size, armv6_l2cache_linesz;
 281      -#define L2CACHE_ALIGN           armv6_l2cache_linesz
      276 +extern int l2cache_sz, l2cache_linesz, l2cache_assoc;
      277 +#define L2CACHE_ALIGN           l2cache_linesz
 282  278  #define L2CACHE_ALIGN_MAX       64
 283      -#define CPUSETSIZE()            (armv6_cachesz / armv6_cache_assoc)
      279 +#define CPUSETSIZE()            (l2cache_sz / l2cache_assoc)
 284  280  
 285  281  /*
 286  282   * Return the log2(pagesize(szc) / MMU_PAGESIZE) --- or the shift count
 287  283   * for the number of base pages in this pagesize
 288  284   */
 289  285  #define PAGE_BSZS_SHIFT(szc) (PNUM_SHIFT(szc) - MMU_PAGESHIFT)
 290  286  
 291  287  /*
 292  288   * Internal PG_ flags.
 293  289   */
↓ open down ↓ 131 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX