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

Dummy handler to receive the I2CSlaveAddr when don't match the IPMBAddr #215

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

gustavosr8
Copy link
Contributor

When repeatedly upgrading and downgrading the openMMC via ipmitool, it crashes because the si2c->xfer pointer in Chip_I2C_SlaveStateHandler was uninitialized (NULL), what happens because the received I2C Slave Address doesn't match the expected IPMB address. Solve #160.

@gustavosr8 gustavosr8 self-assigned this Mar 19, 2024
@gustavosr8 gustavosr8 linked an issue Mar 19, 2024 that may be closed by this pull request
@gustavosr8 gustavosr8 requested a review from augustofg March 20, 2024 13:33
@augustofg
Copy link
Member

I propose the following commit message:

Dummy handler to receive the I2CSlaveAddr when don't match the IPMBAddr

When repeatedly upgrading and downgrading the openMMC via ipmitool, it
crashes sporadically at Chip_I2C_SlaveStateHandler. This happens because
for some motive, when calling startMasterXfer() sometimes an interrupt
occurs for the I2C0 peripheral, and the Chip_I2C_SlaveStateHandler is
called, dispatching  the handling to the callback registered for
I2C_SLAVE_GENERAL. But, this callback is not configured, resulting in a
invalid memory access.

It is not clear why this interrupt is generated for an I2C slave address
other than the expected IPMB address obtained by get_ipmb_addr(), but this
should be properly handled and not lead to a crash.

Fixes #160.

@augustofg augustofg added this to the v1.6.0 milestone Mar 20, 2024
When repeatedly upgrading and downgrading the openMMC via ipmitool, it
crashes sporadically at Chip_I2C_SlaveStateHandler. This happens because
for some motive, when calling startMasterXfer() sometimes an interrupt
occurs for the I2C0 peripheral, and the Chip_I2C_SlaveStateHandler is
called, dispatching  the handling to the callback registered for
I2C_SLAVE_GENERAL. But, this callback is not configured, resulting in a
invalid memory access.

It is not clear why this interrupt is generated for an I2C slave address
other than the expected IPMB address obtained by get_ipmb_addr(), but
this should be properly handled and not lead to a crash.

Fixes #160.
@gustavosr8 gustavosr8 force-pushed the i2c-slave-handle-bug branch from ab9cbb1 to 80a81f5 Compare March 21, 2024 11:19
@augustofg
Copy link
Member

👍

@augustofg augustofg merged commit f952c42 into devel Mar 21, 2024
6 checks passed
@augustofg augustofg deleted the i2c-slave-handle-bug branch March 21, 2024 11:30
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.

MMC crash Chip_I2C_SlaveStateHandler
2 participants