Received: by 10.213.65.68 with SMTP id h4csp1094234imn; Wed, 21 Mar 2018 02:25:19 -0700 (PDT) X-Google-Smtp-Source: AG47ELsx7tDtn+heUN9LL368+cb6lDa8f4t0MBeoomN+BLXlSMSMol+pPf0YCEBFOjLK811eqFg9 X-Received: by 2002:a17:902:52e6:: with SMTP id a93-v6mr15505673pli.10.1521624319183; Wed, 21 Mar 2018 02:25:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521624319; cv=none; d=google.com; s=arc-20160816; b=nlXPcdkwBTjlQ2qPOyXXtKLh/6pCNPwRguvdk9T4bzRGdQmPCkXxwhtWzNxqYA/YDb kqfsC5fIKE+RGiVIMGeKrzVNKyrYoPTqqyHnJrOvbV6W4PISBjUMW6Tp5FdnfnbuSORG gi/r0qEJoG1WUuzlzIcqMLn15el+aafRBELRtlXyQYqVB6t412Cgnd4qTLdw6Hs7O9u2 JX5bY0osWr9ji2NWMyr4sPPw93IafXE71+OJRJT6V7lA3uLgLWuydScrzIrrX04GITMb vauixWq+hlyc42mCL6VsFaTeJAt/Q89AZTuuzSp8xPTL4ZtMU0qm/LY51qM81WpGHF/g qCFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:subject:from:arc-authentication-results; bh=55QBJI2xBodgKTbeH2shvUfWLwl09eEe8GpV8N6ykVA=; b=D6Xqha0bIhc027fDWXQM84jybyaUuzfE18vGdCfMunKyEXofkNMME0Y6nuaEBQ9fYA LS2IN2tF1fwczEjP78kML0TMTYE6Pgt0vVyd6iIGJs/XY/TZlUDqKs0y15ITf59/pCw3 lYAvD8r6mQqTu4vFkKntW5jIMMXFEWzzR56Z0hJuv4mlwyZHb0x69r4tGk8IZrJK1ztV 9CtQ04PflTo86F21MThvHnXn6ysZHM5l//ICT1RFRKfiexrzwz7tptADsc2pQkuE3ofc nQc5LLYwX141/aNbdDzvduNgPuJBce9oyW0PocBlurySuRET5ekkaodjEzS6Rrnl65x2 Kkmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x19si2746014pfh.145.2018.03.21.02.25.04; Wed, 21 Mar 2018 02:25:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751888AbeCUJXr (ORCPT + 99 others); Wed, 21 Mar 2018 05:23:47 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:42576 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751508AbeCUJXo (ORCPT ); Wed, 21 Mar 2018 05:23:44 -0400 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="38035704" Received: from localhost (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 21 Mar 2018 17:23:42 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (unknown [10.167.33.83]) by cn.fujitsu.com (Postfix) with ESMTP id B44DB4D0EFC9; Wed, 21 Mar 2018 17:23:38 +0800 (CST) Received: from [10.167.226.60] (10.167.226.60) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 21 Mar 2018 17:23:37 +0800 From: Cao jin Subject: Re: questions about header.S To: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" CC: , References: Message-ID: Date: Wed, 21 Mar 2018 17:23:28 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.167.226.60] X-yoursite-MailScanner-ID: B44DB4D0EFC9.A982C X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: caoj.fnst@cn.fujitsu.com X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Maintainers,   Could you help to give a hint?   Thanks in advance. -- Sincerely, Cao jin On 03/17/2018 06:01 PM, Cao jin wrote: > Hi, > >   I find two small questions which confuse me a little. > > 1. > # Check signature at end of setup > cmpl $0x5a5aaa55, setup_sig > jne setup_bad > > setup_sig is defined in setup.ld, which points to the constant also > defined in setup.ld, so I don't figure out in which case they don't > equal and jump to setup_bad? > > In my test, drop these 2 lines seems fine, system can boot without any > obvious error. > > 2. > # Zero the bss > movw $__bss_start, %di > movw $_end+3, %cx > xorl %eax, %eax > subw %di, %cx > shrw $2, %cx > rep; stosl > > It is not a big deal, but I think replace "_end" with "__bss_end" make > more sense, and "_end" is already aligned to word length. And, there is > no other code use symbol "__bss_end". So I don't know is there any > reason to use "_end" here? > > In my test, replace the 2nd line with: > > movw $_end, %cx > > or: > > movw $__bss_end+3, %cx > > are both fine. >