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

[linux-6.6.y] efi: cper: Add Zhaoxin/Centaur ZDI/ZPI error decode #288

Merged

Conversation

leoliu-oc
Copy link
Contributor

zhaoxin inclusion
category: feature


ZPI is the interconnection interface between sockets, ZDI is the interconnection interface between dies.

ZPI is the interconnection interface between sockets, ZDI is the interconnection interface between dies.

When either zdi or zpi occurs error, it will trigger smi interrput, the smi handler will read error information from the zdi/zpi configuration space, fill it in the cper structure asscoiated with error and produce a sci or nmi interrput to notify the OS ,the OS driver will decode the cper structure to help user to annalyze the error.

Because UEFI spec does not define the section type of ZDI/ZPI error. Zhaoxin defines ZDI/ZPI errors according to the error format defined by the Generic Processor Error Section type.When the error occurs, The BIOS will fill error information in the data structure corresponding to the Generic Processor Error Section type in the smi handler.However,the error information printed by default apei driver is not easy to read.

The software has added some printed logs to make the ZDI/ZPI error information on the Zhaoxin/Centaur cpu vendor easier to read.

@deepin-ci-robot deepin-ci-robot requested a review from myml June 18, 2024 12:05
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign tsic404 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot
Copy link

Hi @leoliu-oc. Thanks for your PR.

I'm waiting for a deepin-community member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@opsiff
Copy link
Member

opsiff commented Jun 19, 2024

在arm64平台有下面的编译错误 需要解决

