Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
xen.787
5513dccf-hvmloader-don-t-treat-ROM-BAR-like-oth...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 5513dccf-hvmloader-don-t-treat-ROM-BAR-like-other-BARs.patch of Package xen.787
# Commit 73aa7fc2926c5ae30d8ebd049beadbb48e24d6c6 # Date 2015-03-26 11:17:51 +0100 # Author Jan Beulich <jbeulich@suse.com> # Committer Jan Beulich <jbeulich@suse.com> hvmloader: don't treat ROM BAR like other BARs Its low 11 bits have different meaning. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> --- a/tools/firmware/hvmloader/pci.c +++ b/tools/firmware/hvmloader/pci.c @@ -173,18 +173,31 @@ void pci_setup(void) bar_reg = PCI_ROM_ADDRESS; bar_data = pci_readl(devfn, bar_reg); - is_64bar = !!((bar_data & (PCI_BASE_ADDRESS_SPACE | - PCI_BASE_ADDRESS_MEM_TYPE_MASK)) == - (PCI_BASE_ADDRESS_SPACE_MEMORY | - PCI_BASE_ADDRESS_MEM_TYPE_64)); - pci_writel(devfn, bar_reg, ~0); + if ( bar_reg != PCI_ROM_ADDRESS ) + { + is_64bar = !!((bar_data & (PCI_BASE_ADDRESS_SPACE | + PCI_BASE_ADDRESS_MEM_TYPE_MASK)) == + (PCI_BASE_ADDRESS_SPACE_MEMORY | + PCI_BASE_ADDRESS_MEM_TYPE_64)); + pci_writel(devfn, bar_reg, ~0); + } + else + { + is_64bar = 0; + pci_writel(devfn, bar_reg, + (bar_data | PCI_ROM_ADDRESS_MASK) & + ~PCI_ROM_ADDRESS_ENABLE); + } bar_sz = pci_readl(devfn, bar_reg); pci_writel(devfn, bar_reg, bar_data); - bar_sz &= (((bar_data & PCI_BASE_ADDRESS_SPACE) == - PCI_BASE_ADDRESS_SPACE_MEMORY) ? - PCI_BASE_ADDRESS_MEM_MASK : - (PCI_BASE_ADDRESS_IO_MASK & 0xffff)); + if ( bar_reg != PCI_ROM_ADDRESS ) + bar_sz &= (((bar_data & PCI_BASE_ADDRESS_SPACE) == + PCI_BASE_ADDRESS_SPACE_MEMORY) ? + PCI_BASE_ADDRESS_MEM_MASK : + (PCI_BASE_ADDRESS_IO_MASK & 0xffff)); + else + bar_sz &= PCI_ROM_ADDRESS_MASK; if (is_64bar) { bar_data_upper = pci_readl(devfn, bar_reg + 4); pci_writel(devfn, bar_reg + 4, ~0); @@ -208,8 +221,9 @@ void pci_setup(void) bars[i].bar_reg = bar_reg; bars[i].bar_sz = bar_sz; - if ( (bar_data & PCI_BASE_ADDRESS_SPACE) == - PCI_BASE_ADDRESS_SPACE_MEMORY ) + if ( ((bar_data & PCI_BASE_ADDRESS_SPACE) == + PCI_BASE_ADDRESS_SPACE_MEMORY) || + (bar_reg == PCI_ROM_ADDRESS) ) mmio_total += bar_sz; nr_bars++;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor