aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-01-18biostables: Support SMBIOS 2.6+ UUID formatrel-1.9.1Cole Robinson1-11/+36
SMBIOS 2.6+ stores the UUID in a different format, with the first 3 fields in little endian format. This is what modern qemu delivers and what dmidecode also handles, so let's follow suit too. Signed-off-by: Cole Robinson <crobinso@redhat.com> (cherry picked from commit 2e11d582b5e14759b3c1482d7e317b4a7257e77d)
2016-01-15fw/pci: do not automatically allocate IO region for PCIe bridgesMarcel Apfelbaum1-4/+5
PCIe downstream ports (Root Ports and switches Downstream Ports) appear to firmware as PCI-PCI bridges and a 4K IO space is allocated for them even if there is no device behind them requesting IO space, all that for hotplug purpose. However, PCIe devices can work without IO, so there is no need to allocate IO space for hotplug. Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> (cherry picked from commit 76327b9f32a009245c215f4a3c5d58a01b5310ae)
2016-01-15coreboot: Check for unaligned cbfs headerKevin O'Connor1-0/+4
If the CBFS header is invalid and points to 0xffffffff it could cause SeaBIOS to read past the 4GB boundary and cause an exception. Check the alignment of the header pointer before attempting to access fields within the header. Reported-by: "Alex G." <mr.nuke.me@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit 3e8d75f3bef0f36a807303d58523ef5eba4a386f)
2016-01-15scsi: Do not call printf() from scsi_is_ready()Kevin O'Connor1-1/+1
The scsi_is_ready() function may be called from a thread, and it is not valid to call printf() from a thread. Convert printf() to dprintf() to avoid this possibility. This does mean that cdrom detection (from cdrom_boot() ) may not give notification of slow cdrom drives to a user. However, the extra medium detection time is unlikely to be large anyway. Reported-by: Tobias Diedrich <tobiasdiedrich@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit 82f327976865ba151153a04b584fc5d0a1fc5d9b)
2016-01-15nmi: Don't try to switch onto extra stack in NMI handlerKevin O'Connor1-1/+4
The NMI could occur when already on the extra stack, which would corrupt it. Always use the current stack on an NMI to avoid this. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit 0c5a6077fc569d27aeadde690810f820b3256fbd)
2016-01-15sdcard: fix typo causing 32bit write to 16bit block_size fieldKevin O'Connor1-1/+1
The block_size field is 16bits and only 16bit writes should be used with it. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit 8f7dc5ab820beac980f0d40f3934a5ae04771349)
2016-01-15sdcard: Only enable error_irq_enable for bits defined in SDHCI v1 specKevin O'Connor1-1/+1
The SDHCI v1 spec only defines the first 9 error_irq_enable bits and reserves other bits in the field. Don't enable the 10th bit (which was defined in the v2 spec) as it's not needed anyway. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit 460e9aac4e1ef88b14a7d44876c43ecfc94f8848)
2016-01-15xhci: Wait for port enable even for USB3 devicesKevin O'Connor1-22/+21
Some USB3 controllers (and/or devices) need additional time after the device is detected to place the port in an enabled state. Wait for the controller to report enabled before proceeding. This fixes several reports of devices that showed a "stall" error (cc 4) during set address. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit c01b41c5c68c197fe0124078261b48942f2919bd)
2016-01-15xhci: Check for device disconnects during USB2 reset pollingKevin O'Connor1-5/+19
Some XHCI controllers register super-speed devices on high-speed ports and then disconnect them when the super-speed detection completes. Make sure to recognize these disconnect events during the reset process. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit aa34e4e52fb65abb4ef8539660f05b4d52fb1f6f)
2016-01-14build: fix typo in buildversion.pyRoger Pau Monne1-1/+1
Fixes the following build error: Building ld scripts Traceback (most recent call last): File "./scripts/buildversion.py", line 134, in <module> main() File "./scripts/buildversion.py", line 114, in main cleanbuild, toolstr = tool_versions(options.tools) File "./scripts/buildversion.py", line 90, in tool_versions vers[isbinutils] = "mixed" NameError: global name 'vers' is not defined Makefile:160: recipe for target 'out/romlayout16.lds' failed Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> (cherry picked from commit 3b8c5378dfe24ca8dfeabbcc435c7eb9e2d8d769)
2015-11-17docs: Note v1.9.0 releaserel-1.9.0Kevin O'Connor1-0/+19
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-11-11buildversion: Add debugging messagesKevin O'Connor1-2/+19
Add ability to output debug messages from the buildversion.py build script. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-11-09buildversion: Avoid subprocess.check_output() as that requires python2.7Kevin O'Connor1-13/+19
Don't require python2.7 in buildversion.py. Also, ignore only those exceptions that are known to be possible. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2015-11-04PCI SDHCI driver: Fix base addressKyösti Mälkki1-0/+1
MMIO register space was off by 4 bytes, bottom bits of PCI BAR registers are not part of the address. Test boot on real hardware: PCI device 00:14.7 (vd=3D1022:7813 c=3D0805) Searching bootorder for: /pci@i0cf8/*@14,7 sdhci@0xfeb25500 ver=3D1001 cap=3D31fe3fb2 2570 sdcard_set_frequency 63 400 8000 sdcard_pio command stop (code=3D1) sdcard_set_frequency 63 25000 200 Found sdcard at 0xfeb25500: SD card SD01G 982MiB Registering bootable: SD card SD01G 982MiB (type:2 prio:103 data:f46e0) Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2015-10-26docs: Minor - replace seavgabios text in Build_overview.md with linkKevin O'Connor2-6/+3
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
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>