Home | History | Annotate | Line # | Download | only in include
cacheinfo.h revision 1.15
      1  1.15   msaitoh /*	$NetBSD: cacheinfo.h,v 1.15 2013/07/17 15:26:38 msaitoh Exp $	*/
      2   1.1      fvdl 
      3   1.4      yamt #ifndef _X86_CACHEINFO_H_
      4   1.4      yamt #define _X86_CACHEINFO_H_
      5   1.1      fvdl 
      6   1.1      fvdl struct x86_cache_info {
      7   1.1      fvdl 	uint8_t		cai_index;
      8   1.1      fvdl 	uint8_t		cai_desc;
      9   1.1      fvdl 	uint8_t		cai_associativity;
     10   1.1      fvdl 	u_int		cai_totalsize; /* #entries for TLB, bytes for cache */
     11   1.1      fvdl 	u_int		cai_linesize;	/* or page size for TLB */
     12   1.7  christos #ifndef _KERNEL
     13  1.10     lukem 	const char	*cai_string;
     14   1.7  christos #endif
     15   1.1      fvdl };
     16   1.1      fvdl 
     17   1.1      fvdl #define	CAI_ITLB	0		/* Instruction TLB (4K pages) */
     18   1.1      fvdl #define	CAI_ITLB2	1		/* Instruction TLB (2/4M pages) */
     19   1.1      fvdl #define	CAI_DTLB	2		/* Data TLB (4K pages) */
     20   1.1      fvdl #define	CAI_DTLB2	3		/* Data TLB (2/4M pages) */
     21   1.1      fvdl #define	CAI_ICACHE	4		/* Instruction cache */
     22   1.1      fvdl #define	CAI_DCACHE	5		/* Data cache */
     23   1.1      fvdl #define	CAI_L2CACHE	6		/* Level 2 cache */
     24   1.6    cegger #define	CAI_L3CACHE	7		/* Level 3 cache */
     25   1.6    cegger #define	CAI_L1_1GBITLB	8		/* L1 1GB Page instruction TLB */
     26   1.6    cegger #define	CAI_L1_1GBDTLB	9		/* L1 1GB Page data TLB */
     27   1.6    cegger #define CAI_L2_1GBITLB	10		/* L2 1GB Page instruction TLB */
     28   1.6    cegger #define CAI_L2_1GBDTLB	11		/* L2 1GB Page data TLB */
     29  1.13       chs #define CAI_L2_ITLB	12		/* L2 Instruction TLB (4K pages) */
     30  1.13       chs #define CAI_L2_ITLB2	13		/* L2 Instruction TLB (2/4M pages) */
     31  1.13       chs #define CAI_L2_DTLB	14		/* L2 Data TLB (4K pages) */
     32  1.13       chs #define CAI_L2_DTLB2	15		/* L2 Data TLB (2/4M pages) */
     33   1.1      fvdl 
     34  1.13       chs #define	CAI_COUNT	16
     35   1.1      fvdl 
     36   1.1      fvdl /*
     37   1.1      fvdl  * AMD Cache Info:
     38   1.1      fvdl  *
     39   1.6    cegger  *      Barcelona, Phenom:
     40   1.6    cegger  *
     41   1.6    cegger  *		Function 8000.0005 L1 TLB/Cache Information
     42   1.6    cegger  *		EAX -- L1 TLB 2/4MB pages
     43   1.6    cegger  *		EBX -- L1 TLB 4K pages
     44   1.6    cegger  *		ECX -- L1 D-cache
     45   1.6    cegger  *		EDX -- L1 I-cache
     46   1.6    cegger  *
     47   1.6    cegger  *		Function 8000.0006 L2 TLB/Cache Information
     48   1.6    cegger  *		EAX -- L2 TLB 2/4MB pages
     49   1.6    cegger  *		EBX -- L2 TLB 4K pages
     50   1.6    cegger  *		ECX -- L2 Unified cache
     51   1.6    cegger  *		EDX -- L3 Unified Cache
     52   1.6    cegger  *
     53   1.6    cegger  *		Function 8000.0019 TLB 1GB Page Information
     54   1.6    cegger  *		EAX -- L1 1GB pages
     55   1.6    cegger  *		EBX -- L2 1GB pages
     56   1.6    cegger  *		ECX -- reserved
     57   1.6    cegger  *		EDX -- reserved
     58   1.6    cegger  *
     59   1.1      fvdl  *	Athlon, Duron:
     60   1.1      fvdl  *
     61   1.1      fvdl  *		Function 8000.0005 L1 TLB/Cache Information
     62   1.1      fvdl  *		EAX -- L1 TLB 2/4MB pages
     63   1.1      fvdl  *		EBX -- L1 TLB 4K pages
     64   1.1      fvdl  *		ECX -- L1 D-cache
     65   1.1      fvdl  *		EDX -- L1 I-cache
     66   1.1      fvdl  *
     67   1.1      fvdl  *		Function 8000.0006 L2 TLB/Cache Information
     68   1.1      fvdl  *		EAX -- L2 TLB 2/4MB pages
     69   1.1      fvdl  *		EBX -- L2 TLB 4K pages
     70   1.1      fvdl  *		ECX -- L2 Unified cache
     71   1.1      fvdl  *		EDX -- reserved
     72   1.1      fvdl  *
     73   1.1      fvdl  *	K5, K6:
     74   1.1      fvdl  *
     75   1.1      fvdl  *		Function 8000.0005 L1 TLB/Cache Information
     76   1.1      fvdl  *		EAX -- reserved
     77   1.1      fvdl  *		EBX -- TLB 4K pages
     78   1.1      fvdl  *		ECX -- L1 D-cache
     79   1.1      fvdl  *		EDX -- L1 I-cache
     80   1.1      fvdl  *
     81   1.1      fvdl  *	K6-III:
     82   1.1      fvdl  *
     83   1.1      fvdl  *		Function 8000.0006 L2 Cache Information
     84   1.1      fvdl  *		EAX -- reserved
     85   1.1      fvdl  *		EBX -- reserved
     86   1.1      fvdl  *		ECX -- L2 Unified cache
     87   1.1      fvdl  *		EDX -- reserved
     88   1.1      fvdl  */
     89   1.1      fvdl 
     90   1.1      fvdl /* L1 TLB 2/4MB pages */
     91   1.1      fvdl #define	AMD_L1_EAX_DTLB_ASSOC(x)	(((x) >> 24) & 0xff)
     92   1.1      fvdl #define	AMD_L1_EAX_DTLB_ENTRIES(x)	(((x) >> 16) & 0xff)
     93   1.1      fvdl #define	AMD_L1_EAX_ITLB_ASSOC(x)	(((x) >> 8)  & 0xff)
     94   1.1      fvdl #define	AMD_L1_EAX_ITLB_ENTRIES(x)	( (x)        & 0xff)
     95   1.1      fvdl 
     96   1.1      fvdl /* L1 TLB 4K pages */
     97   1.1      fvdl #define	AMD_L1_EBX_DTLB_ASSOC(x)	(((x) >> 24) & 0xff)
     98   1.1      fvdl #define	AMD_L1_EBX_DTLB_ENTRIES(x)	(((x) >> 16) & 0xff)
     99   1.1      fvdl #define	AMD_L1_EBX_ITLB_ASSOC(x)	(((x) >> 8)  & 0xff)
    100   1.1      fvdl #define	AMD_L1_EBX_ITLB_ENTRIES(x)	( (x)        & 0xff)
    101   1.1      fvdl 
    102   1.1      fvdl /* L1 Data Cache */
    103   1.1      fvdl #define	AMD_L1_ECX_DC_SIZE(x)		((((x) >> 24) & 0xff) * 1024)
    104   1.1      fvdl #define	AMD_L1_ECX_DC_ASSOC(x)		 (((x) >> 16) & 0xff)
    105   1.1      fvdl #define	AMD_L1_ECX_DC_LPT(x)		 (((x) >> 8)  & 0xff)
    106   1.1      fvdl #define	AMD_L1_ECX_DC_LS(x)		 ( (x)        & 0xff)
    107   1.1      fvdl 
    108   1.1      fvdl /* L1 Instruction Cache */
    109   1.1      fvdl #define	AMD_L1_EDX_IC_SIZE(x)		((((x) >> 24) & 0xff) * 1024)
    110   1.1      fvdl #define	AMD_L1_EDX_IC_ASSOC(x)		 (((x) >> 16) & 0xff)
    111   1.1      fvdl #define	AMD_L1_EDX_IC_LPT(x)		 (((x) >> 8)  & 0xff)
    112   1.1      fvdl #define	AMD_L1_EDX_IC_LS(x)		 ( (x)        & 0xff)
    113   1.1      fvdl 
    114   1.1      fvdl /* Note for L2 TLB -- if the upper 16 bits are 0, it is a unified TLB */
    115   1.1      fvdl 
    116   1.1      fvdl /* L2 TLB 2/4MB pages */
    117   1.1      fvdl #define	AMD_L2_EAX_DTLB_ASSOC(x)	(((x) >> 28)  & 0xf)
    118   1.1      fvdl #define	AMD_L2_EAX_DTLB_ENTRIES(x)	(((x) >> 16)  & 0xfff)
    119   1.1      fvdl #define	AMD_L2_EAX_IUTLB_ASSOC(x)	(((x) >> 12)  & 0xf)
    120   1.1      fvdl #define	AMD_L2_EAX_IUTLB_ENTRIES(x)	( (x)         & 0xfff)
    121   1.1      fvdl 
    122   1.1      fvdl /* L2 TLB 4K pages */
    123   1.1      fvdl #define	AMD_L2_EBX_DTLB_ASSOC(x)	(((x) >> 28)  & 0xf)
    124   1.1      fvdl #define	AMD_L2_EBX_DTLB_ENTRIES(x)	(((x) >> 16)  & 0xfff)
    125   1.1      fvdl #define	AMD_L2_EBX_IUTLB_ASSOC(x)	(((x) >> 12)  & 0xf)
    126   1.1      fvdl #define	AMD_L2_EBX_IUTLB_ENTRIES(x)	( (x)         & 0xfff)
    127   1.1      fvdl 
    128   1.1      fvdl /* L2 Cache */
    129   1.1      fvdl #define	AMD_L2_ECX_C_SIZE(x)		((((x) >> 16) & 0xffff) * 1024)
    130   1.1      fvdl #define	AMD_L2_ECX_C_ASSOC(x)		 (((x) >> 12) & 0xf)
    131   1.1      fvdl #define	AMD_L2_ECX_C_LPT(x)		 (((x) >> 8)  & 0xf)
    132   1.1      fvdl #define	AMD_L2_ECX_C_LS(x)		 ( (x)        & 0xff)
    133   1.1      fvdl 
    134   1.6    cegger /* L3 Cache */
    135   1.8  christos #define AMD_L3_EDX_C_SIZE(x)		((((x) >> 18) & 0xffff) * 1024 * 512)
    136   1.6    cegger #define AMD_L3_EDX_C_ASSOC(x)		 (((x) >> 12) & 0xff)
    137   1.6    cegger #define AMD_L3_EDX_C_LPT(x)		 (((x) >> 8)  & 0xf)
    138   1.6    cegger #define AMD_L3_EDX_C_LS(x)		 ( (x)        & 0xff)
    139   1.6    cegger 
    140   1.6    cegger /* L1 TLB 1GB pages */
    141   1.6    cegger #define AMD_L1_1GB_EAX_DTLB_ASSOC(x)	(((x) >> 28) & 0xf)
    142   1.6    cegger #define AMD_L1_1GB_EAX_DTLB_ENTRIES(x)	(((x) >> 16) & 0xfff)
    143   1.6    cegger #define AMD_L1_1GB_EAX_IUTLB_ASSOC(x)	(((x) >> 12) & 0xf)
    144   1.6    cegger #define AMD_L1_1GB_EAX_IUTLB_ENTRIES(x)	( (x)        & 0xfff)
    145   1.6    cegger 
    146   1.6    cegger /* L2 TLB 1GB pages */
    147   1.6    cegger #define AMD_L2_1GB_EBX_DUTLB_ASSOC(x)	(((x) >> 28) & 0xf)
    148   1.6    cegger #define AMD_L2_1GB_EBX_DUTLB_ENTRIES(x)	(((x) >> 16) & 0xfff)
    149   1.6    cegger #define AMD_L2_1GB_EBX_IUTLB_ASSOC(x)	(((x) >> 12) & 0xf)
    150   1.6    cegger #define AMD_L2_1GB_EBX_IUTLB_ENTRIES(x)	( (x)        & 0xfff)
    151   1.6    cegger 
    152   1.2    briggs /*
    153   1.2    briggs  * VIA Cache Info:
    154   1.2    briggs  *
    155   1.2    briggs  *	Nehemiah (at least)
    156   1.2    briggs  *
    157   1.2    briggs  *		Function 8000.0005 L1 TLB/Cache Information
    158   1.2    briggs  *		EAX -- reserved
    159   1.2    briggs  *		EBX -- L1 TLB 4K pages
    160   1.2    briggs  *		ECX -- L1 D-cache
    161   1.2    briggs  *		EDX -- L1 I-cache
    162   1.2    briggs  *
    163   1.2    briggs  *		Function 8000.0006 L2 Cache Information
    164   1.2    briggs  *		EAX -- reserved
    165   1.2    briggs  *		EBX -- reserved
    166   1.2    briggs  *		ECX -- L2 Unified cache
    167   1.2    briggs  *		EDX -- reserved
    168   1.2    briggs  */
    169   1.2    briggs 
    170   1.2    briggs /* L1 TLB 4K pages */
    171   1.2    briggs #define	VIA_L1_EBX_DTLB_ASSOC(x)	(((x) >> 24) & 0xff)
    172   1.2    briggs #define	VIA_L1_EBX_DTLB_ENTRIES(x)	(((x) >> 16) & 0xff)
    173   1.2    briggs #define	VIA_L1_EBX_ITLB_ASSOC(x)	(((x) >> 8)  & 0xff)
    174   1.2    briggs #define	VIA_L1_EBX_ITLB_ENTRIES(x)	( (x)        & 0xff)
    175   1.2    briggs 
    176   1.2    briggs /* L1 Data Cache */
    177   1.2    briggs #define	VIA_L1_ECX_DC_SIZE(x)		((((x) >> 24) & 0xff) * 1024)
    178   1.2    briggs #define	VIA_L1_ECX_DC_ASSOC(x)		 (((x) >> 16) & 0xff)
    179   1.2    briggs #define	VIA_L1_ECX_DC_LPT(x)		 (((x) >> 8)  & 0xff)
    180   1.2    briggs #define	VIA_L1_ECX_DC_LS(x)		 ( (x)        & 0xff)
    181   1.2    briggs 
    182   1.2    briggs /* L1 Instruction Cache */
    183   1.2    briggs #define	VIA_L1_EDX_IC_SIZE(x)		((((x) >> 24) & 0xff) * 1024)
    184   1.2    briggs #define	VIA_L1_EDX_IC_ASSOC(x)		 (((x) >> 16) & 0xff)
    185   1.2    briggs #define	VIA_L1_EDX_IC_LPT(x)		 (((x) >> 8)  & 0xff)
    186   1.2    briggs #define	VIA_L1_EDX_IC_LS(x)		 ( (x)        & 0xff)
    187   1.2    briggs 
    188   1.3    briggs /* L2 Cache (pre-Nehemiah) */
    189   1.3    briggs #define	VIA_L2_ECX_C_SIZE(x)		((((x) >> 24) & 0xff) * 1024)
    190   1.3    briggs #define	VIA_L2_ECX_C_ASSOC(x)		 (((x) >> 16) & 0xff)
    191   1.3    briggs #define	VIA_L2_ECX_C_LPT(x)		 (((x) >> 8)  & 0xff)
    192   1.2    briggs #define	VIA_L2_ECX_C_LS(x)		 ( (x)        & 0xff)
    193   1.2    briggs 
    194   1.3    briggs /* L2 Cache (Nehemiah and newer) */
    195   1.3    briggs #define	VIA_L2N_ECX_C_SIZE(x)		((((x) >> 16) & 0xffff) * 1024)
    196   1.3    briggs #define	VIA_L2N_ECX_C_ASSOC(x)		 (((x) >> 12) & 0xf)
    197   1.3    briggs #define	VIA_L2N_ECX_C_LPT(x)		 (((x) >> 8)  & 0xf)
    198   1.3    briggs #define	VIA_L2N_ECX_C_LS(x)		 ( (x)        & 0xff)
    199   1.3    briggs 
    200   1.8  christos #ifdef _KERNEL
    201   1.8  christos #define __CI_TBL(a,b,c,d,e,f) { a, b, c, d, e }
    202   1.8  christos #else
    203   1.8  christos #define __CI_TBL(a,b,c,d,e,f) { a, b, c, d, e, f }
    204   1.8  christos #endif
    205   1.8  christos 
    206  1.11  pgoyette /*
    207  1.11  pgoyette  * XXX Currently organized mostly by cache type, but would be
    208  1.11  pgoyette  * XXX easier to maintain if it were in descriptor type order.
    209  1.11  pgoyette  */
    210   1.8  christos #define INTEL_CACHE_INFO { \
    211   1.8  christos __CI_TBL(CAI_ITLB,     0x01,    4, 32,        4 * 1024, NULL), \
    212   1.8  christos __CI_TBL(CAI_ITLB,     0xb0,    4,128,        4 * 1024, NULL), \
    213   1.8  christos __CI_TBL(CAI_ITLB2,    0x02, 0xff,  2, 4 * 1024 * 1024, NULL), \
    214   1.8  christos __CI_TBL(CAI_DTLB,     0x03,    4, 64,        4 * 1024, NULL), \
    215   1.8  christos __CI_TBL(CAI_DTLB,     0xb3,    4,128,        4 * 1024, NULL), \
    216   1.8  christos __CI_TBL(CAI_DTLB,     0xb4,    4,256,        4 * 1024, NULL), \
    217   1.8  christos __CI_TBL(CAI_DTLB2,    0x04,    4,  8, 4 * 1024 * 1024, NULL), \
    218   1.8  christos __CI_TBL(CAI_DTLB2,    0x05,    4, 32, 4 * 1024 * 1024, NULL), \
    219   1.8  christos __CI_TBL(CAI_ITLB,     0x50, 0xff, 64,        4 * 1024, "4K/4M: 64 entries"), \
    220   1.8  christos __CI_TBL(CAI_ITLB,     0x51, 0xff, 64,        4 * 1024, "4K/4M: 128 entries"),\
    221   1.8  christos __CI_TBL(CAI_ITLB,     0x52, 0xff, 64,        4 * 1024, "4K/4M: 256 entries"),\
    222  1.11  pgoyette __CI_TBL(CAI_ITLB,     0x55, 0xff, 64,        4 * 1024, "2M/4M: 7 entries"), \
    223  1.11  pgoyette __CI_TBL(CAI_DTLB2,    0x56,    4, 16, 4 * 1024 * 1024, NULL), \
    224  1.11  pgoyette __CI_TBL(CAI_DTLB2,    0x57,    4, 16,        4 * 1024, NULL), \
    225  1.15   msaitoh __CI_TBL(CAI_DTLB2,    0x59, 0xff, 16,        4 * 1024, NULL), \
    226  1.11  pgoyette __CI_TBL(CAI_DTLB,     0x5a, 0xff, 64,        4 * 1024, "2M/4M: 32 entries (L0)"), \
    227   1.8  christos __CI_TBL(CAI_DTLB,     0x5b, 0xff, 64,        4 * 1024, "4K/4M: 64 entries"), \
    228   1.8  christos __CI_TBL(CAI_DTLB,     0x5c, 0xff, 64,        4 * 1024, "4K/4M: 128 entries"),\
    229   1.8  christos __CI_TBL(CAI_DTLB,     0x5d, 0xff, 64,        4 * 1024, "4K/4M: 256 entries"),\
    230  1.11  pgoyette __CI_TBL(CAI_ITLB,     0xb1,    4, 64,               0, "8 2M/4 4M entries"), \
    231  1.11  pgoyette __CI_TBL(CAI_ITLB,     0xb2,    4, 64,        4 * 1024, NULL), \
    232   1.8  christos __CI_TBL(CAI_ICACHE,   0x06,    4,        8 * 1024, 32, NULL), \
    233   1.8  christos __CI_TBL(CAI_ICACHE,   0x08,    4,       16 * 1024, 32, NULL), \
    234  1.11  pgoyette __CI_TBL(CAI_ICACHE,   0x09,    4,       32 * 1024, 64, NULL), \
    235   1.8  christos __CI_TBL(CAI_ICACHE,   0x30,    8,       32 * 1024, 64, NULL), \
    236   1.8  christos __CI_TBL(CAI_DCACHE,   0x0a,    2,        8 * 1024, 32, NULL), \
    237   1.8  christos __CI_TBL(CAI_DCACHE,   0x0c,    4,       16 * 1024, 32, NULL), \
    238  1.14   msaitoh __CI_TBL(CAI_DCACHE,   0x0d,    4,       16 * 1024, 64, NULL), \
    239  1.15   msaitoh __CI_TBL(CAI_DCACHE,   0x0e,    6,       24 * 1024, 64, NULL), \
    240  1.11  pgoyette __CI_TBL(CAI_L2CACHE,  0x21,    8,      256 * 1024, 64, NULL), /* L2 (MLC) */ \
    241   1.8  christos __CI_TBL(CAI_L2CACHE,  0x39,    4,      128 * 1024, 64, NULL), \
    242   1.8  christos __CI_TBL(CAI_L2CACHE,  0x3a,    6,      192 * 1024, 64, NULL), \
    243   1.8  christos __CI_TBL(CAI_L2CACHE,  0x3b,    2,      128 * 1024, 64, NULL), \
    244   1.8  christos __CI_TBL(CAI_L2CACHE,  0x3c,    4,      256 * 1024, 64, NULL), \
    245   1.8  christos __CI_TBL(CAI_L2CACHE,  0x3d,    6,      384 * 1024, 64, NULL), \
    246   1.8  christos __CI_TBL(CAI_L2CACHE,  0x3e,    4,      512 * 1024, 64, NULL), \
    247   1.8  christos __CI_TBL(CAI_L2CACHE,  0x40,    0,               0,  0, "not present"), \
    248   1.8  christos __CI_TBL(CAI_L2CACHE,  0x41,    4,      128 * 1024, 32, NULL), \
    249   1.8  christos __CI_TBL(CAI_L2CACHE,  0x42,    4,      256 * 1024, 32, NULL), \
    250   1.8  christos __CI_TBL(CAI_L2CACHE,  0x43,    4,      512 * 1024, 32, NULL), \
    251   1.8  christos __CI_TBL(CAI_L2CACHE,  0x44,    4, 1 * 1024 * 1024, 32, NULL), \
    252   1.8  christos __CI_TBL(CAI_L2CACHE,  0x45,    4, 2 * 1024 * 1024, 32, NULL), \
    253  1.11  pgoyette __CI_TBL(CAI_L2CACHE,  0x48,   12, 3 * 1024 * 1024, 64, NULL), \
    254  1.11  pgoyette 								\
    255  1.12  pgoyette /* 0x49 Is L2 on Xeon MP (Family 0f, Model 06), L3 otherwise */	\
    256   1.8  christos __CI_TBL(CAI_L2CACHE,  0x49,   16, 4 * 1024 * 1024, 64, NULL), \
    257   1.8  christos __CI_TBL(CAI_L2CACHE,  0x4e,   24, 6 * 1024 * 1024, 64, NULL), \
    258   1.8  christos __CI_TBL(CAI_DCACHE,   0x60,    8,       16 * 1024, 64, NULL), \
    259   1.8  christos __CI_TBL(CAI_DCACHE,   0x66,    4,        8 * 1024, 64, NULL), \
    260   1.8  christos __CI_TBL(CAI_DCACHE,   0x67,    4,       16 * 1024, 64, NULL), \
    261   1.8  christos __CI_TBL(CAI_DCACHE,   0x2c,    8,       32 * 1024, 64, NULL), \
    262   1.8  christos __CI_TBL(CAI_DCACHE,   0x68,    4,       32 * 1024, 64, NULL), \
    263   1.8  christos __CI_TBL(CAI_ICACHE,   0x70,    8,       12 * 1024, 64, "12K uOp cache"), \
    264   1.8  christos __CI_TBL(CAI_ICACHE,   0x71,    8,       16 * 1024, 64, "16K uOp cache"), \
    265   1.8  christos __CI_TBL(CAI_ICACHE,   0x72,    8,       32 * 1024, 64, "32K uOp cache"), \
    266   1.8  christos __CI_TBL(CAI_ICACHE,   0x73,    8,       64 * 1024, 64, "64K uOp cache"), \
    267   1.8  christos __CI_TBL(CAI_L2CACHE,  0x78,    4, 1 * 1024 * 1024, 64, NULL), \
    268   1.8  christos __CI_TBL(CAI_L2CACHE,  0x79,    8,      128 * 1024, 64, NULL), \
    269   1.8  christos __CI_TBL(CAI_L2CACHE,  0x7a,    8,      256 * 1024, 64, NULL), \
    270   1.8  christos __CI_TBL(CAI_L2CACHE,  0x7b,    8,      512 * 1024, 64, NULL), \
    271   1.8  christos __CI_TBL(CAI_L2CACHE,  0x7c,    8, 1 * 1024 * 1024, 64, NULL), \
    272   1.8  christos __CI_TBL(CAI_L2CACHE,  0x7d,    8, 2 * 1024 * 1024, 64, NULL), \
    273   1.8  christos __CI_TBL(CAI_L2CACHE,  0x7f,    2,      512 * 1024, 64, NULL), \
    274  1.15   msaitoh __CI_TBL(CAI_L2CACHE,  0x80,    8,      512 * 1024, 64, NULL), \
    275   1.8  christos __CI_TBL(CAI_L2CACHE,  0x82,    8,      256 * 1024, 32, NULL), \
    276   1.8  christos __CI_TBL(CAI_L2CACHE,  0x83,    8,      512 * 1024, 32, NULL), \
    277   1.8  christos __CI_TBL(CAI_L2CACHE,  0x84,    8, 1 * 1024 * 1024, 32, NULL), \
    278   1.8  christos __CI_TBL(CAI_L2CACHE,  0x85,    8, 2 * 1024 * 1024, 32, NULL), \
    279   1.8  christos __CI_TBL(CAI_L2CACHE,  0x86,    4,      512 * 1024, 64, NULL), \
    280   1.8  christos __CI_TBL(CAI_L2CACHE,  0x87,    8, 1 * 1024 * 1024, 64, NULL), \
    281  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0x22, 0xff,      512 * 1024, 64, "sectored, 4-way "), \
    282  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0x23, 0xff, 1 * 1024 * 1024, 64, "sectored, 8-way "), \
    283  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0x25, 0xff, 2 * 1024 * 1024, 64, "sectored, 8-way "), \
    284  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0x29, 0xff, 4 * 1024 * 1024, 64, "sectored, 8-way "), \
    285  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0x46,    4, 4 * 1024 * 1024, 64, NULL), \
    286  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0x47,    8, 8 * 1024 * 1024, 64, NULL), \
    287  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0x49,   16, 4 * 1024 * 1024, 64, NULL), \
    288  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0x4a,   12, 6 * 1024 * 1024, 64, NULL), \
    289  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0x4b,   16, 8 * 1024 * 1024, 64, NULL), \
    290  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0x4c,   12,12 * 1024 * 1024, 64, NULL), \
    291  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0x4d,   16,16 * 1024 * 1024, 64, NULL), \
    292  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0xd0,    4,      512 * 1024, 64, NULL), \
    293  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0xd1,    4, 1 * 1024 * 1024, 64, NULL), \
    294  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0xd2,    4, 2 * 1024 * 1024, 64, NULL), \
    295  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0xd6,    8, 1 * 1024 * 1024, 64, NULL), \
    296  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0xd7,    8, 2 * 1024 * 1024, 64, NULL), \
    297  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0xd8,    8, 4 * 1024 * 1024, 64, NULL), \
    298  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0xdc,   12, 3 *  512 * 1024, 64, NULL), \
    299  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0xdd,   12, 3 * 1024 * 1024, 64, NULL), \
    300  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0xde,   12, 6 * 1024 * 1024, 64, NULL), \
    301  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0xe2,   16, 2 * 1024 * 1024, 64, NULL), \
    302  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0xe3,   16, 4 * 1024 * 1024, 64, NULL), \
    303  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0xe4,   16, 8 * 1024 * 1024, 64, NULL), \
    304  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0xea,   24,12 * 1024 * 1024, 64, NULL), \
    305  1.14   msaitoh __CI_TBL(CAI_L3CACHE,  0xeb,   24,18 * 1024 * 1024, 64, NULL), \
    306  1.11  pgoyette __CI_TBL(CAI_L3CACHE,  0xec,   24,24 * 1024 * 1024, 64, NULL), \
    307   1.8  christos __CI_TBL(0,               0,    0,               0,  0, NULL)  \
    308   1.8  christos }
    309   1.8  christos 
    310   1.8  christos #define AMD_L2CACHE_INFO { \
    311   1.8  christos __CI_TBL(0, 0x01,    1, 0, 0, NULL), \
    312   1.8  christos __CI_TBL(0, 0x02,    2, 0, 0, NULL), \
    313   1.8  christos __CI_TBL(0, 0x04,    4, 0, 0, NULL), \
    314   1.8  christos __CI_TBL(0, 0x06,    8, 0, 0, NULL), \
    315   1.8  christos __CI_TBL(0, 0x08,   16, 0, 0, NULL), \
    316   1.8  christos __CI_TBL(0, 0x0a,   32, 0, 0, NULL), \
    317   1.8  christos __CI_TBL(0, 0x0b,   48, 0, 0, NULL), \
    318   1.8  christos __CI_TBL(0, 0x0c,   64, 0, 0, NULL), \
    319   1.8  christos __CI_TBL(0, 0x0d,   96, 0, 0, NULL), \
    320   1.8  christos __CI_TBL(0, 0x0e,  128, 0, 0, NULL), \
    321   1.8  christos __CI_TBL(0, 0x0f, 0xff, 0, 0, NULL), \
    322   1.8  christos __CI_TBL(0, 0x00,    0, 0, 0, NULL)  \
    323   1.8  christos }
    324   1.8  christos 
    325   1.8  christos #define AMD_L3CACHE_INFO { \
    326   1.8  christos __CI_TBL(0, 0x01,    1, 0, 0, NULL), \
    327   1.8  christos __CI_TBL(0, 0x02,    2, 0, 0, NULL), \
    328   1.8  christos __CI_TBL(0, 0x04,    4, 0, 0, NULL), \
    329   1.8  christos __CI_TBL(0, 0x06,    8, 0, 0, NULL), \
    330   1.8  christos __CI_TBL(0, 0x08,   16, 0, 0, NULL), \
    331   1.8  christos __CI_TBL(0, 0x0a,   32, 0, 0, NULL), \
    332   1.8  christos __CI_TBL(0, 0x0b,   48, 0, 0, NULL), \
    333   1.8  christos __CI_TBL(0, 0x0c,   64, 0, 0, NULL), \
    334   1.8  christos __CI_TBL(0, 0x0d,   96, 0, 0, NULL), \
    335   1.8  christos __CI_TBL(0, 0x0e,  128, 0, 0, NULL), \
    336   1.8  christos __CI_TBL(0, 0x0f, 0xff, 0, 0, NULL), \
    337   1.8  christos __CI_TBL(0, 0x00,    0, 0, 0, NULL)  \
    338   1.8  christos }
    339   1.8  christos 
    340   1.4      yamt #endif /* _X86_CACHEINFO_H_ */
    341