From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 21:52:07 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32A7B1065675; Mon, 8 Dec 2008 21:52:07 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 20BFA8FC1F; Mon, 8 Dec 2008 21:52:07 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8Lq7FK071636; Mon, 8 Dec 2008 21:52:07 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB8Lq7Kv071635; Mon, 8 Dec 2008 21:52:07 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200812082152.mB8Lq7Kv071635@svn.freebsd.org> From: Maxim Sobolev Date: Mon, 8 Dec 2008 21:52:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185779 - head/sys/boot/i386/btx/btxldr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 21:52:07 -0000 Author: sobomax Date: Mon Dec 8 21:52:06 2008 New Revision: 185779 URL: http://svn.freebsd.org/changeset/base/185779 Log: Respect RBX_MUTE flag from boot[012]. MFC after: 4 weeks Modified: head/sys/boot/i386/btx/btxldr/btxldr.S Modified: head/sys/boot/i386/btx/btxldr/btxldr.S ============================================================================== --- head/sys/boot/i386/btx/btxldr/btxldr.S Mon Dec 8 21:46:55 2008 (r185778) +++ head/sys/boot/i386/btx/btxldr/btxldr.S Mon Dec 8 21:52:06 2008 (r185779) @@ -15,6 +15,9 @@ * $FreeBSD$ */ +#define RBX_MUTE 0x10 /* -m */ +#define OPT_SET(opt) (1 << (opt)) + /* * Prototype BTX loader program, written in a couple of hours. The * real thing should probably be more flexible, and in C. @@ -64,6 +67,11 @@ * BTX program loader for ELF clients. */ start: cld # String ops inc + leal 0x4(%esp,1),%ebx # First argument + testl $OPT_SET(RBX_MUTE),(%ebx) # check for RBX_MUTE + jz nomute + movb $1,muted +nomute: movl $m_logo,%esi # Identify call putstr # ourselves movzwl BDA_MEM,%eax # Get base memory @@ -288,7 +296,10 @@ putstr: lodsb # Load char /* * Output character AL to the console. */ -putchr: pusha # Save +putchr: testb $1,muted + jz putchr_nm + ret +putchr_nm: pusha # Save xorl %ecx,%ecx # Zero for loops movb $SCR_MAT,%ah # Mode/attribute movl $BDA_POS,%ebx # BDA pointer @@ -390,6 +401,12 @@ m_segs: .asciz "text segment: offset=" .asciz " memsz=\0\n" m_done: .asciz "Loading complete\n" #endif + +/* + * Flags + */ +muted: .byte 0x0 + /* * Uninitialized data area. */