From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81A82C4727E for ; Wed, 30 Sep 2020 11:08:42 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 24739206FC for ; Wed, 30 Sep 2020 11:08:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Tq2+qJx9"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nokia.onmicrosoft.com header.i=@nokia.onmicrosoft.com header.b="XyzKErNb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24739206FC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nokia.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OPOT5hyXp/wQ1vmfJOWsHgR89LvkI27VjcsuksJL10o=; b=Tq2+qJx9BO/VDsbdeCJYSEzs1 Y00dY/xe3abSZD91B0G70ML9tSNonS9JaNfy9Ausgif18s+sXY57aRpTkU7AnUYawjx5iQPUqRkOD fLCvN3D3YBhfWBZu9YyzmwHoHXuELLg7w20Cb+1GT6IQg43Ty8o8oL/d589KtRuGtMMPfgrRoo+IW RDG8fVYEo+5QS6PsHD3S0lh2FAHzRsmkwY13q0mdtuuAri6y96Rg2V3t7vVKSbJw8YirlbCix/NVm bP6TjXn2F45OrjidUqHXCUOxXo5C9YICTDvuFPXzkcbO+ZloT4UMvUrv/p7t86Tyn40eUPnONZFQA AHKAtW61A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNZx4-00013r-MZ; Wed, 30 Sep 2020 11:07:14 +0000 Received: from mail-eopbgr80125.outbound.protection.outlook.com ([40.107.8.125] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNZx1-00012Y-Dm for linux-arm-kernel@lists.infradead.org; Wed, 30 Sep 2020 11:07:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dqcO5eMrlyhWziWnj6c65hqmSfZm/cDmieDP+6cFwGldzaj3K+ZCMf4OjVk5CV3ZO+a92Wa7+RK/ZAFkMqKvtc1OfMJBucC0WDlc7CxxybOgzYdV8TI88CaKrayZZHRV9hvdoqnZTl564iQjRaoP236+dnP8SBH7wgFin2o1wwqpRyAcl25rO9mZu1wv12i8o6r3pDn2d/WvnoT2n7r3kDpUHbkKH7SnkyDNgXKJnvPTDA7DaptelB4VO5WutlexqP6N24X8fPn9Wfy/WbdlVw5bDHCnSA5I1WDQLBiN9BLOtzh8v7hZGHO97RRgUEJVVToaH/eGT8QXoJhxMS4zSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pe4C5cWkO4INxvtzG0kr8B8teTSKGk5btpO5p1DSryw=; b=eQ1JCEfVNacLvk2wtPZmHWElkWI4pFQACmtPBAhXMsIVl59UrrsGF5Zt9G42LX8IltwEpJDAt6UCiPn3Z+aov/HO/SW2A+nQbkmQbFC0TjZsvjuueH5NJASFRZOBO09llBXqTxMOfCpJPldBMGdTf3eI3pxyStPBZYYWV04gKFnbkR+nIPUT5Vrnut9cKvFR5aYDMMMYc+8df3UKy0DEKwSOqNkNzI167HirxLsumH6JJi7c6EKiDLJiokG98XQwWmzMfUR5GIQ/IyxD15Q+TU+D+CzI/6lpxQYA6d/MyrsGo/USsz2S3SNaVKOakpten9eUxK+Pnp5/VOtlt7HmIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nokia.com; dmarc=pass action=none header.from=nokia.com; dkim=pass header.d=nokia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pe4C5cWkO4INxvtzG0kr8B8teTSKGk5btpO5p1DSryw=; b=XyzKErNbkcwiqMj2aze5LOqTn1gBQV+NI1XIJZr5lbtbDxJKmthNoFDdfisHUttOElbljHzEfbwhOLAN1JdqGsfdnDVT/yZfDXaN4f6pp2OuAaccqzc1IGlq0r2t4OuRkc9lXduhNdWTKEJh9+AASMoZfb4Osh2GdppugPEsbL8= Authentication-Results: nokia.com; dkim=none (message not signed) header.d=none;nokia.com; dmarc=none action=none header.from=nokia.com; Received: from VI1PR07MB5216.eurprd07.prod.outlook.com (2603:10a6:803:b0::15) by VI1PR0701MB6894.eurprd07.prod.outlook.com (2603:10a6:800:198::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.20; Wed, 30 Sep 2020 11:07:07 +0000 Received: from VI1PR07MB5216.eurprd07.prod.outlook.com ([fe80::4d01:44de:bd25:b64a]) by VI1PR07MB5216.eurprd07.prod.outlook.com ([fe80::4d01:44de:bd25:b64a%6]) with mapi id 15.20.3433.031; Wed, 30 Sep 2020 11:07:07 +0000 Subject: Re: [PATCH] arm: Support initrd with address in boot alias region To: Russell King - ARM Linux admin , Florian Fainelli References: <58e39504-3970-597f-8146-5180babc6e16@gmail.com> <20200930103521.GD1551@shell.armlinux.org.uk> From: Matija Glavinic Pecotic Message-ID: <408be05b-448f-7c58-9ede-e810631f56e3@nokia.com> Date: Wed, 30 Sep 2020 13:07:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 In-Reply-To: <20200930103521.GD1551@shell.armlinux.org.uk> X-Originating-IP: [131.228.32.167] X-ClientProxiedBy: CH2PR05CA0039.namprd05.prod.outlook.com (2603:10b6:610:38::16) To VI1PR07MB5216.eurprd07.prod.outlook.com (2603:10a6:803:b0::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [172.30.9.7] (131.228.32.167) by CH2PR05CA0039.namprd05.prod.outlook.com (2603:10b6:610:38::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3433.13 via Frontend Transport; Wed, 30 Sep 2020 11:07:05 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c06ab034-f126-4f16-d7e0-08d86530f87c X-MS-TrafficTypeDiagnostic: VI1PR0701MB6894: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pL5mBHonrGSP/6ZQJvZ7DUF1MLT/u6ozC+dB99YBSS3wmRVT78iWc3nnh67Bxr5xbKHReavMyFSDza6REd64uynaDLuq2+1AUPMq8S1yk8fKuD1e3REH+WkG355n81mbRRy/vlo2C6gHtjtoAT6COeXhgKLboDVHljuc7YHDrCpFirGfi/50e7ZN6EliUlU+6/GO6SuVw2piF2zaBr2hnKPt8qMSG5DYrKWLltWn1XoJNxNfphR41Vj78GYBPVXeni1gXv8masK0I3XUTCA/6ahKc5Iq0i4Z4ty9quKkmUlqyl/+zEujQm8mr+q81ARihgW/qn3SMa7JOB0sO9fJa+v94D08+Qn3U7E2IJyGeUUq5wIca+BEX7tYSOqfmoGC X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR07MB5216.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(366004)(376002)(136003)(396003)(346002)(107886003)(36756003)(54906003)(8676002)(83380400001)(956004)(31686004)(2616005)(110136005)(5660300002)(66556008)(2906002)(16576012)(16526019)(66946007)(31696002)(52116002)(316002)(6486002)(6666004)(66476007)(478600001)(8936002)(86362001)(186003)(26005)(53546011)(4326008)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: In+7K2dJ7T3Aj7gL5TmR0bnOmlcHSu8wEQfUsqPZVDmtpA9zb8+UvkmJDiexCliUBD/8XJgSAM6+SqhSM0lil5XfLzudLWa6IjNIpD605el+hOmtEZEg3dPcwQLy93yPCnv9Oo3rFVmg6B6OsR9xVm3A6m7k8eHGrtKqh0zUdQSvRnUdOjCoMWGwZ6BOtqVLbu6hYGsJPPRE0H08NfAuKi93qlg3uVJfQdb6K+0/wAH/4F/sGIiZIwi240eXafMkp8YkBswzEQc22SoGY31r0LvcVKaTrg3FvLbouUJRhWPAu4v7bm57E33OFfkf1gk6xk8FLR7w60Nzc256Hh8dvkuk7z7jpndBGjf3D4dCEHsMDjvdtdn1zzdRBOXMFbeEa/ERcqN/LP72rbT3UP+IFmx0u1R2HaRwnYqdnXclLZOrQDroioiYoeL3t0gqQBD7qbSH6UNhX8EFbDuG7OiPGHHgeZUOmTc8Y3lK/5w4qudAVaIPa98Zsm/3UfwaEkB+e9a8vEsdPUsHP4/l8OUHY0XQZP2nCwjrWML8gb8ixBt9DDt1utVLQHNbiDNdjd+apUqQ98x+melJ1U3ucWFaLx1YXs6djuOL1pxKxQPx/3oOg90iAKRixltrnZzE1sF+c0XEv+LcTiVsmmI35uMgTg== X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-Network-Message-Id: c06ab034-f126-4f16-d7e0-08d86530f87c X-MS-Exchange-CrossTenant-AuthSource: VI1PR07MB5216.eurprd07.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2020 11:07:07.7120 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: d35mSCLuVYhto+gJaOU7e1OPsth61WVjSMYY9LzNkjGg+cKYLetEORIbDYeNz40ZbO0+FF9V08rTCs3tjz5qQm38SRA9XS6SJcbG/pyByIB16g1iBE5DHGd88JCahibh X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0701MB6894 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200930_070711_526027_12C1FA35 X-CRM114-Status: GOOD ( 16.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , "Sverdlin, Alexander \(Nokia - DE/Ulm\)" , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 09/30/2020 12:35 PM, Russell King - ARM Linux admin wrote: > It seems strange to pass the initrd in using an address that is not > listed as part of the system memory map, especially as the initrd is > freed during kernel initialisation. > > Which boot loader is this, and is there a reason it operates this way? It is kexec which populates this address. Kexec is allowed to do that as this region is listed as boot alias: $ cat /proc/iomem [cut] c0000000-d4da1fff : System RAM (boot alias) 840000000-854da1fff : System RAM 840008000-840bfffff : Kernel code 840e00000-840ee56fb : Kernel data [cut] 880000000-8ffffffff : System RAM it is arch/arm/kernel/setup.c which populates this entry on line 870: /* * Some systems have a special memory alias which is only * used for booting. We need to advertise this region to * kexec-tools so they know where bootable RAM is located. */ boot_alias_start = phys_to_idmap(start); if (arm_has_idmap_alias() && boot_alias_start != IDMAP_INVALID_ADDR) { res = memblock_alloc(sizeof(*res), SMP_CACHE_BYTES); if (!res) panic("%s: Failed to allocate %zu bytes\n", __func__, sizeof(*res)); res->name = "System RAM (boot alias)"; res->start = boot_alias_start; res->end = phys_to_idmap(end); res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; request_resource(&iomem_resource, res); } This is likely reason why problem has gone unnoticed for so long. I dont think there is large number of platforms which have boot alias regions + they use kexec. As noted earlier, bootloader passes correct address, it is kexec which passes invalid one resulting with: [ 0.000000] INITRD: 0xc49bb000+0x01a1a000 is not a memory region - disabling initrd and later with failure to mount it. Regards, Matija _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel