seabios/src
Daniil Tatianin e5f2e4c696 pciinit: don't misalign large BARs
Previously we would unconditionally lower the alignment for large BARs
in case their alignment was greater than "pci_mem64_top >> 11", this
would make it impossible to use these devices by the kernel:
    [   13.821108] pci 0000:9c:00.0: can't claim BAR 1 [mem 0x66000000000-0x67fffffffff 64bit pref]: no compatible bridge window
    [   13.823492] pci 0000:9d:00.0: can't claim BAR 1 [mem 0x64000000000-0x65fffffffff 64bit pref]: no compatible bridge window
    [   13.824218] pci 0000:9e:00.0: can't claim BAR 1 [mem 0x62000000000-0x63fffffffff 64bit pref]: no compatible bridge window
    [   13.828322] pci 0000:8a:00.0: can't claim BAR 1 [mem 0x6e000000000-0x6ffffffffff 64bit pref]: no compatible bridge window
    [   13.830691] pci 0000:8b:00.0: can't claim BAR 1 [mem 0x6c000000000-0x6dfffffffff 64bit pref]: no compatible bridge window
    [   13.832218] pci 0000:8c:00.0: can't claim BAR 1 [mem 0x6a000000000-0x6bfffffffff 64bit pref]: no compatible bridge window

Fix it by only overwriting the alignment in case it's actually greater
than the desired by the BAR window.

