Commit Graph
100 Commits
Author SHA1 Message Date
Vladimir Serbinenko 575c7a6e3c Allow _start == 0 with relocatable images 2016-02-19 02:03:28 +01:00
Vladimir Serbinenko fc489a889d Provide __bss_start and _end symbols in grub-mkimage.
For this ensure that all bss sections are merged.
2016-02-19 02:02:50 +01:00
Vladimir Serbinenko bfb517bc3b encapsulate 2016-02-19 01:58:11 +01:00
Vladimir Serbinenko 437dba573f Remove useless ifdef 2016-02-19 01:28:16 +01:00
Vladimir Serbinenko 974ba94330 mkimagexx: Split PE and generic part. 2016-02-19 01:14:12 +01:00
Vladimir Serbinenko 963d21b76c file split 2016-02-19 01:14:12 +01:00
Vladimir Serbinenko e3745f9087 default_payload.elf: Always rebuild and remove before build.
It's difficult to know all dependencies. Since it's manual and cheap
target anyway, simply always rebuild it.
2016-02-17 18:19:18 +01:00
Vladimir Serbinenko 01d50c2539 default_payload.elf: Include password_pbkdf2.
Withoout this module we may end up in a system where no password is
accepted.
2016-02-17 18:11:51 +01:00
Vladimir Serbinenko 8d69065f52 default_payload.elf: Add modules from $(EXTRA_PAYLOAD_MODULES).
This allows coreboot building system to add extra modules depending
on user config.
2016-02-17 18:10:31 +01:00
Vladimir Serbinenko 59ec05bcf8 mm: Avoid integer overflow. 2016-02-17 18:09:44 +01:00
Vladimir Serbinenko fabde8324d Remove -Wno-maybe-uninitialized as it may not be present. 2016-02-17 17:58:05 +01:00
Vladimir Serbinenko 5cae910665 Fix warnings when compiling with -O3 2016-02-17 17:56:41 +01:00
Vladimir Serbinenko 25492a0f04 Add wbinvd around bios call.
Via C3 has problems with cache coherency when transitioning between the modes,
so flush it around bios calls.
2016-02-14 08:34:10 +01:00
Vladimir Serbinenko a2ab8c2172 TODO: Remove obsolete link 2016-02-12 17:51:52 +01:00
Vladimir Serbinenko feef882f98 grub-shell: Update 32-bit OVMF binary name. 2016-02-12 16:08:04 +01:00
Vladimir Serbinenko 6e1ace590a Change -v to -V for version of shell utils. 2016-02-12 15:46:05 +01:00
Vladimir Serbinenko 7c35f65aac xnu: Add new kernel path to autoconfig. 2016-02-12 15:42:26 +01:00
Vladimir Serbinenko 4598cafa7d arm64: Use cpu timer for timekeeping. 2016-02-12 12:43:02 +01:00
Vladimir Serbinenko 6f4189ffc1 powerpc: Trim header in tests. 2016-02-12 12:42:04 +01:00
Vladimir Serbinenko 127cfea8be default_payload: Include syslinuxcfg, all filesystems and xnu. 2016-02-12 12:41:28 +01:00
Vladimir Serbinenko 22aa31bcc3 xnu: Supply random seed.
Now we're able to load kernels up to El Capitan.
2016-02-12 12:40:10 +01:00
Vladimir Serbinenko e72de13b9e Add RNG module. 2016-02-12 12:39:38 +01:00
Vladimir Serbinenko 342d6edb97 yylex: use grub_fatal for exit.
lexer calls yylex_fatal on fatal internal errors. yylex_fatal itself is
declared as noreturn and calls exit. Returning from noreturn function has
unpredictable consequences.
2016-02-12 12:34:54 +01:00
Vladimir Serbinenko e5c9300191 printf: Fix and test %% behaviour in presence of subsequenbt args. 2016-02-12 12:33:41 +01:00
Vladimir Serbinenko d9a3bfead8 Split pmtimer wait and tsc measurement from pmtimer tsc calibration. 2016-02-12 11:40:51 +01:00
Vladimir Serbinenko 1933d37371 Make grub_cpu_is_tsc_supported generally available. 2016-02-12 11:38:51 +01:00
Vladimir Serbinenko b29638222e Make grub_acpi_find_fadt accessible generically 2016-02-12 11:35:48 +01:00
Vladimir Serbinenko 8ad190cac2 Make unaligned types public.
This simplifies code which has to handle those types.
2016-02-12 09:11:06 +01:00
Vladimir Serbinenko 281baeecd3 Fix emu compilation error on arm. 2016-02-12 09:10:08 +01:00
Vladimir Serbinenko df4df4d887 xnu: Include relocated EFI in heap size. 2016-02-11 12:30:45 +01:00
Vladimir Serbinenko 2d425ffdd5 xnu: supply ramsize to the kernel.
Without this info recent kernels crash as they allocate no heap.
2016-02-11 11:58:28 +01:00
Vladimir Serbinenko ff84a9b868 Error out if mtools invocation fails. 2016-01-22 19:28:08 +01:00
Vladimir Serbinenko 605eecc985 arm64: Add support for relocations needed for linaro gcc 2016-01-22 19:09:37 +01:00
Vladimir Serbinenko b6a03dfd32 efiemu: Fix compilation failure 2016-01-22 14:10:30 +01:00
Vladimir Serbinenko 5f2b285bf8 Document cpuid -p 2016-01-22 13:50:53 +01:00
Vladimir Serbinenko dab148891e Document expr1 expr2 syntax for test command 2016-01-22 13:27:36 +01:00
Vladimir Serbinenko 0edd750e50 xen_boot: Remove obsolete module type distinctions. 2016-01-22 10:18:47 +01:00
Vladimir Serbinenko cc2ed41039 arm: Ignore qemu clock bug 2016-01-22 10:12:43 +01:00
Vladimir Serbinenko 7c6c2ad42c i386-ieee1275: Increase maximum heap size to accomodate highres graphi tests 2016-01-22 10:12:43 +01:00
Vladimir Serbinenko b4787552b0 Tests: Support arm-efi 2016-01-08 09:49:08 +01:00
Vladimir Serbinenko e4c49cab9b arm64/setjmp: Add missing move for arg1 == 0 case. 2016-01-07 21:10:05 +01:00
Vladimir Serbinenko 9efd79f376 grub-shell: Support arm64-efi 2016-01-07 21:02:53 +01:00
Vladimir Serbinenko a2dcab70f8 x86_64-efi: Automatically add -bios OVMF.fd to qemu in tests. 2016-01-07 19:29:53 +01:00
Vladimir Serbinenko 62328a95c9 Allow GRUB_QEMU_OPTS to override machine. 2016-01-07 19:28:47 +01:00
Vladimir Serbinenko 6e4174f6f9 arm64: Disable tests that need native drivers. 2016-01-07 19:27:56 +01:00
Vladimir Serbinenko 06c94739a5 Disable NetBSD bootcheck on EFI until it supports ACPI on EFI. 2016-01-07 19:27:10 +01:00
Vladimir Serbinenko db5eb6225d grub-shell: Use new cbfstool syntax. 2016-01-07 15:55:45 +01:00
Vladimir Serbinenko 44876dd64e grub-shell: On i386-ieee1275 don't try to switch to console.
console goes to serial as well, so this doesn't stop garbage from going
to serial. But it creates garbage itself.
2016-01-07 15:54:42 +01:00
Vladimir Serbinenko 86e3b4ba1a hddboot_test: reenable on OVMF
OVMF now supports booting from disks.
2016-01-07 15:54:06 +01:00
Vladimir Serbinenko 607d66116a iee1275/datetime: Fix off-by-1 error. 2016-01-07 15:53:42 +01:00
Vladimir Serbinenko 716c9f2675 Adjust bootcheck tests for multiboot/coreboot/qemu to match real support.
coreboot has ACPI while 2 others don't. *BSD need ACPI and have trouble
without it. Don't even attempt to boot *BSD on multiboot or qemu targets.

On coreboot boot all *BSD except 32-bit NetBSD which apparently does some
early BIOS calls.
2016-01-07 15:51:03 +01:00
Vladimir Serbinenko 9f8f9e62af minixfs_test: Check if mkfs.minixfs supports -B option. 2016-01-05 21:10:27 +01:00
Vladimir Serbinenko f86fd54cf0 Add memdisk support to grub-emu.
Use it to add custom files, so that tests which need them work.
2016-01-05 21:10:27 +01:00
Vladimir Serbinenko 3f430a0126 Move file loading functions to grub-emu.
So that we can use it in grub-emu as well as utils.
2016-01-05 21:10:27 +01:00
Vladimir Serbinenko f2b54835f2 Disable progress indicator in grub-shell.
This disables progress indicator for tests. This in turn fixes test
flakiness as they ended up timing-dependent.
2016-01-05 21:10:10 +01:00
Vladimir Serbinenko 300be005a8 Update checksums 2016-01-05 11:55:30 +01:00
Vladimir Serbinenko 80fdaf1d01 configure.ac: Reorder efiemu check to after link format check.
efiemu is supposed to be disabled when compiling through exe format.
Unfortunately format was determined only after efiemu check. Reorder to fix the
problem
2015-12-31 22:36:23 +01:00
Vladimir Serbinenko 40051fedc3 configure: Add -fno-unwind-tables if supported.
Unwind tables are useless for us bt consume space if present. Ensure that they
are not.
2015-12-31 19:20:03 +01:00
Vladimir Serbinenko dcc499aaf0 module-verifier: allow limited-range relocations on sparc64.
clang as incomplete mcmodel=large support. As we don't currently need full
mcmodel=large support for sparc64, relax those checks.
2015-12-31 18:30:39 +01:00
Vladimir Serbinenko 3b21499506 Disable build-time module check on emu.
On emu some checks can be laxer like check for relocation range. Additionally
module loading in emu is rarely used. So skip this check rather than making
it laxer for all platforms. In ideal we may want to have slightly different
check for emu but for now this is good enough.
2015-12-31 18:20:11 +01:00
Vladimir Serbinenko 5ae590b32d configure: Fix grub_cv_cc_fno_unwind_tables check.
Check tries -fno-dwarf2-cfi-asm but adds -fno-asynchronous-unwind-tables
to TARGET_CFLAGS. Fix this.
2015-12-31 18:19:15 +01:00
Vladimir Serbinenko f1b3525385 Add -mno-stack-arg-probe on mingw.
This argument disables generation of calls to __chkstk_ms. Those calls are
useless on GRUB as function is dummy. Yet they increase module size and
use limited-range relocations which may not work under some memory layouts.
We currently don't use such layouts on concerned platforms but lt's correct
this.
2015-12-31 18:15:49 +01:00
Vladimir Serbinenko 68e158dffd Strip .ARM.exidx
This section is generated by clang and is useful only for debugging.
It contains exotic relocations, so strip them to avoid them interferring
with module loading.
2015-12-31 18:13:59 +01:00
Vladimir Serbinenko e1b2b9bf1d module-verifier: Check range-limited relative relocations.
Check that they point to the same module, so will end up in the same
chunk of memory.
2015-12-31 15:29:28 +01:00
Vladimir Serbinenko 76588d1319 xen/relocator: Use local symbol to ensure that code is relocation-free. 2015-12-31 14:54:56 +01:00
Vladimir Serbinenko 60ae582142 backtrace: Fix register call syntax 2015-12-31 14:54:48 +01:00
Vladimir Serbinenko a7cf8b1e23 Verify modules on build-time rather than failing in runtime. 2015-12-31 13:09:15 +01:00
Vladimir Serbinenko 5919626c90 sparc64: Fix assembly to let compiler to fill in memory references.
This fixes the use of not fully relocatable (they assume that variables are
under 4G limit in virtual memory) references.
2015-12-31 13:07:16 +01:00
Vladimir Serbinenko 79cfad6fbe backtrace: Remove assembly assumption that grub_backtrace_pointer is under 4G 2015-12-30 18:19:44 +01:00
Vladimir Serbinenko dbab354157 grub-mkrescue: Delete temporary file
Reported by: Thomas Schmitt
2015-12-29 17:48:34 +01:00
Vladimir Serbinenko 4111882828 grub-mount: Fix oath parsing.
Brackets detection was copied from somewhere else and makes no sense in case
of grub-mount and prevents user from accessing and files with ) in them.
2015-12-29 17:43:05 +01:00
Vladimir Serbinenko ca7bb46d5c exfat: Fix stream extension flag parsing. 2015-12-29 17:42:25 +01:00
Vladimir Serbinenko 4803db51ff Document bootlocation discovery limitations and xen platform limitations 2015-12-14 16:21:24 +01:00
Vladimir Serbinenko d43a5ee651 tsc: Use alternative delay sources whenever appropriate.
PIT isn't available on some of new hardware including Hyper-V. So
use pmtimer for calibration. Moreover pmtimer calibration is faster, so
use it on coreboor where booting time is important.

