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