From nobody Mon Dec 23 13:53:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 15155663113531015.0097474174013; Tue, 9 Jan 2018 22:38:31 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 4F0D62236BAAC; Tue, 9 Jan 2018 22:33:17 -0800 (PST) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (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 0E5592220D204 for ; Tue, 9 Jan 2018 22:33:15 -0800 (PST) Received: by mail-wm0-x242.google.com with SMTP id a79so24771599wma.0 for ; Tue, 09 Jan 2018 22:38:27 -0800 (PST) Received: from localhost.localdomain ([2a02:908:5a9:8400:5ec8:3210:9b68:c91c]) by smtp.gmail.com with ESMTPSA id r9sm15673299wrg.74.2018.01.09.22.38.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jan 2018 22:38:24 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::242; helo=mail-wm0-x242.google.com; envelope-from=sigmaepsilon92@gmail.com; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=mTrrCpXTlnS/iCYsBM69vkZymRnye+0NnA0A5jttI1I=; b=oyCLE4CLVP3vfgbvJTonx26XOHORzJsua8VYgy0Z2VlUpdoCi0a7eo1XpQFgtahVjD DNMf00mOMBX78IR3c/lTUw0HGqhOJZd32bWMurkHu4vffVmNxAv1+hvYJ9+qpgWxeXDN dxzqabRnvdTQ8WO+DWgzXFhER23PrYSCEkULfraSnQ46jhza/3Yy5dp4vIYVRHHLp2J9 UPct+GUSrQzN8/kL6D24fL4SOMWlRuOaj3ACRWNosZ73ZCq+J4ppiwe6qNtlgd0FLqaY VgThMjZIMswd6PO1HudIhh5grde/8yzRu0jKnj1SteFZ0hMcYabo1YDAVNcPbflsjYeO d7xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=mTrrCpXTlnS/iCYsBM69vkZymRnye+0NnA0A5jttI1I=; b=FNB5H4SWbzNUqKnFuS4knehKSAhcSqpABOZMV4/s4jiwA7BoeJTw+1TDZsv4akw4m5 5u4opji+Vqnp5JQ7XG8E5Cdf5bnalUyEMTi/3dv/MB89RU8XHrQJ7s3yrV2Pnr0x0wM9 mbkqcL7rJUWiYHUUc0h0hlV893bPk2GFP1tudCn8hgzjDdb4LWwlJFfVbwAv0Q6v2lBi 4Tq2QCVUEHe1iEjKYQL1fkEWfaFGeOzgsHX7db8hEEbcLfcZzRPDsgEJx94DC3ou487W ug1PSAE7pX6OZjBzCw1ii8Asz9441V745sa4kcEywpcPuzOKaezCdhmqxQZQIOVGXEYy dv1A== X-Gm-Message-State: AKGB3mLbGmrb+pNALyvk7/RdMVTibG4Mb6szGkpcNA4gZVZ7wsqpUy+j X3gOjuCrQRgAPPBh7AWCXu6kUIGt X-Google-Smtp-Source: ACJfBotcTCmSQXFmAVF1Ie7EGE37IlNxyPBxYj7zoWrC3M9Twdzbn9EL7YAkcJFMsbkRo0m6vIdo+w== X-Received: by 10.28.19.210 with SMTP id 201mr14536370wmt.79.1515566305485; Tue, 09 Jan 2018 22:38:25 -0800 (PST) From: Michael Zimmermann To: edk2-devel@lists.01.org Date: Wed, 10 Jan 2018 07:38:23 +0100 Message-Id: <20180110063823.19911-1-sigmaepsilon92@gmail.com> X-Mailer: git-send-email 2.15.1 Subject: [edk2] [PATCH] ArmPkg/Library/ArmLib: add ArmWriteSctlr X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Leif Lindholm , Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Computed bodyhash is different from the expected one) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This currently isn't needed by anything in the edk2 tree but it's useful for externally maintained platforms which have to set this register e.g. to disable alignment aborts. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael Zimmermann --- ArmPkg/Include/Library/ArmLib.h | 6 ++++++ ArmPkg/Library/ArmLib/Arm/ArmLibSupport.S | 4 ++++ ArmPkg/Library/ArmLib/Arm/ArmLibSupport.asm | 3 +++ 3 files changed, 13 insertions(+) diff --git a/ArmPkg/Include/Library/ArmLib.h b/ArmPkg/Include/Library/ArmLi= b.h index 24e84c7a1965..ffda50e9d767 100644 --- a/ArmPkg/Include/Library/ArmLib.h +++ b/ArmPkg/Include/Library/ArmLib.h @@ -558,6 +558,12 @@ ArmReadSctlr ( VOID ); =20 +VOID +EFIAPI +ArmWriteSctlr ( + IN UINT32 Value + ); + UINTN EFIAPI ArmReadHVBar ( diff --git a/ArmPkg/Library/ArmLib/Arm/ArmLibSupport.S b/ArmPkg/Library/Arm= Lib/Arm/ArmLibSupport.S index a0b5ed500298..149b57e059ee 100644 --- a/ArmPkg/Library/ArmLib/Arm/ArmLibSupport.S +++ b/ArmPkg/Library/ArmLib/Arm/ArmLibSupport.S @@ -153,6 +153,10 @@ ASM_FUNC(ArmReadSctlr) mrc p15, 0, r0, c1, c0, 0 @ Read SCTLR into R0 (Read control re= gister configuration data) bx lr =20 +ASM_FUNC(ArmWriteSctlr) + mcr p15, 0, r0, c1, c0, 0 + bx lr + ASM_FUNC(ArmReadCpuActlr) mrc p15, 0, r0, c1, c0, 1 bx lr diff --git a/ArmPkg/Library/ArmLib/Arm/ArmLibSupport.asm b/ArmPkg/Library/A= rmLib/Arm/ArmLibSupport.asm index 85b0feee20d4..219140c22b13 100644 --- a/ArmPkg/Library/ArmLib/Arm/ArmLibSupport.asm +++ b/ArmPkg/Library/ArmLib/Arm/ArmLibSupport.asm @@ -155,6 +155,9 @@ mrc p15, 0, r0, c1, c0, 0 // Read SCTLR into R0 (Read control r= egister configuration data) bx lr =20 + RVCT_ASM_EXPORT ArmWriteSctlr + mcr p15, 0, r0, c1, c0, 0 + bx lr =20 RVCT_ASM_EXPORT ArmReadCpuActlr mrc p15, 0, r0, c1, c0, 1 --=20 2.15.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel