Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp552761imm; Wed, 1 Aug 2018 01:02:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpePN62C8UOguk6Xzl5vdwc0Yxu6zX4MaFhTqgnyEBvYfnYs0GJfcQ+UraRQELHxae3wQbYV X-Received: by 2002:a63:4951:: with SMTP id y17-v6mr23872986pgk.32.1533110552234; Wed, 01 Aug 2018 01:02:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533110552; cv=none; d=google.com; s=arc-20160816; b=jD0iPOjerwnfLxvFCIRbYXD/AWqND7NT76rRDxlC7dwrM0aJ6jNCatRYHeGcQiXqUB Bmzs/wUA5ndOYS4WcMktObxjjoXpmzcl7LZK7VRnc8YrJLPFX0nf+ji3l3L6/d0WKcD1 IyQbZ9sBF3mJr47eHa65sUoYEk91KVZHQ6VYZ6GqML2V0jCO76cYqia717QHLkD7cn0J qht9adTX3TmM8Kw343od0AQz0hlXgkQhFGvLmzv+RDS1eZRLzjyo4MSllGt2zU3pWpOa 7QyjkSuY+Ojc2Lp6yozWRViCGffLo0HM3oWXEu427W51Jtv0MgY4Gl3csi4c0WPRDMt9 UQMg== 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=yWnxUt6YTTgqds7/BbMSkurU8hPYwXA8vJ7uiSRqWJJIgiWoTgclY8/YfrUzHREvIK DfS2Ejut1VYK/R4xehJVQ52sCrxvIdFu4DMJbCJOOiuv566gF3IBuNSzdhajxjPe1XMt I8BQiRUi/pE9f3hz9NrSGGRYety7+/k26H3KoBsYSbGmfj2ie0tX/xSXGhHAD+0GzQxD McLLFjFNYzKpjiO0L3fviaHnvEjuO+DHsfwiofcc0+RoeuLCmG7yWY5e63WBhVuQIxQE UX4/22QTsteFdw9wr2AfEGOrmV/rM2I31XrQ0KneVPREv0aU9sekTmrhyO5/jhrP/DHu oGQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WXTPUSFB; 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 u190-v6si10510572pgu.305.2018.08.01.01.02.18; Wed, 01 Aug 2018 01:02:32 -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=WXTPUSFB; 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 S2388150AbeHAJox (ORCPT + 99 others); Wed, 1 Aug 2018 05:44:53 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:35387 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387647AbeHAJow (ORCPT ); Wed, 1 Aug 2018 05:44:52 -0400 Received: by mail-pg1-f196.google.com with SMTP id e6-v6so10420376pgv.2 for ; Wed, 01 Aug 2018 01:00:26 -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=WXTPUSFBAaJs3u7G5trMfLp5/+9YTEExILtRGBfs+IJe9vkg2fysxPnpMbwEl9flKD lmPW2tJJl3FVwZhHhcUrzrEVaAZzqxOAZdWJl0cn+FEKabJ78upRQuMSd/7x86eFBg16 Dw+52Me8FRGDb+FHMU+dnXOEvH1CuwLqEZdy4= 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=ncauYQQW7DJnUCfL35DFnpO+5F1bTRkDMrT+M24qR2d4MGOfUXaL1XmsgnTA2bk1I/ nHXvd73uj5DKMWD8CPt5xWuV7VL9YFVKbHmIPeVfB7XnAkj8ICMW5hSfvWisi0SZh2Hj Lzw40wTxVc6sp+W3EsdnAU9qi7y0U/oBGz2xTf8FvuFQgUGjT98u0ifhC6bIr2nQO/H6 5d/Zw5CCUFd8sJVWqRvKX5FEtT/bew50IUkxyADQDMbArRQD/lMvr+YPRdqAOSPzx+J+ gIUoA3de6mhUFFi/igZJa4d2/KvIOQeErUl+l1HAG+Gc+any2ZrfQ2fFd8vcq4aD2STm IMRQ== X-Gm-Message-State: AOUpUlENhhvKwz+CECnXDv03BbNCRwqjon46aspzJh6sMlmMJbCd/pN8 NKrqaAQ9xyILoycoVnWjeqo/jg== X-Received: by 2002:a63:ba43:: with SMTP id l3-v6mr22801896pgu.295.1533110426434; Wed, 01 Aug 2018 01:00:26 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id q78-v6sm30613415pfi.185.2018.08.01.01.00.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Aug 2018 01:00:25 -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: prudo@linux.ibm.com, 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 v13 07/16] arm64: add image head flag definitions Date: Wed, 1 Aug 2018 16:58:11 +0900 Message-Id: <20180801075820.3753-8-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801075820.3753-1-takahiro.akashi@linaro.org> References: <20180801075820.3753-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