Commit Graph

23 Commits

Author SHA1 Message Date
Ard Biesheuvel
f7a182154e Factor out x86-isms and add cross compile support
This patch cleans up and refactors the Makefiles to better allow new
architectures to be added:
- remove unused Makefile definitions
- import Makefile definitions from top level rather than redefining
- move x86 specific CFLAGS to inside ifeq() blocks
- remove x86 inline asm
- allow $(FORMAT) to be overridden: this is necessary as there exists no
  EFI or PE/COFF aware objcopy for ARM

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2014-08-12 10:54:05 -04:00
Peter Jones
9ea3d9b401 Make sure we default to assuming we're locked down.
If "SecureBoot" exists but "SetupMode" does not, assume "SetupMode" says
we're not in Setup Mode.

Signed-off-by: Peter Jones <pjones@redhat.com>
2014-06-25 10:55:56 -04:00
Gary Ching-Pang Lin
7a72592b75 Check the secure variables with the lib functions
There are functions defined in lib to check the secure variables.
Use the functions to shun the duplicate code.

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>

Conflicts:
	shim.c
2014-06-25 10:55:12 -04:00
Gary Ching-Pang Lin
d8d7464f2c Remove the duplicate calls in lib/console.c
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
2014-06-25 10:15:31 -04:00
Gary Ching-Pang Lin
dcc523811b MokManager: handle the error status from ReadKeyStroke
On some machines, even though the key event was signaled, ReadKeyStroke
still got EFI_NOT_READY. This commit handles the error status to avoid
console_get_keystroke from returning unexpected keys.

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>

Conflicts:
	MokManager.c
2014-06-25 10:02:18 -04:00
Peter Jones
1762111831 Error check the right thing in get_variable_attr() when allocating.
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-11-21 11:48:24 -05:00
Peter Jones
040f08c249 Initialize entries before we pass it to another function.
Coverity scan noticed that entries is uninitialized when we pass its
location to another function.

Signed-off-by: Peter Jones <pjones@redhat.com>
2013-11-21 11:48:24 -05:00
Peter Jones
28cd5c6b9a Fix wrong sizeof().
CHAR16* vs CHAR16**, so the result is the same on all platforms.

Detected by coverity.

Signed-off-by: Peter Jones <pjones@redhat.com>
2013-11-21 11:48:24 -05:00
Andrew Boie
6caa9bad71 allow 32-bit compilation with 64-bit compiler
Also removed unused LIB_PATH from some Makefiles.

Change-Id: I7d28d18f7531b51b6121a2ffb88bcaedec57c467
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2013-11-12 10:31:59 -05:00
Peter Jones
29d9c7c327 Put SHIM_VERBOSE under shim's guid, not global.
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-10-04 13:54:35 -04:00
Peter Jones
4ab978a369 Try to actually make debug printing look reasonable.
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-10-04 11:51:09 -04:00
Peter Jones
0fb089ee14 Add ident-like blobs to shim.efi for version checking.
I feel dirty.
2013-10-03 11:11:09 -04:00
Peter Jones
aed556c4ab CompareMem expects void * and gcc complains.
Sorry about that.

Signed-off-by: Peter Jones <pjones@redhat.com>
2013-10-02 10:02:01 -04:00
Peter Jones
7076ec11b0 Clean up warnings.
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-10-01 14:38:09 -04:00
Peter Jones
bb2fe4cfb3 Conditionalize overriding the security policy.
Make OVERRIDE_SECURITY_POLICY a build option.

Signed-off-by: Peter Jones <pjones@redhat.com>
2013-10-01 14:03:16 -04:00
Peter Jones
417077f8de Merge console_control.h and console.h
Since these are topically the same thing, they can live together.

Signed-off-by: Peter Jones <pjones@redhat.com>
2013-10-01 14:03:16 -04:00
Peter Jones
bc71a15ed5 Make verbose stuff use console_notify
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-10-01 14:03:16 -04:00
Gary Ching-Pang Lin
59dcd9d1b8 integrate security override 2013-09-26 11:58:03 -04:00
Gary Ching-Pang Lin
7f0208a0f9 Merge variable retrieving functions 2013-09-26 11:58:02 -04:00
Gary Ching-Pang Lin
53862ddace Merge signature.h into efiauthenticated.h and guid.h
Conflicts:
	shim.c
2013-09-26 11:58:02 -04:00
Peter Jones
5e9fee2158 Make EFI_PATH easily resettable from the build command line.
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-09-26 11:58:01 -04:00
Gary Ching-Pang Lin
b1a00240ab simple_file: Allocate buffers for file entries
The dir filter appends L'/' to the directory entries without
allocating a new buffer, and this could crash the whole program.
2013-09-26 11:58:01 -04:00
Matthew Garrett
17857eb8b5 Port MokManager to Linux Foundation loader UI code
This is the first stage of porting the MokManager UI to the UI code used
by the Linux Foundation UEFI loader.
2013-09-26 11:57:59 -04:00