Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp6643669imm; Mon, 23 Jul 2018 23:59:38 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfpX1112uSPll0fH/wxypP30VFzB7BNIE5w3svDZYgCr90FGEJ+3IGBdeqiDyqneudrGB+u X-Received: by 2002:a17:902:8f94:: with SMTP id z20-v6mr15655156plo.337.1532415578331; Mon, 23 Jul 2018 23:59:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532415578; cv=none; d=google.com; s=arc-20160816; b=yzCe32QZF73kABTTjV6sBpbGlKTxReyWegwkok9K/CiqRIymayUJttM5wjg1F3URVh +9XOatLZjrjg8Zk86wXq2EOKFtBOX7KPsDC3u5Wr3fpsh/seHvbObzQYQ63byBC3ABPH BDECDo7I8VppqAKQaBhqE4TAZ4kr3K5PmJdxg7ooPVqbIXXkgtfYSoL07zc+90uXxGEG OFzvTBKFwq78nYzMJDaL0YWGIs7WkO+0g3voeCdxPz2l0ordtKz0uhQYf75nEyWQiRi3 El0EhHdzlpSQSyZHVIDwAQzvb1cHUYLkEMhcG9g2+57481Jwb6Ma/DJCoWW+Ih1KLjHF 1FsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=iV83B8R4RN0S46KhJwI/DPsWmsVjF3gQZbNOLfrDO2o=; b=DJjHu5wUadBrG9GmHHRW2qfmFXB5dwMaSsS0AhzgDGllWWc+/ORdrw0vFOjZ6QCxqo oXtQX5Dd0aWc3f6IMGBt0/fER4dknvkSFn0uSj/OXJ+9NxhJBiqf9SKK96YqeqQDp4fR 3a9YsCRNiXKuxJnRE2CbKNweDeYYfEFvbKAN71RPsptG6iP5QjK3eHSXT9Xx5X7QOdpW kjY9WGKrm92JiQL6WBsIBzC8qY3kREcZVNRg/NIw3GUxdzP3KjX80yrmDPmZM664STWc s6ICOoPEjFespdbiTyK6bIq5n+w/ee4i0i9nE8M6gOw5l3j6W91P0xltdVGPpwT+/VbL 2uLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="C/yqdvKW"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c8-v6si11485958pfc.136.2018.07.23.23.59.24; Mon, 23 Jul 2018 23:59:38 -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; dkim=pass header.i=@linaro.org header.s=google header.b="C/yqdvKW"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388505AbeGXIDI (ORCPT + 99 others); Tue, 24 Jul 2018 04:03:08 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:37507 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388331AbeGXIDH (ORCPT ); Tue, 24 Jul 2018 04:03:07 -0400 Received: by mail-pg1-f194.google.com with SMTP id n7-v6so2190799pgq.4 for ; Mon, 23 Jul 2018 23:58:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iV83B8R4RN0S46KhJwI/DPsWmsVjF3gQZbNOLfrDO2o=; b=C/yqdvKWveGmKVzfCDCnCkBq5NcFX9WA1yra9YOhCwvn9CfIM1fEOdK1zcjJ0ekASY p6+Ufuwksx9ALn1kqyOHJMbrBNTCPm74x4jxrdTj7H+j5bNDIqHPqIEoCE1nYZexUTJ9 EtEADpmliTcPzQlEruISMb1H0icOglJoQlEj8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iV83B8R4RN0S46KhJwI/DPsWmsVjF3gQZbNOLfrDO2o=; b=t6IjARzmx5DIOiUl0vv+lnldaFchPilwGSmnH8Q+L80GLhQWbEDK+Yl8ZlQsKXk0w5 zitoE9pdx6kIaJvvS3OqahZInasmyf6Mn/gUCIeDFpWJu0LGh0EeM2u4IPc3znmCVsEw uQFaeLTZDfcyWZebds0IvbEodm27Xyh09+WXxozl9ae2/+AlpBZsodPk5RTPFOzQx8U4 +jOvE3tmt+APF+h4vLK+kWITbJFqcFp3IQFLmJUP+Cc1Ru3tk4a4hfGb2VkQtOQQQdv7 U20WhkdN2WBQ2VQlIPFLgH1rhD1yhMRlbC38/09jIM9CKbeYYIzFnfl/EexyV5twv31b h+pQ== X-Gm-Message-State: AOUpUlEF81cOFd3W+Xl/E1BCJwhV07aUDAU3NSE/bihOGDOl36L1yKf6 rXxfGR6sn9JGvtJVyUjaQRwv4g== X-Received: by 2002:a62:e00a:: with SMTP id f10-v6mr16513182pfh.208.1532415489663; Mon, 23 Jul 2018 23:58:09 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id t14-v6sm11418710pgu.0.2018.07.23.23.58.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Jul 2018 23:58:09 -0700 (PDT) From: AKASHI Takahiro To: catalin.marinas@arm.com, will.deacon@arm.com, dhowells@redhat.com, vgoyal@redhat.com, herbert@gondor.apana.org.au, davem@davemloft.net, dyoung@redhat.com, bhe@redhat.com, arnd@arndb.de, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com Cc: ard.biesheuvel@linaro.org, james.morse@arm.com, bhsharma@redhat.com, kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, AKASHI Takahiro Subject: [PATCH v12 07/16] arm64: add image head flag definitions Date: Tue, 24 Jul 2018 15:57:50 +0900 Message-Id: <20180724065759.19186-8-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180724065759.19186-1-takahiro.akashi@linaro.org> References: <20180724065759.19186-1-takahiro.akashi@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Those image head's flags will be used later by kexec_file loader. Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Acked-by: James Morse --- arch/arm64/include/asm/boot.h | 15 +++++++++++++++ arch/arm64/kernel/head.S | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/boot.h b/arch/arm64/include/asm/boot.h index 355e552a9175..0bab7eed3012 100644 --- a/arch/arm64/include/asm/boot.h +++ b/arch/arm64/include/asm/boot.h @@ -5,6 +5,21 @@ #include +#define ARM64_MAGIC "ARM\x64" + +#define HEAD_FLAG_BE_SHIFT 0 +#define HEAD_FLAG_PAGE_SIZE_SHIFT 1 +#define HEAD_FLAG_BE_MASK 0x1 +#define HEAD_FLAG_PAGE_SIZE_MASK 0x3 + +#define HEAD_FLAG_BE 1 +#define HEAD_FLAG_PAGE_SIZE_4K 1 +#define HEAD_FLAG_PAGE_SIZE_16K 2 +#define HEAD_FLAG_PAGE_SIZE_64K 3 + +#define head_flag_field(flags, field) \ + (((flags) >> field##_SHIFT) & field##_MASK) + /* * arm64 requires the DTB to be 8 byte aligned and * not exceed 2MB in size. diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index b0853069702f..8cbac6232ed1 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -91,7 +91,7 @@ _head: .quad 0 // reserved .quad 0 // reserved .quad 0 // reserved - .ascii "ARM\x64" // Magic number + .ascii ARM64_MAGIC // Magic number #ifdef CONFIG_EFI .long pe_header - _head // Offset to the PE header. -- 2.18.0