From: "Chao Li" <lichao@loongson.cn>
To: devel@edk2.groups.io,
Michael D Kinney <michael.d.kinney@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
ray.ni@intel.com, Sunil V L <sunilvl@ventanamicro.com>,
andrei.warkentin@intel.com
Subject: About the way of exception registration
Date: Tue, 4 Apr 2023 18:14:42 +0800 [thread overview]
Message-ID: <59bad058-81fc-cd19-b5f0-f9214d7816a8@loongson.cn> (raw)
[-- 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 --]
reply other threads:[~2023-04-04 10:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=59bad058-81fc-cd19-b5f0-f9214d7816a8@loongson.cn \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox