1
0
فهرست منبع

ppc: add more cpu types, add mpc8544ds qemu sample

Waldemar Brodkorb 7 سال پیش
والد
کامیت
a8de6415b2

+ 75 - 1
target/config/Config.in.cpu

@@ -1060,6 +1060,50 @@ config ADK_TARGET_CPU_PPC_7400
 	select ADK_TARGET_SUPPORTS_LT
 	select ADK_TARGET_SUPPORTS_NPTL
 	select ADK_TARGET_WITH_MMU
+	select ADK_TARGET_ARCH_PPC_WITH_ALTIVEC
+	depends on ADK_TARGET_ARCH_PPC
+
+config ADK_TARGET_CPU_PPC_7450
+	bool "7450"
+	select ADK_TARGET_SUPPORTS_THREADS
+	select ADK_TARGET_SUPPORTS_LT
+	select ADK_TARGET_SUPPORTS_NPTL
+	select ADK_TARGET_WITH_MMU
+	select ADK_TARGET_ARCH_PPC_WITH_ALTIVEC
+	depends on ADK_TARGET_ARCH_PPC
+
+config ADK_TARGET_CPU_PPC_750
+	bool "750"
+	select ADK_TARGET_SUPPORTS_THREADS
+	select ADK_TARGET_SUPPORTS_LT
+	select ADK_TARGET_SUPPORTS_NPTL
+	select ADK_TARGET_WITH_MMU
+	depends on ADK_TARGET_ARCH_PPC
+
+config ADK_TARGET_CPU_PPC_8540
+	bool "8540"
+	select ADK_TARGET_SUPPORTS_THREADS
+	select ADK_TARGET_SUPPORTS_LT
+	select ADK_TARGET_SUPPORTS_NPTL
+	select ADK_TARGET_WITH_MMU
+	select ADK_TARGET_ARCH_PPC_WITH_SPE
+	depends on ADK_TARGET_ARCH_PPC
+
+config ADK_TARGET_CPU_PPC_8548
+	bool "8548"
+	select ADK_TARGET_SUPPORTS_THREADS
+	select ADK_TARGET_SUPPORTS_LT
+	select ADK_TARGET_SUPPORTS_NPTL
+	select ADK_TARGET_WITH_MMU
+	select ADK_TARGET_ARCH_PPC_WITH_SPE
+	depends on ADK_TARGET_ARCH_PPC
+
+config ADK_TARGET_CPU_PPC_E500MC
+	bool "e500mc"
+	select ADK_TARGET_SUPPORTS_THREADS
+	select ADK_TARGET_SUPPORTS_LT
+	select ADK_TARGET_SUPPORTS_NPTL
+	select ADK_TARGET_WITH_MMU
 	depends on ADK_TARGET_ARCH_PPC
 
 config ADK_TARGET_CPU_PPC_970
@@ -1068,6 +1112,7 @@ config ADK_TARGET_CPU_PPC_970
 	select ADK_TARGET_SUPPORTS_LT
 	select ADK_TARGET_SUPPORTS_NPTL
 	select ADK_TARGET_WITH_MMU
+	select ADK_TARGET_ARCH_PPC_WITH_ALTIVEC
 	depends on ADK_TARGET_ARCH_PPC
 
 # ppc64
@@ -1080,12 +1125,31 @@ config ADK_TARGET_CPU_PPC64_POWERPC64
 	depends on ADK_TARGET_ARCH_PPC64
 	depends on ADK_TARGET_BIG_ENDIAN
 
+config ADK_TARGET_CPU_PPC64_POWER4
+	bool "power4"
+	select ADK_LINUX_64
+	select ADK_TARGET_SUPPORTS_THREADS
+	select ADK_TARGET_SUPPORTS_NPTL
+	select ADK_TARGET_WITH_MMU
+	depends on ADK_TARGET_ARCH_PPC64
+	depends on ADK_TARGET_BIG_ENDIAN
+
+config ADK_TARGET_CPU_PPC64_POWER5
+	bool "power5"
+	select ADK_LINUX_64
+	select ADK_TARGET_SUPPORTS_THREADS
+	select ADK_TARGET_SUPPORTS_NPTL
+	select ADK_TARGET_WITH_MMU
+	depends on ADK_TARGET_ARCH_PPC64
+	depends on ADK_TARGET_BIG_ENDIAN
+
 config ADK_TARGET_CPU_PPC64_POWER6
 	bool "power6"
 	select ADK_LINUX_64
 	select ADK_TARGET_SUPPORTS_THREADS
 	select ADK_TARGET_SUPPORTS_NPTL
 	select ADK_TARGET_WITH_MMU
