From: Vladimir Serbinenko Date: Mon, 22 Feb 2016 02:27:39 +0000 (+0100) Subject: coreboot X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=f51e8d0ddad376ad564278648663fc8f6cfcd327;p=thirdparty%2Fgrub.git coreboot --- diff --git a/gentpl.py b/gentpl.py index ed268178b..da67965a4 100644 --- a/gentpl.py +++ b/gentpl.py @@ -63,7 +63,7 @@ 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", "arm_coreboot" ] diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am index a7722290f..e37f93d86 100644 --- a/grub-core/Makefile.am +++ b/grub-core/Makefile.am @@ -240,6 +240,7 @@ 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 @@ -247,6 +248,7 @@ 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 diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def index 55a59a287..8ad671819 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def @@ -163,6 +163,7 @@ kernel = { arm_coreboot = term/ps2.c; arm_coreboot = term/arm/pl050.c; arm_coreboot = commands/keylayouts.c; + arm_coreboot = kern/arm/coreboot/dma.c; terminfoinkernel = term/terminfo.c; terminfoinkernel = term/tparm.c; @@ -589,8 +590,10 @@ module = { module = { name = ehci; common = bus/usb/ehci.c; - common = bus/usb/ehci-pci.c; + arm_coreboot = bus/usb/ehci-fdt.c; + pci = bus/usb/ehci-pci.c; enable = pci; + enable = arm_coreboot; }; module = { diff --git a/grub-core/kern/arm/coreboot/init.c b/grub-core/kern/arm/coreboot/init.c index 723692d62..1e8dfc2a2 100644 --- a/grub-core/kern/arm/coreboot/init.c +++ b/grub-core/kern/arm/coreboot/init.c @@ -83,6 +83,10 @@ heap_init (grub_uint64_t addr, grub_uint64_t size, grub_memory_type_t type, begin = modend; } + /* Avoid DMA problems. */ + if (end >= 0xfe000000) + end = 0xfe000000; + if (end <= begin) return 0;