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

fby3.5: hd: Initialize HalfDome BIC #377

Closed
wants to merge 2 commits into from

Conversation

Yi-Shum
Copy link
Collaborator

@Yi-Shum Yi-Shum commented 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%
  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
Contributor

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

meta-facebook/yv35-hd/prj.conf Outdated Show resolved Hide resolved
CONFIG_THREAD_NAME=y
CONFIG_THREAD_STACK_INFO=y
CONFIG_THREAD_MONITOR=y
CONFIG_IRQ_OFFLOAD=y
Copy link
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
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.

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

#define SELF_I2C_ADDRESS 0x20
#define MAX_IPMB_IDX 2

extern IPMB_config pal_IPMB_config_table[];
Copy link
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
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
Contributor

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

@Yi-Shum
Copy link
Collaborator Author

Yi-Shum commented Jul 7, 2022

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

@facebook-github-bot
Copy link
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants