Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Dec 2008 21:52:06 +0000 (UTC)
From:      Maxim Sobolev <sobomax@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r185779 - head/sys/boot/i386/btx/btxldr
Message-ID:  <200812082152.mB8Lq7Kv071635@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.
  */



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