Skip to contentSkip to conversation

smci: how do reboots work in scmi?

DISCUSSION Dan Carpenter 4 participants 5 messages Feb 1, 2025 – Feb 3, 2025 System control & power/management interface (SCPI/SCMI) Message Protocol drivers

lore
Share & tools
lore
#0 lore raw

In scmi with pinctrl then we do a PINCTRL_REQUEST to claim the pins, but then if we reboot without restarting the scmi server the the pins are still claimed. Is there some way to hook into VHOST_USER_NONE to release all the pins?

regards,
dan carpenter

#1 lore raw

Hello Dan,
the following message still has not been implemented yet:
- PINCTRL_REQUEST.
- PINCTRL_RELEASE.
- PINCTRL_SET_PERMISSIONS.
- NEGOTIATE_PROTOCOL_VERSION.

thank you so much for your attention and participation.

________________________________________
From: Dan Carpenter <[email protected]>
Sent: Saturday, February 1, 2025 1:57 PM
To: [email protected] <[email protected]>; Khaled Ali Ahmed <[email protected]>; Girish Pathak <[email protected]>
Subject: smci: how do reboots work in scmi?

In scmi with pinctrl then we do a PINCTRL_REQUEST to claim the pins, but then if we reboot without restarting the scmi server the the pins are still claimed. Is there some way to hook into VHOST_USER_NONE to release all the pins?

regards,
dan carpenter
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

#2 lore raw
Quoted 9 lines · Khaled Ali Ahmed

Hello Dan,
the following message still has not been implemented yet:
- PINCTRL_REQUEST.
- PINCTRL_RELEASE.
- PINCTRL_SET_PERMISSIONS.
- NEGOTIATE_PROTOCOL_VERSION.

thank you so much for your attention and participation.

Ah right, I was thinking of PINCTRL_SETTINGS_CONFIGURE.

When the system reboots, it would be nice to have a hook in SCP to just reset everything.

regards,
dan carpenter

#3 lore raw
Quoted 9 lines · Dan Carpenter
Quoted 7 lines · Khaled Ali Ahmed

Hello Dan,
the following message still has not been implemented yet:
- PINCTRL_REQUEST.
- PINCTRL_RELEASE.
- PINCTRL_SET_PERMISSIONS.
- NEGOTIATE_PROTOCOL_VERSION.

Quoted 7 lines
Quoted 2 lines

thank you so much for your attention and participation.

Ah right, I was thinking of PINCTRL_SETTINGS_CONFIGURE.

When the system reboots, it would be nice to have a hook in SCP to just reset everything.

Maybe BASE_RESET_AGENT_CONFIGURATION :
" This command is used to reset platform resource settings that were previously configured by an agent.
Platform resource settings refer to power domain, performance domain, clock, sensors and other
settings associated with a device that the agent has access to. This command can also be used to reset
agent-specific permission configurations to access devices and protocols."

Quoted 6 lines

regards,
dan carpenter

#4 lore raw
Quoted 18 lines · Vincent Guittot
Quoted 9 lines · Dan Carpenter
Quoted 7 lines · Khaled Ali Ahmed

Hello Dan,
the following message still has not been implemented yet:
- PINCTRL_REQUEST.
- PINCTRL_RELEASE.
- PINCTRL_SET_PERMISSIONS.
- NEGOTIATE_PROTOCOL_VERSION.

Quoted 7 lines
Quoted 2 lines

thank you so much for your attention and participation.

Ah right, I was thinking of PINCTRL_SETTINGS_CONFIGURE.

When the system reboots, it would be nice to have a hook in SCP to just reset everything.

Quoted 8 lines

Maybe BASE_RESET_AGENT_CONFIGURATION :
" This command is used to reset platform resource settings that were previously configured by an agent.
Platform resource settings refer to power domain, performance domain, clock, sensors and other
settings associated with a device that the agent has access to. This command can also be used to reset
agent-specific permission configurations to access devices and protocols."

You mean Linux OSPM Agent invoking this commands for itself upon reboot ? (and the platform acting accordignly..)

First I think we should clarify here what we mean with "system reboot".

- a single Agent rebooting by its own decision BASE_RESET_AGENT_CONFIGURATION(self) could be an option

- some Trusted agent causing other agents to shutdown/reboot in this case maybe there could be some interactions via SystemPower protocol, with the server asking upfront for a graceful shutdown which would trigger similarly a BASE_RESET_AGENT_CONFIGURATION(self). This would give the server a notion of an "agent resetting" which is something that currently is not present in SCMI because the server cannot know really if an agent is alive (and I am NOT saying that this would be a bad thing.. :P)

...BUT, on the other side, if a not-so-graceful shutdown is required the victim-agent wont have a chance for a clean reboot/shutdown so somehow the TrustedAgent could have to issue a BASE_RESET_AGENT_CONFIGURATION on behalf of that agent, OR maybe the server could just cleanup the config on its own for the disappearing agent...

- the whole system at the platform level, including the server itself:
does it matter in this case to reset the agent configs ? ...IOW is there a scenario in which an SCMI server could reset, needing all its agents' states to be reset too, WHILE the platform that is running on somehow survives and retains some state ?

I think we never discussed these scenarios, especially in a virtualized environement...

Thanks,
Cristian