From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::236; helo=mail-wm0-x236.google.com; envelope-from=paolo.bonzini@gmail.com; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3A25421F3882E for ; Thu, 12 Oct 2017 14:37:16 -0700 (PDT) Received: by mail-wm0-x236.google.com with SMTP id q124so16634979wmb.0 for ; Thu, 12 Oct 2017 14:40:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=CTig1RS+YTBwyC95mH0YkuvgkL3ky2xTUdkCo9YRgNQ=; b=Sipiw/VpOLXdkVtA6XQb3g/mysHpEiSrYP07Oi4wKeT4oODiRm51IV8ea0fms/bsKu GTQ3I5T8TLLUH3Z+iQp0bJ74+OoZgeRgvTFffNaba8Hd9gvq/rh5PcjYc2/n8poLlFjf JoCW1IlIUaq096CqYHOvlrTTO0u1NZ5UYof9JB56Fumvawqdo+kWv9c1ZOrrrJD32KP5 QegXzd+2qsCng9B5JzCiA24Mk9iNdhvgdP+1ADQt+P07v9SrvjuJ51BB7JlwbXM5+fPe 6ARpim0qF+dCbBAvgfng9f84tzMvjLq3tF+j9aEGJ09TUfjwDOhMwNpkYmc/J6UaC3tT ALog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=CTig1RS+YTBwyC95mH0YkuvgkL3ky2xTUdkCo9YRgNQ=; b=Yi7gcB+WMsk9fL6baexibFLJhQo+NMz3nSn3ZOMU9skN3DvRAdrlF4bHusSlSIvnmV 7ry95sJFNb+AdywkeNfG6d9Jy6e+p1Lei4qz1Gu33LGj6rR/sGylwhfZhNHozt0tyxNO 2MO4XXwGR6kSIhDcFNaC1muyqAMu5qHgHYd91vJ+wIb4mLf+JTGrk9Yy2B+PqNcjYhgZ 9mKXknBX6NopOSg5h5VxBNtcAMuBtwCd9DcBN8Q32xdcnU79JQX4ptMCVdFhzdBX7Fox 9GRv9nkb8bAZgbzHWR1P4dOGHXOQLfvN2TWo8xjyrMX8VwFqjDHy8X0RbuRPudIkAFpW BeuQ== X-Gm-Message-State: AMCzsaXwd24bXFgjjBXww5XUmIfOA47HXgNKZmadAxTSMwrPRxmpd8sW y79FoS8tIOSFjGEEkpsm28A= X-Google-Smtp-Source: AOwi7QCuVOZqgUXyKkfKqSV9Mo+YyL9YSn9qcH4Zl0xrvg1OXmiaTw6izwnhSQUXe0cr37hiRUpvYQ== X-Received: by 10.223.156.139 with SMTP id d11mr3101910wre.214.1507844445771; Thu, 12 Oct 2017 14:40:45 -0700 (PDT) Received: from [192.168.10.165] (94-36-246-2.adsl-ull.clienti.tiscali.it. [94.36.246.2]) by smtp.googlemail.com with ESMTPSA id a34sm36692311wra.64.2017.10.12.14.40.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Oct 2017 14:40:43 -0700 (PDT) Sender: Paolo Bonzini To: Leo Duran , edk2-devel@lists.01.org Cc: Ruiyu Ni , Jordan Justen , Liming Gao , Jiewen Yao , Michael D Kinney References: <1507751131-32404-1-git-send-email-leo.duran@amd.com> <1507751131-32404-2-git-send-email-leo.duran@amd.com> From: Paolo Bonzini Message-ID: <3d6feb63-0a4f-ed3f-b28e-8a88ed7a40af@redhat.com> Date: Thu, 12 Oct 2017 23:40:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1507751131-32404-2-git-send-email-leo.duran@amd.com> Subject: Re: [PATCH v5 1/2] UefiCpuPkg/SmmCpuFeaturesLib: Use global variables to replace macros X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Oct 2017 21:37:16 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 11/10/2017 21:45, Leo Duran wrote: > + // Override PSD offset for AMD > + // > + if (SmmStandardSignatureIsAuthenticAMD ()) { > + gStmPsdOffset = AMD_SMM_PSD_OFFSET; > + } > + I think the right thing to do here would be to use the SMM state save map revision; in the case of AMD, the low 16 bits (IIRC) would be 0x0064. Paolo