Commit Graph
800 Commits
Author SHA1 Message Date
Vladimir Serbinenko 502a7c48e9 ARM caches 2016-02-22 03:34:16 +01:00
Vladimir Serbinenko f51e8d0dda coreboot 2016-02-22 03:27:39 +01:00
Vladimir Serbinenko 3b1bb7f3eb DTB overrides 2016-02-22 00:05:40 +01:00
Vladimir Serbinenko 0b71582111 coreboot 2016-02-21 20:28:10 +01:00
Vladimir Serbinenko 192243b13e Out-of-place FDT handling 2016-02-21 20:27:28 +01:00
Vladimir Serbinenko f2df41cffa coreboot 2016-02-21 19:28:40 +01:00
Vladimir Serbinenko 869a0bc476 coreboot 2016-02-21 18:44:55 +01:00
Vladimir Serbinenko f9ee0c3e5d Simplify reloc 2016-02-21 18:44:18 +01:00
Vladimir Serbinenko 78e9b82d2c coreboot memory before _start 2016-02-21 18:41:39 +01:00
Vladimir Serbinenko 86139504b7 pl050 2016-02-21 01:53:44 +01:00
Vladimir Serbinenko bacb8f911f coreboot 2016-02-21 00:05:38 +01:00
Vladimir Serbinenko a29fb4722c coreboot 2016-02-20 16:26:23 +01:00
Vladimir Serbinenko c3c14cffef refresh before abort 2016-02-20 09:12:15 +01:00
Vladimir Serbinenko 84939af253 generic timer safeguard 2016-02-20 09:12:02 +01:00
Vladimir Serbinenko 2c3a054f4f WIP 2016-02-19 12:41:50 +01:00
Vladimir Serbinenko b8eda96422 rename 2016-02-19 12:17:56 +01:00
Vladimir Serbinenko a4f7d77f7d fs 2016-02-19 04:48:50 +01:00
Vladimir Serbinenko 5099975ace fd 2016-02-19 04:48:17 +01:00
Vladimir Serbinenko 018e382144 decouple 2016-02-19 04:31:59 +01:00
Vladimir Serbinenko 46569db585 arm-uboot: Make self-relocatable to allow loading at any address 2016-02-19 03:22:10 +01:00
Vladimir Serbinenko 59ec05bcf8 mm: Avoid integer overflow. 2016-02-17 18:09:44 +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 4598cafa7d arm64: Use cpu timer for timekeeping. 2016-02-12 12:43:02 +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 281baeecd3 Fix emu compilation error on arm. 2016-02-12 09:10:08 +01:00
Andrei Borzenkov 67dba97e45 support modules without symbol table
all_video module does not have any code or data and exists solely for
.moddeps section to pull in dependencies. This makes all symbols unneeded.

While in current binutils (last released version as of this commit is 2.26)
``strip --strip-unneeded'' unintentionally adds section symbols for each
existing section, this behavior was considered a bug and changed in commit
14f2c699ddca1e2f706342dffc59a6c7e23e844c to completely strip symbol table
in this case.

Older binutils (verified with 2.17) and some other toolchains (at least
elftoolchain r3223M), both used in FreeBSD, remove symbol table in all_video
as well.

Relax run-time check and do not return error for modules without symbol table.
Add additional checks to module verifier to make sure such modules

a) have non-empty .moddeps section. Without either externally visible symbols
or .moddeps modules are completely useless and should not be built.

b) do not have any relocations.

Closes: 46986

v2: add run-time check for empty symbol table if relocations are present as
    suggested by Vladimir.
