aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* serialio: Support for mmap serial portsHEADmasterRicardo Ribalda Delgado2016-12-302-10/+47
| | | | | | | | | Some chipsets have memory mapped serial ports. The protocol is the same as an standard uart, but with memory read/write instead of inb/outb. Tested-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tpm: Log TPM 2 digest structure in little endian formatStefan Berger2016-11-271-7/+18
| | | | | | | | | | | | | The parameters for extending the PCRs of a TPM 2 are written in big endian format when sent to the TPM. However, the log needs to be written in little endian format, so we cannot just copy the structure into the log as-is. To support the little endian format in the log, we extend the function writing the TPM 2 digest structure with a parameter that allows us to choose the endianess of a few parameters. We then rewrite the digest structure in little endian format for the log. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
* tpm: Rework tpm_build_and_send_cmd() into tpm_simple_cmd()Kevin O'Connor2016-11-272-109/+53
| | | | | | | | | | Instead of passing an arbitrary buffer as a parameter to tpm_build_and_send_cmd(), just support the simpler case of a parameter that is only 0, 1, or 2 bytes in length. This allows the callers to pass the parameter directly and not worry about the big-endian encoding. Rename the function to tpm_simple_cmd(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tpm: Don't call tpm_build_and_send_cmd() from tpm20_stirrandom()Kevin O'Connor2016-11-272-5/+12
| | | | | | Instead call tpmhw_transmit() directly. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* acpi: Generalize find_fadt() and find_tcpa_by_rsdp() into find_acpi_table()Kevin O'Connor2016-11-274-49/+11
| | | | | | | | The find_fadt() and find_tcpa_by_rsdp() functions are very similar. Create a new find_acpi_table() function and replace the two functions with this new function. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tpm: Move code around in tcgbios.c to keep like code togetherKevin O'Connor2016-11-271-207/+210
| | | | | | No code changes; just code movement. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tpm: Don't call tpm_set_failure() from tpm12_get_capability()Kevin O'Connor2016-11-271-5/+1
| | | | | | | | | In the event of a failure in the low-level tpm12_get_capability() code, just return an error code. The caller can shutdown the TPM if needed - the only place where that is needed is during a failure in tpm12_determine_timeouts(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tpm: Add comment banners to tcg.c separating major parts of specKevin O'Connor2016-11-271-101/+91
| | | | | | No code changes; just code movement. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* drop "etc/boot-cpus" fw_cfg file and reuse legacy QEMU_CFG_NB_CPUSIgor Mammedov2016-11-213-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>
* usb: Make usb_time_sigatt variable staticKevin O'Connor2016-10-261-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* docs: Note v1.10.0 releaseKevin O'Connor2016-10-261-0/+11
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Add -fno-pie to the gcc flags when availableKevin O'Connor2016-10-261-0/+1
| | | | | Reported-by: Paul Menzel <paulepanter@users.sourceforge.net> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* support booting with more than 255 CPUsIgor Mammedov2016-10-252-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>
* add helpers to read etc/boot-cpus at resume timeIgor Mammedov2016-10-253-5/+47
| | | | Signed-off-by: Igor Mammedov <imammedo@redhat.com>
* smp: consolidate CPU APIC ID detection and accountingKevin O'Connor2016-10-251-10/+15
| | | | | Signed-off-by: "Kevin O'Connor" <kevin@koconnor.net> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
* paravirt: disable legacy bios tables in case of more than 255 CPUsIgor Mammedov2016-10-251-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>
* build: Be sure to also include out/*.d in MakefileKevin O'Connor2016-10-211-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* docs: fix various typos and inconsistencyPiotr Król2016-10-182-7/+7
| | | | Signed-off-by: Piotr Król <piotr.krol@3mdeb.com>
* virtio: fix virtio-pciGerd Hoffmann2016-09-161-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>
* kbd: Move extended and release events out of special key detection switchKevin O'Connor2016-09-151-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>
* post: Map int 0x05 to entry pointKevin O'Connor2016-09-121-0/+1
| | | | | | int 0x05 was not assigned in the interrupt table - fix that. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kbd: Generate interrupt events for SysReq, PrtScr, and BreakKevin O'Connor2016-09-122-5/+52
| | | | | | Generate the appropriate interrupt events for the given keys. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* usb-hid: Generate Ctrl+Break and Alt+SysReq keysKevin O'Connor2016-09-121-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>
* kbd: Ignore fake shift keysKevin O'Connor2016-09-121-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>
* kbd: Move checking for special keys in __process_keys() into switchKevin O'Connor2016-09-121-65/+71
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kbd: Extract out shift flag setting into new functionKevin O'Connor2016-09-121-62/+43
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kbd: Merge bda->kbd_flag0 and bda->kbd_flag1Kevin O'Connor2016-09-122-59/+54
| | | | | | Merge the two consecutive u8 fields into a single u16 field. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kbd: Suppress keys without mappingsKevin O'Connor2016-09-121-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>
* kbd: Implement extended keycode mappings for keypad-enter and keypad-/Kevin O'Connor2016-09-121-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>
* kbd: Implement 101-key keyboard keycode mappingKevin O'Connor2016-09-121-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>
* pic: The default hardware interrupt handlers should not take a parameterKevin O'Connor2016-08-261-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>
* ps2: Remove stale check for timeout warning on resetKevin O'Connor2016-08-141-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>
* tpm: Append to TPM2 log the hashes used for PCR extensionKevin O'Connor2016-08-112-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>
* tpm: Extend tpm20_extend to support extending to multiple PCR banksStefan Berger2016-08-102-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>
* tpm: Refactor tpml_digest_values_sha1 structureStefan Berger2016-08-102-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>
* tpm: Restructure tpm20_extend to use buffer and take hash as parameterStefan Berger2016-08-102-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>
* tpm: Retrieve the PCR Bank configurationStefan Berger2016-08-102-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>
* checkstack: Handle conditional checks at start of functionsKevin O'Connor2016-08-101-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>
* pvscsi: Use high memory for ringsDana Rubin2016-08-051-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>
* pvscsi: Fix incorrect arguments order in call to memalign_lowDana Rubin2016-08-051-1/+1
| | | | | | | First argument should be 'align' and second 'size'. Signed-off-by: <dana.rubin@ravellosystems.com> Signed-off-by: <shmulik.ladkani@ravellosystems.com>
* version: Update header files now that version.c is not auto generatedKevin O'Connor2016-08-053-5/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* vgautil: Move definitions from cbvga.h and clext.h to vgautil.hKevin O'Connor2016-08-057-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>
* vgautil: Move generic definitions from stdvga.h to vgautil.hKevin O'Connor2016-08-056-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>
* vgautil: Add new header file with misc function and variable definitionsKevin O'Connor2016-08-0513-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>
* vgainit: Move video param setup to stdvga_build_video_param()Kevin O'Connor2016-08-054-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>
* vgafb: Move header definitions from vgabios.h to new file vgafb.hKevin O'Connor2016-08-046-37/+47
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* swcursor: Concentrate swcursor logic in swcursor.cKevin O'Connor2016-08-045-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>
* swcursor: Move swcursor code from vgafb.c to new file swcursor.cKevin O'Connor2016-08-044-58/+68
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* blockcmd: CMD_SCSI op is only used in 32bit modeKevin O'Connor2016-08-041-1/+6
| | | | | | | Reduce the size of the 16bit code slightly by recognizing that CMD_SCSI is only used in 32bit mode. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* vgabios: Simplify scroll logicKevin O'Connor2016-07-213-69/+64
| | | | | | | | | Introduce a new function vgafb_scroll() to scroll a window on the screen and update vgabios.c to use only that function for scrolling. This makes the low-level vgafb_move_chars() and vgafb_clear_chars() local to vgafb.c, and it simplifies the callers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>