]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg: Check AP_SAFE_STACK_SIZE during build time.
authorXie, Yuanhao <yuanhao.xie@intel.com>
Wed, 1 Mar 2023 06:09:47 +0000 (14:09 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 7 Mar 2023 08:14:59 +0000 (08:14 +0000)
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>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
UefiCpuPkg/Library/MpInitLib/MpLib.h

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