Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Apr 2003 22:23:56 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 28614 for review
Message-ID:  <200304090523.h395Nu2U044387@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=28614

Change 28614 by peter@peter_daintree on 2003/04/08 22:23:46

	do not need serial_* anymore,  It served well!

Affected files ...

.. //depot/projects/hammer/sys/x86_64/x86_64/locore.s#32 edit
.. //depot/projects/hammer/sys/x86_64/x86_64/machdep.c#58 edit

Differences ...

==== //depot/projects/hammer/sys/x86_64/x86_64/locore.s#32 (text+ko) ====

@@ -86,8 +86,6 @@
 	pushq	$PSL_KERNEL
 	popfq
 
-	call	init_serial
-
 	/* Find the metadata pointers before we lose them */
 	movq	%rsp, %rbp
 	xorq	%rax, %rax
@@ -145,71 +143,3 @@
 	ret
 #endif
 
-
-/***********************************************************************/
-
-
-#define COMBRD(x)       (1843200 / (16*(x)))
-#define COMCONSOLE	0x3f8
-#define CONSPEED	9600
-
-	.globl serial_putc
-	.type serial_putc@function
-serial_putc:
-	movl	$10000, %ecx	# timeout
-	movl	$COMCONSOLE + 5, %edx	# line status reg
-1:
-	decl	%ecx
-	je	2f
-	inb	%dx, %al
-	testb	$0x20, %al
-	je	1b		# TX buffer not empty
-
-	movq	%rdi, %rax
-	subl	$5, %edx	# TX output reg
-	outb	%al, %dx	# send this one
-
-2:
-	ret
-
-	.globl init_serial
-	.type init_serial@function
-init_serial:
-	movl	$COMCONSOLE + 3, %edx	# line control reg
-	movb	$0x80, %al
-	outb	%al, %dx	# enable DLAB
-
-	subl	$3, %edx	# divisor latch, low byte
-	movb	$COMBRD(CONSPEED) & 0xff, %al
-	outb	%al, %dx
-	incl	%edx		# divisor latch, high byte
-	movb	$COMBRD(CONSPEED) >> 8, %al
-	outb	%al, %dx
-
-	incl	%edx		# fifo control register (if any)
-	xorl	%eax,%eax
-	outb	%al, %dx	# disable fifo to reduce worst-case busy-wait
-
-	incl	%edx		# line control reg
-	movb	$0x03, %al
-	outb	%al, %dx	# 8N1
-
-	incl	%edx		# modem control reg
-	outb	%al, %dx	# enable DTR/RTS
-
-	/* Flush the input buffer. */
-	incl	%edx		# line status reg
-1:
-	subl	$5, %edx	# rx buffer reg
-	inb	%dx, %al	# throw away (unconditionally the first time)
-	addl	$5, %edx	# line status reg
-	inb	%dx, %al
-	testb	$0x01, %al
-	jne	1b		# more
-
-	ret
-
-	.bss
-	ALIGN_DATA			/* just to be sure */
-	.space	0x1000			/* space for bootstack - temporary stack */
-bootstack:

==== //depot/projects/hammer/sys/x86_64/x86_64/machdep.c#58 (text+ko) ====

@@ -1684,16 +1684,3 @@
 	}
 	return 0;
 }
-
-extern void serial_putc(int);
-void serial_puts(char *);
-
-void
-serial_puts(char *s)
-{
-	while (*s) {
-		if (*s == '\n')
-			serial_putc('\r');
-		serial_putc(*s++);
-	}
-}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304090523.h395Nu2U044387>