diff options
-rw-r--r-- | Documentation/kernel-parameters.txt | 3 | ||||
-rw-r--r-- | arch/x86/pci/common.c | 22 | ||||
-rw-r--r-- | arch/x86/pci/pci.h | 1 |
3 files changed, 26 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index e07c432c731f..9cf7b34f2db0 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1496,6 +1496,9 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1496 | Use with caution as certain devices share | 1496 | Use with caution as certain devices share |
1497 | address decoders between ROMs and other | 1497 | address decoders between ROMs and other |
1498 | resources. | 1498 | resources. |
1499 | norom [X86-32,X86_64] Do not assign address space to | ||
1500 | expansion ROMs that do not already have | ||
1501 | BIOS assigned address ranges. | ||
1499 | irqmask=0xMMMM [X86-32] Set a bit mask of IRQs allowed to be | 1502 | irqmask=0xMMMM [X86-32] Set a bit mask of IRQs allowed to be |
1500 | assigned automatically to PCI devices. You can | 1503 | assigned automatically to PCI devices. You can |
1501 | make the kernel exclude IRQs of your ISA cards | 1504 | make the kernel exclude IRQs of your ISA cards |
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 6e64aaf00d1d..3a5261bdff5d 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -121,6 +121,21 @@ void __init dmi_check_skip_isa_align(void) | |||
121 | dmi_check_system(can_skip_pciprobe_dmi_table); | 121 | dmi_check_system(can_skip_pciprobe_dmi_table); |
122 | } | 122 | } |
123 | 123 | ||
124 | static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) | ||
125 | { | ||
126 | struct resource *rom_r = &dev->resource[PCI_ROM_RESOURCE]; | ||
127 | |||
128 | if (pci_probe & PCI_NOASSIGN_ROMS) { | ||
129 | if (rom_r->parent) | ||
130 | return; | ||
131 | if (rom_r->start) { | ||
132 | /* we deal with BIOS assigned ROM later */ | ||
133 | return; | ||
134 | } | ||
135 | rom_r->start = rom_r->end = rom_r->flags = 0; | ||
136 | } | ||
137 | } | ||
138 | |||
124 | /* | 139 | /* |
125 | * Called after each bus is probed, but before its children | 140 | * Called after each bus is probed, but before its children |
126 | * are examined. | 141 | * are examined. |
@@ -128,7 +143,11 @@ void __init dmi_check_skip_isa_align(void) | |||
128 | 143 | ||
129 | void __devinit pcibios_fixup_bus(struct pci_bus *b) | 144 | void __devinit pcibios_fixup_bus(struct pci_bus *b) |
130 | { | 145 | { |
146 | struct pci_dev *dev; | ||
147 | |||
131 | pci_read_bridge_bases(b); | 148 | pci_read_bridge_bases(b); |
149 | list_for_each_entry(dev, &b->devices, bus_list) | ||
150 | pcibios_fixup_device_resources(dev); | ||
132 | } | 151 | } |
133 | 152 | ||
134 | /* | 153 | /* |
@@ -483,6 +502,9 @@ char * __devinit pcibios_setup(char *str) | |||
483 | else if (!strcmp(str, "rom")) { | 502 | else if (!strcmp(str, "rom")) { |
484 | pci_probe |= PCI_ASSIGN_ROMS; | 503 | pci_probe |= PCI_ASSIGN_ROMS; |
485 | return NULL; | 504 | return NULL; |
505 | } else if (!strcmp(str, "norom")) { | ||
506 | pci_probe |= PCI_NOASSIGN_ROMS; | ||
507 | return NULL; | ||
486 | } else if (!strcmp(str, "assign-busses")) { | 508 | } else if (!strcmp(str, "assign-busses")) { |
487 | pci_probe |= PCI_ASSIGN_ALL_BUSSES; | 509 | pci_probe |= PCI_ASSIGN_ALL_BUSSES; |
488 | return NULL; | 510 | return NULL; |
diff --git a/arch/x86/pci/pci.h b/arch/x86/pci/pci.h index 720c4c554534..291dafec07b7 100644 --- a/arch/x86/pci/pci.h +++ b/arch/x86/pci/pci.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #define PCI_CAN_SKIP_ISA_ALIGN 0x8000 | 27 | #define PCI_CAN_SKIP_ISA_ALIGN 0x8000 |
28 | #define PCI_USE__CRS 0x10000 | 28 | #define PCI_USE__CRS 0x10000 |
29 | #define PCI_CHECK_ENABLE_AMD_MMCONF 0x20000 | 29 | #define PCI_CHECK_ENABLE_AMD_MMCONF 0x20000 |
30 | #define PCI_NOASSIGN_ROMS 0x40000 | ||
30 | 31 | ||
31 | extern unsigned int pci_probe; | 32 | extern unsigned int pci_probe; |
32 | extern unsigned long pirq_table_addr; | 33 | extern unsigned long pirq_table_addr; |