Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | * Copyright (C) 2001 Mike Corrigan IBM Corporation |
Stephen Rothwell | fcee389 | 2005-06-21 17:15:34 -0700 | [diff] [blame] | 3 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License as published by |
| 6 | * the Free Software Foundation; either version 2 of the License, or |
| 7 | * (at your option) any later version. |
Stephen Rothwell | fcee389 | 2005-06-21 17:15:34 -0700 | [diff] [blame] | 8 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
Stephen Rothwell | fcee389 | 2005-06-21 17:15:34 -0700 | [diff] [blame] | 13 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 | */ |
| 18 | |
Stephen Rothwell | b08567cb | 2005-09-28 23:37:01 +1000 | [diff] [blame] | 19 | #ifndef _ISERIES_MAIN_STORE_H |
| 20 | #define _ISERIES_MAIN_STORE_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | |
| 22 | /* Main Store Vpd for Condor,iStar,sStar */ |
Stephen Rothwell | fcee389 | 2005-06-21 17:15:34 -0700 | [diff] [blame] | 23 | struct IoHriMainStoreSegment4 { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | u8 msArea0Exists:1; |
| 25 | u8 msArea1Exists:1; |
| 26 | u8 msArea2Exists:1; |
| 27 | u8 msArea3Exists:1; |
| 28 | u8 reserved1:4; |
| 29 | u8 reserved2; |
| 30 | |
| 31 | u8 msArea0Functional:1; |
| 32 | u8 msArea1Functional:1; |
| 33 | u8 msArea2Functional:1; |
| 34 | u8 msArea3Functional:1; |
| 35 | u8 reserved3:4; |
| 36 | u8 reserved4; |
| 37 | |
| 38 | u32 totalMainStore; |
| 39 | |
| 40 | u64 msArea0Ptr; |
| 41 | u64 msArea1Ptr; |
| 42 | u64 msArea2Ptr; |
| 43 | u64 msArea3Ptr; |
| 44 | |
| 45 | u32 cardProductionLevel; |
| 46 | |
| 47 | u32 msAdrHole; |
| 48 | |
| 49 | u8 msArea0HasRiserVpd:1; |
| 50 | u8 msArea1HasRiserVpd:1; |
| 51 | u8 msArea2HasRiserVpd:1; |
| 52 | u8 msArea3HasRiserVpd:1; |
Stephen Rothwell | fcee389 | 2005-06-21 17:15:34 -0700 | [diff] [blame] | 53 | u8 reserved5:4; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 54 | u8 reserved6; |
| 55 | u16 reserved7; |
| 56 | |
| 57 | u8 reserved8[28]; |
| 58 | |
| 59 | u64 nonInterleavedBlocksStartAdr; |
| 60 | u64 nonInterleavedBlocksEndAdr; |
| 61 | }; |
| 62 | |
| 63 | /* Main Store VPD for Power4 */ |
Stephen Rothwell | e2bf2e2 | 2006-08-17 16:28:28 +1000 | [diff] [blame] | 64 | struct __attribute((packed)) IoHriMainStoreChipInfo1 { |
| 65 | u32 chipMfgID; |
| 66 | char chipECLevel[4]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 67 | }; |
| 68 | |
| 69 | struct IoHriMainStoreVpdIdData { |
| 70 | char typeNumber[4]; |
| 71 | char modelNumber[4]; |
| 72 | char partNumber[12]; |
| 73 | char serialNumber[12]; |
| 74 | }; |
| 75 | |
Stephen Rothwell | e2bf2e2 | 2006-08-17 16:28:28 +1000 | [diff] [blame] | 76 | struct __attribute((packed)) IoHriMainStoreVpdFruData { |
| 77 | char fruLabel[8]; |
| 78 | u8 numberOfSlots; |
| 79 | u8 pluggingType; |
| 80 | u16 slotMapIndex; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 81 | }; |
| 82 | |
Stephen Rothwell | e2bf2e2 | 2006-08-17 16:28:28 +1000 | [diff] [blame] | 83 | struct __attribute((packed)) IoHriMainStoreAdrRangeBlock { |
| 84 | void *blockStart; |
| 85 | void *blockEnd; |
| 86 | u32 blockProcChipId; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 87 | }; |
| 88 | |
| 89 | #define MaxAreaAdrRangeBlocks 4 |
| 90 | |
Stephen Rothwell | e2bf2e2 | 2006-08-17 16:28:28 +1000 | [diff] [blame] | 91 | struct __attribute((packed)) IoHriMainStoreArea4 { |
| 92 | u32 msVpdFormat; |
| 93 | u8 containedVpdType; |
| 94 | u8 reserved1; |
| 95 | u16 reserved2; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 96 | |
Stephen Rothwell | e2bf2e2 | 2006-08-17 16:28:28 +1000 | [diff] [blame] | 97 | u64 msExists; |
| 98 | u64 msFunctional; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 99 | |
Stephen Rothwell | e2bf2e2 | 2006-08-17 16:28:28 +1000 | [diff] [blame] | 100 | u32 memorySize; |
| 101 | u32 procNodeId; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 102 | |
Stephen Rothwell | e2bf2e2 | 2006-08-17 16:28:28 +1000 | [diff] [blame] | 103 | u32 numAdrRangeBlocks; |
| 104 | struct IoHriMainStoreAdrRangeBlock xAdrRangeBlock[MaxAreaAdrRangeBlocks]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 105 | |
Stephen Rothwell | e2bf2e2 | 2006-08-17 16:28:28 +1000 | [diff] [blame] | 106 | struct IoHriMainStoreChipInfo1 chipInfo0; |
| 107 | struct IoHriMainStoreChipInfo1 chipInfo1; |
| 108 | struct IoHriMainStoreChipInfo1 chipInfo2; |
| 109 | struct IoHriMainStoreChipInfo1 chipInfo3; |
| 110 | struct IoHriMainStoreChipInfo1 chipInfo4; |
| 111 | struct IoHriMainStoreChipInfo1 chipInfo5; |
| 112 | struct IoHriMainStoreChipInfo1 chipInfo6; |
| 113 | struct IoHriMainStoreChipInfo1 chipInfo7; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 114 | |
Stephen Rothwell | e2bf2e2 | 2006-08-17 16:28:28 +1000 | [diff] [blame] | 115 | void *msRamAreaArray; |
| 116 | u32 msRamAreaArrayNumEntries; |
| 117 | u32 msRamAreaArrayEntrySize; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 118 | |
Stephen Rothwell | e2bf2e2 | 2006-08-17 16:28:28 +1000 | [diff] [blame] | 119 | u32 numaDimmExists; |
| 120 | u32 numaDimmFunctional; |
| 121 | void *numaDimmArray; |
| 122 | u32 numaDimmArrayNumEntries; |
| 123 | u32 numaDimmArrayEntrySize; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 124 | |
Stephen Rothwell | e2bf2e2 | 2006-08-17 16:28:28 +1000 | [diff] [blame] | 125 | struct IoHriMainStoreVpdIdData idData; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 126 | |
Stephen Rothwell | e2bf2e2 | 2006-08-17 16:28:28 +1000 | [diff] [blame] | 127 | u64 powerData; |
| 128 | u64 cardAssemblyPartNum; |
| 129 | u64 chipSerialNum; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 130 | |
Stephen Rothwell | e2bf2e2 | 2006-08-17 16:28:28 +1000 | [diff] [blame] | 131 | u64 reserved3; |
| 132 | char reserved4[16]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 133 | |
Stephen Rothwell | e2bf2e2 | 2006-08-17 16:28:28 +1000 | [diff] [blame] | 134 | struct IoHriMainStoreVpdFruData fruData; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 135 | |
Stephen Rothwell | e2bf2e2 | 2006-08-17 16:28:28 +1000 | [diff] [blame] | 136 | u8 vpdPortNum; |
| 137 | u8 reserved5; |
| 138 | u8 frameId; |
| 139 | u8 rackUnit; |
| 140 | char asciiKeywordVpd[256]; |
| 141 | u32 reserved6; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 142 | }; |
| 143 | |
| 144 | |
Stephen Rothwell | fcee389 | 2005-06-21 17:15:34 -0700 | [diff] [blame] | 145 | struct IoHriMainStoreSegment5 { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 146 | u16 reserved1; |
| 147 | u8 reserved2; |
| 148 | u8 msVpdFormat; |
| 149 | |
| 150 | u32 totalMainStore; |
| 151 | u64 maxConfiguredMsAdr; |
| 152 | |
Stephen Rothwell | fcee389 | 2005-06-21 17:15:34 -0700 | [diff] [blame] | 153 | struct IoHriMainStoreArea4 *msAreaArray; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 154 | u32 msAreaArrayNumEntries; |
| 155 | u32 msAreaArrayEntrySize; |
| 156 | |
Stephen Rothwell | fcee389 | 2005-06-21 17:15:34 -0700 | [diff] [blame] | 157 | u32 msAreaExists; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 158 | u32 msAreaFunctional; |
| 159 | |
| 160 | u64 reserved3; |
| 161 | }; |
| 162 | |
Stephen Rothwell | 0bc0ffd | 2005-06-21 17:15:36 -0700 | [diff] [blame] | 163 | extern u64 xMsVpd[]; |
| 164 | |
Stephen Rothwell | b08567cb | 2005-09-28 23:37:01 +1000 | [diff] [blame] | 165 | #endif /* _ISERIES_MAIN_STORE_H */ |