-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Decompressor's head.S provided "data mover" sole purpose of which has been to safely move uncompressed kernel at 0x100000 and jump to it. With current bzImage layout entire decompressor's code guaranteed to be in a safe location under 0x100000, and hence could not be overwritten during kernel move. For that reason head.S could be replaced with simple memmove function. To do so introduce early boot code phase which is executed from arch/s390/boot/head.S after "verify_facilities" and takes care of optional kernel image decompression and transition to it. Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
- Loading branch information
Vasily Gorbik
authored and
Martin Schwidefsky
committed
Oct 9, 2018
1 parent
32ce55a
commit 8f75582
Showing
8 changed files
with
43 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
#ifndef BOOT_BOOT_H | ||
#define BOOT_BOOT_H | ||
|
||
void startup_kernel(void); | ||
|
||
#endif /* BOOT_BOOT_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
#ifndef BOOT_COMPRESSED_DECOMPRESSOR_H | ||
#define BOOT_COMPRESSED_DECOMPRESSOR_H | ||
|
||
#ifdef CONFIG_KERNEL_UNCOMPRESSED | ||
static inline void *decompress_kernel(unsigned long *uncompressed_size) {} | ||
#else | ||
void *decompress_kernel(unsigned long *uncompressed_size); | ||
#endif | ||
|
||
#endif /* BOOT_COMPRESSED_DECOMPRESSOR_H */ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
#include <linux/string.h> | ||
#include "compressed/decompressor.h" | ||
#include "boot.h" | ||
|
||
void startup_kernel(void) | ||
{ | ||
void (*startup_continue)(void) = (void *)0x100000; | ||
unsigned long uncompressed_size; | ||
void *uncompressed_img; | ||
|
||
if (!IS_ENABLED(CONFIG_KERNEL_UNCOMPRESSED)) { | ||
uncompressed_img = decompress_kernel(&uncompressed_size); | ||
memmove(startup_continue, uncompressed_img, uncompressed_size); | ||
} | ||
startup_continue(); | ||
} |