+	select ADK_TARGET_ARCH_PPC_WITH_ALTIVEC
 	depends on ADK_TARGET_ARCH_PPC64
 	depends on ADK_TARGET_BIG_ENDIAN
 
@@ -1095,6 +1159,7 @@ config ADK_TARGET_CPU_PPC64_POWER7
 	select ADK_TARGET_SUPPORTS_THREADS
 	select ADK_TARGET_SUPPORTS_NPTL
 	select ADK_TARGET_WITH_MMU
+	select ADK_TARGET_ARCH_PPC_WITH_ALTIVEC
 	depends on ADK_TARGET_ARCH_PPC64
 	depends on ADK_TARGET_BIG_ENDIAN
 
@@ -1104,6 +1169,7 @@ config ADK_TARGET_CPU_PPC64_POWER8
 	select ADK_TARGET_SUPPORTS_THREADS
 	select ADK_TARGET_SUPPORTS_NPTL
 	select ADK_TARGET_WITH_MMU
+	select ADK_TARGET_ARCH_PPC_WITH_ALTIVEC
 	depends on ADK_TARGET_ARCH_PPC64
 
 # riscv 
@@ -1806,6 +1872,9 @@ config ADK_TARGET_CPU_WITH_VT
 config ADK_TARGET_CPU_WITH_MTRR
 	bool
 
+config ADK_TARGET_CPU_WITH_ALTIVEC
+	bool
+
 config ADK_TARGET_CPU_WITH_MMX
 	bool
 
@@ -1851,7 +1920,6 @@ config ADK_TARGET_CPU_WITH_3DNOWEXT
 # for gcc --with-cpu
 config ADK_TARGET_GCC_CPU
 	string
-	default "440" if ADK_TARGET_CPU_PPC_440
 	default "51" if ADK_TARGET_CPU_CF_51
 	default "5206" if ADK_TARGET_CPU_CF_5206
 	default "5206e" if ADK_TARGET_CPU_CF_5206E
@@ -1907,6 +1975,8 @@ config ADK_TARGET_GCC_CPU
 	default "n13" if ADK_TARGET_CPU_NDS32
 	default "powerpc" if ADK_TARGET_CPU_PPC
 	default "powerpc64" if ADK_TARGET_CPU_PPC64_POWERPC64
+	default "power4" if ADK_TARGET_CPU_PPC64_POWER4
+	default "power5" if ADK_TARGET_CPU_PPC64_POWER5
 	default "power6" if ADK_TARGET_CPU_PPC64_POWER6
 	default "power7" if ADK_TARGET_CPU_PPC64_POWER7
 	default "power8" if ADK_TARGET_CPU_PPC64_POWER8
@@ -1915,7 +1985,11 @@ config ADK_TARGET_GCC_CPU
 	default "xscale" if ADK_TARGET_CPU_ARM_XSCALE
 	default "440" if ADK_TARGET_CPU_PPC_440
 	default "740" if ADK_TARGET_CPU_PPC_740
+	default "750" if ADK_TARGET_CPU_PPC_750
 	default "7400" if ADK_TARGET_CPU_PPC_7400
+	default "7450" if ADK_TARGET_CPU_PPC_7450
+	default "8540" if ADK_TARGET_CPU_PPC_8540
+	default "8548" if ADK_TARGET_CPU_PPC_8548
 	default "970" if ADK_TARGET_CPU_PPC_970
 
 # for gcc --with-arch

+ 11 - 0
target/config/Config.in.fpu

@@ -1,6 +1,17 @@
 # This file is part of the OpenADK project. OpenADK is copyrighted
 # material, please see the LICENCE file in the top-level directory.
 
+config ADK_TARGET_ARCH_PPC_WITH_SPE
+	bool
+	default n
+
+config ADK_TARGET_ARCH_PPC_WITH_ALTIVEC
+	bool "enable AltiVec SIMD support"
+	depends on ADK_TARGET_ARCH_PPC && ADK_TARGET_CPU_WITH_ALTIVEC
+	default n
+	help
+	  Enable support for AltiVec SIMD CPU extensions.
+
 config ADK_TARGET_ARCH_ARM_WITH_NEON
 	bool "enable NEON SIMD support"
 	depends on ADK_TARGET_ARCH_ARM && ADK_TARGET_CPU_WITH_NEON

+ 2 - 0
target/config/Config.in.libc

@@ -243,6 +243,7 @@ config ADK_TARGET_SUFFIX
 	default "gnuabi32" if ADK_TARGET_LIB_GLIBC && ADK_TARGET_ABI_O64
 	default "gnu32" if ADK_TARGET_LIB_GLIBC && ADK_TARGET_ABI_32 && ADK_LINUX_64
 	default "gnux32" if ADK_TARGET_LIB_GLIBC && ADK_TARGET_ABI_X32 && ADK_LINUX_64
