Skip to content

fby3.5: cl:Add read and write BIC register command#236

Closed
DelphineChiu wants to merge 1 commit into
facebook:main_v2from
Wiwynn:Lora/main_v2/Add_read/write_BIC_register
Closed

fby3.5: cl:Add read and write BIC register command#236
DelphineChiu wants to merge 1 commit into
facebook:main_v2from
Wiwynn:Lora/main_v2/Add_read/write_BIC_register

Conversation

@DelphineChiu

Copy link
Copy Markdown

fby3.5: cl:Add read and write BIC register command
Summary:

  • Add OEM command to read and write BIC register

Dependency: #235

Test Plan:

  • Build Code: Pass
  • Command Test: Pass

Log:
read register 0x7e7b0300
[BIC console]
uart:~$ md 0x7e7b0300

[7e7b0300] 00000001
[BMC console]
root@bmc-oob:~# bic-util slot1 0xe0 0x68 0x9c 0x9c 0x00 0x00 0x03 0x7b 0x7e 0x4
9C 9C 00 01 00 00 00

write 2 bytes 0x2211 to register 0x7e7b0300
[BMC console]
root@bmc-oob:~# bic-util slot1 0xe0 0x69 0x9c 0x9c 0x00 0x00 0x03 0x7b 0x7e 0x2 0x11 0x22
9C 9C 00

read register 0x7e7b0300
[BIC console]
uart:~$ md 0x7e7b0300

[7e7b0300] 00002211
[BMC console]
root@bmc-oob:~# bic-util slot1 0xe0 0x68 0x9c 0x9c 0x00 0x00 0x03 0x7b 0x7e 0x4
9C 9C 00 11 22 00 00

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 18, 2022
@DelphineChiu

Copy link
Copy Markdown
Author

Dependency: #235

@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

