/* openprom.h: Prom structures and defines for access to the OPENBOOT * prom routines and data areas. * * Copyright (C) 1995,1996 David S. Miller (davem@caip.rutgers.edu)
*/
/* V0 prom device operations. */ struct linux_dev_v0_funcs { int (*v0_devopen)(char *device_str); int (*v0_devclose)(int dev_desc); int (*v0_rdblkdev)(int dev_desc, int num_blks, int blk_st, char *buf); int (*v0_wrblkdev)(int dev_desc, int num_blks, int blk_st, char *buf); int (*v0_wrnetdev)(int dev_desc, int num_bytes, char *buf); int (*v0_rdnetdev)(int dev_desc, int num_bytes, char *buf); int (*v0_rdchardev)(int dev_desc, int num_bytes, int dummy, char *buf); int (*v0_wrchardev)(int dev_desc, int num_bytes, int dummy, char *buf); int (*v0_seekdev)(int dev_desc, long logical_offst, int from);
};
/* To map devices into virtual I/O space. */ char * (*v2_dumb_mmap)(char *virta, int which_io, unsignedint paddr, unsignedint sz); void (*v2_dumb_munmap)(char *virta, unsignedint size);
int (*v2_dev_open)(char *devpath); void (*v2_dev_close)(int d); int (*v2_dev_read)(int d, char *buf, int nbytes); int (*v2_dev_write)(int d, constchar *buf, int nbytes); int (*v2_dev_seek)(int d, int hi, int lo);
struct linux_mem_v0 { struct linux_mlist_v0 **v0_totphys; struct linux_mlist_v0 **v0_prommap; struct linux_mlist_v0 **v0_available; /* What we can use */
};
/* Arguments sent to the kernel from the boot prompt. */ struct linux_arguments_v0 { char *argv[8]; char args[100]; char boot_dev[2]; int boot_dev_ctrl; int boot_dev_unit; int dev_partition; char *kernel_file_name; void *aieee1; /* XXX */
};
/* V2 and up boot things. */ struct linux_bootargs_v2 { char **bootpath; char **bootargs; int *fd_stdin; int *fd_stdout;
};
/* The top level PROM vector. */ struct linux_romvec { /* Version numbers. */ unsignedint pv_magic_cookie; unsignedint pv_romvers; unsignedint pv_plugin_revision; unsignedint pv_printrev;
/* Version 0 memory descriptors. */ struct linux_mem_v0 pv_v0mem;
/* Evaluate a forth string, not different proto for V0 and V2->up. */ union { void (*v0_eval)(int len, char *str); void (*v2_eval)(char *str);
} pv_fortheval;
struct linux_arguments_v0 **pv_v0bootargs;
/* Get ether address. */ unsignedint (*pv_enaddr)(int d, char *enaddr);
/* This one is sun4c/sun4 only. */ void (*pv_setctxt)(int ctxt, char *va, int pmeg);
/* Prom version 3 Multiprocessor routines. This stuff is crazy. * No joke. Calling these when there is only one cpu probably * crashes the machine, have to test this. :-)
*/
/* v3_cpustart() will start the cpu 'whichcpu' in mmu-context * 'thiscontext' executing at address 'prog_counter'
*/ int (*v3_cpustart)(unsignedint whichcpu, int ctxtbl_ptr, int thiscontext, char *prog_counter);
/* v3_cpustop() will cause cpu 'whichcpu' to stop executing * until a resume cpu call is made.
*/ int (*v3_cpustop)(unsignedint whichcpu);
/* v3_cpuidle() will idle cpu 'whichcpu' until a stop or * resume cpu call is made.
*/ int (*v3_cpuidle)(unsignedint whichcpu);
/* v3_cpuresume() will resume processor 'whichcpu' executing * starting with whatever 'pc' and 'npc' were left at the * last 'idle' or 'stop' call.
*/ int (*v3_cpuresume)(unsignedint whichcpu);
};
/* Routines for traversing the prom device tree. */ struct linux_nodeops {
phandle (*no_nextnode)(phandle node);
phandle (*no_child)(phandle node); int (*no_proplen)(phandle node, constchar *name); int (*no_getprop)(phandle node, constchar *name, char *val); int (*no_setprop)(phandle node, constchar *name, char *val, int len); char * (*no_nextprop)(phandle node, char *name);
};
struct linux_prom_registers { unsignedint which_io; /* hi part of physical address */ unsignedint phys_addr; /* The physical address of this register */ unsignedint reg_size; /* How many bytes does this register take up? */
};
struct linux_prom_irqs { int pri; /* IRQ priority */ int vector; /* This is foobar, what does it do? */
};
/* Element of the "ranges" vector */ struct linux_prom_ranges { unsignedint ot_child_space; unsignedint ot_child_base; /* Bus feels this */ unsignedint ot_parent_space; unsignedint ot_parent_base; /* CPU looks from here */ unsignedint or_size;
};
/* * Ranges and reg properties are a bit different for PCI.
*/ #ifdefined(__sparc__) && defined(__arch64__) struct linux_prom_pci_registers { unsignedint phys_hi; unsignedint phys_mid; unsignedint phys_lo;
unsignedint size_hi; unsignedint size_lo;
}; #else struct linux_prom_pci_registers { /* * We don't know what information this field contain. * We guess, PCI device function is in bits 15:8 * So, ...
*/ unsignedint which_io; /* Let it be which_io */
unsignedint phys_hi; unsignedint phys_lo;
unsignedint size_hi; unsignedint size_lo;
};
#endif
struct linux_prom_pci_ranges { unsignedint child_phys_hi; /* Only certain bits are encoded here. */ unsignedint child_phys_mid; unsignedint child_phys_lo;
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.