diff options
author | sobomax <sobomax@FreeBSD.org> | 2008-12-08 21:52:06 +0000 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2008-12-08 21:52:06 +0000 |
commit | 592295f8b78da95d781c52a28c60daa3d021e3d3 (patch) | |
tree | d1f3f5993e3ef0f3a9cb9d9d8ffe4754551daf10 /sys/boot | |
parent | c510d681c94d12b111437983e9f21dfb1d70b6be (diff) | |
download | FreeBSD-src-592295f8b78da95d781c52a28c60daa3d021e3d3.zip FreeBSD-src-592295f8b78da95d781c52a28c60daa3d021e3d3.tar.gz |
Respect RBX_MUTE flag from boot[012].
MFC after: 4 weeks
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/i386/btx/btxldr/btxldr.S | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/boot/i386/btx/btxldr/btxldr.S b/sys/boot/i386/btx/btxldr/btxldr.S index aa531b8..58ee9b6 100644 --- a/sys/boot/i386/btx/btxldr/btxldr.S +++ b/sys/boot/i386/btx/btxldr/btxldr.S @@ -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. */ |