aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-10-12tcgbios: Fix use of unitialized variablerel-1.10.31.10-stableKevin O'Connor1-2/+1
Review-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit 1ef72ab2f89ae61dcdb3f01323bd0a7dc978c2b9)
2017-08-24boot: Increase description size in boot menuKevin O'Connor1-1/+1
Increase the boot menu description size so that menu items up to 80 characters display without truncation. Reported-by: Rene Shuster <rene.shuster@bcsemail.org> Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit 6f090f868dcdc089a669b3664f9564ef8f65d0ea)
2017-03-14resume: Don't attempt to use generic reboot mechanisms on QEMUKevin O'Connor5-5/+18
On QEMU it's necessary to manually reset the BIOS memory region between 0xc0000-0x100000 on a reboot. After this manual memory reset is completed, it's not valid to use the generic reset mechanisms. Rename qemu_prep_reset() to qemu_reboot() and change the function to immediately reboot after the code memcpy. This fixes a bug that could cause code corruption on reboots - calling the udelay() function (as invoked by i8042_reboot and/or pci_reboot) was not valid after the BIOS was memcpy'd. Reported-by: "Dr. David Alan Gilbert" <dgilbert@redhat.com> Tested-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit c68aff57ce317d9f2d69d20eba893a10d964f316)
2017-02-24QEMU fw_cfg: Write fw_cfg back on S3 resumerel-1.10.2Ben Warren3-0/+43
Any pointers to BIOS-allocated memory that were written back to QEMU fw_cfg files are replayed when resuming from S3 sleep. Signed-off-by: Ben Warren <ben@skyportsystems.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit 8f598a4641f98cf503653f80c779793d91c95a84)
2017-02-24QEMU fw_cfg: Add functions for accessing files by keyBen Warren2-11/+32
Due to memory contraints, when resuming from S3 the fw_cfg "files" API isn't available. This adds a simple API to get a file 'key', and to write to the file using the key as a reference. Signed-off-by: Ben Warren <ben@skyportsystems.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> (cherry picked from commit 336b60bb10196adf287489cca4fd17092d9fac5e)
2017-02-24QEMU fw_cfg: Add command to write back address of fileBen Warren2-3/+65
This command is similar to ADD_POINTER, but instead of patching memory, it writes the pointer back to QEMU over the DMA interface. Signed-off-by: Ben Warren <ben@skyportsystems.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> (cherry picked from commit bb9cbbcabc37665cb645cacd1cfefbfe1f4364ab)
2017-02-24romfile-loader: Switch to using named structsBen Warren2-37/+37
This is a little cleaner and matches how the command structures are defined in QEMU. Signed-off-by: Ben Warren <ben@skyportsystems.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> (cherry picked from commit e5bebc77d2a9dfa67cda100b67d787c3ebdb5397)
2017-02-24QEMU DMA: Add DMA write capabilityBen Warren2-0/+52
This allows BIOS to write data back to QEMU using the DMA interface and provides a higher-level abstraction to write to a fw_cfg file Signed-off-by: Ben Warren <ben@skyportsystems.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> (cherry picked from commit f991822f24adbeea519495dd8fe2d8ca7ed47291)
2017-02-24ps2port: Disable keyboard/mouse prior to resetting ps2 controllerKevin O'Connor1-1/+12
If one of the ps2 ports is enabled prior to the ps2 controller reset then it is possible a device event (eg, key press or mouse move) could be mistaken for the controller reset response code. This would result in a failure and the keyboard would be disabled during the boot. Always disabling the keyboard and mouse prior to reset ensures that the controller reset return code can be read properly. Tested-by: Paul Menzel <paulepanter@users.sourceforge.net> Signed-off-by: Kevin O'Connor <kevin@koconnor.net> (cherry picked from commit dbf9dd27f3aefc171839d60c188134da8ad3089d)
2017-02-24vgasrc: Increase debug levelPaul Menzel1-1/+1
You only want this information for debugging. As it also slows down the boot considerably, as, for example, for every character of the GRUB menu, something is sent over the serial console. Therefore, increase the debugging level to 9. Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de> (cherry picked from commit 970af16e6e5a6cb8de6b6658663b8adc00d25b8b)
2017-02-24ahci: Set upper 32-bit registers to zeroLadi Prosek1-0/+5
If the HBA supports 64-bit addressing, the registers may contain non-zero values, for example after reboot as a leftover from the OS driving the adapter. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Ladi Prosek <lprosek@redhat.com> (cherry picked from commit 106543deb447c4005f9a9845f1f43a72547f6209)
2016-11-21drop "etc/boot-cpus" fw_cfg file and reuse legacy QEMU_CFG_NB_CPUSrel-1.10.1Igor Mammedov3-33/+7
since QEMU_CFG_NB_CPUS not going away anytime soon and serves the same purpose as just added "etc/boot-cpus" fw_cfg drop support for "etc/boot-cpus" while this code is not in use yet (i.e. QEMU with "etc/boot-cpus" hasn't been released) and reuse QEMU_CFG_NB_CPUS instead of it. Signed-off-by: Igor Mammedov <imammedo@redhat.com> (cherry picked from commit b98c6586c0c3d519359d6e751ecb3e637e82dbcb)
2016-10-26docs: Note v1.10.0 releaserel-1.10.0Kevin O'Connor1-0/+11
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-10-26build: Add -fno-pie to the gcc flags when availableKevin O'Connor1-0/+1
Reported-by: Paul Menzel <paulepanter@users.sourceforge.net> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-10-25support booting with more than 255 CPUsIgor Mammedov2-4/+21
SDM[*1] says that if there are CPUs with APIC ID greater than 254, BIOS is to pass control to OS in x2APIC mode. Use the fact that QEMU passes in "etc/max-cpus" max possible "APIC ID + 1" to detect need for x2APIC mode. Also instead of CMOS_BIOS_SMP_COUNT which is limited to 256 CPUs use a new rom file "etc/boot-cpus" that QEMU supporting more than 256 CPUs will provide. *1) SDM: Volume 3: EXTENDED XAPIC (X2APIC): Initialization by System Software Signed-off-by: Igor Mammedov <imammedo@redhat.com>
2016-10-25add helpers to read etc/boot-cpus at resume timeIgor Mammedov3-5/+47
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
2016-10-25smp: consolidate CPU APIC ID detection and accountingKevin O'Connor1-10/+15
Signed-off-by: "Kevin O'Connor" <kevin@koconnor.net> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
2016-10-25paravirt: disable legacy bios tables in case of more than 255 CPUsIgor Mammedov1-2/+4
MPTable doesn't support more than 255 CPUs and QEMU supplies an alternative MADT table which guest will use instead of it. So do not install legacy tables if more than 254 CPUs are provided Signed-off-by: Igor Mammedov <imammedo@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com>
2016-10-21build: Be sure to also include out/*.d in MakefileKevin O'Connor1-1/+1
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-10-18docs: fix various typos and inconsistencyPiotr Król2-7/+7
Signed-off-by: Piotr Król <piotr.krol@3mdeb.com>
2016-09-16virtio: fix virtio-pciGerd Hoffmann1-2/+2
virtio-pci calls pci_enable_{io,mem}bar with the bar number, but the functions expect the bar base register offset. Reported-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-09-15kbd: Move extended and release events out of special key detection switchKevin O'Connor1-40/+25
Move checking for extended scancodes and key release to the top of __process_key(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-09-12post: Map int 0x05 to entry pointKevin O'Connor1-0/+1
int 0x05 was not assigned in the interrupt table - fix that. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-09-12kbd: Generate interrupt events for SysReq, PrtScr, and BreakKevin O'Connor2-5/+52
Generate the appropriate interrupt events for the given keys. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-09-12usb-hid: Generate Ctrl+Break and Alt+SysReq keysKevin O'Connor1-20/+30
Detect the sequences for generating Ctrl+Break and Alt+SysReq on USB keyboards and produce the appropriate legacy scancodes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-09-12kbd: Ignore fake shift keysKevin O'Connor1-0/+6
AT keyboards can produce "fake" shift keys on some extended events. It's not necessary to process these artificial events as the actual extended keys are detected directly. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-09-12kbd: Move checking for special keys in __process_keys() into switchKevin O'Connor1-65/+71
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-09-12kbd: Extract out shift flag setting into new functionKevin O'Connor1-62/+43
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-09-12kbd: Merge bda->kbd_flag0 and bda->kbd_flag1Kevin O'Connor2-59/+54
Merge the two consecutive u8 fields into a single u16 field. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-09-12kbd: Suppress keys without mappingsKevin O'Connor1-3/+2
Don't warn if a key without a mapping is pressed - it's known that some keys aren't mapped to keycodes. Suppress these keys instead of sending 0x0000 to the keyboard buffer - as 0x0000 can confuse some programs. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-09-12kbd: Implement extended keycode mappings for keypad-enter and keypad-/Kevin O'Connor1-0/+15
On a 101-key keyboard the keypad enter and keypad '/' keys have unique BIOS keycodes that are distinct from the main keyboard enter and '/' keys. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-09-12kbd: Implement 101-key keyboard keycode mappingKevin O'Connor1-28/+40
The current keyboard code only supports the keycode mappings for 83-key keyboards (plus handling for alt-esc and f11/f12). Add a more complete mapping of keycodes for 101-key keyboards. This adds more alt key and ctrl key mappings. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-08-26pic: The default hardware interrupt handlers should not take a parameterKevin O'Connor1-2/+2
Hardware interrupt handlers don't take a parameter. Remove the incorrect (and unused) parameter from handle_hwpic1/2(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-08-14ps2: Remove stale check for timeout warning on resetKevin O'Connor1-3/+1
Commit 4ce5d207 removed the code to wait for a possible second byte from a keyboard reset command, but it did not remove the extra check when warning in ps2_recvbyte(). Remove the now stale code in ps2_recvbyte(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-08-11tpm: Append to TPM2 log the hashes used for PCR extensionKevin O'Connor2-93/+103
Modify the function that writes the TPM logs to take the same digest passed to tpm_extend. Update the tpm2 acpi log header to describe the digest format. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-08-10tpm: Extend tpm20_extend to support extending to multiple PCR banksStefan Berger2-23/+171
Extend the tpm20_extend function to support extending a hash to multiple PCR banks. The sha1 hash that's being extended into the sha256 bank for example, will be filled with zero-bytes to the size of a sha256 hash. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-08-10tpm: Refactor tpml_digest_values_sha1 structureStefan Berger2-11/+15
Refactor the tpml_digest_values_sha1 structure so we can later cast it to the more general tpml_digest_values structure. Move the count member into this structure. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2016-08-10tpm: Restructure tpm20_extend to use buffer and take hash as parameterStefan Berger2-10/+13
Restructure the tpm20_extend function to use a buffer for the command to send to the TPM. The size of the buffer is calculated from the size of tpm2_req_extend structure and the appended SHA1 hash. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2016-08-10tpm: Retrieve the PCR Bank configurationStefan Berger2-0/+88
Implement tpm20_get_capability and retrieve the PCR Bank configuration from the TPM using this function. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2016-08-10checkstack: Handle conditional checks at start of functionsKevin O'Connor1-0/+5
Recent versions of gcc will sometimes place conditional checks in the code prior to setting up the function's stack frame. Handle this case correctly. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-08-05pvscsi: Use high memory for ringsDana Rubin1-4/+4
Avoid using the scarce ZoneLow memory. This limits max number of pvscsi controllers. As driver runs in 32bit mode, use ZoneHigh allocation instead. Signed-off-by: Dana Rubin <dana.rubin@ravellosystems.com> Signed-off-by: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
2016-08-05pvscsi: Fix incorrect arguments order in call to memalign_lowDana Rubin1-1/+1
First argument should be 'align' and second 'size'. Signed-off-by: <dana.rubin@ravellosystems.com> Signed-off-by: <shmulik.ladkani@ravellosystems.com>
2016-08-05version: Update header files now that version.c is not auto generatedKevin O'Connor3-5/+6
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-08-05vgautil: Move definitions from cbvga.h and clext.h to vgautil.hKevin O'Connor7-46/+30
These files only need to export simple function definitions - move them to vgautil.h. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-08-05vgautil: Move generic definitions from stdvga.h to vgautil.hKevin O'Connor6-33/+37
Don't use stdvga.h for function definitions of code in stdvgamodes.c and stdvgaio.c. Move them to vgautil.h. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-08-05vgautil: Add new header file with misc function and variable definitionsKevin O'Connor13-37/+57
Move the generic function and variable definitions from vgabios.h to a new file vgautil.h. This reduces the size and complexity of vgabios.h. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-08-05vgainit: Move video param setup to stdvga_build_video_param()Kevin O'Connor4-14/+14
Move the full video_param_table[] setup (including the updating of the BDA) to stdvga_build_video_param(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-08-04vgafb: Move header definitions from vgabios.h to new file vgafb.hKevin O'Connor6-37/+47
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-08-04swcursor: Concentrate swcursor logic in swcursor.cKevin O'Connor5-20/+39
The software cursor code is not frequently used (only the coreboot framebuffer vga code uses it). Move its logic out of the main code and into swcursor.c. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2016-08-04swcursor: Move swcursor code from vgafb.c to new file swcursor.cKevin O'Connor4-58/+68
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>