+	default "gnuspe" if ADK_TARGET_LIB_GLIBC && ADK_TARGET_ARCH_PPC && ADK_TARGET_ARCH_PPC_WITH_SPE
 	default "gnu" if ADK_TARGET_LIB_GLIBC
 	default "uclibceabihf" if ADK_TARGET_LIB_UCLIBC_NG && ADK_TARGET_ARCH_ARM && ADK_TARGET_HARD_FLOAT
 	default "uclibceabi" if ADK_TARGET_LIB_UCLIBC_NG && ADK_TARGET_ARCH_ARM
@@ -251,6 +252,7 @@ config ADK_TARGET_SUFFIX
 	default "uclibcabin32" if ADK_TARGET_LIB_UCLIBC_NG && ADK_TARGET_ABI_N32
 	default "uclibcabi32" if ADK_TARGET_LIB_UCLIBC_NG && ADK_TARGET_ABI_O32
 	default "uclibc32" if ADK_TARGET_LIB_UCLIBC_NG && ADK_TARGET_ABI_32 && ADK_LINUX_64
+	default "uclibcspe" if ADK_TARGET_LIB_UCLIBC_NG && ADK_TARGET_ARCH_PPC && ADK_TARGET_ARCH_PPC_WITH_SPE
 	default "uclibc" if ADK_TARGET_LIB_UCLIBC_NG
 	default "musleabihf" if ADK_TARGET_LIB_MUSL && ADK_TARGET_ARCH_ARM && ADK_TARGET_HARD_FLOAT
 	default "musleabi" if ADK_TARGET_LIB_MUSL && ADK_TARGET_ARCH_ARM

+ 2 - 0
target/linux/config/Config.in.ethernet

@@ -337,6 +337,7 @@ config ADK_KERNEL_E1000
 		ADK_TARGET_SYSTEM_QEMU_MIPS64 || \
 		ADK_TARGET_SYSTEM_QEMU_PPC_MACPPC || \
 		ADK_TARGET_SYSTEM_QEMU_PPC_BAMBOO || \
+		ADK_TARGET_SYSTEM_QEMU_PPC_MPC8544DS || \
 		ADK_TARGET_SYSTEM_QEMU_ALPHA || \
 		ADK_TARGET_SYSTEM_QEMU_SPARC64 || \
 		ADK_TARGET_VBOX || \
@@ -348,6 +349,7 @@ config ADK_KERNEL_E1000
 	default y if ADK_TARGET_SYSTEM_QEMU_MIPS64
 	default y if ADK_TARGET_SYSTEM_QEMU_PPC_MACPPC
 	default y if ADK_TARGET_SYSTEM_QEMU_PPC_BAMBOO
+	default y if ADK_TARGET_SYSTEM_QEMU_PPC_MPC8544DS
 	default y if ADK_TARGET_SYSTEM_QEMU_ALPHA
 	default y if ADK_TARGET_SYSTEM_QEMU_SPARC64
 	default y if ADK_TARGET_VBOX

+ 3 - 1
target/linux/config/Config.in.serial

@@ -86,6 +86,7 @@ config ADK_KERNEL_SERIAL_BFIN
 
 config ADK_KERNEL_SERIAL_8250
 	bool "8250 serial driver"
+	select ADK_KERNEL_SERIAL_8250_CONSOLE
 	select ADK_KERNEL_SERIAL_OF_PLATFORM if ADK_TARGET_SYSTEM_XILINX_KINTEX7 \
 						|| ADK_TARGET_SYSTEM_IMGTEC_CI20 \
 						|| ADK_TARGET_SYSTEM_QEMU_XTENSA \
@@ -99,7 +100,6 @@ config ADK_KERNEL_SERIAL_8250
 	select ADK_KERNEL_SERIAL_8250_DW if ADK_TARGET_SYSTEM_SOLIDRUN_CLEARFOG
 	select ADK_KERNEL_SERIAL_8250_DW if ADK_TARGET_SYSTEM_ORANGE_PI0
 	select ADK_KERNEL_SERIAL_8250_DMA if ADK_TARGET_SYSTEM_ORANGE_PI0
-	select ADK_KERNEL_SERIAL_8250_CONSOLE
 	select ADK_KERNEL_SERIAL_8250_INGENIC if ADK_TARGET_SYSTEM_IMGTEC_CI20
 	depends on ADK_TARGET_SYSTEM_XILINX_KINTEX7 \
 		|| ADK_TARGET_SYSTEM_IMGTEC_CI20 \
