diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2006-11-13 21:30:37 +0000 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gnu.org> | 2009-06-18 00:26:55 +0200 |
commit | a42c7a969bfbc6d556179bd19d1fda7cf80f25a8 (patch) | |
tree | e8561178fd94a081f07992f69c290971e945cbb4 /i386/i386at | |
parent | f387d24c7d59cfd219c3b795a512981347240380 (diff) |
2006-11-14 Barry deFreese <bddebian@comcast.net>
* device/chario.c (tty_cts): Add `void' return type.
* device/cons.c (cninit, cnputc): Add `void' return type.
(cngetc, cnmaygetc): Add `int' return type.
* device/net_io.c (net_del_q_info, net_free_dead_infp)
(net_free_dead_entp): Add `void' return type.
* i386/i386/fpu.c (fpnoextflt, fpextovrflt, fpexterrflt, fp_save)
(fp_load, fpintr): Add `void' return type.
* i386/i386/ktss.c (ktss_init): Add `int' type to `exception_stack'.
* i386/i386/loose_ends.c (delay): Add `void' return type.
* i386/i386/phys.c (pmap_zero_page, pmap_copy_page, copy_to_phys)
(copy_from_phys): Add `void' return type.
* i386/i386/pic.c (picinit, form_pic_mask, intnull, prtnull): Add
`void' return type.
* i386/i386/pit.c (clkstart): Add `void' return type.
* i386/i386at/com.c (comparm, comtimer, fix_modem_state)
(commodem_intr): Add `void' return type.
(comintr, commctl, comstop): Add `int' return type.
* i386/i386at/iopl.c (ioplclose): Add `int' return type.
* i386/i386at/kd.c (kd_io_map_openn, kd_io_map_close, feep, pause)
(kd_debug_put, cnpollc, kdclose, kd_handle_ack, kd_resend, kdinit)
(kd_belloff, kd_bellon, kd_putc, kd_setpos, kd_scrollup, kd_scrolldn)
(kd_parseesc, kd_parserest, kd_tab, kd_cls, kd_home, kd_up, kd_down)
(kd_right, kd_left, kd_cr, kd_cltobcur, kd_cltopcurn, kd_cltoecur)
(kd_clfrbcur, kd_delln, kd_insln, kd_delch, kd_erase, kd_eraseln)
(kd_insch, kd_senddata, kd_sendcmd, kd_cmdreg_write, kd_mouse_drain)
(set_kd_state, kd_setleds1, kd_setleds2, cnsetleds, kdreboot): Add
`void' return type.
(kdopen, kdread, kdwrite, kdportdeath, kdsetbell, kdgetkbent, kdintr)
(do_modifier, kdstate2idx, kdstart, kdstop, kd_kbd_magic): Add `int'
return type.
(kd_isupper, kd_islower): Add `boolean_t' return type.
(kd_cmdreg_read): Add `unsigned char' return type.
* i386/i386at/kd_event.c (kbdinit, kbdclose, kdb_in_out, X_kdb_enter)
(X_kdb_exit, X_kdb_enter_init, X_kdb_exit_init): Add `void' return
type.
(kbdopen, kbdioctl, kbdselect, kbdread): Add `int' return type.
* i386/i386at/kd_mouse.c (init_mouse_hw, serial_mouse_open)
(kd_mouse_open, mouseclose, serial_mouse_close, kd_mouse_close)
(mouse_handle_byte, mouse_packet_mouse_system_mouse)
(mouse_packet_microsoft_mouse, ibm_ps2_mouse_open)
(ibm_ps2_mouse_close, mouse_packet_ibm_ps2_mouse, mouse_moved)
(mouse_button): Add `void' return type.
(mouseopen, mouseioctl, mouseselect, mouseread, mouseintr): Add `int'
return type.
* i386/i386at/lpr.c (lprclose, lprpr_addr): Add `void' return type.
(lprprobe, lpropen, lprread, lprwrite, lprportdeath, lprstop, lprpr):
Add `int' return type.
* i386/i386at/model_dep.c (i386at_init, startrtclock): Add `void'
return type.
(timemmap): Add `int' return type.
* i386/i386at/rtc.c (rtcinit, rtcput): Add `void' return type.
(yeartoday, hexdectodec, readtodc, writetodc): Add `int' return type.
* i386/intel/pmap.c (pmap_pageable): Add `void' return type.
* kern/eventcount.c (simpler_thread_setrun): Add `int' type to
`whichrq' variable.
Diffstat (limited to 'i386/i386at')
-rw-r--r-- | i386/i386at/com.c | 7 | ||||
-rw-r--r-- | i386/i386at/iopl.c | 1 | ||||
-rw-r--r-- | i386/i386at/kd.c | 62 | ||||
-rw-r--r-- | i386/i386at/kd_event.c | 11 | ||||
-rw-r--r-- | i386/i386at/kd_mouse.c | 30 | ||||
-rw-r--r-- | i386/i386at/lpr.c | 9 | ||||
-rw-r--r-- | i386/i386at/model_dep.c | 3 | ||||
-rw-r--r-- | i386/i386at/rtc.c | 7 |
8 files changed, 128 insertions, 2 deletions
diff --git a/i386/i386at/com.c b/i386/i386at/com.c index 6142999..e0d6878 100644 --- a/i386/i386at/com.c +++ b/i386/i386at/com.c @@ -487,6 +487,7 @@ unsigned int count; return (D_SUCCESS); } +int comintr(unit) int unit; { @@ -585,6 +586,7 @@ register int unit; splx(s); } +void comparm(int unit, int baud, int intr, int mode, int modem) { u_short addr = (u_short)(cominfo[unit]->address); @@ -659,6 +661,7 @@ comst_4++; /* Check for stuck xmitters */ int comtimer_interval = 5; +void comtimer() { spl_t s = spltty(); @@ -685,6 +688,7 @@ printf("Tty %x was stuck\n", tp); /* * Set receive modem state from modem status register. */ +void fix_modem_state(unit, modem_stat) int unit, modem_stat; { @@ -706,6 +710,7 @@ int unit, modem_stat; /* * Modem change (input signals) */ +void commodem_intr( int unit, int stat) @@ -735,6 +740,7 @@ commodem_intr( /* * Set/get modem bits */ +int commctl( register struct tty *tp, int bits, @@ -801,6 +807,7 @@ commctl( return commodem[unit]; } +int comstop(tp, flags) register struct tty *tp; int flags; diff --git a/i386/i386at/iopl.c b/i386/i386at/iopl.c index a732314..03217c0 100644 --- a/i386/i386at/iopl.c +++ b/i386/i386at/iopl.c @@ -90,6 +90,7 @@ ioplopen(dev, flag, ior) /*ARGSUSED*/ +int ioplclose(dev, flags) int dev; int flags; diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c index 144b87a..a388762 100644 --- a/i386/i386at/kd.c +++ b/i386/i386at/kd.c @@ -346,6 +346,7 @@ io_reg_t vga_port_list[] = { mach_device_t kd_io_device = 0; +void kd_io_map_open(device) mach_device_t device; { @@ -353,6 +354,7 @@ kd_io_map_open(device) io_port_create(device, vga_port_list); } +void kd_io_map_close() { io_port_destroy(kd_io_device); @@ -396,6 +398,7 @@ int kd_pollc = 0; * Ring the bell for a short time. * Warning: uses outb(). You may prefer to use kd_debug_put. */ +void feep() { int i; @@ -406,6 +409,7 @@ feep() kd_belloff(); } +void pause() { int i; @@ -419,6 +423,7 @@ pause() * LOC=0 means put it in the bottom right corner, LOC=1 means put it * one column to the left, etc. */ +void kd_debug_put(loc, c) int loc; char c; @@ -433,6 +438,7 @@ char c; extern int mouse_in_use; int old_kb_mode; +void cnpollc(on) boolean_t on; { @@ -474,6 +480,7 @@ boolean_t on; * output: device is opened and setup * */ +int kdopen(dev, flag, ior) dev_t dev; int flag; @@ -526,6 +533,7 @@ kdopen(dev, flag, ior) * */ /*ARGSUSED*/ +void kdclose(dev, flag) int dev; int flag; @@ -560,6 +568,7 @@ int flag; * */ /*ARGSUSED*/ +int kdread(dev, uio) int dev; struct uio *uio; @@ -584,6 +593,7 @@ struct uio *uio; * */ /*ARGSUSED*/ +int kdwrite(dev, uio) int dev; struct uio *uio; @@ -609,6 +619,7 @@ kdmmap(dev, off, prot) return(i386_btop(kd_bitmap_start+off)); } +int kdportdeath(dev, port) dev_t dev; mach_port_t port; @@ -683,6 +694,7 @@ io_return_t kdsetstat(dev, flavor, data, count) * Turn the bell on or off. Returns error code, if given bogus * on/off value. */ +int kdsetbell(val, flags) int val; /* on or off */ int flags; /* flags set for console */ @@ -706,6 +718,7 @@ int flags; /* flags set for console */ * * Get entry from key mapping table. Returns error code, if any. */ +int kdgetkbent(kbent) struct kbentry * kbent; { @@ -758,6 +771,7 @@ int flags; /* flags set for console */ * */ /*ARGSUSED*/ +int kdintr(vec, regs) int vec; int regs; @@ -896,6 +910,7 @@ int regs; * For pending commands, complete the command. For data bytes, * drop the ack on the floor. */ +void kd_handle_ack() { switch (kd_ack) { @@ -920,6 +935,7 @@ kd_handle_ack() * * Resend a missed keyboard command or data byte. */ +void kd_resend() { if (kd_ack == NOT_WAITING) @@ -940,6 +956,7 @@ kd_resend() * * output: the new state */ +int do_modifier(state, c, up) int state; Scancode c; @@ -1062,6 +1079,7 @@ int *regs; * Return the value for the 2nd index into key_map that * corresponds to the given state. */ +int kdstate2idx(state, extended) int state; /* bit vector, not a state index */ boolean_t extended; @@ -1101,6 +1119,7 @@ boolean_t extended; * Entered and left at spltty. Drops priority to spl0 to display character. * ASSUMES that it is never called from interrupt-driven code. */ +int kdstart(tp) struct tty *tp; { @@ -1151,6 +1170,7 @@ struct tty *tp; } /*ARGSUSED*/ +int kdstop(tp, flags) register struct tty *tp; int flags; @@ -1177,6 +1197,7 @@ kdstop(tp, flags) * output : Driver is initialized * */ +void kdinit() { void kd_xga_init(); @@ -1243,6 +1264,8 @@ kdinit() * */ static unsigned int kd_bellstate = 0; + +void kd_belloff() { unsigned char status; @@ -1263,6 +1286,7 @@ kd_belloff() * output : bell is turned on * */ +void kd_bellon() { unsigned char status; @@ -1292,6 +1316,7 @@ kd_bellon() */ int sit_for_0 = 1; +void kd_putc(ch) u_char ch; { @@ -1345,6 +1370,7 @@ u_char ch; * screen. * */ +void kd_setpos(newpos) csrpos_t newpos; { @@ -1371,6 +1397,7 @@ csrpos_t newpos; * output : lines on screen appear to be shifted up one line * */ +void kd_scrollup() { csrpos_t to; @@ -1400,6 +1427,7 @@ kd_scrollup() * output : Lines on screen appear to be moved down one line * */ +void kd_scrolldn() { csrpos_t to; @@ -1433,6 +1461,7 @@ kd_scrolldn() * defined by the ansi terminal specification * */ +void kd_parseesc() { u_char *escp; @@ -1504,6 +1533,7 @@ unsigned char color_table[] = { 0, 4, 2, 6, 1, 5, 3, 7, * sequence acceptable to the ansi terminal specification * */ +void kd_parserest(cp) u_char *cp; { @@ -1799,6 +1829,7 @@ int *nump; return(cp - original); } +void kd_tab() { int i; @@ -1819,6 +1850,7 @@ kd_tab() * output : Screen is cleared * */ +void kd_cls() { (*kd_dclear)(0, ONE_PAGE/ONE_SPACE, kd_attr); @@ -1836,6 +1868,7 @@ kd_cls() * output : Cursor position is moved * */ +void kd_home() { kd_setpos(0); @@ -1852,6 +1885,7 @@ kd_home() * output : Cursor moves up one line, or screen is scrolled * */ +void kd_up() { if (kd_curpos < ONE_LINE) @@ -1871,6 +1905,7 @@ kd_up() * output : Cursor moves down one line or the screen is scrolled * */ +void kd_down() { if (kd_curpos >= (ONE_PAGE - ONE_LINE)) @@ -1890,6 +1925,7 @@ kd_down() * output : Cursor moves one position to the right * */ +void kd_right() { if (kd_curpos < (ONE_PAGE - ONE_SPACE)) @@ -1911,6 +1947,7 @@ kd_right() * output : Cursor moves one position to the left * */ +void kd_left() { if (0 < kd_curpos) @@ -1929,6 +1966,7 @@ kd_left() * output : Cursor moves to the beginning of the current line * */ +void kd_cr() { kd_setpos(BEG_OF_LINE(kd_curpos)); @@ -1946,6 +1984,7 @@ kd_cr() * output : Screen is cleared from current cursor postion to bottom * */ +void kd_cltobcur() { csrpos_t start; @@ -1968,6 +2007,7 @@ kd_cltobcur() * output : Screen is cleared from current cursor postion to top * */ +void kd_cltopcur() { int count; @@ -1987,6 +2027,7 @@ kd_cltopcur() * output : Line is cleared from current cursor position to eoln * */ +void kd_cltoecur() { csrpos_t i; @@ -2009,6 +2050,7 @@ kd_cltoecur() * output : Line is cleared from beginning to current position * */ +void kd_clfrbcur() { csrpos_t i; @@ -2029,6 +2071,7 @@ kd_clfrbcur() * output : lines appear to be deleted * */ +void kd_delln(number) int number; { @@ -2067,6 +2110,7 @@ int number; * output : New lines appear to be inserted * */ +void kd_insln(number) int number; { @@ -2106,6 +2150,7 @@ int number; * output : characters appear to be deleted * */ +void kd_delch(number) int number; { @@ -2147,6 +2192,7 @@ int number; * output : characters appear to be blanked or erased * */ +void kd_erase(number) int number; { @@ -2172,6 +2218,7 @@ int number; * output : Current line is erased * */ +void kd_eraseln() { csrpos_t i; @@ -2195,6 +2242,7 @@ kd_eraseln() * output : Blanks are inserted at cursor position * */ +void kd_insch(number) int number; { @@ -2236,6 +2284,7 @@ int number; * returns TRUE if character is lowercase * */ +boolean_t kd_isupper(c) u_char c; { @@ -2244,6 +2293,7 @@ u_char c; return(FALSE); } +boolean_t kd_islower(c) u_char c; { @@ -2261,6 +2311,7 @@ u_char c; * keyboard command. * */ +void kd_senddata(ch) unsigned char ch; { @@ -2278,6 +2329,7 @@ unsigned char ch; * clear before sending the data. * */ +void kd_sendcmd(ch) unsigned char ch; { @@ -2301,6 +2353,7 @@ kd_getdata() return(inb(K_RDWR)); } +unsigned char kd_cmdreg_read() { int ch=KC_CMD_READ; @@ -2312,6 +2365,7 @@ int ch=KC_CMD_READ; return(inb(K_RDWR)); } +void kd_cmdreg_write(val) { int ch=KC_CMD_WRITE; @@ -2323,6 +2377,7 @@ int ch=KC_CMD_WRITE; outb(K_RDWR, val); } +void kd_mouse_drain() { int i; @@ -2336,7 +2391,7 @@ kd_mouse_drain() * * Set kd_state and update the keyboard status LEDs. */ - +void set_kd_state(newstate) int newstate; { @@ -2368,6 +2423,7 @@ int state; * * Set the keyboard LEDs according to the given byte. */ +void kd_setleds1(val) u_char val; { @@ -2381,6 +2437,7 @@ u_char val; kd_senddata(K_CMD_LEDS); } +void kd_setleds2() { kd_senddata(kd_nextled); @@ -2394,6 +2451,7 @@ kd_setleds2() * Currently disabled because cngetc ignores caps lock and num * lock anyway. */ +void cnsetleds(val) u_char val; { @@ -2403,6 +2461,7 @@ u_char val; (void)kd_getdata(); /* XXX - assume is ACK */ } +void kdreboot() { (*kd_dreset)(); @@ -2421,6 +2480,7 @@ kdreboot() static int which_button[] = {0, MOUSE_LEFT, MOUSE_MIDDLE, MOUSE_RIGHT}; static struct mouse_motion moved; +int kd_kbd_magic(scancode) { int new_button = 0; diff --git a/i386/i386at/kd_event.c b/i386/i386at/kd_event.c index 993dc44..7688412 100644 --- a/i386/i386at/kd_event.c +++ b/i386/i386at/kd_event.c @@ -117,6 +117,7 @@ static boolean_t initialized = FALSE; * kbdinit - set up event queue. */ +void kbdinit() { spl_t s = SPLKD(); @@ -135,6 +136,7 @@ kbdinit() */ /*ARGSUSED*/ +int kbdopen(dev, flags) dev_t dev; int flags; @@ -159,6 +161,7 @@ kbdopen(dev, flags) */ /*ARGSUSED*/ +void kbdclose(dev, flags) dev_t dev; int flags; @@ -233,6 +236,7 @@ io_return_t kbdsetstat(dev, flavor, data, count) */ /*ARGSUSED*/ +int kbdioctl(dev, cmd, data, flag) dev_t dev; int cmd; @@ -284,6 +288,7 @@ kbdioctl(dev, cmd, data, flag) */ /*ARGSUSED*/ +int kbdselect(dev, rw) { spl_t s = SPLKD(); @@ -312,6 +317,7 @@ kbdselect(dev, rw) #ifdef MACH_KERNEL boolean_t kbd_read_done(); /* forward */ +int kbdread(dev, ior) dev_t dev; register io_req_t ior; @@ -473,6 +479,7 @@ kbd_enqueue(ev) u_int X_kdb_enter_str[512], X_kdb_exit_str[512]; int X_kdb_enter_len = 0, X_kdb_exit_len = 0; +void kdb_in_out(p) u_int *p; { @@ -505,6 +512,7 @@ register int t = p[0]; } } +void X_kdb_enter() { register u_int *u_ip, *endp; @@ -515,6 +523,7 @@ register u_int *u_ip, *endp; kdb_in_out(u_ip); } +void X_kdb_exit() { register u_int *u_ip, *endp; @@ -552,6 +561,7 @@ X_kdb_exit_init(data, count) return D_SUCCESS; } #else /* MACH_KERNEL */ +void X_kdb_enter_init(kp) struct X_kdb *kp; { @@ -563,6 +573,7 @@ struct X_kdb *kp; X_kdb_enter_len = kp->size>>2; } +void X_kdb_exit_init(kp) struct X_kdb *kp; { diff --git a/i386/i386at/kd_mouse.c b/i386/i386at/kd_mouse.c index 5e8b858..2ad3be2 100644 --- a/i386/i386at/kd_mouse.c +++ b/i386/i386at/kd_mouse.c @@ -132,6 +132,7 @@ int mouse_char_index; /* mouse response */ /* * init_mouse_hw - initialize the serial port. */ +void init_mouse_hw(unit, mode) { unsigned short base_addr = cominfo[unit]->address; @@ -166,6 +167,7 @@ static int mousebufindex = 0; int track_man[10]; /*ARGSUSED*/ +int mouseopen(dev, flags) dev_t dev; int flags; @@ -223,7 +225,9 @@ mouseopen(dev, flags) return(0); } +void serial_mouse_open(dev) + dev_t dev; { int unit = minor(dev) & 0x7; int mouse_pic = cominfo[unit]->sysdep1; @@ -241,7 +245,11 @@ serial_mouse_open(dev) } int mouse_packets = 0; + +void kd_mouse_open(dev, mouse_pic) + dev_t dev; + int mouse_pic; { spl_t s = splhi(); /* disable interrupts */ extern int kdintr(); @@ -258,7 +266,10 @@ kd_mouse_open(dev, mouse_pic) * mouseclose - Disable interrupts on the serial port, reset driver flags, * and restore the serial port interrupt vector. */ +void mouseclose(dev, flags) + dev_t dev; + int flags; { switch (mouse_type) { case MICROSOFT_MOUSE: @@ -288,6 +299,7 @@ mouseclose(dev, flags) } /*ARGSUSED*/ +void serial_mouse_close(dev, flags) dev_t dev; int flags; @@ -306,7 +318,10 @@ serial_mouse_close(dev, flags) (void)splx(o_pri); } +void kd_mouse_close(dev, mouse_pic) + dev_t dev; + int mouse_pic; { spl_t s = splhi(); @@ -341,6 +356,7 @@ io_return_t mousegetstat(dev, flavor, data, count) */ /*ARGSUSED*/ +int mouseioctl(dev, cmd, data, flag) dev_t dev; int cmd; @@ -378,6 +394,7 @@ mouseioctl(dev, cmd, data, flag) */ /*ARGSUSED*/ +int mouseselect(dev, rw) { int s = SPLKD(); @@ -404,6 +421,7 @@ mouseselect(dev, rw) #ifdef MACH_KERNEL boolean_t mouse_read_done(); /* forward */ +int mouseread(dev, ior) dev_t dev; register io_req_t ior; @@ -475,6 +493,7 @@ boolean_t mouse_read_done(ior) #else /* MACH_KERNEL */ /*ARGSUSED*/ +int mouseread(dev, uio) dev_t dev; struct uio *uio; @@ -516,6 +535,7 @@ done: /* * mouseintr - Get a byte and pass it up for handling. Called at SPLKD. */ +int mouseintr(unit) { unsigned short base_addr = cominfo[unit]->address; @@ -563,6 +583,7 @@ int middlegitech = 0; /* what should the middle button be */ #define MOUSEBUFSIZE 5 /* num bytes def'd by protocol */ static u_char mousebuf[MOUSEBUFSIZE]; /* 5-byte packet from mouse */ +void mouse_handle_byte(ch) u_char ch; { @@ -644,6 +665,7 @@ mouse_handle_byte(ch) } } +void mouse_packet_mouse_system_mouse(mousebuf) u_char mousebuf[MOUSEBUFSIZE]; { @@ -679,6 +701,7 @@ u_char mousebuf[MOUSEBUFSIZE]; * 1 0 Y5 Y4 Y3 Y2 Y1 Y0 * */ +void mouse_packet_microsoft_mouse(mousebuf) u_char mousebuf[MOUSEBUFSIZE]; { @@ -775,7 +798,9 @@ void kd_mouse_read_reset(void) mouse_char_index = 0; } +void ibm_ps2_mouse_open(dev) + dev_t dev; { spl_t s = spltty(); @@ -817,7 +842,9 @@ ibm_ps2_mouse_open(dev) splx(s); } +void ibm_ps2_mouse_close(dev) + dev_t dev; { spl_t s = spltty(); @@ -847,6 +874,7 @@ ibm_ps2_mouse_close(dev) * Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 * */ +void mouse_packet_ibm_ps2_mouse(mousebuf) u_char mousebuf[MOUSEBUFSIZE]; { @@ -879,6 +907,7 @@ u_char mousebuf[MOUSEBUFSIZE]; /* * Enqueue a mouse-motion event. Called at SPLKD. */ +void mouse_moved(where) struct mouse_motion where; { @@ -894,6 +923,7 @@ mouse_moved(where) /* * Enqueue an event for mouse button press or release. Called at SPLKD. */ +void mouse_button(which, direction) kev_type which; u_char direction; diff --git a/i386/i386at/lpr.c b/i386/i386at/lpr.c index f2fa032..348159e 100644 --- a/i386/i386at/lpr.c +++ b/i386/i386at/lpr.c @@ -81,6 +81,7 @@ struct tty lpr_tty[NLPR]; int lpr_alive[NLPR]; +int lprprobe(port, dev) struct bus_device *dev; { @@ -122,6 +123,7 @@ void lprattach(struct bus_device *dev) return; } +int lpropen(dev, flag, ior) int dev; int flag; @@ -158,6 +160,7 @@ u_short addr; return (char_open(dev, tp, flag, ior)); } +void lprclose(dev, flag) int dev; int flag; @@ -177,6 +180,7 @@ u_short addr = (u_short) lprinfo[unit]->address; } #ifdef MACH_KERNEL +int lprread(dev, ior) int dev; io_req_t ior; @@ -184,6 +188,7 @@ io_req_t ior; return char_read(&lpr_tty[minor(dev)], ior); } +int lprwrite(dev, ior) int dev; io_req_t ior; @@ -191,6 +196,7 @@ io_req_t ior; return char_write(&lpr_tty[minor(dev)], ior); } +int lprportdeath(dev, port) dev_t dev; mach_port_t port; @@ -363,6 +369,7 @@ struct tty *tp; } #ifdef MACH_KERNEL +int lprstop(tp, flags) register struct tty *tp; int flags; @@ -381,12 +388,14 @@ struct tty *tp; splx(s); } #endif /* MACH_KERNEL */ +int lprpr(unit) { lprpr_addr(lprinfo[unit]->address); return 0; } +void lprpr_addr(addr) { printf("DATA(%x) %x, STATUS(%x) %x, INTR_ENAB(%x) %x\n", diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c index 0a2da1e..b1c8226 100644 --- a/i386/i386at/model_dep.c +++ b/i386/i386at/model_dep.c @@ -221,6 +221,7 @@ mem_size_init() * Basic PC VM initialization. * Turns on paging and changes the kernel segments to use high linear addresses. */ +void i386at_init() { /* XXX move to intel/pmap.h */ @@ -387,6 +388,7 @@ void c_boot_entry(vm_offset_t bi) #include <vm/pmap.h> #include <mach/time_value.h> +int timemmap(dev,off,prot) vm_prot_t prot; { @@ -401,6 +403,7 @@ timemmap(dev,off,prot) return (i386_btop(pmap_extract(pmap_kernel(), (vm_offset_t) mtime))); } +void startrtclock() { clkstart(); diff --git a/i386/i386at/rtc.c b/i386/i386at/rtc.c index 0f72792..0f4514c 100644 --- a/i386/i386at/rtc.c +++ b/i386/i386at/rtc.c @@ -56,6 +56,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. static unsigned char rtc[RTC_NREG]; static int first_rtcopen_ever = 1; +void rtcinit() { outb(RTC_ADDR, RTC_A); @@ -82,6 +83,7 @@ unsigned char *regs; return(0); } +void rtcput(regs) unsigned char *regs; { @@ -106,12 +108,14 @@ extern struct timezone tz; static int month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; +int yeartoday(year) int year; { return((year%4) ? 365 : 366); } +int hexdectodec(n) char n; { @@ -125,7 +129,7 @@ int n; return((char)(((n/10)<<4)&0xF0) | ((n%10)&0x0F)); } - +int readtodc(tp) u_int *tp; { @@ -178,6 +182,7 @@ readtodc(tp) return(0); } +int writetodc() { struct rtc_st rtclk; |