Based on patch by Michael Chang.
2015-11-27 11:39:55 +01:00
Vladimir Serbinenko e0bd66c314 multiboot: Don't rely on particular ordering of options. 2015-11-12 11:54:38 +01:00
Vladimir Serbinenko 95ba04606f multiboot_mbi: Fix handling of --quirk-bad-kludge. 2015-11-12 11:54:13 +01:00
Vladimir Serbinenko 323ef2bdc3 asm-tests/i386-pc: Check that near jumps are 2 bytes.
We already check that jump over 300 bytes gap is 3 bytes in code16-mode.
Some clang versions generate 3-byte opcode for short jumps which makes
boot.img blow over 512-byte limit. Enforce -no-integrated-as in such cases
2015-11-11 18:14:25 +00:00
Vladimir Serbinenko 25a9b8f208 fdt.mod: Move license tag to the right file. 2015-11-09 16:15:30 +01:00
Vladimir Serbinenko 254f92815b kern/elf: Ignore cast-align warnings 2015-11-09 11:39:30 +01:00
Vladimir Serbinenko cb28250cfc cbfs: Fix corner case and compilation with recdent gcc
Accept the header to touch the jump address at 0xfffffff0.

Fix compilation for 64-bit EFI with recent GCC.
2015-11-09 03:24:04 +01:00
Vladimir Serbinenko 4656ced41c fstester: Enforce LC_ALL=C 2015-11-08 22:39:36 +01:00
Vladimir Serbinenko b2fc9acdc9 Adapt build-system to use imported xen headers. 2015-11-08 21:24:18 +01:00
Vladimir Serbinenko e07badcc31 Import xen headers directly into GRUB 2015-11-08 21:23:52 +01:00
Vladimir Serbinenko 855fe6869c cbfs: Check for ptr range sanity.
Triaged by Andrei and enhanced with suggestions by Aaron Durbin
Also-By: Andrei Borzenkov <arvidjaar@gmail.com>
2015-11-08 20:34:30 +01:00
Vladimir Serbinenko a39137aefe Remove reliance C.UTF-8 2015-11-08 20:23:15 +01:00
Vladimir Serbinenko db97faec91 genmoddep.awk: Add a test that we have no circular dependencies 2015-11-08 20:00:27 +01:00
Vladimir Serbinenko 7cc27aeda9 Makefile.core.def: Break circular dependency on arm64. 2015-11-08 18:47:53 +01:00
Vladimir Serbinenko ae66efc63b autogen: Use cp instead of ln -s.
libgcrypt-grub shouldn't be modified directly anyway. With this patch
tarball without contrib can be unpacked on FAT and stay usable for
out-of-tree compile on full POSIX FS (compile on FAT not tested).
2015-11-08 18:45:57 +01:00
Vladimir Serbinenko cd6d79cda2 configure.ac: Explicitly add -mno-sse3 on x86. 2015-11-06 04:32:34 +01:00
Vladimir Serbinenko 5b7b4d9781 README: Remove dead link to the wiki 2015-11-06 04:31:23 +01:00
Vladimir Serbinenko 4d0cb75538 arm64: Move FDT functions to separate module 2015-10-29 14:06:45 +01:00
Vladimir Serbinenko cfabe05cc6 mips: Make setjmp code N32-compliant. 2015-10-11 13:20:26 +02:00
Vladimir Serbinenko 285540e448 mips: Make the assembly-code N32-compatible.
There are no $t4 or $t5 in N32 but there are $a4 and $a5.
2015-10-11 13:20:26 +02:00
Vladimir Serbinenko c2443e49bc mips/dl: Handle addend in RELA entries. 2015-10-09 23:32:06 +02:00
Vladimir Serbinenko f59b83fce6 gfxmenu/model: Delete empty file. 2015-10-09 23:30:53 +02:00
Vladimir Serbinenko 72fc110d95 ahci: Ensure that bus mastering is set.
Fixes ahci_test failing on several platforms.
2015-07-28 01:51:14 +02:00
Vladimir Serbinenko d3b464a7c0 archelp: Never pass NULL as mtime.
Moves complexity from fs code (NULL check) to common code (passing non-NULL).
2015-07-27 13:19:02 +02:00
Vladimir Serbinenko 5fb1e859f7 HFS: Convert to fshelp.
HFS doesn't handle "." and ".." properly. Convert it to fshelp to reuse the
logic.
2015-07-27 12:50:22 +02:00
Vladimir Serbinenko bfb5b33e96 FAT: Convert to fshelp.
exFAT doesn't handle "." and ".." correctly, convert it to fshelp to
reuse the same logic.
2015-07-27 12:49:26 +02:00
Vladimir Serbinenko d1d3a60b71 BFS: Convert to fshelp.
BFS doesn't handle ".." correctly, so convert it to fshelp to reuse the logic.
2015-07-27 12:48:38 +02:00