user_exports.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:3k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. #ifndef _USER_EXPORTS_H
  2. #define _USER_EXPORTS_H
  3. /* 
  4.  * Dave Engebretsen and Mike Corrigan {engebret|mikejc}@us.ibm.com
  5.  *   Copyright (C) 2002 Dave Engebretsen & Mike Corrigan
  6.  *
  7.  * This program is free software; you can redistribute it and/or
  8.  * modify it under the terms of the GNU General Public License
  9.  * as published by the Free Software Foundation; either version
  10.  * 2 of the License, or (at your option) any later version.
  11.  */
  12. typedef unsigned char u8;
  13. typedef unsigned short u16;
  14. typedef unsigned int u32;
  15. #ifdef __powerpc64__
  16. typedef unsigned long u64;
  17. #else
  18. typedef unsigned long long u64;
  19. #endif
  20. struct user_exports {
  21. /*==================================================================
  22.  * Cache line 1: 0x0000 - 0x007F
  23.  * Kernel only data - undefined for user space
  24.  *==================================================================
  25.  */
  26. u64 undefined[16]; 
  27. /*==================================================================
  28.  * Cache line 2: 0x0080 - 0x00FF
  29.  * Kernel / User data
  30.  *==================================================================
  31.  */
  32. u8  eye_catcher[6];      /* Eyecatcher: PPC64         0x00 */
  33. u16 version;             /* Version number            0x06 */
  34. u16 platform;          /* Platform type             0x08 */
  35. u16 processor;  /* Processor type            0x0A */
  36. u32 processorCount;  /* # of physical processors  0x0C */
  37. u64 physicalMemorySize;  /* Size of real memory(B)    0x10 */
  38. u16 dCacheL1Size;  /* L1 d-cache size           0x18 */
  39. u16 dCacheL1LineSize;  /* L1 d-cache line size      0x1A */
  40. u16 dCacheL1LogLineSize; /* L1 d-cache line size Log2 0x1C */
  41. u16 dCacheL1LinesPerPage;/* L1 d-cache lines / page   0x1E */
  42. u16 dCacheL1Assoc;       /* L1 d-cache associativity  0x20 */
  43. u16 iCacheL1Size;  /* L1 i-cache size           0x22 */
  44. u16 iCacheL1LineSize;  /* L1 i-cache line size      0x24 */
  45. u16 iCacheL1LogLineSize; /* L1 i-cache line size Log2 0x26 */
  46. u16 iCacheL1LinesPerPage;/* L1 i-cache lines / page   0x28 */
  47. u16 iCacheL1Assoc;       /* L1 i-cache associativity  0x2A */
  48. u16 cacheL2Size;  /* L2 cache size             0x2C */
  49. u16 cacheL2Assoc;  /* L2 cache associativity    0x2E */
  50. u64 tb_orig_stamp;       /* Timebase at boot          0x30 */
  51. u64 tb_ticks_per_sec;    /* Timebase tics / sec       0x38 */
  52. u64 tb_to_xs;            /* Inverse of TB to 2^20     0x40 */
  53. u64 stamp_xsec;          /*                           0x48 */
  54. volatile u64 tb_update_count; /* Timebase atomicity   0x50 */
  55. u32 tz_minuteswest;      /* Minutes west of Greenwich 0x58 */
  56. u32 tz_dsttime;          /* Type of dst correction    0x5C */
  57. u64 resv1[4];            /* Reserverd          0x60 - 0x7F */
  58. };
  59. /* Platform types */
  60. #define PLATFORM_PSERIES      0x0100
  61. #define PLATFORM_PSERIES_LPAR 0x0101
  62. #define PLATFORM_ISERIES_LPAR 0x0201
  63. /* Processor types */
  64. #define PV_PULSAR       0x0034
  65. #define PV_POWER4       0x0035
  66. #define PV_ICESTAR      0x0036
  67. #define PV_SSTAR        0x0037
  68. #define PV_630          0x0040
  69. #define PV_630p         0x0041
  70. #endif /* USER_EXPORTS_H */