mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
Fix the issue of on x86_64, rhel4 can not get into runlevel 5.
Xserver will scan pci and the cirrus VGA driver will register mmio each time, cause mmio array out of space. Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
This commit is contained in:
1 parent
9ad74f9849
commit
11d666ab5e
1 file changed
+17
-6
+17
-6
@@ -262,13 +262,24 @@ void cpu_register_physical_memory(target_phys_addr_t start_addr,
|
||||
unsigned long size,
|
||||
unsigned long phys_offset)
|
||||
{
|
||||
if (mmio_cnt == MAX_MMIO) {
|
||||
fprintf(logfile, "too many mmio regions\n");
|
||||
exit(-1);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < mmio_cnt; i++) {
|
||||
if(mmio[i].start == start_addr) {
|
||||
mmio[i].io_index = phys_offset;
|
||||
mmio[i].size = size;
|
||||
return;
|
||||
}
|
||||
mmio[mmio_cnt].io_index = phys_offset;
|
||||
mmio[mmio_cnt].start = start_addr;
|
||||
mmio[mmio_cnt++].size = size;
|
||||
}
|
||||
|
||||
if (mmio_cnt == MAX_MMIO) {
|
||||
fprintf(logfile, "too many mmio regions\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
mmio[mmio_cnt].io_index = phys_offset;
|
||||
mmio[mmio_cnt].start = start_addr;
|
||||
mmio[mmio_cnt++].size = size;
|
||||
}
|
||||
|
||||
/* mem_read and mem_write are arrays of functions containing the
|
||||
|
||||