From b8a9a8c9c928fe76feb2ed0cd0eee6275623fa5a Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 1 Feb 2010 09:45:23 -0800 Subject: [PATCH] core: set QUIET_FLAG if we load Linux "quiet" If we see the "quiet" flag for the Linux kernel, also suppress the early Linux kernel messages; for people who want a completely clean boot. Signed-off-by: H. Peter Anvin --- core/kernel.inc | 2 ++ core/runkernel.inc | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/kernel.inc b/core/kernel.inc index 9b888cc..5e1c7a3 100644 --- a/core/kernel.inc +++ b/core/kernel.inc @@ -85,6 +85,8 @@ HEADER_ID equ 'HdrS' ; HdrS (in littleendian hex) ; Flags for the su_loadflags field ; LOAD_HIGH equ 01h ; Large kernel, load high +QUIET_FLAG equ 20h ; Quiet the kernel +KEEP_SEGMENTS equ 40h ; Don't reload segments CAN_USE_HEAP equ 80h ; Boot loader reports heap size ; diff --git a/core/runkernel.inc b/core/runkernel.inc index f32fe1d..e738706 100644 --- a/core/runkernel.inc +++ b/core/runkernel.inc @@ -1,7 +1,7 @@ ;; ----------------------------------------------------------------------- ;; ;; Copyright 1994-2009 H. Peter Anvin - All Rights Reserved -;; Copyright 2009 Intel Corporation; author: H. Peter Anvin +;; Copyright 2009-2010 Intel Corporation; author: H. Peter Anvin ;; ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -168,7 +168,7 @@ opt_mem: ret opt_quiet: - mov byte [QuietBoot],1 + mov byte [QuietBoot],QUIET_FLAG ret %if IS_PXELINUX @@ -228,6 +228,8 @@ new_kernel: ; we were provided. ; mov al,[es:su_loadflags] + or al,[QuietBoot] ; Set QUIET_FLAG if needed + mov [es:su_loadflags],al mov [LoadFlags],al any_kernel: @@ -458,7 +460,7 @@ setup_move: ; BX points to the final real mode segment, and will be loaded ; into DS. - test byte [QuietBoot],01h ; Don't clear the mode if quiet + test byte [QuietBoot],QUIET_FLAG jz replace_bootstrap jmp replace_bootstrap_noclearmode @@ -631,7 +633,7 @@ loadinitrd: ; assumes CS == DS ; writestr_qchk: - test byte [QuietBoot],01h + test byte [QuietBoot],QUIET_FLAG jz writestr ret -- 2.7.4