Tags:
create new tag
view all tags
Below are the formats for a few useful IPMI commands for the AMC13 as provided by Jes Tikalsky (jtikalsky@hep.wisc.edu) with the University of Wisconsin group. For a more in depth look at the Status and Control Registers for the MMC FPGA SPI Interface, see [[http://ohm.bu.edu/~chill90/op_specs/UW_MMC_FPGA_Config_Interface_2013-01-31.pdf][the Wisconsin official MMC documentation]] | *Contents* | | [[#MmcSpiRead][SPI Read]] | | [[#MmcSpiWrite][SPI Write]] | | [[#MmcReadSpiStatus][Read SPI Status]] | | [[#MmcWriteSpiControl][Write SPI Control]] | | [[#MmcGetNonVolatileAreaInfo][Get Non-Volatile Area Info]] | | [[#MmcReadNonVolatileMemory][Read Non-Volatile Memory]] | | [[#UsingIpmiTool][How to issue these commands with ipmitool]] | | [[#MmcEepromLayout][EEPROM layout]] | #MmcSpiRead ---++ SPI Read Below are the relevant bytes for a =raw= IPMI SPI "read data" command <verbatim> NetFN 0x32 CMD 0x34 Params PortID (0-3) Address LS Byte Address MS byte Count (I recommend <20) </verbatim> #MmcSpiWrite ---++ SPI Write Below are the relevant bytes for a =raw= IPMI SPI "write data" command <verbatim> NetFN 0x32 CMD 0x33 Params PortID (0-3) Address LS Byte Address MS byte Count (I recommend <20) Byte 1 ... Byte n </verbatim> #MmcReadSpiStatus ---++ Read SPI Status Below are the relevant bytes for =raw= IPMI SPI "read status register" command <verbatim> NetFN 0x32 CMD 0x31 Params 1: Port ID (0-3) Return 1: bit 7: HF1 bit 6: HF2 bit 5: CFGRDY bit 4: REQCFG bit 3-0: reserved </verbatim> #MmcWriteSpiControl ---++ Write SPI Control Below are the relevant bytes for a =raw= IPMI SPI "write control register" command. For the purposes of the AMC13, we really only care about the =CFGRDY= bit <verbatim> NetFN 0x32 CMD 0x32 Params 1: Port ID (0-3) 2: bit 7: select UHF for update bit 6: select LHF for update bit 5: select CFGRDY for update bit 4-2: 0 bit 1: SET selected flags bit 0: CLEAR selected flags </verbatim> #MmcGetNonVolatileAreaInfo ---++ Get Non-Volatile Area Info Below are the relevant bytes for a =raw= IPMI SPI "read NV area info" command <verbatim> Get Nonvolatile Area Info (Partial): NetFN 0x32 CMD 0x40 Params 1: 0 Return 1: 0 ... 15: FPGA Config Area LS Byte 16: FPGA Config Area MS Byte 17: FPGA Config Area Size (32 byte units) </verbatim> #MmcReadNonVolatileMemory ---++ Read Non-Volatile Memory Below are the relevant bytes for a =raw= IPMI SPI "read NV memory" command <verbatim> Raw Nonvolatile Read: NetFN 0x32 CMD 0x42 Params 1: Offset LS 2: Offset MS 3: Length (<=20) Return $Data </verbatim> #UsingIpmiTool ---++ Using ipmitool You can issue these command using the OS supplied =ipmitool= as follows. *To read:* <verbatim> $ ipmitool -H 192.168.1.41 -U '' -P '' -T 0x82 -b 7 -t 0x76 raw 0x32 0x34 1 11 0 4 </verbatim> | -t 0x76 | 0x76 is 0x70 + slot*2 (e.g. slot 3) or 0xa4 for special case of slot 13 | | 0x32 0x34 | 0x32 means UWMMC special command <br> 0x34 is configuration read | | 1 11 0 4 | 1 is device select (0=T1, 1=T2) <br> 11 0 is address (lsb msb) <br> 4 is byte count | *To write:* <verbatim> $ ipmitool -H 192.168.1.41 -U '' -P '' -T 0x82 -b 7 -t 0x76 raw 0x32 0x33 0 0 0 6 0x03 0xff 0xff 0xff 0x00 0xc0 </verbatim> | 0x32 x33 | 0x33 is configuration write | | 0 0 0 6 | device select, address, count (=6 e.g.) | | 0x03 0xff ... | data to write| #MmcEepromLayout EEPROM layout extracted from =nonvolatile.h= in source code using this perl script: [[http://ohm.bu.edu/~hazen/CMS/mmc_eeprom_print_defs.pl][mmc_eeprom_print_defs.pl]]. <verbatim> NONVOLATILE_FORMAT_VERSION (0x0001) 1 HW_HEADER_BYTE_OFFSET (0x0000) 0 HW_HEADER_SIZE (0x0020) 32 APP_DEV_ID_BYTE_OFFSET (0x0020) 32 APP_DEV_ID_SIZE (0x0010) 16 COMMON_HEADER_BYTE_OFFSET (0x0030) 48 COMMON_HEADER_SIZE (0x0008) 8 BOARD_INFO_AREA_BYTE_OFFSET (0x0038) 56 BOARD_INFO_AREA_SIZE (0x0040) 64 MULTIRECORD_AREA_BYTE_OFFSET (0x0078) 120 MULTIRECORD_AREA_SIZE (0x0050) 80 END_OF_FRU_AREA_OFFSET (0x00c8) 200 FPGA_CONFIG_AREA_BYTE_OFFSET (0x00c8) 200 FPGA_CONFIG_AREA_SIZE (0x0100) 256 SDR_AREA_BYTE_OFFSET (0x01e0) 480 SDR_AREA_SIZE (0x0800) 2048 PAYLDMGR_AREA_BYTE_OFFSET (0x09e0) 2528 PAYLDMGR_AREA_SIZE (0x0040) 64 ADC_SCALING_AREA_BYTE_OFFSET (0x0a20) 2592 ADC_SCALING_AREA_SIZE (0x00c0) 192 GP_PARAM_AREA_BYTE_OFFSET (0x0ae0) 2784 GP_PARAM_AREA_SIZE (0x0040) 64 FAULT_LOG_ENTRY_SIZE (0x0008) 8 FAULT_LOG_ENTRY_CNT (0x000f) 15 FAULT_LOG_HDR_BYTE_OFFSET (0x0b20) 2848 FAULT_LOG_ENTRY_BYTE_OFFSET (0x0b28) 2856 FAULT_LOG_SIZE (0x0080) 128 EEP_USED_AREA_SIZE (0x0ba0) 2976 </verbatim> The script =readNVmem.py= will dump 40 bytes starting at =FPGA_CONFIG_AREA_BYTE_OFFSET=. This area is formatted as follows in MMCV2.1: | *Overall Header* || | *Offset* | *Description* | | 0 | Format flag (0 if initialized, 0xff if not) | | 1 | Flags[1] | | 2 | Offset 0 (0xff if uninitialized) | | 3 | Offset 1 (0xff if uninitialized) | | 4 | Offset 2 (0xff if uninitialized) | | 5 | Header checksum | Notes: 1. Flag bits: a. bit 0 set if FPGA 0 image defined a. bit 1 set if FPGA 1 image defined a. bit 2 set if FPGA 2 image define a. bit 7 set to replace first byte with slot ID Next come 0-3 FPGA configuration records, with a 5 byte header and variable size data area | *FPGA Configuration Header *|| | *Offset* | *Description* | | 0 | Destination addr LSB | | 1 | Destination addr MSB | | 2 | Record length (not including header) | | 3 | Record checksum | | 4 | Header checksum | After the header is the actual configuration record data. Currently the length is 0x0b. | *Offset* | *Description* | | 0 | Slot ID if bit 7 of flags set (NOTE: doesn't seem to work in v2.1) | | 1-4 | Net mask (AMC13 ignores) | | 5-8 | IP address | | 9-10 | Boot vector (AMC13 ignores) | Here is the contents of the configuration data for a sample AMC13: <verbatim> --FPGA 0 header 00 address LSB 00 address MSB 0b length = 11 59 checksum 9c checksum --FPGA 0 record 00 Slot number ff ff ff 00 Net mask c0 a8 01 41 IP address 00 00 Boot vector --FPGA 1 header 00 address LSB 00 address MSB 0b length = 11 58 checksum 9d checksum --FPGA 1 record 00 Slot number ff ff ff 00 Net mask c0 a8 01 42 IP address 00 00 Boot vector </verbatim> -- Main.EricHazen - 02 May 2014
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r4 - 02 May 2014
-
EricHazen
Home
Site map
BUCMSPublic web
Main web
Sandbox web
TWiki web
BUCMSPublic Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
E
dit
A
ttach
Copyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback