/* Use the 32 bit information from page zero to create a single *entryinthepmem_ranges[]table. * *Wecurrentlydon'tsupportmachineswithcontiguousmemory *>=4Gb,whoreportthatmemoryusing64bitonlyfields *onpagezero.It'snotworthdoinguntilitcanbetested, *anditisnotclearwecansupportthosemachinesforother *reasons. * *Ifthatsupportisdoneinthefuture,thisiswhereit *shouldbedone.
*/
/* save generic info returned from the call */ /* REVISIT: who is the consumer of this? not sure yet... */
dev->mod_info = pa_pdc_cell->mod_info; /* pass to PAT_GET_ENTITY() */
dev->pmod_loc = pa_pdc_cell->mod_location;
dev->mod0 = pa_pdc_cell->mod[0];
case PAT_ENTITY_PBC:
printk(KERN_DEBUG "PAT_ENTITY_PBC: "); goto print_ranges;
case PAT_ENTITY_SBA:
printk(KERN_DEBUG "PAT_ENTITY_SBA: "); goto print_ranges;
case PAT_ENTITY_LBA:
printk(KERN_DEBUG "PAT_ENTITY_LBA: ");
print_ranges:
pdc_pat_cell_module(&bytecnt, pcell_loc, mod_index,
IO_VIEW, &io_pdc_cell);
printk(KERN_DEBUG "ranges %ld\n", pa_pdc_cell->mod[1]); for (i = 0; i < pa_pdc_cell->mod[1]; i++) {
printk(KERN_DEBUG " PA_VIEW %ld: 0x%016lx 0x%016lx 0x%016lx\n",
i, pa_pdc_cell->mod[2 + i * 3], /* type */
pa_pdc_cell->mod[3 + i * 3], /* start */
pa_pdc_cell->mod[4 + i * 3]); /* finish (ie end) */
printk(KERN_DEBUG " IO_VIEW %ld: 0x%016lx 0x%016lx 0x%016lx\n",
i, io_pdc_cell.mod[2 + i * 3], /* type */
io_pdc_cell.mod[3 + i * 3], /* start */
io_pdc_cell.mod[4 + i * 3]); /* finish (ie end) */
}
printk(KERN_DEBUG "\n"); break;
} #endif/* DEBUG_PAT */
kfree(pa_pdc_cell);
return PDC_OK;
}
/* pat pdc can return information about a variety of different *typesofmemory(e.g.firmware,i/o,etc)butweonlycareabout *theusablephysicalramrightnow.Sincethefirmwarespecific *informationisallocatedonthestack,we'llbegenerous,in *casethereisalotofotherinformationwedon'tcareabout.
*/
#define PAT_MAX_RANGES (4 * MAX_PHYSMEM_RANGES)
staticvoid __init pat_memconfig(void)
{ unsignedlong actual_len; struct pdc_pat_pd_addr_map_entry mem_table[PAT_MAX_RANGES+1]; struct pdc_pat_pd_addr_map_entry *mtbl_ptr;
physmem_range_t *pmem_ptr; long status; int entries; unsignedlong length; int i;
/* The above pdc call shouldn't fail, but, just in *case,justusethePAGE0info.
*/
printk("\n\n\n");
printk(KERN_WARNING "WARNING! Could not get full memory configuration. " "All memory may not be used!\n\n\n");
pagezero_memconfig(); return;
}
if (entries > PAT_MAX_RANGES) {
printk(KERN_WARNING "This Machine has more memory ranges than we support!\n");
printk(KERN_WARNING "Some memory may not be used!\n");
}
/* Copy information into the firmware independent pmem_ranges *array,skippingtypeswedon'tcareabout.Noticewesaid *"may"above.We'llusealltheentriesthatwerereturned.
*/
if (npmem_ranges == MAX_PHYSMEM_RANGES) {
printk(KERN_WARNING "This Machine has more memory ranges than we support!\n");
printk(KERN_WARNING "Some memory will not be used!\n"); break;
}
while (PDC_OK == pat_query_module(cell_info.cell_loc, mod_index)) {
mod_index++;
}
return mod_index;
}
/* We only look for extended memory ranges on a 64 bit capable box */ staticvoid __init sprockets_memconfig(void)
{ struct pdc_memory_table_raddr r_addr; struct pdc_memory_table mem_table[MAX_PHYSMEM_RANGES]; struct pdc_memory_table *mtbl_ptr;
physmem_range_t *pmem_ptr; long status; int entries; int i;
status = pdc_mem_mem_table(&r_addr,mem_table,
(unsignedlong)MAX_PHYSMEM_RANGES);
if (status != PDC_OK) {
/* The above pdc call only works on boxes with sprockets *firmware(newerB,C,Jclass).OthernonPATPDCmachines *dosupportmorethan3.75Gbofmemory,butwedon't *supportthemyet.
*/
pagezero_memconfig(); return;
}
if (r_addr.entries_total > MAX_PHYSMEM_RANGES) {
printk(KERN_WARNING "This Machine has more memory ranges than we support!\n");
printk(KERN_WARNING "Some memory will not be used!\n");
}
entries = (int)r_addr.entries_returned;
npmem_ranges = 0;
mtbl_ptr = mem_table;
pmem_ptr = pmem_ranges; /* Global firmware independent table */ for (i = 0; i < entries; i++,mtbl_ptr++) {
set_pmem_entry(pmem_ptr++,mtbl_ptr->paddr,mtbl_ptr->pages);
npmem_ranges++;
}
}
#else/* !CONFIG_64BIT */
#define pat_inventory() do { } while (0) #define pat_memconfig() do { } while (0) #define sprockets_memconfig() pagezero_memconfig()
#endif/* !CONFIG_64BIT */
#ifndef CONFIG_PA20
/* Code to support Snake machines (7[2350], 7[235]5, 715/Scorpio) */
staticstruct parisc_device * __init
legacy_create_device(struct pdc_memory_map *r_addr, struct pdc_module_path *module_path)
{ struct parisc_device *dev; int status = pdc_mem_map_hpa(r_addr, module_path); if (status != PDC_OK) return NULL;
dev = alloc_pa_dev(r_addr->hpa, &module_path->path); if (dev == NULL) return NULL;
if (base) {
pr_info("Found qemu fw_cfg interface at %#08x\n", base);
platform_device_register_simple("fw_cfg",
PLATFORM_DEVID_NONE, res, 3);
}
} #endif
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.14Bemerkung:
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-09-27)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.