From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.92.67.62; helo=eur02-am5-obe.outbound.protection.outlook.com; envelope-from=marvin.haeuser@outlook.com; receiver=edk2-devel@lists.01.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-oln040092067062.outbound.protection.outlook.com [40.92.67.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A6994203B8585 for ; Tue, 8 May 2018 16:36:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=zpEfpMF+RmBMIFfslcapHrKs8m8dixucNvJFGnm58Nc=; b=i/9aVBJ+3wsupzljF1s+oQ/EH9xocgtZkx0CSW1tL/0zsOuJc3DOXZF3OjDQi4Ns/Sd7Ep7bOUratkfFYBLOF4HJOQwwZu21/0WCkqYBDE0gNZiXtGoJ8j953jSYl83GQeEsNdoLkYHtTqyVA7hLQKd5r5lVdGwaZ6bpBxYmgyJ+Oq9bOaFcHcWh2rJaQxWTw+hrq8/isM251U+j5WuUf7JpFJs9bXDmnYaCsItiOKzDs0ObCvr6MQJkRVj9ppYL1JJrMEyl9q301sA4KWsE63rYzn0wcPkuTsFMpRxTh3LfMUSac/sc2UxYqOe6+X9bA22LuypmeGCnCBQ5R58ynQ== Received: from HE1EUR02FT056.eop-EUR02.prod.protection.outlook.com (10.152.10.51) by HE1EUR02HT052.eop-EUR02.prod.protection.outlook.com (10.152.11.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.735.16; Tue, 8 May 2018 23:36:46 +0000 Received: from VI1PR0801MB1790.eurprd08.prod.outlook.com (10.152.10.59) by HE1EUR02FT056.mail.protection.outlook.com (10.152.11.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.20.735.16 via Frontend Transport; Tue, 8 May 2018 23:36:46 +0000 Received: from VI1PR0801MB1790.eurprd08.prod.outlook.com ([fe80::7c79:584b:2e12:783e]) by VI1PR0801MB1790.eurprd08.prod.outlook.com ([fe80::7c79:584b:2e12:783e%17]) with mapi id 15.20.0755.012; Tue, 8 May 2018 23:36:46 +0000 From: =?iso-8859-1?Q?Marvin_H=E4user?= To: "edk2-devel@lists.01.org" CC: "Gao, Liming" Thread-Topic: [PATCH] MdePkg/BaseLib: Globally include ChkStk.c Thread-Index: AdPnJWlKcshriHOETXuZ755wb8JLiw== Date: Tue, 8 May 2018 23:36:46 +0000 Message-ID: Accept-Language: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:FE99C887F2A6918583603946514D5BA25D7CB656B86E0FCC45B4C0DD63F62228; UpperCasedChecksum:1C64C5E5F8E4AEAB59DD12B56247A3C2E6648BCC7262BD72AF8C83743F484096; SizeAsReceived:6938; Count:44 x-tmn: [0KGdprNyqo1TRg9ROO9sS1ENBeCIpMXX] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1EUR02HT052; 7:V9sNscwVJYzBPuNFl+3esuuUHx+Xc5uSdLtY52bewOyGECjjm7yRjnsAmHZqt0gldX9R+ZlzWXaDcWZGmNLtmgKKdDPptm8lPRG/4UTmjLauYaDQZYDcYJNkPOwoQywNrA8Ec7UQNoDgjZVxB24iRPvixzPl0JvO7iu7sAC2NZmppuXBgPjTz5OFfcsK+4QeRzDTBaklorcnm4VZxLWORjUpU3AKgEo8vL+1VU4Upd5p8HXuTKaDezwSsUdTUxZp x-incomingheadercount: 44 x-eopattributedmessage: 0 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1601125420)(1603101448)(1701031045); SRVR:HE1EUR02HT052; x-ms-traffictypediagnostic: HE1EUR02HT052: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(444000031); SRVR:HE1EUR02HT052; BCL:0; PCL:0; RULEID:; SRVR:HE1EUR02HT052; x-forefront-prvs: 0666E15D35 x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(199004)(189003)(13464003)(3280700002)(74316002)(6436002)(104016004)(3660700001)(1720100001)(82202002)(2900100001)(72206003)(229853002)(966005)(33656002)(2501003)(14454004)(45080400002)(25786009)(87572001)(97736004)(105586002)(2351001)(6916009)(5250100002)(4326008)(68736007)(55016002)(5640700003)(8936002)(20460500001)(426003)(5660300001)(53546011)(486006)(102836004)(99286004)(86362001)(6246003)(81156014)(305945005)(8676002)(6306002)(106356001)(6346003)(7696005)(26005)(53376002)(476003)(19627235001); DIR:OUT; SFP:1901; SCL:1; SRVR:HE1EUR02HT052; H:VI1PR0801MB1790.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:; received-spf: None (protection.outlook.com: outlook.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Marvin.Haeuser@outlook.com; x-microsoft-antispam-message-info: HdJ3eiIhV6mJ3Q8AiM1BJAVtfgrqcSLN7bem7egrWztlhXwW+4JmG4VWbaDfT7FoZOU5fcjlJal8CzkiZ6rI/t4B5ezYBCjPjP8QuiyqaQGhoWgySFnRQAsFqANgn7Kglss1/hw1Tq3oxN00QCxDFv7VNcd1QMFJrNiu3skBMhQD2PGiA26Y5FkAFwGvYoCv MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: dee0f3cf-d598-430c-c64a-08d5b53c9082 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-Network-Message-Id: dee0f3cf-d598-430c-c64a-08d5b53c9082 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-originalarrivaltime: 08 May 2018 23:36:46.9322 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR02HT052 Subject: Re: [PATCH] MdePkg/BaseLib: Globally include ChkStk.c X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 May 2018 23:36:52 -0000 Content-Language: de-DE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hey Liming, According to the MSDN documentation, the call will be inserted for a stack = usage past a defined threshold - 4 KB for IA32, 8 KB for X64 (source: https= ://msdn.microsoft.com/en-us/library/ms648426(v=3Dvs.85).aspx). Thanks, Marvin > -----Urspr=FCngliche Nachricht----- > Von: Gao, Liming > Gesendet: Montag, 7. Mai 2018 14:16 > An: Marvin.Haeuser@outlook.com; edk2-devel@lists.01.org > Cc: Kinney, Michael D > Betreff: RE: [PATCH] MdePkg/BaseLib: Globally include ChkStk.c >=20 > Marvin: > In VS compiler, what case will trig this intrinsic function? >=20 > Thanks > Liming > > -----Original Message----- > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > > Marvin H?user > > Sent: Saturday, May 5, 2018 10:25 PM > > To: edk2-devel@lists.01.org > > Cc: Kinney, Michael D ; Gao, Liming > > > > Subject: [edk2] [PATCH] MdePkg/BaseLib: Globally include ChkStk.c > > > > Initially added for GCC build support, this patch includes the > > function for all compilers and all architectures. This is done as huge > > variables on the stack may cause the generation of calls to this > > intrinsic function for Microsoft compilers, even for the IA32 > > architecture, too. > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Marvin Haeuser > > --- > > MdePkg/Library/BaseLib/{ChkStkGcc.c =3D> ChkStk.c} | 48 ++++++++++----= -- > ---- > > MdePkg/Library/BaseLib/BaseLib.inf | 4 +- > > 2 files changed, 26 insertions(+), 26 deletions(-) > > > > diff --git a/MdePkg/Library/BaseLib/ChkStkGcc.c > > b/MdePkg/Library/BaseLib/ChkStk.c similarity index 74% rename from > > MdePkg/Library/BaseLib/ChkStkGcc.c > > rename to MdePkg/Library/BaseLib/ChkStk.c index > > ecba3853b159..59e6d73f9331 100644 > > --- a/MdePkg/Library/BaseLib/ChkStkGcc.c > > +++ b/MdePkg/Library/BaseLib/ChkStk.c > > @@ -1,24 +1,24 @@ > > -/** @file > > - Provides hack function for passng GCC build. > > - > > - Copyright (c) 2006 - 2008, Intel Corporation. All rights > > reserved.
> > - This program and the accompanying materials > > - are licensed and made available under the terms and conditions of > > the BSD License > > - which accompanies this distribution. The full text of the license > > may be found at > > - http://opensource.org/licenses/bsd-license.php. > > - > > - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" > > BASIS, > > - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER > EXPRESS OR IMPLIED. > > - > > -**/ > > - > > -#include "BaseLibInternals.h" > > - > > -/** > > - Hack function for passing GCC build. > > -**/ > > -VOID > > -__chkstk() > > -{ > > -} > > - > > +/** @file > > + Provides hack function for passing build. > > + > > + Copyright (c) 2006 - 2018, Intel Corporation. All rights > > + reserved.
This program and the accompanying materials are > > + licensed and made available under the terms and conditions of the > > + BSD License which accompanies this distribution. The full text of > > + the license may be found at http://opensource.org/licenses/bsd- > license.php. > > + > > + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" > > + BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, > EITHER EXPRESS OR IMPLIED. > > + > > +**/ > > + > > +#include "BaseLibInternals.h" > > + > > +/** > > + Hack function for passing build. > > +**/ > > +VOID > > +__chkstk() > > +{ > > +} > > + > > diff --git a/MdePkg/Library/BaseLib/BaseLib.inf > > b/MdePkg/Library/BaseLib/BaseLib.inf > > index 5fbbd02a94b6..d23a6db2581a 100644 > > --- a/MdePkg/Library/BaseLib/BaseLib.inf > > +++ b/MdePkg/Library/BaseLib/BaseLib.inf > > @@ -1,7 +1,7 @@ > > ## @file > > # Base Library implementation. > > # > > -# Copyright (c) 2007 - 2016, Intel Corporation. All rights > > reserved.
> > +# Copyright (c) 2007 - 2018, Intel Corporation. All rights > > +reserved.
> > # Portions copyright (c) 2008 - 2009, Apple Inc. All rights > > reserved.
# Portions copyright (c) 2011 - 2013, ARM Ltd. All > > rights reserved.
# @@ -64,6 +64,7 @@ [Sources] > > SafeString.c > > String.c > > FilePaths.c > > + ChkStk.c > > BaseLibInternals.h > > > > [Sources.Ia32] > > @@ -781,7 +782,6 @@ [Sources.X64] > > X64/DisableCache.S | GCC > > X64/RdRand.nasm| GCC > > X64/RdRand.S | GCC > > - ChkStkGcc.c | GCC > > > > [Sources.IPF] > > Ipf/AccessGp.s > > -- > > 2.17.0.windows.1 > > > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel