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

fixes issue #110 #119

Closed
wants to merge 2 commits into from
Closed

fixes issue #110 #119

wants to merge 2 commits into from

Conversation

leilanon
Copy link
Contributor

Fixes #110 Solution: Add print limitation.

#114 #116 #117 Seems to be false alarms.
However there is a possible memory leak in


Opening pipeline should be closed at the end of process.

leila.lin added 2 commits April 17, 2020 16:18
    Issue#116
    Issue#117

    Above issues are false alarm.
    Files do not need to close if they weren't open.

    However there is a potential memory leak since the system pipeline has opened,
    but closed as a file operation.
    Probably just typo.

	modified:   common/recipes-core/fw-util/files/tpm2.cpp
Solution: Give it a limitation.

	modified:   common/recipes-core/fw-util/files/system.cpp
@leilanon leilanon changed the title Pr issue fixes issue #110 Apr 17, 2020
@leilanon
Copy link
Contributor Author

Most build check have failed reason are:
The job exceeded the maximum time limit for jobs, and has been terminated.
Had looking for the root cause of time expired, it might be some of yocto/rocko public resource links are no longer available.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@williamspatrick has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@williamspatrick
Copy link
Contributor

@leilanon - Sorry we let this sit for so long. I've started the merge process going from our end.

@facebook-github-bot
Copy link
Contributor

@williamspatrick merged this pull request in 40bb49e.

facebook-github-bot pushed a commit that referenced this pull request Dec 9, 2020
Summary:
Initial KCS/IPMI support for Elbert platform.

Changes:
- Adds KCS interface and LPC controller to elbert device tree
- Adds ipmid/kcsd/ipmitool to elbert config
- Adds initial pal and ipmid fru logic for elbert

## Testing

On BMC:

KCS/IPMI drivers loaded:
```
root@bmc-oob:~# dmesg | grep -i kcs
[   17.376002] aspeed-kcs-bmc: channel=2 addr=0xca8 idr=0x28 odr=0x34 str=0x40
[   17.376282] aspeed-kcs-bmc: channel=3 addr=0xca2 idr=0x2c odr=0x38 str=0x44

root@bmc-oob:~# dmesg | grep -i ipmi
[   17.375121] IPMI message handler: version 39.2
[   17.375188] ipmi device interface
[   17.375248] ipmi_si: IPMI System Interface driver
[   17.375437] ipmi_si: Unable to find any System Interface(s)
```

Write a SEL log to KCS on x86. On BMC, verify that log is received:
```
root@bmc-oob:~# grep -i ipmi /var/log/messages
 2020 Dec  1 18:00:44 bmc-oob. kern.info elbert-f07646ff5d-dirty: kernel: [   17.375121] IPMI message handler: version 39.2
 2020 Dec  1 18:00:44 bmc-oob. kern.info elbert-f07646ff5d-dirty: kernel: [   17.375188] ipmi device interface
 2020 Dec  1 18:00:44 bmc-oob. kern.info elbert-f07646ff5d-dirty: kernel: [   17.375248] ipmi_si: IPMI System Interface driver
 2020 Dec  1 18:00:44 bmc-oob. kern.warning elbert-f07646ff5d-dirty: kernel: [   17.375437] ipmi_si: Unable to find any System Interface(s)
 2020 Dec  1 18:00:44 bmc-oob. daemon.info elbert-f07646ff5d-dirty: kcsd: opened kcs device /dev/ipmi-kcs2, fd=4
 2020 Dec  1 18:00:44 bmc-oob. daemon.info elbert-f07646ff5d-dirty: kcsd: opened kcs device /dev/ipmi-kcs3, fd=4
 2020 Dec  1 18:01:24 bmc-oob. user.warning elbert-f07646ff5d-dirty: ipmid: SEL Entry, FRU: 1, Content: 00:00:02:74:F5:C6:5F:09:30:04:01:02:02:00:00:FF
 2020 Dec  1 18:01:24 bmc-oob. user.crit elbert-f07646ff5d-dirty: ipmid: SEL Entry: FRU: 1, Record: Standard (0x02), Time: 2020-12-01 18:01:24, Sensor: Unknown (0x02), Event Data: (0000FF) Unknown Assertion
```
```
root@bmc-oob:~# hexdump /mnt/data/sel1.bin
0000000 fbfb fbfb 0001 0000 0000 0000 0001 0000
0000010 f574 5fc6 f4d0 5fc6 0000 0000 0000 0000
0000020 0000 0000 0000 0000 0000 0000 0000 0000
*
0000100 0000 7402 c6f5 095f 0430 0201 0002 ff00
0000110 0001 3300 c6ba 005f 0000 0000 0000 0000
0000120 0002 3600 c6ba 005f 0000 0000 0000 0000
0000130 0003 3800 c6ba 005f 0000 0000 0000 0000
0000140 0004 5f02 c6f4 095f 0430 0201 0002 ff00
0000150 0000 0000 0000 0000 0000 0000 0000 0000
*
0000900
```

Get SEL logs:
```
root@bmc-oob:~# ipmitool -d 1 sel elist
   0 | 12/02/2020 | 02:01:24 | Temperature #0x02 | Transition to Idle | Asserted
```

Get SEL info:
```
root@bmc-oob:~# ipmitool -d 1 sel info
SEL Information
Version          : 1.5 (v1.5, v2 compliant)
Entries          : 1
Free Space       : 2032 bytes
Percent Used     : 0%
Last Add Time    : 12/02/2020 02:01:24
Last Del Time    : 12/02/2020 01:58:40
Overflow         : false
Supported Cmds   : 'Reserve'
```

Clear SEL logs:
```
oot@bmc-oob:~# ipmitool -d 1 sel clear
Clearing SEL.  Please allow a few seconds to erase.

root@bmc-oob:~# ipmitool -d 1 sel elist
SEL has no entries
```

Add new SEL logs:
```
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

root@bmc-oob:~# ipmitool -d 1 sel elist
   0 | 12/02/2020 | 02:07:28 | reserved |  | Asserted
   1 | 12/02/2020 | 02:07:33 | reserved |  | Asserted
   2 | 12/02/2020 | 02:07:35 | reserved |  | Asserted
```

Check FRU:
```
root@bmc-oob:~# ipmitool fru
FRU Device Description : Builtin FRU Device (ID 0)
 Product Manufacturer  : Arista
 Product Name          : Elbert
 Product Part Number   : 7388
 Product Version       : 1
 Product Serial        : JAS001
 Product Asset Tag     : ASS001
```

Pull Request resolved: facebookexternal/openbmc.arista#119

Reviewed By: benwei13

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

Successfully merging this pull request may close these issues.

no limitation for "%s" while calling fscanf()
3 participants