Skip to content

Conversation

devenrao
Copy link
Contributor

@devenrao devenrao commented Sep 22, 2025

Following changes are done to pdbg repository

  1. Do not use platform_attrs.H generated header file which uses pdbg_get/set attribute rather follow the hosboot way and use geneated fapi2platmacros.H which internally calls tryGetAttr and trySetAttr inside the macros.

  2. Add missing attribute in rainier generated dts file ATTR_HW543384_WAR_MODE as this attribute is accessed in step 0 hwp.

  3. Modify autogenerated fapi2platattrmacros.H to use constexpr and consteval over integer cast as the tryGetAttr, trySetAttr are template methods and we cannot use integer cast as part of compile time code generation for template methods.

  4. Modify target service to loop through all the proc targets and set the HW_ACCESS_METHOD default pointer to SBEFIFO_ACCESS_PTR this way any invocation of HWP getcfam/putcfam getscom/putscom calls the sbefifo related methods. Direct access is used only when SBE is down.

@jenkins-openbmc-ibm
Copy link

Can one of the admins verify this patch?

Ensure scalar attribute values are correctly converted
from big-endian when reading data from the device tree.
This fixes potential issues with misinterpreted values
on little-endian platforms.

Change-Id: I2ecb9246cb365a9de4e63fa27ff67c17f25e03b8
Signed-off-by: Marri Devender Rao <[email protected]>
Modified the Google Test wrap to follow the standard format used
across OpenBMC repositories such as sdbuplus. Ensures consistent
integration and usage of the testing framework within the project.

Signed-off-by: Marri Devender Rao <[email protected]>
Change-Id: I545d25b06706bd4ad9233012376ce63fd5907fbf
@devenrao devenrao force-pushed the cbs branch 4 times, most recently from 0ec2ad7 to 659f7f8 Compare September 23, 2025 06:06
@devenrao devenrao force-pushed the cbs branch 3 times, most recently from 58ea0db to 0ea065f Compare October 12, 2025 13:53
@devenrao devenrao changed the title Cater for endian conversion and also use yocto dtc for libfdt Cater for using targeting in IPL Oct 13, 2025
@devenrao devenrao force-pushed the cbs branch 3 times, most recently from 4ce628b to 469d491 Compare October 13, 2025 05:50
- For local Meson builds, add libfdt as a subproject to provide the
  'fdt' dependency. This allows building targeting library without
  requiring system-installed dtc.

- For Yocto/Bitbake builds, rely on the dtc recipe and add DEPENDS
  on dtc, avoiding local subproject build and ensuring proper
  packaging.

- Avoid using dtc.wrap as it caused issues due to dtc being distributed
  as a tar.gz instead of a git repository.

Signed-off-by: Marri Devender Rao <[email protected]>
Change-Id: I2d4e13af157eae933d2bf093d54aea09f03d7502
- Relocate the sample application used to validate targeting changes
  from the main folder to the dedicated test folder.
- Update Meson build files accordingly to reflect the new location.

Signed-off-by: Marri Devender Rao <[email protected]>
Change-Id: I388ce32fda3b51f4dc4ac4138ca2fc7ed979a0d3
Test by switching to rainier auto-genrated files and
dtb file.

Signed-off-by: Marri Devender Rao <[email protected]>
Change-Id: Ie48623bc697e01c3c9dd22a374deb98f04d7c7bd
Add auto generated fapi to targeting attribute mapping
header file.

Change-Id: I52b7311f4ef0c4770933050b7ca3dc5eeb205077
ATTR_HW543384_WAR_MODE is used in clock test HWP and the
same is not generated so adding it manually

Change-Id: I1ea51bd2ab2481c317567404aa89451bc45553f8
ATTR_MC_PLL_BUCKET uses C-type array so catering
for the same in tryGetAttr and trySetAttr methods

Also removed private helper method setAttrImpl and using
trySetAttrImpl to avoid duplicate code.

Change-Id: I38a4db5103f43003376a284ddb4b885b5ca0c7cc
optimized trySetAttrImpl tryGetAttrImpl methods which has
too many if..else blocks

Change-Id: I76192a8e2810a3f5f84bbe67828d7d7386db1491
@devenrao devenrao force-pushed the cbs branch 5 times, most recently from bea3e7a to c1817a8 Compare October 14, 2025 03:05
- Add Fapi2ToTargetingAttr template to map fapi2::AttributeId to
  TARGETING::ATTRIBUTE_ID at compile-time.
- Define REGISTER_FAPI2_TO_TARGETING macro to simplify registration of
  each attribute mapping.
- Register mappings for SYS0, SYS1, PCI0, and PCI1 REFCLK receiver terms.
- Replaces previous enum-based approach, enabling type-safe, modern
  C++20 compliant attribute conversions.

Change-Id: I682c408de137d17119b5fce3928eac24580a3cd3
Set the default hardware access method for all processor (PROC) targets
to SBEFIFO, which will be used for normal chip communication.

In scenarios where the BMC fails to communicate with the SBE (e.g.,
SBE not responding or FIFO timeout).

BMC will switch to the direct FSI access method to retrieve debug and
recovery data.

Change-Id: Ie9fabe4fe52bc857cf3fe15d05dcb566736b66cb
Change-Id: Ifcfd2f35ea17e700d550bac573f7dfcb10e3428d
Change-Id: I12faeafe3da66f3d037633f05c02fb10e8966203
Change-Id: I57092d51efdbe25ff2a599831f219ddde1d5aa8b
Previously, methods in Target used childByAffinity as the default
association type. This has been modified to childByPhysical to
maintain consistency with hostboot targeting and ensure uniform target
traversal behavior.

Change-Id: Ib831d643c039e729720100b8697738bcc5528f45
Extended htobe_integral and betoh_integral utilities to handle enum types,
including enums defined with underlying types like uint8_t, uint16_t, etc.

This ensures attribute get/set operations correctly perform endian
conversion for both integral and enum-based attributes.

Tested
Test3: TYPE_PROC size
TYPE_PROC size 4

Test5: Endian conversion when read uint32_t value from dtb file
0x1

Change-Id: I5d9eb441a69bc0620b4f3033cbcc2f10cb402c98
Update the device tree to mark the master processor target as functional
and present by default. This ensures that the master proc is available
for initialization and targeting queries during system startup.

Change-Id: I2bcc22493084287b8288082c4212fdcc8a28a09b
Return FdHandle by value instead of returning pointer to a local
object, which was going out of scope and causing invalid file
descriptor errors during CFAM read/write operations.

Also added temporary debug logs for demo; these will be removed
in a later cleanup commit.

Change-Id: I1476472b351dbdbdc98d59e9dc84bf740b90df9e
@devenrao devenrao force-pushed the cbs branch 9 times, most recently from 3f2845b to 2785833 Compare October 15, 2025 12:21
At present, the IPL code performs an I2C write and read sequence to
reset the clock chip in order to work around a known hardware defect.

This change introduces a standalone test application that performs
the same behavior using the i2c_transport APIs. The test can be run
manually before host power-on to verify and reset the clock chip.

Note:
- The REFCLK target should be marked as present and functional in the DTS.
- The test app interacts with the clock over the I2C bus and validates
  the reset sequence and status register.

This utility helps validate clock reset functionality independent of IPL.

Change-Id: Ib539a3b42b3eeca4891c17f01e804c4de680068d
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

Successfully merging this pull request may close these issues.

2 participants