calculationOfLiquidLevelVariance.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. * oplib.h: Describes the interface and available routines in the
  3. * Linux Prom library.
  4. *
  5. * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
  6. */
  7. #ifndef __SPARC_OPLIB_H
  8. #define __SPARC_OPLIB_H
  9. #include <asm/openprom.h>
  10. /* The master romvec pointer... */
  11. extern struct linux_romvec *romvec;
  12. /* Enumeration to describe the prom major version we have detected. */
  13. enum prom_major_version {
  14. PROM_V0, /* Original sun4c V0 prom */
  15. PROM_V2, /* sun4c and early sun4m V2 prom */
  16. PROM_V3, /* sun4m and later, up to sun4d/sun4e machines V3 */
  17. PROM_P1275, /* IEEE compliant ISA based Sun PROM, only sun4u */
  18. };
  19. extern enum prom_major_version prom_vers;
  20. /* Revision, and firmware revision. */
  21. extern unsigned int prom_rev, prom_prev;
  22. /* Root node of the prom device tree, this stays constant after
  23. * initialization is complete.
  24. */
  25. extern int prom_root_node;
  26. /* Pointer to prom structure containing the device tree traversal
  27. * and usage utility functions. Only prom-lib should use these,
  28. * users use the interface defined by the library only!
  29. */
  30. extern struct linux_nodeops *prom_nodeops;
  31. /* The functions... */
  32. /* You must call prom_init() before using any of the library services,
  33. * preferably as early as possible. Pass it the romvec pointer.
  34. */
  35. extern void prom_init(struct linux_romvec *rom_ptr);
  36. /* Boot argument acquisition, returns the boot command line string. */
  37. extern char *prom_getbootargs(void);
  38. /* Device utilities. */
  39. /* Map and unmap devices in IO space at virtual addresses. Note that the
  40. * virtual address you pass is a request and the prom may put your mappings
  41. * somewhere else, so check your return value as that is where your new
  42. * mappings really are!
  43. *
  44. * Another note, these are only available on V2 or higher proms!
  45. */
  46. extern char *prom_mapio(char *virt_hint, int io_space, unsigned int phys_addr, unsigned int num_bytes);
  47. extern void prom_unmapio(char *virt_addr, unsigned int num_bytes);
  48. /* Device operations. */
  49. /* Open the device described by the passed string. Note, that the format
  50. * of the string is different on V0 vs. V2->higher proms. The caller must
  51. * know what he/she is doing! Returns the device descriptor, an int.
  52. */
  53. extern int prom_devopen(char *device_string);
  54. /* Close a previously opened device described by the passed integer
  55. * descriptor.
  56. */
  57. extern int prom_devclose(int device_handle);
  58. /* Do a seek operation on the device described by the passed integer
  59. * descriptor.
  60. */
  61. extern void prom_seek(int device_handle, unsigned int seek_hival,
  62. unsigned int seek_lowval);
  63. /* Machine memory configuration routine. */
  64. /* This function returns a V0 format memory descriptor table, it has three
  65. * entries. One for the total amount of physical ram on the machine, one
  66. * for the amount of physical ram available, and one describing the virtual
  67. * areas which are allocated by the prom. So, in a sense the physical
  68. * available is a calculation of the total physical minus the physical mapped
  69. * by the prom with virtual mappings.
  70. *
  71. * These lists are returned pre-sorted, this should make your life easier
  72. * since the prom itself is way too lazy to do such nice things.
  73. */
  74. extern struct linux_mem_v0 *prom_meminfo(void);
  75. /* Miscellaneous routines, don't really fit in any category per se. */
  76. /* Reboot the machine with the command line passed. */
  77. extern void prom_reboot(char *boot_command);
  78. /* Evaluate the forth string passed. */
  79. extern void prom_feval(char *forth_string);
  80. /* Enter the prom, with possibility of continuation with the 'go'
  81. * command in newer proms.
  82. */
  83. extern void prom_cmdline(void);
  84. /* Enter the prom, with no chance of continuation for the stand-alone
  85. * which calls this.
  86. */
  87. extern void prom_halt(void);
  88. /* Set the PROM 'sync' callback function to the passed function pointer.
  89. * When the user gives the 'sync' command at the prom prompt while the
  90. * kernel is still active, the prom will call this routine.
  91. *
  92. * XXX The arguments are different on V0 vs. V2->higher proms, grrr! XXX
  93. */