summaryrefslogtreecommitdiffstats
path: root/arch/x86
Commit message (Collapse)AuthorAgeFilesLines
* x86: Correct a few progress message nitsSimon Glass2014-10-282-3/+3
| | | | | | | We should use puts() instead of printf() where possible. Also clarify the setup.bin message. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: bootm: Support booting a 64-bit raw kernelSimon Glass2014-10-281-2/+8
| | | | | | Detect an x86_64 kernel and boot it in 64-bit mode. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Move kernel boot function to arch/x86/lib/bootm.cSimon Glass2014-10-284-48/+63
| | | | | | | | The boot_zimage() function is badly named it can also boot a raw kernel. Rename it, and try to avoid pointers for memory addresses as it involves lots of casting. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Add support for starting 64-bit kernelSimon Glass2014-10-284-1/+165
| | | | | | | | Add code to jump to a 64-bit Linux kernel. We need to set up a flat page table structure, a new GDT and then go through a few hoops in the right order. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Display basic CPU information on bootSimon Glass2014-10-282-0/+71
| | | | | | Display the type of CPU (x86 or x86_64) when starting up. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Bring in msr-index.h from linux 3.8Simon Glass2014-10-281-2/+106
| | | | | | Update this file to include x86_64 fields. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Move paging functions into cpu.cSimon Glass2014-10-283-30/+60
| | | | | | | These functions really don't belong in physmem as they relate to the cpu. Move them. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Use correct printf() format string for uintptr_tSimon Glass2014-10-271-1/+2
| | | | | | Use the inttypes header file to provide this. Signed-off-by: Simon Glass <sjg@chromium.org>
* Provide option to avoid defining a custom version of uintptr_t.Gabe Black2014-10-271-0/+5
| | | | | | | | | | | | | | | | | | There's a definition in stdint.h (provided by gcc) which will be more correct if available. Define CONFIG_USE_STDINT to use this feature, or USE_STDINT=1 on the 'make' commmand. This adjusts the settings for x86 and sandbox, with both have 64-bit options. Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-by: Gabe Black <gabeblack@chromium.org> Tested-by: Gabe Black <gabeblack@chromium.org> Reviewed-by: Bill Richardson <wfrichar@google.com> Rewritten to be an option, since stdint.h is often available only in glibc. Changed to preserve a clear boundary between stdint and non-stdint Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: x86: Convert coreboot serial to use driver modelSimon Glass2014-10-232-12/+2
| | | | | | | This makes use of the existing device tree node to use driver model for the serial console. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: x86: dts: Add additional info to the serial port nodeSimon Glass2014-10-232-3/+20
| | | | | | | Add more information so that U-Boot can find the address of the serial port. Also fix the reg-shift value. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: x86: Add a gpio header for corebootSimon Glass2014-10-232-0/+16
| | | | | | | | This code doesn't follow the normal approach of having its arch-specific definitions in an arch-specific directory. Add a new arch-specific file and make use of it. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: x86: Support pre-reloc malloc()Simon Glass2014-10-231-0/+7
| | | | | | Add support for this by reserving a block of memory below global_data. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: x86: Zero global data before board_init_f()Simon Glass2014-10-231-0/+6
| | | | | | | | To permit information to be passed from the early U-Boot code to board_init_f() we cannot zero the global_data in board_init_f(). Instead zero it in the start-up code. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: x86: Remove ebp assembler warning in zimage.cSimon Glass2014-10-231-1/+0
| | | | | | | This code generates warnings with recent gcc versions. We really don't need the clobber specification, so just drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* kconfig: move CONFIG_USE_PRIVATE_LIBGCC to KconfigMasahiro Yamada2014-10-232-2/+3
| | | | | | | | | | | | | | | The private libgcc is supported only on ARM, MIPS, PowerPC, SH, x86. Those architectures should "select" HAVE_PRIVATE_LIBGCC and CONFIG_USE_PRIVATE_LIBGCC should depend on it. Currently, this option is enabled on Tegra boards and x86 architecture. Move the definition from header files to Kconfig. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org> Cc: Stephen Warren <swarren@nvidia.com> Cc: Tom Warren <twarren@nvidia.com>
* x86: set CONFIG_USE_PRIVATE_LIBGCC to yMasahiro Yamada2014-10-233-6/+5
| | | | | | | | | | | | | | | | | | The motivation of this commit is to change CONFIG_USE_PRIVATE_LIBGCC to a boolean macro so we can move it to Kconfig. In the current implementation, there are two forms of syntax for this macro: - CONFIG_USE_PRIVATE_LIBGCC=y - CONFIG_USE_PRIVATE_LIBGCC=path/to/private/libgcc The latter is only used by x86 architecture. With a little bit refactoring, it can be converted to the former. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* x86: Add device tree information for Chrome OS ECSimon Glass2014-10-221-0/+18
| | | | | | Add the required node describing how to find the EC on link. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Fix GDT limit in start16.SBin Meng2014-10-221-1/+1
| | | | | | | GDT limit should be one less than an integral multiple of eight. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* x86: Fix rom version build with CONFIG_X86_RESET_VECTORBin Meng2014-10-221-2/+2
| | | | | | | | | | When building U-Boot with CONFIG_X86_RESET_VECTOR, the linking process misses the resetvec.o and start16.o so it cannot generate the rom version of U-Boot. The arch/x86/cpu/Makefile is updated to pull them into the final linking process. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* x86: Allow cmdline setup in setup_zimage() to be optionalSimon Glass2014-10-221-9/+12
| | | | | | | If we are passing this using the device tree then we may not want to set this up here. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Rewrite bootm.c to make it similar to ARMSimon Glass2014-10-223-53/+130
| | | | | | | | | | | | | The x86 bootm code is quite special, and geared to zimage. Adjust it to support device tree and make it more like the ARM code, with separate bootm stages and functions for each stage. Create a function announce_and_cleanup() to handle printing the "Starting kernel ..." message and put it in bootm so it is in one place and can be used by any loading code. Also move the board_final_cleanup() function into bootm. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Enable LMB and RAMDISK_HIGH by defaultSimon Glass2014-10-221-0/+3
| | | | | | | These options are used by the image code. To allow us to use the generic code more easily, define these for x86. Signed-off-by: Simon Glass <sjg@chromium.org>
* cosmetic: replace MIN, MAX with min, maxMasahiro Yamada2014-09-241-2/+2
| | | | | | | The macro MIN, MAX is defined as the aliase of min, max, respectively. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kconfig: remove redundant "string" type in arch and board KconfigsMasahiro Yamada2014-09-131-1/+0
| | | | | | | | | | | | | | | | | | Now the types of CONFIG_SYS_{ARCH, CPU, SOC, VENDOR, BOARD, CONFIG_NAME} are specified in arch/Kconfig. We can delete the ones in arch and board Kconfig files. This commit can be easily reproduced by the following command: find . -name Kconfig -a ! -path ./arch/Kconfig | xargs sed -i -e ' /config[[:space:]]SYS_\(ARCH\|CPU\|SOC\|\VENDOR\|BOARD\|CONFIG_NAME\)/ { N s/\n[[:space:]]*string// } ' Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kconfig: delete redundant CONFIG_${ARCH} definitionMasahiro Yamada2014-07-301-1/+1
| | | | | | | CONFIG_${ARCH} is defined by Kconfig. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* kconfig: add board Kconfig and defconfig filesMasahiro Yamada2014-07-301-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds: - arch/${ARCH}/Kconfig provide a menu to select target boards - board/${VENDOR}/${BOARD}/Kconfig or board/${BOARD}/Kconfig set CONFIG macros to the appropriate values for each board - configs/${TARGET_BOARD}_defconfig default setting of each board (This commit was automatically generated by a conversion script based on boards.cfg) In Linux Kernel, defconfig files are located under arch/${ARCH}/configs/ directory. It works in Linux Kernel since ARCH is always given from the command line for cross compile. But in U-Boot, ARCH is not given from the command line. Which means we cannot know ARCH until the board configuration is done. That is why all the "*_defconfig" files should be gathered into a single directory ./configs/. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* stdio: Pass device pointer to stdio methodsSimon Glass2014-07-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | At present stdio device functions do not get any clue as to which stdio device is being acted on. Some implementations go to great lengths to work around this, such as defining a whole separate set of functions for each possible device. For driver model we need to associate a stdio_dev with a device. It doesn't seem possible to continue with this work-around approach. Instead, add a stdio_dev pointer to each of the stdio member functions. Note: The serial drivers have the same problem, but it is not strictly necessary to fix that to get driver model running. Also, if we convert serial over to driver model the problem will go away. Code size increases by 244 bytes for Thumb2 and 428 for PowerPC. 22: stdio: Pass device pointer to stdio methods arm: (for 2/2 boards) all +244.0 bss -4.0 text +248.0 powerpc: (for 1/1 boards) all +428.0 text +428.0 Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de> Reviewed-by: Marek Vasut <marex@denx.de>
* stdio: Remove redundant code around stdio_register() callsSimon Glass2014-07-231-4/+0
| | | | | | | | | | | | | There is no point in setting a structure's memory to NULL when it has already been zeroed with memset(). Also, there is no need to create a stub function for stdio to call - if the function is NULL it will not be called. This is a clean-up, with no change in functionality. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de>
* x86: Enable 32-bit build using x86_64 multilib toolchainVasili Galka2014-06-232-3/+4
| | | | | | | | | | | | | Until now building the x86 arch boards required 32-bit toolchain. As many x86_64 toolchains come with 32-bit support (multilib) that's a good idea to enable build with such toolchains. The change required was to specify the usage of 32-bit explicitly to the compiler and the linker (-m32 and -m elf_i386 flags) and locate the right libgcc path. Signed-off-by: Vasili Galka <vvv444@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* Makefile: Support include files for .dts filesSimon Glass2014-06-201-0/+1
| | | | | | | | | | | | Linux supports this, and if we are to have compatible device tree files, U-Boot should also. Avoid giving the device tree files access to U-Boot's include/ directory. Only include/dt-bindings is accessible. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kbuild: move asm-offsets.c from SoC directory to arch/$(ARCH)/libMasahiro Yamada2014-03-281-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot has supported two kinds of asm-offsets.h. One is generic for all architectures and its source is located at ./lib/asm-offsets.c. The other is SoC specific and its source is under SoC directory. The problem here is that only boards with SoC directory can use the asm-offsets infrastructure. Putting asm-offsets.c right under CPU directory does not work. Now a new demand is coming. PowerPC folks want to use asm-offsets. But no PowerPC boards have SoC directory. It seems inconsistent that some boards add asm-offsets.c to SoC directoreis and some to CPU directories. It looks more reasonable to put asm-offsets.c under arch/$(ARCH)/lib. This commit merges asm-offsets.c under SoC directories into arch/$(ARCH)/lib/asm-offsets.c. By the way, I doubt the necessity of some entries in asm-offsets.c. I am leaving refactoring to the board maintainers. Please check "TODO" in the comment blocks in arch/{arm,nds32}/lib/asm-offsets.c. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Yuantian Tang <Yuantian.Tang@freescale.com>
* x86: specify CONFIG_USE_PRIVATE_LIBGCC more simplyMasahiro Yamada2014-03-121-3/+1
| | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Simon Glass <sjg@chromium.org>
* kbuild, x86: use a short log for arch/x86/lib/libgcc.aMasahiro Yamada2014-03-121-2/+3
| | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Simon Glass <sjg@chromium.org>
* kbuild: add CONFIG_ prefix to USE_PRIVATE_LIBGCCMasahiro Yamada2014-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, USE_PRIVATE_LIBGCC was defined in arch-specific config.mk and referenced in arch/$(ARCH)/lib/Makefile. We are not happy about parsing config.mk again and again. We have to keep the same behavior with a different way. By adding "CONFIG_" prefix, this macro appears in include/autoconf.mk, include/spl-autoconf.mk. (And treating USE_PRIVATE_LIBGCC as CONFIG macro is reasonable enough.) Tegra SoC family defined USE_PRIVATE_LIBGCC as "yes" in arch/arm/cpu/arm720t/tegra*/config.mk, whereas did not define it in arch/arm/cpu/armv7/tegra*/config.mk. It means Tegra enables PRIVATE_LIBGCC only for SPL. We can describe the same behavior by adding #ifdef CONFIG_SPL_BUILD # define CONFIG_USE_PRIVATE_LIBGCC #endif to include/configs/tegra-common.h. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Tom Warren <twarren@nvidia.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: Stephen Warren <swarren@nvidia.com>
* x86: Delete redundant compiler flagsMasahiro Yamada2014-03-041-4/+1
| | | | | | | | | | | -Wstrict-prototypes, -ffreestanding, -fno-stack-protector are defined at the top Makefile for all architectures. Do not define them twice for x86. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* dts: generate multiple device tree blobsMasahiro Yamada2014-02-192-0/+13
| | | | | | | | | | | | | It is convenient to have all device trees on the same SoC compiled. It allows for later easy repackaging without the need to re-run the make file. - Build device trees with the same SoC under arch/$(ARCH)/dts - Copy the one specified by CONFIG_DEFAULT_DEVICE_TREE or DEVICE_TREE=... to dts/dt.dtb Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* dts: move device tree sources to arch/$(ARCH)/dts/Masahiro Yamada2014-02-192-0/+59
| | | | | | | | | | | | | | | | | Unlike Linux Kernel, U-Boot historically had *.dts files under board/$(VENDOR)/dts/ and *.dtsi files under arch/$(ARCH)/dts/. I think arch/$(ARCH)/dts dicretory is a better location to store both *.dts and *.dtsi files. For example, before this commit, board/xilinx/dts directory had both Microblaze dts (microblaze-generic.dts) and ARM dts (zynq-*.dts), which are totally unrelated. This commit moves *.dts to arch/$(ARCH)/dts/ directories, allowing us to describe nicely mutiple DTBs generation in the next commit. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* dts: re-write dts/Makefile more simply with KbuildMasahiro Yamada2014-02-191-1/+1
| | | | | | | | | | | Useful rules in scripts/Makefile.lib allows us to easily generate a device tree blob and wrap it in assembly code. We do not need to parse a linker script to get output format and arch. This commit deletes ./u-boot.dtb since it is a copy of dts/dt.dtb. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kbuild: change out-of-tree buildMasahiro Yamada2014-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the working directory where the build process occurs. Before this commit, build process occurred under the source tree for both in-tree and out-of-tree build. That's why we needed to add $(obj) prefix to all generated files in makefiles like follows: $(obj)u-boot.bin: $(obj)u-boot Here, $(obj) is empty for in-tree build, whereas it points to the output directory for out-of-tree build. And our old build system changes the current working directory with "make -C <sub-dir>" syntax when descending into the sub-directories. On the other hand, Kbuild uses a different idea to handle out-of-tree build and directory descending. The build process of Kbuild always occurs under the output tree. When "O=dir/to/store/output/files" is given, the build system changes the current working directory to that directory and restarts the make. Kbuild uses "make -f $(srctree)/scripts/Makefile.build obj=<sub-dir>" syntax for descending into sub-directories. (We can write it like "make $(obj)=<sub-dir>" with a shorthand.) This means the current working directory is always the top of the output directory. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Gerhard Sittig <gsi@denx.de>
* x86: delete unused header filesMasahiro Yamada2014-01-241-193/+0
| | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* cosmetic: remove empty lines at the top of fileMasahiro Yamada2013-11-081-1/+0
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* x86: convert makefiles to Kbuild styleMasahiro Yamada2013-11-014-91/+30
| | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Simon Glass <sjg@chromium.org>
* Coding Style cleanup: remove trailing white spaceWolfgang Denk2013-10-142-2/+2
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* SPDX-License-Identifier: convert BSD-3-Clause filesWolfgang Denk2013-08-193-66/+3
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini Don't remove some copyrights by accident] Signed-off-by: Tom Rini <trini@ti.com>
* config: don't define CONFIG_ARCH_DEVICE_TREEStephen Warren2013-08-021-7/+0
| | | | | | | Now that nothing uses CONFIG_ARCH_DEVICE_TREE, stop defining it. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-2450-814/+50
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* Build arch/$ARCH/lib/bootm.o depending on CONFIG_CMD_BOOTMDirk Eibach2013-07-161-1/+1
| | | | | | | | MAKEALL is fine for ppc4xx and mpc85xx. Run checks were done on our controlcenterd hardware. Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc> Signed-off-by: Andy Fleming <afleming@freescale.com>
* blackfin: x86: bootm: Handle PREP stage of bootmSimon Glass2013-07-121-0/+2
| | | | | | | The OS function is now always called with the PREP stage. Adjust the remaining bootm OS functions to deal with this correctly. Signed-off-by: Simon Glass <sjg@chromium.org>
* x86: Support tracing functionSimon Glass2013-06-265-7/+10
| | | | | | | Some changes are needed to x86 timer functions to support tracing. Add these so that the feature works correctly. Signed-off-by: Simon Glass <sjg@chromium.org>
OpenPOWER on IntegriCloud