Deleted Added
full compact
syscons.c (3728) syscons.c (3816)
1/*-
2 * Copyright (c) 1992-1994 S�ren Schmidt
3 * Copyright (c) 1990 The Regents of the University of California.
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * William Jolitz and Don Ahn.
8 *

--- 21 unchanged lines hidden (view full) ---

30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
1/*-
2 * Copyright (c) 1992-1994 S�ren Schmidt
3 * Copyright (c) 1990 The Regents of the University of California.
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * William Jolitz and Don Ahn.
8 *

--- 21 unchanged lines hidden (view full) ---

30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * $Id: syscons.c,v 1.69 1994/10/18 03:34:53 ache Exp $
38 * $Id: syscons.c,v 1.70 1994/10/20 00:08:20 phk Exp $
39 */
40
41#include "sc.h"
42
43#if NSC > 0
44
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/conf.h>
48#include <sys/ioctl.h>
49#include <sys/proc.h>
50#include <sys/user.h>
51#include <sys/tty.h>
52#include <sys/uio.h>
53#include <sys/callout.h>
54#include <sys/kernel.h>
55#include <sys/syslog.h>
56#include <sys/errno.h>
57#include <sys/malloc.h>
39 */
40
41#include "sc.h"
42
43#if NSC > 0
44
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/conf.h>
48#include <sys/ioctl.h>
49#include <sys/proc.h>
50#include <sys/user.h>
51#include <sys/tty.h>
52#include <sys/uio.h>
53#include <sys/callout.h>
54#include <sys/kernel.h>
55#include <sys/syslog.h>
56#include <sys/errno.h>
57#include <sys/malloc.h>
58#include <sys/devconf.h>
59
58#include <machine/console.h>
59#include <machine/psl.h>
60#include <machine/frame.h>
61#include <machine/pc/display.h>
60#include <machine/console.h>
61#include <machine/psl.h>
62#include <machine/frame.h>
63#include <machine/pc/display.h>
64
62#include <i386/isa/isa.h>
63#include <i386/isa/isa_device.h>
64#include <i386/isa/timerreg.h>
65#include <i386/isa/kbdtables.h>
66#include <i386/i386/cons.h>
67
68#if !defined(NCONS)
69#define NCONS 12

--- 261 unchanged lines hidden (view full) ---

331 if (val == KB_ACK)
332 goto gotack;
333 if (val != KB_RESET_DONE)
334 printf("scprobe: keyboard RESET failed %02x\n", val);
335 }
336 return (IO_KBDSIZE);
337}
338
65#include <i386/isa/isa.h>
66#include <i386/isa/isa_device.h>
67#include <i386/isa/timerreg.h>
68#include <i386/isa/kbdtables.h>
69#include <i386/i386/cons.h>
70
71#if !defined(NCONS)
72#define NCONS 12

--- 261 unchanged lines hidden (view full) ---

334 if (val == KB_ACK)
335 goto gotack;
336 if (val != KB_RESET_DONE)
337 printf("scprobe: keyboard RESET failed %02x\n", val);
338 }
339 return (IO_KBDSIZE);
340}
341
342static struct kern_devconf kdc_sc[NSC] = { {
343 0, 0, 0, /* filled in by dev_attach */
344 "sc", 0, { MDDT_ISA, 0, "tty" },
345 isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
346 &kdc_isa0, /* parent */
347 0, /* parentdata */
348 DC_UNKNOWN, /* not supported */
349 "Parallel printer adapter"
350} };
351
352static inline void
353sc_registerdev(struct isa_device *id)
354{
355 if(id->id_unit)
356 kdc_sc[id->id_unit] = kdc_sc[0];
357 kdc_sc[id->id_unit].kdc_unit = id->id_unit;
358 kdc_sc[id->id_unit].kdc_isa = id;
359 dev_attach(&kdc_sc[id->id_unit]);
360}
361
362
339int
340pcattach(struct isa_device *dev)
341{
342 int i;
343 struct scr_stat *scp;
344
345 printf("sc%d: ", dev->id_unit);
346 if (crtc_vga)

--- 34 unchanged lines hidden (view full) ---

381 if (i > 0) {
382 scp->crt_base = scp->crtat = scp->scr_buf;
383 clear_screen(scp);
384 }
385 }
386 /* get cursor going */
387 cursor_pos(1);
388 update_leds(console[0].status);
363int
364pcattach(struct isa_device *dev)
365{
366 int i;
367 struct scr_stat *scp;
368
369 printf("sc%d: ", dev->id_unit);
370 if (crtc_vga)

--- 34 unchanged lines hidden (view full) ---

405 if (i > 0) {
406 scp->crt_base = scp->crtat = scp->scr_buf;
407 clear_screen(scp);
408 }
409 }
410 /* get cursor going */
411 cursor_pos(1);
412 update_leds(console[0].status);
413 sc_registerdev(dev);
389 return 0;
390}
391
392static struct tty
393*get_tty_ptr(dev_t dev)
394{
395 int unit = minor(dev);
396

--- 2429 unchanged lines hidden ---
414 return 0;
415}
416
417static struct tty
418*get_tty_ptr(dev_t dev)
419{
420 int unit = minor(dev);
421

--- 2429 unchanged lines hidden ---