[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] hvmloader: tidy pci_mem_{start,end}
commit 1c4589280ae4e9ba34266e674459fffd6f0282dc Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Fri Dec 17 08:56:34 2021 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Dec 17 08:56:34 2021 +0100 hvmloader: tidy pci_mem_{start,end} For one at least pci_mem_start has to be precisely 32 bits wide, so use uint32_t for both. Otherwise expressions like "pci_mem_start <<= 1" won't have the intended effect (in their context). Further since its introduction pci_mem_end was never written to. Mark it const to make this explicit. Finally drop PCI_MEM_END: It is used just once and needlessly disconnected from the other constant (RESERVED_MEMBASE) it needs to match. Use RESERVED_MEMBASE as initializer of pci_mem_end instead. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- tools/firmware/hvmloader/config.h | 6 ++---- tools/firmware/hvmloader/pci.c | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/tools/firmware/hvmloader/config.h b/tools/firmware/hvmloader/config.h index 844120bc87..c82adf6dc5 100644 --- a/tools/firmware/hvmloader/config.h +++ b/tools/firmware/hvmloader/config.h @@ -55,12 +55,10 @@ extern uint8_t ioapic_version; #define PCI_ISA_DEVFN 0x08 /* dev 1, fn 0 */ #define PCI_ISA_IRQ_MASK 0x0c20U /* ISA IRQs 5,10,11 are PCI connected */ -/* MMIO hole: Hardcoded defaults, which can be dynamically expanded. */ -#define PCI_MEM_END 0xfc000000 - #define ACPI_TIS_HDR_ADDRESS 0xFED40F00UL -extern unsigned long pci_mem_start, pci_mem_end; +extern uint32_t pci_mem_start; +extern const uint32_t pci_mem_end; extern uint64_t pci_hi_mem_start, pci_hi_mem_end; extern bool acpi_enabled; diff --git a/tools/firmware/hvmloader/pci.c b/tools/firmware/hvmloader/pci.c index 72f92d4450..257a6feb61 100644 --- a/tools/firmware/hvmloader/pci.c +++ b/tools/firmware/hvmloader/pci.c @@ -29,8 +29,8 @@ #include <xen/hvm/hvm_xs_strings.h> #include <xen/hvm/e820.h> -unsigned long pci_mem_start = HVM_BELOW_4G_MMIO_START; -unsigned long pci_mem_end = PCI_MEM_END; +uint32_t pci_mem_start = HVM_BELOW_4G_MMIO_START; +const uint32_t pci_mem_end = RESERVED_MEMBASE; uint64_t pci_hi_mem_start = 0, pci_hi_mem_end = 0; enum virtual_vga virtual_vga = VGA_none; @@ -329,7 +329,7 @@ void pci_setup(void) else { pci_mem_start = max_ram_below_4g; - printf("pci_mem_start=0x%lx (was 0x%x) for mmio_hole_size=%lu\n", + printf("pci_mem_start=0x%x (was 0x%x) for mmio_hole_size=0x%lx\n", pci_mem_start, HVM_BELOW_4G_MMIO_START, (long)mmio_hole_size); } -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |