android_kernel_xiaomi_sm8350/arch/powerpc/boot
Paul Mackerras 390cbb56a7 [POWERPC] Fix detection of loader-supplied initrd on OF platforms
Commit 79c8541924 introduced code to move
the initrd if it was in a place where it would get overwritten by the
kernel image.  Unfortunately this exposed the fact that the code that
checks whether the values passed in r3 and r4 are intended to indicate
the start address and size of an initrd image was not as thorough as the
kernel's checks.  The symptom is that on OF-based platforms, the
bootwrapper can cause an exception which causes the system to drop back
into OF.

Previously it didn't matter so much if the code incorrectly thought that
there was an initrd, since the values for start and size were just passed
through to the kernel.  Now the bootwrapper needs to apply the same checks
as the kernel since it is now using the initrd data itself (in the process
of copying it if necessary).  This adds the code to do that.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-13 10:46:21 +10:00
..
dts [POWERPC] 85xx: Add initial MPC8544 DS platform files. 2007-03-29 19:39:27 -05:00
.gitignore [POWERPC] Add files build to .gitignore 2006-12-04 20:41:29 +11:00
addnote.c
addRamDisk.c
crt0.S [POWERPC] bootwrapper: missing relocation in crt0.S 2007-04-13 03:55:16 +10:00
devtree.c [POWERPC] bootwrapper: Add dt_xlate_reg(), and use it to find serial registers. 2007-04-13 03:55:15 +10:00
div64.S
dummy.c powerpc/32: Generate miboot images with ARCH=powerpc 2006-01-15 13:00:08 +11:00
elf_util.c [POWERPC] Move bootwrapper ELF parsing routines to a file 2007-04-13 03:55:16 +10:00
elf.h [POWERPC] Move bootwrapper ELF parsing routines to a file 2007-04-13 03:55:16 +10:00
flatdevtree_env.h [POWERPC] Add flatdevtree source 2006-10-23 12:49:18 +10:00
flatdevtree_misc.c [POWERPC] bootwrapper: Add dt_ops methods. 2007-03-21 22:35:21 +11:00
flatdevtree.c [POWERPC] bootwrapper: Make ft_create_node() pay attention to the parent parameter. 2007-03-16 15:49:15 +11:00
flatdevtree.h [POWERPC] bootwrapper: Make ft_create_node() pay attention to the parent parameter. 2007-03-16 15:49:15 +11:00
gunzip_util.c [POWERPC] bootwrapper: Add a fatal error helper 2007-03-26 15:11:20 +10:00
gunzip_util.h [POWERPC] Add documentation for the zImage's gunzip convenience functions 2007-03-16 16:38:19 +11:00
hack-coff.c powerpc: Make COFF zImages for old 32-bit powermacs 2006-01-14 15:04:06 +11:00
install.sh [PATCH] powerpc: trivial: modify comments to refer to new location of files 2006-02-10 16:53:51 +11:00
io.h [POWERPC] Add non-OF serial console support 2006-10-23 12:49:19 +10:00
main.c [POWERPC] bootwrapper: Decompress less, check more 2007-04-13 03:55:17 +10:00
Makefile [POWERPC] bootwrapper: no-gzip fixes 2007-04-13 03:55:16 +10:00
mktree.c [POWERPC] Add mktree utility to arch/powerpc/boot 2006-10-24 15:01:27 +10:00
ns16550.c [POWERPC] bootwrapper: Add dt_xlate_reg(), and use it to find serial registers. 2007-04-13 03:55:15 +10:00
of.c [POWERPC] Fix detection of loader-supplied initrd on OF platforms 2007-04-13 10:46:21 +10:00
ops.h [POWERPC] Routine to find the devtree node of a linux,phandle 2007-04-13 03:55:16 +10:00
page.h
ppc_asm.h
README
reg.h [POWERPC] New reg.h for the zImage 2007-03-26 15:11:20 +10:00
rs6000.h powerpc: Make COFF zImages for old 32-bit powermacs 2006-01-14 15:04:06 +11:00
serial.c [POWERPC] Add non-OF serial console support 2006-10-23 12:49:19 +10:00
simple_alloc.c [POWERPC] Add simple memory allocator to bootwrapper 2006-10-23 12:49:19 +10:00
stdio.c [POWERPC] More bootwrapper reorganization 2006-10-18 15:50:18 +10:00
stdio.h [POWERPC] Add gcc format warnings to zImage printf() 2007-03-26 15:11:20 +10:00
string.h
string.S powerpc: Avoid unaligned loads and stores in boot memcpy code 2006-01-14 15:06:51 +11:00
types.h [POWERPC] Start arch/powerpc/boot code reorganization 2006-09-20 15:09:58 +10:00
util.S [POWERPC] Add non-OF serial console support 2006-10-23 12:49:19 +10:00
wrapper [POWERPC] bootwrapper: no-gzip fixes 2007-04-13 03:55:16 +10:00
zImage.coff.lds.S [POWERPC] zImage: Cleanup and improve zImage entry point 2007-03-13 13:35:03 +11:00
zImage.lds.S [POWERPC] zImage: Cleanup and improve zImage entry point 2007-03-13 13:35:03 +11:00

To extract the kernel vmlinux, System.map, .config or initrd from the zImage binary:

objcopy -j .kernel:vmlinux -O binary zImage vmlinux.gz
objcopy -j .kernel:System.map -O binary zImage System.map.gz
objcopy -j .kernel:.config -O binary zImage config.gz
objcopy -j .kernel:initrd -O binary zImage.initrd initrd.gz


	Peter