Skip to content

alert_L module for handling oob alerts #143

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

Open
wants to merge 3 commits into
base: dev-a1
Choose a base branch
from
Open

alert_L module for handling oob alerts #143

wants to merge 3 commits into from

Conversation

nchatrad
Copy link
Collaborator

splitting the previous PR 135

akky16 added 3 commits June 13, 2025 13:02
 platform driver

Processors from AMD provide APML ALERT_L for BMC users to
monitor events.
APML Alert_L is asserted in multiple events,
- Machine Check Exception occurs within the system
- The processor alerts the SBI on system fatal error event
- Set by hardware as a result of a 0x71/0x72/0x73 command completion
- Set by firmware to indicate the completion of a mailbox operation
- High/Low Temperature Alert

APML Alert_L module define uevents to notify registered userspace processes
of the alert event.

Reviewed-by: Naveen Krishna Chatradhi <[email protected]>
Signed-off-by: Akshay Gupta <[email protected]>
Signed-off-by: sathya priya kumar <[email protected]>
-Add alertl node for morocco and congo platforms

Reviewed-by: Naveen Krishna Chatradhi <[email protected]>
Signed-off-by: Akshay Gupta <[email protected]>
Signed-off-by: Sathya Priya Kumar <[email protected]>
Reviewed-by: Naveen Krishna Chatradhi <[email protected]>
Signed-off-by: Akshay Gupta <[email protected]>
Signed-off-by: sathya priya kumar <[email protected]>
(cherry picked from commit 0f54429)
status = "okay";
gpios = <&ltpi0_gpio 20 GPIO_ACTIVE_LOW>;
sbrmi = <&sbrmi_p0_iod0>;
sbtsi = <&sbtsi_p0_iod0>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

why is &sbtsi_p0_iod1 missing for Congo platforms?

required:
- compatible
- gpio
- sbrmi
Copy link
Collaborator

Choose a reason for hiding this comment

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

please add more description for these tags. Like what is the input, parameters.. etc.

- compatible
- gpio
- sbrmi
- sbtsi
Copy link
Collaborator

Choose a reason for hiding this comment

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

I saw that in Congo there is only iod0 is mentioned, and in morocco iod1 also mentioned. Please explain more here on the parameters for this tag.

#define BIT(n) (1U << (n))
#endif

enum apml_ras_alert_src {
Copy link
Collaborator

Choose a reason for hiding this comment

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

why are we calling this ras alert?

Copy link
Collaborator

@mahkurap mahkurap left a comment

Choose a reason for hiding this comment

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

Please add apml_alert dts changes in Kenya and Nigeria device trees as well.
Also, change congo to Congo, morcco to Morocco in one of the commit message.

.of_match_table = of_match_ptr(apml_alertl_dt_ids),
},
.probe = apml_alertl_probe,
.remove = alert_remove,
Copy link
Collaborator

Choose a reason for hiding this comment

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

for uniformity, change alret_remove to apml_alaertl_remove()

return 0;
}

static int alert_remove(struct platform_device *pdev)
Copy link
Collaborator

Choose a reason for hiding this comment

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

change name to apml_alertl_remove()


snprintf(sock, sizeof(sock), "Socket=0x%x", soc_die_num);
snprintf(src, sizeof(src), "Source=0x%x", alert_src);
pr_err("apml_alertl:Sock:0x%x Src:0x%x\n", soc_die_num, alert_src);
Copy link
Collaborator

Choose a reason for hiding this comment

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

do you mean to have pr_err() here? should it be pr_dbg()?

* 0x3c, 0x4c -> Socket 0, die 0,
* 0x44 -> Socket 0, die 1,
* 0x38, 0x48 -> Socket 1, die 0,
* 0x4c -> Socket 1, die 1.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Typo ? 0x45?

return ret;
}

static u8 static_addr_to_socket(u8 static_addr)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this rule is valid incase 2X1P configuration boot .

Copy link
Collaborator

Choose a reason for hiding this comment

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

As per my understanding
2X1P and 2P can be used interchangeably.
As the PID and static address are related to Socket and Die ID which are stored in CSR registers(RO)
This should be valid.

return 0;
}

static irqreturn_t alert_l_irq_thread_handler(int irq, void *dev_id)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Error Handling , general: Since this is alert handling, it's better to follow a best-effort approach for error handling?

@@ -894,6 +894,17 @@
#endif
};

/ {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Commit message : start with ARM64:dts:aspeed:

@@ -0,0 +1,50 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Commit message Please align with upstream style : dt-bindings: misc: apml-alert

@ojayanth
Copy link
Collaborator

Please ensure your commit message style aligns with the conventions used in the relevant upstream directory

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.

4 participants