mirror of
https://github.com/grub4dos/ntloader.git
synced 2025-05-08 19:51:14 +08:00
efi: clear screen before boot (#16)
This commit is contained in:
parent
eb8420b6d6
commit
aa023a283b
@ -81,4 +81,6 @@ extern void efi_free (void *ptr);
|
||||
extern void efi_free_pages (void *ptr, UINTN pages);
|
||||
extern void *efi_allocate_pages (UINTN pages, EFI_MEMORY_TYPE type);
|
||||
|
||||
extern void efi_cls (void);
|
||||
|
||||
#endif /* _EFI_H */
|
||||
|
@ -7,6 +7,7 @@ OBJECTS += kern/efiblock.o
|
||||
OBJECTS += kern/efiboot.o
|
||||
OBJECTS += kern/efifile.o
|
||||
OBJECTS += kern/efimain.o
|
||||
OBJECTS += kern/efiterm.o
|
||||
OBJECTS += kern/payload.o
|
||||
|
||||
OBJECTS += kern/callback.o
|
||||
|
@ -161,6 +161,8 @@ void efi_boot (EFI_DEVICE_PATH_PROTOCOL *path,
|
||||
efi_open_protocol_wrapper;
|
||||
#endif
|
||||
|
||||
efi_cls ();
|
||||
|
||||
/* Start image */
|
||||
if ((efirc = bs->StartImage (handle, NULL, NULL)) != 0)
|
||||
{
|
||||
|
40
kern/efiterm.c
Normal file
40
kern/efiterm.c
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* ntloader -- Microsoft Windows NT6+ loader
|
||||
* Copyright (C) 2025 A1ive.
|
||||
*
|
||||
* ntloader is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License,
|
||||
* or (at your option) any later version.
|
||||
*
|
||||
* ntloader is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with ntloader. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <wchar.h>
|
||||
#include "vdisk.h"
|
||||
#include "cpio.h"
|
||||
#include "ntloader.h"
|
||||
#include "bcd.h"
|
||||
#include "cmdline.h"
|
||||
#include "efi.h"
|
||||
|
||||
void efi_cls (void)
|
||||
{
|
||||
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *conout = efi_systab->ConOut;
|
||||
INT32 orig_attr = conout->Mode->Attribute;
|
||||
conout->SetAttribute (conout, EFI_BLACK);
|
||||
conout->ClearScreen (conout);
|
||||
conout->SetAttribute (conout, orig_attr);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user