From owner-p4-projects@FreeBSD.ORG Tue Apr 8 22:23:58 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 27E5237B404; Tue, 8 Apr 2003 22:23:58 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C8E7A37B405 for ; Tue, 8 Apr 2003 22:23:57 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 54C2E43F3F for ; Tue, 8 Apr 2003 22:23:57 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h395Nv0U044390 for ; Tue, 8 Apr 2003 22:23:57 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h395Nu2U044387 for perforce@freebsd.org; Tue, 8 Apr 2003 22:23:56 -0700 (PDT) Date: Tue, 8 Apr 2003 22:23:56 -0700 (PDT) Message-Id: <200304090523.h395Nu2U044387@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 28614 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2003 05:23:59 -0000 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++); - } -}