mirror of
http://cgit.git.savannah.gnu.org/git/grub.git
synced 2026-04-28 14:33:34 +00:00
Compare commits
138 Commits
phcoder/ro
...
arm_corebo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3bf4907004 | ||
|
|
8af937d133 | ||
|
|
fc4b6e8b19 | ||
|
|
d11ced1e1f | ||
|
|
e824ec487b | ||
|
|
058df7b5a9 | ||
|
|
456f220e6a | ||
|
|
265292f2b0 | ||
|
|
187f78ec11 | ||
|
|
656c3b0d7f | ||
|
|
3edabad8fe | ||
|
|
848bed9d92 | ||
|
|
216950a4ee | ||
|
|
0558f4cd9b | ||
|
|
ac6b41b89f | ||
|
|
80c274084d | ||
|
|
5a865b3786 | ||
|
|
2fee7bb8de | ||
|
|
fcbb723d4b | ||
|
|
642ff2676f | ||
|
|
46f08fb93b | ||
|
|
24e37a8852 | ||
|
|
9808c3ef95 | ||
|
|
1daa716c70 | ||
|
|
461bfab7b7 | ||
|
|
b0300c6048 | ||
|
|
d08c968514 | ||
|
|
a35ac85430 | ||
|
|
3e6d59d7cb | ||
|
|
d9f7de0ae3 | ||
|
|
dc6e1b5af8 | ||
|
|
ede6c96893 | ||
|
|
a827807a13 | ||
|
|
1073ddb120 | ||
|
|
4341f82af0 | ||
|
|
c2ea443446 | ||
|
|
608bec5112 | ||
|
|
6dec3a26b3 | ||
|
|
b43b8cacc8 | ||
|
|
37865c2c4a | ||
|
|
5a0c548ba3 | ||
|
|
b0bad6fd94 | ||
|
|
e54c99aaff | ||
|
|
d454509bb8 | ||
|
|
007f0b407f | ||
|
|
4bd4a88725 | ||
|
|
6cef7f6079 | ||
|
|
ec4af117c6 | ||
|
|
8014b7b337 | ||
|
|
fcea891e17 | ||
|
|
c42cb97f08 | ||
|
|
bcf3c55531 | ||
|
|
fb93c75bdd | ||
|
|
641bb15fa4 | ||
|
|
f34ed1f53c | ||
|
|
892dfbe113 | ||
|
|
951306c509 | ||
|
|
512bb31cbc | ||
|
|
2fb8cd26a9 | ||
|
|
9f8f747605 | ||
|
|
102016960d | ||
|
|
07cd46627b | ||
|
|
9e161d1302 | ||
|
|
06c92907c1 | ||
|
|
74cef4ab78 | ||
|
|
f4116c3a42 | ||
|
|
2d56c1b117 | ||
|
|
1f72ca020d | ||
|
|
3d300d7247 | ||
|
|
03104c2d98 | ||
|
|
40562ddf1e | ||
|
|
1ea06af1ae | ||
|
|
df21b9363d | ||
|
|
8efde40d0c | ||
|
|
d624e04af1 | ||
|
|
bbd85a0292 | ||
|
|
4f06545767 | ||
|
|
66d0e16425 | ||
|
|
a98c706755 | ||
|
|
95f663ec1d | ||
|
|
2b2a338ad6 | ||
|
|
6c9512b610 | ||
|
|
f447b3d2bb | ||
|
|
295fe6c548 | ||
|
|
9cd85f276f | ||
|
|
502a7c48e9 | ||
|
|
418b32f8e9 | ||
|
|
98490fc328 | ||
|
|
3625fdc0b9 | ||
|
|
1ec2b7758b | ||
|
|
f51e8d0dda | ||
|
|
ee52ea80d6 | ||
|
|
c55f74a5c5 | ||
|
|
3b1bb7f3eb | ||
|
|
0b71582111 | ||
|
|
dc491ff04a | ||
|
|
192243b13e | ||
|
|
0f3ae7324a | ||
|
|
ab8770a314 | ||
|
|
f2df41cffa | ||
|
|
b0227ce4b9 | ||
|
|
f900bea454 | ||
|
|
dc51ac70ee | ||
|
|
869a0bc476 | ||
|
|
f9ee0c3e5d | ||
|
|
8af26e386c | ||
|
|
78e9b82d2c | ||
|
|
86139504b7 | ||
|
|
35c1d629f9 | ||
|
|
bacb8f911f | ||
|
|
fbda565356 | ||
|
|
598185f806 | ||
|
|
ca2fd6c93f | ||
|
|
a29fb4722c | ||
|
|
7562f4ab53 | ||
|
|
c7d0aa5450 | ||
|
|
ceb68c6648 | ||
|
|
99291427d2 | ||
|
|
6ffee98e1b | ||
|
|
a6649f5b8e | ||
|
|
c3c14cffef | ||
|
|
84939af253 | ||
|
|
ba6d40e8bb | ||
|
|
2c3a054f4f | ||
|
|
b8eda96422 | ||
|
|
ca3962ca7b | ||
|
|
a4f7d77f7d | ||
|
|
5099975ace | ||
|
|
2f98d7648e | ||
|
|
018e382144 | ||
|
|
f5cba79512 | ||
|
|
46569db585 | ||
|
|
575c7a6e3c | ||
|
|
fc489a889d | ||
|
|
bfb517bc3b | ||
|
|
437dba573f | ||
|
|
974ba94330 | ||
|
|
963d21b76c |
@@ -145,30 +145,37 @@ if COND_real_platform
|
||||
|
||||
if COND_i386_coreboot
|
||||
QEMU32=qemu-system-i386
|
||||
MINIMUM_CPU_LINUX=pentium2
|
||||
endif
|
||||
|
||||
if COND_i386_multiboot
|
||||
QEMU32=qemu-system-i386
|
||||
MINIMUM_CPU_LINUX=pentium2
|
||||
endif
|
||||
|
||||
if COND_i386_ieee1275
|
||||
QEMU32=qemu-system-i386
|
||||
MINIMUM_CPU_LINUX=pentium2
|
||||
endif
|
||||
|
||||
if COND_i386_qemu
|
||||
QEMU32=qemu-system-i386
|
||||
MINIMUM_CPU_LINUX=pentium2
|
||||
endif
|
||||
|
||||
if COND_i386_pc
|
||||
QEMU32=qemu-system-i386
|
||||
MINIMUM_CPU_LINUX=pentium2
|
||||
endif
|
||||
|
||||
if COND_i386_efi
|
||||
QEMU32=qemu-system-i386
|
||||
MINIMUM_CPU_LINUX=pentium2
|
||||
endif
|
||||
|
||||
if COND_x86_64_efi
|
||||
QEMU32=qemu-system-x86_64
|
||||
MINIMUM_CPU_LINUX=core2duo
|
||||
endif
|
||||
|
||||
linux.init.x86_64: $(srcdir)/grub-core/tests/boot/linux.init-x86_64.S $(srcdir)/grub-core/tests/boot/qemu-shutdown-x86.S
|
||||
@@ -306,7 +313,7 @@ bootcheck-knetbsd-x86_64: knetbsd.miniroot-image.x86_64.gz $(GRUB_PAYLOADS_DIR)/
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=qemu-system-x86_64 --files=/miniroot.gz=knetbsd.miniroot-image.x86_64.gz --files=/knetbsd=$(GRUB_PAYLOADS_DIR)/knetbsd.x86_64 $(srcdir)/grub-core/tests/boot/knetbsd.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
bootcheck-linux-i386: linux-initramfs.i386 $(GRUB_PAYLOADS_DIR)/linux.i386 $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/initrd=linux-initramfs.i386 --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.i386 $(srcdir)/grub-core/tests/boot/linux.cfg --qemu-opts="-cpu pentium2" | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=$(QEMU32) --files=/initrd=linux-initramfs.i386 --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.i386 $(srcdir)/grub-core/tests/boot/linux.cfg --qemu-opts="-cpu $(MINIMUM_CPU_LINUX)" | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
bootcheck-linux-x86_64: linux-initramfs.x86_64 $(GRUB_PAYLOADS_DIR)/linux.x86_64 $(srcdir)/grub-core/tests/boot/linux.cfg grub-shell
|
||||
./grub-shell --timeout=$(BOOTCHECK_TIMEOUT) --qemu=qemu-system-x86_64 --files=/initrd=linux-initramfs.x86_64 --files=/linux=$(GRUB_PAYLOADS_DIR)/linux.x86_64 $(srcdir)/grub-core/tests/boot/linux.cfg | grep $(SUCCESSFUL_BOOT_STRING) > /dev/null
|
||||
|
||||
@@ -86,9 +86,11 @@ CPPFLAGS_TERMINAL_LIST += '-Dgrub_term_register_output(...)=OUTPUT_TERMINAL_LIST
|
||||
CPPFLAGS_COMMAND_LIST = '-Dgrub_register_command(...)=COMMAND_LIST_MARKER(__VA_ARGS__)'
|
||||
CPPFLAGS_COMMAND_LIST += '-Dgrub_register_extcmd(...)=EXTCOMMAND_LIST_MARKER(__VA_ARGS__)'
|
||||
CPPFLAGS_COMMAND_LIST += '-Dgrub_register_command_p1(...)=P1COMMAND_LIST_MARKER(__VA_ARGS__)'
|
||||
CPPFLAGS_FDT_LIST := '-Dgrub_fdtbus_register(...)=FDT_DRIVER_LIST_MARKER(__VA_ARGS__)'
|
||||
CPPFLAGS_MARKER = $(CPPFLAGS_FS_LIST) $(CPPFLAGS_VIDEO_LIST) \
|
||||
$(CPPFLAGS_PARTTOOL_LIST) $(CPPFLAGS_PARTMAP_LIST) \
|
||||
$(CPPFLAGS_TERMINAL_LIST) $(CPPFLAGS_COMMAND_LIST)
|
||||
$(CPPFLAGS_TERMINAL_LIST) $(CPPFLAGS_COMMAND_LIST) \
|
||||
$(CPPFLAGS_FDT_LIST)
|
||||
|
||||
# Define these variables to calm down automake
|
||||
|
||||
|
||||
19
configure.ac
19
configure.ac
@@ -31,7 +31,7 @@ dnl (such as BUILD_CC, BUILD_CFLAGS, etc.) for the build type and variables
|
||||
dnl with the prefix "TARGET_" (such as TARGET_CC, TARGET_CFLAGS, etc.) are
|
||||
dnl used for the target type. See INSTALL for full list of variables.
|
||||
|
||||
AC_INIT([GRUB],[2.02~rc1],[bug-grub@gnu.org])
|
||||
AC_INIT([GRUB],[2.03],[bug-grub@gnu.org])
|
||||
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
|
||||
@@ -167,6 +167,7 @@ case "$target_cpu"-"$platform" in
|
||||
mipsel-fuloong) platform=loongson ;;
|
||||
mipsel-loongson) ;;
|
||||
arm-uboot) ;;
|
||||
arm-coreboot) ;;
|
||||
arm-efi) ;;
|
||||
arm64-efi) ;;
|
||||
*-emu) ;;
|
||||
@@ -373,7 +374,10 @@ case "$host_os" in
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_SIZEOF(off_t)
|
||||
test x"$ac_cv_sizeof_off_t" = x8 || AC_MSG_ERROR([Large file support is required]);;
|
||||
if test x"$ac_cv_sizeof_off_t" != x8 ; then
|
||||
AC_CHECK_SIZEOF(off64_t)
|
||||
test x"$ac_cv_sizeof_off64_t" = x8 || AC_MSG_ERROR([Large file support is required])
|
||||
fi;;
|
||||
esac
|
||||
|
||||
if test x$USE_NLS = xno; then
|
||||
@@ -456,6 +460,16 @@ case "$build_os" in
|
||||
esac
|
||||
AC_SUBST(BUILD_EXEEXT)
|
||||
|
||||
# In some build environments like termux /bin/sh is not a valid
|
||||
# shebang. Use $SHELL instead if it's executable and /bin/sh isn't
|
||||
BUILD_SHEBANG=/bin/sh
|
||||
for she in /bin/sh "$SHELL"; do
|
||||
if test -x "$she" ; then
|
||||
BUILD_SHEBANG="$she"
|
||||
fi
|
||||
done
|
||||
AC_SUBST(BUILD_SHEBANG)
|
||||
|
||||
# For gnulib.
|
||||
gl_INIT
|
||||
|
||||
@@ -1905,6 +1919,7 @@ AM_CONDITIONAL([COND_mipsel], [test x$target_cpu = xmipsel])
|
||||
AM_CONDITIONAL([COND_mipseb], [test x$target_cpu = xmips])
|
||||
AM_CONDITIONAL([COND_arm], [test x$target_cpu = xarm ])
|
||||
AM_CONDITIONAL([COND_arm_uboot], [test x$target_cpu = xarm -a x$platform = xuboot])
|
||||
AM_CONDITIONAL([COND_arm_coreboot], [test x$target_cpu = xarm -a x$platform = xcoreboot])
|
||||
AM_CONDITIONAL([COND_arm_efi], [test x$target_cpu = xarm -a x$platform = xefi])
|
||||
AM_CONDITIONAL([COND_arm64], [test x$target_cpu = xarm64 ])
|
||||
AM_CONDITIONAL([COND_arm64_efi], [test x$target_cpu = xarm64 -a x$platform = xefi])
|
||||
|
||||
10
gentpl.py
10
gentpl.py
@@ -31,7 +31,8 @@ GRUB_PLATFORMS = [ "emu", "i386_pc", "i386_efi", "i386_qemu", "i386_coreboot",
|
||||
"i386_xen", "x86_64_xen",
|
||||
"mips_loongson", "sparc64_ieee1275",
|
||||
"powerpc_ieee1275", "mips_arc", "ia64_efi",
|
||||
"mips_qemu_mips", "arm_uboot", "arm_efi", "arm64_efi" ]
|
||||
"mips_qemu_mips", "arm_uboot", "arm_efi", "arm64_efi",
|
||||
"arm_coreboot"]
|
||||
|
||||
GROUPS = {}
|
||||
|
||||
@@ -44,7 +45,7 @@ GROUPS["x86"] = GROUPS["i386"] + GROUPS["x86_64"]
|
||||
GROUPS["mips"] = [ "mips_loongson", "mips_qemu_mips", "mips_arc" ]
|
||||
GROUPS["sparc64"] = [ "sparc64_ieee1275" ]
|
||||
GROUPS["powerpc"] = [ "powerpc_ieee1275" ]
|
||||
GROUPS["arm"] = [ "arm_uboot", "arm_efi" ]
|
||||
GROUPS["arm"] = [ "arm_uboot", "arm_efi", "arm_coreboot" ]
|
||||
GROUPS["arm64"] = [ "arm64_efi" ]
|
||||
|
||||
# Groups based on firmware
|
||||
@@ -52,6 +53,7 @@ GROUPS["efi"] = [ "i386_efi", "x86_64_efi", "ia64_efi", "arm_efi", "arm64_efi"
|
||||
GROUPS["ieee1275"] = [ "i386_ieee1275", "sparc64_ieee1275", "powerpc_ieee1275" ]
|
||||
GROUPS["uboot"] = [ "arm_uboot" ]
|
||||
GROUPS["xen"] = [ "i386_xen", "x86_64_xen" ]
|
||||
GROUPS["coreboot"] = [ "i386_coreboot", "arm_coreboot" ]
|
||||
|
||||
# emu is a special case so many core functionality isn't needed on this platform
|
||||
GROUPS["noemu"] = GRUB_PLATFORMS[:]; GROUPS["noemu"].remove("emu")
|
||||
@@ -61,10 +63,10 @@ GROUPS["cmos"] = GROUPS["x86"][:] + ["mips_loongson", "mips_qemu_mips",
|
||||
"sparc64_ieee1275", "powerpc_ieee1275"]
|
||||
GROUPS["cmos"].remove("i386_efi"); GROUPS["cmos"].remove("x86_64_efi");
|
||||
GROUPS["pci"] = GROUPS["x86"] + ["mips_loongson"]
|
||||
GROUPS["usb"] = GROUPS["pci"]
|
||||
GROUPS["usb"] = GROUPS["pci"] + ["arm_coreboot"]
|
||||
|
||||
# If gfxterm is main output console integrate it into kernel
|
||||
GROUPS["videoinkernel"] = ["mips_loongson", "i386_coreboot" ]
|
||||
GROUPS["videoinkernel"] = ["mips_loongson", "i386_coreboot", "arm_coreboot" ]
|
||||
GROUPS["videomodules"] = GRUB_PLATFORMS[:];
|
||||
for i in GROUPS["videoinkernel"]: GROUPS["videomodules"].remove(i)
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ endif
|
||||
|
||||
if COND_i386_coreboot
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/tsc.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/coreboot/lbio.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/coreboot/lbio.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video_fb.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/gfxterm.h
|
||||
@@ -239,6 +239,20 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/system.h
|
||||
endif
|
||||
|
||||
if COND_arm_coreboot
|
||||
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/keyboard_layouts.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/system.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video_fb.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/gfxterm.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/font.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/bufio.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/fdt.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/dma.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/coreboot/kernel.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/fdtbus.h
|
||||
endif
|
||||
|
||||
if COND_arm_efi
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arm/efi/loader.h
|
||||
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h
|
||||
@@ -278,7 +292,7 @@ BUILT_SOURCES += symlist.h
|
||||
|
||||
symlist.c: symlist.h gensymlist.sh
|
||||
$(TARGET_CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS_KERNEL) $(CPPFLAGS) -DGRUB_SYMBOL_GENERATOR=1 symlist.h > symlist.p || (rm -f symlist.p; exit 1)
|
||||
cat symlist.p | /bin/sh $(srcdir)/gensymlist.sh $(top_builddir)/config.h $(KERNEL_HEADER_FILES) >$@ || (rm -f $@; exit 1)
|
||||
cat symlist.p | $(SHELL) $(srcdir)/gensymlist.sh $(top_builddir)/config.h $(KERNEL_HEADER_FILES) >$@ || (rm -f $@; exit 1)
|
||||
rm -f symlist.p
|
||||
CLEANFILES += symlist.c
|
||||
BUILT_SOURCES += symlist.c
|
||||
@@ -358,6 +372,16 @@ terminal.lst: $(MARKER_FILES)
|
||||
platform_DATA += terminal.lst
|
||||
CLEANFILES += terminal.lst
|
||||
|
||||
fdt.lst: $(MARKER_FILES)
|
||||
(for pp in $^; do \
|
||||
b=`basename $$pp .marker`; \
|
||||
sed -n \
|
||||
-e "/FDT_DRIVER_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/i\1: $$b/;p;}" \
|
||||
-e "/FDT_DRIVER_LIST_MARKER *( *\"/{s/.*( *\"\([^\"]*\)\".*/o\1: $$b/;p;}" $$pp; \
|
||||
done) | sort -u > $@
|
||||
platform_DATA += fdt.lst
|
||||
CLEANFILES += fdt.lst
|
||||
|
||||
parttool.lst: $(MARKER_FILES)
|
||||
(for pp in $^; do \
|
||||
b=`basename $$pp .marker`; \
|
||||
|
||||
@@ -92,6 +92,8 @@ kernel = {
|
||||
emu_cppflags = '$(CPPFLAGS_GNULIB)';
|
||||
arm_uboot_ldflags = '-Wl,-r,-d';
|
||||
arm_uboot_stripflags = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
|
||||
arm_coreboot_ldflags = '-Wl,-r,-d';
|
||||
arm_coreboot_stripflags = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
|
||||
|
||||
i386_pc_startup = kern/i386/pc/startup.S;
|
||||
i386_efi_startup = kern/i386/efi/startup.S;
|
||||
@@ -105,7 +107,8 @@ kernel = {
|
||||
mips_startup = kern/mips/startup.S;
|
||||
sparc64_ieee1275_startup = kern/sparc64/ieee1275/crt0.S;
|
||||
powerpc_ieee1275_startup = kern/powerpc/ieee1275/startup.S;
|
||||
arm_uboot_startup = kern/arm/uboot/startup.S;
|
||||
arm_uboot_startup = kern/arm/startup.S;
|
||||
arm_coreboot_startup = kern/arm/startup.S;
|
||||
arm_efi_startup = kern/arm/efi/startup.S;
|
||||
arm64_efi_startup = kern/arm64/efi/startup.S;
|
||||
|
||||
@@ -149,6 +152,20 @@ kernel = {
|
||||
uboot = kern/uboot/init.c;
|
||||
uboot = kern/uboot/hw.c;
|
||||
uboot = term/uboot/console.c;
|
||||
arm_uboot = kern/arm/uboot/init.c;
|
||||
arm_uboot = kern/arm/uboot/uboot.S;
|
||||
|
||||
arm_coreboot = kern/arm/coreboot/init.c;
|
||||
arm_coreboot = kern/arm/coreboot/timer.c;
|
||||
arm_coreboot = kern/arm/coreboot/coreboot.S;
|
||||
arm_coreboot = lib/fdt.c;
|
||||
arm_coreboot = bus/fdt.c;
|
||||
arm_coreboot = term/ps2.c;
|
||||
arm_coreboot = term/arm/pl050.c;
|
||||
arm_coreboot = term/arm/cros.c;
|
||||
arm_coreboot = term/arm/cros_ec.c;
|
||||
arm_coreboot = commands/keylayouts.c;
|
||||
arm_coreboot = kern/arm/coreboot/dma.c;
|
||||
|
||||
terminfoinkernel = term/terminfo.c;
|
||||
terminfoinkernel = term/tparm.c;
|
||||
@@ -164,7 +181,7 @@ kernel = {
|
||||
i386_multiboot = kern/i386/coreboot/init.c;
|
||||
i386_qemu = kern/i386/qemu/init.c;
|
||||
i386_coreboot_multiboot_qemu = term/i386/pc/vga_text.c;
|
||||
i386_coreboot = video/i386/coreboot/cbfb.c;
|
||||
coreboot = video/coreboot/cbfb.c;
|
||||
|
||||
efi = disk/efi/efidisk.c;
|
||||
efi = kern/efi/efi.c;
|
||||
@@ -225,8 +242,10 @@ kernel = {
|
||||
i386_qemu = kern/vga_init.c;
|
||||
i386_qemu = kern/i386/qemu/mmap.c;
|
||||
|
||||
i386_coreboot = kern/i386/coreboot/mmap.c;
|
||||
coreboot = kern/coreboot/mmap.c;
|
||||
i386_coreboot = kern/i386/coreboot/cbtable.c;
|
||||
coreboot = kern/coreboot/cbtable.c;
|
||||
arm_coreboot = kern/arm/coreboot/cbtable.c;
|
||||
|
||||
i386_multiboot = kern/i386/multiboot_mmap.c;
|
||||
|
||||
@@ -238,6 +257,7 @@ kernel = {
|
||||
mips_qemu_mips = term/ns8250.c;
|
||||
mips_qemu_mips = term/serial.c;
|
||||
mips_qemu_mips = term/at_keyboard.c;
|
||||
mips_qemu_mips = term/ps2.c;
|
||||
mips_qemu_mips = commands/boot.c;
|
||||
mips_qemu_mips = commands/keylayouts.c;
|
||||
mips_qemu_mips = term/i386/pc/vga_text.c;
|
||||
@@ -253,6 +273,7 @@ kernel = {
|
||||
mips_loongson = bus/pci.c;
|
||||
mips_loongson = kern/mips/loongson/init.c;
|
||||
mips_loongson = term/at_keyboard.c;
|
||||
mips_loongson = term/ps2.c;
|
||||
mips_loongson = commands/boot.c;
|
||||
mips_loongson = term/serial.c;
|
||||
mips_loongson = video/sm712.c;
|
||||
@@ -574,7 +595,10 @@ module = {
|
||||
module = {
|
||||
name = ehci;
|
||||
common = bus/usb/ehci.c;
|
||||
arm_coreboot = bus/usb/ehci-fdt.c;
|
||||
pci = bus/usb/ehci-pci.c;
|
||||
enable = pci;
|
||||
enable = arm_coreboot;
|
||||
};
|
||||
|
||||
module = {
|
||||
@@ -641,6 +665,7 @@ module = {
|
||||
module = {
|
||||
name = cbtable;
|
||||
common = kern/i386/coreboot/cbtable.c;
|
||||
common = kern/coreboot/cbtable.c;
|
||||
enable = i386_pc;
|
||||
enable = i386_efi;
|
||||
enable = i386_qemu;
|
||||
@@ -754,6 +779,7 @@ module = {
|
||||
enable = arm_efi;
|
||||
enable = arm64_efi;
|
||||
enable = arm_uboot;
|
||||
enable = arm_coreboot;
|
||||
};
|
||||
|
||||
module = {
|
||||
@@ -837,7 +863,8 @@ module = {
|
||||
efi = lib/efi/halt.c;
|
||||
ieee1275 = lib/ieee1275/halt.c;
|
||||
emu = lib/emu/halt.c;
|
||||
uboot = lib/uboot/halt.c;
|
||||
uboot = lib/dummy/halt.c;
|
||||
arm_coreboot = lib/dummy/halt.c;
|
||||
};
|
||||
|
||||
module = {
|
||||
@@ -855,6 +882,7 @@ module = {
|
||||
mips_qemu_mips = lib/mips/qemu_mips/reboot.c;
|
||||
xen = lib/xen/reboot.c;
|
||||
uboot = lib/uboot/reboot.c;
|
||||
arm_coreboot = lib/dummy/reboot.c;
|
||||
common = commands/reboot.c;
|
||||
};
|
||||
|
||||
@@ -1548,7 +1576,8 @@ module = {
|
||||
name = datetime;
|
||||
cmos = lib/cmos_datetime.c;
|
||||
efi = lib/efi/datetime.c;
|
||||
uboot = lib/uboot/datetime.c;
|
||||
uboot = lib/dummy/datetime.c;
|
||||
arm_coreboot = lib/dummy/datetime.c;
|
||||
sparc64_ieee1275 = lib/ieee1275/datetime.c;
|
||||
powerpc_ieee1275 = lib/ieee1275/datetime.c;
|
||||
sparc64_ieee1275 = lib/ieee1275/cmos.c;
|
||||
@@ -1869,6 +1898,7 @@ module = {
|
||||
module = {
|
||||
name = at_keyboard;
|
||||
common = term/at_keyboard.c;
|
||||
common = term/ps2.c;
|
||||
enable = x86;
|
||||
};
|
||||
|
||||
@@ -1961,6 +1991,11 @@ module = {
|
||||
common = tests/example_functional_test.c;
|
||||
};
|
||||
|
||||
module = {
|
||||
name = strtoull_test;
|
||||
common = tests/strtoull_test.c;
|
||||
};
|
||||
|
||||
module = {
|
||||
name = setjmp_test;
|
||||
common = tests/setjmp_test.c;
|
||||
|
||||
255
grub-core/bus/fdt.c
Normal file
255
grub-core/bus/fdt.c
Normal file
@@ -0,0 +1,255 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2016 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/fdtbus.h>
|
||||
#include <grub/fdt.h>
|
||||
#include <grub/term.h>
|
||||
|
||||
static const void *dtb;
|
||||
static grub_size_t root_address_cells, root_size_cells;
|
||||
/* Pointer to this symbol signals invalid mapping. */
|
||||
char grub_fdtbus_invalid_mapping[1];
|
||||
|
||||
struct grub_fdtbus_dev
|
||||
{
|
||||
struct grub_fdtbus_dev *next;
|
||||
struct grub_fdtbus_dev *parent;
|
||||
int node;
|
||||
struct grub_fdtbus_driver *driver;
|
||||
};
|
||||
|
||||
struct grub_fdtbus_dev *devs;
|
||||
struct grub_fdtbus_driver *drivers;
|
||||
|
||||
static int
|
||||
is_compatible (struct grub_fdtbus_driver *driver,
|
||||
int node)
|
||||
{
|
||||
grub_size_t compatible_size;
|
||||
const char *compatible = grub_fdt_get_prop (dtb, node, "compatible",
|
||||
&compatible_size);
|
||||
const char *compatible_end = compatible + compatible_size;
|
||||
while (compatible < compatible_end)
|
||||
{
|
||||
if (grub_strcmp (driver->compatible, compatible) == 0)
|
||||
return 1;
|
||||
compatible += grub_strlen (compatible) + 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
fdtbus_scan (struct grub_fdtbus_dev *parent)
|
||||
{
|
||||
int node;
|
||||
for (node = grub_fdt_first_node (dtb, parent ? parent->node : 0); node >= 0;
|
||||
node = grub_fdt_next_node (dtb, node))
|
||||
{
|
||||
struct grub_fdtbus_dev *dev;
|
||||
struct grub_fdtbus_driver *driver;
|
||||
dev = grub_zalloc (sizeof (*dev));
|
||||
if (!dev)
|
||||
{
|
||||
grub_print_error ();
|
||||
return;
|
||||
}
|
||||
dev->node = node;
|
||||
dev->next = devs;
|
||||
dev->parent = parent;
|
||||
devs = dev;
|
||||
FOR_LIST_ELEMENTS(driver, drivers)
|
||||
if (!dev->driver && is_compatible (driver, node))
|
||||
{
|
||||
if (driver->attach(dev) == GRUB_ERR_NONE)
|
||||
{
|
||||
dev->driver = driver;
|
||||
break;
|
||||
}
|
||||
grub_print_error ();
|
||||
}
|
||||
fdtbus_scan (dev);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
grub_fdtbus_register (struct grub_fdtbus_driver *driver)
|
||||
{
|
||||
struct grub_fdtbus_dev *dev;
|
||||
grub_list_push (GRUB_AS_LIST_P (&drivers),
|
||||
GRUB_AS_LIST (driver));
|
||||
for (dev = devs; dev; dev = dev->next)
|
||||
if (!dev->driver && is_compatible (driver, dev->node))
|
||||
{
|
||||
if (driver->attach(dev) == GRUB_ERR_NONE)
|
||||
dev->driver = driver;
|
||||
grub_print_error ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
grub_fdtbus_unregister (struct grub_fdtbus_driver *driver)
|
||||
{
|
||||
grub_list_remove (GRUB_AS_LIST (driver));
|
||||
struct grub_fdtbus_dev *dev;
|
||||
for (dev = devs; dev; dev = dev->next)
|
||||
if (dev->driver == driver)
|
||||
{
|
||||
if (driver->detach)
|
||||
driver->detach(dev);
|
||||
dev->driver = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
grub_fdtbus_init (const void *dtb_in, grub_size_t size)
|
||||
{
|
||||
if (!dtb_in || grub_fdt_check_header (dtb_in, size) < 0)
|
||||
grub_fatal ("invalid FDT");
|
||||
dtb = dtb_in;
|
||||
const grub_uint32_t *prop = grub_fdt_get_prop (dtb, 0, "#address-cells", 0);
|
||||
if (prop)
|
||||
root_address_cells = grub_be_to_cpu32 (*prop);
|
||||
else
|
||||
root_address_cells = 1;
|
||||
|
||||
prop = grub_fdt_get_prop (dtb, 0, "#size-cells", 0);
|
||||
if (prop)
|
||||
root_size_cells = grub_be_to_cpu32 (*prop);
|
||||
else
|
||||
root_size_cells = 1;
|
||||
|
||||
fdtbus_scan (0);
|
||||
}
|
||||
|
||||
static int
|
||||
get_address_cells (const struct grub_fdtbus_dev *dev)
|
||||
{
|
||||
const grub_uint32_t *prop;
|
||||
if (!dev)
|
||||
return root_address_cells;
|
||||
prop = grub_fdt_get_prop (dtb, dev->node, "#address-cells", 0);
|
||||
if (prop)
|
||||
return grub_be_to_cpu32 (*prop);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
get_size_cells (const struct grub_fdtbus_dev *dev)
|
||||
{
|
||||
const grub_uint32_t *prop;
|
||||
if (!dev)
|
||||
return root_size_cells;
|
||||
prop = grub_fdt_get_prop (dtb, dev->node, "#size-cells", 0);
|
||||
if (prop)
|
||||
return grub_be_to_cpu32 (*prop);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static grub_uint64_t
|
||||
get64 (const grub_uint32_t *reg, grub_size_t cells)
|
||||
{
|
||||
grub_uint64_t val = 0;
|
||||
if (cells >= 1)
|
||||
val = grub_be_to_cpu32 (reg[cells - 1]);
|
||||
if (cells >= 2)
|
||||
val |= ((grub_uint64_t) grub_be_to_cpu32 (reg[cells - 2])) << 32;
|
||||
return val;
|
||||
}
|
||||
|
||||
static volatile void *
|
||||
translate (const struct grub_fdtbus_dev *dev, const grub_uint32_t *reg)
|
||||
{
|
||||
volatile void *ret;
|
||||
const grub_uint32_t *ranges;
|
||||
grub_size_t ranges_size, cells_per_mapping;
|
||||
grub_size_t parent_address_cells, child_address_cells, child_size_cells;
|
||||
grub_size_t nmappings, i;
|
||||
if (dev == 0)
|
||||
{
|
||||
grub_uint64_t val;
|
||||
val = get64 (reg, root_address_cells);
|
||||
if (sizeof (void *) == 4 && (val >> 32))
|
||||
return grub_fdtbus_invalid_mapping;
|
||||
return (void *) (grub_addr_t) val;
|
||||
}
|
||||
ranges = grub_fdt_get_prop (dtb, dev->node, "ranges", &ranges_size);
|
||||
if (!ranges)
|
||||
return grub_fdtbus_invalid_mapping;
|
||||
if (ranges_size == 0)
|
||||
return translate (dev->parent, reg);
|
||||
parent_address_cells = get_address_cells (dev->parent);
|
||||
child_address_cells = get_address_cells (dev);
|
||||
child_size_cells = get_size_cells (dev);
|
||||
cells_per_mapping = parent_address_cells + child_address_cells + child_size_cells;
|
||||
nmappings = ranges_size / 4 / cells_per_mapping;
|
||||
for (i = 0; i < nmappings; i++)
|
||||
{
|
||||
const grub_uint32_t *child_addr = &ranges[i * cells_per_mapping];
|
||||
const grub_uint32_t *parent_addr = child_addr + child_address_cells;
|
||||
grub_uint64_t child_size = get64 (parent_addr + parent_address_cells, child_size_cells);
|
||||
|
||||
if (child_address_cells > 2 && grub_memcmp (reg, child_addr, (child_address_cells - 2) * 4) != 0)
|
||||
continue;
|
||||
if (get64 (reg, child_address_cells) < get64 (child_addr, child_address_cells))
|
||||
continue;
|
||||
|
||||
grub_uint64_t offset = get64 (reg, child_address_cells) - get64 (child_addr, child_address_cells);
|
||||
if (offset >= child_size)
|
||||
continue;
|
||||
|
||||
ret = translate (dev->parent, parent_addr);
|
||||
if (grub_fdtbus_is_mapping_valid (ret))
|
||||
ret = (volatile char *) ret + offset;
|
||||
return ret;
|
||||
}
|
||||
return grub_fdtbus_invalid_mapping;
|
||||
}
|
||||
|
||||
volatile void *
|
||||
grub_fdtbus_map_reg (const struct grub_fdtbus_dev *dev, int regno, grub_size_t *size)
|
||||
{
|
||||
grub_size_t address_cells, size_cells;
|
||||
address_cells = get_address_cells (dev->parent);
|
||||
size_cells = get_size_cells (dev->parent);
|
||||
const grub_uint32_t *reg = grub_fdt_get_prop (dtb, dev->node, "reg", 0);
|
||||
if (size && size_cells)
|
||||
*size = reg[(address_cells + size_cells) * regno + address_cells];
|
||||
if (size && !size_cells)
|
||||
*size = 0;
|
||||
return translate (dev->parent, reg + (address_cells + size_cells) * regno);
|
||||
}
|
||||
|
||||
const char *
|
||||
grub_fdtbus_get_name (const struct grub_fdtbus_dev *dev)
|
||||
{
|
||||
return grub_fdt_get_nodename (dtb, dev->node);
|
||||
}
|
||||
|
||||
const void *
|
||||
grub_fdtbus_get_prop (const struct grub_fdtbus_dev *dev,
|
||||
const char *name,
|
||||
grub_uint32_t *len)
|
||||
{
|
||||
return grub_fdt_get_prop (dtb, dev->node, name, len);
|
||||
}
|
||||
|
||||
const void *
|
||||
grub_fdtbus_get_fdt (void)
|
||||
{
|
||||
return dtb;
|
||||
}
|
||||
45
grub-core/bus/usb/ehci-fdt.c
Normal file
45
grub-core/bus/usb/ehci-fdt.c
Normal file
@@ -0,0 +1,45 @@
|
||||
/* ehci.c - EHCI Support. */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/misc.h>
|
||||
#include <grub/mm.h>
|
||||
#include <grub/time.h>
|
||||
#include <grub/usb.h>
|
||||
#include <grub/fdtbus.h>
|
||||
|
||||
static grub_err_t
|
||||
ehci_attach(const struct grub_fdtbus_dev *dev)
|
||||
{
|
||||
grub_dprintf ("ehci", "Found generic-ehci\n");
|
||||
|
||||
grub_ehci_init_device (grub_fdtbus_map_reg (dev, 0, 0));
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct grub_fdtbus_driver ehci =
|
||||
{
|
||||
.compatible = "generic-ehci",
|
||||
.attach = ehci_attach
|
||||
};
|
||||
|
||||
void
|
||||
grub_ehci_pci_scan (void)
|
||||
{
|
||||
grub_fdtbus_register (&ehci);
|
||||
}
|
||||
208
grub-core/bus/usb/ehci-pci.c
Normal file
208
grub-core/bus/usb/ehci-pci.c
Normal file
@@ -0,0 +1,208 @@
|
||||
/* ehci.c - EHCI Support. */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/pci.h>
|
||||
#include <grub/cpu/pci.h>
|
||||
#include <grub/cs5536.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/mm.h>
|
||||
#include <grub/time.h>
|
||||
#include <grub/usb.h>
|
||||
|
||||
#define GRUB_EHCI_PCI_SBRN_REG 0x60
|
||||
#define GRUB_EHCI_ADDR_MEM_MASK (~0xff)
|
||||
|
||||
/* USBLEGSUP bits and related OS OWNED byte offset */
|
||||
enum
|
||||
{
|
||||
GRUB_EHCI_BIOS_OWNED = (1 << 16),
|
||||
GRUB_EHCI_OS_OWNED = (1 << 24)
|
||||
};
|
||||
|
||||
/* PCI iteration function... */
|
||||
static int
|
||||
grub_ehci_pci_iter (grub_pci_device_t dev, grub_pci_id_t pciid,
|
||||
void *data __attribute__ ((unused)))
|
||||
{
|
||||
volatile grub_uint32_t *regs;
|
||||
grub_uint32_t base, base_h;
|
||||
grub_uint32_t eecp_offset;
|
||||
grub_uint32_t usblegsup = 0;
|
||||
grub_uint64_t maxtime;
|
||||
grub_uint32_t interf;
|
||||
grub_uint32_t subclass;
|
||||
grub_uint32_t class;
|
||||
grub_uint8_t release;
|
||||
grub_uint32_t class_code;
|
||||
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: begin\n");
|
||||
|
||||
if (pciid == GRUB_CS5536_PCIID)
|
||||
{
|
||||
grub_uint64_t basereg;
|
||||
|
||||
basereg = grub_cs5536_read_msr (dev, GRUB_CS5536_MSR_USB_EHCI_BASE);
|
||||
if (!(basereg & GRUB_CS5536_MSR_USB_BASE_MEMORY_ENABLE))
|
||||
{
|
||||
/* Shouldn't happen. */
|
||||
grub_dprintf ("ehci", "No EHCI address is assigned\n");
|
||||
return 0;
|
||||
}
|
||||
base = (basereg & GRUB_CS5536_MSR_USB_BASE_ADDR_MASK);
|
||||
basereg |= GRUB_CS5536_MSR_USB_BASE_BUS_MASTER;
|
||||
basereg &= ~GRUB_CS5536_MSR_USB_BASE_PME_ENABLED;
|
||||
basereg &= ~GRUB_CS5536_MSR_USB_BASE_PME_STATUS;
|
||||
basereg &= ~GRUB_CS5536_MSR_USB_BASE_SMI_ENABLE;
|
||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_USB_EHCI_BASE, basereg);
|
||||
}
|
||||
else
|
||||
{
|
||||
grub_pci_address_t addr;
|
||||
addr = grub_pci_make_address (dev, GRUB_PCI_REG_CLASS);
|
||||
class_code = grub_pci_read (addr) >> 8;
|
||||
interf = class_code & 0xFF;
|
||||
subclass = (class_code >> 8) & 0xFF;
|
||||
class = class_code >> 16;
|
||||
|
||||
/* If this is not an EHCI controller, just return. */
|
||||
if (class != 0x0c || subclass != 0x03 || interf != 0x20)
|
||||
return 0;
|
||||
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: class OK\n");
|
||||
|
||||
/* Check Serial Bus Release Number */
|
||||
addr = grub_pci_make_address (dev, GRUB_EHCI_PCI_SBRN_REG);
|
||||
release = grub_pci_read_byte (addr);
|
||||
if (release != 0x20)
|
||||
{
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: Wrong SBRN: %0x\n",
|
||||
release);
|
||||
return 0;
|
||||
}
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: bus rev. num. OK\n");
|
||||
|
||||
/* Determine EHCI EHCC registers base address. */
|
||||
addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG0);
|
||||
base = grub_pci_read (addr);
|
||||
addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG1);
|
||||
base_h = grub_pci_read (addr);
|
||||
/* Stop if registers are mapped above 4G - GRUB does not currently
|
||||
* work with registers mapped above 4G */
|
||||
if (((base & GRUB_PCI_ADDR_MEM_TYPE_MASK) != GRUB_PCI_ADDR_MEM_TYPE_32)
|
||||
&& (base_h != 0))
|
||||
{
|
||||
grub_dprintf ("ehci",
|
||||
"EHCI grub_ehci_pci_iter: registers above 4G are not supported\n");
|
||||
return 0;
|
||||
}
|
||||
base &= GRUB_PCI_ADDR_MEM_MASK;
|
||||
if (!base)
|
||||
{
|
||||
grub_dprintf ("ehci",
|
||||
"EHCI: EHCI is not mapped\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Set bus master - needed for coreboot, VMware, broken BIOSes etc. */
|
||||
addr = grub_pci_make_address (dev, GRUB_PCI_REG_COMMAND);
|
||||
grub_pci_write_word(addr,
|
||||
GRUB_PCI_COMMAND_MEM_ENABLED
|
||||
| GRUB_PCI_COMMAND_BUS_MASTER
|
||||
| grub_pci_read_word(addr));
|
||||
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: 32-bit EHCI OK\n");
|
||||
}
|
||||
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: iobase of EHCC: %08x\n",
|
||||
(base & GRUB_EHCI_ADDR_MEM_MASK));
|
||||
|
||||
regs = grub_pci_device_map_range (dev,
|
||||
(base & GRUB_EHCI_ADDR_MEM_MASK),
|
||||
0x100);
|
||||
|
||||
/* Is there EECP ? */
|
||||
eecp_offset = (grub_le_to_cpu32 (regs[2]) >> 8) & 0xff;
|
||||
|
||||
/* Determine and change ownership. */
|
||||
/* EECP offset valid in HCCPARAMS */
|
||||
/* Ownership can be changed via EECP only */
|
||||
if (pciid != GRUB_CS5536_PCIID && eecp_offset >= 0x40)
|
||||
{
|
||||
grub_pci_address_t pciaddr_eecp;
|
||||
pciaddr_eecp = grub_pci_make_address (dev, eecp_offset);
|
||||
|
||||
usblegsup = grub_pci_read (pciaddr_eecp);
|
||||
if (usblegsup & GRUB_EHCI_BIOS_OWNED)
|
||||
{
|
||||
grub_boot_time ("Taking ownership of EHCI controller");
|
||||
grub_dprintf ("ehci",
|
||||
"EHCI grub_ehci_pci_iter: EHCI owned by: BIOS\n");
|
||||
/* Ownership change - set OS_OWNED bit */
|
||||
grub_pci_write (pciaddr_eecp, usblegsup | GRUB_EHCI_OS_OWNED);
|
||||
/* Ensure PCI register is written */
|
||||
grub_pci_read (pciaddr_eecp);
|
||||
|
||||
/* Wait for finish of ownership change, EHCI specification
|
||||
* doesn't say how long it can take... */
|
||||
maxtime = grub_get_time_ms () + 1000;
|
||||
while ((grub_pci_read (pciaddr_eecp) & GRUB_EHCI_BIOS_OWNED)
|
||||
&& (grub_get_time_ms () < maxtime));
|
||||
if (grub_pci_read (pciaddr_eecp) & GRUB_EHCI_BIOS_OWNED)
|
||||
{
|
||||
grub_dprintf ("ehci",
|
||||
"EHCI grub_ehci_pci_iter: EHCI change ownership timeout");
|
||||
/* Change ownership in "hard way" - reset BIOS ownership */
|
||||
grub_pci_write (pciaddr_eecp, GRUB_EHCI_OS_OWNED);
|
||||
/* Ensure PCI register is written */
|
||||
grub_pci_read (pciaddr_eecp);
|
||||
}
|
||||
}
|
||||
else if (usblegsup & GRUB_EHCI_OS_OWNED)
|
||||
/* XXX: What to do in this case - nothing ? Can it happen ? */
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: EHCI owned by: OS\n");
|
||||
else
|
||||
{
|
||||
grub_dprintf ("ehci",
|
||||
"EHCI grub_ehci_pci_iter: EHCI owned by: NONE\n");
|
||||
/* XXX: What to do in this case ? Can it happen ?
|
||||
* Is code below correct ? */
|
||||
/* Ownership change - set OS_OWNED bit */
|
||||
grub_pci_write (pciaddr_eecp, GRUB_EHCI_OS_OWNED);
|
||||
/* Ensure PCI register is written */
|
||||
grub_pci_read (pciaddr_eecp);
|
||||
}
|
||||
|
||||
/* Disable SMI, just to be sure. */
|
||||
pciaddr_eecp = grub_pci_make_address (dev, eecp_offset + 4);
|
||||
grub_pci_write (pciaddr_eecp, 0);
|
||||
/* Ensure PCI register is written */
|
||||
grub_pci_read (pciaddr_eecp);
|
||||
}
|
||||
|
||||
grub_dprintf ("ehci", "inithw: EHCI grub_ehci_pci_iter: ownership OK\n");
|
||||
|
||||
grub_ehci_init_device (regs);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
grub_ehci_pci_scan (void)
|
||||
{
|
||||
grub_pci_iterate (grub_ehci_pci_iter, NULL);
|
||||
}
|
||||
@@ -22,13 +22,10 @@
|
||||
#include <grub/usb.h>
|
||||
#include <grub/usbtrans.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/pci.h>
|
||||
#include <grub/cpu/pci.h>
|
||||
#include <grub/cpu/io.h>
|
||||
#include <grub/time.h>
|
||||
#include <grub/loader.h>
|
||||
#include <grub/cs5536.h>
|
||||
#include <grub/disk.h>
|
||||
#include <grub/dma.h>
|
||||
#include <grub/cache.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
@@ -39,8 +36,6 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
||||
* - is not supporting interrupt transfers
|
||||
*/
|
||||
|
||||
#define GRUB_EHCI_PCI_SBRN_REG 0x60
|
||||
|
||||
/* Capability registers offsets */
|
||||
enum
|
||||
{
|
||||
@@ -54,7 +49,6 @@ enum
|
||||
#define GRUB_EHCI_EECP_MASK (0xff << 8)
|
||||
#define GRUB_EHCI_EECP_SHIFT 8
|
||||
|
||||
#define GRUB_EHCI_ADDR_MEM_MASK (~0xff)
|
||||
#define GRUB_EHCI_POINTER_MASK (~0x1f)
|
||||
|
||||
/* Capability register SPARAMS bits */
|
||||
@@ -85,13 +79,6 @@ enum
|
||||
|
||||
#define GRUB_EHCI_QH_EMPTY 1
|
||||
|
||||
/* USBLEGSUP bits and related OS OWNED byte offset */
|
||||
enum
|
||||
{
|
||||
GRUB_EHCI_BIOS_OWNED = (1 << 16),
|
||||
GRUB_EHCI_OS_OWNED = (1 << 24)
|
||||
};
|
||||
|
||||
/* Operational registers offsets */
|
||||
enum
|
||||
{
|
||||
@@ -455,9 +442,10 @@ grub_ehci_reset (struct grub_ehci *e)
|
||||
|
||||
sync_all_caches (e);
|
||||
|
||||
grub_dprintf ("ehci", "reset\n");
|
||||
|
||||
grub_ehci_oper_write32 (e, GRUB_EHCI_COMMAND,
|
||||
GRUB_EHCI_CMD_HC_RESET
|
||||
| grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND));
|
||||
GRUB_EHCI_CMD_HC_RESET);
|
||||
/* Ensure command is written */
|
||||
grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND);
|
||||
/* XXX: How long time could take reset of HC ? */
|
||||
@@ -473,116 +461,24 @@ grub_ehci_reset (struct grub_ehci *e)
|
||||
}
|
||||
|
||||
/* PCI iteration function... */
|
||||
static int
|
||||
grub_ehci_pci_iter (grub_pci_device_t dev, grub_pci_id_t pciid,
|
||||
void *data __attribute__ ((unused)))
|
||||
void
|
||||
grub_ehci_init_device (volatile void *regs)
|
||||
{
|
||||
grub_uint8_t release;
|
||||
grub_uint32_t class_code;
|
||||
grub_uint32_t interf;
|
||||
grub_uint32_t subclass;
|
||||
grub_uint32_t class;
|
||||
grub_uint32_t base, base_h;
|
||||
struct grub_ehci *e;
|
||||
grub_uint32_t eecp_offset;
|
||||
grub_uint32_t fp;
|
||||
int i;
|
||||
grub_uint32_t usblegsup = 0;
|
||||
grub_uint64_t maxtime;
|
||||
grub_uint32_t n_ports;
|
||||
grub_uint8_t caplen;
|
||||
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: begin\n");
|
||||
|
||||
if (pciid == GRUB_CS5536_PCIID)
|
||||
{
|
||||
grub_uint64_t basereg;
|
||||
|
||||
basereg = grub_cs5536_read_msr (dev, GRUB_CS5536_MSR_USB_EHCI_BASE);
|
||||
if (!(basereg & GRUB_CS5536_MSR_USB_BASE_MEMORY_ENABLE))
|
||||
{
|
||||
/* Shouldn't happen. */
|
||||
grub_dprintf ("ehci", "No EHCI address is assigned\n");
|
||||
return 0;
|
||||
}
|
||||
base = (basereg & GRUB_CS5536_MSR_USB_BASE_ADDR_MASK);
|
||||
basereg |= GRUB_CS5536_MSR_USB_BASE_BUS_MASTER;
|
||||
basereg &= ~GRUB_CS5536_MSR_USB_BASE_PME_ENABLED;
|
||||
basereg &= ~GRUB_CS5536_MSR_USB_BASE_PME_STATUS;
|
||||
basereg &= ~GRUB_CS5536_MSR_USB_BASE_SMI_ENABLE;
|
||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_USB_EHCI_BASE, basereg);
|
||||
}
|
||||
else
|
||||
{
|
||||
grub_pci_address_t addr;
|
||||
addr = grub_pci_make_address (dev, GRUB_PCI_REG_CLASS);
|
||||
class_code = grub_pci_read (addr) >> 8;
|
||||
interf = class_code & 0xFF;
|
||||
subclass = (class_code >> 8) & 0xFF;
|
||||
class = class_code >> 16;
|
||||
|
||||
/* If this is not an EHCI controller, just return. */
|
||||
if (class != 0x0c || subclass != 0x03 || interf != 0x20)
|
||||
return 0;
|
||||
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: class OK\n");
|
||||
|
||||
/* Check Serial Bus Release Number */
|
||||
addr = grub_pci_make_address (dev, GRUB_EHCI_PCI_SBRN_REG);
|
||||
release = grub_pci_read_byte (addr);
|
||||
if (release != 0x20)
|
||||
{
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: Wrong SBRN: %0x\n",
|
||||
release);
|
||||
return 0;
|
||||
}
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: bus rev. num. OK\n");
|
||||
|
||||
/* Determine EHCI EHCC registers base address. */
|
||||
addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG0);
|
||||
base = grub_pci_read (addr);
|
||||
addr = grub_pci_make_address (dev, GRUB_PCI_REG_ADDRESS_REG1);
|
||||
base_h = grub_pci_read (addr);
|
||||
/* Stop if registers are mapped above 4G - GRUB does not currently
|
||||
* work with registers mapped above 4G */
|
||||
if (((base & GRUB_PCI_ADDR_MEM_TYPE_MASK) != GRUB_PCI_ADDR_MEM_TYPE_32)
|
||||
&& (base_h != 0))
|
||||
{
|
||||
grub_dprintf ("ehci",
|
||||
"EHCI grub_ehci_pci_iter: registers above 4G are not supported\n");
|
||||
return 0;
|
||||
}
|
||||
base &= GRUB_PCI_ADDR_MEM_MASK;
|
||||
if (!base)
|
||||
{
|
||||
grub_dprintf ("ehci",
|
||||
"EHCI: EHCI is not mapped\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Set bus master - needed for coreboot, VMware, broken BIOSes etc. */
|
||||
addr = grub_pci_make_address (dev, GRUB_PCI_REG_COMMAND);
|
||||
grub_pci_write_word(addr,
|
||||
GRUB_PCI_COMMAND_MEM_ENABLED
|
||||
| GRUB_PCI_COMMAND_BUS_MASTER
|
||||
| grub_pci_read_word(addr));
|
||||
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: 32-bit EHCI OK\n");
|
||||
}
|
||||
|
||||
/* Allocate memory for the controller and fill basic values. */
|
||||
e = grub_zalloc (sizeof (*e));
|
||||
if (!e)
|
||||
return 1;
|
||||
return;
|
||||
e->framelist_chunk = NULL;
|
||||
e->td_chunk = NULL;
|
||||
e->qh_chunk = NULL;
|
||||
e->iobase_ehcc = grub_pci_device_map_range (dev,
|
||||
(base & GRUB_EHCI_ADDR_MEM_MASK),
|
||||
0x100);
|
||||
e->iobase_ehcc = regs;
|
||||
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: iobase of EHCC: %08x\n",
|
||||
(base & GRUB_EHCI_ADDR_MEM_MASK));
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: CAPLEN: %02x\n",
|
||||
grub_ehci_ehcc_read8 (e, GRUB_EHCI_EHCC_CAPLEN));
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: VERSION: %04x\n",
|
||||
@@ -598,7 +494,7 @@ grub_ehci_pci_iter (grub_pci_device_t dev, grub_pci_id_t pciid,
|
||||
if (caplen & (sizeof (grub_uint32_t) - 1))
|
||||
{
|
||||
grub_dprintf ("ehci", "Unaligned caplen\n");
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
e->iobase = ((volatile grub_uint32_t *) e->iobase_ehcc
|
||||
+ (caplen / sizeof (grub_uint32_t)));
|
||||
@@ -609,7 +505,7 @@ grub_ehci_pci_iter (grub_pci_device_t dev, grub_pci_id_t pciid,
|
||||
|
||||
grub_dprintf ("ehci",
|
||||
"EHCI grub_ehci_pci_iter: iobase of oper. regs: %08x\n",
|
||||
(base & GRUB_EHCI_ADDR_MEM_MASK) + caplen);
|
||||
(grub_addr_t) e->iobase_ehcc + caplen);
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: COMMAND: %08x\n",
|
||||
grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND));
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: STATUS: %08x\n",
|
||||
@@ -625,10 +521,6 @@ grub_ehci_pci_iter (grub_pci_device_t dev, grub_pci_id_t pciid,
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: CONFIG_FLAG: %08x\n",
|
||||
grub_ehci_oper_read32 (e, GRUB_EHCI_CONFIG_FLAG));
|
||||
|
||||
/* Is there EECP ? */
|
||||
eecp_offset = (grub_ehci_ehcc_read32 (e, GRUB_EHCI_EHCC_CPARAMS)
|
||||
& GRUB_EHCI_EECP_MASK) >> GRUB_EHCI_EECP_SHIFT;
|
||||
|
||||
/* Check format of data structures requested by EHCI */
|
||||
/* XXX: In fact it is not used at any place, it is prepared for future
|
||||
* This implementation uses 32-bits pointers only */
|
||||
@@ -732,65 +624,6 @@ grub_ehci_pci_iter (grub_pci_device_t dev, grub_pci_id_t pciid,
|
||||
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: QH/TD init. OK\n");
|
||||
|
||||
/* Determine and change ownership. */
|
||||
/* EECP offset valid in HCCPARAMS */
|
||||
/* Ownership can be changed via EECP only */
|
||||
if (pciid != GRUB_CS5536_PCIID && eecp_offset >= 0x40)
|
||||
{
|
||||
grub_pci_address_t pciaddr_eecp;
|
||||
pciaddr_eecp = grub_pci_make_address (dev, eecp_offset);
|
||||
|
||||
usblegsup = grub_pci_read (pciaddr_eecp);
|
||||
if (usblegsup & GRUB_EHCI_BIOS_OWNED)
|
||||
{
|
||||
grub_boot_time ("Taking ownership of EHCI controller");
|
||||
grub_dprintf ("ehci",
|
||||
"EHCI grub_ehci_pci_iter: EHCI owned by: BIOS\n");
|
||||
/* Ownership change - set OS_OWNED bit */
|
||||
grub_pci_write (pciaddr_eecp, usblegsup | GRUB_EHCI_OS_OWNED);
|
||||
/* Ensure PCI register is written */
|
||||
grub_pci_read (pciaddr_eecp);
|
||||
|
||||
/* Wait for finish of ownership change, EHCI specification
|
||||
* doesn't say how long it can take... */
|
||||
maxtime = grub_get_time_ms () + 1000;
|
||||
while ((grub_pci_read (pciaddr_eecp) & GRUB_EHCI_BIOS_OWNED)
|
||||
&& (grub_get_time_ms () < maxtime));
|
||||
if (grub_pci_read (pciaddr_eecp) & GRUB_EHCI_BIOS_OWNED)
|
||||
{
|
||||
grub_dprintf ("ehci",
|
||||
"EHCI grub_ehci_pci_iter: EHCI change ownership timeout");
|
||||
/* Change ownership in "hard way" - reset BIOS ownership */
|
||||
grub_pci_write (pciaddr_eecp, GRUB_EHCI_OS_OWNED);
|
||||
/* Ensure PCI register is written */
|
||||
grub_pci_read (pciaddr_eecp);
|
||||
}
|
||||
}
|
||||
else if (usblegsup & GRUB_EHCI_OS_OWNED)
|
||||
/* XXX: What to do in this case - nothing ? Can it happen ? */
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: EHCI owned by: OS\n");
|
||||
else
|
||||
{
|
||||
grub_dprintf ("ehci",
|
||||
"EHCI grub_ehci_pci_iter: EHCI owned by: NONE\n");
|
||||
/* XXX: What to do in this case ? Can it happen ?
|
||||
* Is code below correct ? */
|
||||
/* Ownership change - set OS_OWNED bit */
|
||||
grub_pci_write (pciaddr_eecp, GRUB_EHCI_OS_OWNED);
|
||||
/* Ensure PCI register is written */
|
||||
grub_pci_read (pciaddr_eecp);
|
||||
}
|
||||
|
||||
/* Disable SMI, just to be sure. */
|
||||
pciaddr_eecp = grub_pci_make_address (dev, eecp_offset + 4);
|
||||
grub_pci_write (pciaddr_eecp, 0);
|
||||
/* Ensure PCI register is written */
|
||||
grub_pci_read (pciaddr_eecp);
|
||||
|
||||
}
|
||||
|
||||
grub_dprintf ("ehci", "inithw: EHCI grub_ehci_pci_iter: ownership OK\n");
|
||||
|
||||
/* Now we can setup EHCI (maybe...) */
|
||||
|
||||
/* Check if EHCI is halted and halt it if not */
|
||||
@@ -864,7 +697,7 @@ grub_ehci_pci_iter (grub_pci_device_t dev, grub_pci_id_t pciid,
|
||||
|
||||
grub_dprintf ("ehci",
|
||||
"EHCI grub_ehci_pci_iter: iobase of oper. regs: %08x\n",
|
||||
(base & GRUB_EHCI_ADDR_MEM_MASK));
|
||||
(grub_addr_t) regs);
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: COMMAND: %08x\n",
|
||||
grub_ehci_oper_read32 (e, GRUB_EHCI_COMMAND));
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: STATUS: %08x\n",
|
||||
@@ -880,7 +713,7 @@ grub_ehci_pci_iter (grub_pci_device_t dev, grub_pci_id_t pciid,
|
||||
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: CONFIG_FLAG: %08x\n",
|
||||
grub_ehci_oper_read32 (e, GRUB_EHCI_CONFIG_FLAG));
|
||||
|
||||
return 0;
|
||||
return;
|
||||
|
||||
fail:
|
||||
if (e)
|
||||
@@ -894,7 +727,7 @@ fail:
|
||||
}
|
||||
grub_free (e);
|
||||
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -1891,12 +1724,6 @@ grub_ehci_detect_dev (grub_usb_controller_t dev, int port, int *changed)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
grub_ehci_inithw (void)
|
||||
{
|
||||
grub_pci_iterate (grub_ehci_pci_iter, NULL);
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_ehci_restore_hw (void)
|
||||
{
|
||||
@@ -1997,7 +1824,7 @@ GRUB_MOD_INIT (ehci)
|
||||
grub_stop_disk_firmware ();
|
||||
|
||||
grub_boot_time ("Initing EHCI hardware");
|
||||
grub_ehci_inithw ();
|
||||
grub_ehci_pci_scan ();
|
||||
grub_boot_time ("Registering EHCI driver");
|
||||
grub_usb_controller_dev_register (&usb_controller);
|
||||
grub_boot_time ("EHCI driver registered");
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <grub/dl.h>
|
||||
#include <grub/pci.h>
|
||||
#include <grub/dma.h>
|
||||
#include <grub/mm.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/usb.h>
|
||||
|
||||
@@ -761,10 +761,10 @@ grub_cmd_acpi (struct grub_extcmd_context *ctxt, int argc, char **args)
|
||||
struct grub_efi_guid acpi = GRUB_EFI_ACPI_TABLE_GUID;
|
||||
struct grub_efi_guid acpi20 = GRUB_EFI_ACPI_20_TABLE_GUID;
|
||||
|
||||
grub_efi_system_table->boot_services->install_configuration_table
|
||||
(&acpi20, grub_acpi_get_rsdpv2 ());
|
||||
grub_efi_system_table->boot_services->install_configuration_table
|
||||
(&acpi, grub_acpi_get_rsdpv1 ());
|
||||
efi_call_2 (grub_efi_system_table->boot_services->install_configuration_table,
|
||||
&acpi20, grub_acpi_get_rsdpv2 ());
|
||||
efi_call_2 (grub_efi_system_table->boot_services->install_configuration_table,
|
||||
&acpi, grub_acpi_get_rsdpv1 ());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -328,6 +328,7 @@ grub_cmd_hdparm (grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
ata = ((struct grub_scsi *) disk->data)->data;
|
||||
break;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
grub_disk_close (disk);
|
||||
return grub_error (GRUB_ERR_IO, "not an ATA device");
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <grub/misc.h>
|
||||
#include <grub/command.h>
|
||||
#include <grub/i18n.h>
|
||||
#include <grub/i386/coreboot/lbio.h>
|
||||
#include <grub/coreboot/lbio.h>
|
||||
#include <grub/i386/tsc.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <grub/misc.h>
|
||||
#include <grub/command.h>
|
||||
#include <grub/i18n.h>
|
||||
#include <grub/i386/coreboot/lbio.h>
|
||||
#include <grub/coreboot/lbio.h>
|
||||
#include <grub/i386/tsc.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
@@ -517,7 +517,7 @@ grub_cmd_legacy_initrd (struct grub_command *mycmd __attribute__ ((unused)),
|
||||
#endif
|
||||
);
|
||||
|
||||
return cmd->func (cmd, argc, args);
|
||||
return cmd->func (cmd, argc ? 1 : 0, args);
|
||||
}
|
||||
if (kernel_type == MULTIBOOT)
|
||||
{
|
||||
|
||||
@@ -79,6 +79,7 @@ get_uuid (const char *name, char **uuid, int getnative)
|
||||
case GRUB_DISK_DEVICE_XEN:
|
||||
if (getnative)
|
||||
break;
|
||||
/* FALLTHROUGH */
|
||||
|
||||
/* Virtual disks. */
|
||||
/* GRUB dynamically generated files. */
|
||||
|
||||
@@ -282,6 +282,7 @@ grub_cryptodisk_endecrypt (struct grub_cryptodisk *dev,
|
||||
break;
|
||||
case GRUB_CRYPTODISK_MODE_IV_PLAIN64:
|
||||
iv[1] = grub_cpu_to_le32 (sector >> 32);
|
||||
/* FALLTHROUGH */
|
||||
case GRUB_CRYPTODISK_MODE_IV_PLAIN:
|
||||
iv[0] = grub_cpu_to_le32 (sector & 0xFFFFFFFF);
|
||||
break;
|
||||
|
||||
@@ -80,6 +80,15 @@ make_devices (void)
|
||||
/* This should not happen... Why? */
|
||||
continue;
|
||||
|
||||
/* iPXE adds stub Block IO protocol to loaded image device handle. It is
|
||||
completely non-functional and simply returns an error for every method.
|
||||
So attempt to detect and skip it. Magic number is literal "iPXE" and
|
||||
check block size as well */
|
||||
/* FIXME: shoud we close it? We do not do it elsewhere */
|
||||
if (bio->media && bio->media->media_id == 0x69505845U &&
|
||||
bio->media->block_size == 1)
|
||||
continue;
|
||||
|
||||
d = grub_malloc (sizeof (*d));
|
||||
if (! d)
|
||||
{
|
||||
@@ -215,7 +224,7 @@ name_devices (struct grub_efidisk_data *devices)
|
||||
{
|
||||
case GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE:
|
||||
is_hard_drive = 1;
|
||||
/* Fall through by intention. */
|
||||
/* Intentionally fall through. */
|
||||
case GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE:
|
||||
{
|
||||
struct grub_efidisk_data *parent, *parent2;
|
||||
|
||||
@@ -417,6 +417,7 @@ fill_hook (grub_uint64_t addr, grub_uint64_t size, grub_memory_type_t type,
|
||||
default:
|
||||
grub_dprintf ("efiemu",
|
||||
"Unknown memory type %d. Assuming unusable\n", type);
|
||||
/* FALLTHROUGH */
|
||||
case GRUB_MEMORY_RESERVED:
|
||||
return grub_efiemu_add_to_mmap (addr, size,
|
||||
GRUB_EFI_UNUSABLE_MEMORY);
|
||||
|
||||
@@ -227,11 +227,11 @@ grub_btrfs_read_logical (struct grub_btrfs_data *data,
|
||||
static grub_err_t
|
||||
read_sblock (grub_disk_t disk, struct grub_btrfs_superblock *sb)
|
||||
{
|
||||
struct grub_btrfs_superblock sblock;
|
||||
unsigned i;
|
||||
grub_err_t err = GRUB_ERR_NONE;
|
||||
for (i = 0; i < ARRAY_SIZE (superblock_sectors); i++)
|
||||
{
|
||||
struct grub_btrfs_superblock sblock;
|
||||
/* Don't try additional superblocks beyond device size. */
|
||||
if (i && (grub_le_to_cpu64 (sblock.this_device.size)
|
||||
>> GRUB_DISK_SECTOR_BITS) <= superblock_sectors[i])
|
||||
|
||||
@@ -823,7 +823,12 @@ direct_read (struct grub_squash_data *data,
|
||||
curread = data->blksz - boff;
|
||||
if (curread > len)
|
||||
curread = len;
|
||||
if (!(ino->block_sizes[i]
|
||||
if (!ino->block_sizes[i])
|
||||
{
|
||||
/* Sparse block */
|
||||
grub_memset (buf, '\0', curread);
|
||||
}
|
||||
else if (!(ino->block_sizes[i]
|
||||
& grub_cpu_to_le32_compile_time (SQUASH_BLOCK_UNCOMPRESSED)))
|
||||
{
|
||||
char *block;
|
||||
@@ -873,36 +878,57 @@ direct_read (struct grub_squash_data *data,
|
||||
|
||||
|
||||
static grub_ssize_t
|
||||
grub_squash_read_data (struct grub_squash_data *data,
|
||||
struct grub_squash_cache_inode *ino,
|
||||
grub_off_t off, char *buf, grub_size_t len)
|
||||
grub_squash_read (grub_file_t file, char *buf, grub_size_t len)
|
||||
{
|
||||
struct grub_squash_data *data = file->data;
|
||||
struct grub_squash_cache_inode *ino = &data->ino;
|
||||
grub_off_t off = file->offset;
|
||||
grub_err_t err;
|
||||
grub_uint64_t a = 0, b;
|
||||
grub_uint64_t a, b;
|
||||
grub_uint32_t fragment = 0;
|
||||
int compressed = 0;
|
||||
struct grub_squash_frag_desc frag;
|
||||
grub_off_t direct_len;
|
||||
grub_uint64_t mask = grub_le_to_cpu32 (data->sb.block_size) - 1;
|
||||
grub_size_t orig_len = len;
|
||||
|
||||
switch (ino->ino.type)
|
||||
{
|
||||
case grub_cpu_to_le16_compile_time (SQUASH_TYPE_LONG_REGULAR):
|
||||
a = grub_le_to_cpu64 (ino->ino.long_file.chunk);
|
||||
fragment = grub_le_to_cpu32 (ino->ino.long_file.fragment);
|
||||
break;
|
||||
case grub_cpu_to_le16_compile_time (SQUASH_TYPE_REGULAR):
|
||||
a = grub_le_to_cpu32 (ino->ino.file.chunk);
|
||||
fragment = grub_le_to_cpu32 (ino->ino.file.fragment);
|
||||
break;
|
||||
}
|
||||
|
||||
if (fragment == 0xffffffff)
|
||||
return direct_read (data, ino, off, buf, len);
|
||||
/* Squash may pack file tail as fragment. So read initial part directly and
|
||||
get tail from fragments */
|
||||
direct_len = fragment == 0xffffffff ? file->size : file->size & ~mask;
|
||||
if (off < direct_len)
|
||||
{
|
||||
grub_size_t read_len = direct_len - off;
|
||||
grub_ssize_t res;
|
||||
|
||||
if (read_len > len)
|
||||
read_len = len;
|
||||
res = direct_read (data, ino, off, buf, read_len);
|
||||
if ((grub_size_t) res != read_len)
|
||||
return -1; /* FIXME: is short read possible here? */
|
||||
len -= read_len;
|
||||
if (!len)
|
||||
return read_len;
|
||||
buf += read_len;
|
||||
off = 0;
|
||||
}
|
||||
else
|
||||
off -= direct_len;
|
||||
|
||||
err = read_chunk (data, &frag, sizeof (frag),
|
||||
data->fragments, sizeof (frag) * fragment);
|
||||
if (err)
|
||||
return -1;
|
||||
a += grub_le_to_cpu64 (frag.offset);
|
||||
a = grub_le_to_cpu64 (frag.offset);
|
||||
compressed = !(frag.size & grub_cpu_to_le32_compile_time (SQUASH_BLOCK_UNCOMPRESSED));
|
||||
if (ino->ino.type == grub_cpu_to_le16_compile_time (SQUASH_TYPE_LONG_REGULAR))
|
||||
b = grub_le_to_cpu32 (ino->ino.long_file.offset) + off;
|
||||
@@ -943,16 +969,7 @@ grub_squash_read_data (struct grub_squash_data *data,
|
||||
if (err)
|
||||
return -1;
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
static grub_ssize_t
|
||||
grub_squash_read (grub_file_t file, char *buf, grub_size_t len)
|
||||
{
|
||||
struct grub_squash_data *data = file->data;
|
||||
|
||||
return grub_squash_read_data (data, &data->ino,
|
||||
file->offset, buf, len);
|
||||
return orig_len;
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
|
||||
@@ -336,6 +336,7 @@ grub_gdb_trap (int trap_no)
|
||||
/* sAA..AA: Step one instruction from AA..AA(optional). */
|
||||
case 's':
|
||||
stepping = 1;
|
||||
/* FALLTHROUGH */
|
||||
|
||||
/* cAA..AA: Continue at address AA..AA(optional). */
|
||||
case 'c':
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#! /bin/sh
|
||||
#! @BUILD_SHEBANG@
|
||||
set -e
|
||||
|
||||
# Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#! /bin/sh
|
||||
#! @BUILD_SHEBANG@
|
||||
set -e
|
||||
|
||||
# Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
|
||||
14
grub-core/gnulib-fix-gcc7-fallthrough.diff
Normal file
14
grub-core/gnulib-fix-gcc7-fallthrough.diff
Normal file
@@ -0,0 +1,14 @@
|
||||
diff --git grub-core/gnulib/regexec.c grub-core/gnulib/regexec.c
|
||||
index f632cd4..a7776f0 100644
|
||||
--- grub-core/gnulib/regexec.c
|
||||
+++ grub-core/gnulib/regexec.c
|
||||
@@ -4099,6 +4099,9 @@ check_node_accept (const re_match_context_t *mctx, const re_token_t *node,
|
||||
case OP_UTF8_PERIOD:
|
||||
if (ch >= ASCII_CHARS)
|
||||
return false;
|
||||
+#if defined __GNUC__ && __GNUC__ >= 7
|
||||
+ __attribute__ ((fallthrough));
|
||||
+#endif
|
||||
/* FALLTHROUGH */
|
||||
#endif
|
||||
case OP_PERIOD:
|
||||
@@ -4099,6 +4099,9 @@ check_node_accept (const re_match_context_t *mctx, const re_token_t *node,
|
||||
case OP_UTF8_PERIOD:
|
||||
if (ch >= ASCII_CHARS)
|
||||
return false;
|
||||
#if defined __GNUC__ && __GNUC__ >= 7
|
||||
__attribute__ ((fallthrough));
|
||||
#endif
|
||||
/* FALLTHROUGH */
|
||||
#endif
|
||||
case OP_PERIOD:
|
||||
|
||||
@@ -29,6 +29,8 @@ void grub_arm_clean_dcache_range_armv6 (grub_addr_t start, grub_addr_t end,
|
||||
grub_addr_t dlinesz);
|
||||
void grub_arm_clean_dcache_range_armv7 (grub_addr_t start, grub_addr_t end,
|
||||
grub_addr_t dlinesz);
|
||||
void grub_arm_clean_dcache_range_poc_armv7 (grub_addr_t start, grub_addr_t end,
|
||||
grub_addr_t dlinesz);
|
||||
void grub_arm_invalidate_icache_range_armv6 (grub_addr_t start, grub_addr_t end,
|
||||
grub_addr_t dlinesz);
|
||||
void grub_arm_invalidate_icache_range_armv7 (grub_addr_t start, grub_addr_t end,
|
||||
@@ -252,6 +254,38 @@ grub_arch_sync_caches (void *address, grub_size_t len)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
grub_arch_sync_dma_caches (volatile void *address, grub_size_t len)
|
||||
{
|
||||
grub_addr_t start = (grub_addr_t) address;
|
||||
grub_addr_t end = start + len;
|
||||
|
||||
if (type == ARCH_UNKNOWN)
|
||||
probe_caches ();
|
||||
start = ALIGN_DOWN (start, grub_arch_cache_max_linesz);
|
||||
end = ALIGN_UP (end, grub_arch_cache_max_linesz);
|
||||
switch (type)
|
||||
{
|
||||
case ARCH_ARMV6:
|
||||
grub_arm_clean_dcache_range_armv6 (start, end, grub_arch_cache_dlinesz);
|
||||
grub_arm_invalidate_icache_range_armv6 (start, end,
|
||||
grub_arch_cache_ilinesz);
|
||||
break;
|
||||
case ARCH_ARMV5_WRITE_THROUGH:
|
||||
case ARCH_ARMV6_UNIFIED:
|
||||
grub_arm_clean_dcache_range_armv6 (start, end, grub_arch_cache_dlinesz);
|
||||
break;
|
||||
case ARCH_ARMV7:
|
||||
grub_arm_clean_dcache_range_poc_armv7 (start, end, grub_arch_cache_dlinesz);
|
||||
grub_arm_invalidate_icache_range_armv7 (start, end,
|
||||
grub_arch_cache_ilinesz);
|
||||
break;
|
||||
/* Pacify GCC. */
|
||||
case ARCH_UNKNOWN:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
grub_arm_disable_caches_mmu (void)
|
||||
{
|
||||
|
||||
@@ -33,6 +33,18 @@
|
||||
# define ISB isb
|
||||
#define ARMV7 1
|
||||
|
||||
FUNCTION(grub_arm_clean_dcache_range_poc_armv7)
|
||||
DSB
|
||||
@ Clean data cache for range to point-of-coherence
|
||||
1: cmp r0, r1
|
||||
bge 2f
|
||||
mcr p15, 0, r0, c7, c14, 1 @ DCCMVAC
|
||||
add r0, r0, r2 @ Next line
|
||||
b 1b
|
||||
2: DSB
|
||||
bx lr
|
||||
|
||||
|
||||
@ r0 - CLIDR
|
||||
@ r1 - LoC
|
||||
@ r2 - current level
|
||||
|
||||
40
grub-core/kern/arm/coreboot/cbtable.c
Normal file
40
grub-core/kern/arm/coreboot/cbtable.c
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2007,2008,2013 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/coreboot/lbio.h>
|
||||
#include <grub/types.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/dl.h>
|
||||
#include <grub/arm/startup.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wcast-align"
|
||||
|
||||
grub_linuxbios_table_header_t
|
||||
grub_linuxbios_get_tables (void)
|
||||
{
|
||||
grub_linuxbios_table_header_t table_header
|
||||
= (grub_linuxbios_table_header_t) grub_arm_saved_registers.r[0];
|
||||
|
||||
if (!grub_linuxbios_check_signature (table_header))
|
||||
return 0;
|
||||
|
||||
return table_header;
|
||||
}
|
||||
44
grub-core/kern/arm/coreboot/coreboot.S
Normal file
44
grub-core/kern/arm/coreboot/coreboot.S
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2016 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/symbol.h>
|
||||
|
||||
.file "coreboot.S"
|
||||
.text
|
||||
.syntax unified
|
||||
#if !defined (__thumb2__)
|
||||
.arch armv7a
|
||||
.arm
|
||||
#else
|
||||
.arch armv7
|
||||
.thumb
|
||||
#endif
|
||||
|
||||
FUNCTION(grub_arm_pfr1)
|
||||
mrc p15, 0, r0, c0, c1, 1
|
||||
bx lr
|
||||
|
||||
FUNCTION(grub_armv7_get_timer_value)
|
||||
isb
|
||||
mrrc p15, 1, r0, r1, c14
|
||||
bx lr
|
||||
|
||||
FUNCTION(grub_armv7_get_timer_frequency)
|
||||
mrc p15, 0, r0, c14, c0, 0
|
||||
bx lr
|
||||
|
||||
59
grub-core/kern/arm/coreboot/dma.c
Normal file
59
grub-core/kern/arm/coreboot/dma.c
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2007,2009 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/dl.h>
|
||||
#include <grub/dma.h>
|
||||
#include <grub/mm.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/mm_private.h>
|
||||
#include <grub/cache.h>
|
||||
|
||||
struct grub_pci_dma_chunk *
|
||||
grub_memalign_dma32 (grub_size_t align, grub_size_t size)
|
||||
{
|
||||
void *ret;
|
||||
if (align < 64)
|
||||
align = 64;
|
||||
size = ALIGN_UP (size, align);
|
||||
ret = grub_memalign (align, size);
|
||||
if (!ret)
|
||||
return 0;
|
||||
grub_arch_sync_dma_caches (ret, size);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
grub_dma_free (struct grub_pci_dma_chunk *ch)
|
||||
{
|
||||
grub_size_t size = (((struct grub_mm_header *) ch) - 1)->size * GRUB_MM_ALIGN;
|
||||
grub_arch_sync_dma_caches (ch, size);
|
||||
grub_free (ch);
|
||||
}
|
||||
|
||||
volatile void *
|
||||
grub_dma_get_virt (struct grub_pci_dma_chunk *ch)
|
||||
{
|
||||
return (void *) ch;
|
||||
}
|
||||
|
||||
grub_uint32_t
|
||||
grub_dma_get_phys (struct grub_pci_dma_chunk *ch)
|
||||
{
|
||||
return (grub_uint32_t) (grub_addr_t) ch;
|
||||
}
|
||||
|
||||
169
grub-core/kern/arm/coreboot/init.c
Normal file
169
grub-core/kern/arm/coreboot/init.c
Normal file
@@ -0,0 +1,169 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2013 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/kernel.h>
|
||||
#include <grub/mm.h>
|
||||
#include <grub/memory.h>
|
||||
#include <grub/machine/console.h>
|
||||
#include <grub/machine/kernel.h>
|
||||
#include <grub/offsets.h>
|
||||
#include <grub/types.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/dl.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/loader.h>
|
||||
#include <grub/env.h>
|
||||
#include <grub/cache.h>
|
||||
#include <grub/time.h>
|
||||
#include <grub/symbol.h>
|
||||
#include <grub/video.h>
|
||||
#include <grub/coreboot/lbio.h>
|
||||
#include <grub/fdtbus.h>
|
||||
|
||||
extern grub_uint8_t _start[];
|
||||
extern grub_uint8_t _end[];
|
||||
extern grub_uint8_t _edata[];
|
||||
grub_addr_t start_of_ram = ~(grub_addr_t)0;
|
||||
|
||||
void __attribute__ ((noreturn))
|
||||
grub_exit (void)
|
||||
{
|
||||
/* We can't use grub_fatal() in this function. This would create an infinite
|
||||
loop, since grub_fatal() calls grub_abort() which in turn calls grub_exit(). */
|
||||
while (1)
|
||||
grub_cpu_idle ();
|
||||
}
|
||||
|
||||
static grub_uint64_t modend;
|
||||
static int have_memory = 0;
|
||||
|
||||
/* Helper for grub_machine_init. */
|
||||
static int
|
||||
heap_init (grub_uint64_t addr, grub_uint64_t size, grub_memory_type_t type,
|
||||
void *data __attribute__ ((unused)))
|
||||
{
|
||||
grub_uint64_t begin = addr, end = addr + size;
|
||||
|
||||
#if GRUB_CPU_SIZEOF_VOID_P == 4
|
||||
/* Restrict ourselves to 32-bit memory space. */
|
||||
if (begin > GRUB_ULONG_MAX)
|
||||
return 0;
|
||||
if (end > GRUB_ULONG_MAX)
|
||||
end = GRUB_ULONG_MAX;
|
||||
#endif
|
||||
|
||||
if (start_of_ram > begin)
|
||||
start_of_ram = begin;
|
||||
|
||||
if (type != GRUB_MEMORY_AVAILABLE)
|
||||
return 0;
|
||||
|
||||
if (modend && begin < modend)
|
||||
{
|
||||
if (begin < (grub_addr_t)_start)
|
||||
{
|
||||
grub_mm_init_region ((void *) (grub_addr_t) begin, (grub_size_t) ((grub_addr_t)_start - begin));
|
||||
have_memory = 1;
|
||||
}
|
||||
begin = modend;
|
||||
}
|
||||
|
||||
/* Avoid DMA problems. */
|
||||
if (end >= 0xfe000000)
|
||||
end = 0xfe000000;
|
||||
|
||||
if (end <= begin)
|
||||
return 0;
|
||||
|
||||
grub_mm_init_region ((void *) (grub_addr_t) begin, (grub_size_t) (end - begin));
|
||||
|
||||
have_memory = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const void *dtb;
|
||||
static grub_size_t dtb_size;
|
||||
|
||||
static int
|
||||
iterate_linuxbios_table (grub_linuxbios_table_item_t table_item, void *data __attribute__ ((unused)))
|
||||
{
|
||||
if (table_item->tag != GRUB_LINUXBIOS_MEMBER_DTB)
|
||||
return 0;
|
||||
|
||||
if (grub_fdt_check_header (table_item + 1, table_item->size) >= 0)
|
||||
{
|
||||
dtb = table_item + 1;
|
||||
dtb_size = table_item->size;
|
||||
}
|
||||
else
|
||||
grub_printf ("Invalid DTB supplied by coreboot\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
grub_machine_init (void)
|
||||
{
|
||||
struct grub_module_header *header;
|
||||
|
||||
modend = grub_modules_get_end ();
|
||||
|
||||
grub_video_coreboot_fb_early_init ();
|
||||
|
||||
grub_machine_mmap_iterate (heap_init, NULL);
|
||||
if (!have_memory)
|
||||
grub_fatal ("No memory found");
|
||||
|
||||
grub_video_coreboot_fb_late_init ();
|
||||
|
||||
grub_font_init ();
|
||||
grub_gfxterm_init ();
|
||||
|
||||
FOR_MODULES (header)
|
||||
if (header->type == OBJ_TYPE_DTB)
|
||||
{
|
||||
char *dtb_orig_addr, *dtb_copy;
|
||||
dtb_orig_addr = (char *) header + sizeof (struct grub_module_header);
|
||||
|
||||
dtb_size = header->size - sizeof (struct grub_module_header);
|
||||
dtb = dtb_copy = grub_malloc (dtb_size);
|
||||
grub_memmove (dtb_copy, dtb_orig_addr, dtb_size);
|
||||
break;
|
||||
}
|
||||
if (!dtb)
|
||||
grub_linuxbios_table_iterate (iterate_linuxbios_table, 0);
|
||||
if (!dtb)
|
||||
grub_fatal ("No DTB found");
|
||||
grub_fdtbus_init (dtb, dtb_size);
|
||||
|
||||
grub_machine_timer_init ();
|
||||
grub_cros_init ();
|
||||
grub_pl050_init ();
|
||||
}
|
||||
|
||||
void
|
||||
grub_machine_get_bootlocation (char **device __attribute__ ((unused)),
|
||||
char **path __attribute__ ((unused)))
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
grub_machine_fini (int flags __attribute__ ((unused)))
|
||||
{
|
||||
}
|
||||
101
grub-core/kern/arm/coreboot/timer.c
Normal file
101
grub-core/kern/arm/coreboot/timer.c
Normal file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2016 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/mm.h>
|
||||
#include <grub/machine/kernel.h>
|
||||
#include <grub/types.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/time.h>
|
||||
#include <grub/fdtbus.h>
|
||||
#include <grub/misc.h>
|
||||
|
||||
grub_uint64_t
|
||||
grub_armv7_get_timer_value(void);
|
||||
|
||||
grub_uint32_t
|
||||
grub_armv7_get_timer_frequency(void);
|
||||
|
||||
grub_uint32_t
|
||||
grub_arm_pfr1(void);
|
||||
|
||||
static int have_timer = 0;
|
||||
static volatile grub_uint32_t *sp804_regs;
|
||||
|
||||
static grub_uint64_t
|
||||
sp804_get_time_ms (void)
|
||||
{
|
||||
static grub_uint32_t high, last_low;
|
||||
grub_uint32_t low = ~sp804_regs[1];
|
||||
if (last_low > low)
|
||||
high++;
|
||||
last_low = low;
|
||||
return grub_divmod64 ((((grub_uint64_t) high) << 32) | low,
|
||||
1000, 0);
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
sp804_attach(const struct grub_fdtbus_dev *dev)
|
||||
{
|
||||
if (have_timer)
|
||||
return GRUB_ERR_NONE;
|
||||
sp804_regs = grub_fdtbus_map_reg (dev, 0, 0);
|
||||
if (!grub_fdtbus_is_mapping_valid (sp804_regs))
|
||||
return grub_error (GRUB_ERR_IO, "could not map sp804: %p", sp804_regs);
|
||||
grub_install_get_time_ms (sp804_get_time_ms);
|
||||
have_timer = 1;
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
struct grub_fdtbus_driver sp804 =
|
||||
{
|
||||
.compatible = "arm,sp804",
|
||||
.attach = sp804_attach
|
||||
};
|
||||
|
||||
static grub_uint32_t timer_frequency_in_khz;
|
||||
|
||||
static grub_uint64_t
|
||||
generic_get_time_ms (void)
|
||||
{
|
||||
return grub_divmod64 (grub_armv7_get_timer_value(), timer_frequency_in_khz, 0);
|
||||
}
|
||||
|
||||
static int
|
||||
try_generic_timer (void)
|
||||
{
|
||||
if (((grub_arm_pfr1 () >> 16) & 0xf) != 1)
|
||||
return 0;
|
||||
grub_printf ("freq = %x\n", grub_armv7_get_timer_frequency());
|
||||
timer_frequency_in_khz = 0x016e3600 / 1000; //grub_armv7_get_timer_frequency() / 1000;
|
||||
if (timer_frequency_in_khz == 0)
|
||||
return 0;
|
||||
grub_install_get_time_ms (generic_get_time_ms);
|
||||
have_timer = 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
grub_machine_timer_init (void)
|
||||
{
|
||||
grub_fdtbus_register (&sp804);
|
||||
|
||||
if (!have_timer)
|
||||
try_generic_timer ();
|
||||
if (!have_timer)
|
||||
grub_fatal ("No timer found");
|
||||
}
|
||||
@@ -24,6 +24,7 @@
|
||||
* GRUB is called from U-Boot as a Linux Kernel type image, which
|
||||
* means among other things that it always enters in ARM state.
|
||||
*
|
||||
* coreboot starts in ARM mode as well.
|
||||
*
|
||||
* Overview of GRUB image layout:
|
||||
*
|
||||
@@ -86,7 +87,7 @@ FUNCTION(codestart)
|
||||
@ Stack pointer used as start address for signature probing
|
||||
mov r12, sp
|
||||
adr sp, entry_state
|
||||
push {r1-r12,lr} @ store U-Boot context (sp in r12)
|
||||
push {r0-r12,lr} @ store U-Boot context (sp in r12)
|
||||
|
||||
adr r1, _start
|
||||
ldr r0, bss_start_ptr @ src
|
||||
@@ -127,6 +128,8 @@ reloc_done:
|
||||
|
||||
str r1, EXT_C(grub_modbase)
|
||||
|
||||
/* Coreboot already places modules at right place. */
|
||||
#ifndef GRUB_MACHINE_COREBOOT
|
||||
add r1, r1, r2
|
||||
add r0, r0, r2
|
||||
sub r1, r1, #4
|
||||
@@ -136,6 +139,7 @@ reloc_done:
|
||||
str r3, [r1], #-4 @ *dst-- = r3
|
||||
subs r2, #4 @ remaining -= 4
|
||||
bne 1b @ while remaining != 0
|
||||
#endif
|
||||
|
||||
@ Since we _are_ the C run-time, we need to manually zero the BSS
|
||||
@ region before continuing
|
||||
@@ -153,69 +157,21 @@ reloc_done:
|
||||
|
||||
b EXT_C(grub_main)
|
||||
|
||||
/*
|
||||
* uboot_syscall():
|
||||
* This function is effectively a veneer, so it cannot
|
||||
* modify the stack or corrupt any registers other than
|
||||
* r12 (ip). Furthermore it needs to restore r8 for
|
||||
* U-Boot (Global Data Pointer) and preserve it for Grub.
|
||||
*/
|
||||
FUNCTION(grub_uboot_syscall)
|
||||
str r8, transition_space
|
||||
str lr, transition_space + 4
|
||||
str r9, transition_space + 8
|
||||
|
||||
ldr r8, gd_backup
|
||||
ldr r9, gd_backup + 4
|
||||
|
||||
bl do_syscall
|
||||
|
||||
ldr r8, transition_space
|
||||
ldr lr, transition_space + 4
|
||||
ldr r9, transition_space + 8
|
||||
|
||||
bx lr
|
||||
do_syscall:
|
||||
|
||||
ldr ip, grub_uboot_syscall_ptr
|
||||
bx ip
|
||||
|
||||
FUNCTION(grub_uboot_return)
|
||||
adr sp, entry_state_end
|
||||
pop {r4-r12, lr}
|
||||
mov sp, r12
|
||||
bx lr
|
||||
|
||||
|
||||
.align 3
|
||||
@ U-boot context stack space
|
||||
entry_state_end:
|
||||
VARIABLE(grub_uboot_machine_type)
|
||||
@ U-boot/coreboot context stack space
|
||||
VARIABLE(grub_arm_saved_registers)
|
||||
.long 0 @ r0
|
||||
.long 0 @ r1
|
||||
VARIABLE(grub_uboot_boot_data)
|
||||
.long 0 @ r2
|
||||
.long 0 @ r3
|
||||
.long 0 @ r4
|
||||
.long 0 @ r5
|
||||
.long 0 @ r6
|
||||
.long 0 @ r7
|
||||
gd_backup:
|
||||
.long 0 @ r8 - U-Boot global data pointer up to 2013-09-21
|
||||
.long 0 @ r9 - U-Boot global data pointer 2013-09-21 onwards
|
||||
.long 0 @ r8
|
||||
.long 0 @ r9
|
||||
.long 0 @ r10
|
||||
.long 0 @ r11
|
||||
VARIABLE(grub_uboot_search_hint)@ U-Boot stack pointer -
|
||||
.long 0 @ also API signature address hint.
|
||||
.long 0 @ sp
|
||||
.long 0 @ lr
|
||||
entry_state: @ backup for U-Boot context
|
||||
|
||||
@ GRUB context stack space
|
||||
transition_space:
|
||||
.long 0 @ r8
|
||||
.long 0 @ lr
|
||||
.long 0 @ r9
|
||||
|
||||
VARIABLE(grub_uboot_syscall_ptr)
|
||||
.long 0 @
|
||||
|
||||
END
|
||||
entry_state:
|
||||
70
grub-core/kern/arm/uboot/init.c
Normal file
70
grub-core/kern/arm/uboot/init.c
Normal file
@@ -0,0 +1,70 @@
|
||||
/* init.c - generic U-Boot initialization and finalization */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2016 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/uboot/uboot.h>
|
||||
#include <grub/arm/startup.h>
|
||||
#include <grub/uboot/api_public.h>
|
||||
|
||||
extern int (*grub_uboot_syscall_ptr) (int, int *, ...);
|
||||
|
||||
grub_uint32_t
|
||||
grub_uboot_get_machine_type (void)
|
||||
{
|
||||
return grub_arm_saved_registers.r[1];
|
||||
}
|
||||
|
||||
grub_addr_t
|
||||
grub_uboot_get_boot_data (void)
|
||||
{
|
||||
return grub_arm_saved_registers.r[2];
|
||||
}
|
||||
|
||||
int
|
||||
grub_uboot_api_init (void)
|
||||
{
|
||||
struct api_signature *start, *end;
|
||||
struct api_signature *p;
|
||||
grub_addr_t grub_uboot_search_hint = grub_arm_saved_registers.sp;
|
||||
if (grub_uboot_search_hint)
|
||||
{
|
||||
/* Extended search range to work around Trim Slice U-Boot issue */
|
||||
start = (struct api_signature *) ((grub_uboot_search_hint & ~0x000fffff)
|
||||
- 0x00500000);
|
||||
end =
|
||||
(struct api_signature *) ((grub_addr_t) start + UBOOT_API_SEARCH_LEN -
|
||||
API_SIG_MAGLEN + 0x00500000);
|
||||
}
|
||||
else
|
||||
{
|
||||
start = 0;
|
||||
end = (struct api_signature *) (256 * 1024 * 1024);
|
||||
}
|
||||
|
||||
/* Structure alignment is (at least) 8 bytes */
|
||||
for (p = start; p < end; p = (void *) ((grub_addr_t) p + 8))
|
||||
{
|
||||
if (grub_memcmp (&(p->magic), API_SIG_MAGIC, API_SIG_MAGLEN) == 0)
|
||||
{
|
||||
grub_uboot_syscall_ptr = p->syscall;
|
||||
return p->version;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
73
grub-core/kern/arm/uboot/uboot.S
Normal file
73
grub-core/kern/arm/uboot/uboot.S
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/offsets.h>
|
||||
#include <grub/symbol.h>
|
||||
#include <grub/machine/kernel.h>
|
||||
|
||||
/*
|
||||
* uboot_syscall():
|
||||
* This function is effectively a veneer, so it cannot
|
||||
* modify the stack or corrupt any registers other than
|
||||
* r12 (ip). Furthermore it needs to restore r8 for
|
||||
* U-Boot (Global Data Pointer) and preserve it for Grub.
|
||||
*/
|
||||
FUNCTION(grub_uboot_syscall)
|
||||
str r8, transition_space
|
||||
str lr, transition_space + 4
|
||||
str r9, transition_space + 8
|
||||
|
||||
ldr ip, saved_registers_ptr
|
||||
ldr r8, [ip, #4 * 8]
|
||||
ldr r9, [ip, #4 * 9]
|
||||
|
||||
bl do_syscall
|
||||
|
||||
ldr r8, transition_space
|
||||
ldr lr, transition_space + 4
|
||||
ldr r9, transition_space + 8
|
||||
|
||||
bx lr
|
||||
do_syscall:
|
||||
|
||||
ldr ip, grub_uboot_syscall_ptr
|
||||
bx ip
|
||||
|
||||
FUNCTION(grub_uboot_return)
|
||||
ldr ip, saved_registers_ptr
|
||||
ldr sp, [ip, #4 * 4]
|
||||
pop {r4-r12, lr}
|
||||
mov sp, r12
|
||||
bx lr
|
||||
|
||||
|
||||
.align 3
|
||||
|
||||
@ GRUB context stack space
|
||||
transition_space:
|
||||
.long 0 @ r8
|
||||
.long 0 @ lr
|
||||
.long 0 @ r9
|
||||
|
||||
saved_registers_ptr:
|
||||
.long EXT_C(grub_arm_saved_registers)
|
||||
|
||||
VARIABLE(grub_uboot_syscall_ptr)
|
||||
.long 0 @
|
||||
|
||||
END
|
||||
72
grub-core/kern/coreboot/cbtable.c
Normal file
72
grub-core/kern/coreboot/cbtable.c
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2007,2008,2013 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/i386/coreboot/memory.h>
|
||||
#include <grub/coreboot/lbio.h>
|
||||
#include <grub/types.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/dl.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wcast-align"
|
||||
|
||||
/* Helper for grub_linuxbios_table_iterate. */
|
||||
int
|
||||
grub_linuxbios_check_signature (grub_linuxbios_table_header_t tbl_header)
|
||||
{
|
||||
if (! grub_memcmp (tbl_header->signature, "LBIO", 4))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
grub_err_t
|
||||
grub_linuxbios_table_iterate (int (*hook) (grub_linuxbios_table_item_t,
|
||||
void *),
|
||||
void *hook_data)
|
||||
{
|
||||
grub_linuxbios_table_header_t table_header = grub_linuxbios_get_tables ();
|
||||
grub_linuxbios_table_item_t table_item;
|
||||
|
||||
if (!table_header)
|
||||
return 0;
|
||||
|
||||
signature_found:
|
||||
|
||||
table_item =
|
||||
(grub_linuxbios_table_item_t) ((char *) table_header +
|
||||
table_header->header_size);
|
||||
for (; table_item < (grub_linuxbios_table_item_t) ((char *) table_header
|
||||
+ table_header->header_size
|
||||
+ table_header->table_size);
|
||||
table_item = (grub_linuxbios_table_item_t) ((char *) table_item + table_item->size))
|
||||
{
|
||||
if (table_item->tag == GRUB_LINUXBIOS_MEMBER_LINK
|
||||
&& grub_linuxbios_check_signature ((grub_linuxbios_table_header_t) (grub_addr_t)
|
||||
*(grub_uint64_t *) (table_item + 1)))
|
||||
{
|
||||
table_header = (grub_linuxbios_table_header_t) (grub_addr_t)
|
||||
*(grub_uint64_t *) (table_item + 1);
|
||||
goto signature_found;
|
||||
}
|
||||
if (hook (table_item, hook_data))
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -16,8 +16,8 @@
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/machine/memory.h>
|
||||
#include <grub/machine/lbio.h>
|
||||
#include <grub/memory.h>
|
||||
#include <grub/coreboot/lbio.h>
|
||||
#include <grub/types.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/misc.h>
|
||||
@@ -49,6 +49,7 @@ iterate_linuxbios_table (grub_linuxbios_table_item_t table_item, void *data)
|
||||
{
|
||||
grub_uint64_t start = mem_region->addr;
|
||||
grub_uint64_t end = mem_region->addr + mem_region->size;
|
||||
#ifdef __i386__
|
||||
/* Mark region 0xa0000 - 0x100000 as reserved. */
|
||||
if (start < 0x100000 && end >= 0xa0000
|
||||
&& mem_region->type == GRUB_MACHINE_MEMORY_AVAILABLE)
|
||||
@@ -75,6 +76,7 @@ iterate_linuxbios_table (grub_linuxbios_table_item_t table_item, void *data)
|
||||
if (end <= start)
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (ctx->hook (start, end - start,
|
||||
/* Multiboot mmaps match with the coreboot mmap
|
||||
definition. Therefore, we can just pass type
|
||||
@@ -366,6 +366,9 @@ grub_efi_get_filename (grub_efi_device_path_t *dp0)
|
||||
len = ((GRUB_EFI_DEVICE_PATH_LENGTH (dp) - 4)
|
||||
/ sizeof (grub_efi_char16_t));
|
||||
fp = (grub_efi_file_path_device_path_t *) dp;
|
||||
/* According to EFI spec Path Name is NULL terminated */
|
||||
while (len > 0 && fp->path_name[len - 1] == 0)
|
||||
len--;
|
||||
|
||||
p = (char *) grub_utf16_to_utf8 ((unsigned char *) p, fp->path_name, len);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
#include <grub/i386/coreboot/memory.h>
|
||||
#include <grub/i386/coreboot/lbio.h>
|
||||
#include <grub/coreboot/lbio.h>
|
||||
#include <grub/types.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/misc.h>
|
||||
@@ -25,59 +25,20 @@
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
/* Helper for grub_linuxbios_table_iterate. */
|
||||
static int
|
||||
check_signature (grub_linuxbios_table_header_t tbl_header)
|
||||
{
|
||||
if (! grub_memcmp (tbl_header->signature, "LBIO", 4))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
grub_err_t
|
||||
grub_linuxbios_table_iterate (int (*hook) (grub_linuxbios_table_item_t,
|
||||
void *),
|
||||
void *hook_data)
|
||||
grub_linuxbios_table_header_t
|
||||
grub_linuxbios_get_tables (void)
|
||||
{
|
||||
grub_linuxbios_table_header_t table_header;
|
||||
grub_linuxbios_table_item_t table_item;
|
||||
|
||||
/* Assuming table_header is aligned to its size (8 bytes). */
|
||||
|
||||
for (table_header = (grub_linuxbios_table_header_t) 0x500;
|
||||
table_header < (grub_linuxbios_table_header_t) 0x1000; table_header++)
|
||||
if (check_signature (table_header))
|
||||
goto signature_found;
|
||||
if (grub_linuxbios_check_signature (table_header))
|
||||
return table_header;
|
||||
|
||||
for (table_header = (grub_linuxbios_table_header_t) 0xf0000;
|
||||
table_header < (grub_linuxbios_table_header_t) 0x100000; table_header++)
|
||||
if (check_signature (table_header))
|
||||
goto signature_found;
|
||||
|
||||
return 0;
|
||||
|
||||
signature_found:
|
||||
|
||||
table_item =
|
||||
(grub_linuxbios_table_item_t) ((char *) table_header +
|
||||
table_header->header_size);
|
||||
for (; table_item < (grub_linuxbios_table_item_t) ((char *) table_header
|
||||
+ table_header->header_size
|
||||
+ table_header->table_size);
|
||||
table_item = (grub_linuxbios_table_item_t) ((char *) table_item + table_item->size))
|
||||
{
|
||||
if (table_item->tag == GRUB_LINUXBIOS_MEMBER_LINK
|
||||
&& check_signature ((grub_linuxbios_table_header_t) (grub_addr_t)
|
||||
*(grub_uint64_t *) (table_item + 1)))
|
||||
{
|
||||
table_header = (grub_linuxbios_table_header_t) (grub_addr_t)
|
||||
*(grub_uint64_t *) (table_item + 1);
|
||||
goto signature_found;
|
||||
}
|
||||
if (hook (table_item, hook_data))
|
||||
return 1;
|
||||
}
|
||||
if (grub_linuxbios_check_signature (table_header))
|
||||
return table_header;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -119,6 +119,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr,
|
||||
case R_IA64_LTOFF22:
|
||||
if (ELF_ST_TYPE (sym->st_info) == STT_FUNC)
|
||||
value = *(grub_uint64_t *) sym->st_value + rel->r_addend;
|
||||
/* Fallthrough. */
|
||||
case R_IA64_LTOFF_FPTR22:
|
||||
{
|
||||
grub_uint64_t *gpptr = mod->gotptr;
|
||||
|
||||
@@ -236,6 +236,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr,
|
||||
sym_value &= 0xffff0000;
|
||||
*(grub_uint16_t *) addr = 0;
|
||||
}
|
||||
/* Fallthrough. */
|
||||
case R_MIPS_CALL16:
|
||||
{
|
||||
grub_uint32_t *gpptr = mod->gotptr;
|
||||
|
||||
@@ -391,12 +391,13 @@ grub_strtoull (const char *str, char **end, int base)
|
||||
unsigned long digit;
|
||||
|
||||
digit = grub_tolower (*str) - '0';
|
||||
if (digit > 9)
|
||||
{
|
||||
digit += '0' - 'a' + 10;
|
||||
if (digit >= (unsigned long) base)
|
||||
break;
|
||||
}
|
||||
if (digit >= 'a' - '0')
|
||||
digit += '0' - 'a' + 10;
|
||||
else if (digit > 9)
|
||||
break;
|
||||
|
||||
if (digit >= (unsigned long) base)
|
||||
break;
|
||||
|
||||
found = 1;
|
||||
|
||||
|
||||
@@ -159,6 +159,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr,
|
||||
if (value >> 32)
|
||||
return grub_error (GRUB_ERR_BAD_MODULE,
|
||||
"address out of 32 bits range");
|
||||
/* Fallthrough. */
|
||||
case R_SPARC_LM22:
|
||||
*addr = (*addr & 0xFFC00000) | ((value >> 10) & 0x3FFFFF);
|
||||
break;
|
||||
|
||||
@@ -36,30 +36,14 @@
|
||||
extern char __bss_start[];
|
||||
extern char _end[];
|
||||
extern grub_size_t grub_total_module_size;
|
||||
extern int (*grub_uboot_syscall_ptr) (int, int *, ...);
|
||||
static unsigned long timer_start;
|
||||
|
||||
extern grub_uint32_t grub_uboot_machine_type;
|
||||
extern grub_addr_t grub_uboot_boot_data;
|
||||
|
||||
void
|
||||
grub_exit (void)
|
||||
{
|
||||
grub_uboot_return (0);
|
||||
}
|
||||
|
||||
grub_uint32_t
|
||||
grub_uboot_get_machine_type (void)
|
||||
{
|
||||
return grub_uboot_machine_type;
|
||||
}
|
||||
|
||||
grub_addr_t
|
||||
grub_uboot_get_boot_data (void)
|
||||
{
|
||||
return grub_uboot_boot_data;
|
||||
}
|
||||
|
||||
static grub_uint64_t
|
||||
uboot_timer_ms (void)
|
||||
{
|
||||
|
||||
@@ -39,48 +39,13 @@
|
||||
* returns: 0 if the call not found, 1 if serviced
|
||||
*/
|
||||
|
||||
extern int (*grub_uboot_syscall_ptr) (int, int *, ...);
|
||||
extern int grub_uboot_syscall (int, int *, ...);
|
||||
extern grub_addr_t grub_uboot_search_hint;
|
||||
|
||||
static struct sys_info uboot_sys_info;
|
||||
static struct mem_region uboot_mem_info[5];
|
||||
static struct device_info * devices;
|
||||
static int num_devices;
|
||||
|
||||
int
|
||||
grub_uboot_api_init (void)
|
||||
{
|
||||
struct api_signature *start, *end;
|
||||
struct api_signature *p;
|
||||
|
||||
if (grub_uboot_search_hint)
|
||||
{
|
||||
/* Extended search range to work around Trim Slice U-Boot issue */
|
||||
start = (struct api_signature *) ((grub_uboot_search_hint & ~0x000fffff)
|
||||
- 0x00500000);
|
||||
end =
|
||||
(struct api_signature *) ((grub_addr_t) start + UBOOT_API_SEARCH_LEN -
|
||||
API_SIG_MAGLEN + 0x00500000);
|
||||
}
|
||||
else
|
||||
{
|
||||
start = 0;
|
||||
end = (struct api_signature *) (256 * 1024 * 1024);
|
||||
}
|
||||
|
||||
/* Structure alignment is (at least) 8 bytes */
|
||||
for (p = start; p < end; p = (void *) ((grub_addr_t) p + 8))
|
||||
{
|
||||
if (grub_memcmp (&(p->magic), API_SIG_MAGIC, API_SIG_MAGLEN) == 0)
|
||||
{
|
||||
grub_uboot_syscall_ptr = p->syscall;
|
||||
return p->version;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* All functions below are wrappers around the grub_uboot_syscall() function
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
#include <grub/types.h>
|
||||
#include <grub/symbol.h>
|
||||
#include <grub/uboot/uboot.h>
|
||||
#include <grub/datetime.h>
|
||||
#include <grub/dl.h>
|
||||
|
||||
@@ -30,12 +29,12 @@ grub_err_t
|
||||
grub_get_datetime (struct grub_datetime *datetime __attribute__ ((unused)))
|
||||
{
|
||||
return grub_error (GRUB_ERR_INVALID_COMMAND,
|
||||
"can\'t get datetime using U-Boot");
|
||||
"can\'t get datetime on this machine");
|
||||
}
|
||||
|
||||
grub_err_t
|
||||
grub_set_datetime (struct grub_datetime * datetime __attribute__ ((unused)))
|
||||
{
|
||||
return grub_error (GRUB_ERR_INVALID_COMMAND,
|
||||
"can\'t set datetime using U-Boot");
|
||||
"can\'t set datetime on this machine");
|
||||
}
|
||||
32
grub-core/lib/dummy/reboot.c
Normal file
32
grub-core/lib/dummy/reboot.c
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/misc.h>
|
||||
#include <grub/mm.h>
|
||||
#include <grub/kernel.h>
|
||||
#include <grub/loader.h>
|
||||
|
||||
void
|
||||
grub_reboot (void)
|
||||
{
|
||||
grub_machine_fini (GRUB_LOADER_FLAG_NORETURN);
|
||||
|
||||
/* Just stop here */
|
||||
|
||||
while (1);
|
||||
}
|
||||
@@ -102,13 +102,13 @@ static grub_uint32_t *get_next_node (const void *fdt, char *node_name)
|
||||
static int get_mem_rsvmap_size (const void *fdt)
|
||||
{
|
||||
int size = 0;
|
||||
grub_uint64_t *ptr = (void *) ((grub_addr_t) fdt
|
||||
+ grub_fdt_get_off_mem_rsvmap (fdt));
|
||||
grub_unaligned_uint64_t *ptr = (void *) ((grub_addr_t) fdt
|
||||
+ grub_fdt_get_off_mem_rsvmap (fdt));
|
||||
|
||||
do
|
||||
{
|
||||
size += 2 * sizeof(*ptr);
|
||||
if (!*ptr && !*(ptr + 1))
|
||||
if (!ptr[0].val && !ptr[1].val)
|
||||
return size;
|
||||
ptr += 2;
|
||||
} while ((grub_addr_t) ptr <= (grub_addr_t) fdt + grub_fdt_get_totalsize (fdt)
|
||||
@@ -229,7 +229,7 @@ static int rearrange_blocks (void *fdt, unsigned int clearance)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static grub_uint32_t *find_prop (void *fdt, unsigned int nodeoffset,
|
||||
static grub_uint32_t *find_prop (const void *fdt, unsigned int nodeoffset,
|
||||
const char *name)
|
||||
{
|
||||
grub_uint32_t *prop = (void *) ((grub_addr_t) fdt
|
||||
@@ -268,9 +268,9 @@ static grub_uint32_t *find_prop (void *fdt, unsigned int nodeoffset,
|
||||
the size allocated for the FDT; if this function is called before the other
|
||||
functions in this file and returns success, the other functions are
|
||||
guaranteed not to access memory locations outside the allocated memory. */
|
||||
int grub_fdt_check_header_nosize (void *fdt)
|
||||
int grub_fdt_check_header_nosize (const void *fdt)
|
||||
{
|
||||
if (((grub_addr_t) fdt & 0x7) || (grub_fdt_get_magic (fdt) != FDT_MAGIC)
|
||||
if (((grub_addr_t) fdt & 0x3) || (grub_fdt_get_magic (fdt) != FDT_MAGIC)
|
||||
|| (grub_fdt_get_version (fdt) < FDT_SUPPORTED_VERSION)
|
||||
|| (grub_fdt_get_last_comp_version (fdt) > FDT_SUPPORTED_VERSION)
|
||||
|| (grub_fdt_get_off_dt_struct (fdt) & 0x00000003)
|
||||
@@ -286,7 +286,7 @@ int grub_fdt_check_header_nosize (void *fdt)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int grub_fdt_check_header (void *fdt, unsigned int size)
|
||||
int grub_fdt_check_header (const void *fdt, unsigned int size)
|
||||
{
|
||||
if (size < sizeof (grub_fdt_header_t)
|
||||
|| (grub_fdt_get_totalsize (fdt) > size)
|
||||
@@ -295,41 +295,29 @@ int grub_fdt_check_header (void *fdt, unsigned int size)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Find a direct sub-node of a given parent node. */
|
||||
int grub_fdt_find_subnode (const void *fdt, unsigned int parentoffset,
|
||||
const char *name)
|
||||
static const grub_uint32_t *
|
||||
advance_token (const void *fdt, const grub_uint32_t *token, const grub_uint32_t *end, int skip_current)
|
||||
{
|
||||
grub_uint32_t *token, *end;
|
||||
char *node_name;
|
||||
|
||||
if (parentoffset & 0x3)
|
||||
return -1;
|
||||
token = (void *) ((grub_addr_t) fdt + grub_fdt_get_off_dt_struct(fdt)
|
||||
+ parentoffset);
|
||||
end = (void *) struct_end (fdt);
|
||||
if ((token >= end) || (grub_be_to_cpu32(*token) != FDT_BEGIN_NODE))
|
||||
return -1;
|
||||
SKIP_NODE_NAME(node_name, token, end);
|
||||
while (token < end)
|
||||
for (; token < end; skip_current = 0)
|
||||
{
|
||||
switch (grub_be_to_cpu32(*token))
|
||||
switch (grub_be_to_cpu32 (*token))
|
||||
{
|
||||
case FDT_BEGIN_NODE:
|
||||
node_name = (char *) (token + 1);
|
||||
if (node_name + grub_strlen (name) >= (char *) end)
|
||||
return -1;
|
||||
if (!grub_strcmp (node_name, name))
|
||||
return (int) ((grub_addr_t) token - (grub_addr_t) fdt
|
||||
- grub_fdt_get_off_dt_struct (fdt));
|
||||
token = get_next_node (fdt, node_name);
|
||||
if (!token)
|
||||
return -1;
|
||||
break;
|
||||
if (skip_current)
|
||||
{
|
||||
token = get_next_node (fdt, (char *) (token + 1));
|
||||
continue;
|
||||
}
|
||||
char *ptr;
|
||||
for (ptr = (char *) (token + 1); *ptr && ptr < (char *) end; ptr++);
|
||||
if (ptr >= (char *) end)
|
||||
return 0;
|
||||
return token;
|
||||
case FDT_PROP:
|
||||
/* Skip property token and following data (len, nameoff and property
|
||||
value). */
|
||||
if (token >= end - 1)
|
||||
return -1;
|
||||
return 0;
|
||||
token += prop_entry_size(grub_be_to_cpu32(*(token + 1)))
|
||||
/ sizeof(*token);
|
||||
break;
|
||||
@@ -337,10 +325,74 @@ int grub_fdt_find_subnode (const void *fdt, unsigned int parentoffset,
|
||||
token++;
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int grub_fdt_next_node (const void *fdt, unsigned int currentoffset)
|
||||
{
|
||||
const grub_uint32_t *token = (const grub_uint32_t *) fdt + (currentoffset + grub_fdt_get_off_dt_struct (fdt)) / 4;
|
||||
token = advance_token (fdt, token, (const void *) struct_end (fdt), 1);
|
||||
if (!token)
|
||||
return -1;
|
||||
return (int) ((grub_addr_t) token - (grub_addr_t) fdt
|
||||
- grub_fdt_get_off_dt_struct (fdt));
|
||||
}
|
||||
|
||||
int grub_fdt_first_node (const void *fdt, unsigned int parentoffset)
|
||||
{
|
||||
const grub_uint32_t *token, *end;
|
||||
char *node_name;
|
||||
|
||||
if (parentoffset & 0x3)
|
||||
return -1;
|
||||
token = (const void *) ((grub_addr_t) fdt + grub_fdt_get_off_dt_struct(fdt)
|
||||
+ parentoffset);
|
||||
end = (const void *) struct_end (fdt);
|
||||
if ((token >= end) || (grub_be_to_cpu32(*token) != FDT_BEGIN_NODE))
|
||||
return -1;
|
||||
SKIP_NODE_NAME(node_name, token, end);
|
||||
token = advance_token (fdt, token, end, 0);
|
||||
if (!token)
|
||||
return -1;
|
||||
return (int) ((grub_addr_t) token - (grub_addr_t) fdt
|
||||
- grub_fdt_get_off_dt_struct (fdt));
|
||||
}
|
||||
|
||||
/* Find a direct sub-node of a given parent node. */
|
||||
int grub_fdt_find_subnode (const void *fdt, unsigned int parentoffset,
|
||||
const char *name)
|
||||
{
|
||||
const grub_uint32_t *token, *end;
|
||||
const char *node_name;
|
||||
int skip_current = 0;
|
||||
|
||||
if (parentoffset & 0x3)
|
||||
return -1;
|
||||
token = (const void *) ((grub_addr_t) fdt + grub_fdt_get_off_dt_struct(fdt)
|
||||
+ parentoffset);
|
||||
end = (const void *) struct_end (fdt);
|
||||
if ((token >= end) || (grub_be_to_cpu32(*token) != FDT_BEGIN_NODE))
|
||||
return -1;
|
||||
SKIP_NODE_NAME(node_name, token, end);
|
||||
while (1) {
|
||||
token = advance_token (fdt, token, end, skip_current);
|
||||
if (!token)
|
||||
return -1;
|
||||
skip_current = 1;
|
||||
node_name = (const char *) token + 4;
|
||||
if (grub_strcmp (node_name, name) == 0)
|
||||
return (int) ((grub_addr_t) token - (grub_addr_t) fdt
|
||||
- grub_fdt_get_off_dt_struct (fdt));
|
||||
}
|
||||
}
|
||||
|
||||
const char *
|
||||
grub_fdt_get_nodename (const void *fdt, unsigned int nodeoffset)
|
||||
{
|
||||
return (const char *) fdt + grub_fdt_get_off_dt_struct(fdt) + nodeoffset + 4;
|
||||
}
|
||||
|
||||
int grub_fdt_add_subnode (void *fdt, unsigned int parentoffset,
|
||||
@@ -359,6 +411,24 @@ int grub_fdt_add_subnode (void *fdt, unsigned int parentoffset,
|
||||
return add_subnode (fdt, parentoffset, name);
|
||||
}
|
||||
|
||||
const void *
|
||||
grub_fdt_get_prop (const void *fdt, unsigned int nodeoffset, const char *name,
|
||||
grub_uint32_t *len)
|
||||
{
|
||||
grub_uint32_t *prop;
|
||||
if ((nodeoffset >= grub_fdt_get_size_dt_struct (fdt)) || (nodeoffset & 0x3)
|
||||
|| (grub_be_to_cpu32(*(grub_uint32_t *) ((grub_addr_t) fdt
|
||||
+ grub_fdt_get_off_dt_struct (fdt) + nodeoffset))
|
||||
!= FDT_BEGIN_NODE))
|
||||
return 0;
|
||||
prop = find_prop (fdt, nodeoffset, name);
|
||||
if (!prop)
|
||||
return 0;
|
||||
if (len)
|
||||
*len = grub_be_to_cpu32 (*(prop + 1));
|
||||
return prop + 3;
|
||||
}
|
||||
|
||||
int grub_fdt_set_prop (void *fdt, unsigned int nodeoffset, const char *name,
|
||||
const void *val, grub_uint32_t len)
|
||||
{
|
||||
|
||||
@@ -128,7 +128,7 @@ VARIABLE(grub_relocator_xen_start)
|
||||
VARIABLE(grub_relocator_xen_remapper_virt2)
|
||||
.long 0
|
||||
|
||||
movl %eax, %edi
|
||||
movl %eax, %ebx
|
||||
|
||||
xorl %ecx, %ecx /* Invalid pte */
|
||||
xorl %edx, %edx
|
||||
|
||||
@@ -1044,6 +1044,8 @@ enum xz_ret xz_dec_lzma2_run(
|
||||
|
||||
s->lzma2.sequence = SEQ_LZMA_PREPARE;
|
||||
|
||||
/* Fall through */
|
||||
|
||||
case SEQ_LZMA_PREPARE:
|
||||
if (s->lzma2.compressed < RC_INIT_BYTES)
|
||||
return XZ_DATA_ERROR;
|
||||
@@ -1054,6 +1056,8 @@ enum xz_ret xz_dec_lzma2_run(
|
||||
s->lzma2.compressed -= RC_INIT_BYTES;
|
||||
s->lzma2.sequence = SEQ_LZMA_RUN;
|
||||
|
||||
/* Fall through */
|
||||
|
||||
case SEQ_LZMA_RUN:
|
||||
/*
|
||||
* Set dictionary limit to indicate how much we want
|
||||
|
||||
@@ -750,6 +750,7 @@ static enum xz_ret dec_main(struct xz_dec *s, struct xz_buf *b)
|
||||
|
||||
s->sequence = SEQ_BLOCK_START;
|
||||
|
||||
/* FALLTHROUGH */
|
||||
case SEQ_BLOCK_START:
|
||||
/* We need one byte of input to continue. */
|
||||
if (b->in_pos == b->in_size)
|
||||
@@ -773,6 +774,7 @@ static enum xz_ret dec_main(struct xz_dec *s, struct xz_buf *b)
|
||||
s->temp.pos = 0;
|
||||
s->sequence = SEQ_BLOCK_HEADER;
|
||||
|
||||
/* FALLTHROUGH */
|
||||
case SEQ_BLOCK_HEADER:
|
||||
if (!fill_temp(s, b))
|
||||
return XZ_OK;
|
||||
@@ -783,6 +785,7 @@ static enum xz_ret dec_main(struct xz_dec *s, struct xz_buf *b)
|
||||
|
||||
s->sequence = SEQ_BLOCK_UNCOMPRESS;
|
||||
|
||||
/* FALLTHROUGH */
|
||||
case SEQ_BLOCK_UNCOMPRESS:
|
||||
ret = dec_block(s, b);
|
||||
if (ret != XZ_STREAM_END)
|
||||
@@ -810,6 +813,7 @@ static enum xz_ret dec_main(struct xz_dec *s, struct xz_buf *b)
|
||||
|
||||
s->sequence = SEQ_BLOCK_CHECK;
|
||||
|
||||
/* FALLTHROUGH */
|
||||
case SEQ_BLOCK_CHECK:
|
||||
ret = hash_validate(s, b, 0);
|
||||
if (ret != XZ_STREAM_END)
|
||||
@@ -858,6 +862,7 @@ static enum xz_ret dec_main(struct xz_dec *s, struct xz_buf *b)
|
||||
|
||||
s->sequence = SEQ_INDEX_CRC32;
|
||||
|
||||
/* FALLTHROUGH */
|
||||
case SEQ_INDEX_CRC32:
|
||||
ret = hash_validate(s, b, 1);
|
||||
if (ret != XZ_STREAM_END)
|
||||
@@ -866,6 +871,7 @@ static enum xz_ret dec_main(struct xz_dec *s, struct xz_buf *b)
|
||||
s->temp.size = STREAM_HEADER_SIZE;
|
||||
s->sequence = SEQ_STREAM_FOOTER;
|
||||
|
||||
/* FALLTHROUGH */
|
||||
case SEQ_STREAM_FOOTER:
|
||||
if (!fill_temp(s, b))
|
||||
return XZ_OK;
|
||||
|
||||
@@ -42,7 +42,7 @@ static grub_size_t linux_size;
|
||||
static char *linux_args;
|
||||
|
||||
static grub_uint32_t machine_type;
|
||||
static void *fdt_addr;
|
||||
static const void *current_fdt;
|
||||
|
||||
typedef void (*kernel_entry_t) (int, unsigned long, void *);
|
||||
|
||||
@@ -54,9 +54,9 @@ typedef void (*kernel_entry_t) (int, unsigned long, void *);
|
||||
#define LINUX_FDT_PHYS_OFFSET (LINUX_INITRD_PHYS_OFFSET - 0x10000)
|
||||
|
||||
static grub_size_t
|
||||
get_atag_size (grub_uint32_t *atag)
|
||||
get_atag_size (const grub_uint32_t *atag)
|
||||
{
|
||||
grub_uint32_t *atag0 = atag;
|
||||
const grub_uint32_t *atag0 = atag;
|
||||
while (atag[0] && atag[1])
|
||||
atag += atag[0];
|
||||
return atag - atag0;
|
||||
@@ -68,10 +68,11 @@ get_atag_size (grub_uint32_t *atag)
|
||||
* Merges in command line parameters and sets up initrd addresses.
|
||||
*/
|
||||
static grub_err_t
|
||||
linux_prepare_atag (void)
|
||||
linux_prepare_atag (void *target_atag)
|
||||
{
|
||||
grub_uint32_t *atag_orig = (grub_uint32_t *) fdt_addr;
|
||||
grub_uint32_t *tmp_atag, *from, *to;
|
||||
const grub_uint32_t *atag_orig = (const grub_uint32_t *) current_fdt;
|
||||
grub_uint32_t *tmp_atag, *to;
|
||||
const grub_uint32_t *from;
|
||||
grub_size_t tmp_size;
|
||||
grub_size_t arg_size = grub_strlen (linux_args);
|
||||
char *cmdline_orig = NULL;
|
||||
@@ -142,7 +143,7 @@ linux_prepare_atag (void)
|
||||
to += 2;
|
||||
|
||||
/* Copy updated FDT to its launch location */
|
||||
grub_memcpy (atag_orig, tmp_atag, sizeof (grub_uint32_t) * (to - tmp_atag));
|
||||
grub_memcpy (target_atag, tmp_atag, sizeof (grub_uint32_t) * (to - tmp_atag));
|
||||
grub_free (tmp_atag);
|
||||
|
||||
grub_dprintf ("loader", "ATAG updated for Linux boot\n");
|
||||
@@ -156,19 +157,19 @@ linux_prepare_atag (void)
|
||||
* Merges in command line parameters and sets up initrd addresses.
|
||||
*/
|
||||
static grub_err_t
|
||||
linux_prepare_fdt (void)
|
||||
linux_prepare_fdt (void *target_fdt)
|
||||
{
|
||||
int node;
|
||||
int retval;
|
||||
int tmp_size;
|
||||
void *tmp_fdt;
|
||||
|
||||
tmp_size = grub_fdt_get_totalsize (fdt_addr) + 0x100 + grub_strlen (linux_args);
|
||||
tmp_size = grub_fdt_get_totalsize (current_fdt) + 0x100 + grub_strlen (linux_args);
|
||||
tmp_fdt = grub_malloc (tmp_size);
|
||||
if (!tmp_fdt)
|
||||
return grub_errno;
|
||||
|
||||
grub_memcpy (tmp_fdt, fdt_addr, grub_fdt_get_totalsize (fdt_addr));
|
||||
grub_memcpy (tmp_fdt, current_fdt, grub_fdt_get_totalsize (current_fdt));
|
||||
grub_fdt_set_totalsize (tmp_fdt, tmp_size);
|
||||
|
||||
/* Find or create '/chosen' node */
|
||||
@@ -209,7 +210,7 @@ linux_prepare_fdt (void)
|
||||
}
|
||||
|
||||
/* Copy updated FDT to its launch location */
|
||||
grub_memcpy (fdt_addr, tmp_fdt, tmp_size);
|
||||
grub_memcpy (target_fdt, tmp_fdt, tmp_size);
|
||||
grub_free (tmp_fdt);
|
||||
|
||||
grub_dprintf ("loader", "FDT updated for Linux boot\n");
|
||||
@@ -226,16 +227,17 @@ linux_boot (void)
|
||||
{
|
||||
kernel_entry_t linuxmain;
|
||||
int fdt_valid, atag_valid;
|
||||
void *target_fdt = 0;
|
||||
|
||||
fdt_valid = (fdt_addr && grub_fdt_check_header_nosize (fdt_addr) == 0);
|
||||
atag_valid = ((((grub_uint16_t *) fdt_addr)[3] & ~3) == 0x5440
|
||||
&& *((grub_uint32_t *) fdt_addr));
|
||||
fdt_valid = (current_fdt && grub_fdt_check_header_nosize (current_fdt) == 0);
|
||||
atag_valid = ((((const grub_uint16_t *) current_fdt)[3] & ~3) == 0x5440
|
||||
&& *((const grub_uint32_t *) current_fdt));
|
||||
grub_dprintf ("loader", "atag: %p, %x, %x, %s, %s\n",
|
||||
fdt_addr,
|
||||
((grub_uint16_t *) fdt_addr)[3],
|
||||
*((grub_uint32_t *) fdt_addr),
|
||||
(char *) fdt_addr,
|
||||
(char *) fdt_addr + 1);
|
||||
current_fdt,
|
||||
((const grub_uint16_t *) current_fdt)[3],
|
||||
*((const grub_uint32_t *) current_fdt),
|
||||
(const char *) current_fdt,
|
||||
(const char *) current_fdt + 1);
|
||||
|
||||
if (!fdt_valid && machine_type == GRUB_ARM_MACHINE_TYPE_FDT)
|
||||
return grub_error (GRUB_ERR_FILE_NOT_FOUND,
|
||||
@@ -245,23 +247,40 @@ linux_boot (void)
|
||||
|
||||
grub_dprintf ("loader", "Kernel at: 0x%x\n", linux_addr);
|
||||
|
||||
if (fdt_valid || atag_valid)
|
||||
{
|
||||
#ifdef GRUB_MACHINE_EFI
|
||||
grub_size_t size;
|
||||
if (fdt_valid)
|
||||
size = grub_fdt_get_totalsize (fdt_addr);
|
||||
else
|
||||
size = 4 * get_atag_size (atag_orig);
|
||||
size += grub_strlen (linux_args) + 256;
|
||||
target_fdt = grub_efi_allocate_loader_memory (LINUX_FDT_PHYS_OFFSET, size);
|
||||
if (!fdt_addr)
|
||||
return grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory"));
|
||||
#else
|
||||
target_fdt = (void *) LINUX_FDT_ADDRESS;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (fdt_valid)
|
||||
{
|
||||
grub_err_t err;
|
||||
|
||||
err = linux_prepare_fdt ();
|
||||
err = linux_prepare_fdt (target_fdt);
|
||||
if (err)
|
||||
return err;
|
||||
grub_dprintf ("loader", "FDT @ 0x%p\n", fdt_addr);
|
||||
grub_dprintf ("loader", "FDT @ %p\n", target_fdt);
|
||||
}
|
||||
else if (atag_valid)
|
||||
{
|
||||
grub_err_t err;
|
||||
|
||||
err = linux_prepare_atag ();
|
||||
err = linux_prepare_atag (target_fdt);
|
||||
if (err)
|
||||
return err;
|
||||
grub_dprintf ("loader", "ATAG @ 0x%p\n", fdt_addr);
|
||||
grub_dprintf ("loader", "ATAG @ %p\n", target_fdt);
|
||||
}
|
||||
|
||||
grub_dprintf ("loader", "Jumping to Linux...\n");
|
||||
@@ -285,7 +304,7 @@ linux_boot (void)
|
||||
|
||||
grub_arm_disable_caches_mmu ();
|
||||
|
||||
linuxmain (0, machine_type, fdt_addr);
|
||||
linuxmain (0, machine_type, target_fdt);
|
||||
|
||||
return grub_error (GRUB_ERR_BAD_OS, "Linux call returned");
|
||||
}
|
||||
@@ -444,11 +463,26 @@ fail:
|
||||
static grub_err_t
|
||||
load_dtb (grub_file_t dtb, int size)
|
||||
{
|
||||
if ((grub_file_read (dtb, fdt_addr, size) != size)
|
||||
|| (grub_fdt_check_header (fdt_addr, size) != 0))
|
||||
return grub_error (GRUB_ERR_BAD_OS, N_("invalid device tree"));
|
||||
void *new_fdt = grub_zalloc (size);
|
||||
if (!new_fdt)
|
||||
return grub_errno;
|
||||
grub_dprintf ("loader", "Loading device tree to %p\n",
|
||||
new_fdt);
|
||||
if ((grub_file_read (dtb, new_fdt, size) != size)
|
||||
|| (grub_fdt_check_header (new_fdt, size) != 0))
|
||||
{
|
||||
grub_free (new_fdt);
|
||||
return grub_error (GRUB_ERR_BAD_OS, N_("invalid device tree"));
|
||||
}
|
||||
|
||||
grub_fdt_set_totalsize (new_fdt, size);
|
||||
current_fdt = new_fdt;
|
||||
/*
|
||||
* We've successfully loaded an FDT, so any machine type passed
|
||||
* from firmware is now obsolete.
|
||||
*/
|
||||
machine_type = GRUB_ARM_MACHINE_TYPE_FDT;
|
||||
|
||||
grub_fdt_set_totalsize (fdt_addr, size);
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
@@ -464,42 +498,13 @@ grub_cmd_devicetree (grub_command_t cmd __attribute__ ((unused)),
|
||||
|
||||
dtb = grub_file_open (argv[0]);
|
||||
if (!dtb)
|
||||
goto out;
|
||||
return grub_errno;
|
||||
|
||||
size = grub_file_size (dtb);
|
||||
if (size == 0)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_OS, "empty file");
|
||||
goto out;
|
||||
}
|
||||
|
||||
#ifdef GRUB_MACHINE_EFI
|
||||
fdt_addr = grub_efi_allocate_loader_memory (LINUX_FDT_PHYS_OFFSET, size);
|
||||
if (!fdt_addr)
|
||||
{
|
||||
grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory"));
|
||||
goto out;
|
||||
}
|
||||
#else
|
||||
fdt_addr = (void *) LINUX_FDT_ADDRESS;
|
||||
#endif
|
||||
|
||||
grub_dprintf ("loader", "Loading device tree to 0x%08x\n",
|
||||
(grub_addr_t) fdt_addr);
|
||||
load_dtb (dtb, size);
|
||||
if (grub_errno != GRUB_ERR_NONE)
|
||||
{
|
||||
fdt_addr = NULL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
* We've successfully loaded an FDT, so any machine type passed
|
||||
* from firmware is now obsolete.
|
||||
*/
|
||||
machine_type = GRUB_ARM_MACHINE_TYPE_FDT;
|
||||
|
||||
out:
|
||||
grub_error (GRUB_ERR_BAD_OS, "empty file");
|
||||
else
|
||||
load_dtb (dtb, size);
|
||||
grub_file_close (dtb);
|
||||
|
||||
return grub_errno;
|
||||
@@ -517,7 +522,7 @@ GRUB_MOD_INIT (linux)
|
||||
/* TRANSLATORS: DTB stands for device tree blob. */
|
||||
0, N_("Load DTB file."));
|
||||
my_mod = mod;
|
||||
fdt_addr = (void *) grub_arm_firmware_get_boot_data ();
|
||||
current_fdt = grub_arm_firmware_get_boot_data ();
|
||||
machine_type = grub_arm_firmware_get_machine_type ();
|
||||
}
|
||||
|
||||
|
||||
@@ -384,6 +384,7 @@ load_chewed (grub_file_t file, const char *filename)
|
||||
segment.len = 0;
|
||||
segment.offset = 0;
|
||||
segment.len = 0;
|
||||
/* Fallthrough. */
|
||||
case PAYLOAD_SEGMENT_CODE:
|
||||
case PAYLOAD_SEGMENT_DATA:
|
||||
{
|
||||
|
||||
@@ -984,10 +984,13 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
{
|
||||
case 'g':
|
||||
shift += 10;
|
||||
/* FALLTHROUGH */
|
||||
case 'm':
|
||||
shift += 10;
|
||||
/* FALLTHROUGH */
|
||||
case 'k':
|
||||
shift += 10;
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!@BUILD_SHEBANG@
|
||||
|
||||
# User-controllable options
|
||||
grub_modinfo_target_cpu=@target_cpu@
|
||||
|
||||
@@ -111,8 +111,8 @@ grub_net_arp_send_request (struct grub_net_network_level_interface *inf,
|
||||
}
|
||||
|
||||
grub_err_t
|
||||
grub_net_arp_receive (struct grub_net_buff *nb,
|
||||
struct grub_net_card *card)
|
||||
grub_net_arp_receive (struct grub_net_buff *nb, struct grub_net_card *card,
|
||||
grub_uint16_t *vlantag)
|
||||
{
|
||||
struct arppkt *arp_packet = (struct arppkt *) nb->data;
|
||||
grub_net_network_level_address_t sender_addr, target_addr;
|
||||
@@ -138,6 +138,14 @@ grub_net_arp_receive (struct grub_net_buff *nb,
|
||||
|
||||
FOR_NET_NETWORK_LEVEL_INTERFACES (inf)
|
||||
{
|
||||
/* Verify vlantag id */
|
||||
if (inf->card == card && inf->vlantag != *vlantag)
|
||||
{
|
||||
grub_dprintf ("net", "invalid vlantag! %x != %x\n",
|
||||
inf->vlantag, *vlantag);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Am I the protocol address target? */
|
||||
if (grub_net_addr_cmp (&inf->address, &target_addr) == 0
|
||||
&& arp_packet->op == grub_cpu_to_be16_compile_time (ARP_REQUEST))
|
||||
|
||||
@@ -153,11 +153,11 @@ grub_ieee1275_parse_bootpath (const char *devpath, char *bootpath,
|
||||
char *comma_char = 0;
|
||||
char *equal_char = 0;
|
||||
grub_size_t field_counter = 0;
|
||||
|
||||
grub_net_network_level_address_t client_addr, gateway_addr, subnet_mask;
|
||||
grub_net_link_level_address_t hw_addr;
|
||||
grub_net_interface_flags_t flags = 0;
|
||||
struct grub_net_network_level_interface *inter = NULL;
|
||||
grub_uint16_t vlantag = 0;
|
||||
|
||||
hw_addr.type = GRUB_NET_LINK_LEVEL_PROTOCOL_ETHERNET;
|
||||
|
||||
@@ -175,6 +175,11 @@ grub_ieee1275_parse_bootpath (const char *devpath, char *bootpath,
|
||||
*equal_char = 0;
|
||||
grub_env_set_net_property ((*card)->name, args, equal_char + 1,
|
||||
grub_strlen(equal_char + 1));
|
||||
|
||||
if ((grub_strcmp (args, "vtag") == 0) &&
|
||||
(grub_strlen (equal_char + 1) == 8))
|
||||
vlantag = grub_strtoul (equal_char + 1 + 4, 0, 16);
|
||||
|
||||
*equal_char = '=';
|
||||
}
|
||||
else
|
||||
@@ -213,8 +218,10 @@ grub_ieee1275_parse_bootpath (const char *devpath, char *bootpath,
|
||||
hw_addr.mac, sizeof(hw_addr.mac), 0);
|
||||
inter = grub_net_add_addr ((*card)->name, *card, &client_addr, &hw_addr,
|
||||
flags);
|
||||
inter->vlantag = vlantag;
|
||||
grub_net_add_ipv4_local (inter,
|
||||
__builtin_ctz (~grub_le_to_cpu32 (subnet_mask.ipv4)));
|
||||
|
||||
}
|
||||
|
||||
if (gateway_addr.ipv4 != 0)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <grub/misc.h>
|
||||
#include <grub/mm.h>
|
||||
#include <grub/env.h>
|
||||
#include <grub/net/ethernet.h>
|
||||
#include <grub/net/ip.h>
|
||||
#include <grub/net/arp.h>
|
||||
@@ -56,10 +57,17 @@ send_ethernet_packet (struct grub_net_network_level_interface *inf,
|
||||
{
|
||||
struct etherhdr *eth;
|
||||
grub_err_t err;
|
||||
grub_uint8_t etherhdr_size;
|
||||
grub_uint16_t vlantag_id = VLANTAG_IDENTIFIER;
|
||||
|
||||
COMPILE_TIME_ASSERT (sizeof (*eth) < GRUB_NET_MAX_LINK_HEADER_SIZE);
|
||||
etherhdr_size = sizeof (*eth);
|
||||
COMPILE_TIME_ASSERT (sizeof (*eth) + 4 < GRUB_NET_MAX_LINK_HEADER_SIZE);
|
||||
|
||||
err = grub_netbuff_push (nb, sizeof (*eth));
|
||||
/* Increase ethernet header in case of vlantag */
|
||||
if (inf->vlantag != 0)
|
||||
etherhdr_size += 4;
|
||||
|
||||
err = grub_netbuff_push (nb, etherhdr_size);
|
||||
if (err)
|
||||
return err;
|
||||
eth = (struct etherhdr *) nb->data;
|
||||
@@ -76,6 +84,19 @@ send_ethernet_packet (struct grub_net_network_level_interface *inf,
|
||||
return err;
|
||||
inf->card->opened = 1;
|
||||
}
|
||||
|
||||
/* Check and add a vlan-tag if needed. */
|
||||
if (inf->vlantag != 0)
|
||||
{
|
||||
/* Move eth type to the right */
|
||||
grub_memcpy ((char *) nb->data + etherhdr_size - 2,
|
||||
(char *) nb->data + etherhdr_size - 6, 2);
|
||||
|
||||
/* Add the tag in the middle */
|
||||
grub_memcpy ((char *) nb->data + etherhdr_size - 6, &vlantag_id, 2);
|
||||
grub_memcpy ((char *) nb->data + etherhdr_size - 4, (char *) &(inf->vlantag), 2);
|
||||
}
|
||||
|
||||
return inf->card->driver->send (inf->card, nb);
|
||||
}
|
||||
|
||||
@@ -90,10 +111,25 @@ grub_net_recv_ethernet_packet (struct grub_net_buff *nb,
|
||||
grub_net_link_level_address_t hwaddress;
|
||||
grub_net_link_level_address_t src_hwaddress;
|
||||
grub_err_t err;
|
||||
grub_uint8_t etherhdr_size = sizeof (*eth);
|
||||
grub_uint16_t vlantag = 0;
|
||||
|
||||
|
||||
/* Check if a vlan-tag is present. If so, the ethernet header is 4 bytes */
|
||||
/* longer than the original one. The vlantag id is extracted and the header */
|
||||
/* is reseted to the original size. */
|
||||
if (grub_get_unaligned16 (nb->data + etherhdr_size - 2) == VLANTAG_IDENTIFIER)
|
||||
{
|
||||
vlantag = grub_get_unaligned16 (nb->data + etherhdr_size);
|
||||
etherhdr_size += 4;
|
||||
/* Move eth type to the original position */
|
||||
grub_memcpy((char *) nb->data + etherhdr_size - 6,
|
||||
(char *) nb->data + etherhdr_size - 2, 2);
|
||||
}
|
||||
|
||||
eth = (struct etherhdr *) nb->data;
|
||||
type = grub_be_to_cpu16 (eth->type);
|
||||
err = grub_netbuff_pull (nb, sizeof (*eth));
|
||||
err = grub_netbuff_pull (nb, etherhdr_size);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -121,13 +157,14 @@ grub_net_recv_ethernet_packet (struct grub_net_buff *nb,
|
||||
{
|
||||
/* ARP packet. */
|
||||
case GRUB_NET_ETHERTYPE_ARP:
|
||||
grub_net_arp_receive (nb, card);
|
||||
grub_net_arp_receive (nb, card, &vlantag);
|
||||
grub_netbuff_free (nb);
|
||||
return GRUB_ERR_NONE;
|
||||
/* IP packet. */
|
||||
case GRUB_NET_ETHERTYPE_IP:
|
||||
case GRUB_NET_ETHERTYPE_IP6:
|
||||
return grub_net_recv_ip_packets (nb, card, &hwaddress, &src_hwaddress);
|
||||
return grub_net_recv_ip_packets (nb, card, &hwaddress, &src_hwaddress,
|
||||
&vlantag);
|
||||
}
|
||||
grub_netbuff_free (nb);
|
||||
return GRUB_ERR_NONE;
|
||||
|
||||
@@ -228,12 +228,13 @@ handle_dgram (struct grub_net_buff *nb,
|
||||
grub_net_ip_protocol_t proto,
|
||||
const grub_net_network_level_address_t *source,
|
||||
const grub_net_network_level_address_t *dest,
|
||||
grub_uint16_t *vlantag,
|
||||
grub_uint8_t ttl)
|
||||
{
|
||||
struct grub_net_network_level_interface *inf = NULL;
|
||||
grub_err_t err;
|
||||
int multicast = 0;
|
||||
|
||||
|
||||
/* DHCP needs special treatment since we don't know IP yet. */
|
||||
{
|
||||
struct udphdr *udph;
|
||||
@@ -293,6 +294,15 @@ handle_dgram (struct grub_net_buff *nb,
|
||||
&& grub_net_addr_cmp (&inf->address, dest) == 0
|
||||
&& grub_net_hwaddr_cmp (&inf->hwaddress, hwaddress) == 0)
|
||||
break;
|
||||
|
||||
/* Verify vlantag id */
|
||||
if (inf->card == card && inf->vlantag != *vlantag)
|
||||
{
|
||||
grub_dprintf ("net", "invalid vlantag! %x != %x\n",
|
||||
inf->vlantag, *vlantag);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Solicited node multicast. */
|
||||
if (inf->card == card
|
||||
&& inf->address.type == GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV6
|
||||
@@ -383,7 +393,8 @@ static grub_err_t
|
||||
grub_net_recv_ip4_packets (struct grub_net_buff *nb,
|
||||
struct grub_net_card *card,
|
||||
const grub_net_link_level_address_t *hwaddress,
|
||||
const grub_net_link_level_address_t *src_hwaddress)
|
||||
const grub_net_link_level_address_t *src_hwaddress,
|
||||
grub_uint16_t *vlantag)
|
||||
{
|
||||
struct iphdr *iph = (struct iphdr *) nb->data;
|
||||
grub_err_t err;
|
||||
@@ -458,7 +469,7 @@ grub_net_recv_ip4_packets (struct grub_net_buff *nb,
|
||||
dest.ipv4 = iph->dest;
|
||||
|
||||
return handle_dgram (nb, card, src_hwaddress, hwaddress, iph->protocol,
|
||||
&source, &dest, iph->ttl);
|
||||
&source, &dest, vlantag, iph->ttl);
|
||||
}
|
||||
|
||||
for (prev = &reassembles, rsm = *prev; rsm; prev = &rsm->next, rsm = *prev)
|
||||
@@ -594,7 +605,7 @@ grub_net_recv_ip4_packets (struct grub_net_buff *nb,
|
||||
dest.ipv4 = dst;
|
||||
|
||||
return handle_dgram (ret, card, src_hwaddress,
|
||||
hwaddress, proto, &source, &dest,
|
||||
hwaddress, proto, &source, &dest, vlantag,
|
||||
ttl);
|
||||
}
|
||||
}
|
||||
@@ -652,7 +663,8 @@ static grub_err_t
|
||||
grub_net_recv_ip6_packets (struct grub_net_buff *nb,
|
||||
struct grub_net_card *card,
|
||||
const grub_net_link_level_address_t *hwaddress,
|
||||
const grub_net_link_level_address_t *src_hwaddress)
|
||||
const grub_net_link_level_address_t *src_hwaddress,
|
||||
grub_uint16_t *vlantag)
|
||||
{
|
||||
struct ip6hdr *iph = (struct ip6hdr *) nb->data;
|
||||
grub_err_t err;
|
||||
@@ -703,21 +715,24 @@ grub_net_recv_ip6_packets (struct grub_net_buff *nb,
|
||||
grub_memcpy (dest.ipv6, &iph->dest, sizeof (dest.ipv6));
|
||||
|
||||
return handle_dgram (nb, card, src_hwaddress, hwaddress, iph->protocol,
|
||||
&source, &dest, iph->ttl);
|
||||
&source, &dest, vlantag, iph->ttl);
|
||||
}
|
||||
|
||||
grub_err_t
|
||||
grub_net_recv_ip_packets (struct grub_net_buff *nb,
|
||||
struct grub_net_card *card,
|
||||
const grub_net_link_level_address_t *hwaddress,
|
||||
const grub_net_link_level_address_t *src_hwaddress)
|
||||
const grub_net_link_level_address_t *src_hwaddress,
|
||||
grub_uint16_t *vlantag)
|
||||
{
|
||||
struct iphdr *iph = (struct iphdr *) nb->data;
|
||||
|
||||
if ((iph->verhdrlen >> 4) == 4)
|
||||
return grub_net_recv_ip4_packets (nb, card, hwaddress, src_hwaddress);
|
||||
return grub_net_recv_ip4_packets (nb, card, hwaddress, src_hwaddress,
|
||||
vlantag);
|
||||
if ((iph->verhdrlen >> 4) == 6)
|
||||
return grub_net_recv_ip6_packets (nb, card, hwaddress, src_hwaddress);
|
||||
return grub_net_recv_ip6_packets (nb, card, hwaddress, src_hwaddress,
|
||||
vlantag);
|
||||
grub_dprintf ("net", "Bad IP version: %d\n", (iph->verhdrlen >> 4));
|
||||
grub_netbuff_free (nb);
|
||||
return GRUB_ERR_NONE;
|
||||
|
||||
@@ -77,11 +77,19 @@ grub_util_get_fd_size (grub_util_fd_t fd, const char *name, unsigned *log_secsiz
|
||||
int
|
||||
grub_util_fd_seek (grub_util_fd_t fd, grub_uint64_t off)
|
||||
{
|
||||
#if SIZEOF_OFF_T == 8
|
||||
off_t offset = (off_t) off;
|
||||
|
||||
if (lseek (fd, offset, SEEK_SET) != offset)
|
||||
return -1;
|
||||
#elif SIZEOF_OFF64_T == 8
|
||||
off64_t offset = (off64_t) off;
|
||||
|
||||
if (lseek64 (fd, offset, SEEK_SET) != offset)
|
||||
return -1;
|
||||
#else
|
||||
#error "No large file support"
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -251,7 +251,6 @@ grub_script_lexer_init (struct grub_parser_param *parser, char *script,
|
||||
{
|
||||
parser->lexerstate = 0;
|
||||
yylex_destroy (lexerstate->yyscanner);
|
||||
grub_free (lexerstate->yyscanner);
|
||||
grub_free (lexerstate->text);
|
||||
grub_free (lexerstate);
|
||||
return 0;
|
||||
|
||||
119
grub-core/term/arm/cros.c
Normal file
119
grub-core/term/arm/cros.c
Normal file
@@ -0,0 +1,119 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
*
|
||||
* Copyright (C) 2012 Google Inc.
|
||||
* Copyright (C) 2016 Free Software Foundation, Inc.
|
||||
*
|
||||
* This is based on depthcharge code.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/ps2.h>
|
||||
#include <grub/fdtbus.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/machine/kernel.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/term.h>
|
||||
#include <grub/time.h>
|
||||
#include <grub/fdtbus.h>
|
||||
#include <grub/arm/cros_ec.h>
|
||||
|
||||
struct grub_ps2_state ps2_state;
|
||||
|
||||
struct grub_cros_ec_keyscan old_scan;
|
||||
|
||||
static grub_uint8_t map_code[GRUB_CROS_EC_KEYSCAN_COLS][GRUB_CROS_EC_KEYSCAN_ROWS];
|
||||
|
||||
static grub_uint8_t e0_translate[16] =
|
||||
{
|
||||
0x1c, 0x1d, 0x35, 0x00,
|
||||
0x38, 0x00, 0x47, 0x48,
|
||||
0x49, 0x4b, 0x4d, 0x4f,
|
||||
0x50, 0x51, 0x52, 0x53,
|
||||
};
|
||||
|
||||
/* If there is a character pending, return it;
|
||||
otherwise return GRUB_TERM_NO_KEY. */
|
||||
static int
|
||||
grub_cros_keyboard_getkey (struct grub_term_input *term __attribute__ ((unused)))
|
||||
{
|
||||
struct grub_cros_ec_keyscan scan;
|
||||
int i, j;
|
||||
if (grub_cros_ec_scan_keyboard(&scan) < 0)
|
||||
return GRUB_TERM_NO_KEY;
|
||||
for (i = 0; i < GRUB_CROS_EC_KEYSCAN_COLS; i++)
|
||||
if (scan.data[i] ^ old_scan.data[i])
|
||||
for (j = 0; j < GRUB_CROS_EC_KEYSCAN_ROWS; j++)
|
||||
if ((scan.data[i] ^ old_scan.data[i]) & (1 << j))
|
||||
{
|
||||
grub_uint8_t code = map_code[i][j];
|
||||
int ret;
|
||||
grub_uint8_t brk = 0;
|
||||
if (!(scan.data[i] & (1 << j)))
|
||||
brk = 0x80;
|
||||
grub_dprintf ("cros_keyboard", "key <%d, %d> code %x\n", i, j, code);
|
||||
if (code < 0x60)
|
||||
ret = grub_ps2_process_incoming_byte (&ps2_state, code | brk);
|
||||
else if (code >= 0x60 && code < 0x70 && e0_translate[code - 0x60])
|
||||
{
|
||||
grub_ps2_process_incoming_byte (&ps2_state, 0xe0);
|
||||
ret = grub_ps2_process_incoming_byte (&ps2_state, e0_translate[code - 0x60] | brk);
|
||||
}
|
||||
else
|
||||
ret = GRUB_TERM_NO_KEY;
|
||||
old_scan.data[i] ^= (1 << j);
|
||||
if (ret != GRUB_TERM_NO_KEY)
|
||||
return ret;
|
||||
}
|
||||
return GRUB_TERM_NO_KEY;
|
||||
}
|
||||
|
||||
static struct grub_term_input grub_cros_keyboard_term =
|
||||
{
|
||||
.name = "cros_keyboard",
|
||||
.getkey = grub_cros_keyboard_getkey
|
||||
};
|
||||
|
||||
static grub_err_t
|
||||
cros_attach(const struct grub_fdtbus_dev *dev __attribute__ ((unused)))
|
||||
{
|
||||
grub_size_t keymap_size, i;
|
||||
const grub_uint8_t *keymap = grub_fdtbus_get_prop (dev, "linux,keymap", &keymap_size);
|
||||
|
||||
if (keymap)
|
||||
{
|
||||
for (i = 0; i + 3 < keymap_size; i += 4)
|
||||
if (keymap[i+1] < GRUB_CROS_EC_KEYSCAN_COLS && keymap[i] < GRUB_CROS_EC_KEYSCAN_ROWS
|
||||
&& keymap[i+2] == 0 && keymap[i+3] < 0x80)
|
||||
map_code[keymap[i+1]][keymap[i]] = keymap[i+3];
|
||||
}
|
||||
|
||||
ps2_state.current_set = 1;
|
||||
ps2_state.at_keyboard_status = 0;
|
||||
grub_term_register_input ("cros_keyboard", &grub_cros_keyboard_term);
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
struct grub_fdtbus_driver cros =
|
||||
{
|
||||
.compatible = "google,cros-ec-keyb",
|
||||
.attach = cros_attach
|
||||
};
|
||||
|
||||
void
|
||||
grub_cros_init (void)
|
||||
{
|
||||
grub_fdtbus_register (&cros);
|
||||
}
|
||||
287
grub-core/term/arm/cros_ec.c
Normal file
287
grub-core/term/arm/cros_ec.c
Normal file
@@ -0,0 +1,287 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
*
|
||||
* Copyright (C) 2012 Google Inc.
|
||||
* Copyright (C) 2016 Free Software Foundation, Inc.
|
||||
*
|
||||
* This is based on depthcharge code.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/mm.h>
|
||||
#include <grub/time.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/arm/cros_ec.h>
|
||||
|
||||
static grub_uint64_t
|
||||
grub_get_time_us (void)
|
||||
{
|
||||
return 1000 * grub_get_time_ms ();
|
||||
}
|
||||
|
||||
static void
|
||||
grub_microsleep (grub_uint64_t len)
|
||||
{
|
||||
grub_uint64_t end_time = grub_get_time_us () + len;
|
||||
while (grub_get_time_us () < end_time)
|
||||
grub_cpu_idle ();
|
||||
}
|
||||
|
||||
volatile grub_uint32_t *spi = (volatile grub_uint32_t *) 0xff110000;
|
||||
|
||||
static int
|
||||
spi_send (const void *data, grub_size_t sz)
|
||||
{
|
||||
const grub_uint8_t *ptr = data, *end = ptr + sz;
|
||||
spi[2] = 0;
|
||||
spi[1] = sz - 1;
|
||||
spi[0] = ((1 << 18) | spi[0]) & ~(1 << 19);
|
||||
spi[2] = 1;
|
||||
while (ptr < end)
|
||||
{
|
||||
while (spi[9] & 2);
|
||||
spi[256] = *ptr++;
|
||||
}
|
||||
while (spi[9] & 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
spi_read (void *data, grub_size_t sz)
|
||||
{
|
||||
grub_uint8_t *ptr = data, *end = ptr + sz;
|
||||
spi[2] = 0;
|
||||
spi[1] = sz - 1;
|
||||
spi[0] = ((1 << 19) | spi[0]) & ~(1 << 18);
|
||||
spi[2] = 1;
|
||||
while (ptr < end)
|
||||
{
|
||||
while (spi[9] & 8);
|
||||
*ptr++ = spi[512];
|
||||
}
|
||||
while (spi[9] & 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
spi_start (void)
|
||||
{
|
||||
spi[3] = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
spi_stop (void)
|
||||
{
|
||||
spi[3] = 0;
|
||||
}
|
||||
|
||||
#define uint8_t grub_uint8_t
|
||||
#define uint16_t grub_uint16_t
|
||||
#define uint32_t grub_uint32_t
|
||||
#define uint64_t grub_uint64_t
|
||||
#define mdelay grub_millisleep
|
||||
#define memcpy grub_memcpy
|
||||
|
||||
static const uint64_t FramingTimeoutUs = 300 * 1000;
|
||||
|
||||
static const uint8_t EcFramingByte = 0xec;
|
||||
|
||||
#define EC_CMD_MKBP_STATE 0x60
|
||||
#define EC_CMD_VERSION0 0xdc
|
||||
|
||||
static uint64_t last_transfer;
|
||||
|
||||
static void
|
||||
stop_bus (void)
|
||||
{
|
||||
spi_stop ();
|
||||
last_transfer = grub_get_time_us ();
|
||||
}
|
||||
|
||||
static int
|
||||
wait_for_frame (void)
|
||||
{
|
||||
uint64_t start = grub_get_time_us ();
|
||||
uint8_t byte;
|
||||
do
|
||||
{
|
||||
if (spi_read (&byte, 1))
|
||||
return -1;
|
||||
if (byte != EcFramingByte &&
|
||||
grub_get_time_us () - start > FramingTimeoutUs)
|
||||
{
|
||||
grub_dprintf ("cros", "Timeout waiting for framing byte.\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
while (byte != EcFramingByte);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Calculate a simple 8-bit checksum of a data block
|
||||
*
|
||||
* @param data Data block to checksum
|
||||
* @param size Size of data block in bytes
|
||||
* @return checksum value (0 to 255)
|
||||
*/
|
||||
static uint8_t
|
||||
cros_ec_calc_checksum (const void *data, int size)
|
||||
{
|
||||
uint8_t csum;
|
||||
const uint8_t *bytes = data;
|
||||
int i;
|
||||
|
||||
for (i = csum = 0; i < size; i++)
|
||||
csum += bytes[i];
|
||||
return csum & 0xff;
|
||||
}
|
||||
|
||||
enum
|
||||
{
|
||||
/* response, arglen */
|
||||
CROS_EC_SPI_IN_HDR_SIZE = 2,
|
||||
/* version, cmd, arglen */
|
||||
CROS_EC_SPI_OUT_HDR_SIZE = 3
|
||||
};
|
||||
|
||||
static grub_uint8_t busbuf[256];
|
||||
#define MSG_BYTES ((int)sizeof (busbuf))
|
||||
|
||||
static int
|
||||
ec_command (int cmd, int cmd_version,
|
||||
const void *dout, int dout_len, void *din, int din_len)
|
||||
{
|
||||
uint8_t *bytes;
|
||||
|
||||
/* Header + data + checksum. */
|
||||
uint32_t out_bytes = CROS_EC_SPI_OUT_HDR_SIZE + dout_len + 1;
|
||||
uint32_t in_bytes = CROS_EC_SPI_IN_HDR_SIZE + din_len + 1;
|
||||
|
||||
/*
|
||||
* Sanity-check I/O sizes given transaction overhead in internal
|
||||
* buffers.
|
||||
*/
|
||||
if (out_bytes > MSG_BYTES)
|
||||
{
|
||||
grub_dprintf ("cros", "Cannot send %d bytes\n", dout_len);
|
||||
return -1;
|
||||
}
|
||||
if (in_bytes > MSG_BYTES)
|
||||
{
|
||||
grub_dprintf ("cros", "Cannot receive %d bytes\n", din_len);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Prepare the output. */
|
||||
bytes = busbuf;
|
||||
*bytes++ = EC_CMD_VERSION0 + cmd_version;
|
||||
*bytes++ = cmd;
|
||||
*bytes++ = dout_len;
|
||||
memcpy (bytes, dout, dout_len);
|
||||
bytes += dout_len;
|
||||
|
||||
*bytes++ = cros_ec_calc_checksum (busbuf,
|
||||
CROS_EC_SPI_OUT_HDR_SIZE + dout_len);
|
||||
|
||||
while (grub_get_time_us () - last_transfer < 200)
|
||||
;
|
||||
|
||||
if (spi_start ())
|
||||
return -1;
|
||||
|
||||
/* Allow EC to ramp up clock after being awoken. */
|
||||
/* See chrome-os-partner:32223 for more details. */
|
||||
grub_microsleep (100);
|
||||
|
||||
if (spi_send (busbuf, out_bytes))
|
||||
{
|
||||
stop_bus ();
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Wait until the EC is ready. */
|
||||
if (wait_for_frame ())
|
||||
{
|
||||
stop_bus ();
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Read the response code and the data length. */
|
||||
bytes = busbuf;
|
||||
if (spi_read (bytes, 2))
|
||||
{
|
||||
stop_bus ();
|
||||
return -1;
|
||||
}
|
||||
uint8_t result = *bytes++;
|
||||
uint8_t length = *bytes++;
|
||||
|
||||
/* Make sure there's enough room for the data. */
|
||||
if (CROS_EC_SPI_IN_HDR_SIZE + length + 1 > MSG_BYTES)
|
||||
{
|
||||
grub_dprintf ("cros", "Received length %#02x too large\n", length);
|
||||
stop_bus ();
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Read the data and the checksum, and finish up. */
|
||||
if (spi_read (bytes, length + 1))
|
||||
{
|
||||
stop_bus ();
|
||||
return -1;
|
||||
}
|
||||
bytes += length;
|
||||
int expected = *bytes++;
|
||||
stop_bus ();
|
||||
|
||||
/* Check the integrity of the response. */
|
||||
if (result != 0)
|
||||
{
|
||||
grub_dprintf ("cros", "Received bad result code %d\n", result);
|
||||
return -result;
|
||||
}
|
||||
|
||||
int csum = cros_ec_calc_checksum (busbuf,
|
||||
CROS_EC_SPI_IN_HDR_SIZE + length);
|
||||
|
||||
if (csum != expected)
|
||||
{
|
||||
grub_dprintf ("cros", "Invalid checksum rx %#02x, calced %#02x\n",
|
||||
expected, csum);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* If the caller wants the response, copy it out for them. */
|
||||
if (length < din_len)
|
||||
din_len = length;
|
||||
if (din)
|
||||
{
|
||||
memcpy (din, (uint8_t *) busbuf + CROS_EC_SPI_IN_HDR_SIZE, din_len);
|
||||
}
|
||||
|
||||
return din_len;
|
||||
}
|
||||
|
||||
int
|
||||
grub_cros_ec_scan_keyboard (struct grub_cros_ec_keyscan *scan)
|
||||
{
|
||||
if (ec_command (EC_CMD_MKBP_STATE, 0, NULL, 0, scan,
|
||||
sizeof (*scan)) < (int) sizeof (*scan))
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
189
grub-core/term/arm/pl050.c
Normal file
189
grub-core/term/arm/pl050.c
Normal file
@@ -0,0 +1,189 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2007,2008,2009 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/ps2.h>
|
||||
#include <grub/fdtbus.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/machine/kernel.h>
|
||||
#include <grub/at_keyboard.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/term.h>
|
||||
#include <grub/time.h>
|
||||
#include <grub/ps2.h>
|
||||
#include <grub/fdtbus.h>
|
||||
|
||||
static volatile grub_uint32_t *pl050_regs;
|
||||
|
||||
struct grub_ps2_state ps2_state;
|
||||
|
||||
static void
|
||||
keyboard_controller_wait_until_ready (void)
|
||||
{
|
||||
while (! (pl050_regs[1] & 0x40));
|
||||
}
|
||||
|
||||
static grub_uint8_t
|
||||
wait_ack (void)
|
||||
{
|
||||
grub_uint64_t endtime;
|
||||
grub_uint8_t ack;
|
||||
|
||||
endtime = grub_get_time_ms () + 20;
|
||||
do
|
||||
ack = pl050_regs[2];
|
||||
while (ack != GRUB_AT_ACK && ack != GRUB_AT_NACK
|
||||
&& grub_get_time_ms () < endtime);
|
||||
return ack;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
write_mode (int mode)
|
||||
{
|
||||
unsigned i;
|
||||
for (i = 0; i < GRUB_AT_TRIES; i++)
|
||||
{
|
||||
grub_uint8_t ack;
|
||||
keyboard_controller_wait_until_ready ();
|
||||
pl050_regs[2] = 0xf0;
|
||||
keyboard_controller_wait_until_ready ();
|
||||
pl050_regs[2] = mode;
|
||||
keyboard_controller_wait_until_ready ();
|
||||
ack = wait_ack ();
|
||||
if (ack == GRUB_AT_NACK)
|
||||
continue;
|
||||
if (ack == GRUB_AT_ACK)
|
||||
break;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (i != GRUB_AT_TRIES);
|
||||
}
|
||||
|
||||
static int
|
||||
query_mode (void)
|
||||
{
|
||||
grub_uint8_t ret;
|
||||
int e;
|
||||
|
||||
e = write_mode (0);
|
||||
if (!e)
|
||||
return 0;
|
||||
|
||||
keyboard_controller_wait_until_ready ();
|
||||
|
||||
do
|
||||
ret = pl050_regs[2];
|
||||
while (ret == GRUB_AT_ACK);
|
||||
|
||||
/* QEMU translates the set even in no-translate mode. */
|
||||
if (ret == 0x43 || ret == 1)
|
||||
return 1;
|
||||
if (ret == 0x41 || ret == 2)
|
||||
return 2;
|
||||
if (ret == 0x3f || ret == 3)
|
||||
return 3;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
set_scancodes (void)
|
||||
{
|
||||
write_mode (2);
|
||||
ps2_state.current_set = query_mode ();
|
||||
grub_dprintf ("atkeyb", "returned set %d\n", ps2_state.current_set);
|
||||
if (ps2_state.current_set == 2)
|
||||
return;
|
||||
|
||||
write_mode (1);
|
||||
ps2_state.current_set = query_mode ();
|
||||
grub_dprintf ("atkeyb", "returned set %d\n", ps2_state.current_set);
|
||||
if (ps2_state.current_set == 1)
|
||||
return;
|
||||
grub_dprintf ("atkeyb", "no supported scancode set found\n");
|
||||
}
|
||||
|
||||
static void
|
||||
keyboard_controller_led (grub_uint8_t leds)
|
||||
{
|
||||
keyboard_controller_wait_until_ready ();
|
||||
pl050_regs[2] = 0xed;
|
||||
keyboard_controller_wait_until_ready ();
|
||||
pl050_regs[2] = leds & 0x7;
|
||||
}
|
||||
|
||||
/* If there is a character pending, return it;
|
||||
otherwise return GRUB_TERM_NO_KEY. */
|
||||
static int
|
||||
grub_pl050_keyboard_getkey (struct grub_term_input *term __attribute__ ((unused)))
|
||||
{
|
||||
grub_uint8_t at_key;
|
||||
int ret;
|
||||
grub_uint8_t old_led;
|
||||
|
||||
if (!(pl050_regs[1] & 0x10))
|
||||
return -1;
|
||||
at_key = pl050_regs[2];
|
||||
old_led = ps2_state.led_status;
|
||||
|
||||
ret = grub_ps2_process_incoming_byte (&ps2_state, at_key);
|
||||
if (old_led != ps2_state.led_status)
|
||||
keyboard_controller_led (ps2_state.led_status);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct grub_term_input grub_pl050_keyboard_term =
|
||||
{
|
||||
.name = "pl050_keyboard",
|
||||
.getkey = grub_pl050_keyboard_getkey
|
||||
};
|
||||
|
||||
static grub_err_t
|
||||
pl050_attach(const struct grub_fdtbus_dev *dev)
|
||||
{
|
||||
const grub_uint32_t *reg;
|
||||
reg = grub_fdtbus_get_prop (dev, "reg", 0);
|
||||
|
||||
/* Mouse. Nothing to do. */
|
||||
if (grub_be_to_cpu32 (*reg) == 0x7000)
|
||||
return 0;
|
||||
|
||||
pl050_regs = grub_fdtbus_map_reg (dev, 0, 0);
|
||||
|
||||
if (!grub_fdtbus_is_mapping_valid (pl050_regs))
|
||||
return grub_error (GRUB_ERR_IO, "could not map pl050");
|
||||
|
||||
ps2_state.at_keyboard_status = 0;
|
||||
set_scancodes ();
|
||||
keyboard_controller_led (ps2_state.led_status);
|
||||
|
||||
grub_term_register_input ("pl050_keyboard", &grub_pl050_keyboard_term);
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
struct grub_fdtbus_driver pl050 =
|
||||
{
|
||||
.compatible = "arm,pl050",
|
||||
.attach = pl050_attach
|
||||
};
|
||||
|
||||
void
|
||||
grub_pl050_init (void)
|
||||
{
|
||||
grub_fdtbus_register (&pl050);
|
||||
}
|
||||
@@ -22,212 +22,21 @@
|
||||
#include <grub/cpu/io.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/term.h>
|
||||
#include <grub/keyboard_layouts.h>
|
||||
#include <grub/time.h>
|
||||
#include <grub/loader.h>
|
||||
#include <grub/ps2.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
static short at_keyboard_status = 0;
|
||||
static int e0_received = 0;
|
||||
static int f0_received = 0;
|
||||
|
||||
static grub_uint8_t led_status;
|
||||
|
||||
#define KEYBOARD_LED_SCROLL (1 << 0)
|
||||
#define KEYBOARD_LED_NUM (1 << 1)
|
||||
#define KEYBOARD_LED_CAPS (1 << 2)
|
||||
|
||||
static grub_uint8_t grub_keyboard_controller_orig;
|
||||
static grub_uint8_t grub_keyboard_orig_set;
|
||||
static grub_uint8_t current_set;
|
||||
struct grub_ps2_state ps2_state;
|
||||
|
||||
static int ping_sent;
|
||||
|
||||
static void
|
||||
grub_keyboard_controller_init (void);
|
||||
|
||||
static const grub_uint8_t set1_mapping[128] =
|
||||
{
|
||||
/* 0x00 */ 0 /* Unused */, GRUB_KEYBOARD_KEY_ESCAPE,
|
||||
/* 0x02 */ GRUB_KEYBOARD_KEY_1, GRUB_KEYBOARD_KEY_2,
|
||||
/* 0x04 */ GRUB_KEYBOARD_KEY_3, GRUB_KEYBOARD_KEY_4,
|
||||
/* 0x06 */ GRUB_KEYBOARD_KEY_5, GRUB_KEYBOARD_KEY_6,
|
||||
/* 0x08 */ GRUB_KEYBOARD_KEY_7, GRUB_KEYBOARD_KEY_8,
|
||||
/* 0x0a */ GRUB_KEYBOARD_KEY_9, GRUB_KEYBOARD_KEY_0,
|
||||
/* 0x0c */ GRUB_KEYBOARD_KEY_DASH, GRUB_KEYBOARD_KEY_EQUAL,
|
||||
/* 0x0e */ GRUB_KEYBOARD_KEY_BACKSPACE, GRUB_KEYBOARD_KEY_TAB,
|
||||
/* 0x10 */ GRUB_KEYBOARD_KEY_Q, GRUB_KEYBOARD_KEY_W,
|
||||
/* 0x12 */ GRUB_KEYBOARD_KEY_E, GRUB_KEYBOARD_KEY_R,
|
||||
/* 0x14 */ GRUB_KEYBOARD_KEY_T, GRUB_KEYBOARD_KEY_Y,
|
||||
/* 0x16 */ GRUB_KEYBOARD_KEY_U, GRUB_KEYBOARD_KEY_I,
|
||||
/* 0x18 */ GRUB_KEYBOARD_KEY_O, GRUB_KEYBOARD_KEY_P,
|
||||
/* 0x1a */ GRUB_KEYBOARD_KEY_LBRACKET, GRUB_KEYBOARD_KEY_RBRACKET,
|
||||
/* 0x1c */ GRUB_KEYBOARD_KEY_ENTER, GRUB_KEYBOARD_KEY_LEFT_CTRL,
|
||||
/* 0x1e */ GRUB_KEYBOARD_KEY_A, GRUB_KEYBOARD_KEY_S,
|
||||
/* 0x20 */ GRUB_KEYBOARD_KEY_D, GRUB_KEYBOARD_KEY_F,
|
||||
/* 0x22 */ GRUB_KEYBOARD_KEY_G, GRUB_KEYBOARD_KEY_H,
|
||||
/* 0x24 */ GRUB_KEYBOARD_KEY_J, GRUB_KEYBOARD_KEY_K,
|
||||
/* 0x26 */ GRUB_KEYBOARD_KEY_L, GRUB_KEYBOARD_KEY_SEMICOLON,
|
||||
/* 0x28 */ GRUB_KEYBOARD_KEY_DQUOTE, GRUB_KEYBOARD_KEY_RQUOTE,
|
||||
/* 0x2a */ GRUB_KEYBOARD_KEY_LEFT_SHIFT, GRUB_KEYBOARD_KEY_BACKSLASH,
|
||||
/* 0x2c */ GRUB_KEYBOARD_KEY_Z, GRUB_KEYBOARD_KEY_X,
|
||||
/* 0x2e */ GRUB_KEYBOARD_KEY_C, GRUB_KEYBOARD_KEY_V,
|
||||
/* 0x30 */ GRUB_KEYBOARD_KEY_B, GRUB_KEYBOARD_KEY_N,
|
||||
/* 0x32 */ GRUB_KEYBOARD_KEY_M, GRUB_KEYBOARD_KEY_COMMA,
|
||||
/* 0x34 */ GRUB_KEYBOARD_KEY_DOT, GRUB_KEYBOARD_KEY_SLASH,
|
||||
/* 0x36 */ GRUB_KEYBOARD_KEY_RIGHT_SHIFT, GRUB_KEYBOARD_KEY_NUMMUL,
|
||||
/* 0x38 */ GRUB_KEYBOARD_KEY_LEFT_ALT, GRUB_KEYBOARD_KEY_SPACE,
|
||||
/* 0x3a */ GRUB_KEYBOARD_KEY_CAPS_LOCK, GRUB_KEYBOARD_KEY_F1,
|
||||
/* 0x3c */ GRUB_KEYBOARD_KEY_F2, GRUB_KEYBOARD_KEY_F3,
|
||||
/* 0x3e */ GRUB_KEYBOARD_KEY_F4, GRUB_KEYBOARD_KEY_F5,
|
||||
/* 0x40 */ GRUB_KEYBOARD_KEY_F6, GRUB_KEYBOARD_KEY_F7,
|
||||
/* 0x42 */ GRUB_KEYBOARD_KEY_F8, GRUB_KEYBOARD_KEY_F9,
|
||||
/* 0x44 */ GRUB_KEYBOARD_KEY_F10, GRUB_KEYBOARD_KEY_NUM_LOCK,
|
||||
/* 0x46 */ GRUB_KEYBOARD_KEY_SCROLL_LOCK, GRUB_KEYBOARD_KEY_NUM7,
|
||||
/* 0x48 */ GRUB_KEYBOARD_KEY_NUM8, GRUB_KEYBOARD_KEY_NUM9,
|
||||
/* 0x4a */ GRUB_KEYBOARD_KEY_NUMMINUS, GRUB_KEYBOARD_KEY_NUM4,
|
||||
/* 0x4c */ GRUB_KEYBOARD_KEY_NUM5, GRUB_KEYBOARD_KEY_NUM6,
|
||||
/* 0x4e */ GRUB_KEYBOARD_KEY_NUMPLUS, GRUB_KEYBOARD_KEY_NUM1,
|
||||
/* 0x50 */ GRUB_KEYBOARD_KEY_NUM2, GRUB_KEYBOARD_KEY_NUM3,
|
||||
/* 0x52 */ GRUB_KEYBOARD_KEY_NUM0, GRUB_KEYBOARD_KEY_NUMDOT,
|
||||
/* 0x54 */ 0, 0,
|
||||
/* 0x56 */ GRUB_KEYBOARD_KEY_102ND, GRUB_KEYBOARD_KEY_F11,
|
||||
/* 0x58 */ GRUB_KEYBOARD_KEY_F12, 0,
|
||||
/* 0x5a */ 0, 0,
|
||||
/* 0x5c */ 0, 0,
|
||||
/* 0x5e */ 0, 0,
|
||||
/* 0x60 */ 0, 0,
|
||||
/* 0x62 */ 0, 0,
|
||||
/* OLPC keys. Just mapped to normal keys. */
|
||||
/* 0x64 */ 0, GRUB_KEYBOARD_KEY_UP,
|
||||
/* 0x66 */ GRUB_KEYBOARD_KEY_DOWN, GRUB_KEYBOARD_KEY_LEFT,
|
||||
/* 0x68 */ GRUB_KEYBOARD_KEY_RIGHT, 0,
|
||||
/* 0x6a */ 0, 0,
|
||||
/* 0x6c */ 0, 0,
|
||||
/* 0x6e */ 0, 0,
|
||||
/* 0x70 */ 0, 0,
|
||||
/* 0x72 */ 0, GRUB_KEYBOARD_KEY_JP_RO,
|
||||
/* 0x74 */ 0, 0,
|
||||
/* 0x76 */ 0, 0,
|
||||
/* 0x78 */ 0, 0,
|
||||
/* 0x7a */ 0, 0,
|
||||
/* 0x7c */ 0, GRUB_KEYBOARD_KEY_JP_YEN,
|
||||
/* 0x7e */ GRUB_KEYBOARD_KEY_KPCOMMA
|
||||
};
|
||||
|
||||
static const struct
|
||||
{
|
||||
grub_uint8_t from, to;
|
||||
} set1_e0_mapping[] =
|
||||
{
|
||||
{0x1c, GRUB_KEYBOARD_KEY_NUMENTER},
|
||||
{0x1d, GRUB_KEYBOARD_KEY_RIGHT_CTRL},
|
||||
{0x35, GRUB_KEYBOARD_KEY_NUMSLASH },
|
||||
{0x38, GRUB_KEYBOARD_KEY_RIGHT_ALT},
|
||||
{0x47, GRUB_KEYBOARD_KEY_HOME},
|
||||
{0x48, GRUB_KEYBOARD_KEY_UP},
|
||||
{0x49, GRUB_KEYBOARD_KEY_PPAGE},
|
||||
{0x4b, GRUB_KEYBOARD_KEY_LEFT},
|
||||
{0x4d, GRUB_KEYBOARD_KEY_RIGHT},
|
||||
{0x4f, GRUB_KEYBOARD_KEY_END},
|
||||
{0x50, GRUB_KEYBOARD_KEY_DOWN},
|
||||
{0x51, GRUB_KEYBOARD_KEY_NPAGE},
|
||||
{0x52, GRUB_KEYBOARD_KEY_INSERT},
|
||||
{0x53, GRUB_KEYBOARD_KEY_DELETE},
|
||||
};
|
||||
|
||||
static const grub_uint8_t set2_mapping[256] =
|
||||
{
|
||||
/* 0x00 */ 0, GRUB_KEYBOARD_KEY_F9,
|
||||
/* 0x02 */ 0, GRUB_KEYBOARD_KEY_F5,
|
||||
/* 0x04 */ GRUB_KEYBOARD_KEY_F3, GRUB_KEYBOARD_KEY_F1,
|
||||
/* 0x06 */ GRUB_KEYBOARD_KEY_F2, GRUB_KEYBOARD_KEY_F12,
|
||||
/* 0x08 */ 0, GRUB_KEYBOARD_KEY_F10,
|
||||
/* 0x0a */ GRUB_KEYBOARD_KEY_F8, GRUB_KEYBOARD_KEY_F6,
|
||||
/* 0x0c */ GRUB_KEYBOARD_KEY_F4, GRUB_KEYBOARD_KEY_TAB,
|
||||
/* 0x0e */ GRUB_KEYBOARD_KEY_RQUOTE, 0,
|
||||
/* 0x10 */ 0, GRUB_KEYBOARD_KEY_LEFT_ALT,
|
||||
/* 0x12 */ GRUB_KEYBOARD_KEY_LEFT_SHIFT, 0,
|
||||
/* 0x14 */ GRUB_KEYBOARD_KEY_LEFT_CTRL, GRUB_KEYBOARD_KEY_Q,
|
||||
/* 0x16 */ GRUB_KEYBOARD_KEY_1, 0,
|
||||
/* 0x18 */ 0, 0,
|
||||
/* 0x1a */ GRUB_KEYBOARD_KEY_Z, GRUB_KEYBOARD_KEY_S,
|
||||
/* 0x1c */ GRUB_KEYBOARD_KEY_A, GRUB_KEYBOARD_KEY_W,
|
||||
/* 0x1e */ GRUB_KEYBOARD_KEY_2, 0,
|
||||
/* 0x20 */ 0, GRUB_KEYBOARD_KEY_C,
|
||||
/* 0x22 */ GRUB_KEYBOARD_KEY_X, GRUB_KEYBOARD_KEY_D,
|
||||
/* 0x24 */ GRUB_KEYBOARD_KEY_E, GRUB_KEYBOARD_KEY_4,
|
||||
/* 0x26 */ GRUB_KEYBOARD_KEY_3, 0,
|
||||
/* 0x28 */ 0, GRUB_KEYBOARD_KEY_SPACE,
|
||||
/* 0x2a */ GRUB_KEYBOARD_KEY_V, GRUB_KEYBOARD_KEY_F,
|
||||
/* 0x2c */ GRUB_KEYBOARD_KEY_T, GRUB_KEYBOARD_KEY_R,
|
||||
/* 0x2e */ GRUB_KEYBOARD_KEY_5, 0,
|
||||
/* 0x30 */ 0, GRUB_KEYBOARD_KEY_N,
|
||||
/* 0x32 */ GRUB_KEYBOARD_KEY_B, GRUB_KEYBOARD_KEY_H,
|
||||
/* 0x34 */ GRUB_KEYBOARD_KEY_G, GRUB_KEYBOARD_KEY_Y,
|
||||
/* 0x36 */ GRUB_KEYBOARD_KEY_6, 0,
|
||||
/* 0x38 */ 0, 0,
|
||||
/* 0x3a */ GRUB_KEYBOARD_KEY_M, GRUB_KEYBOARD_KEY_J,
|
||||
/* 0x3c */ GRUB_KEYBOARD_KEY_U, GRUB_KEYBOARD_KEY_7,
|
||||
/* 0x3e */ GRUB_KEYBOARD_KEY_8, 0,
|
||||
/* 0x40 */ 0, GRUB_KEYBOARD_KEY_COMMA,
|
||||
/* 0x42 */ GRUB_KEYBOARD_KEY_K, GRUB_KEYBOARD_KEY_I,
|
||||
/* 0x44 */ GRUB_KEYBOARD_KEY_O, GRUB_KEYBOARD_KEY_0,
|
||||
/* 0x46 */ GRUB_KEYBOARD_KEY_9, 0,
|
||||
/* 0x48 */ 0, GRUB_KEYBOARD_KEY_DOT,
|
||||
/* 0x4a */ GRUB_KEYBOARD_KEY_SLASH, GRUB_KEYBOARD_KEY_L,
|
||||
/* 0x4c */ GRUB_KEYBOARD_KEY_SEMICOLON, GRUB_KEYBOARD_KEY_P,
|
||||
/* 0x4e */ GRUB_KEYBOARD_KEY_DASH, 0,
|
||||
/* 0x50 */ 0, GRUB_KEYBOARD_KEY_JP_RO,
|
||||
/* 0x52 */ GRUB_KEYBOARD_KEY_DQUOTE, 0,
|
||||
/* 0x54 */ GRUB_KEYBOARD_KEY_LBRACKET, GRUB_KEYBOARD_KEY_EQUAL,
|
||||
/* 0x56 */ 0, 0,
|
||||
/* 0x58 */ GRUB_KEYBOARD_KEY_CAPS_LOCK, GRUB_KEYBOARD_KEY_RIGHT_SHIFT,
|
||||
/* 0x5a */ GRUB_KEYBOARD_KEY_ENTER, GRUB_KEYBOARD_KEY_RBRACKET,
|
||||
/* 0x5c */ 0, GRUB_KEYBOARD_KEY_BACKSLASH,
|
||||
/* 0x5e */ 0, 0,
|
||||
/* 0x60 */ 0, GRUB_KEYBOARD_KEY_102ND,
|
||||
/* 0x62 */ 0, 0,
|
||||
/* 0x64 */ 0, 0,
|
||||
/* 0x66 */ GRUB_KEYBOARD_KEY_BACKSPACE, 0,
|
||||
/* 0x68 */ 0, GRUB_KEYBOARD_KEY_NUM1,
|
||||
/* 0x6a */ GRUB_KEYBOARD_KEY_JP_YEN, GRUB_KEYBOARD_KEY_NUM4,
|
||||
/* 0x6c */ GRUB_KEYBOARD_KEY_NUM7, GRUB_KEYBOARD_KEY_KPCOMMA,
|
||||
/* 0x6e */ 0, 0,
|
||||
/* 0x70 */ GRUB_KEYBOARD_KEY_NUM0, GRUB_KEYBOARD_KEY_NUMDOT,
|
||||
/* 0x72 */ GRUB_KEYBOARD_KEY_NUM2, GRUB_KEYBOARD_KEY_NUM5,
|
||||
/* 0x74 */ GRUB_KEYBOARD_KEY_NUM6, GRUB_KEYBOARD_KEY_NUM8,
|
||||
/* 0x76 */ GRUB_KEYBOARD_KEY_ESCAPE, GRUB_KEYBOARD_KEY_NUM_LOCK,
|
||||
/* 0x78 */ GRUB_KEYBOARD_KEY_F11, GRUB_KEYBOARD_KEY_NUMPLUS,
|
||||
/* 0x7a */ GRUB_KEYBOARD_KEY_NUM3, GRUB_KEYBOARD_KEY_NUMMINUS,
|
||||
/* 0x7c */ GRUB_KEYBOARD_KEY_NUMMUL, GRUB_KEYBOARD_KEY_NUM9,
|
||||
/* 0x7e */ GRUB_KEYBOARD_KEY_SCROLL_LOCK, 0,
|
||||
/* 0x80 */ 0, 0,
|
||||
/* 0x82 */ 0, GRUB_KEYBOARD_KEY_F7,
|
||||
};
|
||||
|
||||
static const struct
|
||||
{
|
||||
grub_uint8_t from, to;
|
||||
} set2_e0_mapping[] =
|
||||
{
|
||||
{0x11, GRUB_KEYBOARD_KEY_RIGHT_ALT},
|
||||
{0x14, GRUB_KEYBOARD_KEY_RIGHT_CTRL},
|
||||
{0x4a, GRUB_KEYBOARD_KEY_NUMSLASH},
|
||||
{0x5a, GRUB_KEYBOARD_KEY_NUMENTER},
|
||||
{0x69, GRUB_KEYBOARD_KEY_END},
|
||||
{0x6b, GRUB_KEYBOARD_KEY_LEFT},
|
||||
{0x6c, GRUB_KEYBOARD_KEY_HOME},
|
||||
{0x70, GRUB_KEYBOARD_KEY_INSERT},
|
||||
{0x71, GRUB_KEYBOARD_KEY_DELETE},
|
||||
{0x72, GRUB_KEYBOARD_KEY_DOWN},
|
||||
{0x74, GRUB_KEYBOARD_KEY_RIGHT},
|
||||
{0x75, GRUB_KEYBOARD_KEY_UP},
|
||||
{0x7a, GRUB_KEYBOARD_KEY_NPAGE},
|
||||
{0x7d, GRUB_KEYBOARD_KEY_PPAGE},
|
||||
};
|
||||
|
||||
static int ping_sent;
|
||||
|
||||
static void
|
||||
keyboard_controller_wait_until_ready (void)
|
||||
{
|
||||
@@ -350,12 +159,12 @@ set_scancodes (void)
|
||||
if (!grub_keyboard_orig_set)
|
||||
{
|
||||
grub_dprintf ("atkeyb", "No sets support assumed\n");
|
||||
current_set = 1;
|
||||
ps2_state.current_set = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
#if !USE_SCANCODE_SET
|
||||
current_set = 1;
|
||||
ps2_state.current_set = 1;
|
||||
return;
|
||||
#else
|
||||
|
||||
@@ -363,15 +172,15 @@ set_scancodes (void)
|
||||
& ~KEYBOARD_AT_TRANSLATE);
|
||||
|
||||
write_mode (2);
|
||||
current_set = query_mode ();
|
||||
grub_dprintf ("atkeyb", "returned set %d\n", current_set);
|
||||
if (current_set == 2)
|
||||
ps2_state.current_set = query_mode ();
|
||||
grub_dprintf ("atkeyb", "returned set %d\n", ps2_state.current_set);
|
||||
if (ps2_state.current_set == 2)
|
||||
return;
|
||||
|
||||
write_mode (1);
|
||||
current_set = query_mode ();
|
||||
grub_dprintf ("atkeyb", "returned set %d\n", current_set);
|
||||
if (current_set == 1)
|
||||
ps2_state.current_set = query_mode ();
|
||||
grub_dprintf ("atkeyb", "returned set %d\n", ps2_state.current_set);
|
||||
if (ps2_state.current_set == 1)
|
||||
return;
|
||||
grub_dprintf ("atkeyb", "no supported scancode set found\n");
|
||||
#endif
|
||||
@@ -386,164 +195,10 @@ keyboard_controller_led (grub_uint8_t leds)
|
||||
grub_outb (leds & 0x7, KEYBOARD_REG_DATA);
|
||||
}
|
||||
|
||||
static int
|
||||
fetch_key (int *is_break)
|
||||
{
|
||||
int was_ext = 0;
|
||||
grub_uint8_t at_key;
|
||||
int ret = 0;
|
||||
|
||||
if (! KEYBOARD_ISREADY (grub_inb (KEYBOARD_REG_STATUS)))
|
||||
return -1;
|
||||
at_key = grub_inb (KEYBOARD_REG_DATA);
|
||||
/* May happen if no keyboard is connected. Just ignore this. */
|
||||
if (at_key == 0xff)
|
||||
return -1;
|
||||
if (at_key == 0xe0)
|
||||
{
|
||||
e0_received = 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((current_set == 2 || current_set == 3) && at_key == 0xf0)
|
||||
{
|
||||
f0_received = 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Setting LEDs may generate ACKs. */
|
||||
if (at_key == GRUB_AT_ACK)
|
||||
return -1;
|
||||
|
||||
was_ext = e0_received;
|
||||
e0_received = 0;
|
||||
|
||||
switch (current_set)
|
||||
{
|
||||
case 1:
|
||||
*is_break = !!(at_key & 0x80);
|
||||
if (!was_ext)
|
||||
ret = set1_mapping[at_key & 0x7f];
|
||||
else
|
||||
{
|
||||
unsigned i;
|
||||
for (i = 0; i < ARRAY_SIZE (set1_e0_mapping); i++)
|
||||
if (set1_e0_mapping[i].from == (at_key & 0x7f))
|
||||
{
|
||||
ret = set1_e0_mapping[i].to;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
*is_break = f0_received;
|
||||
f0_received = 0;
|
||||
if (!was_ext)
|
||||
ret = set2_mapping[at_key];
|
||||
else
|
||||
{
|
||||
unsigned i;
|
||||
for (i = 0; i < ARRAY_SIZE (set2_e0_mapping); i++)
|
||||
if (set2_e0_mapping[i].from == at_key)
|
||||
{
|
||||
ret = set2_e0_mapping[i].to;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
if (!ret)
|
||||
{
|
||||
if (was_ext)
|
||||
grub_dprintf ("atkeyb", "Unknown key 0xe0+0x%02x from set %d\n",
|
||||
at_key, current_set);
|
||||
else
|
||||
grub_dprintf ("atkeyb", "Unknown key 0x%02x from set %d\n",
|
||||
at_key, current_set);
|
||||
return -1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* FIXME: This should become an interrupt service routine. For now
|
||||
it's just used to catch events from control keys. */
|
||||
static int
|
||||
grub_keyboard_isr (grub_keyboard_key_t key, int is_break)
|
||||
{
|
||||
if (!is_break)
|
||||
switch (key)
|
||||
{
|
||||
case GRUB_KEYBOARD_KEY_LEFT_SHIFT:
|
||||
at_keyboard_status |= GRUB_TERM_STATUS_LSHIFT;
|
||||
return 1;
|
||||
case GRUB_KEYBOARD_KEY_RIGHT_SHIFT:
|
||||
at_keyboard_status |= GRUB_TERM_STATUS_RSHIFT;
|
||||
return 1;
|
||||
case GRUB_KEYBOARD_KEY_LEFT_CTRL:
|
||||
at_keyboard_status |= GRUB_TERM_STATUS_LCTRL;
|
||||
return 1;
|
||||
case GRUB_KEYBOARD_KEY_RIGHT_CTRL:
|
||||
at_keyboard_status |= GRUB_TERM_STATUS_RCTRL;
|
||||
return 1;
|
||||
case GRUB_KEYBOARD_KEY_RIGHT_ALT:
|
||||
at_keyboard_status |= GRUB_TERM_STATUS_RALT;
|
||||
return 1;
|
||||
case GRUB_KEYBOARD_KEY_LEFT_ALT:
|
||||
at_keyboard_status |= GRUB_TERM_STATUS_LALT;
|
||||
return 1;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
switch (key)
|
||||
{
|
||||
case GRUB_KEYBOARD_KEY_LEFT_SHIFT:
|
||||
at_keyboard_status &= ~GRUB_TERM_STATUS_LSHIFT;
|
||||
return 1;
|
||||
case GRUB_KEYBOARD_KEY_RIGHT_SHIFT:
|
||||
at_keyboard_status &= ~GRUB_TERM_STATUS_RSHIFT;
|
||||
return 1;
|
||||
case GRUB_KEYBOARD_KEY_LEFT_CTRL:
|
||||
at_keyboard_status &= ~GRUB_TERM_STATUS_LCTRL;
|
||||
return 1;
|
||||
case GRUB_KEYBOARD_KEY_RIGHT_CTRL:
|
||||
at_keyboard_status &= ~GRUB_TERM_STATUS_RCTRL;
|
||||
return 1;
|
||||
case GRUB_KEYBOARD_KEY_RIGHT_ALT:
|
||||
at_keyboard_status &= ~GRUB_TERM_STATUS_RALT;
|
||||
return 1;
|
||||
case GRUB_KEYBOARD_KEY_LEFT_ALT:
|
||||
at_keyboard_status &= ~GRUB_TERM_STATUS_LALT;
|
||||
return 1;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* If there is a raw key pending, return it; otherwise return -1. */
|
||||
static int
|
||||
grub_keyboard_getkey (void)
|
||||
{
|
||||
int key;
|
||||
int is_break = 0;
|
||||
|
||||
key = fetch_key (&is_break);
|
||||
if (key == -1)
|
||||
return -1;
|
||||
|
||||
if (grub_keyboard_isr (key, is_break))
|
||||
return -1;
|
||||
if (is_break)
|
||||
return -1;
|
||||
return key;
|
||||
}
|
||||
|
||||
int
|
||||
grub_at_keyboard_is_alive (void)
|
||||
{
|
||||
if (current_set != 0)
|
||||
if (ps2_state.current_set != 0)
|
||||
return 1;
|
||||
if (ping_sent
|
||||
&& KEYBOARD_COMMAND_ISREADY (grub_inb (KEYBOARD_REG_STATUS))
|
||||
@@ -566,51 +221,28 @@ grub_at_keyboard_is_alive (void)
|
||||
static int
|
||||
grub_at_keyboard_getkey (struct grub_term_input *term __attribute__ ((unused)))
|
||||
{
|
||||
int code;
|
||||
grub_uint8_t at_key;
|
||||
int ret;
|
||||
grub_uint8_t old_led;
|
||||
|
||||
if (!grub_at_keyboard_is_alive ())
|
||||
return GRUB_TERM_NO_KEY;
|
||||
|
||||
code = grub_keyboard_getkey ();
|
||||
if (code == -1)
|
||||
return GRUB_TERM_NO_KEY;
|
||||
#ifdef DEBUG_AT_KEYBOARD
|
||||
grub_dprintf ("atkeyb", "Detected key 0x%x\n", code);
|
||||
#endif
|
||||
switch (code)
|
||||
{
|
||||
case GRUB_KEYBOARD_KEY_CAPS_LOCK:
|
||||
at_keyboard_status ^= GRUB_TERM_STATUS_CAPS;
|
||||
led_status ^= KEYBOARD_LED_CAPS;
|
||||
keyboard_controller_led (led_status);
|
||||
if (! KEYBOARD_ISREADY (grub_inb (KEYBOARD_REG_STATUS)))
|
||||
return -1;
|
||||
at_key = grub_inb (KEYBOARD_REG_DATA);
|
||||
old_led = ps2_state.led_status;
|
||||
|
||||
#ifdef DEBUG_AT_KEYBOARD
|
||||
grub_dprintf ("atkeyb", "caps_lock = %d\n", !!(at_keyboard_status & GRUB_KEYBOARD_STATUS_CAPS_LOCK));
|
||||
#endif
|
||||
return GRUB_TERM_NO_KEY;
|
||||
case GRUB_KEYBOARD_KEY_NUM_LOCK:
|
||||
at_keyboard_status ^= GRUB_TERM_STATUS_NUM;
|
||||
led_status ^= KEYBOARD_LED_NUM;
|
||||
keyboard_controller_led (led_status);
|
||||
|
||||
#ifdef DEBUG_AT_KEYBOARD
|
||||
grub_dprintf ("atkeyb", "num_lock = %d\n", !!(at_keyboard_status & GRUB_KEYBOARD_STATUS_NUM_LOCK));
|
||||
#endif
|
||||
return GRUB_TERM_NO_KEY;
|
||||
case GRUB_KEYBOARD_KEY_SCROLL_LOCK:
|
||||
at_keyboard_status ^= GRUB_TERM_STATUS_SCROLL;
|
||||
led_status ^= KEYBOARD_LED_SCROLL;
|
||||
keyboard_controller_led (led_status);
|
||||
return GRUB_TERM_NO_KEY;
|
||||
default:
|
||||
return grub_term_map_key (code, at_keyboard_status);
|
||||
}
|
||||
ret = grub_ps2_process_incoming_byte (&ps2_state, at_key);
|
||||
if (old_led != ps2_state.led_status)
|
||||
keyboard_controller_led (ps2_state.led_status);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
grub_keyboard_controller_init (void)
|
||||
{
|
||||
at_keyboard_status = 0;
|
||||
ps2_state.at_keyboard_status = 0;
|
||||
/* Drain input buffer. */
|
||||
while (1)
|
||||
{
|
||||
@@ -632,13 +264,13 @@ grub_keyboard_controller_init (void)
|
||||
grub_keyboard_orig_set = query_mode ();
|
||||
#endif
|
||||
set_scancodes ();
|
||||
keyboard_controller_led (led_status);
|
||||
keyboard_controller_led (ps2_state.led_status);
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_keyboard_controller_fini (struct grub_term_input *term __attribute__ ((unused)))
|
||||
{
|
||||
if (current_set == 0)
|
||||
if (ps2_state.current_set == 0)
|
||||
return GRUB_ERR_NONE;
|
||||
if (grub_keyboard_orig_set)
|
||||
write_mode (grub_keyboard_orig_set);
|
||||
@@ -655,7 +287,7 @@ grub_at_fini_hw (int noreturn __attribute__ ((unused)))
|
||||
static grub_err_t
|
||||
grub_at_restore_hw (void)
|
||||
{
|
||||
if (current_set == 0)
|
||||
if (ps2_state.current_set == 0)
|
||||
return GRUB_ERR_NONE;
|
||||
|
||||
/* Drain input buffer. */
|
||||
@@ -668,7 +300,7 @@ grub_at_restore_hw (void)
|
||||
grub_inb (KEYBOARD_REG_DATA);
|
||||
}
|
||||
set_scancodes ();
|
||||
keyboard_controller_led (led_status);
|
||||
keyboard_controller_led (ps2_state.led_status);
|
||||
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <grub/time.h>
|
||||
#include <grub/terminfo.h>
|
||||
#include <grub/dl.h>
|
||||
#include <grub/i386/coreboot/lbio.h>
|
||||
#include <grub/coreboot/lbio.h>
|
||||
#include <grub/command.h>
|
||||
#include <grub/normal.h>
|
||||
|
||||
|
||||
387
grub-core/term/ps2.c
Normal file
387
grub-core/term/ps2.c
Normal file
@@ -0,0 +1,387 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2007,2008,2009 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/dl.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/term.h>
|
||||
#include <grub/keyboard_layouts.h>
|
||||
#include <grub/ps2.h>
|
||||
|
||||
#define KEYBOARD_LED_SCROLL (1 << 0)
|
||||
#define KEYBOARD_LED_NUM (1 << 1)
|
||||
#define KEYBOARD_LED_CAPS (1 << 2)
|
||||
|
||||
static const grub_uint8_t set1_mapping[128] =
|
||||
{
|
||||
/* 0x00 */ 0 /* Unused */, GRUB_KEYBOARD_KEY_ESCAPE,
|
||||
/* 0x02 */ GRUB_KEYBOARD_KEY_1, GRUB_KEYBOARD_KEY_2,
|
||||
/* 0x04 */ GRUB_KEYBOARD_KEY_3, GRUB_KEYBOARD_KEY_4,
|
||||
/* 0x06 */ GRUB_KEYBOARD_KEY_5, GRUB_KEYBOARD_KEY_6,
|
||||
/* 0x08 */ GRUB_KEYBOARD_KEY_7, GRUB_KEYBOARD_KEY_8,
|
||||
/* 0x0a */ GRUB_KEYBOARD_KEY_9, GRUB_KEYBOARD_KEY_0,
|
||||
/* 0x0c */ GRUB_KEYBOARD_KEY_DASH, GRUB_KEYBOARD_KEY_EQUAL,
|
||||
/* 0x0e */ GRUB_KEYBOARD_KEY_BACKSPACE, GRUB_KEYBOARD_KEY_TAB,
|
||||
/* 0x10 */ GRUB_KEYBOARD_KEY_Q, GRUB_KEYBOARD_KEY_W,
|
||||
/* 0x12 */ GRUB_KEYBOARD_KEY_E, GRUB_KEYBOARD_KEY_R,
|
||||
/* 0x14 */ GRUB_KEYBOARD_KEY_T, GRUB_KEYBOARD_KEY_Y,
|
||||
/* 0x16 */ GRUB_KEYBOARD_KEY_U, GRUB_KEYBOARD_KEY_I,
|
||||
/* 0x18 */ GRUB_KEYBOARD_KEY_O, GRUB_KEYBOARD_KEY_P,
|
||||
/* 0x1a */ GRUB_KEYBOARD_KEY_LBRACKET, GRUB_KEYBOARD_KEY_RBRACKET,
|
||||
/* 0x1c */ GRUB_KEYBOARD_KEY_ENTER, GRUB_KEYBOARD_KEY_LEFT_CTRL,
|
||||
/* 0x1e */ GRUB_KEYBOARD_KEY_A, GRUB_KEYBOARD_KEY_S,
|
||||
/* 0x20 */ GRUB_KEYBOARD_KEY_D, GRUB_KEYBOARD_KEY_F,
|
||||
/* 0x22 */ GRUB_KEYBOARD_KEY_G, GRUB_KEYBOARD_KEY_H,
|
||||
/* 0x24 */ GRUB_KEYBOARD_KEY_J, GRUB_KEYBOARD_KEY_K,
|
||||
/* 0x26 */ GRUB_KEYBOARD_KEY_L, GRUB_KEYBOARD_KEY_SEMICOLON,
|
||||
/* 0x28 */ GRUB_KEYBOARD_KEY_DQUOTE, GRUB_KEYBOARD_KEY_RQUOTE,
|
||||
/* 0x2a */ GRUB_KEYBOARD_KEY_LEFT_SHIFT, GRUB_KEYBOARD_KEY_BACKSLASH,
|
||||
/* 0x2c */ GRUB_KEYBOARD_KEY_Z, GRUB_KEYBOARD_KEY_X,
|
||||
/* 0x2e */ GRUB_KEYBOARD_KEY_C, GRUB_KEYBOARD_KEY_V,
|
||||
/* 0x30 */ GRUB_KEYBOARD_KEY_B, GRUB_KEYBOARD_KEY_N,
|
||||
/* 0x32 */ GRUB_KEYBOARD_KEY_M, GRUB_KEYBOARD_KEY_COMMA,
|
||||
/* 0x34 */ GRUB_KEYBOARD_KEY_DOT, GRUB_KEYBOARD_KEY_SLASH,
|
||||
/* 0x36 */ GRUB_KEYBOARD_KEY_RIGHT_SHIFT, GRUB_KEYBOARD_KEY_NUMMUL,
|
||||
/* 0x38 */ GRUB_KEYBOARD_KEY_LEFT_ALT, GRUB_KEYBOARD_KEY_SPACE,
|
||||
/* 0x3a */ GRUB_KEYBOARD_KEY_CAPS_LOCK, GRUB_KEYBOARD_KEY_F1,
|
||||
/* 0x3c */ GRUB_KEYBOARD_KEY_F2, GRUB_KEYBOARD_KEY_F3,
|
||||
/* 0x3e */ GRUB_KEYBOARD_KEY_F4, GRUB_KEYBOARD_KEY_F5,
|
||||
/* 0x40 */ GRUB_KEYBOARD_KEY_F6, GRUB_KEYBOARD_KEY_F7,
|
||||
/* 0x42 */ GRUB_KEYBOARD_KEY_F8, GRUB_KEYBOARD_KEY_F9,
|
||||
/* 0x44 */ GRUB_KEYBOARD_KEY_F10, GRUB_KEYBOARD_KEY_NUM_LOCK,
|
||||
/* 0x46 */ GRUB_KEYBOARD_KEY_SCROLL_LOCK, GRUB_KEYBOARD_KEY_NUM7,
|
||||
/* 0x48 */ GRUB_KEYBOARD_KEY_NUM8, GRUB_KEYBOARD_KEY_NUM9,
|
||||
/* 0x4a */ GRUB_KEYBOARD_KEY_NUMMINUS, GRUB_KEYBOARD_KEY_NUM4,
|
||||
/* 0x4c */ GRUB_KEYBOARD_KEY_NUM5, GRUB_KEYBOARD_KEY_NUM6,
|
||||
/* 0x4e */ GRUB_KEYBOARD_KEY_NUMPLUS, GRUB_KEYBOARD_KEY_NUM1,
|
||||
/* 0x50 */ GRUB_KEYBOARD_KEY_NUM2, GRUB_KEYBOARD_KEY_NUM3,
|
||||
/* 0x52 */ GRUB_KEYBOARD_KEY_NUM0, GRUB_KEYBOARD_KEY_NUMDOT,
|
||||
/* 0x54 */ 0, 0,
|
||||
/* 0x56 */ GRUB_KEYBOARD_KEY_102ND, GRUB_KEYBOARD_KEY_F11,
|
||||
/* 0x58 */ GRUB_KEYBOARD_KEY_F12, 0,
|
||||
/* 0x5a */ 0, 0,
|
||||
/* 0x5c */ 0, 0,
|
||||
/* 0x5e */ 0, 0,
|
||||
/* 0x60 */ 0, 0,
|
||||
/* 0x62 */ 0, 0,
|
||||
/* OLPC keys. Just mapped to normal keys. */
|
||||
/* 0x64 */ 0, GRUB_KEYBOARD_KEY_UP,
|
||||
/* 0x66 */ GRUB_KEYBOARD_KEY_DOWN, GRUB_KEYBOARD_KEY_LEFT,
|
||||
/* 0x68 */ GRUB_KEYBOARD_KEY_RIGHT, 0,
|
||||
/* 0x6a */ 0, 0,
|
||||
/* 0x6c */ 0, 0,
|
||||
/* 0x6e */ 0, 0,
|
||||
/* 0x70 */ 0, 0,
|
||||
/* 0x72 */ 0, GRUB_KEYBOARD_KEY_JP_RO,
|
||||
/* 0x74 */ 0, 0,
|
||||
/* 0x76 */ 0, 0,
|
||||
/* 0x78 */ 0, 0,
|
||||
/* 0x7a */ 0, 0,
|
||||
/* 0x7c */ 0, GRUB_KEYBOARD_KEY_JP_YEN,
|
||||
/* 0x7e */ GRUB_KEYBOARD_KEY_KPCOMMA
|
||||
};
|
||||
|
||||
static const struct
|
||||
{
|
||||
grub_uint8_t from, to;
|
||||
} set1_e0_mapping[] =
|
||||
{
|
||||
{0x1c, GRUB_KEYBOARD_KEY_NUMENTER},
|
||||
{0x1d, GRUB_KEYBOARD_KEY_RIGHT_CTRL},
|
||||
{0x35, GRUB_KEYBOARD_KEY_NUMSLASH },
|
||||
{0x38, GRUB_KEYBOARD_KEY_RIGHT_ALT},
|
||||
{0x47, GRUB_KEYBOARD_KEY_HOME},
|
||||
{0x48, GRUB_KEYBOARD_KEY_UP},
|
||||
{0x49, GRUB_KEYBOARD_KEY_PPAGE},
|
||||
{0x4b, GRUB_KEYBOARD_KEY_LEFT},
|
||||
{0x4d, GRUB_KEYBOARD_KEY_RIGHT},
|
||||
{0x4f, GRUB_KEYBOARD_KEY_END},
|
||||
{0x50, GRUB_KEYBOARD_KEY_DOWN},
|
||||
{0x51, GRUB_KEYBOARD_KEY_NPAGE},
|
||||
{0x52, GRUB_KEYBOARD_KEY_INSERT},
|
||||
{0x53, GRUB_KEYBOARD_KEY_DELETE},
|
||||
};
|
||||
|
||||
static const grub_uint8_t set2_mapping[256] =
|
||||
{
|
||||
/* 0x00 */ 0, GRUB_KEYBOARD_KEY_F9,
|
||||
/* 0x02 */ 0, GRUB_KEYBOARD_KEY_F5,
|
||||
/* 0x04 */ GRUB_KEYBOARD_KEY_F3, GRUB_KEYBOARD_KEY_F1,
|
||||
/* 0x06 */ GRUB_KEYBOARD_KEY_F2, GRUB_KEYBOARD_KEY_F12,
|
||||
/* 0x08 */ 0, GRUB_KEYBOARD_KEY_F10,
|
||||
/* 0x0a */ GRUB_KEYBOARD_KEY_F8, GRUB_KEYBOARD_KEY_F6,
|
||||
/* 0x0c */ GRUB_KEYBOARD_KEY_F4, GRUB_KEYBOARD_KEY_TAB,
|
||||
/* 0x0e */ GRUB_KEYBOARD_KEY_RQUOTE, 0,
|
||||
/* 0x10 */ 0, GRUB_KEYBOARD_KEY_LEFT_ALT,
|
||||
/* 0x12 */ GRUB_KEYBOARD_KEY_LEFT_SHIFT, 0,
|
||||
/* 0x14 */ GRUB_KEYBOARD_KEY_LEFT_CTRL, GRUB_KEYBOARD_KEY_Q,
|
||||
/* 0x16 */ GRUB_KEYBOARD_KEY_1, 0,
|
||||
/* 0x18 */ 0, 0,
|
||||
/* 0x1a */ GRUB_KEYBOARD_KEY_Z, GRUB_KEYBOARD_KEY_S,
|
||||
/* 0x1c */ GRUB_KEYBOARD_KEY_A, GRUB_KEYBOARD_KEY_W,
|
||||
/* 0x1e */ GRUB_KEYBOARD_KEY_2, 0,
|
||||
/* 0x20 */ 0, GRUB_KEYBOARD_KEY_C,
|
||||
/* 0x22 */ GRUB_KEYBOARD_KEY_X, GRUB_KEYBOARD_KEY_D,
|
||||
/* 0x24 */ GRUB_KEYBOARD_KEY_E, GRUB_KEYBOARD_KEY_4,
|
||||
/* 0x26 */ GRUB_KEYBOARD_KEY_3, 0,
|
||||
/* 0x28 */ 0, GRUB_KEYBOARD_KEY_SPACE,
|
||||
/* 0x2a */ GRUB_KEYBOARD_KEY_V, GRUB_KEYBOARD_KEY_F,
|
||||
/* 0x2c */ GRUB_KEYBOARD_KEY_T, GRUB_KEYBOARD_KEY_R,
|
||||
/* 0x2e */ GRUB_KEYBOARD_KEY_5, 0,
|
||||
/* 0x30 */ 0, GRUB_KEYBOARD_KEY_N,
|
||||
/* 0x32 */ GRUB_KEYBOARD_KEY_B, GRUB_KEYBOARD_KEY_H,
|
||||
/* 0x34 */ GRUB_KEYBOARD_KEY_G, GRUB_KEYBOARD_KEY_Y,
|
||||
/* 0x36 */ GRUB_KEYBOARD_KEY_6, 0,
|
||||
/* 0x38 */ 0, 0,
|
||||
/* 0x3a */ GRUB_KEYBOARD_KEY_M, GRUB_KEYBOARD_KEY_J,
|
||||
/* 0x3c */ GRUB_KEYBOARD_KEY_U, GRUB_KEYBOARD_KEY_7,
|
||||
/* 0x3e */ GRUB_KEYBOARD_KEY_8, 0,
|
||||
/* 0x40 */ 0, GRUB_KEYBOARD_KEY_COMMA,
|
||||
/* 0x42 */ GRUB_KEYBOARD_KEY_K, GRUB_KEYBOARD_KEY_I,
|
||||
/* 0x44 */ GRUB_KEYBOARD_KEY_O, GRUB_KEYBOARD_KEY_0,
|
||||
/* 0x46 */ GRUB_KEYBOARD_KEY_9, 0,
|
||||
/* 0x48 */ 0, GRUB_KEYBOARD_KEY_DOT,
|
||||
/* 0x4a */ GRUB_KEYBOARD_KEY_SLASH, GRUB_KEYBOARD_KEY_L,
|
||||
/* 0x4c */ GRUB_KEYBOARD_KEY_SEMICOLON, GRUB_KEYBOARD_KEY_P,
|
||||
/* 0x4e */ GRUB_KEYBOARD_KEY_DASH, 0,
|
||||
/* 0x50 */ 0, GRUB_KEYBOARD_KEY_JP_RO,
|
||||
/* 0x52 */ GRUB_KEYBOARD_KEY_DQUOTE, 0,
|
||||
/* 0x54 */ GRUB_KEYBOARD_KEY_LBRACKET, GRUB_KEYBOARD_KEY_EQUAL,
|
||||
/* 0x56 */ 0, 0,
|
||||
/* 0x58 */ GRUB_KEYBOARD_KEY_CAPS_LOCK, GRUB_KEYBOARD_KEY_RIGHT_SHIFT,
|
||||
/* 0x5a */ GRUB_KEYBOARD_KEY_ENTER, GRUB_KEYBOARD_KEY_RBRACKET,
|
||||
/* 0x5c */ 0, GRUB_KEYBOARD_KEY_BACKSLASH,
|
||||
/* 0x5e */ 0, 0,
|
||||
/* 0x60 */ 0, GRUB_KEYBOARD_KEY_102ND,
|
||||
/* 0x62 */ 0, 0,
|
||||
/* 0x64 */ 0, 0,
|
||||
/* 0x66 */ GRUB_KEYBOARD_KEY_BACKSPACE, 0,
|
||||
/* 0x68 */ 0, GRUB_KEYBOARD_KEY_NUM1,
|
||||
/* 0x6a */ GRUB_KEYBOARD_KEY_JP_YEN, GRUB_KEYBOARD_KEY_NUM4,
|
||||
/* 0x6c */ GRUB_KEYBOARD_KEY_NUM7, GRUB_KEYBOARD_KEY_KPCOMMA,
|
||||
/* 0x6e */ 0, 0,
|
||||
/* 0x70 */ GRUB_KEYBOARD_KEY_NUM0, GRUB_KEYBOARD_KEY_NUMDOT,
|
||||
/* 0x72 */ GRUB_KEYBOARD_KEY_NUM2, GRUB_KEYBOARD_KEY_NUM5,
|
||||
/* 0x74 */ GRUB_KEYBOARD_KEY_NUM6, GRUB_KEYBOARD_KEY_NUM8,
|
||||
/* 0x76 */ GRUB_KEYBOARD_KEY_ESCAPE, GRUB_KEYBOARD_KEY_NUM_LOCK,
|
||||
/* 0x78 */ GRUB_KEYBOARD_KEY_F11, GRUB_KEYBOARD_KEY_NUMPLUS,
|
||||
/* 0x7a */ GRUB_KEYBOARD_KEY_NUM3, GRUB_KEYBOARD_KEY_NUMMINUS,
|
||||
/* 0x7c */ GRUB_KEYBOARD_KEY_NUMMUL, GRUB_KEYBOARD_KEY_NUM9,
|
||||
/* 0x7e */ GRUB_KEYBOARD_KEY_SCROLL_LOCK, 0,
|
||||
/* 0x80 */ 0, 0,
|
||||
/* 0x82 */ 0, GRUB_KEYBOARD_KEY_F7,
|
||||
};
|
||||
|
||||
static const struct
|
||||
{
|
||||
grub_uint8_t from, to;
|
||||
} set2_e0_mapping[] =
|
||||
{
|
||||
{0x11, GRUB_KEYBOARD_KEY_RIGHT_ALT},
|
||||
{0x14, GRUB_KEYBOARD_KEY_RIGHT_CTRL},
|
||||
{0x4a, GRUB_KEYBOARD_KEY_NUMSLASH},
|
||||
{0x5a, GRUB_KEYBOARD_KEY_NUMENTER},
|
||||
{0x69, GRUB_KEYBOARD_KEY_END},
|
||||
{0x6b, GRUB_KEYBOARD_KEY_LEFT},
|
||||
{0x6c, GRUB_KEYBOARD_KEY_HOME},
|
||||
{0x70, GRUB_KEYBOARD_KEY_INSERT},
|
||||
{0x71, GRUB_KEYBOARD_KEY_DELETE},
|
||||
{0x72, GRUB_KEYBOARD_KEY_DOWN},
|
||||
{0x74, GRUB_KEYBOARD_KEY_RIGHT},
|
||||
{0x75, GRUB_KEYBOARD_KEY_UP},
|
||||
{0x7a, GRUB_KEYBOARD_KEY_NPAGE},
|
||||
{0x7d, GRUB_KEYBOARD_KEY_PPAGE},
|
||||
};
|
||||
|
||||
static int
|
||||
fetch_key (struct grub_ps2_state *ps2_state, grub_uint8_t at_key, int *is_break)
|
||||
{
|
||||
int was_ext = 0;
|
||||
int ret = 0;
|
||||
|
||||
/* May happen if no keyboard is connected. Just ignore this. */
|
||||
if (at_key == 0xff)
|
||||
return -1;
|
||||
if (at_key == 0xe0)
|
||||
{
|
||||
ps2_state->e0_received = 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((ps2_state->current_set == 2 || ps2_state->current_set == 3) && at_key == 0xf0)
|
||||
{
|
||||
ps2_state->f0_received = 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Setting LEDs may generate ACKs. */
|
||||
if (at_key == GRUB_AT_ACK)
|
||||
return -1;
|
||||
|
||||
was_ext = ps2_state->e0_received;
|
||||
ps2_state->e0_received = 0;
|
||||
|
||||
switch (ps2_state->current_set)
|
||||
{
|
||||
case 1:
|
||||
*is_break = !!(at_key & 0x80);
|
||||
if (!was_ext)
|
||||
ret = set1_mapping[at_key & 0x7f];
|
||||
else
|
||||
{
|
||||
unsigned i;
|
||||
for (i = 0; i < ARRAY_SIZE (set1_e0_mapping); i++)
|
||||
if (set1_e0_mapping[i].from == (at_key & 0x7f))
|
||||
{
|
||||
ret = set1_e0_mapping[i].to;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
*is_break = ps2_state->f0_received;
|
||||
ps2_state->f0_received = 0;
|
||||
if (!was_ext)
|
||||
ret = set2_mapping[at_key];
|
||||
else
|
||||
{
|
||||
unsigned i;
|
||||
for (i = 0; i < ARRAY_SIZE (set2_e0_mapping); i++)
|
||||
if (set2_e0_mapping[i].from == at_key)
|
||||
{
|
||||
ret = set2_e0_mapping[i].to;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
if (!ret)
|
||||
{
|
||||
if (was_ext)
|
||||
grub_dprintf ("atkeyb", "Unknown key 0xe0+0x%02x from set %d\n",
|
||||
at_key, ps2_state->current_set);
|
||||
else
|
||||
grub_dprintf ("atkeyb", "Unknown key 0x%02x from set %d\n",
|
||||
at_key, ps2_state->current_set);
|
||||
return -1;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* FIXME: This should become an interrupt service routine. For now
|
||||
it's just used to catch events from control keys. */
|
||||
static int
|
||||
grub_keyboard_isr (struct grub_ps2_state *ps2_state,
|
||||
grub_keyboard_key_t key, int is_break)
|
||||
{
|
||||
if (!is_break)
|
||||
switch (key)
|
||||
{
|
||||
case GRUB_KEYBOARD_KEY_LEFT_SHIFT:
|
||||
ps2_state->at_keyboard_status |= GRUB_TERM_STATUS_LSHIFT;
|
||||
return 1;
|
||||
case GRUB_KEYBOARD_KEY_RIGHT_SHIFT:
|
||||
ps2_state->at_keyboard_status |= GRUB_TERM_STATUS_RSHIFT;
|
||||
return 1;
|
||||
case GRUB_KEYBOARD_KEY_LEFT_CTRL:
|
||||
ps2_state->at_keyboard_status |= GRUB_TERM_STATUS_LCTRL;
|
||||
return 1;
|
||||
case GRUB_KEYBOARD_KEY_RIGHT_CTRL:
|
||||
ps2_state->at_keyboard_status |= GRUB_TERM_STATUS_RCTRL;
|
||||
return 1;
|
||||
case GRUB_KEYBOARD_KEY_RIGHT_ALT:
|
||||
ps2_state->at_keyboard_status |= GRUB_TERM_STATUS_RALT;
|
||||
return 1;
|
||||
case GRUB_KEYBOARD_KEY_LEFT_ALT:
|
||||
ps2_state->at_keyboard_status |= GRUB_TERM_STATUS_LALT;
|
||||
return 1;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
switch (key)
|
||||
{
|
||||
case GRUB_KEYBOARD_KEY_LEFT_SHIFT:
|
||||
ps2_state->at_keyboard_status &= ~GRUB_TERM_STATUS_LSHIFT;
|
||||
return 1;
|
||||
case GRUB_KEYBOARD_KEY_RIGHT_SHIFT:
|
||||
ps2_state->at_keyboard_status &= ~GRUB_TERM_STATUS_RSHIFT;
|
||||
return 1;
|
||||
case GRUB_KEYBOARD_KEY_LEFT_CTRL:
|
||||
ps2_state->at_keyboard_status &= ~GRUB_TERM_STATUS_LCTRL;
|
||||
return 1;
|
||||
case GRUB_KEYBOARD_KEY_RIGHT_CTRL:
|
||||
ps2_state->at_keyboard_status &= ~GRUB_TERM_STATUS_RCTRL;
|
||||
return 1;
|
||||
case GRUB_KEYBOARD_KEY_RIGHT_ALT:
|
||||
ps2_state->at_keyboard_status &= ~GRUB_TERM_STATUS_RALT;
|
||||
return 1;
|
||||
case GRUB_KEYBOARD_KEY_LEFT_ALT:
|
||||
ps2_state->at_keyboard_status &= ~GRUB_TERM_STATUS_LALT;
|
||||
return 1;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* If there is a key pending, return it; otherwise return GRUB_TERM_NO_KEY. */
|
||||
int
|
||||
grub_ps2_process_incoming_byte (struct grub_ps2_state *ps2_state,
|
||||
grub_uint8_t at_key)
|
||||
{
|
||||
int code;
|
||||
int is_break = 0;
|
||||
|
||||
code = fetch_key (ps2_state, at_key, &is_break);
|
||||
if (code == -1)
|
||||
return GRUB_TERM_NO_KEY;
|
||||
|
||||
if (grub_keyboard_isr (ps2_state, code, is_break))
|
||||
return GRUB_TERM_NO_KEY;
|
||||
if (is_break)
|
||||
return GRUB_TERM_NO_KEY;
|
||||
#ifdef DEBUG_AT_KEYBOARD
|
||||
grub_dprintf ("atkeyb", "Detected key 0x%x\n", code);
|
||||
#endif
|
||||
switch (code)
|
||||
{
|
||||
case GRUB_KEYBOARD_KEY_CAPS_LOCK:
|
||||
ps2_state->at_keyboard_status ^= GRUB_TERM_STATUS_CAPS;
|
||||
ps2_state->led_status ^= KEYBOARD_LED_CAPS;
|
||||
|
||||
#ifdef DEBUG_AT_KEYBOARD
|
||||
grub_dprintf ("atkeyb", "caps_lock = %d\n", !!(ps2_state->at_keyboard_status & GRUB_KEYBOARD_STATUS_CAPS_LOCK));
|
||||
#endif
|
||||
return GRUB_TERM_NO_KEY;
|
||||
case GRUB_KEYBOARD_KEY_NUM_LOCK:
|
||||
ps2_state->at_keyboard_status ^= GRUB_TERM_STATUS_NUM;
|
||||
ps2_state->led_status ^= KEYBOARD_LED_NUM;
|
||||
|
||||
#ifdef DEBUG_AT_KEYBOARD
|
||||
grub_dprintf ("atkeyb", "num_lock = %d\n", !!(ps2_state->at_keyboard_status & GRUB_KEYBOARD_STATUS_NUM_LOCK));
|
||||
#endif
|
||||
return GRUB_TERM_NO_KEY;
|
||||
case GRUB_KEYBOARD_KEY_SCROLL_LOCK:
|
||||
ps2_state->at_keyboard_status ^= GRUB_TERM_STATUS_SCROLL;
|
||||
ps2_state->led_status ^= KEYBOARD_LED_SCROLL;
|
||||
return GRUB_TERM_NO_KEY;
|
||||
default:
|
||||
return grub_term_map_key (code, ps2_state->at_keyboard_status);
|
||||
}
|
||||
}
|
||||
@@ -1,101 +1,101 @@
|
||||
{ "cmdline_cat", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x68f4102c, 0x68f4102c, 0x4f103fc9, 0x4f103fc9, 0x6c3ed233, 0x6c3ed233, 0x8e49f1d4, 0x8e49f1d4, 0x4d27a5fc, 0x4d27a5fc, 0xce4f426c, 0xce4f426c, 0xb86a2d2d, 0xb86a2d2d, 0x72caeded, 0x72caeded, 0x5db992f4, 0x5db992f4, 0xb6a48a57, 0xb6a48a57, 0x8dd9e06c, 0x8dd9e06c, 0xfd0ab0a, 0xfd0ab0a, 0xf0257d88, 0xf0257d88, 0x375c456d, 0x375c456d, 0x6014146b, 0x6014146b, 0xcc3ce19c, 0xcc3ce19c, 0x6df2c13d, 0x6df2c13d, 0x59c1144b, 0x59c1144b, 0x6800bfb6, 0x6800bfb6, 0xfd03649a, 0xfd03649a, 0x654ce0e7, 0xc0cb058d, 0x9e43683f, 0x9e43683f, }, 45 },
|
||||
{ "cmdline_cat", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x3c2c3e3f, 0x3c2c3e3f, 0x58ab5c00, 0x58ab5c00, 0xba896043, 0xba896043, 0x1e741248, 0x1e741248, 0x48a951b9, 0x48a951b9, 0x569f4d77, 0x569f4d77, 0xf4e8d9bb, 0xf4e8d9bb, 0x80843985, 0x80843985, 0xeae3a0fc, 0xeae3a0fc, 0x137e7ccf, 0x137e7ccf, 0x3f786b6b, 0x3f786b6b, 0x3254e051, 0x3254e051, 0x79be1043, 0x79be1043, 0x4e46907d, 0x4e46907d, 0xd5d6468d, 0xd5d6468d, 0xfec2ff8d, 0xfec2ff8d, 0x13083fb4, 0x13083fb4, 0x35893486, 0x35893486, 0x41508e32, 0x41508e32, 0x26a1eda9, 0x26a1eda9, 0xecdf0a59, 0xcc661ad8, 0xc57d6ccb, 0xc57d6ccb, }, 45 },
|
||||
{ "cmdline_cat", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xeed4e023, 0xeed4e023, 0x3cafae08, 0x3cafae08, 0xdd7de297, 0xdd7de297, 0x50a0a0e1, 0x50a0a0e1, 0x18e36b82, 0x18e36b82, 0xa4bd0ffe, 0xa4bd0ffe, 0xd4e5aafe, 0xd4e5aafe, 0x2c7e25a5, 0x2c7e25a5, 0xda696881, 0xda696881, 0x237832d8, 0x237832d8, 0x49d7771, 0x49d7771, 0xc30d24a4, 0xc30d24a4, 0x6ab4d024, 0x6ab4d024, 0x7deac66, 0x7deac66, 0x7b3aa1c6, 0x7b3aa1c6, 0x56158612, 0x56158612, 0x4fc63f7a, 0x4fc63f7a, 0x2f4f78d3, 0x2f4f78d3, 0xefa4716d, 0xefa4716d, 0xbecdb635, 0xbecdb635, 0x6f7e9245, 0x836b4134, 0x1229d6ae, 0x1229d6ae, }, 45 },
|
||||
{ "cmdline_cat", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xddd2650a, 0xddd2650a, 0xceae34fe, 0xceae34fe, 0x61a76c62, 0x61a76c62, 0x88cc6ec7, 0x88cc6ec7, 0xbaf35579, 0xbaf35579, 0xea4b7745, 0xea4b7745, 0x49162f54, 0x49162f54, 0x184d7da3, 0x184d7da3, 0x7545c826, 0x7545c826, 0x70bfbc4f, 0x70bfbc4f, 0x4f61a7d3, 0x4f61a7d3, 0xb3896b4c, 0xb3896b4c, 0x3b75eef4, 0x3b75eef4, 0xb5463daa, 0xb5463daa, 0x243b4ada, 0x243b4ada, 0x4a8fb9e5, 0x4a8fb9e5, 0xeadb8947, 0xeadb8947, 0x4c86692c, 0x4c86692c, 0x4476763e, 0x4476763e, 0xc9d73e67, 0xc9d73e67, 0xb2296bd8, 0xb29699fb, 0x45cb8c3f, 0x45cb8c3f, }, 45 },
|
||||
{ "cmdline_cat", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xca59adfd, 0xca59adfd, 0x3a82282b, 0x3a82282b, 0x2fdaf106, 0x2fdaf106, 0x26e0f01b, 0x26e0f01b, 0xd88ea764, 0xd88ea764, 0x8e3e3c54, 0x8e3e3c54, 0xf55d50f1, 0xf55d50f1, 0xa2c19d40, 0xa2c19d40, 0xc6be108f, 0xc6be108f, 0x643647a8, 0x643647a8, 0x6fd5f2c, 0x6fd5f2c, 0x1c89092d, 0x1c89092d, 0xc6a89fca, 0xc6a89fca, 0x1646a412, 0x1646a412, 0x74040f03, 0x74040f03, 0x4966c71d, 0x4966c71d, 0x3c7d5a3f, 0x3c7d5a3f, 0x9c091b76, 0x9c091b76, 0xfda8a0ea, 0xfda8a0ea, 0x354452fb, 0x354452fb, 0x3bb9e803, 0x55818eb, 0x86299ae9, 0x86299ae9, }, 45 },
|
||||
{ "cmdline_cat", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xad0b91c2, 0xad0b91c2, 0x5bf8a72, 0x5bf8a72, 0xd705beec, 0xd705beec, 0x63c6ea8a, 0x63c6ea8a, 0xffedeab0, 0xffedeab0, 0xa657405, 0xa657405, 0xd83d606e, 0xd83d606e, 0x821a2a3a, 0x821a2a3a, 0xf2f5748, 0xf2f5748, 0x87bfe341, 0x87bfe341, 0x72f6f59c, 0x72f6f59c, 0xafab44e5, 0xafab44e5, 0x6c912b9a, 0x6c912b9a, 0x862a8810, 0x862a8810, 0x97b21809, 0x97b21809, 0x2763cfca, 0x2763cfca, 0x56464e5e, 0x56464e5e, 0xc44660d3, 0xc44660d3, 0x10984d6b, 0x10984d6b, 0x24eebfae, 0x24eebfae, 0xc8061900, 0x81675254, 0x9e5f3cc9, 0x9e5f3cc9, }, 45 },
|
||||
{ "cmdline_cat", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x68ab9311, 0x68ab9311, 0xd717f93c, 0xd717f93c, 0x6984620a, 0x6984620a, 0x152b6d0c, 0x152b6d0c, 0x98b8b84a, 0x98b8b84a, 0xa903181e, 0xa903181e, 0x940e10e6, 0x940e10e6, 0x11cd776b, 0x11cd776b, 0x12624a96, 0x12624a96, 0x4d19f358, 0x4d19f358, 0x82985d2b, 0x82985d2b, 0x1afa0bee, 0x1afa0bee, 0x251e884e, 0x251e884e, 0xd0c023cb, 0xd0c023cb, 0x215e23dc, 0x215e23dc, 0x41da92fc, 0x41da92fc, 0x7d8668b2, 0x7d8668b2, 0xe279755b, 0xe279755b, 0x45ab5067, 0x45ab5067, 0xc2245ac1, 0xc2245ac1, 0x260caee1, 0xcbb70716, 0x11b4a337, 0x11b4a337, }, 45 },
|
||||
{ "gfxterm_menu", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xa515d1fe, 0xc3da3d7d, 0xa515d1fe, 0xe6e31cb9, 0x59c36f00, 0x59c36f00, 0x9f7ce1f7, 0x9f7ce1f7, 0x9f7ce1f7, 0xe1fc8c91, 0xe1fc8c91, 0xe1fc8c91, 0x830a9943, 0x830a9943, 0x830a9943, 0x59c36f00, 0xe6e31cb9, 0xe6e31cb9, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_menu", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x3bcc8944, 0x9fe60efc, 0x3bcc8944, 0x15c90c3b, 0xaa4593fe, 0xaa4593fe, 0x91ef3db0, 0x91ef3db0, 0x91ef3db0, 0x371a30d7, 0x371a30d7, 0x371a30d7, 0x1a229baf, 0x1a229baf, 0x1a229baf, 0xaa4593fe, 0x15c90c3b, 0x15c90c3b, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_menu", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x4701e2b, 0xbefc41f3, 0x4701e2b, 0x596773af, 0xc9cbf769, 0xc9cbf769, 0x85e9b626, 0x85e9b626, 0x85e9b626, 0x7b3177ea, 0x7b3177ea, 0x7b3177ea, 0x927bc8e2, 0x927bc8e2, 0x927bc8e2, 0xc9cbf769, 0x596773af, 0x596773af, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_menu", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xe0f4cb75, 0x5354c242, 0xe0f4cb75, 0x4ea282ad, 0x9813a416, 0x9813a416, 0x8acc5af7, 0x8acc5af7, 0x8acc5af7, 0x1b17dcc4, 0x1b17dcc4, 0x1b17dcc4, 0x2ade114, 0x2ade114, 0x2ade114, 0x9813a416, 0x4ea282ad, 0x4ea282ad, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_menu", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x79bd65d, 0x176dcd3c, 0x79bd65d, 0x713de3ee, 0x5fcf013d, 0x5fcf013d, 0xc848cef3, 0xc848cef3, 0xc848cef3, 0x1a58d685, 0x1a58d685, 0x1a58d685, 0xc2be91a, 0xc2be91a, 0xc2be91a, 0x5fcf013d, 0x713de3ee, 0x713de3ee, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_menu", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xdaa0c008, 0x8ed864d6, 0xdaa0c008, 0xc1a51a0f, 0xdd28f52b, 0xdd28f52b, 0x673783b0, 0x673783b0, 0x673783b0, 0x460b7a54, 0x460b7a54, 0x460b7a54, 0x3bb3b1d8, 0x3bb3b1d8, 0x3bb3b1d8, 0xdd28f52b, 0xc1a51a0f, 0xc1a51a0f, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_menu", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0xce2d0657, 0x65bcd1ea, 0xce2d0657, 0x31921dd7, 0x43d1f34, 0x43d1f34, 0x7b987b91, 0x7b987b91, 0x7b987b91, 0x492d239, 0x492d239, 0x492d239, 0x9dc3d7bf, 0x9dc3d7bf, 0x9dc3d7bf, 0x43d1f34, 0x31921dd7, 0x31921dd7, 0x43d1f34, }, 20 },
|
||||
{ "gfxmenu", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x1027210c, 0x64e51c81, 0x1027210c, 0x45ca4a8a, 0x9a2e0d26, 0xde5d5c76, 0xde5d5c76, 0xde5d5c76, 0x8285aab6, 0x8285aab6, 0x8285aab6, 0xab1d6424, 0xab1d6424, 0xab1d6424, 0x59c36f00, 0x45ca4a8a, 0x45ca4a8a, }, 18 },
|
||||
{ "gfxmenu", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x8d12f697, 0xc5b32248, 0x8d12f697, 0x56720aa4, 0xa9d58ccd, 0xebc08e8, 0xebc08e8, 0xebc08e8, 0x5be3a2e2, 0x5be3a2e2, 0x5be3a2e2, 0x32d06aab, 0x32d06aab, 0x32d06aab, 0xaa4593fe, 0x56720aa4, 0x56720aa4, }, 18 },
|
||||
{ "gfxmenu", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xa5ec9f45, 0xdb7085d8, 0xa5ec9f45, 0x9caf1d3f, 0x5411be8b, 0xb1733229, 0xb1733229, 0xb1733229, 0xcecd94bd, 0xcecd94bd, 0xcecd94bd, 0x8cb9f4c5, 0x8cb9f4c5, 0x8cb9f4c5, 0xc9cbf769, 0x9caf1d3f, 0x9caf1d3f, }, 18 },
|
||||
{ "gfxmenu", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x1c3742c9, 0xce8e83bf, 0xeb96c838, 0xce8e83bf, 0x73cb3bc1, 0x740d78cf, 0x7400503e, 0x7400503e, 0x7400503e, 0x9fa5ba42, 0x9fa5ba42, 0x9fa5ba42, 0x99eebab2, 0x99eebab2, 0x99eebab2, 0x1c3742c9, 0x73cb3bc1, 0x73cb3bc1, }, 18 },
|
||||
{ "gfxmenu", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0xcc5a7bed, 0x56a03e51, 0xee7d8d4b, 0x56a03e51, 0x5bdf9413, 0xbcda144c, 0x46a2d276, 0x46a2d276, 0x46a2d276, 0x29eb0e67, 0x29eb0e67, 0x29eb0e67, 0x241d9064, 0x241d9064, 0x241d9064, 0xcc5a7bed, 0x5bdf9413, 0x5bdf9413, }, 18 },
|
||||
{ "gfxmenu", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xef4a3312, 0xea8a9cf0, 0x8929e522, 0xea8a9cf0, 0x78f3dfbc, 0x5d55a141, 0xfe89652d, 0xfe89652d, 0xfe89652d, 0x383b2133, 0x383b2133, 0x383b2133, 0x2c5ef18c, 0x2c5ef18c, 0x2c5ef18c, 0xef4a3312, 0x78f3dfbc, 0x78f3dfbc, }, 18 },
|
||||
{ "gfxmenu", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x54e48d80, 0x6dcf1d57, 0x925a4c8f, 0x6dcf1d57, 0x69005b38, 0x6d6bb4bc, 0xb646d62d, 0xb646d62d, 0xb646d62d, 0x37b520fc, 0x37b520fc, 0x37b520fc, 0xa1119993, 0xa1119993, 0xa1119993, 0x54e48d80, 0x69005b38, 0x69005b38, }, 18 },
|
||||
{ "gfxterm_ar", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xb59af897, 0xbb7a450f, 0xb59af897, 0xf66c35d0, 0x59c36f00, 0x59c36f00, 0xfb6d6c75, 0xfb6d6c75, 0xfb6d6c75, 0x85ed0113, 0x85ed0113, 0x85ed0113, 0xe71b14c1, 0xe71b14c1, 0xe71b14c1, 0x59c36f00, 0xf66c35d0, 0xf66c35d0, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_ar", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xcdeaad5f, 0x39f75a73, 0xcdeaad5f, 0xe3ef2820, 0xaa4593fe, 0xaa4593fe, 0x3b858d67, 0x3b858d67, 0x3b858d67, 0x9d708000, 0x9d708000, 0x9d708000, 0xb0482b78, 0xb0482b78, 0xb0482b78, 0xaa4593fe, 0xe3ef2820, 0xe3ef2820, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_ar", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xbfc1cc02, 0xad4d778f, 0xbfc1cc02, 0xe2d6a186, 0xc9cbf769, 0xc9cbf769, 0xd3fd5934, 0xd3fd5934, 0xd3fd5934, 0x2d2598f8, 0x2d2598f8, 0x2d2598f8, 0xc46f27f0, 0xc46f27f0, 0xc46f27f0, 0xc9cbf769, 0xe2d6a186, 0xe2d6a186, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_ar", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xb4e8961f, 0xa9d9245e, 0xb4e8961f, 0x1abedfc7, 0x9813a416, 0x9813a416, 0x75ea5f6b, 0x75ea5f6b, 0x75ea5f6b, 0xe431d958, 0xe431d958, 0xe431d958, 0xfd8be488, 0xfd8be488, 0xfd8be488, 0x9813a416, 0x1abedfc7, 0x1abedfc7, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_ar", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xfba9cd4c, 0x3accc3ed, 0xfba9cd4c, 0x8d0ff8ff, 0x5fcf013d, 0x5fcf013d, 0x12029d40, 0x12029d40, 0x12029d40, 0xc0128536, 0xc0128536, 0xc0128536, 0xd661baa9, 0xd661baa9, 0xd661baa9, 0x5fcf013d, 0x8d0ff8ff, 0x8d0ff8ff, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_ar", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x9afaa18d, 0x5505c090, 0x9afaa18d, 0x81ff7b8a, 0xdd28f52b, 0xdd28f52b, 0xd4c281cf, 0xd4c281cf, 0xd4c281cf, 0xf5fe782b, 0xf5fe782b, 0xf5fe782b, 0x8846b3a7, 0x8846b3a7, 0x8846b3a7, 0xdd28f52b, 0x81ff7b8a, 0x81ff7b8a, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_ar", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x3af16e43, 0x4b4ee85f, 0x3af16e43, 0xc54e75c3, 0x43d1f34, 0x43d1f34, 0x6a0313f3, 0x6a0313f3, 0x6a0313f3, 0x1509ba5b, 0x1509ba5b, 0x1509ba5b, 0x8c58bfdd, 0x8c58bfdd, 0x8c58bfdd, 0x43d1f34, 0xc54e75c3, 0xc54e75c3, 0x43d1f34, }, 20 },
|
||||
{ "gfxterm_cyr", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x49a25e74, 0x3193ac92, 0x49a25e74, 0xa549333, 0x59c36f00, 0x59c36f00, 0xdc6419f, 0xdc6419f, 0xdc6419f, 0x73462cf9, 0x73462cf9, 0x73462cf9, 0x11b0392b, 0x11b0392b, 0x11b0392b, 0x59c36f00, 0xa549333, 0xa549333, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_cyr", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x6485919, 0xa5fc2915, 0x6485919, 0x284ddc66, 0xaa4593fe, 0xaa4593fe, 0x6b2dd2e2, 0x6b2dd2e2, 0x6b2dd2e2, 0xcdd8df85, 0xcdd8df85, 0xcdd8df85, 0xe0e074fd, 0xe0e074fd, 0xe0e074fd, 0xaa4593fe, 0x284ddc66, 0x284ddc66, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_cyr", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x5b7d7c45, 0xf9b8baf8, 0x5b7d7c45, 0x66a11c1, 0xc9cbf769, 0xc9cbf769, 0x57d5ac1f, 0x57d5ac1f, 0x57d5ac1f, 0xa90d6dd3, 0xa90d6dd3, 0xa90d6dd3, 0x4047d2db, 0x4047d2db, 0x4047d2db, 0xc9cbf769, 0x66a11c1, 0x66a11c1, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_cyr", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x6fd2a74d, 0x41fe4726, 0x6fd2a74d, 0xc184ee95, 0x9813a416, 0x9813a416, 0xa132a122, 0xa132a122, 0xa132a122, 0x30e92711, 0x30e92711, 0x30e92711, 0x29531ac1, 0x29531ac1, 0x29531ac1, 0x9813a416, 0xc184ee95, 0xc184ee95, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_cyr", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x69685505, 0xf2c0e268, 0x69685505, 0x1fce60b6, 0x5fcf013d, 0x5fcf013d, 0xd61aeb01, 0xd61aeb01, 0xd61aeb01, 0x40af377, 0x40af377, 0x40af377, 0x1279cce8, 0x1279cce8, 0x1279cce8, 0x5fcf013d, 0x1fce60b6, 0x1fce60b6, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_cyr", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xee7e1be9, 0x7069217c, 0xee7e1be9, 0xf57bc1ee, 0xdd28f52b, 0xdd28f52b, 0x77d02fa2, 0x77d02fa2, 0x77d02fa2, 0x56ecd646, 0x56ecd646, 0x56ecd646, 0x2b541dca, 0x2b541dca, 0x2b541dca, 0xdd28f52b, 0xf57bc1ee, 0xf57bc1ee, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_cyr", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0xb5b4521a, 0xf7c443ce, 0xb5b4521a, 0x4a0b499a, 0x43d1f34, 0x43d1f34, 0xd019cfce, 0xd019cfce, 0xd019cfce, 0xaf136666, 0xaf136666, 0xaf136666, 0x364263e0, 0x364263e0, 0x364263e0, 0x43d1f34, 0x4a0b499a, 0x4a0b499a, 0x43d1f34, }, 20 },
|
||||
{ "gfxterm_heb", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x9bdad73f, 0x990f581e, 0x9bdad73f, 0xd82c1a78, 0x59c36f00, 0x59c36f00, 0x663aaa6f, 0x663aaa6f, 0x663aaa6f, 0x18bac709, 0x18bac709, 0x18bac709, 0x7a4cd2db, 0x7a4cd2db, 0x7a4cd2db, 0x59c36f00, 0xd82c1a78, 0xd82c1a78, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_heb", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xf835ac2, 0xbcd50661, 0xf835ac2, 0x2186dfbd, 0xaa4593fe, 0xaa4593fe, 0x1f1997c1, 0x1f1997c1, 0x1f1997c1, 0xb9ec9aa6, 0xb9ec9aa6, 0xb9ec9aa6, 0x94d431de, 0x94d431de, 0x94d431de, 0xaa4593fe, 0x2186dfbd, 0x2186dfbd, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_heb", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xa3d7300f, 0x12739a74, 0xa3d7300f, 0xfec05d8b, 0xc9cbf769, 0xc9cbf769, 0x93dd5635, 0x93dd5635, 0x93dd5635, 0x6d0597f9, 0x6d0597f9, 0x6d0597f9, 0x844f28f1, 0x844f28f1, 0x844f28f1, 0xc9cbf769, 0xfec05d8b, 0xfec05d8b, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_heb", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x32d637b0, 0xc677639b, 0x32d637b0, 0x9c807e68, 0x9813a416, 0x9813a416, 0xa1b8fcf1, 0xa1b8fcf1, 0xa1b8fcf1, 0x30637ac2, 0x30637ac2, 0x30637ac2, 0x29d94712, 0x29d94712, 0x29d94712, 0x9813a416, 0x9c807e68, 0x9c807e68, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_heb", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x3ec3528b, 0x1e1c878d, 0x3ec3528b, 0x48656738, 0x5fcf013d, 0x5fcf013d, 0x3510cd00, 0x3510cd00, 0x3510cd00, 0xe700d576, 0xe700d576, 0xe700d576, 0xf173eae9, 0xf173eae9, 0xf173eae9, 0x5fcf013d, 0x48656738, 0x48656738, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_heb", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x50bc4d38, 0x6725a657, 0x50bc4d38, 0x4bb9973f, 0xdd28f52b, 0xdd28f52b, 0x66f52001, 0x66f52001, 0x66f52001, 0x47c9d9e5, 0x47c9d9e5, 0x47c9d9e5, 0x3a711269, 0x3a711269, 0x3a711269, 0xdd28f52b, 0x4bb9973f, 0x4bb9973f, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_heb", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0xc481102d, 0xe22cdb5f, 0xc481102d, 0x3b3e0bad, 0x43d1f34, 0x43d1f34, 0xaf0df118, 0xaf0df118, 0xaf0df118, 0xd00758b0, 0xd00758b0, 0xd00758b0, 0x49565d36, 0x49565d36, 0x49565d36, 0x43d1f34, 0x3b3e0bad, 0x3b3e0bad, 0x43d1f34, }, 20 },
|
||||
{ "gfxterm_gre", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xd24e2c02, 0x6e0b3e38, 0xd24e2c02, 0x91b8e145, 0x59c36f00, 0x59c36f00, 0xf6d94324, 0xf6d94324, 0xf6d94324, 0x88592e42, 0x88592e42, 0x88592e42, 0xeaaf3b90, 0xeaaf3b90, 0xeaaf3b90, 0x59c36f00, 0x91b8e145, 0x91b8e145, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_gre", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x48c95a99, 0xbef981b4, 0x48c95a99, 0x66ccdfe6, 0xaa4593fe, 0xaa4593fe, 0x69f632fe, 0x69f632fe, 0x69f632fe, 0xcf033f99, 0xcf033f99, 0xcf033f99, 0xe23b94e1, 0xe23b94e1, 0xe23b94e1, 0xaa4593fe, 0x66ccdfe6, 0x66ccdfe6, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_gre", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xdf5958ac, 0x6c53ca72, 0xdf5958ac, 0x824e3528, 0xc9cbf769, 0xc9cbf769, 0x7872f95f, 0x7872f95f, 0x7872f95f, 0x86aa3893, 0x86aa3893, 0x86aa3893, 0x6fe0879b, 0x6fe0879b, 0x6fe0879b, 0xc9cbf769, 0x824e3528, 0x824e3528, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_gre", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x4e4e65e4, 0x3b08ec97, 0x4e4e65e4, 0xe0182c3c, 0x9813a416, 0x9813a416, 0xd87a3bca, 0xd87a3bca, 0xd87a3bca, 0x49a1bdf9, 0x49a1bdf9, 0x49a1bdf9, 0x501b8029, 0x501b8029, 0x501b8029, 0x9813a416, 0xe0182c3c, 0xe0182c3c, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_gre", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xa9051255, 0xcbaf6881, 0xa9051255, 0xdfa327e6, 0x5fcf013d, 0x5fcf013d, 0xdc53ce4e, 0xdc53ce4e, 0xdc53ce4e, 0xe43d638, 0xe43d638, 0xe43d638, 0x1830e9a7, 0x1830e9a7, 0x1830e9a7, 0x5fcf013d, 0xdfa327e6, 0xdfa327e6, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_gre", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xc3280b45, 0xea85a953, 0xc3280b45, 0xd82dd142, 0xdd28f52b, 0xdd28f52b, 0x4f22c62f, 0x4f22c62f, 0x4f22c62f, 0x6e1e3fcb, 0x6e1e3fcb, 0x6e1e3fcb, 0x13a6f447, 0x13a6f447, 0x13a6f447, 0xdd28f52b, 0xd82dd142, 0xd82dd142, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_gre", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x93f5ee2e, 0x28dc3016, 0x93f5ee2e, 0x6c4af5ae, 0x43d1f34, 0x43d1f34, 0x2e9a92cb, 0x2e9a92cb, 0x2e9a92cb, 0x51903b63, 0x51903b63, 0x51903b63, 0xc8c13ee5, 0xc8c13ee5, 0xc8c13ee5, 0x43d1f34, 0x6c4af5ae, 0x6c4af5ae, 0x43d1f34, }, 20 },
|
||||
{ "gfxterm_ru", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x24539267, 0x1ce59afc, 0x24539267, 0x67a55f20, 0x59c36f00, 0x59c36f00, 0xee51a3ff, 0xee51a3ff, 0xee51a3ff, 0x90d1ce99, 0x90d1ce99, 0x90d1ce99, 0xf227db4b, 0xf227db4b, 0xf227db4b, 0x59c36f00, 0x67a55f20, 0x67a55f20, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_ru", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x7cb69e26, 0xa3f6f06f, 0x7cb69e26, 0x52b31b59, 0xaa4593fe, 0xaa4593fe, 0x2f6d12b5, 0x2f6d12b5, 0x2f6d12b5, 0x89981fd2, 0x89981fd2, 0x89981fd2, 0xa4a0b4aa, 0xa4a0b4aa, 0xa4a0b4aa, 0xaa4593fe, 0x52b31b59, 0x52b31b59, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_ru", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x9e0eb3da, 0xb0939199, 0x9e0eb3da, 0xc319de5e, 0xc9cbf769, 0xc9cbf769, 0xc9c28f3b, 0xc9c28f3b, 0xc9c28f3b, 0x371a4ef7, 0x371a4ef7, 0x371a4ef7, 0xde50f1ff, 0xde50f1ff, 0xde50f1ff, 0xc9cbf769, 0xc319de5e, 0xc319de5e, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_ru", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x2bd305d0, 0x593ac70d, 0x2bd305d0, 0x85854c08, 0x9813a416, 0x9813a416, 0xd6c41d1f, 0xd6c41d1f, 0xd6c41d1f, 0x471f9b2c, 0x471f9b2c, 0x471f9b2c, 0x5ea5a6fc, 0x5ea5a6fc, 0x5ea5a6fc, 0x9813a416, 0x85854c08, 0x85854c08, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_ru", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xd554b2a6, 0xfcb62ffa, 0xd554b2a6, 0xa3f28715, 0x5fcf013d, 0x5fcf013d, 0x49663ae2, 0x49663ae2, 0x49663ae2, 0x9b762294, 0x9b762294, 0x9b762294, 0x8d051d0b, 0x8d051d0b, 0x8d051d0b, 0x5fcf013d, 0xa3f28715, 0xa3f28715, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_ru", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xcb4a441b, 0x47bfd292, 0xcb4a441b, 0xd04f9e1c, 0xdd28f52b, 0xdd28f52b, 0x1c62c4cf, 0x1c62c4cf, 0x1c62c4cf, 0x3d5e3d2b, 0x3d5e3d2b, 0x3d5e3d2b, 0x40e6f6a7, 0x40e6f6a7, 0x40e6f6a7, 0xdd28f52b, 0xd04f9e1c, 0xd04f9e1c, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_ru", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x84489cd2, 0x3b86feab, 0x84489cd2, 0x7bf78752, 0x43d1f34, 0x43d1f34, 0xeb4b4093, 0xeb4b4093, 0xeb4b4093, 0x9441e93b, 0x9441e93b, 0x9441e93b, 0xd10ecbd, 0xd10ecbd, 0xd10ecbd, 0x43d1f34, 0x7bf78752, 0x7bf78752, 0x43d1f34, }, 20 },
|
||||
{ "gfxterm_fr", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xdac60224, 0xf1212716, 0xdac60224, 0x9930cf63, 0x59c36f00, 0x59c36f00, 0xd83aedef, 0xd83aedef, 0xd83aedef, 0xa6ba8089, 0xa6ba8089, 0xa6ba8089, 0xc44c955b, 0xc44c955b, 0xc44c955b, 0x59c36f00, 0x9930cf63, 0x9930cf63, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_fr", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xddb471d2, 0x2a23e66b, 0xddb471d2, 0xf3b1f4ad, 0xaa4593fe, 0xaa4593fe, 0x44e1ed3b, 0x44e1ed3b, 0x44e1ed3b, 0xe214e05c, 0xe214e05c, 0xe214e05c, 0xcf2c4b24, 0xcf2c4b24, 0xcf2c4b24, 0xaa4593fe, 0xf3b1f4ad, 0xf3b1f4ad, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_fr", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xd3319fed, 0x4fb7eab2, 0xd3319fed, 0x8e26f269, 0xc9cbf769, 0xc9cbf769, 0xb45d8a1a, 0xb45d8a1a, 0xb45d8a1a, 0x4a854bd6, 0x4a854bd6, 0x4a854bd6, 0xa3cff4de, 0xa3cff4de, 0xa3cff4de, 0xc9cbf769, 0x8e26f269, 0x8e26f269, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_fr", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x73fb17c5, 0x379bd3f4, 0x73fb17c5, 0xddad5e1d, 0x9813a416, 0x9813a416, 0xbd332cdb, 0xbd332cdb, 0xbd332cdb, 0x2ce8aae8, 0x2ce8aae8, 0x2ce8aae8, 0x35529738, 0x35529738, 0x35529738, 0x9813a416, 0xddad5e1d, 0xddad5e1d, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_fr", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xbb670d35, 0x672cb790, 0xbb670d35, 0xcdc13886, 0x5fcf013d, 0x5fcf013d, 0x14e80d5a, 0x14e80d5a, 0x14e80d5a, 0xc6f8152c, 0xc6f8152c, 0xc6f8152c, 0xd08b2ab3, 0xd08b2ab3, 0xd08b2ab3, 0x5fcf013d, 0xcdc13886, 0xcdc13886, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_fr", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xd2d29462, 0xf9dbf485, 0xd2d29462, 0xc9d74e65, 0xdd28f52b, 0xdd28f52b, 0x92d1dcce, 0x92d1dcce, 0x92d1dcce, 0xb3ed252a, 0xb3ed252a, 0xb3ed252a, 0xce55eea6, 0xce55eea6, 0xce55eea6, 0xdd28f52b, 0xc9d74e65, 0xc9d74e65, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_fr", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x65d2aa3c, 0xa00491c3, 0x65d2aa3c, 0x9a6db1bc, 0x43d1f34, 0x43d1f34, 0x33df64a1, 0x33df64a1, 0x33df64a1, 0x4cd5cd09, 0x4cd5cd09, 0x4cd5cd09, 0xd584c88f, 0xd584c88f, 0xd584c88f, 0x43d1f34, 0x9a6db1bc, 0x9a6db1bc, 0x43d1f34, }, 20 },
|
||||
{ "gfxterm_quot", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x19f4b551, 0x7f3b59d2, 0x19f4b551, 0x5a027816, 0x59c36f00, 0x59c36f00, 0x9f7ce1f7, 0x9f7ce1f7, 0x9f7ce1f7, 0xe1fc8c91, 0xe1fc8c91, 0xe1fc8c91, 0x830a9943, 0x830a9943, 0x830a9943, 0x59c36f00, 0x5a027816, 0x5a027816, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_quot", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x82acacc0, 0x26862b78, 0x82acacc0, 0xaca929bf, 0xaa4593fe, 0xaa4593fe, 0x91ef3db0, 0x91ef3db0, 0x91ef3db0, 0x371a30d7, 0x371a30d7, 0x371a30d7, 0x1a229baf, 0x1a229baf, 0x1a229baf, 0xaa4593fe, 0xaca929bf, 0xaca929bf, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_quot", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x8418ee7d, 0x3e94b1a5, 0x8418ee7d, 0xd90f83f9, 0xc9cbf769, 0xc9cbf769, 0x85e9b626, 0x85e9b626, 0x85e9b626, 0x7b3177ea, 0x7b3177ea, 0x7b3177ea, 0x927bc8e2, 0x927bc8e2, 0x927bc8e2, 0xc9cbf769, 0xd90f83f9, 0xd90f83f9, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_quot", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x55d57857, 0xe6757160, 0x55d57857, 0xfb83318f, 0x9813a416, 0x9813a416, 0x8acc5af7, 0x8acc5af7, 0x8acc5af7, 0x1b17dcc4, 0x1b17dcc4, 0x1b17dcc4, 0x2ade114, 0x2ade114, 0x2ade114, 0x9813a416, 0xfb83318f, 0xfb83318f, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_quot", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x45b838a5, 0x554e23c4, 0x45b838a5, 0x331e0d16, 0x5fcf013d, 0x5fcf013d, 0xc848cef3, 0xc848cef3, 0xc848cef3, 0x1a58d685, 0x1a58d685, 0x1a58d685, 0xc2be91a, 0xc2be91a, 0xc2be91a, 0x5fcf013d, 0x331e0d16, 0x331e0d16, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_quot", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x4e904177, 0x1ae8e5a9, 0x4e904177, 0x55959b70, 0xdd28f52b, 0xdd28f52b, 0x673783b0, 0x673783b0, 0x673783b0, 0x460b7a54, 0x460b7a54, 0x460b7a54, 0x3bb3b1d8, 0x3bb3b1d8, 0x3bb3b1d8, 0xdd28f52b, 0x55959b70, 0x55959b70, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_quot", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x83e5445a, 0x287493e7, 0x83e5445a, 0x7c5a5fda, 0x43d1f34, 0x43d1f34, 0x7b987b91, 0x7b987b91, 0x7b987b91, 0x492d239, 0x492d239, 0x492d239, 0x9dc3d7bf, 0x9dc3d7bf, 0x9dc3d7bf, 0x43d1f34, 0x7c5a5fda, 0x7c5a5fda, 0x43d1f34, }, 20 },
|
||||
{ "gfxterm_piglatin", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x43eebd9e, 0xc5e097a, 0x43eebd9e, 0x1870d9, 0x59c36f00, 0x59c36f00, 0x90b8be2f, 0x90b8be2f, 0x90b8be2f, 0xee38d349, 0xee38d349, 0xee38d349, 0x8ccec69b, 0x8ccec69b, 0x8ccec69b, 0x59c36f00, 0x1870d9, 0x1870d9, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_piglatin", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xd16e76b1, 0xd80a42d2, 0xd16e76b1, 0xff6bf3ce, 0xaa4593fe, 0xaa4593fe, 0xe8b201a3, 0xe8b201a3, 0xe8b201a3, 0x4e470cc4, 0x4e470cc4, 0x4e470cc4, 0x637fa7bc, 0x637fa7bc, 0x637fa7bc, 0xaa4593fe, 0xff6bf3ce, 0xff6bf3ce, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_piglatin", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x46c9c0b6, 0x879836ab, 0x46c9c0b6, 0x1bdead32, 0xc9cbf769, 0xc9cbf769, 0x7f3bf79a, 0x7f3bf79a, 0x7f3bf79a, 0x81e33656, 0x81e33656, 0x81e33656, 0x68a9895e, 0x68a9895e, 0x68a9895e, 0xc9cbf769, 0x1bdead32, 0x1bdead32, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_piglatin", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xbedd413, 0x570f7ebf, 0xbedd413, 0xa5bb9dcb, 0x9813a416, 0x9813a416, 0x30f35812, 0x30f35812, 0x30f35812, 0xa128de21, 0xa128de21, 0xa128de21, 0xb892e3f1, 0xb892e3f1, 0xb892e3f1, 0x9813a416, 0xa5bb9dcb, 0xa5bb9dcb, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_piglatin", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x76ec4315, 0xffca72c, 0x76ec4315, 0x4a76a6, 0x5fcf013d, 0x5fcf013d, 0x7b237d7d, 0x7b237d7d, 0x7b237d7d, 0xa933650b, 0xa933650b, 0xa933650b, 0xbf405a94, 0xbf405a94, 0xbf405a94, 0x5fcf013d, 0x4a76a6, 0x4a76a6, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_piglatin", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x75cfd768, 0x1fb76756, 0x75cfd768, 0x6eca0d6f, 0xdd28f52b, 0xdd28f52b, 0xa0ff4b91, 0xa0ff4b91, 0xa0ff4b91, 0x81c3b275, 0x81c3b275, 0x81c3b275, 0xfc7b79f9, 0xfc7b79f9, 0xfc7b79f9, 0xdd28f52b, 0x6eca0d6f, 0x6eca0d6f, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_piglatin", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0xd5cf1813, 0x2659463a, 0xd5cf1813, 0x2a700393, 0x43d1f34, 0x43d1f34, 0x850afb92, 0x850afb92, 0x850afb92, 0xfa00523a, 0xfa00523a, 0xfa00523a, 0x635157bc, 0x635157bc, 0x635157bc, 0x43d1f34, 0x2a700393, 0x2a700393, 0x43d1f34, }, 20 },
|
||||
{ "gfxterm_ch", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x5d323c44, 0x6f401130, 0x5d323c44, 0x1ec4f103, 0x59c36f00, 0x59c36f00, 0x68eced5a, 0x68eced5a, 0x68eced5a, 0x166c803c, 0x166c803c, 0x166c803c, 0x749a95ee, 0x749a95ee, 0x749a95ee, 0x59c36f00, 0x1ec4f103, 0x1ec4f103, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_ch", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x984941ed, 0xbbac7b68, 0x984941ed, 0xb64cc492, 0xaa4593fe, 0xaa4593fe, 0x4082ddcb, 0x4082ddcb, 0x4082ddcb, 0xe677d0ac, 0xe677d0ac, 0xe677d0ac, 0xcb4f7bd4, 0xcb4f7bd4, 0xcb4f7bd4, 0xaa4593fe, 0xb64cc492, 0xb64cc492, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_ch", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xb6d3d3b9, 0x80de2a76, 0xb6d3d3b9, 0xebc4be3d, 0xc9cbf769, 0xc9cbf769, 0xea0ec457, 0xea0ec457, 0xea0ec457, 0x14d6059b, 0x14d6059b, 0x14d6059b, 0xfd9cba93, 0xfd9cba93, 0xfd9cba93, 0xc9cbf769, 0xebc4be3d, 0xebc4be3d, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_ch", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x4733985d, 0xd2f2adf1, 0x4733985d, 0xe965d185, 0x9813a416, 0x9813a416, 0xa2feabe5, 0xa2feabe5, 0xa2feabe5, 0x33252dd6, 0x33252dd6, 0x33252dd6, 0x2a9f1006, 0x2a9f1006, 0x2a9f1006, 0x9813a416, 0xe965d185, 0xe965d185, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_ch", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x939ea364, 0x446d09d7, 0x939ea364, 0xe53896d7, 0x5fcf013d, 0x5fcf013d, 0x39f5030f, 0x39f5030f, 0x39f5030f, 0xebe51b79, 0xebe51b79, 0xebe51b79, 0xfd9624e6, 0xfd9624e6, 0xfd9624e6, 0x5fcf013d, 0xe53896d7, 0xe53896d7, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_ch", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x63d43704, 0xfc83811b, 0x63d43704, 0x78d1ed03, 0xdd28f52b, 0xdd28f52b, 0x9835fc4a, 0x9835fc4a, 0x9835fc4a, 0xb90905ae, 0xb90905ae, 0xb90905ae, 0xc4b1ce22, 0xc4b1ce22, 0xc4b1ce22, 0xdd28f52b, 0x78d1ed03, 0x78d1ed03, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_ch", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0xfc47195d, 0xa0c62a2e, 0xfc47195d, 0x3f802dd, 0x43d1f34, 0x43d1f34, 0x8e86b971, 0x8e86b971, 0x8e86b971, 0xf18c10d9, 0xf18c10d9, 0xf18c10d9, 0x68dd155f, 0x68dd155f, 0x68dd155f, 0x43d1f34, 0x3f802dd, 0x3f802dd, 0x43d1f34, }, 20 },
|
||||
{ "gfxterm_red", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xc3dd7b3, 0x6af23b30, 0xc3dd7b3, 0x5b10696d, 0x59c36f00, 0x59c36f00, 0xf6ddaf81, 0xf6ddaf81, 0xf6ddaf81, 0x885dc2e7, 0x885dc2e7, 0x885dc2e7, 0xeaabd735, 0xeaabd735, 0xeaabd735, 0x59c36f00, 0x5b10696d, 0x5b10696d, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_red", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x28fe03b3, 0x8cd4840b, 0x28fe03b3, 0x9859d9e5, 0xaa4593fe, 0xaa4593fe, 0x1af5874a, 0x1af5874a, 0x1af5874a, 0xbc008a2d, 0xbc008a2d, 0xbc008a2d, 0x91382155, 0x91382155, 0x91382155, 0xaa4593fe, 0x9859d9e5, 0x9859d9e5, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_red", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x2d13f9b, 0xb85d6043, 0x2d13f9b, 0x12f42135, 0xc9cbf769, 0xc9cbf769, 0x11cfa191, 0x11cfa191, 0x11cfa191, 0xef17605d, 0xef17605d, 0xef17605d, 0x65ddf55, 0x65ddf55, 0x65ddf55, 0xc9cbf769, 0x12f42135, 0x12f42135, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_red", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x6c62d67b, 0xdfc2df4c, 0x6c62d67b, 0x5c132a54, 0x9813a416, 0x9813a416, 0x7e455ca7, 0x7e455ca7, 0x7e455ca7, 0xef9eda94, 0xef9eda94, 0xef9eda94, 0xf624e744, 0xf624e744, 0xf624e744, 0x9813a416, 0x5c132a54, 0x5c132a54, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_red", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xbc94f31d, 0xac62e87c, 0xbc94f31d, 0x12931ce8, 0x5fcf013d, 0x5fcf013d, 0x11dc48b3, 0x11dc48b3, 0x11dc48b3, 0xc3cc50c5, 0xc3cc50c5, 0xc3cc50c5, 0xd5bf6f5a, 0xd5bf6f5a, 0xd5bf6f5a, 0x5fcf013d, 0x12931ce8, 0x12931ce8, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_red", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x46cc571d, 0x12b4f3c3, 0x46cc571d, 0xc8a89cc7, 0xdd28f52b, 0xdd28f52b, 0xa242e6a5, 0xa242e6a5, 0xa242e6a5, 0x837e1f41, 0x837e1f41, 0x837e1f41, 0xfec6d4cd, 0xfec6d4cd, 0xfec6d4cd, 0xdd28f52b, 0xc8a89cc7, 0xc8a89cc7, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_red", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x3b91fa00, 0x90002dbd, 0x3b91fa00, 0xacc97ca0, 0x43d1f34, 0x43d1f34, 0x935e0051, 0x935e0051, 0x935e0051, 0xec54a9f9, 0xec54a9f9, 0xec54a9f9, 0x7505ac7f, 0x7505ac7f, 0x7505ac7f, 0x43d1f34, 0xacc97ca0, 0xacc97ca0, 0x43d1f34, }, 20 },
|
||||
{ "gfxterm_high", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x361f2fba, 0x50d0c339, 0x361f2fba, 0x8e558070, 0x59c36f00, 0x59c36f00, 0x9f7ce1f7, 0x9f7ce1f7, 0x9f7ce1f7, 0xe1fc8c91, 0xe1fc8c91, 0xe1fc8c91, 0x830a9943, 0x830a9943, 0x830a9943, 0x59c36f00, 0x8e558070, 0x8e558070, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_high", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x4a4231ef, 0xee68b657, 0x4a4231ef, 0x89c4f960, 0xaa4593fe, 0xaa4593fe, 0x91ef3db0, 0x91ef3db0, 0x91ef3db0, 0x371a30d7, 0x371a30d7, 0x371a30d7, 0x1a229baf, 0x1a229baf, 0x1a229baf, 0xaa4593fe, 0x89c4f960, 0x89c4f960, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_high", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xc07bd682, 0x7af7895a, 0xc07bd682, 0x821e2abf, 0xc9cbf769, 0xc9cbf769, 0x85e9b626, 0x85e9b626, 0x85e9b626, 0x7b3177ea, 0x7b3177ea, 0x7b3177ea, 0x927bc8e2, 0x927bc8e2, 0x927bc8e2, 0xc9cbf769, 0x821e2abf, 0x821e2abf, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_high", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x1b63aa4c, 0xa8c3a37b, 0x1b63aa4c, 0x55700805, 0x9813a416, 0x9813a416, 0x8acc5af7, 0x8acc5af7, 0x8acc5af7, 0x1b17dcc4, 0x1b17dcc4, 0x1b17dcc4, 0x2ade114, 0x2ade114, 0x2ade114, 0x9813a416, 0x55700805, 0x55700805, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_high", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xc570d6cb, 0xd586cdaa, 0xc570d6cb, 0x5616d9fc, 0x5fcf013d, 0x5fcf013d, 0xc848cef3, 0xc848cef3, 0xc848cef3, 0x1a58d685, 0x1a58d685, 0x1a58d685, 0xc2be91a, 0xc2be91a, 0xc2be91a, 0x5fcf013d, 0x5616d9fc, 0x5616d9fc, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_high", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x5b2b8d24, 0xf5329fa, 0x5b2b8d24, 0xbcad497a, 0xdd28f52b, 0xdd28f52b, 0x673783b0, 0x673783b0, 0x673783b0, 0x460b7a54, 0x460b7a54, 0x460b7a54, 0x3bb3b1d8, 0x3bb3b1d8, 0x3bb3b1d8, 0xdd28f52b, 0xbcad497a, 0xbcad497a, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_high", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x96edfa54, 0x3d7c2de9, 0x96edfa54, 0xee65a4fb, 0x43d1f34, 0x43d1f34, 0x7b987b91, 0x7b987b91, 0x7b987b91, 0x492d239, 0x492d239, 0x492d239, 0x9dc3d7bf, 0x9dc3d7bf, 0x9dc3d7bf, 0x43d1f34, 0xee65a4fb, 0xee65a4fb, 0x43d1f34, }, 20 },
|
||||
{ "cmdline_cat", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x8851b0ee, 0x8851b0ee, 0xafb59f0b, 0xafb59f0b, 0x8c9b72f1, 0x8c9b72f1, 0x6eec5116, 0x6eec5116, 0xad82053e, 0xad82053e, 0x2eeae2ae, 0x2eeae2ae, 0x58cf8def, 0x58cf8def, 0x926f4d2f, 0x926f4d2f, 0xbd1c3236, 0xbd1c3236, 0x56012a95, 0x56012a95, 0x6d7c40ae, 0x6d7c40ae, 0xef750bc8, 0xef750bc8, 0x1080dd4a, 0x1080dd4a, 0xd7f9e5af, 0xd7f9e5af, 0x80b1b4a9, 0x80b1b4a9, 0x2c99415e, 0x2c99415e, 0x8d5761ff, 0x8d5761ff, 0xb964b489, 0xb964b489, 0x88a51f74, 0x88a51f74, 0x1da6c458, 0x1da6c458, 0x85e94025, 0x206ea54f, 0x7ee6c8fd, 0x7ee6c8fd, }, 45 },
|
||||
{ "cmdline_cat", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x834b70a0, 0x834b70a0, 0xe7cc129f, 0xe7cc129f, 0x5ee2edc, 0x5ee2edc, 0xa1135cd7, 0xa1135cd7, 0xf7ce1f26, 0xf7ce1f26, 0xe9f803e8, 0xe9f803e8, 0x4b8f9724, 0x4b8f9724, 0x3fe3771a, 0x3fe3771a, 0x5584ee63, 0x5584ee63, 0xac193250, 0xac193250, 0x801f25f4, 0x801f25f4, 0x8d33aece, 0x8d33aece, 0xc6d95edc, 0xc6d95edc, 0xf121dee2, 0xf121dee2, 0x6ab10812, 0x6ab10812, 0x41a5b112, 0x41a5b112, 0xac6f712b, 0xac6f712b, 0x8aee7a19, 0x8aee7a19, 0xfe37c0ad, 0xfe37c0ad, 0x99c6a336, 0x99c6a336, 0x53b844c6, 0x73015447, 0x7a1a2254, 0x7a1a2254, }, 45 },
|
||||
{ "cmdline_cat", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xb121c912, 0xb121c912, 0x635a8739, 0x635a8739, 0x8288cba6, 0x8288cba6, 0xf5589d0, 0xf5589d0, 0x471642b3, 0x471642b3, 0xfb4826cf, 0xfb4826cf, 0x8b1083cf, 0x8b1083cf, 0x738b0c94, 0x738b0c94, 0x859c41b0, 0x859c41b0, 0x7c8d1be9, 0x7c8d1be9, 0x5b685e40, 0x5b685e40, 0x9cf80d95, 0x9cf80d95, 0x3541f915, 0x3541f915, 0x582b8557, 0x582b8557, 0x24cf88f7, 0x24cf88f7, 0x9e0af23, 0x9e0af23, 0x1033164b, 0x1033164b, 0x70ba51e2, 0x70ba51e2, 0xb051585c, 0xb051585c, 0xe1389f04, 0xe1389f04, 0x308bbb74, 0xdc9e6805, 0x4ddcff9f, 0x4ddcff9f, }, 45 },
|
||||
{ "cmdline_cat", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xac16e832, 0xac16e832, 0xbf6ab9c6, 0xbf6ab9c6, 0x1063e15a, 0x1063e15a, 0xf908e3ff, 0xf908e3ff, 0xcb37d841, 0xcb37d841, 0x9b8ffa7d, 0x9b8ffa7d, 0x38d2a26c, 0x38d2a26c, 0x6989f09b, 0x6989f09b, 0x481451e, 0x481451e, 0x17b3177, 0x17b3177, 0x3ea52aeb, 0x3ea52aeb, 0xc24de674, 0xc24de674, 0x4ab163cc, 0x4ab163cc, 0xc482b092, 0xc482b092, 0x55ffc7e2, 0x55ffc7e2, 0x3b4b34dd, 0x3b4b34dd, 0x9b1f047f, 0x9b1f047f, 0x3d42e414, 0x3d42e414, 0x35b2fb06, 0x35b2fb06, 0xb813b35f, 0xb813b35f, 0xc3ede6e0, 0xc35214c3, 0x340f0107, 0x340f0107, }, 45 },
|
||||
{ "cmdline_cat", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x9c47caee, 0x9c47caee, 0x6c9c4f38, 0x6c9c4f38, 0x79c49615, 0x79c49615, 0x70fe9708, 0x70fe9708, 0x8e90c077, 0x8e90c077, 0xd8205b47, 0xd8205b47, 0xa34337e2, 0xa34337e2, 0xf4dffa53, 0xf4dffa53, 0x90a0779c, 0x90a0779c, 0x322820bb, 0x322820bb, 0x50e3383f, 0x50e3383f, 0x4a976e3e, 0x4a976e3e, 0x90b6f8d9, 0x90b6f8d9, 0x4058c301, 0x4058c301, 0x221a6810, 0x221a6810, 0x1f78a00e, 0x1f78a00e, 0x6a633d2c, 0x6a633d2c, 0xca177c65, 0xca177c65, 0xabb6c7f9, 0xabb6c7f9, 0x635a35e8, 0x635a35e8, 0x6da78f10, 0x53467ff8, 0xd037fdfa, 0xd037fdfa, }, 45 },
|
||||
{ "cmdline_cat", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x2b6b8225, 0x2b6b8225, 0x83df9995, 0x83df9995, 0x5165ad0b, 0x5165ad0b, 0xe5a6f96d, 0xe5a6f96d, 0x798df957, 0x798df957, 0x8c0567e2, 0x8c0567e2, 0x5e5d7389, 0x5e5d7389, 0x47a39dd, 0x47a39dd, 0x894f44af, 0x894f44af, 0x1dff0a6, 0x1dff0a6, 0xf496e67b, 0xf496e67b, 0x29cb5702, 0x29cb5702, 0xeaf1387d, 0xeaf1387d, 0x4a9bf7, 0x4a9bf7, 0x11d20bee, 0x11d20bee, 0xa103dc2d, 0xa103dc2d, 0xd0265db9, 0xd0265db9, 0x42267334, 0x42267334, 0x96f85e8c, 0x96f85e8c, 0xa28eac49, 0xa28eac49, 0x4e660ae7, 0x70741b3, 0x183f2f2e, 0x183f2f2e, }, 45 },
|
||||
{ "cmdline_cat", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x77b51f44, 0x77b51f44, 0xc8097569, 0xc8097569, 0x769aee5f, 0x769aee5f, 0xa35e159, 0xa35e159, 0x87a6341f, 0x87a6341f, 0xb61d944b, 0xb61d944b, 0x8b109cb3, 0x8b109cb3, 0xed3fb3e, 0xed3fb3e, 0xd7cc6c3, 0xd7cc6c3, 0x52077f0d, 0x52077f0d, 0x9d86d17e, 0x9d86d17e, 0x5e487bb, 0x5e487bb, 0x3a00041b, 0x3a00041b, 0xcfdeaf9e, 0xcfdeaf9e, 0x3e40af89, 0x3e40af89, 0x5ec41ea9, 0x5ec41ea9, 0x6298e4e7, 0x6298e4e7, 0xfd67f90e, 0xfd67f90e, 0x5ab5dc32, 0x5ab5dc32, 0xdd3ad694, 0xdd3ad694, 0x391222b4, 0xd4a98b43, 0xeaa2f62, 0xeaa2f62, }, 45 },
|
||||
{ "gfxterm_menu", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x45b0713c, 0x237f9dbf, 0x45b0713c, 0x646bc7b, 0x59c36f00, 0x59c36f00, 0x7fd94135, 0x7fd94135, 0x7fd94135, 0x1592c53, 0x1592c53, 0x1592c53, 0x63af3981, 0x63af3981, 0x63af3981, 0x59c36f00, 0x646bc7b, 0x646bc7b, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_menu", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x84abc7db, 0x20814063, 0x84abc7db, 0xaaae42a4, 0xaa4593fe, 0xaa4593fe, 0x2e88732f, 0x2e88732f, 0x2e88732f, 0x887d7e48, 0x887d7e48, 0x887d7e48, 0xa545d530, 0xa545d530, 0xa545d530, 0xaa4593fe, 0xaaae42a4, 0xaaae42a4, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_menu", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x5b85371a, 0xe10968c2, 0x5b85371a, 0x6925a9e, 0xc9cbf769, 0xc9cbf769, 0xda1c9f17, 0xda1c9f17, 0xda1c9f17, 0x24c45edb, 0x24c45edb, 0x24c45edb, 0xcd8ee1d3, 0xcd8ee1d3, 0xcd8ee1d3, 0xc9cbf769, 0x6925a9e, 0x6925a9e, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_menu", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x9130464d, 0x22904f7a, 0x9130464d, 0x3f660f95, 0x9813a416, 0x9813a416, 0xfb08d7cf, 0xfb08d7cf, 0xfb08d7cf, 0x6ad351fc, 0x6ad351fc, 0x6ad351fc, 0x73696c2c, 0x73696c2c, 0x73696c2c, 0x9813a416, 0x3f660f95, 0x3f660f95, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_menu", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x5185b14e, 0x4173aa2f, 0x5185b14e, 0x272384fd, 0x5fcf013d, 0x5fcf013d, 0x9e56a9e0, 0x9e56a9e0, 0x9e56a9e0, 0x4c46b196, 0x4c46b196, 0x4c46b196, 0x5a358e09, 0x5a358e09, 0x5a358e09, 0x5fcf013d, 0x272384fd, 0x272384fd, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_menu", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x5cc0d3ef, 0x8b87731, 0x5cc0d3ef, 0x47c509e8, 0xdd28f52b, 0xdd28f52b, 0xe1579057, 0xe1579057, 0xe1579057, 0xc06b69b3, 0xc06b69b3, 0xc06b69b3, 0xbdd3a23f, 0xbdd3a23f, 0xbdd3a23f, 0xdd28f52b, 0x47c509e8, 0x47c509e8, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_menu", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0xd1338a02, 0x7aa25dbf, 0xd1338a02, 0x2e8c9182, 0x43d1f34, 0x43d1f34, 0x6486f7c4, 0x6486f7c4, 0x6486f7c4, 0x1b8c5e6c, 0x1b8c5e6c, 0x1b8c5e6c, 0x82dd5bea, 0x82dd5bea, 0x82dd5bea, 0x43d1f34, 0x2e8c9182, 0x2e8c9182, 0x43d1f34, }, 20 },
|
||||
{ "gfxmenu", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x1027210c, 0x64e51c81, 0x1027210c, 0x45ca4a8a, 0x9a2e0d26, 0x2b88b6ce, 0x2b88b6ce, 0x2b88b6ce, 0x7750400e, 0x7750400e, 0x7750400e, 0x5ec88e9c, 0x5ec88e9c, 0x5ec88e9c, 0x59c36f00, 0x45ca4a8a, 0x45ca4a8a, }, 18 },
|
||||
{ "gfxmenu", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x8d12f697, 0xc5b32248, 0x8d12f697, 0x56720aa4, 0xa9d58ccd, 0xa1b1a1b5, 0xa1b1a1b5, 0xa1b1a1b5, 0xf4ee0bbf, 0xf4ee0bbf, 0xf4ee0bbf, 0x9dddc3f6, 0x9dddc3f6, 0x9dddc3f6, 0xaa4593fe, 0x56720aa4, 0x56720aa4, }, 18 },
|
||||
{ "gfxmenu", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xa5ec9f45, 0xdb7085d8, 0xa5ec9f45, 0x9caf1d3f, 0x5411be8b, 0xa07e74d3, 0xa07e74d3, 0xa07e74d3, 0xdfc0d247, 0xdfc0d247, 0xdfc0d247, 0x9db4b23f, 0x9db4b23f, 0x9db4b23f, 0xc9cbf769, 0x9caf1d3f, 0x9caf1d3f, }, 18 },
|
||||
{ "gfxmenu", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x1c3742c9, 0xce8e83bf, 0xeb96c838, 0xce8e83bf, 0x73cb3bc1, 0x740d78cf, 0x84312594, 0x84312594, 0x84312594, 0x6f94cfe8, 0x6f94cfe8, 0x6f94cfe8, 0x69dfcf18, 0x69dfcf18, 0x69dfcf18, 0x1c3742c9, 0x73cb3bc1, 0x73cb3bc1, }, 18 },
|
||||
{ "gfxmenu", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0xcc5a7bed, 0x56a03e51, 0xee7d8d4b, 0x56a03e51, 0x5bdf9413, 0xbcda144c, 0x131c0760, 0x131c0760, 0x131c0760, 0x7c55db71, 0x7c55db71, 0x7c55db71, 0x71a34572, 0x71a34572, 0x71a34572, 0xcc5a7bed, 0x5bdf9413, 0x5bdf9413, }, 18 },
|
||||
{ "gfxmenu", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xef4a3312, 0xea8a9cf0, 0x8929e522, 0xea8a9cf0, 0x78f3dfbc, 0x5d55a141, 0xb9092e0b, 0xb9092e0b, 0xb9092e0b, 0x7fbb6a15, 0x7fbb6a15, 0x7fbb6a15, 0x6bdebaaa, 0x6bdebaaa, 0x6bdebaaa, 0xef4a3312, 0x78f3dfbc, 0x78f3dfbc, }, 18 },
|
||||
{ "gfxmenu", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x54e48d80, 0x6dcf1d57, 0x925a4c8f, 0x6dcf1d57, 0x69005b38, 0x6d6bb4bc, 0x14f7c6b1, 0x14f7c6b1, 0x14f7c6b1, 0x95043060, 0x95043060, 0x95043060, 0x3a0890f, 0x3a0890f, 0x3a0890f, 0x54e48d80, 0x69005b38, 0x69005b38, }, 18 },
|
||||
{ "gfxterm_ar", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x77ff5efc, 0x791fe364, 0x77ff5efc, 0x340993bb, 0x59c36f00, 0x59c36f00, 0x3908ca1e, 0x3908ca1e, 0x3908ca1e, 0x4788a778, 0x4788a778, 0x4788a778, 0x257eb2aa, 0x257eb2aa, 0x257eb2aa, 0x59c36f00, 0x340993bb, 0x340993bb, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_ar", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xb2d04b0f, 0x46cdbc23, 0xb2d04b0f, 0x9cd5ce70, 0xaa4593fe, 0xaa4593fe, 0x44bf6b37, 0x44bf6b37, 0x44bf6b37, 0xe24a6650, 0xe24a6650, 0xe24a6650, 0xcf72cd28, 0xcf72cd28, 0xcf72cd28, 0xaa4593fe, 0x9cd5ce70, 0x9cd5ce70, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_ar", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x4bb823b8, 0x59349835, 0x4bb823b8, 0x16af4e3c, 0xc9cbf769, 0xc9cbf769, 0x2784b68e, 0x2784b68e, 0x2784b68e, 0xd95c7742, 0xd95c7742, 0xd95c7742, 0x3016c84a, 0x3016c84a, 0x3016c84a, 0xc9cbf769, 0x16af4e3c, 0x16af4e3c, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_ar", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xb821e44, 0x16b3ac05, 0xb821e44, 0xa5d4579c, 0x9813a416, 0x9813a416, 0xca80d730, 0xca80d730, 0xca80d730, 0x5b5b5103, 0x5b5b5103, 0x5b5b5103, 0x42e16cd3, 0x42e16cd3, 0x42e16cd3, 0x9813a416, 0xa5d4579c, 0xa5d4579c, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_ar", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xbe0b9671, 0x7f6e98d0, 0xbe0b9671, 0xc8ada3c2, 0x5fcf013d, 0x5fcf013d, 0x57a0c67d, 0x57a0c67d, 0x57a0c67d, 0x85b0de0b, 0x85b0de0b, 0x85b0de0b, 0x93c3e194, 0x93c3e194, 0x93c3e194, 0x5fcf013d, 0xc8ada3c2, 0xc8ada3c2, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_ar", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x9f18b29e, 0x50e7d383, 0x9f18b29e, 0x841d6899, 0xdd28f52b, 0xdd28f52b, 0xd12092dc, 0xd12092dc, 0xd12092dc, 0xf01c6b38, 0xf01c6b38, 0xf01c6b38, 0x8da4a0b4, 0x8da4a0b4, 0x8da4a0b4, 0xdd28f52b, 0x841d6899, 0x841d6899, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_ar", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x4e8d4d8c, 0x3f32cb90, 0x4e8d4d8c, 0xb132560c, 0x43d1f34, 0x43d1f34, 0x1e7f303c, 0x1e7f303c, 0x1e7f303c, 0x61759994, 0x61759994, 0x61759994, 0xf8249c12, 0xf8249c12, 0xf8249c12, 0x43d1f34, 0xb132560c, 0xb132560c, 0x43d1f34, }, 20 },
|
||||
{ "gfxterm_cyr", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x4f39b2c5, 0x37084023, 0x4f39b2c5, 0xccf7f82, 0x59c36f00, 0x59c36f00, 0xb5dad2e, 0xb5dad2e, 0xb5dad2e, 0x75ddc048, 0x75ddc048, 0x75ddc048, 0x172bd59a, 0x172bd59a, 0x172bd59a, 0x59c36f00, 0xccf7f82, 0xccf7f82, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_cyr", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xd5f24f8e, 0x76463f82, 0xd5f24f8e, 0xfbf7caf1, 0xaa4593fe, 0xaa4593fe, 0xb897c475, 0xb897c475, 0xb897c475, 0x1e62c912, 0x1e62c912, 0x1e62c912, 0x335a626a, 0x335a626a, 0x335a626a, 0xaa4593fe, 0xfbf7caf1, 0xfbf7caf1, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_cyr", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x8aa7c8c3, 0x28620e7e, 0x8aa7c8c3, 0xd7b0a547, 0xc9cbf769, 0xc9cbf769, 0x860f1899, 0x860f1899, 0x860f1899, 0x78d7d955, 0x78d7d955, 0x78d7d955, 0x919d665d, 0x919d665d, 0x919d665d, 0xc9cbf769, 0xd7b0a547, 0xd7b0a547, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_cyr", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x89654b6, 0x26bab4dd, 0x89654b6, 0xa6c01d6e, 0x9813a416, 0x9813a416, 0xc67652d9, 0xc67652d9, 0xc67652d9, 0x57add4ea, 0x57add4ea, 0x57add4ea, 0x4e17e93a, 0x4e17e93a, 0x4e17e93a, 0x9813a416, 0xa6c01d6e, 0xa6c01d6e, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_cyr", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x77945f28, 0xec3ce845, 0x77945f28, 0x1326a9b, 0x5fcf013d, 0x5fcf013d, 0xc8e6e12c, 0xc8e6e12c, 0xc8e6e12c, 0x1af6f95a, 0x1af6f95a, 0x1af6f95a, 0xc85c6c5, 0xc85c6c5, 0xc85c6c5, 0x5fcf013d, 0x1326a9b, 0x1326a9b, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_cyr", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x4450a5dc, 0xda479f49, 0x4450a5dc, 0x5f557fdb, 0xdd28f52b, 0xdd28f52b, 0xddfe9197, 0xddfe9197, 0xddfe9197, 0xfcc26873, 0xfcc26873, 0xfcc26873, 0x817aa3ff, 0x817aa3ff, 0x817aa3ff, 0xdd28f52b, 0x5f557fdb, 0x5f557fdb, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_cyr", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x409098da, 0x2e0890e, 0x409098da, 0xbf2f835a, 0x43d1f34, 0x43d1f34, 0x253d050e, 0x253d050e, 0x253d050e, 0x5a37aca6, 0x5a37aca6, 0x5a37aca6, 0xc366a920, 0xc366a920, 0xc366a920, 0x43d1f34, 0xbf2f835a, 0xbf2f835a, 0x43d1f34, }, 20 },
|
||||
{ "gfxterm_heb", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x546aa9f1, 0x56bf26d0, 0x546aa9f1, 0x179c64b6, 0x59c36f00, 0x59c36f00, 0xa98ad4a1, 0xa98ad4a1, 0xa98ad4a1, 0xd70ab9c7, 0xd70ab9c7, 0xd70ab9c7, 0xb5fcac15, 0xb5fcac15, 0xb5fcac15, 0x59c36f00, 0x179c64b6, 0x179c64b6, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_heb", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x12592c97, 0xa10f7034, 0x12592c97, 0x3c5ca9e8, 0xaa4593fe, 0xaa4593fe, 0x2c3e194, 0x2c3e194, 0x2c3e194, 0xa436ecf3, 0xa436ecf3, 0xa436ecf3, 0x890e478b, 0x890e478b, 0x890e478b, 0xaa4593fe, 0x3c5ca9e8, 0x3c5ca9e8, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_heb", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xed5de42a, 0x5cf94e51, 0xed5de42a, 0xb04a89ae, 0xc9cbf769, 0xc9cbf769, 0xdd578210, 0xdd578210, 0xdd578210, 0x238f43dc, 0x238f43dc, 0x238f43dc, 0xcac5fcd4, 0xcac5fcd4, 0xcac5fcd4, 0xc9cbf769, 0xb04a89ae, 0xb04a89ae, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_heb", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xbbc56f90, 0x4f643bbb, 0xbbc56f90, 0x15932648, 0x9813a416, 0x9813a416, 0x28aba4d1, 0x28aba4d1, 0x28aba4d1, 0xb97022e2, 0xb97022e2, 0xb97022e2, 0xa0ca1f32, 0xa0ca1f32, 0xa0ca1f32, 0x9813a416, 0x15932648, 0x15932648, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_heb", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x43465d8c, 0x6399888a, 0x43465d8c, 0x35e0683f, 0x5fcf013d, 0x5fcf013d, 0x4895c207, 0x4895c207, 0x4895c207, 0x9a85da71, 0x9a85da71, 0x9a85da71, 0x8cf6e5ee, 0x8cf6e5ee, 0x8cf6e5ee, 0x5fcf013d, 0x35e0683f, 0x35e0683f, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_heb", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xd1e7f231, 0xe67e195e, 0xd1e7f231, 0xcae22836, 0xdd28f52b, 0xdd28f52b, 0xe7ae9f08, 0xe7ae9f08, 0xe7ae9f08, 0xc69266ec, 0xc69266ec, 0xc69266ec, 0xbb2aad60, 0xbb2aad60, 0xbb2aad60, 0xdd28f52b, 0xcae22836, 0xcae22836, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_heb", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x793e58f4, 0x5f939386, 0x793e58f4, 0x86814374, 0x43d1f34, 0x43d1f34, 0x12b2b9c1, 0x12b2b9c1, 0x12b2b9c1, 0x6db81069, 0x6db81069, 0x6db81069, 0xf4e915ef, 0xf4e915ef, 0xf4e915ef, 0x43d1f34, 0x86814374, 0x86814374, 0x43d1f34, }, 20 },
|
||||
{ "gfxterm_gre", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x226c0d75, 0x9e291f4f, 0x226c0d75, 0x619ac032, 0x59c36f00, 0x59c36f00, 0x6fb6253, 0x6fb6253, 0x6fb6253, 0x787b0f35, 0x787b0f35, 0x787b0f35, 0x1a8d1ae7, 0x1a8d1ae7, 0x1a8d1ae7, 0x59c36f00, 0x619ac032, 0x619ac032, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_gre", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x8355045, 0xfe058b68, 0x8355045, 0x2630d53a, 0xaa4593fe, 0xaa4593fe, 0x290a3822, 0x290a3822, 0x290a3822, 0x8fff3545, 0x8fff3545, 0x8fff3545, 0xa2c79e3d, 0xa2c79e3d, 0xa2c79e3d, 0xaa4593fe, 0x2630d53a, 0x2630d53a, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_gre", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xc702fa59, 0x74086887, 0xc702fa59, 0x9a1597dd, 0xc9cbf769, 0xc9cbf769, 0x60295baa, 0x60295baa, 0x60295baa, 0x9ef19a66, 0x9ef19a66, 0x9ef19a66, 0x77bb256e, 0x77bb256e, 0x77bb256e, 0xc9cbf769, 0x9a1597dd, 0x9a1597dd, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_gre", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x82385331, 0xf77eda42, 0x82385331, 0x2c6e1ae9, 0x9813a416, 0x9813a416, 0x140c0d1f, 0x140c0d1f, 0x140c0d1f, 0x85d78b2c, 0x85d78b2c, 0x85d78b2c, 0x9c6db6fc, 0x9c6db6fc, 0x9c6db6fc, 0x9813a416, 0x2c6e1ae9, 0x2c6e1ae9, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_gre", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x565d2d38, 0x34f757ec, 0x565d2d38, 0x20fb188b, 0x5fcf013d, 0x5fcf013d, 0x230bf123, 0x230bf123, 0x230bf123, 0xf11be955, 0xf11be955, 0xf11be955, 0xe768d6ca, 0xe768d6ca, 0xe768d6ca, 0x5fcf013d, 0x20fb188b, 0x20fb188b, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_gre", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x632132a4, 0x4a8c90b2, 0x632132a4, 0x7824e8a3, 0xdd28f52b, 0xdd28f52b, 0xef2bffce, 0xef2bffce, 0xef2bffce, 0xce17062a, 0xce17062a, 0xce17062a, 0xb3afcda6, 0xb3afcda6, 0xb3afcda6, 0xdd28f52b, 0x7824e8a3, 0x7824e8a3, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_gre", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x461d4cfa, 0xfd3492c2, 0x461d4cfa, 0xb9a2577a, 0x43d1f34, 0x43d1f34, 0xfb72301f, 0xfb72301f, 0xfb72301f, 0x847899b7, 0x847899b7, 0x847899b7, 0x1d299c31, 0x1d299c31, 0x1d299c31, 0x43d1f34, 0xb9a2577a, 0xb9a2577a, 0x43d1f34, }, 20 },
|
||||
{ "gfxterm_ru", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x82758f66, 0xbac387fd, 0x82758f66, 0xc1834221, 0x59c36f00, 0x59c36f00, 0x4877befe, 0x4877befe, 0x4877befe, 0x36f7d398, 0x36f7d398, 0x36f7d398, 0x5401c64a, 0x5401c64a, 0x5401c64a, 0x59c36f00, 0xc1834221, 0xc1834221, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_ru", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x4500a591, 0x9a40cbd8, 0x4500a591, 0x6b0520ee, 0xaa4593fe, 0xaa4593fe, 0x16db2902, 0x16db2902, 0x16db2902, 0xb02e2465, 0xb02e2465, 0xb02e2465, 0x9d168f1d, 0x9d168f1d, 0x9d168f1d, 0xaa4593fe, 0x6b0520ee, 0x6b0520ee, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_ru", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x3cd9ea11, 0x1244c852, 0x3cd9ea11, 0x61ce8795, 0xc9cbf769, 0xc9cbf769, 0x6b15d6f0, 0x6b15d6f0, 0x6b15d6f0, 0x95cd173c, 0x95cd173c, 0x95cd173c, 0x7c87a834, 0x7c87a834, 0x7c87a834, 0xc9cbf769, 0x61ce8795, 0x61ce8795, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_ru", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0xc818f15f, 0xbaf13382, 0xc818f15f, 0x664eb887, 0x9813a416, 0x9813a416, 0x350fe990, 0x350fe990, 0x350fe990, 0xa4d46fa3, 0xa4d46fa3, 0xa4d46fa3, 0xbd6e5273, 0xbd6e5273, 0xbd6e5273, 0x9813a416, 0x664eb887, 0x664eb887, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_ru", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xaa1dc81, 0x234341dd, 0xaa1dc81, 0x7c07e932, 0x5fcf013d, 0x5fcf013d, 0x969354c5, 0x969354c5, 0x969354c5, 0x44834cb3, 0x44834cb3, 0x44834cb3, 0x52f0732c, 0x52f0732c, 0x52f0732c, 0x5fcf013d, 0x7c07e932, 0x7c07e932, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_ru", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xd9aa4b29, 0x555fdda0, 0xd9aa4b29, 0xc2af912e, 0xdd28f52b, 0xdd28f52b, 0xe82cbfd, 0xe82cbfd, 0xe82cbfd, 0x2fbe3219, 0x2fbe3219, 0x2fbe3219, 0x5206f995, 0x5206f995, 0x5206f995, 0xdd28f52b, 0xc2af912e, 0xc2af912e, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_ru", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0xfd4e19ff, 0x42807b86, 0xfd4e19ff, 0x2f1027f, 0x43d1f34, 0x43d1f34, 0x924dc5be, 0x924dc5be, 0x924dc5be, 0xed476c16, 0xed476c16, 0xed476c16, 0x74166990, 0x74166990, 0x74166990, 0x43d1f34, 0x2f1027f, 0x2f1027f, 0x43d1f34, }, 20 },
|
||||
{ "gfxterm_fr", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x3a63a2e6, 0x118487d4, 0x3a63a2e6, 0x79956fa1, 0x59c36f00, 0x59c36f00, 0x389f4d2d, 0x389f4d2d, 0x389f4d2d, 0x461f204b, 0x461f204b, 0x461f204b, 0x24e93599, 0x24e93599, 0x24e93599, 0x59c36f00, 0x79956fa1, 0x79956fa1, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_fr", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x62d33f4d, 0x9544a8f4, 0x62d33f4d, 0x4cd6ba32, 0xaa4593fe, 0xaa4593fe, 0xfb86a3a4, 0xfb86a3a4, 0xfb86a3a4, 0x5d73aec3, 0x5d73aec3, 0x5d73aec3, 0x704b05bb, 0x704b05bb, 0x704b05bb, 0xaa4593fe, 0x4cd6ba32, 0x4cd6ba32, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_fr", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x8cc4b6dc, 0x1042c383, 0x8cc4b6dc, 0xd1d3db58, 0xc9cbf769, 0xc9cbf769, 0xeba8a32b, 0xeba8a32b, 0xeba8a32b, 0x157062e7, 0x157062e7, 0x157062e7, 0xfc3addef, 0xfc3addef, 0xfc3addef, 0xc9cbf769, 0xd1d3db58, 0xd1d3db58, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_fr", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x23f9afd, 0x465f5ecc, 0x23f9afd, 0xac69d325, 0x9813a416, 0x9813a416, 0xccf7a1e3, 0xccf7a1e3, 0xccf7a1e3, 0x5d2c27d0, 0x5d2c27d0, 0x5d2c27d0, 0x44961a00, 0x44961a00, 0x44961a00, 0x9813a416, 0xac69d325, 0xac69d325, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_fr", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xed796a26, 0x3132d083, 0xed796a26, 0x9bdf5f95, 0x5fcf013d, 0x5fcf013d, 0x42f66a49, 0x42f66a49, 0x42f66a49, 0x90e6723f, 0x90e6723f, 0x90e6723f, 0x86954da0, 0x86954da0, 0x86954da0, 0x5fcf013d, 0x9bdf5f95, 0x9bdf5f95, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_fr", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0x54b28785, 0x7fbbe762, 0x54b28785, 0x4fb75d82, 0xdd28f52b, 0xdd28f52b, 0x14b1cf29, 0x14b1cf29, 0x14b1cf29, 0x358d36cd, 0x358d36cd, 0x358d36cd, 0x4835fd41, 0x4835fd41, 0x4835fd41, 0xdd28f52b, 0x4fb75d82, 0x4fb75d82, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_fr", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x7acc2669, 0xbf1a1d96, 0x7acc2669, 0x85733de9, 0x43d1f34, 0x43d1f34, 0x2cc1e8f4, 0x2cc1e8f4, 0x2cc1e8f4, 0x53cb415c, 0x53cb415c, 0x53cb415c, 0xca9a44da, 0xca9a44da, 0xca9a44da, 0x43d1f34, 0x85733de9, 0x85733de9, 0x43d1f34, }, 20 },
|
||||
{ "gfxterm_quot", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xf9511593, 0x9f9ef910, 0xf9511593, 0xbaa7d8d4, 0x59c36f00, 0x59c36f00, 0x7fd94135, 0x7fd94135, 0x7fd94135, 0x1592c53, 0x1592c53, 0x1592c53, 0x63af3981, 0x63af3981, 0x63af3981, 0x59c36f00, 0xbaa7d8d4, 0xbaa7d8d4, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_quot", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x3dcbe25f, 0x99e165e7, 0x3dcbe25f, 0x13ce6720, 0xaa4593fe, 0xaa4593fe, 0x2e88732f, 0x2e88732f, 0x2e88732f, 0x887d7e48, 0x887d7e48, 0x887d7e48, 0xa545d530, 0xa545d530, 0xa545d530, 0xaa4593fe, 0x13ce6720, 0x13ce6720, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_quot", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xdbedc74c, 0x61619894, 0xdbedc74c, 0x86faaac8, 0xc9cbf769, 0xc9cbf769, 0xda1c9f17, 0xda1c9f17, 0xda1c9f17, 0x24c45edb, 0x24c45edb, 0x24c45edb, 0xcd8ee1d3, 0xcd8ee1d3, 0xcd8ee1d3, 0xc9cbf769, 0x86faaac8, 0x86faaac8, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_quot", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x2411f56f, 0x97b1fc58, 0x2411f56f, 0x8a47bcb7, 0x9813a416, 0x9813a416, 0xfb08d7cf, 0xfb08d7cf, 0xfb08d7cf, 0x6ad351fc, 0x6ad351fc, 0x6ad351fc, 0x73696c2c, 0x73696c2c, 0x73696c2c, 0x9813a416, 0x8a47bcb7, 0x8a47bcb7, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_quot", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x13a65fb6, 0x35044d7, 0x13a65fb6, 0x65006a05, 0x5fcf013d, 0x5fcf013d, 0x9e56a9e0, 0x9e56a9e0, 0x9e56a9e0, 0x4c46b196, 0x4c46b196, 0x4c46b196, 0x5a358e09, 0x5a358e09, 0x5a358e09, 0x5fcf013d, 0x65006a05, 0x65006a05, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_quot", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xc8f05290, 0x9c88f64e, 0xc8f05290, 0xd3f58897, 0xdd28f52b, 0xdd28f52b, 0xe1579057, 0xe1579057, 0xe1579057, 0xc06b69b3, 0xc06b69b3, 0xc06b69b3, 0xbdd3a23f, 0xbdd3a23f, 0xbdd3a23f, 0xdd28f52b, 0xd3f58897, 0xd3f58897, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_quot", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x9cfbc80f, 0x376a1fb2, 0x9cfbc80f, 0x6344d38f, 0x43d1f34, 0x43d1f34, 0x6486f7c4, 0x6486f7c4, 0x6486f7c4, 0x1b8c5e6c, 0x1b8c5e6c, 0x1b8c5e6c, 0x82dd5bea, 0x82dd5bea, 0x82dd5bea, 0x43d1f34, 0x6344d38f, 0x6344d38f, 0x43d1f34, }, 20 },
|
||||
{ "gfxterm_piglatin", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xd327ca68, 0x9c977e8c, 0xd327ca68, 0x90d1072f, 0x59c36f00, 0x59c36f00, 0x71c9d9, 0x71c9d9, 0x71c9d9, 0x7ef1a4bf, 0x7ef1a4bf, 0x7ef1a4bf, 0x1c07b16d, 0x1c07b16d, 0x1c07b16d, 0x59c36f00, 0x90d1072f, 0x90d1072f, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_piglatin", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x2da3855b, 0x24c7b138, 0x2da3855b, 0x3a60024, 0xaa4593fe, 0xaa4593fe, 0x147ff249, 0x147ff249, 0x147ff249, 0xb28aff2e, 0xb28aff2e, 0xb28aff2e, 0x9fb25456, 0x9fb25456, 0x9fb25456, 0xaa4593fe, 0x3a60024, 0x3a60024, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_piglatin", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x660ab3d9, 0xa75b45c4, 0x660ab3d9, 0x3b1dde5d, 0xc9cbf769, 0xc9cbf769, 0x5ff884f5, 0x5ff884f5, 0x5ff884f5, 0xa1204539, 0xa1204539, 0xa1204539, 0x486afa31, 0x486afa31, 0x486afa31, 0xc9cbf769, 0x3b1dde5d, 0x3b1dde5d, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_piglatin", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x920957ee, 0xceebfd42, 0x920957ee, 0x3c5f1e36, 0x9813a416, 0x9813a416, 0xa917dbef, 0xa917dbef, 0xa917dbef, 0x38cc5ddc, 0x38cc5ddc, 0x38cc5ddc, 0x2176600c, 0x2176600c, 0x2176600c, 0x9813a416, 0x3c5f1e36, 0x3c5f1e36, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_piglatin", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x8298cd03, 0xfb88293a, 0x8298cd03, 0xf43ef8b0, 0x5fcf013d, 0x5fcf013d, 0x8f57f36b, 0x8f57f36b, 0x8f57f36b, 0x5d47eb1d, 0x5d47eb1d, 0x5d47eb1d, 0x4b34d482, 0x4b34d482, 0x4b34d482, 0x5fcf013d, 0xf43ef8b0, 0xf43ef8b0, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_piglatin", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xd8bbc577, 0xb2c37549, 0xd8bbc577, 0xc3be1f70, 0xdd28f52b, 0xdd28f52b, 0xd8b598e, 0xd8b598e, 0xd8b598e, 0x2cb7a06a, 0x2cb7a06a, 0x2cb7a06a, 0x510f6be6, 0x510f6be6, 0x510f6be6, 0xdd28f52b, 0xc3be1f70, 0xc3be1f70, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_piglatin", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x4d7993a1, 0xbeefcd88, 0x4d7993a1, 0xb2c68821, 0x43d1f34, 0x43d1f34, 0x1dbc7020, 0x1dbc7020, 0x1dbc7020, 0x62b6d988, 0x62b6d988, 0x62b6d988, 0xfbe7dc0e, 0xfbe7dc0e, 0xfbe7dc0e, 0x43d1f34, 0xb2c68821, 0xb2c68821, 0x43d1f34, }, 20 },
|
||||
{ "gfxterm_ch", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0x628b6f61, 0x50f94215, 0x628b6f61, 0x217da226, 0x59c36f00, 0x59c36f00, 0x5755be7f, 0x5755be7f, 0x5755be7f, 0x29d5d319, 0x29d5d319, 0x29d5d319, 0x4b23c6cb, 0x4b23c6cb, 0x4b23c6cb, 0x59c36f00, 0x217da226, 0x217da226, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_ch", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x9f82cd08, 0xbc67f78d, 0x9f82cd08, 0xb1874877, 0xaa4593fe, 0xaa4593fe, 0x4749512e, 0x4749512e, 0x4749512e, 0xe1bc5c49, 0xe1bc5c49, 0xe1bc5c49, 0xcc84f731, 0xcc84f731, 0xcc84f731, 0xaa4593fe, 0xb1874877, 0xb1874877, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_ch", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0xbee47cfb, 0x88e98534, 0xbee47cfb, 0xe3f3117f, 0xc9cbf769, 0xc9cbf769, 0xe2396b15, 0xe2396b15, 0xe2396b15, 0x1ce1aad9, 0x1ce1aad9, 0x1ce1aad9, 0xf5ab15d1, 0xf5ab15d1, 0xf5ab15d1, 0xc9cbf769, 0xe3f3117f, 0xe3f3117f, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_ch", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x2bfd5a83, 0xbe3c6f2f, 0x2bfd5a83, 0x85ab135b, 0x9813a416, 0x9813a416, 0xce30693b, 0xce30693b, 0xce30693b, 0x5febef08, 0x5febef08, 0x5febef08, 0x4651d2d8, 0x4651d2d8, 0x4651d2d8, 0x9813a416, 0x85ab135b, 0x85ab135b, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_ch", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x1456f321, 0xc3a55992, 0x1456f321, 0x62f0c692, 0x5fcf013d, 0x5fcf013d, 0xbe3d534a, 0xbe3d534a, 0xbe3d534a, 0x6c2d4b3c, 0x6c2d4b3c, 0x6c2d4b3c, 0x7a5e74a3, 0x7a5e74a3, 0x7a5e74a3, 0x5fcf013d, 0x62f0c692, 0x62f0c692, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_ch", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xdcac6945, 0x43fbdf5a, 0xdcac6945, 0xc7a9b342, 0xdd28f52b, 0xdd28f52b, 0x274da20b, 0x274da20b, 0x274da20b, 0x6715bef, 0x6715bef, 0x6715bef, 0x7bc99063, 0x7bc99063, 0x7bc99063, 0xdd28f52b, 0xc7a9b342, 0xc7a9b342, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_ch", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x571e16b1, 0xb9f25c2, 0x571e16b1, 0xa8a10d31, 0x43d1f34, 0x43d1f34, 0x25dfb69d, 0x25dfb69d, 0x25dfb69d, 0x5ad51f35, 0x5ad51f35, 0x5ad51f35, 0xc3841ab3, 0xc3841ab3, 0xc3841ab3, 0x43d1f34, 0xa8a10d31, 0xa8a10d31, 0x43d1f34, }, 20 },
|
||||
{ "gfxterm_red", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xec987771, 0x8a579bf2, 0xec987771, 0xbbb5c9af, 0x59c36f00, 0x59c36f00, 0x16780f43, 0x16780f43, 0x16780f43, 0x68f86225, 0x68f86225, 0x68f86225, 0xa0e77f7, 0xa0e77f7, 0xa0e77f7, 0x59c36f00, 0xbbb5c9af, 0xbbb5c9af, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_red", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0x97994d2c, 0x33b3ca94, 0x97994d2c, 0x273e977a, 0xaa4593fe, 0xaa4593fe, 0xa592c9d5, 0xa592c9d5, 0xa592c9d5, 0x367c4b2, 0x367c4b2, 0x367c4b2, 0x2e5f6fca, 0x2e5f6fca, 0x2e5f6fca, 0xaa4593fe, 0x273e977a, 0x273e977a, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_red", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x5d2416aa, 0xe7a84972, 0x5d2416aa, 0x4d010804, 0xc9cbf769, 0xc9cbf769, 0x4e3a88a0, 0x4e3a88a0, 0x4e3a88a0, 0xb0e2496c, 0xb0e2496c, 0xb0e2496c, 0x59a8f664, 0x59a8f664, 0x59a8f664, 0xc9cbf769, 0x4d010804, 0x4d010804, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_red", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x1da65b43, 0xae065274, 0x1da65b43, 0x2dd7a76c, 0x9813a416, 0x9813a416, 0xf81d19f, 0xf81d19f, 0xf81d19f, 0x9e5a57ac, 0x9e5a57ac, 0x9e5a57ac, 0x87e06a7c, 0x87e06a7c, 0x87e06a7c, 0x9813a416, 0x2dd7a76c, 0x2dd7a76c, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_red", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0xea8a940e, 0xfa7c8f6f, 0xea8a940e, 0x448d7bfb, 0x5fcf013d, 0x5fcf013d, 0x47c22fa0, 0x47c22fa0, 0x47c22fa0, 0x95d237d6, 0x95d237d6, 0x95d237d6, 0x83a10849, 0x83a10849, 0x83a10849, 0x5fcf013d, 0x448d7bfb, 0x448d7bfb, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_red", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xc0ac44fa, 0x94d4e024, 0xc0ac44fa, 0x4ec88f20, 0xdd28f52b, 0xdd28f52b, 0x2422f542, 0x2422f542, 0x2422f542, 0x51e0ca6, 0x51e0ca6, 0x51e0ca6, 0x78a6c72a, 0x78a6c72a, 0x78a6c72a, 0xdd28f52b, 0x4ec88f20, 0x4ec88f20, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_red", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x248f7655, 0x8f1ea1e8, 0x248f7655, 0xb3d7f0f5, 0x43d1f34, 0x43d1f34, 0x8c408c04, 0x8c408c04, 0x8c408c04, 0xf34a25ac, 0xf34a25ac, 0xf34a25ac, 0x6a1b202a, 0x6a1b202a, 0x6a1b202a, 0x43d1f34, 0xb3d7f0f5, 0xb3d7f0f5, 0x43d1f34, }, 20 },
|
||||
{ "gfxterm_high", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x59c36f00, 0xd6ba8f78, 0xb07563fb, 0xd6ba8f78, 0x6ef020b2, 0x59c36f00, 0x59c36f00, 0x7fd94135, 0x7fd94135, 0x7fd94135, 0x1592c53, 0x1592c53, 0x1592c53, 0x63af3981, 0x63af3981, 0x63af3981, 0x59c36f00, 0x6ef020b2, 0x6ef020b2, 0x59c36f00, }, 20 },
|
||||
{ "gfxterm_high", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0xaa4593fe, 0xf5257f70, 0x510ff8c8, 0xf5257f70, 0x36a3b7ff, 0xaa4593fe, 0xaa4593fe, 0x2e88732f, 0x2e88732f, 0x2e88732f, 0x887d7e48, 0x887d7e48, 0x887d7e48, 0xa545d530, 0xa545d530, 0xa545d530, 0xaa4593fe, 0x36a3b7ff, 0x36a3b7ff, 0xaa4593fe, }, 20 },
|
||||
{ "gfxterm_high", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xc9cbf769, 0x9f8effb3, 0x2502a06b, 0x9f8effb3, 0xddeb038e, 0xc9cbf769, 0xc9cbf769, 0xda1c9f17, 0xda1c9f17, 0xda1c9f17, 0x24c45edb, 0x24c45edb, 0x24c45edb, 0xcd8ee1d3, 0xcd8ee1d3, 0xcd8ee1d3, 0xc9cbf769, 0xddeb038e, 0xddeb038e, 0xc9cbf769, }, 20 },
|
||||
{ "gfxterm_high", 640, 480, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 640x480xrgba8888 */, (grub_uint32_t []) { 0x9813a416, 0x6aa72774, 0xd9072e43, 0x6aa72774, 0x24b4853d, 0x9813a416, 0x9813a416, 0xfb08d7cf, 0xfb08d7cf, 0xfb08d7cf, 0x6ad351fc, 0x6ad351fc, 0x6ad351fc, 0x73696c2c, 0x73696c2c, 0x73696c2c, 0x9813a416, 0x24b4853d, 0x24b4853d, 0x9813a416, }, 20 },
|
||||
{ "gfxterm_high", 800, 600, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 800x600xrgba8888 */, (grub_uint32_t []) { 0x5fcf013d, 0x936eb1d8, 0x8398aab9, 0x936eb1d8, 0x8beef, 0x5fcf013d, 0x5fcf013d, 0x9e56a9e0, 0x9e56a9e0, 0x9e56a9e0, 0x4c46b196, 0x4c46b196, 0x4c46b196, 0x5a358e09, 0x5a358e09, 0x5a358e09, 0x5fcf013d, 0x8beef, 0x8beef, 0x5fcf013d, }, 20 },
|
||||
{ "gfxterm_high", 1024, 768, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 1024x768xrgba8888 */, (grub_uint32_t []) { 0xdd28f52b, 0xdd4b9ec3, 0x89333a1d, 0xdd4b9ec3, 0x3acd5a9d, 0xdd28f52b, 0xdd28f52b, 0xe1579057, 0xe1579057, 0xe1579057, 0xc06b69b3, 0xc06b69b3, 0xc06b69b3, 0xbdd3a23f, 0xbdd3a23f, 0xbdd3a23f, 0xdd28f52b, 0x3acd5a9d, 0x3acd5a9d, 0xdd28f52b, }, 20 },
|
||||
{ "gfxterm_high", 2560, 1440, 0x1, 256, 32, 4, 16, 8, 8, 8, 0, 8, 24, 8 /* 2560x1440xrgba8888 */, (grub_uint32_t []) { 0x43d1f34, 0x89f37601, 0x2262a1bc, 0x89f37601, 0xf17b28ae, 0x43d1f34, 0x43d1f34, 0x6486f7c4, 0x6486f7c4, 0x6486f7c4, 0x1b8c5e6c, 0x1b8c5e6c, 0x1b8c5e6c, 0x82dd5bea, 0x82dd5bea, 0x82dd5bea, 0x43d1f34, 0xf17b28ae, 0xf17b28ae, 0x43d1f34, }, 20 },
|
||||
{ "videotest", 640, 480, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 640x480xi16 */, (grub_uint32_t []) { 0x1368a483, 0x1368a483, 0x1368a483, 0x1368a483, 0x1368a483, }, 5 },
|
||||
{ "videotest", 800, 600, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 800x600xi16 */, (grub_uint32_t []) { 0x7033079c, 0x7033079c, 0x7033079c, 0x7033079c, 0x7033079c, }, 5 },
|
||||
{ "videotest", 1024, 768, 0x2, 16, 8, 1, 0, 0, 0, 0, 0, 0, 0, 0 /* 1024x768xi16 */, (grub_uint32_t []) { 0xff583fbf, 0xff583fbf, 0xff583fbf, 0xff583fbf, 0xff583fbf, }, 5 },
|
||||
|
||||
@@ -26,14 +26,23 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
static grub_err_t
|
||||
grub_functional_test (grub_extcmd_context_t ctxt __attribute__ ((unused)),
|
||||
int argc __attribute__ ((unused)),
|
||||
char **args __attribute__ ((unused)))
|
||||
int argc,
|
||||
char **args)
|
||||
{
|
||||
grub_test_t test;
|
||||
int ok = 1;
|
||||
int i;
|
||||
|
||||
FOR_LIST_ELEMENTS (test, grub_test_list)
|
||||
{
|
||||
if (argc != 0)
|
||||
{
|
||||
for (i = 0; i < argc; i++)
|
||||
if (grub_strcmp(args[i], test->name) == 0)
|
||||
break;
|
||||
if (i == argc)
|
||||
continue;
|
||||
}
|
||||
grub_errno = 0;
|
||||
ok = ok && !grub_test_run (test);
|
||||
grub_errno = 0;
|
||||
|
||||
@@ -25,7 +25,10 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
||||
static grub_jmp_buf jmp_point;
|
||||
static int expected, ctr;
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
|
||||
/* This fixes GCC7 "unintentional fallthrough" warning */
|
||||
static void jmp0 (void) __attribute__ ((noreturn));
|
||||
static void jmp1 (void) __attribute__ ((noreturn));
|
||||
static void jmp2 (void) __attribute__ ((noreturn));
|
||||
|
||||
static void
|
||||
jmp0 (void)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <grub/mm.h>
|
||||
#include <grub/video.h>
|
||||
#include <grub/video_fb.h>
|
||||
#include <grub/machine/lbio.h>
|
||||
#include <grub/coreboot/lbio.h>
|
||||
#include <grub/machine/console.h>
|
||||
|
||||
struct grub_linuxbios_table_framebuffer *grub_video_coreboot_fbtable;
|
||||
@@ -743,7 +743,7 @@ grub_video_fb_unmap_color_int (struct grub_video_fbblit_info * source,
|
||||
if ((mode_info->mode_type
|
||||
& GRUB_VIDEO_MODE_TYPE_INDEX_COLOR) != 0)
|
||||
{
|
||||
if ((framebuffer.render_target->mode_info.mode_type
|
||||
if ((mode_info->mode_type
|
||||
& GRUB_VIDEO_MODE_TYPE_ALPHA) != 0
|
||||
&& color == 0xf0)
|
||||
{
|
||||
|
||||
@@ -181,6 +181,7 @@ grub_video_ieee1275_fill_mode_info (grub_ieee1275_phandle_t dev,
|
||||
case 32:
|
||||
out->reserved_mask_size = 8;
|
||||
out->reserved_field_pos = 24;
|
||||
/* FALLTHROUGH */
|
||||
|
||||
case 24:
|
||||
out->red_mask_size = 8;
|
||||
|
||||
@@ -736,6 +736,7 @@ grub_jpeg_decode_jpeg (struct grub_jpeg_data *data)
|
||||
case JPEG_MARKER_SOS: /* Start Of Scan. */
|
||||
if (grub_jpeg_decode_sos (data))
|
||||
break;
|
||||
/* FALLTHROUGH */
|
||||
case JPEG_MARKER_RST0: /* Restart. */
|
||||
case JPEG_MARKER_RST1:
|
||||
case JPEG_MARKER_RST2:
|
||||
|
||||
29
include/grub/arm/coreboot/console.h
Normal file
29
include/grub/arm/coreboot/console.h
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_MACHINE_CONSOLE_HEADER
|
||||
#define GRUB_MACHINE_CONSOLE_HEADER 1
|
||||
|
||||
void grub_video_coreboot_fb_init (void);
|
||||
void grub_video_coreboot_fb_early_init (void);
|
||||
void grub_video_coreboot_fb_late_init (void);
|
||||
void grub_video_coreboot_fb_fini (void);
|
||||
|
||||
extern struct grub_linuxbios_table_framebuffer *grub_video_coreboot_fbtable;
|
||||
|
||||
#endif /* ! GRUB_MACHINE_CONSOLE_HEADER */
|
||||
44
include/grub/arm/coreboot/kernel.h
Normal file
44
include/grub/arm/coreboot/kernel.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_KERNEL_MACHINE_HEADER
|
||||
#define GRUB_KERNEL_MACHINE_HEADER 1
|
||||
|
||||
#ifndef ASM_FILE
|
||||
|
||||
#include <grub/symbol.h>
|
||||
#include <grub/types.h>
|
||||
|
||||
struct grub_fdt_board
|
||||
{
|
||||
const char *vendor, *part;
|
||||
const grub_uint8_t *dtb;
|
||||
grub_size_t dtb_size;
|
||||
};
|
||||
|
||||
extern struct grub_fdt_board grub_fdt_boards[];
|
||||
void grub_machine_timer_init (void);
|
||||
void grub_pl050_init (void);
|
||||
void
|
||||
grub_cros_init (void);
|
||||
extern grub_addr_t EXPORT_VAR (start_of_ram);
|
||||
#endif /* ! ASM_FILE */
|
||||
|
||||
#define GRUB_KERNEL_MACHINE_STACK_SIZE GRUB_KERNEL_ARM_STACK_SIZE
|
||||
|
||||
#endif /* ! GRUB_KERNEL_MACHINE_HEADER */
|
||||
0
include/grub/arm/coreboot/memory.h
Normal file
0
include/grub/arm/coreboot/memory.h
Normal file
16
include/grub/arm/cros_ec.h
Normal file
16
include/grub/arm/cros_ec.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef GRUB_ARM_CROS_EC_H
|
||||
#define GRUB_ARM_CROS_EC_H 1
|
||||
|
||||
#include <grub/types.h>
|
||||
|
||||
#define GRUB_CROS_EC_KEYSCAN_COLS 13
|
||||
#define GRUB_CROS_EC_KEYSCAN_ROWS 8
|
||||
|
||||
struct grub_cros_ec_keyscan {
|
||||
grub_uint8_t data[GRUB_CROS_EC_KEYSCAN_COLS];
|
||||
};
|
||||
|
||||
int
|
||||
grub_cros_ec_scan_keyboard(struct grub_cros_ec_keyscan *scan);
|
||||
|
||||
#endif
|
||||
@@ -46,6 +46,22 @@ grub_arm_firmware_get_machine_type (void)
|
||||
{
|
||||
return GRUB_ARM_MACHINE_TYPE_FDT;
|
||||
}
|
||||
#elif defined (GRUB_MACHINE_COREBOOT)
|
||||
#include <grub/fdtbus.h>
|
||||
#include <grub/machine/kernel.h>
|
||||
# define LINUX_ADDRESS (start_of_ram + 0x8000)
|
||||
# define LINUX_INITRD_ADDRESS (start_of_ram + 0x02000000)
|
||||
# define LINUX_FDT_ADDRESS (LINUX_INITRD_ADDRESS - 0x10000)
|
||||
static inline const void *
|
||||
grub_arm_firmware_get_boot_data (void)
|
||||
{
|
||||
return grub_fdtbus_get_fdt ();
|
||||
}
|
||||
static inline grub_uint32_t
|
||||
grub_arm_firmware_get_machine_type (void)
|
||||
{
|
||||
return GRUB_ARM_MACHINE_TYPE_FDT;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define FDT_ADDITIONAL_ENTRIES_SIZE 0x300
|
||||
|
||||
16
include/grub/arm/startup.h
Normal file
16
include/grub/arm/startup.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef GRUB_STARTUP_CPU_HEADER
|
||||
#define GRUB_STARTUP_CPU_HEADER
|
||||
|
||||
struct grub_arm_startup_registers
|
||||
{
|
||||
/* registers 0-11 */
|
||||
/* for U-boot r[1] is machine type */
|
||||
/* for U-boot r[2] is boot data */
|
||||
grub_uint32_t r[12];
|
||||
grub_uint32_t sp;
|
||||
grub_uint32_t lr;
|
||||
};
|
||||
|
||||
extern struct grub_arm_startup_registers grub_arm_saved_registers;
|
||||
|
||||
#endif
|
||||
@@ -27,10 +27,6 @@
|
||||
|
||||
#define KEYBOARD_AT_TRANSLATE 0x40
|
||||
|
||||
#define GRUB_AT_ACK 0xfa
|
||||
#define GRUB_AT_NACK 0xfe
|
||||
#define GRUB_AT_TRIES 5
|
||||
|
||||
#define KEYBOARD_ISMAKE(x) !((x) & 0x80)
|
||||
#define KEYBOARD_ISREADY(x) ((x) & 0x01)
|
||||
#define KEYBOARD_SCANCODE(x) ((x) & 0x7f)
|
||||
|
||||
@@ -34,15 +34,14 @@ void EXPORT_FUNC(grub_arch_sync_caches) (void *address, grub_size_t len);
|
||||
#endif
|
||||
|
||||
#ifndef GRUB_MACHINE_EMU
|
||||
#ifdef _mips
|
||||
void EXPORT_FUNC(grub_arch_sync_dma_caches) (volatile void *address,
|
||||
grub_size_t len);
|
||||
#else
|
||||
#if defined (__i386__) || defined (__x86_64__)
|
||||
static inline void
|
||||
grub_arch_sync_dma_caches (volatile void *address __attribute__ ((unused)),
|
||||
grub_size_t len __attribute__ ((unused)))
|
||||
{
|
||||
}
|
||||
#else
|
||||
void EXPORT_FUNC(grub_arch_sync_dma_caches) (volatile void *address, grub_size_t len);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
#ifndef _GRUB_MACHINE_LBIO_HEADER
|
||||
#define _GRUB_MACHINE_LBIO_HEADER 1
|
||||
|
||||
#include <grub/types.h>
|
||||
#include <grub/err.h>
|
||||
|
||||
struct grub_linuxbios_table_header
|
||||
{
|
||||
grub_uint8_t signature[4];
|
||||
@@ -68,7 +71,8 @@ enum
|
||||
GRUB_LINUXBIOS_MEMBER_LINK = 0x11,
|
||||
GRUB_LINUXBIOS_MEMBER_FRAMEBUFFER = 0x12,
|
||||
GRUB_LINUXBIOS_MEMBER_TIMESTAMPS = 0x16,
|
||||
GRUB_LINUXBIOS_MEMBER_CBMEMC = 0x17
|
||||
GRUB_LINUXBIOS_MEMBER_CBMEMC = 0x17,
|
||||
GRUB_LINUXBIOS_MEMBER_DTB = 0x33,
|
||||
};
|
||||
|
||||
struct grub_linuxbios_table_framebuffer {
|
||||
@@ -102,4 +106,10 @@ EXPORT_FUNC(grub_linuxbios_table_iterate) (int (*hook) (grub_linuxbios_table_ite
|
||||
void *),
|
||||
void *hook_data);
|
||||
|
||||
grub_linuxbios_table_header_t
|
||||
grub_linuxbios_get_tables (void);
|
||||
|
||||
int
|
||||
grub_linuxbios_check_signature (grub_linuxbios_table_header_t tbl_header);
|
||||
|
||||
#endif
|
||||
44
include/grub/dma.h
Normal file
44
include/grub/dma.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2008,2009 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_DMA_H
|
||||
#define GRUB_DMA_H 1
|
||||
|
||||
struct grub_pci_dma_chunk;
|
||||
|
||||
struct grub_pci_dma_chunk *EXPORT_FUNC(grub_memalign_dma32) (grub_size_t align,
|
||||
grub_size_t size);
|
||||
void EXPORT_FUNC(grub_dma_free) (struct grub_pci_dma_chunk *ch);
|
||||
volatile void *EXPORT_FUNC(grub_dma_get_virt) (struct grub_pci_dma_chunk *ch);
|
||||
grub_uint32_t EXPORT_FUNC(grub_dma_get_phys) (struct grub_pci_dma_chunk *ch);
|
||||
|
||||
static inline void *
|
||||
grub_dma_phys2virt (grub_uint32_t phys, struct grub_pci_dma_chunk *chunk)
|
||||
{
|
||||
return ((grub_uint8_t *) grub_dma_get_virt (chunk)
|
||||
+ (phys - grub_dma_get_phys (chunk)));
|
||||
}
|
||||
|
||||
static inline grub_uint32_t
|
||||
grub_dma_virt2phys (volatile void *virt, struct grub_pci_dma_chunk *chunk)
|
||||
{
|
||||
return (((grub_uint8_t *) virt - (grub_uint8_t *) grub_dma_get_virt (chunk))
|
||||
+ grub_dma_get_phys (chunk));
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -20,6 +20,7 @@
|
||||
#define GRUB_FDT_HEADER 1
|
||||
|
||||
#include <grub/types.h>
|
||||
#include <grub/symbol.h>
|
||||
|
||||
#define FDT_MAGIC 0xD00DFEED
|
||||
|
||||
@@ -95,16 +96,22 @@ struct grub_fdt_empty_tree {
|
||||
#define grub_fdt_set_size_dt_struct(fdt, value) \
|
||||
grub_fdt_set_header(fdt, size_dt_struct, value)
|
||||
|
||||
int grub_fdt_create_empty_tree (void *fdt, unsigned int size);
|
||||
int grub_fdt_check_header (void *fdt, unsigned int size);
|
||||
int grub_fdt_check_header_nosize (void *fdt);
|
||||
int grub_fdt_find_subnode (const void *fdt, unsigned int parentoffset,
|
||||
const char *name);
|
||||
int grub_fdt_add_subnode (void *fdt, unsigned int parentoffset,
|
||||
int EXPORT_FUNC(grub_fdt_create_empty_tree) (void *fdt, unsigned int size);
|
||||
int EXPORT_FUNC(grub_fdt_check_header) (const void *fdt, unsigned int size);
|
||||
int EXPORT_FUNC(grub_fdt_check_header_nosize) (const void *fdt);
|
||||
int EXPORT_FUNC(grub_fdt_find_subnode) (const void *fdt, unsigned int parentoffset,
|
||||
const char *name);
|
||||
int EXPORT_FUNC(grub_fdt_first_node) (const void *fdt, unsigned int parentoffset);
|
||||
int EXPORT_FUNC(grub_fdt_next_node) (const void *fdt, unsigned int currentoffset);
|
||||
int EXPORT_FUNC(grub_fdt_add_subnode) (void *fdt, unsigned int parentoffset,
|
||||
const char *name);
|
||||
const char *
|
||||
EXPORT_FUNC(grub_fdt_get_nodename) (const void *fdt, unsigned int nodeoffset);
|
||||
const void *EXPORT_FUNC(grub_fdt_get_prop) (const void *fdt, unsigned int nodeoffset, const char *name,
|
||||
grub_uint32_t *len);
|
||||
|
||||
int grub_fdt_set_prop (void *fdt, unsigned int nodeoffset, const char *name,
|
||||
const void *val, grub_uint32_t len);
|
||||
int EXPORT_FUNC(grub_fdt_set_prop) (void *fdt, unsigned int nodeoffset, const char *name,
|
||||
const void *val, grub_uint32_t len);
|
||||
#define grub_fdt_set_prop32(fdt, nodeoffset, name, val) \
|
||||
({ \
|
||||
grub_uint32_t _val = grub_cpu_to_be32(val); \
|
||||
|
||||
73
include/grub/fdtbus.h
Normal file
73
include/grub/fdtbus.h
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2016 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_FDTBUS_HEADER
|
||||
#define GRUB_FDTBUS_HEADER 1
|
||||
|
||||
#include <grub/fdt.h>
|
||||
#include <grub/err.h>
|
||||
|
||||
struct grub_fdtbus_dev;
|
||||
|
||||
struct grub_fdtbus_driver
|
||||
{
|
||||
struct grub_fdtbus_driver *next;
|
||||
struct grub_fdtbus_driver **prev;
|
||||
|
||||
const char *compatible;
|
||||
|
||||
grub_err_t (*attach) (const struct grub_fdtbus_dev *dev);
|
||||
void (*detach) (const struct grub_fdtbus_dev *dev);
|
||||
};
|
||||
|
||||
extern char EXPORT_VAR(grub_fdtbus_invalid_mapping)[1];
|
||||
|
||||
static inline int
|
||||
grub_fdtbus_is_mapping_valid (volatile void *m)
|
||||
{
|
||||
return m != grub_fdtbus_invalid_mapping;
|
||||
}
|
||||
|
||||
volatile void *
|
||||
EXPORT_FUNC(grub_fdtbus_map_reg) (const struct grub_fdtbus_dev *dev, int reg, grub_size_t *size);
|
||||
|
||||
const void *
|
||||
EXPORT_FUNC(grub_fdtbus_get_fdt) (void);
|
||||
|
||||
const char *
|
||||
EXPORT_FUNC(grub_fdtbus_get_name) (const struct grub_fdtbus_dev *dev);
|
||||
|
||||
const void *
|
||||
EXPORT_FUNC(grub_fdtbus_get_prop) (const struct grub_fdtbus_dev *dev,
|
||||
const char *name,
|
||||
grub_uint32_t *len);
|
||||
|
||||
void
|
||||
EXPORT_FUNC(grub_fdtbus_register) (struct grub_fdtbus_driver *driver);
|
||||
|
||||
void
|
||||
EXPORT_FUNC(grub_fdtbus_unregister) (struct grub_fdtbus_driver *driver);
|
||||
|
||||
/* Must be called before any register(). */
|
||||
/* dtb is assumed to be unfreeable and must remain
|
||||
valid for lifetime of GRUB.
|
||||
*/
|
||||
void
|
||||
grub_fdtbus_init (const void *dtb, grub_size_t size);
|
||||
|
||||
#endif
|
||||
@@ -28,7 +28,8 @@ enum
|
||||
OBJ_TYPE_MEMDISK,
|
||||
OBJ_TYPE_CONFIG,
|
||||
OBJ_TYPE_PREFIX,
|
||||
OBJ_TYPE_PUBKEY
|
||||
OBJ_TYPE_PUBKEY,
|
||||
OBJ_TYPE_DTB
|
||||
};
|
||||
|
||||
/* The module header. */
|
||||
|
||||
@@ -291,6 +291,7 @@ struct grub_net_network_level_interface
|
||||
grub_net_interface_flags_t flags;
|
||||
struct grub_net_bootp_packet *dhcp_ack;
|
||||
grub_size_t dhcp_acklen;
|
||||
grub_uint16_t vlantag;
|
||||
void *data;
|
||||
};
|
||||
|
||||
@@ -561,4 +562,6 @@ extern char *grub_net_default_server;
|
||||
#define GRUB_NET_INTERVAL 400
|
||||
#define GRUB_NET_INTERVAL_ADDITION 20
|
||||
|
||||
#define VLANTAG_IDENTIFIER 0x8100
|
||||
|
||||
#endif /* ! GRUB_NET_HEADER */
|
||||
|
||||
@@ -22,10 +22,11 @@
|
||||
#include <grub/net.h>
|
||||
|
||||
extern grub_err_t grub_net_arp_receive (struct grub_net_buff *nb,
|
||||
struct grub_net_card *card);
|
||||
struct grub_net_card *card,
|
||||
grub_uint16_t *vlantag);
|
||||
|
||||
grub_err_t
|
||||
grub_net_arp_send_request (struct grub_net_network_level_interface *inf,
|
||||
const grub_net_network_level_address_t *proto_addr);
|
||||
const grub_net_network_level_address_t *proto_addr);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -48,7 +48,8 @@ grub_err_t
|
||||
grub_net_recv_ip_packets (struct grub_net_buff *nb,
|
||||
struct grub_net_card *card,
|
||||
const grub_net_link_level_address_t *hwaddress,
|
||||
const grub_net_link_level_address_t *src_hwaddress);
|
||||
const grub_net_link_level_address_t *src_hwaddress,
|
||||
grub_uint16_t *vlantag);
|
||||
|
||||
grub_err_t
|
||||
grub_net_send_ip_packet (struct grub_net_network_level_interface *inf,
|
||||
|
||||
@@ -122,6 +122,12 @@
|
||||
#define GRUB_KERNEL_ARM_UBOOT_MOD_ALIGN 0x8
|
||||
#define GRUB_KERNEL_ARM_UBOOT_TOTAL_MODULE_SIZE 0x4
|
||||
|
||||
#define GRUB_KERNEL_ARM_COREBOOT_MOD_ALIGN 0x8
|
||||
#define GRUB_KERNEL_ARM_COREBOOT_TOTAL_MODULE_SIZE 0x4
|
||||
|
||||
#define GRUB_KERNEL_ARM_STACK_SIZE 0x40000
|
||||
#define GRUB_KERNEL_ARM_COREBOOT_MOD_GAP (GRUB_KERNEL_ARM_STACK_SIZE + 1024)
|
||||
|
||||
/* Minimal gap between _end and the start of the modules. It's a hack
|
||||
for PowerMac to prevent "CLAIM failed" error. The real fix is to
|
||||
rewrite grub-mkimage to generate valid ELF files. */
|
||||
|
||||
@@ -142,27 +142,7 @@ grub_pci_address_t EXPORT_FUNC(grub_pci_make_address) (grub_pci_device_t dev,
|
||||
void EXPORT_FUNC(grub_pci_iterate) (grub_pci_iteratefunc_t hook,
|
||||
void *hook_data);
|
||||
|
||||
struct grub_pci_dma_chunk;
|
||||
|
||||
struct grub_pci_dma_chunk *EXPORT_FUNC(grub_memalign_dma32) (grub_size_t align,
|
||||
grub_size_t size);
|
||||
void EXPORT_FUNC(grub_dma_free) (struct grub_pci_dma_chunk *ch);
|
||||
volatile void *EXPORT_FUNC(grub_dma_get_virt) (struct grub_pci_dma_chunk *ch);
|
||||
grub_uint32_t EXPORT_FUNC(grub_dma_get_phys) (struct grub_pci_dma_chunk *ch);
|
||||
|
||||
static inline void *
|
||||
grub_dma_phys2virt (grub_uint32_t phys, struct grub_pci_dma_chunk *chunk)
|
||||
{
|
||||
return ((grub_uint8_t *) grub_dma_get_virt (chunk)
|
||||
+ (phys - grub_dma_get_phys (chunk)));
|
||||
}
|
||||
|
||||
static inline grub_uint32_t
|
||||
grub_dma_virt2phys (volatile void *virt, struct grub_pci_dma_chunk *chunk)
|
||||
{
|
||||
return (((grub_uint8_t *) virt - (grub_uint8_t *) grub_dma_get_virt (chunk))
|
||||
+ grub_dma_get_phys (chunk));
|
||||
}
|
||||
#include <grub/dma.h>
|
||||
|
||||
grub_uint8_t
|
||||
EXPORT_FUNC (grub_pci_find_capability) (grub_pci_device_t dev, grub_uint8_t cap);
|
||||
|
||||
43
include/grub/ps2.h
Normal file
43
include/grub/ps2.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2007,2008,2009 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_PS2_HEADER
|
||||
#define GRUB_PS2_HEADER 1
|
||||
|
||||
#include <grub/types.h>
|
||||
|
||||
#define GRUB_AT_ACK 0xfa
|
||||
#define GRUB_AT_NACK 0xfe
|
||||
#define GRUB_AT_TRIES 5
|
||||
|
||||
/* Make sure it's zeroed-out and set current_set at init. */
|
||||
struct grub_ps2_state
|
||||
{
|
||||
int e0_received;
|
||||
int f0_received;
|
||||
grub_uint8_t led_status;
|
||||
short at_keyboard_status;
|
||||
grub_uint8_t current_set;
|
||||
};
|
||||
|
||||
/* If there is a key pending, return it; otherwise return GRUB_TERM_NO_KEY. */
|
||||
int
|
||||
grub_ps2_process_incoming_byte (struct grub_ps2_state *ps2_state,
|
||||
grub_uint8_t data);
|
||||
|
||||
#endif
|
||||
@@ -321,5 +321,9 @@ grub_usb_err_t
|
||||
grub_usb_check_transfer (grub_usb_transfer_t trans, grub_size_t *actual);
|
||||
void
|
||||
grub_usb_cancel_transfer (grub_usb_transfer_t trans);
|
||||
void
|
||||
grub_ehci_init_device (volatile void *regs);
|
||||
void
|
||||
grub_ehci_pci_scan (void);
|
||||
|
||||
#endif /* GRUB_USB_H */
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#define GRUB_INSTALL_OPTIONS \
|
||||
{ "modules", GRUB_INSTALL_OPTIONS_MODULES, N_("MODULES"), \
|
||||
0, N_("pre-load specified modules MODULES"), 1 }, \
|
||||
{ "dtb", GRUB_INSTALL_OPTIONS_DTB, N_("FILE"), \
|
||||
0, N_("embed a specific DTB"), 1 }, \
|
||||
{ "install-modules", GRUB_INSTALL_OPTIONS_INSTALL_MODULES, \
|
||||
N_("MODULES"), 0, \
|
||||
N_("install only MODULES and their dependencies [default=all]"), 1 }, \
|
||||
@@ -99,6 +101,7 @@ enum grub_install_plat
|
||||
GRUB_INSTALL_PLATFORM_I386_XEN,
|
||||
GRUB_INSTALL_PLATFORM_X86_64_XEN,
|
||||
GRUB_INSTALL_PLATFORM_ARM64_EFI,
|
||||
GRUB_INSTALL_PLATFORM_ARM_COREBOOT,
|
||||
GRUB_INSTALL_PLATFORM_MAX
|
||||
};
|
||||
|
||||
@@ -115,7 +118,8 @@ enum grub_install_options {
|
||||
GRUB_INSTALL_OPTIONS_LOCALE_DIRECTORY,
|
||||
GRUB_INSTALL_OPTIONS_THEMES_DIRECTORY,
|
||||
GRUB_INSTALL_OPTIONS_GRUB_MKIMAGE,
|
||||
GRUB_INSTALL_OPTIONS_INSTALL_CORE_COMPRESS
|
||||
GRUB_INSTALL_OPTIONS_INSTALL_CORE_COMPRESS,
|
||||
GRUB_INSTALL_OPTIONS_DTB
|
||||
};
|
||||
|
||||
extern char *grub_install_source_directory;
|
||||
@@ -176,7 +180,7 @@ grub_install_generate_image (const char *dir, const char *prefix,
|
||||
char *config_path,
|
||||
const struct grub_install_image_target_desc *image_target,
|
||||
int note,
|
||||
grub_compression_t comp);
|
||||
grub_compression_t comp, const char *dtb_file);
|
||||
|
||||
const struct grub_install_image_target_desc *
|
||||
grub_install_get_image_target (const char *arg);
|
||||
|
||||
@@ -51,13 +51,13 @@ grub_mkimage_load_image64 (const char *kernel_path,
|
||||
void
|
||||
grub_mkimage_generate_elf32 (const struct grub_install_image_target_desc *image_target,
|
||||
int note, char **core_img, size_t *core_size,
|
||||
Elf32_Addr target_addr, grub_size_t align,
|
||||
size_t kernel_size, size_t bss_size);
|
||||
Elf32_Addr target_addr,
|
||||
struct grub_mkimage_layout *layout);
|
||||
void
|
||||
grub_mkimage_generate_elf64 (const struct grub_install_image_target_desc *image_target,
|
||||
int note, char **core_img, size_t *core_size,
|
||||
Elf64_Addr target_addr, grub_size_t align,
|
||||
size_t kernel_size, size_t bss_size);
|
||||
Elf64_Addr target_addr,
|
||||
struct grub_mkimage_layout *layout);
|
||||
|
||||
struct grub_install_image_target_desc
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ PACKAGE = @PACKAGE@
|
||||
VERSION = @VERSION@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
|
||||
SHELL = /bin/sh
|
||||
SHELL = @SHELL@
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user