2016-02-03 20:34:55 +03:00
Vladimir Serbinenko 605eecc985 arm64: Add support for relocations needed for linaro gcc 2016-01-22 19:09:37 +01:00
Michael Chang 64e2d139fe Restore terminal settings on grub-emu exit. 2016-01-22 11:05:32 +01:00
Vladimir Serbinenko 7c6c2ad42c i386-ieee1275: Increase maximum heap size to accomodate highres graphi tests 2016-01-22 10:12:43 +01:00
Andrei Borzenkov 4f8fe948b9 loader: Unintended sign extension
CID: 96707, 96699, 96693, 96691, 96711, 96709, 96708, 96703, 96702,
96700, 96698, 96696, 96695, 96692, 96710, 96705
2016-01-15 19:18:05 +03:00
Andrei Borzenkov 269a522c7d hostdisk: fix device detection
Condition was apparently reversed so GRUB assumed all devices were
files. This later made it skip BLKFLSBUF ioctl on Linux which caused
various page cache coherency issues. Observed were

- failure to validate blocklist install (read content did not match
  just written)

- failure to detect Linux MD on disk after online hot addition
  (GRUB got stale superblock)

Closes: 46691
2016-01-10 10:41:04 +03:00
Andrei Borzenkov 9fecb0588e kern/elf: fix unintended sign extension
Found by: Coverity scan.
CID: 73729, 73735, 73758, 73760
2016-01-09 19:41:26 +03:00
Andrei Borzenkov bd60f5a207 rescue_parser: restructure code to avoid Coverity false positive
If line contains single word, line and argv[0] are aliases, so
no NULL dereference is possible, but Coverity does not know it.
Change code to avoid ambiguity and also remove redundant call to
grub_strchr.

CID: 86725
2016-01-09 18:15:27 +03:00
Mark Salter 7eb27a49e9 arm-efi: Reduce timer event frequency by 10
Timer event to keep grub msec counter was running at 1000HZ. This was too
fast for UEFI timer driver and resulted in a 10x slowdown in grub time
versus wallclock. Reduce the timer event frequency and increase tick
increment accordingly to keep better time.
2016-01-07 20:54:20 +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
Andrei Borzenkov 609c049dcc kernel: print and reset grub_errno after each embedded config line
Otherwise it causes subsequent file open to fail, because grub_file_open
misinterprets set grub_errno for grub_file_get_device_name failure.

Closes: 46540
2015-12-16 21:20:30 +03:00
Michael Chang a03c1034f6 i386: fix TSC calibration using PIT
Condition was accidentally reversed, so PIT calibration always failed
when PIT was present and always succeeded when PIT was missing, but in
the latter case resulted in absurdly fast clock.

Reported and tested by Vitaly Kuznetsov <vkuznets@redhat.com>
2015-12-01 18:49:38 +03:00
Andrei Borzenkov f4c143789a Replace numbers with grub_memory_type_t enums 2015-11-27 19:52:16 +03: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 254f92815b kern/elf: Ignore cast-align warnings 2015-11-09 11:39:30 +01:00
Andrei Borzenkov c1fbc26203 Add comments to code for commit d313218 2015-11-07 13:01:23 +03:00
Paulo Flabiano Smorigo bf3df4070f Implement cross-endian ELF load for powerpc 2015-10-26 22:07:26 +01: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
Andrei Borzenkov d31321835e file: ignore host disk in blocklist check
It cannot work anyway because host disk cannot be read. This fixes hostfs access
on native Windows build where filenames start with '\' or do not have initial
separator at all (d:\foo).

Issue was observed when running grub-fstest on Windows. On UNIX image name is
canonicalized to always start with `/' so this was not noticed.

This has side effect of allowing relative path names on host, but this already
was the case with `ls' command, so it just extends it to all commands.

Reported-By: Arch Stack <archstacker@gmail.com>
Also-By: Arch Stack <archstacker@gmail.com>
2015-10-10 10:02:20 +03:00
Vladimir Serbinenko c2443e49bc mips/dl: Handle addend in RELA entries. 2015-10-09 23:32:06 +02:00
Ignat Korchagin d5847bf594 efi: fix GetVariable return status check in 81ca24a
GetVariable should return EFI_BUFFER_TOO_SMALL if given buffer of size
zero; commit incorrectly checked for EFI_SUCCESS.
2015-07-24 20:46:02 +03:00