svn commit: r185779 - head/sys/boot/i386/btx/btxldr

Maxim Sobolev sobomax at FreeBSD.org
Mon Dec 8 13:52:07 PST 2008


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.
  */


More information about the svn-src-all mailing list