public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Yuanhao Xie" <yuanhao.xie@intel.com>
To: devel@edk2.groups.io
Cc: Guo Dong <guo.dong@intel.com>, Ray Ni <ray.ni@intel.com>,
	Sean Rhodes <sean@starlabs.systems>,
	James Lu <james.lu@intel.com>, Gua Guo <gua.guo@intel.com>
Subject: [Patch V4 1/8] UefiCpuPkg: Check AP_SAFE_STACK_SIZE during build time.
Date: Wed,  1 Mar 2023 14:09:47 +0800	[thread overview]
Message-ID: <20230301060954.1464-2-yuanhao.xie@intel.com> (raw)
In-Reply-To: <20230301060954.1464-1-yuanhao.xie@intel.com>

Check if AP_SAFE_STACK_SIZE is aligned with CPU_STACK_ALIGNMENT
during build time.

No functional or structural changes.

Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Cc: James Lu <james.lu@intel.com>
Cc: Gua Guo <gua.guo@intel.com>
Signed-off-by: Yuanhao Xie <yuanhao.xie@intel.com>
---
 UefiCpuPkg/Library/MpInitLib/MpLib.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.h b/UefiCpuPkg/Library/MpInitLib/MpLib.h
index f5086e497e..a73a89d2a5 100644
--- a/UefiCpuPkg/Library/MpInitLib/MpLib.h
+++ b/UefiCpuPkg/Library/MpInitLib/MpLib.h
@@ -1,7 +1,7 @@
 /** @file
   Common header file for MP Initialize Library.
 
-  Copyright (c) 2016 - 2022, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2016 - 2023, Intel Corporation. All rights reserved.<BR>
   Copyright (c) 2020, AMD Inc. All rights reserved.<BR>
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -311,6 +311,7 @@ typedef struct {
 
 #define AP_SAFE_STACK_SIZE   128
 #define AP_RESET_STACK_SIZE  AP_SAFE_STACK_SIZE
+STATIC_ASSERT ((AP_SAFE_STACK_SIZE & (CPU_STACK_ALIGNMENT - 1)) == 0, "AP_SAFE_STACK_SIZE is not aligned with CPU_STACK_ALIGNMENT");
 
 #pragma pack(1)
 
-- 
2.36.1.windows.1


  reply	other threads:[~2023-03-01  6:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01  6:09 [Patch V4 0/8] Put APs in 64 bit mode before handoff to OS Yuanhao Xie
2023-03-01  6:09 ` Yuanhao Xie [this message]
2023-03-01  6:09 ` [Patch V4 2/8] UefiCpuPkg: Split the path in RelocateApLoop into two Yuanhao Xie
2023-03-01  6:09 ` [Patch V4 3/8] UefiCpuPkg: Allocate contiguous memory for stacks and APs loop Yuanhao Xie
2023-03-01  6:09 ` [Patch V4 4/8] OvmfPkg: Add CpuPageTableLib required by MpInitLib Yuanhao Xie
2023-03-01  6:09 ` [Patch V4 5/8] UefiPayloadPkg: " Yuanhao Xie
2023-03-01  6:09 ` [Patch V4 6/8] UefiCpuPkg: Put APs in 64 bit mode before handoff to OS Yuanhao Xie
2023-03-01  6:09 ` [Patch V4 7/8] UefiCpuPkg: Rename AsmRelocateApLoopStart Yuanhao Xie
2023-03-01  6:09 ` [Patch V4 8/8] UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm Yuanhao Xie
2023-03-01  6:40 ` [edk2-devel] [Patch V4 0/8] Put APs in 64 bit mode before handoff to OS Gerd Hoffmann
2023-03-07  7:00 ` Ni, Ray

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=20230301060954.1464-2-yuanhao.xie@intel.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