From c22ad581c80d276bc5509b7a8be79784b14a60af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= Date: Fri, 30 Nov 2018 00:06:50 +0100 Subject: [PATCH] arch/power8: Rename to ppc64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit POWER8 is a specific implementation of ppc64, which is by now outdated (POWER9 has been on the market for a while). Rename arch/power8/ to potentially cover a wider range of hardware. TEST=Toolchains built before/after this commit can build coreboot for emulation/qemu-power8 from before/after this commit. Change-Id: I2d6f08b12a9ffc8a652ddcd6f24ad85ecb33ca52 Signed-off-by: Jonathan Neuschäfer Reviewed-on: https://review.coreboot.org/c/29943 Tested-by: build bot (Jenkins) Reviewed-by: Timothy Pearson --- .../releases/coreboot-4.9-relnotes.md | 2 ++ MAINTAINERS | 4 +-- src/arch/power8/Kconfig | 25 ------------------- src/arch/ppc64/Kconfig | 25 +++++++++++++++++++ src/arch/{power8 => ppc64}/Makefile.inc | 20 +++++++-------- src/arch/{power8 => ppc64}/boot.c | 0 src/arch/{power8 => ppc64}/bootblock.S | 0 src/arch/{power8 => ppc64}/id.ld | 0 .../include/arch/byteorder.h | 0 .../{power8 => ppc64}/include/arch/cache.h | 0 .../{power8 => ppc64}/include/arch/cbconfig.h | 0 src/arch/{power8 => ppc64}/include/arch/cpu.h | 8 +++--- .../include/arch/early_variables.h | 0 .../include/arch/exception.h | 0 .../{power8 => ppc64}/include/arch/header.ld | 0 src/arch/{power8 => ppc64}/include/arch/hlt.h | 0 src/arch/{power8 => ppc64}/include/arch/io.h | 0 .../include/arch/memlayout.h | 0 .../{power8 => ppc64}/include/arch/stages.h | 0 src/arch/{power8 => ppc64}/include/stdint.h | 6 ++--- src/arch/{power8 => ppc64}/misc.c | 0 src/arch/{power8 => ppc64}/prologue.inc | 0 src/arch/{power8 => ppc64}/rom_media.c | 0 src/arch/{power8 => ppc64}/stages.c | 0 src/arch/{power8 => ppc64}/tables.c | 0 src/cpu/qemu-power8/Kconfig | 8 +++--- src/device/Kconfig | 2 +- src/mainboard/emulation/qemu-power8/Kconfig | 4 +-- toolchain.inc | 6 ++--- util/crossgcc/Makefile | 8 +++--- util/crossgcc/Makefile.inc | 2 +- util/lint/check_lint_tests | 2 +- util/xcompile/xcompile | 8 +++--- 33 files changed, 66 insertions(+), 64 deletions(-) delete mode 100644 src/arch/power8/Kconfig create mode 100644 src/arch/ppc64/Kconfig rename src/arch/{power8 => ppc64}/Makefile.inc (88%) rename src/arch/{power8 => ppc64}/boot.c (100%) rename src/arch/{power8 => ppc64}/bootblock.S (100%) rename src/arch/{power8 => ppc64}/id.ld (100%) rename src/arch/{power8 => ppc64}/include/arch/byteorder.h (100%) rename src/arch/{power8 => ppc64}/include/arch/cache.h (100%) rename src/arch/{power8 => ppc64}/include/arch/cbconfig.h (100%) rename src/arch/{power8 => ppc64}/include/arch/cpu.h (87%) rename src/arch/{power8 => ppc64}/include/arch/early_variables.h (100%) rename src/arch/{power8 => ppc64}/include/arch/exception.h (100%) rename src/arch/{power8 => ppc64}/include/arch/header.ld (100%) rename src/arch/{power8 => ppc64}/include/arch/hlt.h (100%) rename src/arch/{power8 => ppc64}/include/arch/io.h (100%) rename src/arch/{power8 => ppc64}/include/arch/memlayout.h (100%) rename src/arch/{power8 => ppc64}/include/arch/stages.h (100%) rename src/arch/{power8 => ppc64}/include/stdint.h (96%) rename src/arch/{power8 => ppc64}/misc.c (100%) rename src/arch/{power8 => ppc64}/prologue.inc (100%) rename src/arch/{power8 => ppc64}/rom_media.c (100%) rename src/arch/{power8 => ppc64}/stages.c (100%) rename src/arch/{power8 => ppc64}/tables.c (100%) diff --git a/Documentation/releases/coreboot-4.9-relnotes.md b/Documentation/releases/coreboot-4.9-relnotes.md index c59744e522..a24266a6f8 100644 --- a/Documentation/releases/coreboot-4.9-relnotes.md +++ b/Documentation/releases/coreboot-4.9-relnotes.md @@ -23,6 +23,8 @@ General changes * Add bootblock compression capability: on systems that copy the bootblock from very slow flash to ERAM, allow adding a stub that decompresses the bootblock into ERAM to minimize the amount of flash reads +* Rename the POWER8 architecture port to PPC64 to reflect that it isn't limited + to POWER8 Toolchain --------- diff --git a/MAINTAINERS b/MAINTAINERS index 810bb353d8..e70a15c4d8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -144,11 +144,11 @@ F: src/mainboard/emulation/*-riscv/ F: src/mainboard/sifive/ F: util/riscv/ -POWER8 ARCHITECTURE +PPC64 ARCHITECTURE M: Ronald Minnich M: Timothy Pearson S: Maintained -F: src/arch/power8/ +F: src/arch/ppc64/ F: src/cpu/qemu-power8/ F: src/mainboard/emulation/qemu-power8/ diff --git a/src/arch/power8/Kconfig b/src/arch/power8/Kconfig deleted file mode 100644 index 476de2b3a6..0000000000 --- a/src/arch/power8/Kconfig +++ /dev/null @@ -1,25 +0,0 @@ -config ARCH_POWER8 - bool - default n - -config ARCH_BOOTBLOCK_POWER8 - bool - default n - select ARCH_POWER8 - select BOOTBLOCK_CUSTOM - select C_ENVIRONMENT_BOOTBLOCK - select ARCH_VERSTAGE_POWER8 - select ARCH_ROMSTAGE_POWER8 - select ARCH_RAMSTAGE_POWER8 - -config ARCH_VERSTAGE_POWER8 - bool - default n - -config ARCH_ROMSTAGE_POWER8 - bool - default n - -config ARCH_RAMSTAGE_POWER8 - bool - default n diff --git a/src/arch/ppc64/Kconfig b/src/arch/ppc64/Kconfig new file mode 100644 index 0000000000..9e37bfc15f --- /dev/null +++ b/src/arch/ppc64/Kconfig @@ -0,0 +1,25 @@ +config ARCH_PPC64 + bool + default n + +config ARCH_BOOTBLOCK_PPC64 + bool + default n + select ARCH_PPC64 + select BOOTBLOCK_CUSTOM + select C_ENVIRONMENT_BOOTBLOCK + select ARCH_VERSTAGE_PPC64 + select ARCH_ROMSTAGE_PPC64 + select ARCH_RAMSTAGE_PPC64 + +config ARCH_VERSTAGE_PPC64 + bool + default n + +config ARCH_ROMSTAGE_PPC64 + bool + default n + +config ARCH_RAMSTAGE_PPC64 + bool + default n diff --git a/src/arch/power8/Makefile.inc b/src/arch/ppc64/Makefile.inc similarity index 88% rename from src/arch/power8/Makefile.inc rename to src/arch/ppc64/Makefile.inc index 98f9db196c..99d86345ac 100644 --- a/src/arch/power8/Makefile.inc +++ b/src/arch/ppc64/Makefile.inc @@ -16,14 +16,14 @@ ## ################################################################################ -power8_flags = -I$(src)/arch/power8/ -mbig-endian -mcpu=power8 -mtune=power8 +ppc64_flags = -I$(src)/arch/ppc64/ -mbig-endian -mcpu=power8 -mtune=power8 -power8_asm_flags = +ppc64_asm_flags = ################################################################################ ## bootblock ################################################################################ -ifeq ($(CONFIG_ARCH_BOOTBLOCK_POWER8),y) +ifeq ($(CONFIG_ARCH_BOOTBLOCK_PPC64),y) bootblock-y = bootblock.S stages.c bootblock-y += boot.c @@ -35,7 +35,7 @@ bootblock-y += \ $(top)/src/lib/memmove.c \ $(top)/src/lib/memset.c -bootblock-generic-ccopts += $(power8_flags) +bootblock-generic-ccopts += $(ppc64_flags) $(objcbfs)/bootblock.debug: $$(bootblock-objs) @printf " LINK $(subst $(obj)/,,$(@))\n" @@ -48,7 +48,7 @@ endif ################################################################################ ## romstage ################################################################################ -ifeq ($(CONFIG_ARCH_ROMSTAGE_POWER8),y) +ifeq ($(CONFIG_ARCH_ROMSTAGE_PPC64),y) romstage-y += boot.c romstage-y += stages.c @@ -68,15 +68,15 @@ $(objcbfs)/romstage.debug: $$(romstage-objs) @printf " LINK $(subst $(obj)/,,$(@))\n" $(LD_romstage) $(LDFLAGS_romstage) -o $@ -L$(obj) -T $(call src-to-obj,romstage,src/mainboard/$(MAINBOARDDIR)/memlayout.ld) --whole-archive --start-group $(filter-out %.ld,$(romstage-objs)) --end-group $(COMPILER_RT_romstage) -romstage-c-ccopts += $(power8_flags) -romstage-S-ccopts += $(power8_asm_flags) +romstage-c-ccopts += $(ppc64_flags) +romstage-S-ccopts += $(ppc64_asm_flags) endif ################################################################################ ## ramstage ################################################################################ -ifeq ($(CONFIG_ARCH_RAMSTAGE_POWER8),y) +ifeq ($(CONFIG_ARCH_RAMSTAGE_PPC64),y) ramstage-y += rom_media.c ramstage-y += stages.c @@ -102,7 +102,7 @@ $(objcbfs)/ramstage.debug: $$(ramstage-objs) @printf " CC $(subst $(obj)/,,$(@))\n" $(LD_ramstage) $(LDFLAGS_ramstage) -o $@ -L$(obj) -T $(call src-to-obj,ramstage,src/mainboard/$(MAINBOARDDIR)/memlayout.ld) --whole-archive --start-group $(filter-out %.ld,$(ramstage-objs)) --end-group $(COMPILER_RT_ramstage) -ramstage-c-ccopts += $(power8_flags) -ramstage-S-ccopts += $(power8_asm_flags) +ramstage-c-ccopts += $(ppc64_flags) +ramstage-S-ccopts += $(ppc64_asm_flags) endif diff --git a/src/arch/power8/boot.c b/src/arch/ppc64/boot.c similarity index 100% rename from src/arch/power8/boot.c rename to src/arch/ppc64/boot.c diff --git a/src/arch/power8/bootblock.S b/src/arch/ppc64/bootblock.S similarity index 100% rename from src/arch/power8/bootblock.S rename to src/arch/ppc64/bootblock.S diff --git a/src/arch/power8/id.ld b/src/arch/ppc64/id.ld similarity index 100% rename from src/arch/power8/id.ld rename to src/arch/ppc64/id.ld diff --git a/src/arch/power8/include/arch/byteorder.h b/src/arch/ppc64/include/arch/byteorder.h similarity index 100% rename from src/arch/power8/include/arch/byteorder.h rename to src/arch/ppc64/include/arch/byteorder.h diff --git a/src/arch/power8/include/arch/cache.h b/src/arch/ppc64/include/arch/cache.h similarity index 100% rename from src/arch/power8/include/arch/cache.h rename to src/arch/ppc64/include/arch/cache.h diff --git a/src/arch/power8/include/arch/cbconfig.h b/src/arch/ppc64/include/arch/cbconfig.h similarity index 100% rename from src/arch/power8/include/arch/cbconfig.h rename to src/arch/ppc64/include/arch/cbconfig.h diff --git a/src/arch/power8/include/arch/cpu.h b/src/arch/ppc64/include/arch/cpu.h similarity index 87% rename from src/arch/power8/include/arch/cpu.h rename to src/arch/ppc64/include/arch/cpu.h index a4421e57c2..3238bfbf32 100644 --- a/src/arch/power8/include/arch/cpu.h +++ b/src/arch/ppc64/include/arch/cpu.h @@ -36,10 +36,10 @@ struct cpu_info { #endif }; -struct cpuinfo_power8 { - uint8_t power8; /* CPU family */ - uint8_t power8_vendor; /* CPU vendor */ - uint8_t power8_model; +struct cpuinfo_ppc64 { + uint8_t ppc64; /* CPU family */ + uint8_t ppc64_vendor; /* CPU vendor */ + uint8_t ppc64_model; }; #endif diff --git a/src/arch/power8/include/arch/early_variables.h b/src/arch/ppc64/include/arch/early_variables.h similarity index 100% rename from src/arch/power8/include/arch/early_variables.h rename to src/arch/ppc64/include/arch/early_variables.h diff --git a/src/arch/power8/include/arch/exception.h b/src/arch/ppc64/include/arch/exception.h similarity index 100% rename from src/arch/power8/include/arch/exception.h rename to src/arch/ppc64/include/arch/exception.h diff --git a/src/arch/power8/include/arch/header.ld b/src/arch/ppc64/include/arch/header.ld similarity index 100% rename from src/arch/power8/include/arch/header.ld rename to src/arch/ppc64/include/arch/header.ld diff --git a/src/arch/power8/include/arch/hlt.h b/src/arch/ppc64/include/arch/hlt.h similarity index 100% rename from src/arch/power8/include/arch/hlt.h rename to src/arch/ppc64/include/arch/hlt.h diff --git a/src/arch/power8/include/arch/io.h b/src/arch/ppc64/include/arch/io.h similarity index 100% rename from src/arch/power8/include/arch/io.h rename to src/arch/ppc64/include/arch/io.h diff --git a/src/arch/power8/include/arch/memlayout.h b/src/arch/ppc64/include/arch/memlayout.h similarity index 100% rename from src/arch/power8/include/arch/memlayout.h rename to src/arch/ppc64/include/arch/memlayout.h diff --git a/src/arch/power8/include/arch/stages.h b/src/arch/ppc64/include/arch/stages.h similarity index 100% rename from src/arch/power8/include/arch/stages.h rename to src/arch/ppc64/include/arch/stages.h diff --git a/src/arch/power8/include/stdint.h b/src/arch/ppc64/include/stdint.h similarity index 96% rename from src/arch/power8/include/stdint.h rename to src/arch/ppc64/include/stdint.h index 8cb34eea75..6425824439 100644 --- a/src/arch/power8/include/stdint.h +++ b/src/arch/ppc64/include/stdint.h @@ -11,8 +11,8 @@ * GNU General Public License for more details. */ -#ifndef POWER8_STDINT_H -#define POWER8_STDINT_H +#ifndef PPC64_STDINT_H +#define PPC64_STDINT_H /* Exact integral types */ typedef unsigned char uint8_t; @@ -73,4 +73,4 @@ typedef uint8_t bool; typedef s64 intptr_t; typedef u64 uintptr_t; -#endif /* POWER8_STDINT_H */ +#endif /* PPC64_STDINT_H */ diff --git a/src/arch/power8/misc.c b/src/arch/ppc64/misc.c similarity index 100% rename from src/arch/power8/misc.c rename to src/arch/ppc64/misc.c diff --git a/src/arch/power8/prologue.inc b/src/arch/ppc64/prologue.inc similarity index 100% rename from src/arch/power8/prologue.inc rename to src/arch/ppc64/prologue.inc diff --git a/src/arch/power8/rom_media.c b/src/arch/ppc64/rom_media.c similarity index 100% rename from src/arch/power8/rom_media.c rename to src/arch/ppc64/rom_media.c diff --git a/src/arch/power8/stages.c b/src/arch/ppc64/stages.c similarity index 100% rename from src/arch/power8/stages.c rename to src/arch/ppc64/stages.c diff --git a/src/arch/power8/tables.c b/src/arch/ppc64/tables.c similarity index 100% rename from src/arch/power8/tables.c rename to src/arch/ppc64/tables.c diff --git a/src/cpu/qemu-power8/Kconfig b/src/cpu/qemu-power8/Kconfig index d273cc3a00..c1f8309795 100644 --- a/src/cpu/qemu-power8/Kconfig +++ b/src/cpu/qemu-power8/Kconfig @@ -15,7 +15,7 @@ config CPU_QEMU_POWER8 bool - select ARCH_BOOTBLOCK_POWER8 - select ARCH_VERSTAGE_POWER8 - select ARCH_ROMSTAGE_POWER8 - select ARCH_RAMSTAGE_POWER8 + select ARCH_BOOTBLOCK_PPC64 + select ARCH_VERSTAGE_PPC64 + select ARCH_ROMSTAGE_PPC64 + select ARCH_RAMSTAGE_PPC64 diff --git a/src/device/Kconfig b/src/device/Kconfig index 016e1047a4..66f57d96ca 100644 --- a/src/device/Kconfig +++ b/src/device/Kconfig @@ -85,7 +85,7 @@ config MAINBOARD_USE_LIBGFXINIT # TODO: Explain differences (if any) for onboard cards. config VGA_ROM_RUN bool "Run VGA Option ROMs" - depends on PCI && (ARCH_X86 || ARCH_POWER8) && !MAINBOARD_FORCE_NATIVE_VGA_INIT + depends on PCI && (ARCH_X86 || ARCH_PPC64) && !MAINBOARD_FORCE_NATIVE_VGA_INIT select HAVE_VGA_TEXT_FRAMEBUFFER help Execute VGA Option ROMs in coreboot if found. This can be used diff --git a/src/mainboard/emulation/qemu-power8/Kconfig b/src/mainboard/emulation/qemu-power8/Kconfig index 3b8f3c7b5c..66a3d8c25f 100644 --- a/src/mainboard/emulation/qemu-power8/Kconfig +++ b/src/mainboard/emulation/qemu-power8/Kconfig @@ -20,9 +20,9 @@ if BOARD_EMULATION_QEMU_POWER8 config BOARD_SPECIFIC_OPTIONS def_bool y select BOARD_ROMSIZE_KB_4096 - select ARCH_BOOTBLOCK_POWER8 + select ARCH_BOOTBLOCK_PPC64 select HAVE_UART_SPECIAL - select ARCH_POWER8 + select ARCH_PPC64 select BOOT_DEVICE_NOT_SPI_FLASH select MISSING_BOARD_RESET diff --git a/toolchain.inc b/toolchain.inc index ec57b5d24c..0486287444 100644 --- a/toolchain.inc +++ b/toolchain.inc @@ -57,7 +57,7 @@ ARCHDIR-arm := arm ARCHDIR-arm64 := arm64 ARCHDIR-riscv := riscv ARCHDIR-mips := mips -ARCHDIR-power8 := power8 +ARCHDIR-ppc64 := ppc64 CFLAGS_arm += CFLAGS_arm64 += -mgeneral-regs-only @@ -65,7 +65,7 @@ CFLAGS_mips += -mips32r2 -G 0 -mno-abicalls -fno-pic CFLAGS_riscv += CFLAGS_x86_32 += CFLAGS_x86_64 += -mcmodel=large -mno-red-zone -CFLAGS_power8 += +CFLAGS_ppc64 += # Some boards only provide 2K stacks, so storing lots of data there leads to # problems. Since C rules don't allow us to statically determine the maximum @@ -85,7 +85,7 @@ CFLAGS_arm += -Wstack-usage=1536 CFLAGS_arm64 += -Wstack-usage=1536 CFLAGS_mips += -Wstack-usage=1536 CFLAGS_riscv += -Wstack-usage=1536 -CFLAGS_power8 += -Wstack-usage=1536 +CFLAGS_ppc64 += -Wstack-usage=1536 endif toolchain_to_dir = \ diff --git a/util/crossgcc/Makefile b/util/crossgcc/Makefile index 0c092d7070..a8ea815165 100644 --- a/util/crossgcc/Makefile +++ b/util/crossgcc/Makefile @@ -9,12 +9,12 @@ DEST ?= $(CURDIR)/xgcc all all_with_gdb: $(MAKE) build-i386 build-x64 build-arm build-mips \ - build-riscv build-aarch64 build-power8 build-nds32le \ + build-riscv build-aarch64 build-ppc64 build-nds32le \ build_clang build_iasl build_make all_without_gdb: $(MAKE) SKIP_GDB=1 build-i386 build-x64 build-arm build-mips \ - build-riscv build-aarch64 build-power8 build-nds32le \ + build-riscv build-aarch64 build-ppc64 build-nds32le \ build_clang build_iasl build_make build_tools: build_gcc build_gdb @@ -63,7 +63,7 @@ build-riscv: # GDB is currently not supported on RISC-V @$(MAKE) build_gcc BUILD_PLATFORM=riscv-elf -build-power8: +build-ppc64: @$(MAKE) build_tools BUILD_PLATFORM=powerpc64-linux-gnu build-nds32le: @@ -85,6 +85,6 @@ distclean: clean .PHONY: build_gcc build_iasl build_gdb build_clang all all_with_gdb \ all_without_gdb build_tools build-i386 build-x64 build-arm \ - build-aarch64 build-mips build-riscv build-power8 build-nds32le \ + build-aarch64 build-mips build-riscv build-ppc64 build-nds32le \ clean distclean clean_tempfiles .NOTPARALLEL: diff --git a/util/crossgcc/Makefile.inc b/util/crossgcc/Makefile.inc index f4aa36461a..8f8257c2f2 100644 --- a/util/crossgcc/Makefile.inc +++ b/util/crossgcc/Makefile.inc @@ -13,7 +13,7 @@ ## GNU General Public License for more details. ## -TOOLCHAIN_ARCHES := i386 x64 arm aarch64 mips riscv power8 nds32le +TOOLCHAIN_ARCHES := i386 x64 arm aarch64 mips riscv ppc64 nds32le help_toolchain help:: @echo '*** Toolchain targets ***' diff --git a/util/lint/check_lint_tests b/util/lint/check_lint_tests index 5ba33c8e37..6b1860fdae 100755 --- a/util/lint/check_lint_tests +++ b/util/lint/check_lint_tests @@ -6,7 +6,7 @@ UNDERSCORE='_' #lint-stable-000-license-headers TESTFILE000a=src/arch/x86/thread.c -TESTFILE000b=src/arch/power8/misc.c +TESTFILE000b=src/arch/ppc64/misc.c sed -i.bak 's/^[[:space:]]\*[[:space:]].*//' ${TESTFILE000a} sed -i.bak 's/^[[:space:]]\*[[:space:]]but WITHOUT ANY WARRANTY;//' ${TESTFILE000b} diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile index 6d82a4de63..d416e5d387 100755 --- a/util/xcompile/xcompile +++ b/util/xcompile/xcompile @@ -303,7 +303,7 @@ EOF } # Architecture definitions -SUPPORTED_ARCHITECTURES="arm arm64 mipsel riscv x64 x86 power8" +SUPPORTED_ARCHITECTURES="arm arm64 mipsel riscv x64 x86 ppc64" # TARCH: local name for the architecture # (used as CC_${TARCH} in the build system) @@ -366,12 +366,12 @@ arch_config_mipsel() { TENDIAN="EL" } -arch_config_power8() { - TARCH="power8" +arch_config_ppc64() { + TARCH="ppc64" TBFDARCHS="powerpc" TCLIST="powerpc64" TWIDTH="64" - TSUPP="power8" + TSUPP="ppc64" TABI="linux-gnu" # there is no generic ABI on ppc64 CC_RT_EXTRA_GCC="-mcpu=power8 -mbig-endian" }