samachdep.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. /* $OpenBSD: samachdep.h,v 1.3 2013/10/29 21:49:07 miod Exp $ */
  2. /* $NetBSD: samachdep.h,v 1.10 2013/03/05 15:34:53 tsutsui Exp $ */
  3. /*
  4. * Copyright (c) 1982, 1990, 1993
  5. * The Regents of the University of California. All rights reserved.
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following conditions
  9. * are met:
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * 2. Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. * 3. Neither the name of the University nor the names of its contributors
  16. * may be used to endorse or promote products derived from this software
  17. * without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  20. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  21. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  22. * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  23. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  24. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  25. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  26. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  27. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  28. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  29. * SUCH DAMAGE.
  30. *
  31. * @(#)samachdep.h 8.1 (Berkeley) 6/10/93
  32. */
  33. #include <sys/param.h>
  34. #include <lib/libsa/stand.h>
  35. #define MHZ_25 25
  36. #define MHZ_33 33
  37. struct consdev;
  38. typedef struct label_t {
  39. long val[19];
  40. } label_t;
  41. /* autoconf.c */
  42. void configure(void);
  43. void find_devs(void);
  44. /* awaitkey.c */
  45. char awaitkey(const char *, int, int);
  46. /* bcd.c */
  47. unsigned int bcdtobin(unsigned int);
  48. /* bmc.c */
  49. void bmccnprobe(struct consdev *);
  50. void bmccninit(struct consdev *);
  51. int bmccngetc(dev_t);
  52. void bmccnputc(dev_t, int);
  53. /* bmd.c */
  54. void bmdinit(void);
  55. int bmdputc(int);
  56. void bmdadjust(short, short);
  57. void bmdclear(void);
  58. /* boot.c */
  59. extern int howto;
  60. int boot(int, char **);
  61. int bootunix(char *);
  62. extern void (*cpu_boot)(uint32_t, uint32_t);
  63. extern uint32_t cpu_bootarg1;
  64. extern uint32_t cpu_bootarg2;
  65. #define BOOT_MAGIC 0xf1abde3f
  66. /* cons.c */
  67. void cninit(void);
  68. int cngetc(void);
  69. void cnputc(int);
  70. /* fault.c */
  71. int badaddr(void *, int);
  72. /* font.c */
  73. extern const u_short bmdfont[][20];
  74. /* getline.c */
  75. int getline(const char *, char *);
  76. /* init_main.c */
  77. extern int cpuspeed;
  78. extern int nplane;
  79. extern int machtype;
  80. extern char default_file[];
  81. extern char fuse_rom_data[];
  82. /* kbd.c */
  83. int kbd_decode(u_char);
  84. /* lance.c */
  85. void *lance_attach(uint, void *, void *, uint8_t *);
  86. void *lance_cookie(uint);
  87. uint8_t *lance_eaddr(void *);
  88. int lance_init(void *);
  89. int lance_get(void *, void *, size_t);
  90. int lance_put(void *, void *, size_t);
  91. int lance_end(void *);
  92. /* locore.S */
  93. extern u_int bootdev;
  94. extern uint16_t dipswitch;
  95. extern volatile uint32_t tick;
  96. int setjmp(label_t *);
  97. void delay(int);
  98. /* prf.c */
  99. int tgetchar(void);
  100. /* parse.c */
  101. int exit_program(int, char **);
  102. int parse(int, char **);
  103. int getargs(char *, char **, int);
  104. /* sc.c */
  105. struct scsi_softc;
  106. int scinit(struct scsi_softc *, uint);
  107. struct scsi_generic_cdb;
  108. int scsi_immed_command(struct scsi_softc *, int, int, struct scsi_generic_cdb *,
  109. u_char *, unsigned int);
  110. int scsi_request_sense(struct scsi_softc *, int, int, u_char *, unsigned int);
  111. int scsi_test_unit_rdy(struct scsi_softc *, int, int);
  112. /* sd.c */
  113. int sdstrategy(void *, int, daddr32_t, size_t, void *, size_t *);
  114. int sdopen(struct open_file *, ...);
  115. int sdclose(struct open_file *);
  116. /* sio.c */
  117. void _siointr(void);
  118. void siocnprobe(struct consdev *);
  119. void siocninit(struct consdev *);
  120. int siocngetc(dev_t);
  121. void siocnputc(dev_t, int);
  122. void sioinit(void);
  123. /* ufs_disklabel.c */
  124. char *readdisklabel(struct scsi_softc *, uint, struct disklabel *);
  125. #define DELAY(n) delay(n)
  126. extern struct fs_ops file_system_disk[];
  127. extern int nfsys_disk;
  128. extern struct fs_ops file_system_nfs[];