Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp395116imm; Thu, 27 Sep 2018 23:49:30 -0700 (PDT) X-Google-Smtp-Source: ACcGV6352iYsTkrL39muN+YoVckWWzdxAkyCdaTNENcXs6lhlCE3gddKF9AFVOkXSkqjmtgiVLsV X-Received: by 2002:a63:b95e:: with SMTP id v30-v6mr13405687pgo.221.1538117370909; Thu, 27 Sep 2018 23:49:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538117370; cv=none; d=google.com; s=arc-20160816; b=hpjrtTjeYQlRSxMpR1hHyY/vtt9ZqOTqY9G6hg1z2tbnxthrIALcDvTKLqynacss2J bcN6NPe/17aTJIflIkggWHy2Cc5S0TqaRXmQmcPrLdNzlZs78UjBIvm0/g+BQ0PkMcpM AXW3D/+B+Vl2CN3o/mFOIwF5gDGVHr0G41wKSsOCBy6gu6Krcm4oa5+hZf2zTsK1pDf0 wM7D1+HvwJWIv6DUhGXgy8XzzlsAxRcMVNx0h03cfKjZIt0WWIyroU/1ucjw43rYONly P92q+g/4KudRcC8HFrqTRyUYVWqNLygg6UlJtgwyLtGLJAMgA7J6YJdzh3Y9+ItUDZQS LfZg== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PN5LeK8svtoziSd5ZB0HR3YbxUdhrZV+lLkgGkSy5ww=; b=ethTGBJg4oYkPlsrP8uskHfdYIT5yBKIcmtrOZyZiAMLe1AGVygvlAdvRAHfPXtmSH PrxNDmF+xU/5rz16dmY7AvdzMBnPqhzNmqyPWChtXiBN9h5UDvMDY7NGrJm5K1h5akAD Gr8sgqbpcyhjbewe9f772qZVntAIScWObZMWJL80Fs3GXX6rfzZ9Al9L89zFXNiT/lFX PGAJmiCBmUwu/CcuNf42uGNT5IysxRzhCeQiUdO8fNGxVftFgfMWbWE0IwrDMtoEybHN UrgOX0L9fe9CUioeHbqbQwzMcQQAo95GMkgOx22EAtxEFHZV9lDjQKwX60A8fooOKZ/A jyBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Sr+o5pxe; 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 m16-v6si3931238pfh.92.2018.09.27.23.49.15; Thu, 27 Sep 2018 23:49:30 -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=Sr+o5pxe; 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 S1729093AbeI1NKm (ORCPT + 99 others); Fri, 28 Sep 2018 09:10:42 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:32980 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726473AbeI1NKm (ORCPT ); Fri, 28 Sep 2018 09:10:42 -0400 Received: by mail-pg1-f193.google.com with SMTP id y18-v6so3749854pge.0 for ; Thu, 27 Sep 2018 23:48:28 -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 :mime-version:content-transfer-encoding; bh=PN5LeK8svtoziSd5ZB0HR3YbxUdhrZV+lLkgGkSy5ww=; b=Sr+o5pxeVXKOqw06DTNMIn4lVoKNr0kR4J9mRDFNopsLcBVTUokarh6DZcfsqDq0QC OFUT3k1jL133SZm3xC4fX3bXuVzu2TXeJOiVSRDTXzLuLjuV+vhNHNBPSMoCQPUanvUr P7wYBet1ILkC9dYZAI7aZV24GEykbffCAJv4w= 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:mime-version:content-transfer-encoding; bh=PN5LeK8svtoziSd5ZB0HR3YbxUdhrZV+lLkgGkSy5ww=; b=BLjC/Hyui3REFugWfju7yziW7VS8319uvRgUPdZNVUa35k1o0jThRMnZKgxvwTc93W qqNkhEsTlerNElNNu5BTMxsil/X0OW2VF3UDscf+hVpJUCcfV9HANiYOCcE6vDT8g7Yd 0JkTlYTNhNfjp3bux8dk7wtjkX2FkF2TBVEaAphtJnMzqVDAjgv+QOYOgGRFHTUsXqmp dTJgmfwoBAQNz1Jl5MkI0ADr959G4aypgPndQKgOtZZkTgGH7ntfrccLKNM47JHVwEff RA51V38By/zi+n81/jeq6NvDZdcGPQyxbZpZEgvyn1dJWeXiKRPWySn7pErap2jqTlAo ouTA== X-Gm-Message-State: ABuFfojQ1Z8VS77OyNpQbCTN62Of6oMCwo06xps6ll/j9nhT0XLnjPGk rDlVDWkOjts4V9I9vlJpKjxoVQ== X-Received: by 2002:a17:902:c01:: with SMTP id 1-v6mr14301101pls.122.1538117307811; Thu, 27 Sep 2018 23:48:27 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id 3-v6sm6995090pfq.10.2018.09.27.23.48.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 23:48:26 -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 v15 07/16] arm64: add image head flag definitions Date: Fri, 28 Sep 2018 15:48:32 +0900 Message-Id: <20180928064841.14117-8-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180928064841.14117-1-takahiro.akashi@linaro.org> References: <20180928064841.14117-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.19.0