Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs on ast2600 boot procedure #128

Closed
dineshkumarv86 opened this issue Aug 6, 2020 · 3 comments
Closed

Docs on ast2600 boot procedure #128

dineshkumarv86 opened this issue Aug 6, 2020 · 3 comments

Comments

@dineshkumarv86
Copy link

Hi all,
Is it any docs available which explaining the boot procedure on ast2600 using openbmc images ?

@dagilson-ciena
Copy link

I am also interested in this. We have an eval board coming in with an AST2600 on it.

In the absence of being able to build a AST2600 image, which build would be good to use that supports an AST2500?

1 similar comment
@dagilson-ciena
Copy link

I am also interested in this. We have an eval board coming in with an AST2600 on it.

In the absence of being able to build a AST2600 image, which build would be good to use that supports an AST2500?

@williamspatrick
Copy link
Contributor

Can I get some more information on what you're looking for here? The AST2600 isn't really any different from the AST2500 from our code's perspective. u-boot is loaded out of SPI, loads the kernel, runs a rootfs. I'm guessing you're looking for more details than that but I don't know what.

facebook-github-bot pushed a commit that referenced this issue Dec 30, 2020
Summary:
This PR depends on PRs [facebookexternal/openbmc.arista#126 and [facebookexternal/openbmc.arista#127, so please merge those first.

Implements Elbert-specific pal functions to add support for the following IPMI commands from the IPMI 2.0 specification:

**Global Commands**
- Get Device ID (NetFn = 0x06h, Cmd = 0x01h)
- Cold Reset (Reset OpenBMC from Host) (NetFn = 0x06h, Cmd = 0x02h)
- Get Self Test Result (NetFn = 0x06h, Cmd = 0x04)
- Manufacturing Test On (NetFn = 0x06h, Cmd = 0x05h)
- Get Device GUID (NetFn = 0x06h, Cmd = 0x08h)

**BMC Watchdog Timer Commands**
- Reset Watchdog Timer (NetFn = 0x06h, Cmd = 0x22h)
- Set Watchdog Timer (NetFn = 0x06h, Cmd = 0x24h)
- Get Watchdog Timer (NetFn = 0x06h, Cmd = 0x25h)

**BMC Device and Messaging Commands**
- Set BMC Global Enables (NetFn = 0x06h, Cmd = 0x2Eh)
- Get BMC Global Enables (NetFn = 0x06h, Cmd = 0x2Fh)
- Get System GUID (NetFn = 0x06h, Cmd = 0x37h)
- Set System Info Parameters (NetFn = 0x06h, Cmd = 0x58h)
- Get System Info Parameters (NetFn = 0x06h, Cmd = 0x59h)

**SEL Device Commands**
- Get SEL Info (NetFn = 0x0Ah, Cmd = 0x40h)
- Reserve SEL (NetFn = 0x0Ah, Cmd = 0x41h)
- Get SEL Entry (NetFn = 0x0Ah, Cmd = 0x43h)
- Add SEL Entry (NetFn = 0x0Ah, Cmd = 0x44h)
- Clear SEL (NetFn = 0x0Ah, Cmd = 0x47h)

**LAN Device Commands**
- Get LAN Configuration (NetFn = 0x0Ch, Cmd = 0x02h)

**OEM Commands**
- Set Processor Info (NetFn = 0x0Ch, Cmd = 0x1Ah)
- Get Processor Info (NetFn = 0x0Ch, Cmd = 0x1Bh)
- Set DIMM Info (NetFn = 0x0Ch, Cmd = 0x1Ch)
- Get DIMM Info (NetFn = 0x0Ch, Cmd = 0x1Dh)
- Get Board ID (NetFn = 0x0Ch, Cmd = 0x37h)
- Set BIOS Boot Order (NetFn = 0x0Ch, Cmd = 0x52h)
- Get BIOS Boot Order (NetFn = 0x0Ch, Cmd = 0x53h)
- Set POST Start (NetFn = 0x0Ch, Cmd = 0x73h)
- Set POST End (NetFn = 0x0Ch, Cmd = 0x74h)
- Set PPIN (NetFn = 0x0Ch, Cmd = 0x77h)
- Set System GUID (NetFn = 0x0Ch, Cmd = 0xEFh)
- Get PCIE Configuration (NetFn = 0x0Ch, Cmd = 0xF4h)

## Testing

Below are example input/output for the implemented IPMI commands.

**Get Device ID (NetFn = 0x06h, Cmd = 0x01h):**
```
root@bmc-oob:~# ipmitool mc info
Device ID                 : 32
Device Revision           : 1
Firmware Revision         : 1.03
IPMI Version              : 2.0
Manufacturer ID           : 40981
Manufacturer Name         : Unknown (0xA015)
Product ID                : 12614 (0x3146)
Product Name              : Unknown (0x3146)
Device Available          : yes
Provides Device SDRs      : yes
Additional Device Support :
    Sensor Device
    SDR Repository Device
    SEL Device
    FRU Inventory Device
    IPMB Event Receiver
    IPMB Event Generator
    Chassis Device
Aux Firmware Rev Info     :
    0x00
    0x00
    0x00
    0x00
```

**Cold Reset (Reset OpenBMC from Host) (NetFn = 0x06h, Cmd = 0x02h):**
Tested by sending the command from the host and verifying that OpenBmc reboots.
Also attempted reboot while upgrading FPGA, BIOS, and OpenBMC images and verified that reboot is blocked:
```
root@bmc-oob:~# ipmitool mc reset cold
MC reset command failed: Node busy
```

**Get Self Test Result (NetFn = 0x06h, Cmd = 0x04):**
```
root@bmc-oob:~# ipmitool mc selftest
Selftest: passed
```

**Manufacturing Test On (NetFn = 0x06h, Cmd = 0x05h):**
```
root@bmc-oob:~# ipmitool raw 0x06 0x05 0x6f 0x62 0x6d 0x63 0x2d 0x64 0x75 0x6d 0x70

root@bmc-oob:~# ls /mnt/data1/obmc-dump-1608330949.tar.gz
/mnt/data1/obmc-dump-1608330949.tar.gz
```
**Get Device GUID (NetFn = 0x06h, Cmd = 0x08h):**
```
root@bmc-oob:~# ipmitool raw 0x06 0x08
 3c f1 09 00 34 df db 1f 8a b7 41 53 20 33 02 62
root@bmc-oob:~# ipmitool mc guid
System GUID  : 0009f13c-df34-1fdb-8ab7-415320330262
Timestamp    : 01/08/1970 04:59:40
```
guid-util is also supported:
```
root@bmc-oob:~# guid-util dev --get
0x3C:0xF1:0x09:0x00:0x34:0xDF:0xDB:0x1F:0x8A:0xB7:0x41:0x53:0x20:0x33:0x02:0x62
```

**Set Watchdog Timer (NetFn = 0x06h, Cmd = 0x24h):**
```
root@bmc-oob:~# ipmitool -d 1 raw 0x06 0x24 0x01 0x01 0x00 0x00 0x58 0x02

```

**Get Watchdog Timer (NetFn = 0x06h, Cmd = 0x25h):**
```
root@bmc-oob:~# ipmitool -d 1 mc watchdog get
Watchdog Timer Use:     BIOS FRB2 (0x01)
Watchdog Timer Is:      Stopped
Watchdog Timer Actions: Hard Reset (0x01)
Pre-timeout interval:   0 seconds
Timer Expiration Flags: 0x00
Initial Countdown:      60 sec
Present Countdown:      60 sec
```

**Reset Watchdog Timer (NetFn = 0x06h, Cmd = 0x22h):**
```
root@bmc-oob:~# ipmitool -d 1 mc watchdog reset
IPMI Watchdog Timer Reset -  countdown restarted!

root@bmc-oob:~# ipmitool -d 1 mc watchdog get
Watchdog Timer Use:     BIOS FRB2 (0x41)
Watchdog Timer Is:      Started/Running
Watchdog Timer Actions: Hard Reset (0x01)
Pre-timeout interval:   0 seconds
Timer Expiration Flags: 0x00
Initial Countdown:      60 sec
Present Countdown:      57 sec

root@bmc-oob:~# grep FRU /var/log/messages
 2020 Dec 18 14:44:07 bmc-oob. user.crit elbert-02d657d70e-dirty: ipmid: FRU: 1, BIOS FRB2 Watchdog Hard Reset
```

**Set BMC Global Enables (NetFn = 0x06h, Cmd = 0x2Eh):**
```
root@bmc-oob:~# ipmitool raw 0x06 0x2e 0x12

root@bmc-oob:/mnt/data/kv_store# ipmitool mc setenables oem0 on
Enabling OEM 0

Verifying...
Receive Message Queue Interrupt          : disabled
Event Message Buffer Full Interrupt      : enabled
Event Message Buffer                     : disabled
System Event Logging                     : disabled
OEM 0                                    : enabled
OEM 1                                    : disabled
OEM 2                                    : disabled
```

**Get BMC Global Enables (NetFn = 0x06h, Cmd = 0x2Fh):**
```
root@bmc-oob:~# ipmitool raw 0x06 0x2f
 12

root@bmc-oob:~# ipmitool mc getenables
Receive Message Queue Interrupt          : disabled
Event Message Buffer Full Interrupt      : enabled
Event Message Buffer                     : disabled
System Event Logging                     : disabled
OEM 0                                    : enabled
OEM 1                                    : disabled
OEM 2                                    : disabled
```

**Get System GUID (NetFn = 0x06h, Cmd = 0x37h):**
```
root@bmc-oob:~# ipmitool raw 0x06 0x37
 3c f1 09 00 34 df db 1f 8a b7 41 53 20 33 02 62

root@bmc-oob:~# guid-util sys --get
0x3C:0xF1:0x09:0x00:0x34:0xDF:0xDB:0x1F:0x8A:0xB7:0x41:0x53:0x20:0x33:0x02:0x62
```

**Set System Info Parameters (NetFn = 0x06h, Cmd = 0x58h):**
```
root@bmc-oob:~# ipmitool mc setsysinfo system_fw_version 4.11
root@bmc-oob:~# ipmitool mc setsysinfo os_name eos
```

**Get System Info Parameters (NetFn = 0x06h, Cmd = 0x59h):**
```
root@bmc-oob:~# ipmitool mc getsysinfo system_fw_version
4.11

root@bmc-oob:~# ipmitool mc getsysinfo os_name
eos
```

**Add SEL Entry (NetFn = 0x0Ah, Cmd = 0x44h):**
```
root@bmc-oob:~# ipmitool -d 1 raw 0xa 0x44 0 0 0 0 0 01 00
 01 00
root@bmc-oob:~# ipmitool -d 1 raw 0xa 0x44 0 0 0 0 0 02 00
 02 00
root@bmc-oob:~# ipmitool -d 1 raw 0xa 0x44 0 0 0 0 0 03 00
 03 00
```

**Get SEL Entry (NetFn = 0x0Ah, Cmd = 0x43h):**
```
root@bmc-oob:~# ipmitool sel elist -d 1
   0 | 12/18/2020 | 23:03:59 | reserved |  | Asserted
   1 | 12/18/2020 | 23:11:25 | reserved |  | Asserted
   2 | 12/18/2020 | 23:11:29 | reserved |  | Asserted
```

**Reserve SEL (NetFn = 0x0Ah, Cmd = 0x41h):**
```
root@bmc-oob:~# ipmitool raw 0x0a 0x42 -d 1
 02 00
```

**Get SEL Info (NetFn = 0x0Ah, Cmd = 0x40h):**
```
root@bmc-oob:~# ipmitool sel info -d 1
SEL Information
Version          : 1.5 (v1.5, v2 compliant)
Entries          : 3
Free Space       : 2000 bytes
Percent Used     : 2%
Last Add Time    : 12/18/2020 23:11:29
Last Del Time    : Not Available
Overflow         : false
Supported Cmds   : 'Reserve'
```

**Clear SEL (NetFn = 0x0Ah, Cmd = 0x47h):**
```
root@bmc-oob:~# ipmitool sel clear -d 1
Clearing SEL.  Please allow a few seconds to erase.
root@bmc-oob:~# ipmitool sel elist -d 1
SEL has no entries
```

**Get LAN Configuration (NetFn = 0x0Ch, Cmd = 0x02h):**
The IPv4, IPv6, and MAC address of the BMC interface can be retrieved.
```
root@bmc-oob:~# ifconfig eth0.4088 172.24.146.137 netmask 255.255.255.128
root@bmc-oob:~# ip -6 addr add 2001:0db8:0:f101::1/64 dev eth0.4088
root@bmc-oob:~# ifconfig eth0.4088
eth0.4088 Link encap:Ethernet  HWaddr D4:AF:F7:2F:32:A6
          inet addr:172.24.146.137  Bcast:172.24.146.255  Mask:255.255.255.128
          inet6 addr: 2001:db8:0:f101::1/64 Scope:Global
          inet6 addr: fe80::d6af:f7ff:fe2f:32a6/64 Scope:Link
          inet6 addr: fe80::1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:1558 (1.5 KiB)

root@bmc-oob:~# ipmitool raw 0xc 2 0 3
 11 ac 18 92 89
root@bmc-oob:~# ipmitool raw 0xc 2 0 5
 11 d4 af f7 2f 32 a6
root@bmc-oob:~# ipmitool raw 0xc 2 0 59
 11 00 02 20 01 0d b8 00 00 f1 01 00 00 00 00 00
 00 00 01 40 00
```

**Set Processor Info (NetFn = 0x0Ch, Cmd = 0x1Ah):**
```
root@bmc-oob:~# ipmitool raw 0x30 0x1a 0x0 0x1 0x60 0x5

```

**Get Processor Info (NetFn = 0x0Ch, Cmd = 0x1Bh):**
```
root@bmc-oob:~# ipmitool raw 0x30 0x1b
 01 60 05 01
```

**Set DIMM Info (NetFn = 0x0Ch, Cmd = 0x1Ch):**
```
root@bmc-oob:~# ipmitool raw 0x30 0x1c 0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7

```

**Get DIMM Info (NetFn = 0x0Ch, Cmd = 0x1Dh):**
```
root@bmc-oob:~# ipmitool raw 0x30 0x1d
 01 02 03 04 05 06 07 02
```

**Get Board ID (NetFn = 0x0Ch, Cmd = 0x37h):**
```
root@bmc-oob:~# ipmitool raw 0x30 0x37
 06 0a 00 00
```

**Set BIOS Boot Order (NetFn = 0x0Ch, Cmd = 0x52h):**
```
root@bmc-oob:~# ipmitool raw 0x30 0x52 0x01 0x01 0x02 0x04 0x03 0xff

```

**Get BIOS Boot Order (NetFn = 0x0Ch, Cmd = 0x53h):**
```
root@bmc-oob:~# ipmitool raw 0x30 0x53
 01 01 02 04 03 ff
```

**Set POST Start (NetFn = 0x0Ch, Cmd = 0x73h):**
```
root@bmc-oob:~# ipmitool raw 0x30 0x73

root@bmc-oob:~# grep -i post /var/log/messages
 2020 Dec 18 15:49:20 bmc-oob. user.info elbert-c72ac9c133-dirty: ipmid: POST Start Event for Payload#0
```

**Set POST End (NetFn = 0x0Ch, Cmd = 0x74h):**
```
root@bmc-oob:~# ipmitool raw 0x30 0x74

root@bmc-oob:~# grep -i post /var/log/messages | tail -n 1
 2020 Dec 18 15:49:47 bmc-oob. user.info elbert-c72ac9c133-dirty: ipmid: POST End Event for Payload#0
```

**Set PPIN (NetFn = 0x0Ch, Cmd = 0x77h):**
```
root@bmc-oob:~# ipmitool raw 0x30 0x77 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11

root@bmc-oob:~# cat /mnt/data/kv_store/mb_cpu_ppin
01020304050607080a0b0c0d0e0f1011
```

**Set System GUID (NetFn = 0x0Ch, Cmd = 0xEFh):**
```
root@bmc-oob:~# guid-util sys --set JAS20390005
root@bmc-oob:~# guid-util sys --get
0x27:0x87:0x02:0x00:0xF8:0x40:0xDD:0x1F:0x47:0xA8:0x41:0x53:0x20:0x39:0x00:0x05
```

**Get PCIE Configuration (NetFn = 0x0Ch, Cmd = 0xF4h):**
```
root@bmc-oob:~# ipmitool raw 0x30 0xf4
 02
```

Pull Request resolved: facebookexternal/openbmc.arista#128

Reviewed By: mikechoifb

fbshipit-source-id: 2fe21854ee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants