aboutsummaryrefslogtreecommitdiff
path: root/include/configs/qemu-arm.h
AgeCommit message (Collapse)Author
2020-10-08qemu-arm: Remove need to specify flash banksAndre Przywara
Currently we hard-code the number and initial addresses of QEMU's flash banks, even though our code is perfectly able to gather the same information from the DTB provided by QEMU. This is especially annoying, since we have two slightly different U-Boot configurations ("bare-metal" vs. loaded via Arm Trusted Firmware), which need to be selected at build time. Drop the two hard coded alternatives, and use CONFIG_SYS_MAX_FLASH_BANKS_DETECT instead, which relies on the DTB to figure out the actual flash configuration at runtime. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2020-07-29arm: qemu: override flash accessors to use virtualizable instructionsArd Biesheuvel
Some instructions in the ARM ISA have multiple output registers, such as ldrd/ldp (load pair), where two registers are loaded from memory, but also ldr with indexing, where the memory base register is incremented as well when the value is loaded to the destination register. MMIO emulation under KVM is based on using the architecturally defined syndrome information that is provided when an exception is taken to the hypervisor. This syndrome information describes whether the instruction that triggered the exception is a load or a store, what the faulting address was, and which register was the destination register. This syndrome information can only describe one destination register, and when the trapping instruction is one with multiple outputs, KVM throws an error like kvm [615929]: Data abort outside memslots with no valid syndrome info on the host and kills the QEMU process with the following error: U-Boot 2020.07-rc3-00208-g88bd5b179360-dirty (Jun 06 2020 - 11:59:22 +0200) DRAM: 1 GiB Flash: error: kvm run failed Function not implemented R00=00000001 R01=00000040 R02=7ee0ce20 R03=00000000 R04=7ffd9eec R05=00000004 R06=7ffda3f8 R07=00000055 R08=7ffd9eec R09=7ef0ded0 R10=7ee0ce20 R11=00000000 R12=00000004 R13=7ee0cdf8 R14=00000000 R15=7ff72d08 PSR=200001d3 --C- A svc32 QEMU: Terminated This means that, in order to run U-Boot in QEMU under KVM, we need to avoid such instructions when accessing emulated devices. For the flash in particular, which is a hybrid between a ROM (backed by a read-only KVM memslot) when in array mode, and an emulated MMIO device (when in write mode), we need to take care to only use instructions that KVM can deal with when they trap. So override the flash read accessors that are used when running on QEMU under KVM. Note that the the 64-bit wide read and write accessors have been omitted: they are never used when running under QEMU given that it does not emulate CFI flash that supports it. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2020-01-23qemu-arm: set CONFIG_SYS_BOOTM_LEN to SZ_64MDhananjay Phadke
FIT image contents can be larger than default bootm limit 8M with initrd. Raise limit to 64MB which is commonly used elsewhere. Signed-off-by: Dhananjay Phadke <dphadke@linux.microsoft.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-11-20env: Finish migration of common ENV optionsTom Rini
- In ARMv8 NXP Layerscape platforms we also need to make use of CONFIG_SYS_RELOC_GD_ENV_ADDR now, do so. - On ENV_IS_IN_REMOTE, CONFIG_ENV_OFFSET is never used, drop the define to 0. - Add Kconfig entry for ENV_ADDR. - Make ENV_ADDR / ENV_OFFSET depend on the env locations that use it. - Add ENV_xxx_REDUND options that depend on their primary option and SYS_REDUNDAND_ENVIRONMENT - On a number of PowerPC platforms, use SPL_ENV_ADDR not CONFIG_ENV_ADDR for the pre-main-U-Boot environment location. - On ENV_IS_IN_SPI_FLASH, check not for CONFIG_ENV_ADDR being set but rather it being non-zero, as it will now be zero by default. - Rework the env_offset absolute in env/embedded.o to not use CONFIG_ENV_OFFSET as it was the only use of ENV_OFFSET within ENV_IS_IN_FLASH. - Migrate all platforms. Cc: Wolfgang Denk <wd@denx.de> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Patrick Delaunay <patrick.delaunay@st.com> Cc: uboot-stm32@st-md-mailman.stormreply.com Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2019-08-02Convert CONFIG_USE_PREBOOT and CONFIG_PREBOOT to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_USE_PREBOOT CONFIG_PREBOOT Both are together in one commit, since otherwise the former causes kconfig to define the latter, which gives duplicate symbol errors. Includes a manual fixup for CONFIG_PREBOOT in ids8313_defconfig since the backslash lands in the wrong place. Similarly with socfpga_vining_fpga. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-02Add CONFIG_USE_PREBOOT to boards that use CONFIG_PREBOOTSimon Glass
In order to use CONFIG_PREBOOT with Kconfig, CONFIG_USE_PREBOOT must be defined for each board. To prepare for conversion to Kconfig, add this. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-07-18arm: qemu: fix failure in flash initialization if booting from TF-AAKASHI Takahiro
If U-Boot is loaded and started from TF-A (you need to change SYS_TEXT_BASE to 0x60000000), it will hang up at flash initialization. If secure mode is off (default, or -machine virt,secure=off) at qemu, it will provide dtb with two flash memory banks: flash@0 { bank-width = <0x4>; reg = <0x0 0x0 0x0 0x4000000 0x0 0x4000000 0x0 0x4000000>; compatible = "cfi-flash"; }; If secure mode is on, on the other hand, qemu provides dtb with 1 bank: flash@0 { bank-width = <0x4>; reg = <0x0 0x4000000 0x0 0x4000000>; compatible = "cfi-flash"; }; As a result, flash_init()/flash_get_size() will eventually fail. With this patch applied, relevant CONFIG values are modified. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-03-08ARM: qemu-arm: enable USB boot in distro boot with UEFIAKASHI Takahiro
With this patch which adds a removable USB mass storage to a list of bootable devices, USB boot is supported in distro boot if UEFI is configured. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2018-12-12qemu-arm: Add persistent environment supportSumit Garg
Currently on qemu-arm platforms environment is kept in RAM. Instead use pflash device 1 to provide persistent environment support across device reset. Also (optionally) provide support for persistent environment across qemu machine OFF/ON using following instructions: - Create envstore.img using qemu-img: qemu-img create -f raw envstore.img 64M - Add a pflash drive parameter to the command line: -drive if=pflash,format=raw,index=1,file=envstore.img Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2018-12-12qemu-arm: Enable VirtIO distro targetSumit Garg
With -device virtio-blk-device,drive=hd0, it could detect distro boot target. Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Alexander Graf <agraf@suse.de>
2018-09-26Merge tag 'signed-efi-next' of git://github.com/agraf/u-bootTom Rini
Patch queue for efi - 2018-09-26 A lot of goodness in this release. We're *very* close to running the UEFI Shell and SCT natively. The only missing piece are HII protocols. - FAT write support (needed for SCT) - improved FAT directory support (needed for SCT) - RTC support with QEMU -M virt - Sandbox support (run UEFI binaries in Linux - yay) - Proper UTF-16 support - EFI_UNICODE_COLLATION_PROTOCOL support (for UEFI Shell) - EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL support (for UEFI Shell) - Fix window size determination - Fix Tegra by explicitly unmapping RAM - Clean up handle entanglement - Lots of generic code cleanup [trini: Fixup merge conflict in include/configs/qemu-arm.h] Signed-off-by: Tom Rini <trini@konsulko.com>
2018-09-25ata: Drop CONFIG_SYS_SCSI_MAX_* from boards using DM_SCSITuomas Tynkkynen
These options are not used or necessary when device model is being used for SCSI. Just drop them. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-09-23rtc: pl031: convert the driver to driver modelAKASHI Takahiro
With this patch, PL031 driver is converted to driver-model-compliant driver. In addition, CONFIG_SYS_RTC_PL031_BASE is no longer valid. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-09-05qemu-arm: Enable DHCP distro targetAlexander Graf
When booting the QEMU virt machine with -net nic,model=e1000 we can already support network boot just fine today. So let's enable the default bootcmd to also evaluate DHCP responses properly. That way we can enable network boot seamlessly with the virt target. Signed-off-by: Alexander Graf <agraf@suse.de>
2018-08-16configs: Migrate CONFIG_NR_DRAM_BANKSTom Rini
We have the following cases: - CONFIG_NR_DRAM_BANKS was defined, migrate normally - CONFIG_NR_DRAM_BANKS_MAX was defined and then used for CONFIG_NR_DRAM_BANKS after a check, just migrate it over now. - CONFIG_NR_DRAM_BANKS was very oddly defined on p2771-0000-* (to 1024 + 2), set this to 8. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-07-19ARM: qemu-arm: enable RTCHeinrich Schuchardt
QEMU provides an emulated ARM AMBA PrimeCell PL031 RTC. The patch sets the base address in the board include file according to the definition in hw/arm/virt.c of the QEMU source. It defines the Kconfig option for the existing driver, and enables the RTC driver in qemu_arm64_defconfig and qemu_arm_defconfig as well as the date command. We need an RTC to provide the GetTime() runtime service in the UEFI subsystem. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Tested-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-28arm: move SYS_ARCH_TIMER to KConfigAndre Przywara
SYS_ARCH_TIMER guards the usage of the ARM Generic Timer (aka arch timer) in U-Boot. At the moment it is mandatory for ARMv8 and used by a few ARMv7 boards. Add a proper Kconfig symbol to express this dependency properly, allowing certain board configuration to later disable arch timer in case there are any problems with it. Signed-off-by: Andre Przywara <andre.przywara@arm.com> [tuomas: rebase + fix conflicts and resync with moveconfig & use select] Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2018-04-28ARM: qemu-arm: Dynamically determine timer frequencyTuomas Tynkkynen
After commit 46fc679ede5f69 ("arm: timer: get frequency for arch timer armv7 in cp15 cntfrq") the ARM architected timer driver knows how to determine the timer frequency at runtime by reading the CNTFRQ register, so we don't need to hardcode the timer frequency anymore. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2018-03-09ARM: qemu-arm: Increase CONFIG_SYS_CBSIZETuomas Tynkkynen
CONFIG_SYS_CBSIZE determines the maximum length of the kernel command line, and the default value of 256 is too small for booting some Linux images in the wild. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2018-02-23Remove config_distro_defaults.hAdam Ford
With the contents of config_distro_defaults.h migrated to Kconfig, we can remove this header file completely Signed-off-by: Adam Ford <aford173@gmail.com>
2018-02-11configs: Migrate CONFIG_SYS_TEXT_BASETom Rini
On the NIOS2 and Xtensa architectures, we do not have CONFIG_SYS_TEXT_BASE set. This is a strict migration of the current values into the defconfig and removing them from the headers. I did not attempt to add more default values in and for now will leave that to maintainers. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-01-28pl01x: Convert CONFIG_PL01X_SERIAL to KconfigAlexander Graf
We want to use Kconfig logic to depend on whether pl01x devices are built in, so let's convert their inclusion selection to Kconfig. This round goes to pl01x. Signed-off-by: Alexander Graf <agraf@suse.de>
2017-12-12ata: Migrate CONFIG_LIBATA to KconfigTuomas Tynkkynen
This symbol enables some library code used by various SATA drivers, so make this a non-user-visible symbol select'ed by the respective drivers, and let moveconfig handle the rest. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-12-12ata: Migrate CONFIG_SCSI_AHCI to KconfigTuomas Tynkkynen
And use 'imply' liberally. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-10-06ARM: Add a new arch + board for QEMU's 'virt' machineTuomas Tynkkynen
This board builds an U-Boot binary that is bootable with QEMU's 'virt' machine on ARM. The minimal QEMU command line is: qemu-system-arm -machine virt,highmem=off -bios u-boot.bin (Note that the 'highmem=off' parameter to the 'virt' machine is required for PCI to work in U-Boot.) This command line enables the following: - u-boot.bin loaded and executing in the emulated flash at address 0x0 - A generated device tree blob placed at the start of RAM - A freely configurable amount of RAM, described by the DTB - A PL011 serial port, discoverable via the DTB - An ARMv7 architected timer - PSCI for rebooting the system - A generic ECAM-based PCI host controller, discoverable via the DTB Additionally, QEMU allows plugging a bunch of useful peripherals to the PCI bus. The following ones are supported by both U-Boot and Linux: - To add a Serial ATA disk via an Intel ICH9 AHCI controller, pass e.g.: -drive if=none,file=disk.img,id=mydisk -device ich9-ahci,id=ahci -device ide-drive,drive=mydisk,bus=ahci.0 - To add an Intel E1000 network adapter, pass e.g.: -net nic,model=e1000 -net user - To add an EHCI-compliant USB host controller, pass e.g.: -device usb-ehci,id=ehci - To add a NVMe disk, pass e.g.: -drive if=none,file=disk.img,id=mydisk -device nvme,drive=mydisk,serial=foo Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>