public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ray" <ray.ni@intel.com>
To: "Kuo, Ted" <ted.kuo@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Chiu, Chasel" <chasel.chiu@intel.com>,
	"Desimone, Nathaniel L" <nathaniel.l.desimone@intel.com>,
	"S, Ashraf Ali" <ashraf.ali.s@intel.com>,
	"De, Debkumar" <debkumar.de@intel.com>,
	"Han, Harry" <harry.han@intel.com>,
	"West, Catharine" <catharine.west@intel.com>
Subject: Re: [edk2-devel][PATCH v2 1/2] UefiCpuPkg: Update SEC_IDT_TABLE struct
Date: Wed, 13 Jul 2022 01:39:43 +0000	[thread overview]
Message-ID: <MWHPR11MB16318BB50DD8EDF02A88B2DC8C899@MWHPR11MB1631.namprd11.prod.outlook.com> (raw)
In-Reply-To: <ade96994a375550d247c641e2aaf115310cff906.1657618158.git.ted.kuo@intel.com>

I don't see any change comparing this against v1.

Reviewed-by: Ray Ni <ray.ni@intel.com>


> -----Original Message-----
> From: Kuo, Ted <ted.kuo@intel.com>
> Sent: Tuesday, July 12, 2022 5:31 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Ni, Ray
> <ray.ni@intel.com>; S, Ashraf Ali <ashraf.ali.s@intel.com>; De, Debkumar <debkumar.de@intel.com>; Han, Harry
> <harry.han@intel.com>; West, Catharine <catharine.west@intel.com>
> Subject: [edk2-devel][PATCH v2 1/2] UefiCpuPkg: Update SEC_IDT_TABLE struct
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3957
> The reserved IDT table size in SecCore is too small for X64. Changed the type
> of IdtTable in SEC_IDT_TABLE from UINT64 to IA32_IDT_GATE_DESCRIPTOR to have
> sufficient size reserved in IdtTable for X64. dff
> 
> Cc: Chasel Chiu <chasel.chiu@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Ashraf Ali S <ashraf.ali.s@intel.com>
> Cc: Debkumar De <debkumar.de@intel.com>
> Cc: Harry Han <harry.han@intel.com>
> Cc: Catharine West <catharine.west@intel.com>
> Signed-off-by: Ted Kuo <ted.kuo@intel.com>
> ---
>  UefiCpuPkg/SecCore/SecMain.c | 1 +
>  UefiCpuPkg/SecCore/SecMain.h | 4 ++--
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/UefiCpuPkg/SecCore/SecMain.c b/UefiCpuPkg/SecCore/SecMain.c
> index 4edf0ce972..fe03d8019a 100644
> --- a/UefiCpuPkg/SecCore/SecMain.c
> +++ b/UefiCpuPkg/SecCore/SecMain.c
> @@ -211,6 +211,7 @@ SecStartup (
> 
> 
>    IdtTableInStack.PeiService = 0;
> 
>    for (Index = 0; Index < SEC_IDT_ENTRY_COUNT; Index++) {
> 
> +    ZeroMem ((VOID *)&IdtTableInStack.IdtTable[Index], sizeof (IA32_IDT_GATE_DESCRIPTOR));
> 
>      CopyMem ((VOID *)&IdtTableInStack.IdtTable[Index], (VOID *)&mIdtEntryTemplate, sizeof (UINT64));
> 
>    }
> 
> 
> 
> diff --git a/UefiCpuPkg/SecCore/SecMain.h b/UefiCpuPkg/SecCore/SecMain.h
> index 189fcf9326..1be57c2248 100644
> --- a/UefiCpuPkg/SecCore/SecMain.h
> +++ b/UefiCpuPkg/SecCore/SecMain.h
> @@ -43,8 +43,8 @@ typedef struct _SEC_IDT_TABLE {
>    // Note: For IA32, only the 4 bytes immediately preceding IDT is used to store
> 
>    // EFI_PEI_SERVICES**
> 
>    //
> 
> -  UINT64    PeiService;
> 
> -  UINT64    IdtTable[SEC_IDT_ENTRY_COUNT];
> 
> +  UINT64                    PeiService;
> 
> +  IA32_IDT_GATE_DESCRIPTOR  IdtTable[SEC_IDT_ENTRY_COUNT];
> 
>  } SEC_IDT_TABLE;
> 
> 
> 
>  /**
> 
> --
> 2.35.3.windows.1


  reply	other threads:[~2022-07-13  1:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-12  9:30 [edk2-devel][PATCH v2 0/2] Update SEC_IDT_TABLE struct to reserve sufficient size in IdtTable for both IA32 and X64 Kuo, Ted
2022-07-12  9:30 ` [edk2-devel][PATCH v2 1/2] UefiCpuPkg: Update SEC_IDT_TABLE struct Kuo, Ted
2022-07-13  1:39   ` Ni, Ray [this message]
2022-07-12  9:30 ` [edk2-devel][PATCH v2 2/2] IntelFsp2Pkg: " Kuo, Ted
2022-07-12 18:34   ` Chiu, Chasel
2022-07-14 18:38 ` [edk2-devel][PATCH v2 0/2] Update SEC_IDT_TABLE struct to reserve sufficient size in IdtTable for both IA32 and X64 Chiu, Chasel

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=MWHPR11MB16318BB50DD8EDF02A88B2DC8C899@MWHPR11MB1631.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