In some recent EFI firwmare implmentation, the Loader-Data, Loader-Code
and Conventional memory regions (grub loader prefer to use) are located
under 1G (for example some HP platforms). Which causes there are only
~700MB on a 8G HP platform. (There are other 4G+ memories available above
0x1
Protocal 2.13 (Kernel 3.14) supports xloadflags to check the kernel
supported boot loader. It's also kernel recommended to use.
---
include/grub/i386/linux.h | 19 +++
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/include/grub/i386/linux.h b/include/grub/i386/linux
From: Jeremy Su
When enable print_memory_map() for debugging, the warning message
presents because of the types. Fix it by adding the macros in
include/grub/efi/api.h.
---
grub-core/kern/efi/mm.c | 5 -
include/grub/efi/api.h | 2 ++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --g
In some recent EFI firwmare implmentation, the Loader-Data, Loader-Code
and Conventional memory regions (grub loader prefer to use) are located
under 1G (for example some HP platforms). Which causes there are only
~700MB on a 8G HP platform. (There are other 4G+ memories available above
0x1
grub_file_open() calls grub_file_get_device_name(), but doesn't check
the return. Instead, it checks if grub_errno is set.
However, nothing initialises grub_errno here when grub_file_open()
starts. This means that trying to open one file that doesn't exist and
then trying to open another file that
Since font files can be wrapped as PE images by grub-wrap, use shim to
verify font files if Secure Boot is enabled. To prevent other PE files
(e.g. kernel images) used as wrappers, it only allows files marked as
Windows GUI used as wrappers.
Signed-off-by: Zhang Boyang
---
grub-core/kern/efi/sb.
There is a problem in shim lock verifier after PE wrappers created by
grub-wrap are introduced. The shim lock verifier always says a file is
ok as long as shim says that file is ok, so there is a possibility that
wrappers may be used as kernel images, leading to crashes or
vulnerabilities.
This pa
This file filter can unwrap a file wrapped by grub-wrap. This process is
done automatically and transparently, thus no additional code is
required at user's side.
First, it checks for file type flags and ignore irrelevant files. Then,
it find target PE section and unwraps the file. Subsequent read
Hi,
This patchset introduces a utility: grub-wrap. It can wrap a non-PE file
as a PE file, which can be subsequently digitally signed (and verified
by shim). The wrapped file will be unwrapped at runtime automatically
and transparently by the unwrap filter.
With grub-wrap, a PF2 font file can be
This new tool can wrap a non-PE file as a PE image, which can be
subsequently digitally signed (and verified by shim).
It's important that this type of PE images must be rejected when trying
to execute them. This is done by making them look like plain Windows
DLLs instead of UEFI images. Major dif
On 2022/12/5 19:29, Zhang Boyang wrote:
This patch also adds a new metadata entry named MAXS to font files,
limiting the maximum acceptable scale factor at runtime for a specific
font. Currently MAXS is set to 8, which is sufficient for 16K monitors.
Oh, I forgot to delete this paragraph of com
Like glyphs in ascii_font_glyph[], assign null_font to
unknown_glyph->font in order to prevent grub_font_get_*() from
dereferencing NULL pointer.
Signed-off-by: Zhang Boyang
---
grub-core/font/font.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/grub-core/font/font.c b/grub-core/font/font.
There is a problem in ascii_glyph_lookup(). It doesn't check the return
value of grub_malloc(). If memory can't be allocated, then NULL pointer
will be written to.
This patch fixes the problem by fallbacking to unknown_glyph in case of
grub_malloc() returns NULL.
Signed-off-by: Zhang Boyang
---
If max_char_width or max_char_height is negative, bad values might be
propagated by grub_font_get_max_char_width() or
grub_font_get_max_char_height(). Prevent this from happening.
Signed-off-by: Zhang Boyang
---
grub-core/font/font.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
dif
This patch adds an argument 'scale' to grub_font_draw_glyph(). If
scale > 1, then the function will create a new scaled bitmap of the
drawing glyph, and draws the scaled glyph. The scaled bitmap is cached
in the glyph itself, so it can be reused if same glyph is used many
times.
This patch also ad
Currently GRUB's default font is too small to see on a HiDPI monitor.
This patch adds preliminary HiDPI support to gfxterm. It introduces a
new environment variable 'gfxterm_scale'. If set to 0, and a high
resolution monitor is detected, it will scale the font size
automatically. If set to other nu
Hi,
PATCH 1-3 are additional fixes to font code.
PATCH 4-5 are the refactored and rebased version of HiDPI patches. They
add preliminary HiDPI support for gfxterm. There is no HiDPI support for
gfxmenu yet.
Best Regards,
Zhang Boyang
___
Grub-devel
Signed-off-by: Xiaotian Wu
---
tests/ahci_test.in | 2 +-
tests/ehci_test.in | 2 +-
tests/ohci_test.in | 2 +-
tests/pata_test.in | 2 +-
tests/uhci_test.in | 2 +-
tests/util/grub-shell.in | 14 ++
6 files changed, 19 insertions(+), 5 deletions(-)
Link: https://github.com/loongson/LoongArch-Documentation/pull/57
Signed-off-by: Xiaotian Wu
---
configure.ac | 17
grub-core/kern/loongarch64/dl.c| 54 +--
grub-core/kern/loongarch64/dl_helper.c | 59 ++
inclu
This patchset adds support for the LoongArch instruction set.
Please review the patches and let me know if changes are needed.
v11->v12:
- based on the last commit.
- use LoadFile2 to loader initrd.
Xiaotian Wu (10):
PE: Add LoongArch definitions
Add LoongArch definitions
LoongArch: Add se
Signed-off-by: Xiaotian Wu
Signed-off-by: Zhou Yang
---
grub-core/kern/efi/mm.c | 3 +-
grub-core/kern/loongarch64/cache.c | 39
grub-core/kern/loongarch64/cache_flush.S | 33 ++
grub-core/kern/loongarch64/efi/init.c| 77
Signed-off-by: Xiaotian Wu
Signed-off-by: Zhou Yang
---
Makefile.util.def | 1 +
configure.ac| 22 -
gentpl.py | 27 ++--
grub-core/Makefile.am | 6 +
grub-core/Makefile.core.def | 17 +
include/g
Signed-off-by: Xiaotian Wu
---
grub-core/loader/loongarch64/linux.c | 513 +++
include/grub/loongarch64/linux.h | 44 +++
2 files changed, 557 insertions(+)
create mode 100644 grub-core/loader/loongarch64/linux.c
create mode 100644 include/grub/loongarch64/linux.h
Signed-off-by: Xiaotian Wu
Signed-off-by: Zhou Yang
---
grub-core/kern/dl.c| 9 +-
grub-core/kern/loongarch64/dl.c| 102 +
grub-core/kern/loongarch64/dl_helper.c | 202 +
include/grub/dl.h | 1 +
include/gru
Signed-off-by: Xiaotian Wu
Signed-off-by: Zhou Yang
---
grub-core/kern/loongarch64/efi/startup.S | 34
1 file changed, 34 insertions(+)
create mode 100644 grub-core/kern/loongarch64/efi/startup.S
diff --git a/grub-core/kern/loongarch64/efi/startup.S
b/grub-core/kern/l
Signed-off-by: Xiaotian Wu
Signed-off-by: Zhou Yang
Signed-off-by: Sun Haiyong
---
grub-core/lib/loongarch64/setjmp.S | 69 ++
grub-core/lib/setjmp.S | 2 +
include/grub/loongarch64/setjmp.h | 27
3 files changed, 98 insertions(+)
create m
Signed-off-by: Xiaotian Wu
Signed-off-by: Zhou Yang
---
include/grub/efi/pe32.h | 36
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/include/grub/efi/pe32.h b/include/grub/efi/pe32.h
index 98c4ff177..101859af1 100644
--- a/include/grub/efi/pe
Signed-off-by: Xiaotian Wu
Signed-off-by: Zhou Yang
---
include/grub/elf.h | 23 +++
1 file changed, 23 insertions(+)
diff --git a/include/grub/elf.h b/include/grub/elf.h
index e6f073bc9..c36d7dab2 100644
--- a/include/grub/elf.h
+++ b/include/grub/elf.h
@@ -252,6 +252,7 @@
28 matches
Mail list logo