Fixes: 96a8d130a8 ("be less conservative with the 64bit pci io window")
Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2024-04-15 09:21:37 -04:00
..
fw pciinit: don't misalign large BARs 2024-04-15 09:21:37 -04:00
hw Add LBA 64bit support for reads beyond 2TB. 2024-01-26 15:59:34 +01:00
std stdvgaio: Only read/write one color palette entry at a time 2024-04-13 13:19:56 -04:00
Kconfig acpi: add dsdt parser 2020-05-15 13:55:29 +02:00
apm.c apm: Remove old Bochs mechanism for shutdown/suspend/standby. 2014-04-07 17:35:47 -04:00
asm-offsets.c Use an aligned stack offset when entering on the extra stack 2014-11-12 12:17:57 -05:00
biosvar.h memmap: Introduce SYMBOL() macro to access linker script symbols 2015-10-15 10:52:13 -04:00
block.c geometry: Apply LCHS values for boot devices 2019-11-18 14:58:37 +01:00
block.h virtio-blk: add feature VIRTIO_BLK_F_SIZE_MAX and VIRTIO_BLK_F_SEG_MAX 2021-12-18 11:52:22 -05:00
bmp.c bootsplash: Added support for 16/24/32bpp in one function 2019-02-04 21:20:27 -05:00
boot.c usb boot: add xhci mmio example 2020-10-15 11:16:26 +02:00
bootsplash.c bootsplash: Added support for 16/24/32bpp in one function 2019-02-04 21:20:27 -05:00
bregs.h Minor - fix some typos in comments. 2014-04-05 09:19:04 -04:00
byteorder.h Move fw/acpi.h to std/acpi.h. 2013-09-18 20:48:34 -04:00
cdrom.c cdrom: Demote `scsi_is_ready` return print to debug level 2020-05-21 13:38:27 -04:00
clock.c add serial console support 2017-09-22 11:13:22 -04:00
code16gcc.s Direct compile 16bit C code instead of including via .S files. 2012-02-11 10:49:45 -05:00
config.h Increase BUILD_MAX_E820 to 128 2023-08-24 10:32:06 +02:00
cp437.c cp437: add license to cp437.c 2019-10-28 10:27:31 -04:00
cp437.h std: add cp437 to unicode map 2017-09-22 11:13:22 -04:00
disk.c block: Rename disk_op_s->drive_gf to drive_fl 2017-09-27 19:02:28 -04:00
e820map.c check for e820 conflict 2023-08-24 10:56:21 +02:00
e820map.h check for e820 conflict 2023-08-24 10:56:21 +02:00
entryfuncs.S Use an aligned stack offset when entering on the extra stack 2014-11-12 12:17:57 -05:00
farptr.h Remove ioport.h; disperse its contents to other header files. 2013-09-28 22:10:31 -04:00
font.c build: Get fixed address variables from 32bit compile pass (not 16bit) 2014-06-11 16:22:51 -04:00
gen-defs.h Add tool for generating assembler offset definition file. 2008-11-16 18:14:33 -05:00
jpeg.c Merge bmp.h, boot.h, jpeg.h, and post.h into util.h. 2013-09-18 20:48:35 -04:00
kbd.c kbd: make enqueue_key public, add ascii_to_keycode 2017-09-22 11:13:22 -04:00
list.h malloc: Introduce common helper alloc_new_detail() 2015-10-15 10:52:13 -04:00
malloc.c Fix high memory zone initialization in CSM mode 2023-06-13 11:01:34 -04:00
malloc.h malloc: Rename csm_malloc_preinit() to malloc_csm_preinit() 2015-10-15 14:15:26 -04:00
memmap.h memmap: Fix gcc out-of-bounds warning 2021-12-18 12:08:53 -05:00
misc.c add serial console support 2017-09-22 11:13:22 -04:00
mouse.c stacks: Use macro wrappers for call32() and stack_hop_back() 2015-10-15 14:15:19 -04:00
optionroms.c optionrom: disallow int19 redirect for pnp roms. 2019-05-22 08:01:20 +02:00
output.c output: add support for uppercase hex numbers 2020-10-13 11:01:08 +02:00
output.h Minor - remove unused includes from pci.c. 2014-04-08 00:09:52 -04:00
pcibios.c pci: Split low-level pci code from higher-level 'struct pci_device' code 2016-02-03 10:38:42 -05:00
pmm.c pmm: use tmp zone on oom 2018-06-22 07:44:07 +02:00
pnpbios.c Move pnpbios definition to new file std/pnpbios.h. 2013-09-18 20:48:34 -04:00
post.c add serial console support 2017-09-22 11:13:22 -04:00
resume.c resume: Don't attempt to use generic reboot mechanisms on QEMU 2017-03-13 11:47:36 -04:00
romfile.c romfile: add support for constant files. 2017-09-22 11:13:22 -04:00
romfile.h romfile: add support for constant files. 2017-09-22 11:13:22 -04:00
romlayout.S add serial console support 2017-09-22 11:13:22 -04:00
sercon.c sercon: Fix missing GET_LOW() to access rx_bytes 2022-01-27 11:28:41 -05:00
serial.c Move most of the VAR16FIXED() defs to misc.c. 2014-06-04 11:06:58 -04:00
sha.h Add implementations for sha256, sha384, and sha512 2021-06-30 16:58:48 -04:00
sha1.c Add implementations for sha256, sha384, and sha512 2021-06-30 16:58:48 -04:00
sha256.c Add implementations for sha256, sha384, and sha512 2021-06-30 16:58:48 -04:00
sha512.c Add implementations for sha256, sha384, and sha512 2021-06-30 16:58:48 -04:00
stacks.c stacks: call check_irqs() after switch_next() 2021-06-09 11:05:19 -04:00
stacks.h stacks: Use macro wrappers for call32() and stack_hop_back() 2015-10-15 14:15:19 -04:00
string.c Fix typos found by codespell 2015-10-09 13:34:28 -04:00
string.h Don't forward declare functions with "inline" in headers 2015-06-03 19:21:37 -04:00
system.c e820: Rename memmap.c to e820map.c and use consistent "e820_" prefix 2015-10-15 10:52:13 -04:00
tcgbios.c tpm: Use smbios_get_tables() 2021-12-18 11:39:13 -05:00
tcgbios.h tpm: Rework the assertion of physical presence 2016-01-07 12:13:07 -05:00
types.h Fix typos found by codespell 2015-10-09 13:34:28 -04:00
util.h smbios: Make SMBios21Addr variable static 2021-12-18 11:39:13 -05:00
version.c build: Report gcc and binutils versions in debug log 2015-10-15 10:55:10 -04:00
vgahooks.c pci: Split low-level pci code from higher-level 'struct pci_device' code 2016-02-03 10:38:42 -05:00
x86.c Split x86 specific functions out of util.c/h to new files x86.c/h. 2013-09-18 20:48:34 -04:00
x86.h Add implementations for sha256, sha384, and sha512 2021-06-30 16:58:48 -04:00