Release 4.14 arch/h8300/boot/compressed/misc.c
// SPDX-License-Identifier: GPL-2.0
/*
* arch/h8300/boot/compressed/misc.c
*
* This is a collection of several routines from gzip-1.0.3
* adapted for Linux.
*
* malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
*
* Adapted for h8300 by Yoshinori Sato 2006
*/
#include <linux/uaccess.h>
/*
* gzip declarations
*/
#define OF(args) args
#define STATIC static
#undef memset
#undef memcpy
#define memzero(s, n) memset((s), (0), (n))
extern int _end;
static unsigned long free_mem_ptr;
static unsigned long free_mem_end_ptr;
extern char input_data[];
extern int input_len;
extern char output[];
#define HEAP_SIZE 0x10000
#ifdef CONFIG_KERNEL_GZIP
#include "../../../../lib/decompress_inflate.c"
#endif
#ifdef CONFIG_KERNEL_LZO
#include "../../../../lib/decompress_unlzo.c"
#endif
void *memset(void *s, int c, size_t n)
{
int i;
char *ss = (char *)s;
for (i = 0; i < n; i++)
ss[i] = c;
return s;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Yoshinori Sato | 52 | 100.00% | 1 | 100.00% |
Total | 52 | 100.00% | 1 | 100.00% |
void *memcpy(void *dest, const void *src, size_t n)
{
int i;
char *d = (char *)dest, *s = (char *)src;
for (i = 0; i < n; i++)
d[i] = s[i];
return dest;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Yoshinori Sato | 66 | 100.00% | 1 | 100.00% |
Total | 66 | 100.00% | 1 | 100.00% |
static void error(char *x)
{
while (1)
; /* Halt */
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Yoshinori Sato | 16 | 100.00% | 1 | 100.00% |
Total | 16 | 100.00% | 1 | 100.00% |
void decompress_kernel(void)
{
free_mem_ptr = (unsigned long)&_end;
free_mem_end_ptr = free_mem_ptr + HEAP_SIZE;
__decompress(input_data, input_len, NULL, NULL, output, 0, NULL, error);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Yoshinori Sato | 38 | 92.68% | 1 | 50.00% |
Yinghai Lu | 3 | 7.32% | 1 | 50.00% |
Total | 41 | 100.00% | 2 | 100.00% |
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Yoshinori Sato | 250 | 98.04% | 3 | 50.00% |
Yinghai Lu | 3 | 1.18% | 1 | 16.67% |
Linus Torvalds | 1 | 0.39% | 1 | 16.67% |
Greg Kroah-Hartman | 1 | 0.39% | 1 | 16.67% |
Total | 255 | 100.00% | 6 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.