From: "Wang, Jian J" <jian.j.wang@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Ni, Ray" <ray.ni@intel.com>
Cc: "Dong, Eric" <eric.dong@intel.com>
Subject: Re: [edk2-devel] [PATCH 2/5] CpuException: Init global variables in-place
Date: Sun, 22 May 2022 16:32:26 +0000 [thread overview]
Message-ID: <CO1PR11MB49456D75F68BDF39161C4D4EB6D59@CO1PR11MB4945.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220520141549.108-3-ray.ni@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Regards,
Jian
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Ni, Ray
> Sent: Friday, May 20, 2022 10:16 PM
> To: devel@edk2.groups.io
> Cc: Dong, Eric <eric.dong@intel.com>
> Subject: [edk2-devel] [PATCH 2/5] CpuException: Init global variables in-place
>
> Additionally removed two useless global variables:
> "SPIN_LOCK mDisplayMessageSpinLock" from SMM instance.
> "UINTN mEnabledInterruptNum" from DXE instance.
>
> Signed-off-by: Ray Ni <ray.ni@intel.com>
> Cc: Eric Dong <eric.dong@intel.com>
> ---
> .../Library/CpuExceptionHandlerLib/DxeException.c | 11 ++++++-----
> .../Library/CpuExceptionHandlerLib/SmmException.c | 14 ++++++--------
> 2 files changed, 12 insertions(+), 13 deletions(-)
>
> diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c
> b/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c
> index 5083c4b8e8..da5b96d6c6 100644
> --- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c
> +++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c
> @@ -16,9 +16,12 @@ CONST UINTN mDoFarReturnFlag = 0;
>
>
> RESERVED_VECTORS_DATA mReservedVectorsData[CPU_EXCEPTION_NUM];
>
> EFI_CPU_INTERRUPT_HANDLER
> mExternalInterruptHandlerTable[CPU_EXCEPTION_NUM];
>
> -UINTN mEnabledInterruptNum = 0;
>
> -
>
> -EXCEPTION_HANDLER_DATA mExceptionHandlerData;
>
> +EXCEPTION_HANDLER_DATA mExceptionHandlerData = {
>
> + 0, // To be fixed
>
> + 0, // To be fixed
>
> + mReservedVectorsData,
>
> + mExternalInterruptHandlerTable
>
> +};
>
>
>
> UINT8 mNewStack[CPU_STACK_SWITCH_EXCEPTION_NUMBER *
>
> CPU_KNOWN_GOOD_STACK_SIZE];
>
> @@ -62,8 +65,6 @@ InitializeCpuExceptionHandlers (
> IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL
>
> )
>
> {
>
> - mExceptionHandlerData.ReservedVectors = mReservedVectorsData;
>
> - mExceptionHandlerData.ExternalInterruptHandler =
> mExternalInterruptHandlerTable;
>
> InitializeSpinLock (&mExceptionHandlerData.DisplayMessageSpinLock);
>
> return InitializeCpuExceptionHandlersWorker (VectorInfo,
> &mExceptionHandlerData);
>
> }
>
> diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c
> b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c
> index 77ee74579f..9f0af4120a 100644
> --- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c
> +++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c
> @@ -11,14 +11,14 @@
>
>
> CONST UINTN mDoFarReturnFlag = 1;
>
>
>
> -//
>
> -// Spin lock for CPU information display
>
> -//
>
> -SPIN_LOCK mDisplayMessageSpinLock;
>
> -
>
> RESERVED_VECTORS_DATA mReservedVectorsData[CPU_EXCEPTION_NUM];
>
> EFI_CPU_INTERRUPT_HANDLER
> mExternalInterruptHandlerTable[CPU_EXCEPTION_NUM];
>
> -EXCEPTION_HANDLER_DATA mExceptionHandlerData;
>
> +EXCEPTION_HANDLER_DATA mExceptionHandlerData = {
>
> + 0, // To be fixed
>
> + 0, // To be fixed
>
> + mReservedVectorsData,
>
> + mExternalInterruptHandlerTable
>
> +};
>
>
>
> /**
>
> Common exception handler.
>
> @@ -58,8 +58,6 @@ InitializeCpuExceptionHandlers (
> IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL
>
> )
>
> {
>
> - mExceptionHandlerData.ReservedVectors = mReservedVectorsData;
>
> - mExceptionHandlerData.ExternalInterruptHandler =
> mExternalInterruptHandlerTable;
>
> InitializeSpinLock (&mExceptionHandlerData.DisplayMessageSpinLock);
>
> return InitializeCpuExceptionHandlersWorker (VectorInfo,
> &mExceptionHandlerData);
>
> }
>
> --
> 2.35.1.windows.2
>
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#89917): https://edk2.groups.io/g/devel/message/89917
> Mute This Topic: https://groups.io/mt/91231768/1768734
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [jian.j.wang@intel.com]
> -=-=-=-=-=-=
>
next prev parent reply other threads:[~2022-05-22 16:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-20 14:15 [PATCH 0/5] Code refactoring in CpuExceptionHandlerLib Ni, Ray
2022-05-20 14:15 ` [PATCH 1/5] CpuException: Avoid allocating code pages for DXE instance Ni, Ray
2022-05-22 16:40 ` [edk2-devel] " Wang, Jian J
2022-05-24 8:01 ` Ni, Ray
2022-05-24 15:18 ` Wang, Jian J
2022-06-06 7:46 ` Dong, Eric
2022-05-20 14:15 ` [PATCH 2/5] CpuException: Init global variables in-place Ni, Ray
2022-05-22 16:32 ` Wang, Jian J [this message]
2022-06-06 7:46 ` Dong, Eric
2022-05-20 14:15 ` [PATCH 3/5] CpuException: Avoid allocating page but using global variables Ni, Ray
2022-05-22 16:30 ` [edk2-devel] " Wang, Jian J
2022-06-06 7:47 ` Dong, Eric
2022-05-20 14:15 ` [PATCH 4/5] CpuException: Remove InitializeCpuInterruptHandlers Ni, Ray
2022-05-22 16:27 ` [edk2-devel] " Wang, Jian J
2022-05-24 8:04 ` Ni, Ray
2022-05-24 15:17 ` Wang, Jian J
2022-06-06 7:47 ` Dong, Eric
2022-05-20 14:15 ` [PATCH 5/5] CpuException: Add InitializeSeparateExceptionStacks Ni, Ray
2022-05-22 16:05 ` Wang, Jian J
2022-06-06 7:47 ` Dong, Eric
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=CO1PR11MB49456D75F68BDF39161C4D4EB6D59@CO1PR11MB4945.namprd11.prod.outlook.com \
--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