From patchwork Sat Nov 19 08:38:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gary guo X-Patchwork-Id: 83109 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp508869qge; Sat, 19 Nov 2016 01:12:30 -0800 (PST) X-Received: by 10.55.97.194 with SMTP id v185mr5352657qkb.80.1479546750394; Sat, 19 Nov 2016 01:12:30 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 1si7699147qko.250.2016.11.19.01.12.30; Sat, 19 Nov 2016 01:12:30 -0800 (PST) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 122FF609BD; Sat, 19 Nov 2016 09:12:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2 autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 2248E63533; Sat, 19 Nov 2016 08:48:26 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id EB36160CAE; Sat, 19 Nov 2016 08:47:05 +0000 (UTC) Received: from mail-pg0-f44.google.com (mail-pg0-f44.google.com [74.125.83.44]) by lists.linaro.org (Postfix) with ESMTPS id 6E21A60CC3 for ; Sat, 19 Nov 2016 08:40:57 +0000 (UTC) Received: by mail-pg0-f44.google.com with SMTP id x23so108604828pgx.1 for ; Sat, 19 Nov 2016 00:40:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pxbOBEddYRO8LEsH0ZqPLmYEaRbYWyZ/PDhvyfL/6lI=; b=IME9dTPkBiINEPhIQWVd3W1PWlkALbE5Kra6Za5/0ICGYoXdrgGmdSWG3YulfCrTYU /HseA1sZldpDAUtCxg7SjlHb5kE/Yy4yjJ4D88LHIe7r+T2bt0wALkjzYnt7ddUx3E2a DZcZcLuIgCZ09yS+5TWKJMbuCJWk9ZUrGUsPKhBKmeWYfuGwBPLNvYJXv2bXQhgO8jFL NqZvqpcjBFaPqZIlmiDldpLAlph9Wqb1mCNQ7givTvh5vkU+bngcf99uIvTOr0oReXXH VvfXZMR/fM7IQSwmnr9T69Da55CLba1JY3CUhtKmesCxvYrDdt8pYIH3E3Lo96XO5fam DFaw== X-Gm-Message-State: AKaTC01kLu6TU0883ClUTDkcu1AaqXGjGod8Qi1iLQCsa7GOGsjOEyqHuEUDOEYsKsdijMU+6F4= X-Received: by 10.99.171.65 with SMTP id k1mr8366879pgp.87.1479544856757; Sat, 19 Nov 2016 00:40:56 -0800 (PST) Received: from localhost.localdomain ([119.145.15.121]) by smtp.gmail.com with ESMTPSA id v193sm5106241pgb.37.2016.11.19.00.40.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 19 Nov 2016 00:40:56 -0800 (PST) From: Heyi Guo To: linaro-uefi@lists.linaro.org Date: Sat, 19 Nov 2016 16:38:04 +0800 Message-Id: <1479544691-59575-50-git-send-email-heyi.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1479544691-59575-1-git-send-email-heyi.guo@linaro.org> References: <1479544691-59575-1-git-send-email-heyi.guo@linaro.org> Subject: [Linaro-uefi] [Patch v4 49/56] Hisilicon/SMBIOS: Update ProcessorID from MIDR X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" There is no register restore processor id at ARM Platform,we talked with ARM Charles and made a agreement that we can use MIDR instead,maybe there will be a specific register to read the processor id in future. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo Reviewed-by: Leif Lindholm Reviewed-by: Charles Garcia-Tobin --- .../Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Chips/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c b/Chips/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c index 07dae5f..005d28f 100644 --- a/Chips/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c +++ b/Chips/Hisilicon/Drivers/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c @@ -490,6 +490,7 @@ AddSmbiosProcessorTypeTable ( CHAR16 *CpuVersion; STRING_REF TokenToUpdate; + UINT64 *ProcessorId; Type4Record = NULL; ProcessorManuStr = NULL; ProcessorVersionStr = NULL; @@ -614,6 +615,8 @@ AddSmbiosProcessorTypeTable ( Type4Record->ProcessorCharacteristics = ProcessorCharacteristics.Data; Type4Record->ExternalClock = (UINT16)(ArmReadCntFrq() / 1000 / 1000); + ProcessorId = (UINT64 *)&(Type4Record->ProcessorId); + *ProcessorId = ArmReadMidr(); OptionalStrStart = (CHAR8 *) (Type4Record + 1); UnicodeStrToAsciiStr (ProcessorSocketStr, OptionalStrStart);