aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-10-24virtio: Minor - replace tab characters with spaceKevin O'Connor1-2/+2
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-24biostables: Minor - fix incorrect indentationKevin O'Connor1-1/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-24coreboot: Minor - avoid K&R style function declarationKevin O'Connor1-1/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-23build: Allow official tarball builds to be considered "clean"Kevin O'Connor1-2/+8
If building from an official tarball and EXTRAVERSION info is provided, then consider the build to be "clean" (don't include hostname/build timestamp). This is done on the expectation that EXTRAVERSION will have enough information to allow developers to find the builder and build environment should a defect be reported, and therefore the hostname/timestamp is not necessary. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-23docs: Document 'make EXTRAVERSION=xyz' and scripts/tarball.shKevin O'Connor1-0/+28
Document the existence of the EXTRAVERSION field and the information expected to be present in it. Document the use of tarball.sh in build environments that lack git. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-22build: Be more permissive in buildversion.py tool version scanKevin O'Connor1-25/+23
There is some variation in version strings between various tool chain builds. Make the version tool scan more permissive to attempt to handle these variations. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-21Add QEMU fw_cfg DMA interfaceMarc MarĂ­2-12/+93
Add support for the new fw_cfg DMA interface. The protocol is explained in QEMU documentation. Signed-off-by: Marc MarĂ­ <markmb@redhat.com>
2015-10-15malloc: Rename csm_malloc_preinit() to malloc_csm_preinit()Kevin O'Connor3-4/+4
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-15stacks: Use macro wrappers for call32() and stack_hop_back()Kevin O'Connor8-44/+41
The C code only uses _cfuncX_ prefixes for parameters to the call32(), stack_hop_back(), and call32_params() functions. It's simpler to use macro wrappers around those functions which provide the required prefix. This also changes the parameter order of stack_hop() and stack_hop_back() to use the more natural (func, params) ordering. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-15build: Generate "reproducible" version strings on "clean" buildsKevin O'Connor1-4/+6
If the build environment looks "clean" then don't add the build hostname or build time to the version string. This makes the default build string reproducible across builds. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-15build: Report gcc and binutils versions in debug logKevin O'Connor7-7/+50
Attempt to extract the gcc and binutils versions. Report that information in the debug log. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-15build: Rework version generation; don't allow make version overrideKevin O'Connor5-37/+83
Convert the script to generate the build version from a shell script to a python script. Remove the ability to override the version at build time via "make VERSION=xyz". Replace it with ability to add extra version information at build time via "make EXTRAVERSION=xyz". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-15memmap: Introduce SYMBOL() macro to access linker script symbolsKevin O'Connor7-48/+46
Use a macro to define and obtain the value of a symbol introduced by the linker scripts (scripts/layoutrom.py). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-15malloc: Don't mix virtual and physical addressesKevin O'Connor4-89/+101
Consistently use 'u32' for physical addresses and pointers for virtual addresses in the malloc code. Introduce and use memremap() where a physical address needs to be converted to a virtual address. Use virt_to_phys() for the inverse. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-15malloc: Add warning if free() called on invalid memoryKevin O'Connor2-3/+11
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-15malloc: Introduce common helper alloc_new_detail()Kevin O'Connor2-35/+47
Introduce helper for finding temp space to hold an "allocation detail struct" and use it in both alloc_add() and _malloc(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-15malloc: Use consistent naming for internal low-level "alloc" functionsKevin O'Connor1-51/+51
Use the "alloc_" prefix for all the low-level allocation functions and avoid camelCase naming. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-15virtio: Move standard definitions from virtio-ring.h to standard headersKevin O'Connor4-8/+16
Move PAGE_SHIFT / virt_to_phys() to memmap.h and smp_[rw]mb() to x86.h. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-15virtio: Simplify vring alignment codeKevin O'Connor1-20/+9
Don't do phys_to_virt(virt_to_phys(vaddr)) for page alignment - page alignment can be determined directly from the virtual address. Use the ALIGN() macro to make the code more readable. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-15e820: Update debugging messages to report 64bit valuesKevin O'Connor1-1/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-15e820: Rename memmap.c to e820map.c and use consistent "e820_" prefixKevin O'Connor13-66/+73
Rename memmap.c to e820map.c as the code in that file only deals with maintaining the e820 map. Move all the e820 definitions to new file e820map.h and use a consistent "e820_" prefix on all exported functions. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-15e820: Introduce e820_remove() and avoid exporting E820_HOLEKevin O'Connor3-3/+11
The E820_HOLE definition is used internally in the e820 manipulation code to remove entries from the e820 map. Introduce the e820_remove() function so that the E820_HOLE definition does not need to be exported from the memmap.c code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-09Fix typos found by codespellStefan Weil12-13/+13
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-09Always enable caching on transition32; backup/restore cr0 on call32Kevin O'Connor5-26/+35
Always enable caching at start of 32bit code and always make sure the paging flag is off. Because this alters the cr0 register, perform a backup and restore of it when using call32(). Also, rename get/setcr0() to cr0_read/write() to more closely match other register access functions. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-10-09Consolidate code16*() functionsKevin O'Connor1-34/+27
Introduce code16_override() for cases where call16() should not restore the previous 16bit state. All callers now use call16_back() to invoke 16bit code, so rename call16_back() to call16(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-09-14Use transition32_nmi_off from call32() and call16_back()Kevin O'Connor2-2/+3
The call32() and call16_back() functions will always disable NMI and enable a20 (via the call32_prep() function) so it is safe to use the _nmi_off variant of transition32. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-09-14Unify call32_sloppy() and call32()Kevin O'Connor1-18/+12
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-09-14Unify inline assembler in variants of call16 functionsKevin O'Connor2-77/+34
The assembler between call16(), call16big() and call16_sloppy() are very similar. Rework the functions so that a single version of the inline assembly can be used for all variants. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-09-14Rename Call32Data to Call16DataKevin O'Connor1-29/+29
The variable stores information on how and what to restore during a call to 16bit code, so Call16Data is a better name. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-09-14Unify smm/sloppy variants of call32_prep/post and call16_helperKevin O'Connor1-82/+50
The "smm" and "sloppy" variants of the 16bit to 32bit trampoline backup/restore code are very similar. They can be unified into a single copy of each function. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-09-13build: use -fstack-check=no when availableMagnus Granberg1-0/+1
Some compilers (such as the one in hardened/Gentoo) default this option to on which leads to build failures: src/stacks.c: In function 'call16_back': src/stacks.c:139:5: error: 'asm' operand has impossible constraints asm volatile( ^ URL: https://bugs.gentoo.org/559980 Reported-by: Alon Bar-Lev <alonbl@gentoo.org> Signed-off-by: Magnus Granberg <zorry@gentoo.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2015-09-08docs: Minor - add "code relocation" link to "Execution and code flow" documentKevin O'Connor1-1/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-09-03Simplify transition16/32 assembler codeKevin O'Connor1-49/+40
Backup and restore %eax only around code that needs to use %eax. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-09-03minor - correct spelling error in commentKevin O'Connor1-1/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-09-03megasas: Use outl() on MFI_IDB registerKevin O'Connor1-1/+1
The outw() should be an outl(). Reported-by: Stefan Weil <sw@weilnetz.de> Reported-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-09-03megasas: Fix outw, outl argument orderStefan Weil1-4/+4
The value is the first argument and the port is the second, but the code was using the opposite order. Cc: Hannes Reinecke <hare@suse.de> Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-09-03sdcard: Obtain card capacity and report it on the boot menuKevin O'Connor1-5/+43
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-09-03sdcard: Display sdcard product name in boot menuKevin O'Connor1-2/+10
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-09-03sdcard: Turn card_type into a bitmap and store if card is MMC typeKevin O'Connor1-10/+9
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-09-03sdcard: Move drive registration to sdcard_card_setup()Kevin O'Connor1-15/+15
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-09-03sdcard: Move frequency setting into sdcard_card_setup()Kevin O'Connor1-8/+10
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-09-03sdcard: Move sdcard_set_frequency()/sdcard_set_power() in sdcard.cKevin O'Connor1-58/+58
Just code movement; no code changes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-09-01rtc: Disable NMI in rtc_mask()Kevin O'Connor1-0/+1
The rtc_mask() function should make sure the NMI disable bit is set (just as rtc_read() and rtc_write() do). Reported-by: Tim Shearer <tim.shearer@overturenetworks.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-08-24docs: Don't use an add-symbol-file offset when describing gdb debuggingKevin O'Connor1-8/+9
Recent versions of gdb will only add an offset to the '.text' section of object files via the add-symbol-file command. The SeaBIOS build doesn't place code directly in a '.text' section, so update the documentation to obtain the same result via an 'objcopy' call instead. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-08-24xhci: Minor - add USB port type comments to xhci_hub_reset()Kevin O'Connor1-0/+2
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-08-24sdcard: Allow sdcard addresses to be specified in CBFS filesKevin O'Connor2-12/+37
Allow a hardcoded address to be specified in cbfs files with a prefix of "etc/sdcard". Some real-world devices have valid SDHCI controllers that do not show up as PCI devices. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-08-24ps2: Eliminate "etc/ps2-poll-only"; use CONFIG_HARDWARE_IRQ insteadKevin O'Connor2-11/+6
The "etc/ps2-poll-only" runtime setting is directly tied to the new CONFIG_HARDWARE_IRQ setting - use the compile time setting to control both. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-08-24Add minimal support for machines without hardware interruptsKevin O'Connor7-8/+62
Some Chromebooks (with Baytrail CPUs) apparently do not support routing of legacy interrupts. This patch adds minimal support for running SeaBIOS in such an environment. Even with this patch, it is known that old operating systems and even some recent bootloaders will not function without real hardware interrupts. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-08-17rtc: Support disabling the RTC timer irq supportKevin O'Connor4-2/+28
Add a build time config option to remove support for RTC timer interrupts along with the associated bios calls requiring that support. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-08-17sdcard: Allow the sdcard driver to run on real hardwareKevin O'Connor2-7/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>