mirror of https://github.com/wolfSSL/wolfBoot.git
The cursors mem, mem_pf and io advanced as 32-bit values: after a BAR allocation whose end is exactly the pool end 0x100000000 (now reachable), *base = bar_value + length wrapped to 0. Every later allocation then passed the start and end checks and programmed its BAR at address 0, over the legacy IO range and DRAM. Widen the three cursors to 64-bit and advance with a 64-bit sum, so an exhausted pool leaves the cursor at the end. The address parameters of pci_enum_next_aligned32 and pci_align_check_up widen with them; pci_enum_next_aligned32 computes in uint64_t rather than uintptr_t, which on 32-bit targets would truncate the exhausted cursor back to 0 and defeat the addr > 0xffffffff rejection. The programmed BAR value stays 32-bit. The 4 GiB pool unit test now also adds a second device with a preset (previously programmed) BAR: exactly filling the pool must leave that BAR untouched instead of re-allocating it from a wrapped cursor. The mock learns to seed a BAR preset from the bar info, and the loop variable shadowing in test_pci_commit that it exposed is fixed (the inner preset loop clobbered the outer node loop counter, so only the first node was ever committed). Verified: unit-pci 30/30, unit-pci-4gib green, full nxp_t1024 powerpc build green. |
||
|---|---|---|
| .. | ||
| MPLAB | ||
| wolfboot | ||
| x86 | ||
| c2000_stdint.h | ||
| ddr_cadence.h | ||
| delta.h | ||
| disk.h | ||
| elf.h | ||
| encrypt.h | ||
| fdt.h | ||
| gpt.h | ||
| gzip.h | ||
| hal.h | ||
| hal_fpga.h | ||
| hooks.h | ||
| image.h | ||
| keystore.h | ||
| loader.h | ||
| multiboot.h | ||
| otp_keystore.h | ||
| pci.h | ||
| printf.h | ||
| sdhci.h | ||
| spi_drv.h | ||
| spi_flash.h | ||
| stage2_params.h | ||
| target.h.in | ||
| tpm.h | ||
| uart_drv.h | ||
| uart_flash.h | ||
| ubootenv.h | ||
| user_settings.h | ||
| wolfboot_efi.h | ||
| wolfboot_smc.h | ||