Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jLkPH-0000Ur-NP for mharc-grub-devel@gnu.org; Tue, 07 Apr 2020 05:20:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32836) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLkPF-0000SM-Bi for grub-devel@gnu.org; Tue, 07 Apr 2020 05:20:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLkPE-0007Fw-Bi for grub-devel@gnu.org; Tue, 07 Apr 2020 05:20:29 -0400 Received: from mga17.intel.com ([192.55.52.151]:36246) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jLkPE-0007B3-12 for grub-devel@gnu.org; Tue, 07 Apr 2020 05:20:28 -0400 IronPort-SDR: f+QYCR9Bk345oUn8ghTZGL0Vg7NrGN5RtgsKXPfvFMtaRUEWUqQjgnykAgDFbs4QXYVfltJauV X5Ru70GmqHPQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2020 02:20:21 -0700 IronPort-SDR: 277oZuy7cWrI4vFiCRspiPrTEnuAq3R1Da/XAeqGh1Y4Tyjeoe/FqvCfrxLAAZKLl40aFTPZyd 7W3Zuw1JZSDw== X-IronPort-AV: E=Sophos;i="5.72,353,1580803200"; d="scan'208";a="424687055" Received: from lhawrylk-desk.ger.corp.intel.com ([10.213.22.18]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2020 02:20:20 -0700 Message-ID: <439f213dde627977b351422c5afd4a4f4fd0f8a4.camel@linux.intel.com> Subject: Re: [PATCH V3] multiboot2: Implement quirk-modules-after-kernel From: Lukasz Hawrylko To: The development of GNU GRUB Cc: Zide Chen Date: Tue, 07 Apr 2020 11:20:18 +0200 In-Reply-To: <20200407063051.149-1-zide.chen@intel.com> References: <20200407063051.149-1-zide.chen@intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 192.55.52.151 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2020 09:20:30 -0000 On Mon, 2020-04-06 at 23:30 -0700, Zide Chen wrote: > @@ -392,11 +395,9 @@ grub_cmd_module (grub_command_t cmd __attribute__ ((unused)), > if (! file) > return grub_errno; > > -#ifndef GRUB_USE_MULTIBOOT2 > lowest_addr = 0x100000; > - if (grub_multiboot_quirks & GRUB_MULTIBOOT_QUIRK_MODULES_AFTER_KERNEL) > - lowest_addr = ALIGN_UP (highest_load + 1048576, 4096); > -#endif > + if (GRUB_MULTIBOOT (quirks) & GRUB_MULTIBOOT_QUIRK_MODULES_AFTER_KERNEL) > + lowest_addr = ALIGN_UP (GRUB_MULTIBOOT (highest_load) + 1048576, 4096); > > size = grub_file_size (file); > if (size) > Hi Zide Above modification changes another behavior. Before your patch, lowest address for multiboot2 modules allocation was 0x0, now, when you removed #ifndef, it is set to 1MB even if quirk is not enabled. I think that it is worth to mention than in commit message. To be honest, I was going to submit patch that sets lowest_addr to 0x1000 by default, so from my perspective your 'undocumented' change is good, 1MB works for my project too. Thanks, Lukasz