summaryrefslogtreecommitdiff
path: root/drivers/bios_emulator
Commit message (Collapse)AuthorAgeLines
* Various, unrelated tree-wide typo fixes.Robert P. J. Day2016-07-16-1/+1
| | | | | | | | | | | | | | | | | | | Fix a number of typos, including: * "compatble" -> "compatible" * "eanbeld" -> "enabled" * "envrionment" -> "environment" * "FTD" -> "FDT" (for "flattened device tree") * "ommitted" -> "omitted" * "overriden" -> "overridden" * "partiton" -> "partition" * "propogate" -> "propagate" * "resourse" -> "resource" * "rest in piece" -> "rest in peace" * "suport" -> "support" * "varible" -> "variable" Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
* Fix various typos, scattered over the code.Robert P. J. Day2016-05-05-1/+1
| | | | | | | | | | | | | Spelling corrections for (among other things): * environment * override * variable * ftd (should be "fdt", for flattened device tree) * embedded * FTDI * emulation * controller
* dm: pci: Convert bios_emu to use the driver model PCI APISimon Glass2016-01-24-4/+144
| | | | | | | | At present this BIOS emulator uses a bus/device/function number. Change it to use a device if CONFIG_DM_PCI is enabled. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* Various Makefiles: Add SPDX-License-Identifier tagsTom Rini2015-11-10-0/+4
| | | | | | | | | | | After consulting with some of the SPDX team, the conclusion is that Makefiles are worth adding SPDX-License-Identifier tags too, and most of ours have one. This adds tags to ones that lack them and converts a few that had full (or in one case, very partial) license blobs into the equivalent tag. Cc: Kate Stewart <kstewart@linuxfoundation.org> Signed-off-by: Tom Rini <trini@konsulko.com>
* biosemu: Do not free vga_info->BIOSImage when it is 0xc0000Bin Meng2015-04-29-1/+2
| | | | | | | For x86, vga_info->BIOSImage points to 0xc0000 which cannot be freed. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* bios_emulator: Add some VESA interface debuggingSimon Glass2015-01-23-20/+141
| | | | | | Allow the supported modes to be listed when in debug mode. Signed-off-by: Simon Glass <sjg@chromium.org>
* bios_emulator: Don't display error when emulator terminatesSimon Glass2015-01-23-1/+1
| | | | | | As it turns out this is a normal condition, so suppress the error. Signed-off-by: Simon Glass <sjg@chromium.org>
* bios_emulator: Fix an #ifdef typo in the header fileSimon Glass2015-01-23-1/+1
| | | | | | | This stops the debug mode from working properly. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* bios_emulator: Correct ordering of includesSimon Glass2014-12-13-2/+2
| | | | | | | We should include common.h before other includes. This actually causes a build error on chromebook_link. Signed-off-by: Simon Glass <sjg@chromium.org>
* bios_emulator: Always print errors when opcode decode failsSimon Glass2014-11-25-18/+22
| | | | | | | | | This is a rare event and should not happen. When it does it is confusing to work out why. At least we should print a message. Adjust the emulator to always print decode errors to the console. Signed-off-by: Simon Glass <sjg@chromium.org>
* bios_emulator: Add an option to enable debuggingSimon Glass2014-11-25-54/+90
| | | | | | | | | | At present there are DEBUG options spread around the place. If you enable one and not another you can end up with an emulator that does not work, since each file can have a different view of what the registers look like. To fix this, create a global CONFIG_X86EMU_DEBUG option that keeps everything consistent. Signed-off-by: Simon Glass <sjg@chromium.org>
* bios_emulator: Allow a custom interrupt handler to be installedSimon Glass2014-11-25-0/+6
| | | | | | | Sometime we want to provide an interrupt handler for the ROM, Add a function to allow this. Signed-off-by: Simon Glass <sjg@chromium.org>
* bios_emulator: Add vesa support and allow ROMs to be passed in as dataSimon Glass2014-11-25-58/+144
| | | | | | | | | As well as locating the ROM on the PCI bus, allow the ROM to be supplied to the emulator. Split the init up a little so that callers can supply their own interrupt routines. Also allow a vesa mode to be provided, to be selected once the BIOS run is complete. Signed-off-by: Simon Glass <sjg@chromium.org>
* bios_emulator: Allow x86 to use the emulatorSimon Glass2014-11-25-23/+23
| | | | | | | | | | | There is an implicit assumption that x86 machines want to use raw I/O in the BIOS emulator, but this should be selectable. Add an CONFIG_X86EMU_RAW_IO option to control it instead. Also fix a few bugs which cause warnings on x86 and adjust the Makefile to remove the assumption that only PowerPC uses the emulator. Signed-off-by: Simon Glass <sjg@chromium.org>
* Introduce a header file for the BIOS emulatorSimon Glass2014-11-25-51/+2
| | | | | | | We should have a public header so that users can avoid defining functions themselves. Signed-off-by: Simon Glass <sjg@chromium.org>
* kbuild: use Linux Kernel build scriptsMasahiro Yamada2014-02-19-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now we are ready to switch over to real Kbuild. This commit disables temporary scripts: scripts/{Makefile.build.tmp, Makefile.host.tmp} and enables real Kbuild scripts: scripts/{Makefile.build,Makefile.host,Makefile.lib}. This switch is triggered by the line in scripts/Kbuild.include -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj +build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj We need to adjust some build scripts for U-Boot. But smaller amount of modification is preferable. Additionally, we need to fix compiler flags which are locally added or removed. In Kbuild, it is not allowed to change CFLAGS locally. Instead, ccflags-y, asflags-y, cppflags-y, CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o are prepared for that purpose. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Gerhard Sittig <gsi@denx.de>
* kbuild: change out-of-tree buildMasahiro Yamada2014-02-19-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>
* drivers: delete unused header filesMasahiro Yamada2014-01-24-970/+0
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* bios_emulator: delete an unnecessary include pathMasahiro Yamada2013-11-25-1/+1
| | | | | | -I$(TOPDIR)/include is defined in the top config.mk. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* drivers: delete unnecessary HOSTCFLAGSMasahiro Yamada2013-11-25-1/+0
| | | | | | | HOSTCFLAGS is meaningless because no host programs are compiled there. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* Makefile: make directories by Makefile.buildMasahiro Yamada2013-11-17-2/+0
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* drivers: descend into sub directories only when it is necessaryMasahiro Yamada2013-11-17-1/+1
| | | | | | | - Descend into drivers/fpga/ only when CONFIG_FPGA=y - Descend into drivers/bios_emulator only when CONFIG_BIOSEMU=y Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* drivers: convert makefiles to Kbuild styleMasahiro Yamada2013-10-31-22/+1
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* biosemu: include <asm/io.h> headerLinus Walleij2013-04-02-0/+4
| | | | | | | | | | | | This makes sure we have inline functions such as inb/outb that are used in these two files by including the arch-specific <asm/io.h> header. However the ARM version does not provide the accessors unless the config symbol __io is also defined so add that in front of the include. After this the bios emulator will compile on ARM systems. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* Consolidate bool typeYork Sun2013-04-01-9/+5
| | | | | | | | | | | | | 'bool' is defined in random places. This patch consolidates them into a single header file include/linux/types.h, using stdbool.h introduced in C99. All other #define, typedef and enum are removed. They are all consistent with true = 1, false = 0. Replace FALSE, False with false. Replace TRUE, True with true. Skip *.py, *.php, lib/* files. Signed-off-by: York Sun <yorksun@freescale.com>
* Add abs() macro to return absolute valueSimon Glass2012-05-15-5/+0
| | | | | | | | | This macro is generally useful to make it available in common. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com> Acked-by: Tom Rini <trini@ti.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
* drivers/bios_emulator/x86emu/ops2.c: Fix GCC 4.6 build warningKumar Gala2011-11-27-1/+2
| | | | | | | | | Fix: x86emu/ops2.c: In function 'x86emuOp2_set_byte': x86emu/ops2.c:171:11: warning: variable 'name' set but not used [-Wunused-but-set-variable] Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* drivers/bios_emulator/x86emu/ops.c: Fix GCC 4.6 build warningKumar Gala2011-11-16-11/+4
| | | | | | | | | | | | | | | Fix: x86emu/ops.c: In function 'x86emuOp_int3': x86emu/ops.c:3521:9: warning: variable 'tmp' set but not used [-Wunused-but-set-variable] x86emu/ops.c: In function 'x86emuOp_int_IMM': x86emu/ops.c:3549:9: warning: variable 'tmp' set but not used [-Wunused-but-set-variable] x86emu/ops.c: In function 'x86emuOp_into': x86emu/ops.c:3579:9: warning: variable 'tmp' set but not used [-Wunused-but-set-variable] x86emu/ops.c: In function 'x86emuOp_aad': x86emu/ops.c:3993:8: warning: variable 'a' set but not used [-Wunused-but-set-variable] Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* Replace space and tab checks with isblankJason Hobbs2011-10-17-3/+4
| | | | | | | These are various places I found that checked for conditions equivalent to isblank. Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
* Switch from archive libraries to partial linkingSebastien Carlier2010-11-17-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, weak symbols were not overridden by non-weak symbols found in archive libraries when linking with recent versions of binutils. As stated in the System V ABI, "the link editor does not extract archive members to resolve undefined weak symbols". This commit changes all Makefiles to use partial linking (ld -r) instead of creating library archives, which forces all symbols to participate in linking, allowing non-weak symbols to override weak symbols as intended. This approach is also used by Linux, from which the gmake function cmd_link_o_target (defined in config.mk and used in all Makefiles) is inspired. The name of each former library archive is preserved except for extensions which change from ".a" to ".o". This commit updates references accordingly where needed, in particular in some linker scripts. This commit reveals board configurations that exclude some features but include source files that depend these disabled features in the build, resulting in undefined symbols. Known such cases include: - disabling CMD_NET but not CMD_NFS; - enabling CONFIG_OF_LIBFDT but not CONFIG_QE. Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
* ati_radeon: Support PCI virtual not eq bus mapping.Ed Swarthout2010-04-08-4/+6
| | | | | | | | | | | | | | Use pci_bus_to_virt() to convert the bus address from the BARs to virtual address' to eliminate the direct mapping requirement. Rename variables to better match usage (_phys -> _bus or no-suffix) This fixes the mpc8572ds CONFIG_PHYS_64BIT mode failure: "videoboot: Video ROM failed to map!" Tested on mpc8572ds with and without CONFIG_PHYS_64BIT. Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
* ati_radeon: return with error when emulator failsEd Swarthout2010-04-08-1/+2
| | | | | | | | | | | | | | | | | Console was being switched to video even if emulator fails and causing this hang: Scanning PCI bus 04 04 00 1095 3132 0104 00 PCIE3 on bus 03 - 04 Video: ATI Radeon video card (1002, 5b60) found @(2:0:0) videoboot: Booting PCI video card bus 2, function 0, device 0 videoboot: Video ROM failed to map! 640x480x8 31kHz 59Hz radeonfb: FIFO Timeout ! Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com> Tested-by: Anatolij Gustschin <agust@denx.de>
* drivers/bios_emulator: Fix compile error in .depend not being generatedKumar Gala2009-12-17-0/+1
| | | | | | | | | | | | | | | make -C drivers/bios_emulator/ make[2]: Entering directory `drivers/bios_emulator' In file included from atibios.c:49: biosemui.h:47:21: error: biosemu.h: No such file or directory ... x86emu/decode.c:40:28: error: x86emu/x86emui.h: No such file or directory ... Due to lack of proper CPPFLAGS being passed to .depend generation rule Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* Leave x86emu op code tables in default sectionEd Swarthout2009-10-12-14/+8
| | | | | | | | Forcing the tables into got2 caused extra relocation when using -mrelocatable. This patch requires any board defining CONFIG_BIOSEMU to use -mrelocatable. Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com> Acked-by: Jin Zhengxiong <Jason.Jin@freescale.com>
* Update Freescale copyrights to remove "All Rights Reserved"Kumar Gala2009-07-29-7/+7
| | | | | | "All Rights Reserved" conflicts with the GPL. Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
* unify HOST_CFLAGS and HOSTCFLAGSMike Frysinger2009-07-23-1/+1
| | | | | | | | The top build system sets up HOSTCFLAGS a bit and exports it, but other places use HOST_CFLAGS instead. Unify the two as HOSTCFLAGS so that the values stay in sync. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* drivers/bios_emulator: Fix gcc 4.4 compiler warningKumar Gala2009-07-23-1/+2
| | | | | | | biosemu.c: In function 'BE_setVGA': biosemu.c:147: warning: dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* drivers/bios_emulator: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD2008-12-07-48/+2
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Fix the function conflict in x86emu when DEBUG is onJason Jin2008-10-17-3/+3
| | | | | | | | | The function parse_line() in common/main.c was exposed globally by commit 6636b62a6efc7f14e6e788788631ae7a7fca4537, Result in conflict with the same name funciton in drivers/bios_emulator/x86emu/debug.c when define the DEBUG. This patch fix this by renaming the function in the debug.c file. Signed-off-by: Jason Jin <Jason.jin@freescale.com>
* Big white-space cleanup.Wolfgang Denk2008-05-21-2/+2
| | | | | | | | | | | This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de>
* Wipe out assembler warnings while compiling x86 biosemuAnatolij Gustschin2008-02-16-10/+20
| | | | | | | | This patch tries to get rid of some assembler warnings about changed .got2 section type while compiling x86 bios emulator code. Signed-off-by: Anatolij Gustschin <agust@denx.de>
* Fix compiler warnings for PPC systems. Update CHANGELOG.Wolfgang Denk2007-11-18-4/+4
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Add BUILD_DIR support for bios emulator.Jason Jin2007-09-07-8/+15
| | | | Signed-off-by: Jason Jin <Jason.jin@freescale.com>
* Bios emulator - fix microblaze toolchain problemMichal Simek2007-08-16-10/+30
| | | | | | | microblaze CPU have problem with bios_emulator code. Microblaze toolchain doesn't support PRAGMA PACK. Signed-off-by: Michal Simek <monstr@monstr.eu>
* Minor fix for bios emulator makefileJason Jin2007-08-09-1/+1
| | | | | | Add $(obj) to LIB avoiding objects be built in the source dir Signed-off-by: Jason Jin <Jason.jin@freescale.com>
* Add CONFIG_BIOSEMU define to guard all the bios emulator codeJason Jin2007-08-09-0/+32
| | | | | | Signed-off-by: Jason Jin <Jason.jin@freescale.com> This patch fix the compile issue on the board that did not enable the bios emulator
* Coding style cleanup. Update CHANGELOG.Wolfgang Denk2007-08-06-4752/+4743
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* This is a BIOS emulator, porting from SciTech for u-boot, mainly forJason Jin2007-08-06-0/+16008
ATI video card BIOS. and can be used for x86 code emulation by some modifications. Signed-off-by: Jason Jin <Jason.jin@freescale.com>