From patchwork Tue Jun 21 05:07:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 70516 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp1832104qgy; Mon, 20 Jun 2016 22:14:17 -0700 (PDT) X-Received: by 10.36.43.5 with SMTP id h5mr2423440ita.57.1466486057308; Mon, 20 Jun 2016 22:14:17 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id q7si6736484paa.187.2016.06.20.22.14.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jun 2016 22:14:17 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-70826-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-70826-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-70826-patch=linaro.org@sourceware.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type; q=dns; s=default; b=gdypn Emo2AUYaFSM9QrAhggkTk/e1+0+yvnP/8XngGaIjj/M9etOdzUrZPA9KH1SQ/hvv pBcpDs8BoRQFE+oCu04pxR3CDNOPVXRKyO0vsIscJQnxLqCvw3gGIRfreNhLtp26 c8NliiH09wS7OWW/FJkx7bdSLEZt+vSZvtUPPE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type; s=default; bh=EBnOF4au+YP DVic7n9jWk49tNP4=; b=aCA4MVkLBYD1cNTIaJylMzFFQKqIzz/oIExqSA6C7QF BZ1q0b5+x49W09YDDqX1cDqvuBlEUIQsxozp0RLCEdnHAF3a/HbyDi25NfjedHDJ XTApaAKcY2C4sRoRKWMFPDvO5JckgGsS16svtzlR2d5GyM293oizh9JJ3XhotIU8 = Received: (qmail 23563 invoked by alias); 21 Jun 2016 05:13:33 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 20225 invoked by uid 89); 21 Jun 2016 05:13:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=a_type, Hx-languages-length:2746, Auxiliary X-HELO: na01-by2-obe.outbound.protection.outlook.com Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; From: Yury Norov To: , CC: , , , , , , , , , Andrew Pinski , Yury Norov Subject: [PATCH 24/27] Add support for AT_ARM64_MIDR. Date: Tue, 21 Jun 2016 08:07:08 +0300 Message-ID: <1466485631-3532-26-git-send-email-ynorov@caviumnetworks.com> In-Reply-To: <1466485631-3532-1-git-send-email-ynorov@caviumnetworks.com> References: <1466485631-3532-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-ClientProxiedBy: HE1PR03CA0040.eurprd03.prod.outlook.com (10.163.170.178) To CY1PR07MB2248.namprd07.prod.outlook.com (10.164.112.150) X-MS-Office365-Filtering-Correlation-Id: c056c449-9c89-40a0-3079-08d399929709 X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2248; 2:GmHBk7RaYfXY7KYBs9R8vZ3e/Cu59W1ntVgECEIZtx8e3gYNFA2sILuzaK6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Kh4Sk5xNeKseUqRjUHWJ34TlFnhvqSTk0qUDpLRmhjIKOno7azAaFB12WMH1EAFCiAI4I+SH9609nUtmf9yGA5Sw50nn/JiKC2FRPAyHLFR2KP X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2248; 20:YzkW212MTFzmxU08rPOprUXAZ6h5gNwsZJMfM73Yh/c3oyjO1swUUcRSKReuWS3R8lNnyPBtV5N8TVQeHX3V84TU/L5HPrahqanxOkiibNDmY8qVEP98M6H2mTkgIQfM8XMGTj27XfnMH1LgDFoCm0uXW1P9Yr04uMAV9AtMRPMfdOsVrTnsIgMZHvRYM1hj7f0U+uDzE6FO6GvxB+8gWPomDYU2CT3Nwrbcgs3ItBzRBhAxd9QQPYXUJxQM6wS4yYCN/f6MjzJa9VqEIooz/04BzcEdSJGxScsAAf7wZAa0SfUjbTJ+SeVhNIIJ42wao4XXIuQ5as+yvTQeXmmaB/u47bw1PFZsTryShc0Y5fJQi5cO+n3js7bJJWd0dDDlDtibd1CGt5Un/QMbmii+7yL0hmTR8fAaULY7nZbOHJfmReGtROrsqmnEbNoDtrntr8MnN2633WG+rr/PvHDOR+MUO5ROyHfPgtmn+3A1CsJIp4hWLMHh/WTqoYRfs9WhhED4ZcV4pH2Kn4gNkm35t1JKDlkHWmsXTX2chRDMxqe/6mmi04U1DnyQ0gE9J/jTtav2+5WFEKGF2PthnekmaH3LkAGv+YKN61CM3jb0jCE= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(250305191791016)(22074186197030); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001); SRVR:CY1PR07MB2248; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2248; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2248; 4:LVKkgjP6jOGxoCRvmqrDxAEzF8zRJr6VJK93ptpYptL7AusKexvAUZxAdQIwoNVRWVcu5MyrOFQGVCOvad9O6+B6c78bYogyNEF70jXpxiUtF3CB8XQ2nzjE5WZ4LmFHmXvnpWPoBNl9cKRwPTtnMkBIfoONG2kk2LNlMHlZNtjr7FedBs5XxsOeXoFG9pKMajbPDUih+wYnt1liuXySUAw3mOZDr5YvT9UDKRhQXfjYfopSsO6uNdWk8EupU030x4HgNrLC6WF9WklHn1xRBoWp8NvGKXkpuAQatw5tHO3Veb/lVKx5P19+VnQCGGafkfZOlGY1M7B8wKAn0oKOGhKDOXuCbzc5H5YdYjGgLIWKD4TfkmZop7ntLeDZna5ZLuHHh2kHGmTf1T2+r7qwn9I4KZWVLz/NXntvDLRou+v1fyz+344FpcbQhx2KwgOE X-Forefront-PRVS: 098076C36C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(189002)(199003)(66066001)(92566002)(2950100001)(6116002)(229853001)(3846002)(101416001)(5003940100001)(50226002)(50466002)(7736002)(76176999)(586003)(76506005)(48376002)(50986999)(8676002)(4001430100002)(189998001)(4326007)(68736007)(19580405001)(106356001)(5001770100001)(105586002)(2906002)(97736004)(19580395003)(47776003)(36756003)(33646002)(81166006)(77096005)(42186005)(7846002)(15975445007)(107886002)(81156014)(2004002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2248; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; CAT:NONE; LANG:en; CAT:NONE; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR07MB2248; 23:gIERqS8ogUKLOGs2iCF5m3884KOhUfTgpcZ+jInBK?= =?us-ascii?Q?NgVZssl9ILL0ZcGQddaDsCTIlbe/EaW/oTKEMCNm/F7UFs/1PhagUb4BbVKj?= =?us-ascii?Q?vYXojQwUVOVne3gb97uA7QH8NNbcOpYr1iG88Q08wbXI8fve2XeUJnakh7ZY?= =?us-ascii?Q?ssxsEfDkrii3/sbDtG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-ascii?Q?69jzSDQusxx0IGUHqku6ZHxyxurZrkf4FREbE0awylBXidWJ50YR5ZYjgzzf?= =?us-ascii?Q?wBzsrifQ9TpSJus5Ord+lYixEGyhjm3upJUEHH9BGtpJPPxPGhpvw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2248; 6:y47V+lBpeOZ0APuIOD56aVsQA8zfCOMtszGPH4X6JgxCwA9Vk1LcyRIgsPviALsTPyqH41cuG2DBQ7swom9ezzN7bdWxR6PrlVTT5doRtTPiyggsGe5mKkAR1SzLiGi/2iqHFdm3Pw+s3tHb7MawknwWixoW43gdl7/C26Jk1reRj5fIFUHFJvFFsGRx6Sv2ou67xolUMwAUWfImLcw1YnxQr94hVSbjCpI1eFCWpUED/6EotVPpYsF5f+0mcGWZinKnJ4bAsgOthfFpIPHkMsYh0/YRfSML1pOvTAXSXwI=; 5:gHN/JZ99MA0NEo2RTj6N3Kc9eQ/cu6Yy90Z9yoX+8bXAQjoaDJ8ZpU3jRrR6oKb/dsMC1T6JDGtiTi4mLqHsNzMOErL02dECozXv7wjbUNi/R4GTqDtVGvjtCjd3EbsWboCRVFeN2RoHOS6BCc4WEA==; 24:LyAslHOkwqI2f7EPN9gNYeOw/MS4hxMXkZJnRfkrlKvLJrQNOL2IFptFsKLhcgecrVsQGE8tGZZWYB5tD3gXBZZo0d61G2EjSCZ5YA9nvik=; 7:hibWDrHNeBnrvD6SJYi6zsioGYj0OX3HV9dka7DoTsuQfP83eMSR2xVJumEa1HI4JxLP+BfV9IEwzJON5Y/mCRIeEvuk008kLkhrbVCnlkKFCrSIzwRyPO5n062NxOTbRefAjijgCSvT5TyME73NCYKRb6exVVxGYEEpZeMhj2DxjrYUBHyMzXJaWU5N4fzj377aG1fHKdJ+CaUsv+0phg== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2016 05:12:06.2574 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2248 From: Andrew Pinski Signed-off-by: Yury Norov --- elf/dl-sysdep.c | 1 + elf/elf.h | 3 +++ sysdeps/unix/sysv/linux/aarch64/dl-auxv.h | 25 +++++++++++++++++++++++++ sysdeps/unix/sysv/linux/aarch64/dl-sysdep.c | 5 +++++ 4 files changed, 34 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/aarch64/dl-auxv.h create mode 100644 sysdeps/unix/sysv/linux/aarch64/dl-sysdep.c -- 2.7.4 diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c index eaa7155..88b7dd7 100644 --- a/elf/dl-sysdep.c +++ b/elf/dl-sysdep.c @@ -307,6 +307,7 @@ _dl_show_auxv (void) [AT_SYSINFO_EHDR - 2] = { "SYSINFO_EHDR: 0x", hex }, [AT_RANDOM - 2] = { "RANDOM: 0x", hex }, [AT_HWCAP2 - 2] = { "HWCAP2: 0x", hex }, + [AT_ARM64_MIDR - 2] = { "MIDR: 0x", hex }, }; unsigned int idx = (unsigned int) (av->a_type - 2); diff --git a/elf/elf.h b/elf/elf.h index 15f5a75..c05bc23 100644 --- a/elf/elf.h +++ b/elf/elf.h @@ -1058,6 +1058,9 @@ typedef struct #define AT_L2_CACHESHAPE 36 #define AT_L3_CACHESHAPE 37 +/* AARCH64 MIDR system register. */ +#define AT_ARM64_MIDR 38 + /* Note section contents. Each entry in the note section begins with a header of a fixed form. */ diff --git a/sysdeps/unix/sysv/linux/aarch64/dl-auxv.h b/sysdeps/unix/sysv/linux/aarch64/dl-auxv.h new file mode 100644 index 0000000..290753d --- /dev/null +++ b/sysdeps/unix/sysv/linux/aarch64/dl-auxv.h @@ -0,0 +1,25 @@ +/* Auxiliary vector processing for Linux/AARCH64. + Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + + +extern int __libc_arm64_midr; + +#define DL_PLATFORM_AUXV \ + case AT_ARM64_MIDR: \ + __libc_arm64_midr = av->a_un.a_val; \ + break; diff --git a/sysdeps/unix/sysv/linux/aarch64/dl-sysdep.c b/sysdeps/unix/sysv/linux/aarch64/dl-sysdep.c new file mode 100644 index 0000000..ca3ec28 --- /dev/null +++ b/sysdeps/unix/sysv/linux/aarch64/dl-sysdep.c @@ -0,0 +1,5 @@ +#include "dl-auxv.h" + +int __libc_arm64_midr = -1; + +#include