summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2013-08-31 08:16:27 +0200
committerPatrick Georgi <patrick@georgi-clan.de>2013-08-31 08:58:37 +0200
commit2f39eae41d750817143f9372f67de6b1ee96b4a6 (patch)
tree08335656481528b7d55f17bbddc0953e10ddefe6 /src
parentde36d333c27c258bc05ecc0b6649fbdafcae619f (diff)
downloadcoreboot-2f39eae41d750817143f9372f67de6b1ee96b4a6.tar.xz
Remove NRV2B compression support
It wasn't even hooked up to the build system anymore. Change-Id: I4b962ffd945b39451e19da3ec2f7b8e0eecf2e53 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/3892 Reviewed-by: Ronald G. Minnich <rminnich@gmail.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src')
-rw-r--r--src/Kconfig4
-rw-r--r--src/lib/nrv2b.c84
-rw-r--r--src/lib/selfboot.c9
3 files changed, 0 insertions, 97 deletions
diff --git a/src/Kconfig b/src/Kconfig
index 515c6183ef..f714cb2de1 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -640,10 +640,6 @@ config COMPRESSED_PAYLOAD_LZMA
In order to reduce the size payloads take up in the ROM chip
coreboot can compress them using the LZMA algorithm.
-config COMPRESSED_PAYLOAD_NRV2B
- bool
- default n
-
endmenu
menu "Debugging"
diff --git a/src/lib/nrv2b.c b/src/lib/nrv2b.c
deleted file mode 100644
index d84e99ec0b..0000000000
--- a/src/lib/nrv2b.c
+++ /dev/null
@@ -1,84 +0,0 @@
-// This GETBIT is supposed to work on little endian
-// 32bit systems. The algorithm will definitely need
-// some fixing on other systems, but it might not be
-// a problem since the nrv2b binary behaves the same..
-
-#ifndef ENDIAN
-#define ENDIAN 0
-#endif
-#ifndef BITSIZE
-#define BITSIZE 32
-#endif
-
-#define GETBIT_8(bb, src, ilen) \
- (((bb = bb & 0x7f ? bb*2 : ((unsigned)src[ilen++]*2+1)) >> 8) & 1)
-
-#define GETBIT_LE16(bb, src, ilen) \
- (bb*=2,bb&0xffff ? (bb>>16)&1 : (ilen+=2,((bb=(src[ilen-2]+src[ilen-1]*256u)*2+1)>>16)&1))
-#define GETBIT_LE32(bb, src, ilen) \
- (bc > 0 ? ((bb>>--bc)&1) : (bc=31,\
- bb=*(const uint32_t *)((src)+ilen),ilen+=4,(bb>>31)&1))
-
-#if ENDIAN == 0 && BITSIZE == 8
-#define GETBIT(bb, src, ilen) GETBIT_8(bb, src, ilen)
-#endif
-#if ENDIAN == 0 && BITSIZE == 16
-#define GETBIT(bb, src, ilen) GETBIT_LE16(bb, src, ilen)
-#endif
-#if ENDIAN == 0 && BITSIZE == 32
-#define GETBIT(bb, src, ilen) GETBIT_LE32(bb, src, ilen)
-#endif
-static unsigned long unrv2b(uint8_t * src, uint8_t * dst, unsigned long *ilen_p)
-{
- unsigned long ilen = 0, olen = 0, last_m_off = 1;
- uint32_t bb = 0;
- unsigned bc = 0;
- const uint8_t *m_pos;
-
- // skip length
- src += 4;
- /* FIXME: check olen with the length stored in first 4 bytes */
-
- for (;;) {
- unsigned int m_off, m_len;
- while (GETBIT(bb, src, ilen)) {
- dst[olen++] = src[ilen++];
- }
-
- m_off = 1;
- do {
- m_off = m_off * 2 + GETBIT(bb, src, ilen);
- } while (!GETBIT(bb, src, ilen));
- if (m_off == 2) {
- m_off = last_m_off;
- } else {
- m_off = (m_off - 3) * 256 + src[ilen++];
- if (m_off == 0xffffffffU)
- break;
- last_m_off = ++m_off;
- }
-
- m_len = GETBIT(bb, src, ilen);
- m_len = m_len * 2 + GETBIT(bb, src, ilen);
- if (m_len == 0) {
- m_len++;
- do {
- m_len = m_len * 2 + GETBIT(bb, src, ilen);
- } while (!GETBIT(bb, src, ilen));
- m_len += 2;
- }
- m_len += (m_off > 0xd00);
-
- m_pos = dst + olen - m_off;
- dst[olen++] = *m_pos++;
- do {
- dst[olen++] = *m_pos++;
- } while (--m_len > 0);
- }
-
- *ilen_p = ilen;
-
- return olen;
-
-}
-
diff --git a/src/lib/selfboot.c b/src/lib/selfboot.c
index d8c7392038..f69ad1435b 100644
--- a/src/lib/selfboot.c
+++ b/src/lib/selfboot.c
@@ -454,15 +454,6 @@ static int load_self_segments(
return 0;
break;
}
-#if CONFIG_COMPRESSED_PAYLOAD_NRV2B
- case CBFS_COMPRESS_NRV2B: {
- printk(BIOS_DEBUG, "using NRV2B\n");
- unsigned long unrv2b(u8 *src, u8 *dst, unsigned long *ilen_p);
- unsigned long tmp;
- len = unrv2b(src, dest, &tmp);
- break;
- }
-#endif
case CBFS_COMPRESS_NONE: {
printk(BIOS_DEBUG, "it's not compressed!\n");
memcpy(dest, src, len);