Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1119848pxu; Thu, 8 Oct 2020 04:00:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyp4qvt6g4TMhMrFajAkFYwPl84L+2JgtXeA5K6Yck+0B9LZ3ybrab/OPvVoqYytYTNERy5 X-Received: by 2002:aa7:d1d5:: with SMTP id g21mr8593878edp.348.1602154857519; Thu, 08 Oct 2020 04:00:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602154857; cv=none; d=google.com; s=arc-20160816; b=sqWVBQ/cQp/O5T1vpyLK7pKs6Q6i/PJ5+uOFXKnsNNYwXq949NLCfvSxHSqUjJDriL EWmu0Ba1UYkKAiO32yrVO6Nfe6Nz/x/SnSa0r2Zfrwa4PgPSJSo/IadGUCYGylO1eJBa ZmIrE2mld264C5i6wv47T0JXMbtpXxATQUIri/KGSYlmxr/LCKGL0A8MI//AcEqJkk/M uADzuwu/FXJF4YLhd5benTLEENq9fgTqHCIXSgWnavIOESnkYRq6b1GuKoTlnwgxGhbK N61VOgPyor/jGG6z4rKkDynHTwj9S9BBgOPnFAOCcBmBGeR9cMqU/affaXvkpgNjcIsE SILQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=LHMm9EioPp5iuZl8ZQWPSrdXR/WJoRvkt2TDrivML0k=; b=o6iM82YbCQ7BKpIyZEpHQudn+aMemxKTmHQn+EqWwN0U3PpwEFfh0a7Qkl3q8LurEU 08ruSdXNWSKJFAkWzLNdC3xKUp8Mme9WK7oe00zzVSCyu1G/FrGWHAkjlff4yN1XzLf8 tMrNQKA1Z6YNeJyYiBg1bE6fHeRH4Bn6J0lSh/hHrkTJcgmUFnBqLLorWtHbW9MgtygV hzhVZy2Ac28QWvr0/6+9JUBhiXl7hDGkSgyvxxDB28H4fpcMU7i3IA85/hf4Ldst0D4M uwsWV7EblN3GVPc+svNMvMCftmyjMjBufor3ZUdx9zOiH/RjJtV4UveIk2j9kWSVmcMu 2GOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u2si3487131edd.517.2020.10.08.04.00.34; Thu, 08 Oct 2020 04:00:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727828AbgJHJEX (ORCPT + 99 others); Thu, 8 Oct 2020 05:04:23 -0400 Received: from mx2.suse.de ([195.135.220.15]:34338 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725890AbgJHJEW (ORCPT ); Thu, 8 Oct 2020 05:04:22 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id AADB8AE95; Thu, 8 Oct 2020 09:04:21 +0000 (UTC) Date: Thu, 8 Oct 2020 11:04:20 +0200 From: Joerg Roedel To: Arvind Sankar Cc: x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/5] x86/boot: Initialize boot_params in startup code Message-ID: <20201008090420.GD3209@suse.de> References: <20201007195351.776555-1-nivedita@alum.mit.edu> <20201007195351.776555-2-nivedita@alum.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201007195351.776555-2-nivedita@alum.mit.edu> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 07, 2020 at 03:53:47PM -0400, Arvind Sankar wrote: > Save the boot_params pointer passed in by the bootloader in > startup_32/64. This avoids having to initialize it in two different > places in C code, and having to preserve SI through the early assembly > code. > > Signed-off-by: Arvind Sankar Nice cleanup! > /* > * Jump to the extracted kernel. > */ > - xorl %ebx, %ebx > + movl boot_params@GOTOFF(%ebx), %esi > jmp *%eax > SYM_FUNC_END(.Lrelocated) > > @@ -209,6 +208,8 @@ SYM_DATA_START_LOCAL(gdt) > .quad 0x00cf92000000ffff /* __KERNEL_DS */ > SYM_DATA_END_LABEL(gdt, SYM_L_LOCAL, gdt_end) > > +SYM_DATA(boot_params, .long 0) > + You should add a comment here that boot_params needs to be in the .data section because in .bss it would get zeroed out again later. Same applies to the 64bit version of this. With that changed: Reviewed-by: Joerg Roedel