Commit Graph

7 Commits

Author SHA1 Message Date
Vladimir Serbinenko ca0a4f689a verifiers: File type for fine-grained signature-verification controlling
Let's provide file type info to the I/O layer. This way verifiers
framework and its users will be able to differentiate files and verify
only required ones.

This is preparatory patch.

Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
2018-11-09 13:25:31 +01:00
Vladimir 'phcoder' Serbinenko 99ce1597a4 Add LZSS Mach-O support (needed for new xnu kernelcache).
* grub-core/Makefile.core.def (xnu): Add file lzss.c
	* grub-core/loader/lzss.c: New file.
	* grub-core/loader/xnu.c (grub_xnu_load_driver): Close binaryfile
	on Mach-O open failure.
	* grub-core/loader/macho.c (grub_macho_close): Free uncompressedXX.
	Don't free cmdsXX in uncompressedXX is set.
	(grub_macho_file): Init new fields.
	New argument is_64bit. All users updated.
	Handle compressed. Error out if no suitable architecture is found.
	Don't close file.
	(grub_macho_open): New argument is_64bit. All users updated.
	* grub-core/loader/macho32.c: Add defines for new fields.
	* grub-core/loader/macho64.c: Likewise.
	* grub-core/loader/machoXX.c (grub_macho_contains_macho): Make static.
	(grub_macho_parse): Handle compressed.
	Defer actual processing if compressed.
	(grub_macho_cmds_iterate): Decompress if compressed. New argument
	"filename". All users updated.
	(grub_macho_size): New argument "filename". All users updated.
	(grub_macho_get_entry_point): Likewise.
	(grub_macho_load): Handle compressed.
	* include/grub/macho.h (grub_macho_lzss_header): New struct.
	(GRUB_MACHO_LZSS_OFFSET): New define.
	(grub_decompress_lzss): New proto.
	* include/grub/machoload.h (grub_macho_file): New fields to handle
	compressed.
	(grub_macho_contains_macho64): Remove proto.
	(grub_macho_contains_macho32): Likewise.
	* util/grub.d/30_os-prober.in: Use kernel cache if available.
2012-02-29 13:26:13 +01:00
Vladimir 'phcoder' Serbinenko 83ddae2333 Support v2 xnu boot arguments.
* grub-core/loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree):
	New argument fsbfreq_out.
	(grub_xnu_set_video): Receive an argument grub_xnu_boot_params_common.
	(grub_xnu_boot): Support v2 arguments. Disable PIC so that APIC can
	be used.
	* grub-core/loader/machoXX.c (grub_macho_load): New argument
	darwin_version.
	* grub-core/loader/xnu.c (grub_xnu_darwin_version): New variable.
	* include/grub/i386/xnu.h (grub_xnu_boot_params_common): New struct.
	(grub_xnu_boot_params): Rename to ...
	(grub_xnu_boot_params_v1): ...this. Use grub_xnu_boot_params_common.
	(grub_xnu_boot_params_v2): New struct.
2012-02-28 04:04:19 +01:00
Vladimir 'phcoder' Serbinenko 9c4b5c13e6 Improve gettext support. Stylistic fixes and error handling fixes while
on it.
2012-02-08 19:26:01 +01:00
phcoder 72db7c22f3 crashing snow64 2009-09-02 02:52:10 +02:00
fzielcke b39f9d20a9 remove all trailing whitespace 2009-06-10 21:04:23 +00:00
phcoder bbee0f2b56 2009-05-03 Vladimir Serbinenko <phcoder@gmail.com>
xnu support

	* conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
	(pkglib_MODULES): add xnu.mod
	(xnu_mod_SOURCES): new variable
	(xnu_mod_CFLAGS): likewise
	(xnu_mod_LDFLAGS): likewise
	(xnu_mod_ASFLAGS): likewise
	* conf/i386-pc.rmk: likewise
	* conf/x86_64-efi.rmk: likewise
	* include/grub/efi/efi.h (grub_efi_finish_boot_services): 
	new declaration
	* include/grub/i386/macho.h: new file
	* include/grub/i386/xnu.h: likewise
	* include/grub/macho.h: likewise
	* include/grub/machoload.h: likewise
	* include/grub/x86_64/macho.h: likewise
	* include/grub/x86_64/xnu.h: likewise
	* include/grub/xnu.h: likewise
	* kern/efi/efi.c (grub_efi_finish_boot_services): new function
	* kern/efi/mm.c (MAX_HEAP_SIZE): increase
	* loader/i386/efi/xnu.c: new file
	* loader/i386/pc/xnu.c: likewise
	* loader/i386/xnu.c: likewise
	* loader/i386/xnu_helper.S: likewise
	* loader/macho.c: likewise
	* loader/xnu.c: likewise
	* loader/xnu_resume.c: likewise
	* util/grub-dumpdevtree: likewise
	* include/grub/i386/pit.h: include grub/err.h
	(grub_pit_wait): export
	* util/grub.d/30_os-prober.in: support Darwin/Mac OS X
2009-05-02 23:19:20 +00:00