@@ -115,6 +115,7 @@ config ADK_KERNEL_SERIAL_8250
 		|| ADK_TARGET_SYSTEM_QEMU_NIOS2 \
 		|| ADK_TARGET_SYSTEM_QEMU_OR1K \
 		|| ADK_TARGET_SYSTEM_QEMU_PPC_BAMBOO \
+		|| ADK_TARGET_SYSTEM_QEMU_PPC_MPC8544DS \
 		|| ADK_TARGET_SYSTEM_QEMU_X86 \
 		|| ADK_TARGET_SYSTEM_QEMU_X86_64 \
 		|| ADK_TARGET_SYSTEM_QEMU_XTENSA \
@@ -141,6 +142,7 @@ config ADK_KERNEL_SERIAL_8250
 	default y if ADK_TARGET_SYSTEM_QEMU_NIOS2
 	default y if ADK_TARGET_SYSTEM_QEMU_OR1K
 	default y if ADK_TARGET_SYSTEM_QEMU_PPC_BAMBOO
+	default y if ADK_TARGET_SYSTEM_QEMU_PPC_MPC8544DS
 	default y if ADK_TARGET_SYSTEM_QEMU_X86
 	default y if ADK_TARGET_SYSTEM_QEMU_X86_64
 	default y if ADK_TARGET_SYSTEM_QEMU_XTENSA

+ 6 - 12
target/ppc/Makefile

@@ -20,6 +20,10 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC_BAMBOO),y)
 QEMU_ARGS+=-M bamboo
 QEMU_ARGS+=-device e1000,netdev=adk0 -netdev user,id=adk0
 endif
+ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC_MPC8544DS),y)
+QEMU_ARGS+=-M mpc8544ds
+QEMU_ARGS+=-device e1000,netdev=adk0 -netdev user,id=adk0
+endif
 
 # target helper text
 ifeq ($(ADK_TARGET_FS),archive)
@@ -69,35 +73,25 @@ kernel-install: kernel-strip
 	@cp $(BUILD_DIR)/$(TARGET_KERNEL) $(FW_DIR)/${TARGET_KERNEL}
 
 dtb-install:
+ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC_VIRTEX_ML507),y)
 	env $(KERNEL_MAKE_ENV) $(MAKE) -C "${LINUX_DIR}" $(KERNEL_MAKE_OPTS) \
 		-j${ADK_MAKE_JOBS} virtex440-ml507.dtb $(MAKE_TRACE)
 	$(CP) $(LINUX_DIR)/arch/powerpc/boot/virtex440-ml507.dtb \
 		$(FW_DIR)/ppc.dtb
+endif
 
 # filesystem specific targets
 ifeq ($(ADK_TARGET_FS),archive)
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC_VIRTEX_ML507),y)
 imageinstall: dtb-install $(FW_DIR)/$(ROOTFSTARBALL) targethelp
-else
-imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) targethelp
-endif
 endif
 ifeq ($(ADK_TARGET_FS),initramfs)
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC_VIRTEX_ML507),y)
 imageinstall: dtb-install kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
-else
-imageinstall: kernel-install $(FW_DIR)/$(INITRAMFS) targethelp
-endif
 endif
 ifeq ($(ADK_TARGET_FS),initramfsarchive)
 imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp
 endif
 ifeq ($(ADK_TARGET_FS),initramfspiggyback)
-ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC_VIRTEX_ML507),y)
 imageinstall: dtb-install createinitramfs targethelp
-else
-imageinstall: createinitramfs targethelp
-endif
 endif
 ifeq ($(ADK_TARGET_FS),nfsroot)
 imageinstall: kernel-install $(FW_DIR)/$(ROOTFSUSERTARBALL) targethelp

+ 11 - 0
target/ppc/kernel/qemu-ppc-mpc8544ds

@@ -0,0 +1,11 @@
+CONFIG_PPC=y
+CONFIG_PPC32=y
+CONFIG_PPC_85xx=y
+CONFIG_E500=y
+CONFIG_FSL_SOC_BOOKE=y
+CONFIG_MPC8540_ADS=y
+CONFIG_MPC85xx_DS=y
+CONFIG_PHYS_64BIT=y
+CONFIG_SPE=y
+CONFIG_PPC_UDBG_16550=y
+CONFIG_DEFAULT_UIMAGE=y

+ 8 - 0
target/ppc/systems/qemu-ppc-mpc8544ds

@@ -0,0 +1,8 @@
+config ADK_TARGET_SYSTEM_QEMU_PPC_MPC8544DS
+	bool "Qemu Emulator (mpc8544ds)"
+	select ADK_TARGET_QEMU
+	select ADK_TARGET_CPU_PPC_8548
+	select ADK_TARGET_KERNEL_WITH_COMPRESSION
+	help
+ 	  Support for Qemu Emulator PPC architecture (mpc8544ds).
+