From patchwork Wed May 25 11:16:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dennis Chen X-Patchwork-Id: 9135185 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3C3A2607D7 for ; Wed, 25 May 2016 11:18:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C5ED2824F for ; Wed, 25 May 2016 11:18:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2085E282D4; Wed, 25 May 2016 11:18:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9A7AD2824F for ; Wed, 25 May 2016 11:18:57 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b5WoK-0003Nz-Oo; Wed, 25 May 2016 11:17:12 +0000 Received: from eu-smtp-delivery-143.mimecast.com ([207.82.80.143]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b5WoH-0003KG-Q5 for linux-arm-kernel@lists.infradead.org; Wed, 25 May 2016 11:17:10 +0000 Received: from emea01-db3-obe.outbound.protection.outlook.com (mail-db3lrp0080.outbound.protection.outlook.com [213.199.154.80]) (Using TLS) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-22-iLjhs22zRh6zaBf6MxFEFw-1; Wed, 25 May 2016 12:16:45 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=AUtD8L3+Tg+0a4aukCDzQ6uO6cTsUmkvd4WxpQI7jZ8=; b=ZhLxE+dP3bevcC/cMRsclcKAjNhAYLyTImOS6zi9ho8qf55Gl0oph2LYVoiXnmRMbaB4TYWcw63qeBAJ8Oi85//hMB3mImZ4QO25AN/32I4isDjCWz7NPn42ZJEze4lNEyMNcvkpNW6BNdlgU5isBh/jNyfCbjECAoIczqL2+eE= Received: from HE1PR0801CA0003.eurprd08.prod.outlook.com (10.167.184.13) by DB5PR0801MB1544.eurprd08.prod.outlook.com (10.167.229.154) with Microsoft SMTP Server (TLS) id 15.1.501.7; Wed, 25 May 2016 11:16:44 +0000 Received: from AM1FFO11FD045.protection.gbl (2a01:111:f400:7e00::145) by HE1PR0801CA0003.outlook.office365.com (2603:10a6:3:6::13) with Microsoft SMTP Server (TLS) id 15.1.506.9 via Frontend Transport; Wed, 25 May 2016 11:16:44 +0000 Received: from nebula.arm.com (217.140.96.140) by AM1FFO11FD045.mail.protection.outlook.com (10.174.65.208) with Microsoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport; Wed, 25 May 2016 11:16:44 +0000 Received: from dennis-ws.asiapac.arm.com (10.1.2.79) by mail.arm.com (10.1.105.66) with Microsoft SMTP Server id 14.3.279.2; Wed, 25 May 2016 12:16:40 +0100 From: Dennis Chen To: Subject: [PATCH] arm64:efi fix the format of debug message from efi Date: Wed, 25 May 2016 19:16:14 +0800 Message-ID: <1464174974-4733-1-git-send-email-dennis.chen@arm.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:217.140.96.140; IPV:CAL; SCL:-1; CTRY:GB; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(189002)(40434004)(199003)(11100500001)(86362001)(104016004)(50986999)(5008740100001)(6806005)(106466001)(229853001)(87936001)(2351001)(5003940100001)(50466002)(47776003)(48376002)(33646002)(36756003)(92566002)(450100001)(189998001)(5003600100002)(5890100001)(1220700001)(77096005)(19580405001)(586003)(15650500001)(19580395003)(110136002)(4326007)(50226002)(8746002)(2906002)(8676002)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR0801MB1544; H:nebula.arm.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD045; 1:M+uaQ0mMcn5fCDnDprElRFusHvjqbBJT4j9Ky0LFINCUeuTofNE2wS0hdD5fDHQufXm4tYlhSCh+s8Wx9toZjwBnQvQmx1YTyNeC1xmBRJqpQIF5bXkA1Lp8DaB627mLKBAcr/z57FfoLG8+wPIQHi8/TunVEoQwL3jTkddpci0a8GGbzIMeIXmQ5kk/cRMOsdU629tLuLDp5Q0WOH5JzgBfAz4hsWNDELcf0+NDXvVHsg9FD+uRz/hULNmHnDkmMGutlVpyik1HcPUh57M8ZXYMmKGa5kN9ayW7xOYQ7/VVIOElQMcQOHWYWQ4vAd6RCRC2hBueY7lZNVwbRcAL/ikZLxxf1j52IBzHFl3FTgcMx+5MiDlZpuc367EOtnhmZpMfWE+4647oP/q0p5LYM2dtYsoYdjTOy/LdR8aieb4iJa/GT313mPSebgc4vVOTghhsRO3fmuAQcQOJYmsYskogw0F6HjB5dwiJFNwzFcy4tBdJGZ8WArKVakl+dcFg X-MS-Office365-Filtering-Correlation-Id: d6d675a1-d391-413d-d7ab-08d3848e0df5 X-Microsoft-Exchange-Diagnostics: 1; DB5PR0801MB1544; 2:6iWJthUPMSbtNO0yvB0pc1f6iPdE6F/E4kdPaI7J95XebeqYdG0YfrbhFOb3Cz9Chx1WENOT3ryPMun7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c4QW5NXAQquAUSvE5ffc2x88Rx2AnzkUJfBKI8G652WqCN978bmZNxFo+Fi1Cj4kkD+nR0GRTWdzU2+h9+/14pqU2uUq8v7489UJkVCiIjs4Pf0w+2; 4:nZpecDA1zClm42T01OvEmyXmAKlB6Domdl0DstE5kG9SzaZJRR0dK00NoLTPTwvt1OYBdIhcEOoZRzR8bizt1aYnKRD3/xnxze5C3jpDxkVIWUWhGCYyv6Nwg9NUC8BUEBAhIABSZVJvQNBgC4Z8b7V6OumcUzNDBiR+vazIpFzD7vCNz4oYp2uYsD5CueybMa60YPvV11fNpYYkhYuSo3u51gGn+ToV+t1iPwp1HqyYq0a9WCqlDmIcE+UrGu66omDz1sdfclGfg5DGr5NuUhMLZbnvBWmeJ7kA1Kdla4jGtE/gvGqRfGVOTPwfTJrqMjszeR82bWs34MOEhjlzZSRidp0iAU3hnuvwKM/p62V/OUroO43wHG4SruDPPKBadpPMpwxMllHRY5Tmoi+AEDewJB0MaqqjIz020jLkMsj3Iz0RQqSdmniBXgizjaMz4IZMQP32H1F35RfEY8k/RQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13023025)(13020025)(13013025)(8121501046)(13024025)(5005006)(3002001)(10201501046)(6055026); SRVR:DB5PR0801MB1544; BCL:0; PCL:0; RULEID:; SRVR:DB5PR0801MB1544; X-Forefront-PRVS: 09538D3531 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB5PR0801MB1544; 23:HxuQuFMskF2Jy4dSF+k1L6Jk42bRtUzx7XCTnF8?= =?us-ascii?Q?cXC3PTWeE2z2MST5XfwWS3x0PU/Gsb9QYw3h8rJwCA6UBnMZqE0C8p8yW5dT?= =?us-ascii?Q?/Bo/9LaBZsuI9FPIp+FA++iDjoaJGx0k4QrEB5OyHiRwyrS6M/oAAxzp07I6?= =?us-ascii?Q?n9K3xN7Dvoqv8MyDJ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=?us-ascii?Q?BzRI+oeg=3D?= X-Microsoft-Exchange-Diagnostics: 1; DB5PR0801MB1544; 5:2lu3mvjoDUoXOP73nnqThRUiHbkeLk3s+LSy6iCKkH1TLibpLMJqMGPEpxfU91PmQ+00Dp8MAcynKf/EIbabrBNgjE3cFXLg9evRTKq+3G01R1m1zWgeMDbMW8wW/NUNA+xTgwpGq0Am9NYlm9bqew==; 24:ZgCIayWY4KUf/FpIka3FJnU7z80izVAY1ESdYtwk3lDdFzde2cG655vWnDA9p15qjUU5mxNbM/xg/J6fFZSSVYvq6n3E7lnGgT9x4WfDqN4=; 7:FGgFVjmlsjo1Ov3/cMSa8MDtaE5j3+OdrsOQGToj7XJcW1Gx5X9ifyfgeSGOO6R6xkisyJumef4QPb/xK9qasvJnw9M28SQ+jR+RUfbBZIvImYlAZYER4DUGryxFU5GRnXHv1vo+/EJqyR/bzwL9SykCz3J8G6EFHJhohgUMpoCxXiMI6op3xrx+sYNw8Z9z; 20:pbuiHyD8uH5wz8Jor6tXPHrVFD3fu4FRB/pM5KV/J/61l+tfr/1jebtS9INHQZJUwREiCie/chUWRcRWByClcZIeyX91FPszmpLBp2bmyxFF0do5Crfr5ALbV20JevNnkwoutTXHxKp+idOjhcholG2OCCYrPsEw5j2MU2Vzg3A= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2016 11:16:44.1469 (UTC) X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[217.140.96.140]; Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR0801MB1544 X-MC-Unique: iLjhs22zRh6zaBf6MxFEFw-1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160525_041710_157846_21DBFE4F X-CRM114-Status: GOOD ( 13.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: catalin.marinas@arm.com, Dennis Chen , will.deacon@arm.com, steve.capper@arm.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP When enable debug of efi and memblock with 'efi=debug memblock=debug' appended to the kernel command line, the debug message output for earyly_con looks like: [ 0.000000] efi: 0x0000e1050000-0x0000e105ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC] [ 0.000000] efi: 0x0000e1300000-0x0000e1300fff [Memory Mapped I/O |RUN| | | | | | | | | | |UC] [ 0.000000] efi: 0x0000e8200000-0x0000e827ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC] [ 0.000000] efi: 0x008000000000-0x008001e7ffff [Runtime Data |RUN| | | | | | | |WB|WT|WC|UC] [ 0.000000] memblock_add: [0x00008000000000-0x00008001e7ffff] flags 0x0 early_init_dt_add_memory_arch+0x54/0x5c [ 0.000000] * ... This patch is trying to fix the above output messed up by memblock_add(), so we can get below debug mesg looks more formally after applied: [ 0.000000] efi: 0x0000e1050000-0x0000e105ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC] [ 0.000000] efi: 0x0000e1300000-0x0000e1300fff [Memory Mapped I/O |RUN| | | | | | | | | | |UC] [ 0.000000] efi: 0x0000e8200000-0x0000e827ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC] [ 0.000000] efi: 0x008000000000-0x008001e7ffff [Runtime Data |RUN| | | | | | | |WB|WT|WC|UC]* [ 0.000000] memblock_add: [0x00008000000000-0x00008001e7ffff] flags 0x0 early_init_dt_add_memory_arch+0x54/0x5c ... Signed-off-by: Dennis Chen Acked-by: Mark Rutland Cc: Catalin Marinas Cc: Steve Capper Cc: Will Deacon --- drivers/firmware/efi/arm-init.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) -- 2.7.4 IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. diff --git a/drivers/firmware/efi/arm-init.c b/drivers/firmware/efi/arm-init.c index a850cbc..272f674 100644 --- a/drivers/firmware/efi/arm-init.c +++ b/drivers/firmware/efi/arm-init.c @@ -174,6 +174,7 @@ static __init void reserve_regions(void) { efi_memory_desc_t *md; u64 paddr, npages, size; + int resv; if (efi_enabled(EFI_DBG)) pr_info("Processing EFI memory map:\n"); @@ -190,12 +191,16 @@ static __init void reserve_regions(void) paddr = md->phys_addr; npages = md->num_pages; + resv = is_reserve_region(md); if (efi_enabled(EFI_DBG)) { char buf[64]; pr_info(" 0x%012llx-0x%012llx %s%s", paddr, paddr + (npages << EFI_PAGE_SHIFT) - 1, - efi_md_typeattr_format(buf, sizeof(buf), md)); + efi_md_typeattr_format(buf, sizeof(buf), md), + resv ? "*" : ""); + + pr_cont("\n"); } memrange_efi_to_native(&paddr, &npages); @@ -204,14 +209,9 @@ static __init void reserve_regions(void) if (is_normal_ram(md)) early_init_dt_add_memory_arch(paddr, size); - if (is_reserve_region(md)) { + if (resv) memblock_mark_nomap(paddr, size); - if (efi_enabled(EFI_DBG)) - pr_cont("*"); - } - if (efi_enabled(EFI_DBG)) - pr_cont("\n"); } set_bit(EFI_MEMMAP, &efi.flags);