Comment thread common/ipmi/oem_1s_handler.c Outdated
Comment on lines +812 to +814
for (uint8_t i = 0; i < read_len; i++) {
msg->data[i] = *(uint8_t *)(addr + i);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any reason not to use memcpy?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Modify with your suggestions.
We have fixed this and do the forced update.
Please review it. Thanks.

@LoraLin1 LoraLin1 force-pushed the Lora/main_v2/Add_read/write_BIC_register branch from 40bad74 to 946c1d2 Compare April 19, 2022 01:12
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@DelphineChiu has updated the pull request. You must reimport the pull request before landing.

Summary:
- Add OEM command to read and write BIC register

Test Plan:
- Build Code: Pass
- Command Test: Pass

Log:
read register 0x7e7b0300
[BIC console]
uart:~$ md 0x7e7b0300

[7e7b0300] 00000001
[BMC console]
root@bmc-oob:~# bic-util slot1 0xe0 0x68 0x9c 0x9c 0x00 0x00 0x03 0x7b 0x7e 0x4
9C 9C 00 01 00 00 00

write 2 bytes 0x2211 to register 0x7e7b0300
[BMC console]
root@bmc-oob:~# bic-util slot1 0xe0 0x69 0x9c 0x9c 0x00 0x00 0x03 0x7b 0x7e 0x2 0x11 0x22
9C 9C 00

read register 0x7e7b0300
[BIC console]
uart:~$ md 0x7e7b0300

[7e7b0300] 00002211
[BMC console]
root@bmc-oob:~# bic-util slot1 0xe0 0x68 0x9c 0x9c 0x00 0x00 0x03 0x7b 0x7e 0x4
9C 9C 00 11 22 00 00
@LoraLin1 LoraLin1 force-pushed the Lora/main_v2/Add_read/write_BIC_register branch from 946c1d2 to 5fa1338 Compare April 19, 2022 06:57
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@DelphineChiu has updated the pull request. You must reimport the pull request before landing.

@DelphineChiu DelphineChiu changed the title main_v2 - fby3.5: cl:Add read and write BIC register command Apr 19, 2022
@GoldenBug GoldenBug closed this Apr 19, 2022
facebook-github-bot pushed a commit that referenced this pull request Apr 19, 2022
Summary:
fby3.5: cl:Add read and write BIC register command

- Add OEM command to read and write BIC register

Dependency: #235

Pull Request resolved: #236

Test Plan:
- Build Code: Pass
- Command Test: Pass

Log:
read register 0x7e7b0300
[BIC console]
uart:~$ md 0x7e7b0300

[7e7b0300] 00000001
[BMC console]
root@bmc-oob:~# bic-util slot1 0xe0 0x68 0x9c 0x9c 0x00 0x00 0x03 0x7b 0x7e 0x4
9C 9C 00 01 00 00 00

write 2 bytes 0x2211 to register 0x7e7b0300
[BMC console]
root@bmc-oob:~# bic-util slot1 0xe0 0x69 0x9c 0x9c 0x00 0x00 0x03 0x7b 0x7e 0x2 0x11 0x22
9C 9C 00

read register 0x7e7b0300
[BIC console]
uart:~$ md 0x7e7b0300

[7e7b0300] 00002211
[BMC console]
root@bmc-oob:~# bic-util slot1 0xe0 0x68 0x9c 0x9c 0x00 0x00 0x03 0x7b 0x7e 0x4
9C 9C 00 11 22 00 00

Reviewed By: garnermic

Differential Revision: D35731221

Pulled By: GoldenBug

fbshipit-source-id: e2042e36cb48736aa7fcea8833ab49987c97bce9
facebook-github-bot pushed a commit that referenced this pull request Apr 19, 2022
Summary:
fby3.5: bb: Fix IPMB TX/RX

- Fix BB IPMB TX/RX threads can't malloc successfully problem.
- Move MAX_IPMB_IDX to avoid forgetting chagne its value when adding a new IPMB task.

Dependency: #236

Pull Request resolved: #238

Test Plan:
1. Check BB IPMB is normal.
- Get BB fw version
root@bmc-oob:~# fw-util slot1 --version bb_bic
BB Bridge-IC Version: oby35-bb-v2022.01.01

- Get BB device ID
root@bmc-oob:~# bic-util slot1 0xe0 0x2 0x9c 0x9c 0x0 0x10 0x18 0x01
9C 9C 00 10 07 01 00 00 80 01 01 02 BF 9C 9C 00
00 00 00 00 00 00

2.  Check CL IPMB is normal.
- Get CL fw version
root@bmc-oob:~# fw-util slot1 --version bic
SB Bridge-IC Version: oby35-cl-v2022.06.51

- Get CL device ID
root@bmc-oob:~# bic-util slot1 0x18 0x01
00 80 11 06 02 BF 9C 9C 00 00 00 00 00 00 00

Reviewed By: garnermic

Differential Revision: D35731222

Pulled By: GoldenBug

fbshipit-source-id: 72001a49119916e50698dc550c33b7283fe44e6c
facebook-github-bot pushed a commit that referenced this pull request Apr 26, 2022
Summary:
fby3.5: cl:Add read and write BIC register command

- Add OEM command to read and write BIC register

Dependency: #235

Pull Request resolved: #236

Test Plan:
- Build Code: Pass
- Command Test: Pass

Log:
read register 0x7e7b0300
[BIC console]
uart:~$ md 0x7e7b0300

[7e7b0300] 00000001
[BMC console]
root@bmc-oob:~# bic-util slot1 0xe0 0x68 0x9c 0x9c 0x00 0x00 0x03 0x7b 0x7e 0x4
9C 9C 00 01 00 00 00

write 2 bytes 0x2211 to register 0x7e7b0300
[BMC console]
root@bmc-oob:~# bic-util slot1 0xe0 0x69 0x9c 0x9c 0x00 0x00 0x03 0x7b 0x7e 0x2 0x11 0x22
9C 9C 00

read register 0x7e7b0300
[BIC console]
uart:~$ md 0x7e7b0300

[7e7b0300] 00002211
[BMC console]
root@bmc-oob:~# bic-util slot1 0xe0 0x68 0x9c 0x9c 0x00 0x00 0x03 0x7b 0x7e 0x4
9C 9C 00 11 22 00 00

Reviewed By: garnermic

Differential Revision: D35941583

Pulled By: GoldenBug

fbshipit-source-id: 477405a14f8ced5e79a56300342583f9a6479a3f
facebook-github-bot pushed a commit that referenced this pull request Apr 26, 2022
Summary:
fby3.5: bb: Fix IPMB TX/RX

- Fix BB IPMB TX/RX threads can't malloc successfully problem.
- Move MAX_IPMB_IDX to avoid forgetting chagne its value when adding a new IPMB task.

Dependency: #236

Pull Request resolved: #238

Test Plan:
1. Check BB IPMB is normal.
- Get BB fw version
root@bmc-oob:~# fw-util slot1 --version bb_bic
BB Bridge-IC Version: oby35-bb-v2022.01.01

- Get BB device ID
root@bmc-oob:~# bic-util slot1 0xe0 0x2 0x9c 0x9c 0x0 0x10 0x18 0x01
9C 9C 00 10 07 01 00 00 80 01 01 02 BF 9C 9C 00
00 00 00 00 00 00

2.  Check CL IPMB is normal.
- Get CL fw version
root@bmc-oob:~# fw-util slot1 --version bic
SB Bridge-IC Version: oby35-cl-v2022.06.51

- Get CL device ID
root@bmc-oob:~# bic-util slot1 0x18 0x01
00 80 11 06 02 BF 9C 9C 00 00 00 00 00 00 00

Reviewed By: garnermic

Differential Revision: D35941600

Pulled By: GoldenBug

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

4 participants