drivers/firmware/efi/cper.c: In function ‘cper_print_proc_generic’:
drivers/firmware/efi/cper.c:235:13: error: ‘boot_cpu_data’ undeclared (first use in this function); did you mean ‘boot_cpu_init’?
235 | if (boot_cpu_data.x86_vendor == X86_VENDOR_ZHAOXIN ||
| ^~~~~~~~~~~~~
| boot_cpu_init
drivers/firmware/efi/cper.c:235:13: note: each undeclared identifier is reported only once for each function it appears in
CC [M] drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8710b.o
drivers/firmware/efi/cper.c:235:41: error: ‘X86_VENDOR_ZHAOXIN’ undeclared (first use in this function); did you mean ‘PCI_VENDOR_ID_ZHAOXIN’?
235 | if (boot_cpu_data.x86_vendor == X86_VENDOR_ZHAOXIN ||
| ^~~~~~~~~~~~~~~~~~
| PCI_VENDOR_ID_ZHAOXIN
drivers/firmware/efi/cper.c:236:41: error: ‘X86_VENDOR_CENTAUR’ undeclared (first use in this function); did you mean ‘X86_VENDOR_ANY’?
236 | boot_cpu_data.x86_vendor == X86_VENDOR_CENTAUR)
| ^~~~~~~~~~~~~~~~~~
| X86_VENDOR_ANY
CC drivers/clocksource/arm_arch_timer.o
make[5]: *** [scripts/Makefile.build:243:drivers/firmware/efi/cper.o] 错误 1
make[4]: *** [scripts/Makefile.build:480:drivers/firmware/efi] 错误 2
make[3]: *** [scripts/Makefile.build:480:drivers/firmware] 错误 2

@leoliu-oc leoliu-oc force-pushed the linux-6.6.y-71-zdi-zpi branch from 403653f to b7b62b1 Compare July 4, 2024 07:01
@leoliu-oc
Copy link
Contributor Author

在arm64平台有下面的编译错误 需要解决

drivers/firmware/efi/cper.c: In function ‘cper_print_proc_generic’: drivers/firmware/efi/cper.c:235:13: error: ‘boot_cpu_data’ undeclared (first use in this function); did you mean ‘boot_cpu_init’? 235 | if (boot_cpu_data.x86_vendor == X86_VENDOR_ZHAOXIN || | ^~~~~~~~~~~~~ | boot_cpu_init drivers/firmware/efi/cper.c:235:13: note: each undeclared identifier is reported only once for each function it appears in CC [M] drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8710b.o drivers/firmware/efi/cper.c:235:41: error: ‘X86_VENDOR_ZHAOXIN’ undeclared (first use in this function); did you mean ‘PCI_VENDOR_ID_ZHAOXIN’? 235 | if (boot_cpu_data.x86_vendor == X86_VENDOR_ZHAOXIN || | ^~~~~~~~~~~~~~~~~~ | PCI_VENDOR_ID_ZHAOXIN drivers/firmware/efi/cper.c:236:41: error: ‘X86_VENDOR_CENTAUR’ undeclared (first use in this function); did you mean ‘X86_VENDOR_ANY’? 236 | boot_cpu_data.x86_vendor == X86_VENDOR_CENTAUR) | ^~~~~~~~~~~~~~~~~~ | X86_VENDOR_ANY CC drivers/clocksource/arm_arch_timer.o make[5]: *** [scripts/Makefile.build:243:drivers/firmware/efi/cper.o] 错误 1 make[4]: *** [scripts/Makefile.build:480:drivers/firmware/efi] 错误 2 make[3]: *** [scripts/Makefile.build:480:drivers/firmware] 错误 2

感谢指正。新版中已经处理了这个问题。

@opsiff
Copy link
Member

opsiff commented Jul 4, 2024

在arm64平台有下面的编译错误 需要解决
drivers/firmware/efi/cper.c: In function ‘cper_print_proc_generic’: drivers/firmware/efi/cper.c:235:13: error: ‘boot_cpu_data’ undeclared (first use in this function); did you mean ‘boot_cpu_init’? 235 | if (boot_cpu_data.x86_vendor == X86_VENDOR_ZHAOXIN || | ^~~~~~~~~~~~~ | boot_cpu_init drivers/firmware/efi/cper.c:235:13: note: each undeclared identifier is reported only once for each function it appears in CC [M] drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8710b.o drivers/firmware/efi/cper.c:235:41: error: ‘X86_VENDOR_ZHAOXIN’ undeclared (first use in this function); did you mean ‘PCI_VENDOR_ID_ZHAOXIN’? 235 | if (boot_cpu_data.x86_vendor == X86_VENDOR_ZHAOXIN || | ^~~~~~~~~~~~~~~~~~ | PCI_VENDOR_ID_ZHAOXIN drivers/firmware/efi/cper.c:236:41: error: ‘X86_VENDOR_CENTAUR’ undeclared (first use in this function); did you mean ‘X86_VENDOR_ANY’? 236 | boot_cpu_data.x86_vendor == X86_VENDOR_CENTAUR) | ^~~~~~~~~~~~~~~~~~ | X86_VENDOR_ANY CC drivers/clocksource/arm_arch_timer.o make[5]: *** [scripts/Makefile.build:243:drivers/firmware/efi/cper.o] 错误 1 make[4]: *** [scripts/Makefile.build:480:drivers/firmware/efi] 错误 2 make[3]: *** [scripts/Makefile.build:480:drivers/firmware] 错误 2

感谢指正。新版中已经处理了这个问题。
drivers/firmware/efi/cper.c:173:13: error: ‘cper_print_proc_generic_zdi_zpi’ defined but not used [-Werror=unused-function]
173 | static void cper_print_proc_generic_zdi_zpi(const char *pfx,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[5]: *** [scripts/Makefile.build:243:drivers/firmware/efi/cper.o] 错误 1

arm64上还有一个unused的问题 改完就应该可以了

zhaoxin inclusion
category: feature

-------------------

ZPI is the interconnection interface between sockets, ZDI is the
interconnection interface between dies.

ZPI is the interconnection interface between sockets, ZDI is the
interconnection interface between dies.

When either zdi or zpi occurs error, it will trigger smi interrput, the
smi handler will read error information from the zdi/zpi configuration
space, fill it in the cper structure asscoiated with error and produce a
sci or nmi interrput to notify the OS ,the OS driver will decode the cper
structure to help user to annalyze the error.

Because UEFI spec does not define the section type of ZDI/ZPI error.
Zhaoxin defines ZDI/ZPI errors according to the error format defined by
the Generic Processor Error Section type.When the error occurs, The BIOS
will fill error information  in the data structure corresponding to the
Generic Processor Error Section type in the smi handler.However,the error
information printed by default  apei driver is not easy to read.

The software has added some printed logs to make the ZDI/ZPI error
information on the Zhaoxin/Centaur cpu vendor easier to read.

Signed-off-by: leoliu-oc <[email protected]>
@leoliu-oc leoliu-oc force-pushed the linux-6.6.y-71-zdi-zpi branch from b7b62b1 to 82dda55 Compare July 10, 2024 08:06
@leoliu-oc
Copy link
Contributor Author

在arm64平台有下面的编译错误 需要解决
drivers/firmware/efi/cper.c: In function ‘cper_print_proc_generic’: drivers/firmware/efi/cper.c:235:13: error: ‘boot_cpu_data’ undeclared (first use in this function); did you mean ‘boot_cpu_init’? 235 | if (boot_cpu_data.x86_vendor == X86_VENDOR_ZHAOXIN || | ^~~~~~~~~~~~~ | boot_cpu_init drivers/firmware/efi/cper.c:235:13: note: each undeclared identifier is reported only once for each function it appears in CC [M] drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8710b.o drivers/firmware/efi/cper.c:235:41: error: ‘X86_VENDOR_ZHAOXIN’ undeclared (first use in this function); did you mean ‘PCI_VENDOR_ID_ZHAOXIN’? 235 | if (boot_cpu_data.x86_vendor == X86_VENDOR_ZHAOXIN || | ^~~~~~~~~~~~~~~~~~ | PCI_VENDOR_ID_ZHAOXIN drivers/firmware/efi/cper.c:236:41: error: ‘X86_VENDOR_CENTAUR’ undeclared (first use in this function); did you mean ‘X86_VENDOR_ANY’? 236 | boot_cpu_data.x86_vendor == X86_VENDOR_CENTAUR) | ^~~~~~~~~~~~~~~~~~ | X86_VENDOR_ANY CC drivers/clocksource/arm_arch_timer.o make[5]: *** [scripts/Makefile.build:243:drivers/firmware/efi/cper.o] 错误 1 make[4]: *** [scripts/Makefile.build:480:drivers/firmware/efi] 错误 2 make[3]: *** [scripts/Makefile.build:480:drivers/firmware] 错误 2

感谢指正。新版中已经处理了这个问题。
drivers/firmware/efi/cper.c:173:13: error: ‘cper_print_proc_generic_zdi_zpi’ defined but not used [-Werror=unused-function]
173 | static void cper_print_proc_generic_zdi_zpi(const char *pfx,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[5]: *** [scripts/Makefile.build:243:drivers/firmware/efi/cper.o] 错误 1

arm64上还有一个unused的问题 改完就应该可以了

该问题已经解决。还烦请再review了,谢谢。

@opsiff opsiff merged commit 781d090 into deepin-community:linux-6.6.y Jul 11, 2024
2 of 4 checks passed
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.

3 participants