Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1330480pxu; Thu, 8 Oct 2020 08:55:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrSafJu0rDxZWhwjAMd6v2CyHkEaZFwKXvdPJ6lR3Z7tGVABYnbnI6nzaWJlF+VDYZ13ne X-Received: by 2002:a50:a452:: with SMTP id v18mr9440539edb.143.1602172533557; Thu, 08 Oct 2020 08:55:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602172533; cv=none; d=google.com; s=arc-20160816; b=IRuqj84eJekBWP/GPnU9xz1V/cAx8nosoQwSSNsZwum/nQ9FFtZPaB5KRZ2odxj1zK p1INQGlO+CHLtM8oczfgpv/HVWimL/E98XqO39hURmbpZG9zMQ3bEZCe99IrrqeNEg8K fs615WXf8IVZMJyYL9N97ksYqb5TP/cUJvCVbQ0PeGNNgDzVhG+ZzhUTuk3M223kyK3f b0L7cpggnq1v0jTtdHSom/m3TcmNXjr+xlljQw6ueumHSzcf9fR1jOO5fEG+OYaU/m2T Oda3lpzZwbKJWFX4rQeJtZqSitzZkXEE81/A8SDlbR9Zz8Jx1NLzJDOnvzfa1hR2E7E3 Btwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:date:from:sender:dkim-signature; bh=hTx5wxbwW2y1aqwu6D/P4lkFjUf8iqV76vNFf1Ytp58=; b=d9duas2UsjDQGL/7OyoTTIb1qSmR2mL792YTyPZx0PKGIrycHB22VLOSGSOEwiq+z2 vtyWFLa4TkLe6qbqKGiC58C6cscntv+88RsqWJjD3AdFyiTSIwEVuGpS1GFIFycvdkng 5YPEBf40T33XnMLhIFuR3036RiR1jSzXAhKMuyoY75SfS3cyDeditkoAaLhSnFD1LgcH otQEeAKVz6uLE9/EYtuoKZ3+/SDPnNGhoUg+JGoOnDTPnPdh/hvWHF9w5MB9yoMGmQjz DayuknDDdfa1VmI7n7dew42OuWjY2QRpYWDzOxTwQQ5SxotqmNE+6i2T0t4EX7EPja7D aaLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TuR3rgRh; 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 q19si4066406ejb.602.2020.10.08.08.55.09; Thu, 08 Oct 2020 08:55:33 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TuR3rgRh; 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 S1730240AbgJHNpB (ORCPT + 99 others); Thu, 8 Oct 2020 09:45:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728969AbgJHNpB (ORCPT ); Thu, 8 Oct 2020 09:45:01 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43AC2C061755 for ; Thu, 8 Oct 2020 06:45:01 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id 140so5275696qko.2 for ; Thu, 08 Oct 2020 06:45:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=hTx5wxbwW2y1aqwu6D/P4lkFjUf8iqV76vNFf1Ytp58=; b=TuR3rgRh1QHA8p4nESYsGWXEq7xJZ1IkCA919YQ28SWsZO0Yx/v3sOr2tS0Fiwv+UT ppQcFGpUv1nKi6RwuGPaq04K8v2kPbodyR/aozzOxoyDxnuo0Enapaj4B4pb72TUqRxi ujmJpWb5vxTXG4eZDp1A6mEH8U5QwcMtvcgXkrieVYD6KgLK/30ltIUly99ficeeDVFG Iif72Bfg8P/sdpznOXBnmqOYo0MUATO+KLyOjnuW0m4DOLdSWEl+cCDKqo4V8XmEOqiL 5GIk4iaq33fRYaAwuqCcMHuQTpS1Ra/ZMueZuuTL3PgFEC+WQr+iJEckKDALeXkgILX7 1iZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=hTx5wxbwW2y1aqwu6D/P4lkFjUf8iqV76vNFf1Ytp58=; b=nZXqNg82JiIgxsUZAhd1TP7155arwsbPdKnXZecurHQqcOkuq6/f0nsn+jOF106pvb vCK1EAALR1ubL9Di688MBZCWuJ9omnZOP0olqJxh2PmyD+cVG6y8Bcx7xuIVYlPvR85w OwTaxeHI70X67hHwG7W0ZM7suJCxTEKailyb93w+RsaVLbgedjNkXX7dcYYWs2hxzw3Q /kyUxhed3ZfQMMg4XBMN2gJsIk7ONFEOZHJKvOa5utO+15bxqeySa5wT4bSsccezhRBW C7r5jzFf1qaMqacIvXY9sTV2t2zFN5+2XfBIN+3vZgy9ueMXP5XsFgfX7/4XZH2fYP1O 2xew== X-Gm-Message-State: AOAM5303u59+faPVwAaKkaJAcucdcirLgABNLRZ4AnP5u6vP8Nq0DU/x BHCH3rp7SnpajT9Dy2eSjRtoV/rrgh7bpg== X-Received: by 2002:a37:a251:: with SMTP id l78mr7765239qke.291.1602164700449; Thu, 08 Oct 2020 06:45:00 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id d142sm3892800qke.125.2020.10.08.06.44.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Oct 2020 06:44:59 -0700 (PDT) Sender: Arvind Sankar From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Thu, 8 Oct 2020 09:44:58 -0400 To: Joerg Roedel Cc: Arvind Sankar , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/5] x86/boot: Initialize boot_params in startup code Message-ID: <20201008134458.GA2429573@rani.riverdale.lan> References: <20201007195351.776555-1-nivedita@alum.mit.edu> <20201007195351.776555-2-nivedita@alum.mit.edu> <20201008090420.GD3209@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20201008090420.GD3209@suse.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 08, 2020 at 11:04:20AM +0200, Joerg Roedel wrote: > 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 > Ok.