* About the way of exception registration
@ 2023-04-04 10:14 Chao Li
0 siblings, 0 replies; only message in thread
From: Chao Li @ 2023-04-04 10:14 UTC (permalink / raw)
To: devel, Michael D Kinney, Liming Gao, ray.ni, Sunil V L,
andrei.warkentin
[-- Attachment #1: Type: text/plain, Size: 1561 bytes --]
Hi all,
I'm going porting LoongArch64 to UefiCpuPkg and OvmfPkg. A problem is
blocked me that EFI_CPU_ARCH_PROTOCOL only provides interrupt register
method, no exception register method.
I found that RISC-V hase the same issue, Andrei modified DebugSupport.h
to fix it, commitid:69da506c927f8092ea8f783a092a694a3582e3ef. But this
way may be not comply with UEFI SPEC, because in section 18 of UEFI
SPEC, different architectures have been defined interupt types and
exception types, and modifications like Andrei's will cause the UEFI
SPEC and DebugSupport.h content to not match.
I also checked in AARCH64, they don't have this problem, because in
AARCH64(ARM) uses synchronous exception, this exception is CPU internal
exeption entry point, different type can separated by this entry point.
So they just register this synchronous exception is fine, and the
exception filtering will be handled by the synchronous exception handler.
I think we need a way to reigster the exception, because some
architectures like RISC-V and LoongArch don't have synchronous
exception, and some one want to register exceptions to do some
different. Can we add exception registration method at the end of
EFI_CPU_ARCH_PROTOCOL? If not, I think there is only a modifcation like
Andrei's, when the interrupt type and exception type use same numbers,
put a flag in the highest bit to distinguish them. But I don't think
this way is very suitable, just like above I talk about.
Hope to know your thoughts and look forward to hearing from you!
Thanks,
Chao
[-- Attachment #2: Type: text/html, Size: 2360 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-04-04 10:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-04 10:14 About the way of exception registration Chao Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox