mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Raphael Poggi <poggi.raph@gmail.com>
To: barebox@lists.infradead.org
Cc: Raphael Poggi <poggi.raph@gmail.com>
Subject: [PATCH v5 01/14] arm64: add armv8 Kconfig entries
Date: Mon,  4 Jul 2016 13:52:44 +0200	[thread overview]
Message-ID: <1467633177-22478-2-git-send-email-poggi.raph@gmail.com> (raw)
In-Reply-To: <1467633177-22478-1-git-send-email-poggi.raph@gmail.com>

Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
---
 arch/arm/Kconfig     | 23 +++++++++++++++++++++++
 arch/arm/cpu/Kconfig | 33 ++++++++++++++++++++++++++++++++-
 2 files changed, 55 insertions(+), 1 deletion(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 1fc887b..986fdaa 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -315,6 +315,29 @@ config ARM_BOARD_APPEND_ATAG
 
 endmenu
 
+choice
+	prompt "Barebox code model"
+	help
+	  You should only select this option if you have a workload that
+	  actually benefits from 64-bit processing or if your machine has
+	  large memory. You will only be presented a single option in this
+	  menu if your system does not support both 32-bit and 64-bit modes.
+
+config 32BIT
+	bool "32-bit barebox"
+	depends on CPU_SUPPORTS_32BIT_KERNEL && SYS_SUPPORTS_32BIT_KERNEL
+	help
+	  Select this option if you want to build a 32-bit barebox.
+
+config 64BIT
+	bool "64-bit barebox"
+	depends on CPU_SUPPORTS_64BIT_KERNEL && SYS_SUPPORTS_64BIT_KERNEL
+	select ARCH_DMA_ADDR_T_64BIT
+	help
+	  Select this option if you want to build a 64-bit barebox.
+
+endchoice
+
 menu "ARM specific settings"
 
 config ARM_OPTIMZED_STRING_FUNCTIONS
diff --git a/arch/arm/cpu/Kconfig b/arch/arm/cpu/Kconfig
index 4f5d9b6..450a6d5 100644
--- a/arch/arm/cpu/Kconfig
+++ b/arch/arm/cpu/Kconfig
@@ -1,8 +1,14 @@
 comment "Processor Type"
 
+config PHYS_ADDR_T_64BIT
+	bool
+
 config CPU_32
 	bool
-	default y
+
+config CPU_64
+	bool
+	select PHYS_ADDR_T_64BIT
 
 # Select CPU types depending on the architecture selected. This selects
 # which CPUs we support in the kernel image, and the compiler instruction
@@ -69,6 +75,12 @@ config CPU_V7
 	bool
 	select CPU_32v7
 
+# ARMv8
+config CPU_V8
+	bool
+	select CPU_64v8
+	select CPU_SUPPORTS_64BIT_KERNEL
+
 config CPU_XSC3
         bool
         select CPU_32v4T
@@ -84,15 +96,23 @@ config CPU_XSCALE
 # This defines the compiler instruction set which depends on the machine type.
 config CPU_32v4T
 	bool
+	select CPU_32
 
 config CPU_32v5
 	bool
+	select CPU_32
 
 config CPU_32v6
 	bool
+	select CPU_32
 
 config CPU_32v7
 	bool
+	select CPU_32
+
+config CPU_64v8
+	bool
+	select CPU_64
 
 comment "processor features"
 
@@ -124,3 +144,14 @@ config CACHE_L2X0
 	bool "Enable L2x0 PrimeCell"
 	depends on MMU && ARCH_HAS_L2X0
 
+config SYS_SUPPORTS_32BIT_KERNEL
+	bool
+
+config SYS_SUPPORTS_64BIT_KERNEL
+	bool
+
+config CPU_SUPPORTS_32BIT_KERNEL
+	bool
+
+config CPU_SUPPORTS_64BIT_KERNEL
+	bool
-- 
2.1.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2016-07-04 11:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-04 11:52 [PATCH v5 0/14] Add basic support for arm64 Raphael Poggi
2016-07-04 11:52 ` Raphael Poggi [this message]
2016-07-04 11:52 ` [PATCH v5 02/14] arm: Makefile: rework makefile to handle armv8 Raphael Poggi
2016-07-04 11:52 ` [PATCH v5 03/14] arm: rework lib directory to support arm64 Raphael Poggi
2016-07-04 11:52 ` [PATCH v5 04/14] arm: cpu: add arm64 specific code Raphael Poggi
2016-07-04 11:52 ` [PATCH v5 05/14] arm: include: system: add arm64 helper functions Raphael Poggi
2016-07-04 11:52 ` [PATCH v5 06/14] arm: include: bitops: arm64 use generic __fls Raphael Poggi
2016-07-04 11:52 ` [PATCH v5 07/14] arm: include: system_info: add armv8 identification Raphael Poggi
2016-07-04 11:52 ` [PATCH v5 08/14] arm: cpu: cpuinfo: add armv8 support Raphael Poggi
2016-07-04 11:52 ` [PATCH v5 09/14] arm: cpu: disable code portion in armv8 case Raphael Poggi
2016-07-04 11:52 ` [PATCH v5 10/14] arm: cpu: add basic arm64 mmu support Raphael Poggi
2016-07-04 11:52 ` [PATCH v5 11/14] arm: boards: add mach-qemu and virt64 board Raphael Poggi
2016-07-04 11:52 ` [PATCH v5 12/14] arm: include: swab: use rigth assembly for armv8 Raphael Poggi
2016-07-04 11:52 ` [PATCH v5 13/14] uimage: add define for ARM64 architecture Raphael Poggi
2016-07-04 11:52 ` [PATCH v5 14/14] Documentation: add aarch64-qemu-virt board doc Raphael Poggi
2016-07-06  8:37 ` [PATCH v5 0/14] Add basic support for arm64 Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1467633177-22478-2-git-send-email-poggi.raph@gmail.com \
    --to=poggi.raph@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox