Skip to content

fby3.5: hd: Initialize HalfDome BIC#377

Closed
Yi-Shum wants to merge 2 commits into
facebook:mainfrom
Yi-Shum:fby3.5-Initialize_HalfDome_BIC
Closed

fby3.5: hd: Initialize HalfDome BIC#377
Yi-Shum wants to merge 2 commits into
facebook:mainfrom
Yi-Shum:fby3.5-Initialize_HalfDome_BIC

Conversation

@Yi-Shum

@Yi-Shum Yi-Shum commented Jul 6, 2022

Copy link
Copy Markdown
Collaborator

Summary:

  • Initialize HalfDome BIC.
  • Create project config, dts files, file header, and CMake file.
  • Add project code in meta-facebook/yv35-hd/.

Test plan:

  • Build code: PASS
  • Can access BIC console: PASS

LOG:

  1. Build code pass.
$ west build -b ast1030_evb -p auto ./meta-facebook/yv35-hd/
...
[254/261] Linking C executable zephyr/zephyr_prebuilt.elf

[261/261] Linking C executable zephyr/Y35BHD.elf
Memory region         Used Size  Region Size  %age Used
         SRAM_NC:        152 KB       320 KB     47.50%
           FLASH:          0 GB         0 GB
            SRAM:      385440 B       448 KB     84.02%
        IDT_LIST:          0 GB         2 KB      0.00%
  1. BIC console:
[00:00:00.002,000] <wrn> usb_dc_aspe*** Booting Zephyr OS build v00.01.05-5-g6163ab05ded5  ***
Hello, welcome to yv35 halfdome ffff.ff.ff
@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 Jul 6, 2022
Summary:
- Initialize HalfDome BIC.
- Create project config, dts files, file header, and CMake file.
- Add project code in meta-facebook/yv35-hd/.

Test plan:
- Build code: PASS
- Can access BIC console: PASS

LOG:
1. Build code pass.
```
$ west build -b ast1030_evb -p auto ./meta-facebook/yv35-hd/
...
[254/261] Linking C executable zephyr/zephyr_prebuilt.elf

[261/261] Linking C executable zephyr/Y35BHD.elf
Memory region         Used Size  Region Size  %age Used
         SRAM_NC:        152 KB       320 KB     47.50%
           FLASH:          0 GB         0 GB
            SRAM:      385440 B       448 KB     84.02%
        IDT_LIST:          0 GB         2 KB      0.00%
```
2. BIC console:
```
[00:00:00.002,000] <wrn> usb_dc_aspe*** Booting Zephyr OS build v00.01.05-5-g6163ab05ded5  ***
Hello, welcome to yv35 halfdome ffff.ff.ff
```
@Yi-Shum Yi-Shum force-pushed the fby3.5-Initialize_HalfDome_BIC branch from 5d18886 to ff66dd9 Compare July 6, 2022 07:19
@Yi-Shum Yi-Shum mentioned this pull request Jul 6, 2022
@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 meta-facebook/yv35-hd/prj.conf Outdated
Comment thread meta-facebook/yv35-hd/prj.conf Outdated
CONFIG_THREAD_NAME=y
CONFIG_THREAD_STACK_INFO=y
CONFIG_THREAD_MONITOR=y
CONFIG_IRQ_OFFLOAD=y

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.

This is only needed for testing so it can be removed.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

OK, I will remove this config.

Comment thread meta-facebook/yv35-hd/prj.conf Outdated
CONFIG_CMSIS_V2_MEM_SLAB_MAX_DYNAMIC_SIZE=128
CONFIG_CMSIS_V2_THREAD_MAX_COUNT=23
CONFIG_CMSIS_V2_THREAD_DYNAMIC_MAX_COUNT=10
CONFIG_TIMEOUT_64BIT=n

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.

This is force y by other options so it can be removed from this config as well.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

OK, I will remove this config.

target_sources(app PRIVATE ${common_sources})
target_include_directories(app PRIVATE ${ZEPHYR_BASE}/include/portability)
target_include_directories(app PRIVATE ${common_path} ${common_path}/service/ipmi/include ${common_path}/service/host ${common_path}/service/sensor ${common_path}/service/usb ${common_path}/service/ipmb ${common_path}/service/mctp ${common_path}/service/pldm ${common_path}/hal ${common_path}/dev/include ${common_path}/lib ${common_path}/shell)
target_include_directories(app PRIVATE src/ipmi/include src/lib src/platform)

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.

Add

# Fail build if there are any warnings
target_compile_options(app PRIVATE -Werror)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

OK, I'll add this.

Comment thread meta-facebook/yv35-hd/src/platform/plat_guid.h
#define SELF_I2C_ADDRESS 0x20
#define MAX_IPMB_IDX 2

extern IPMB_config pal_IPMB_config_table[];

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.

Is this actually needed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

IPMB will be supported in PR #378, so I'll keep this.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@Yi-Shum has updated the pull request. You must reimport the pull request before landing.

@Yi-Shum

Yi-Shum commented Jul 7, 2022

Copy link
Copy Markdown
Collaborator Author

Hi @GoldenBug ,
I modified it based on the comments.
Please review again, thank you.

@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.

facebook-github-bot pushed a commit that referenced this pull request Jul 8, 2022
Summary:
- Support IPMB handler.

Dependency: #377

Pull Request resolved: #378

Test Plan:
- Build code: Pass
- Check IPMB is workable: Pass

LOG:
```
root@bmc-oob:~# bic-util slot1 0x18 0x1
00 80 FF FF 02 BF 15 A0 00 00 00 00 00 00 00
```

Reviewed By: garnermic

Differential Revision: D37679073

Pulled By: GoldenBug

fbshipit-source-id: 1733c51fca36362abe08074b60f91f9d915b6645
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.

3 participants