Ronald G. Minnich (rminnich@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7623
-gerrit
commit 5d0753e194dd58389b9a6e3a89f243e07314c240 Author: Ronald G. Minnich rminnich@gmail.com Date: Tue Dec 2 04:07:02 2014 +0000
RISCV: get RISCV to build again
This makes lzmadecode 64-bit clean (I hope). It also cleans up a few other nits.
Change-Id: I24492e9f357e8d3a6de6abc351267f900eb4a19a Signed-off-by: Ronald G. Minnich rminnich@gmail.com --- src/arch/riscv/Makefile.inc | 4 +--- src/arch/riscv/rom_media.c | 8 -------- src/lib/lzmadecode.c | 3 ++- src/mainboard/emulation/qemu-riscv/uart.c | 1 - 4 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/src/arch/riscv/Makefile.inc b/src/arch/riscv/Makefile.inc index 394220c..1020fc7 100644 --- a/src/arch/riscv/Makefile.inc +++ b/src/arch/riscv/Makefile.inc @@ -41,7 +41,7 @@ bootblock-y += \
$(objcbfs)/bootblock.debug: $(src)/arch/riscv/bootblock.ld $(obj)/ldoptions $$(bootblock-objs) @printf " LINK $(subst $(obj)/,,$(@))\n" - $(LD_bootblock) -m elf64-littleriscv --gc-sections -static -o $@ -L$(obj) $< -T $(src)/arch/riscv/bootblock.ld + $(LD_bootblock) -m elf64lriscv --gc-sections -static -o $@ -L$(obj) $< -T $(src)/arch/riscv/bootblock.ld
endif
@@ -58,7 +58,6 @@ romstage-y += \ $(top)/src/lib/memcpy.c \ $(top)/src/lib/memmove.c \ $(top)/src/lib/memset.c -romstage-y += cbmem.c
romstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
@@ -86,7 +85,6 @@ ramstage-y += rom_media.c ramstage-y += stages.c ramstage-y += misc.c ramstage-y += boot.c -ramstage-y += cbmem.c ramstage-y += tables.c ramstage-y += \ $(top)/src/lib/memchr.c \ diff --git a/src/arch/riscv/rom_media.c b/src/arch/riscv/rom_media.c index 712b7c4..8e858cb 100644 --- a/src/arch/riscv/rom_media.c +++ b/src/arch/riscv/rom_media.c @@ -90,11 +90,3 @@ static int init_rom_media_cbfs(struct cbfs_media *media) { int init_default_cbfs_media(struct cbfs_media *media) { return init_rom_media_cbfs(media); } -// bug in coreboot. Fix me. -// even if you have no use for lzma cbfs demands it. -// and the ulzma code is terrible -- full of bad 32/64 bad things. -unsigned long ulzma(unsigned char *src, unsigned char *dst); -unsigned long ulzma(unsigned char *src, unsigned char *dst) -{ - return 0; -} diff --git a/src/lib/lzmadecode.c b/src/lib/lzmadecode.c index fb57f4f..ada7226 100644 --- a/src/lib/lzmadecode.c +++ b/src/lib/lzmadecode.c @@ -20,6 +20,7 @@ */
#include "lzmadecode.h" +#include <stdint.h>
#define kNumTopBits 24 #define kTopValue ((UInt32)1 << kNumTopBits) @@ -30,7 +31,7 @@
/* Use 32-bit reads whenever possible to avoid bad flash performance. */ #define RC_READ_BYTE (look_ahead_ptr < 4 ? look_ahead.raw[look_ahead_ptr++] \ - : ((((UInt32) Buffer & 3) || ((SizeT) (BufferLim - Buffer) < 4)) ? (*Buffer++) \ + : ((((uintptr_t) Buffer & 3) || ((SizeT) (BufferLim - Buffer) < 4)) ? (*Buffer++) \ : ((look_ahead.dw = *(UInt32 *)Buffer), (Buffer += 4), (look_ahead_ptr = 1), look_ahead.raw[0])))
#define RC_INIT2 Code = 0; Range = 0xFFFFFFFF; \ diff --git a/src/mainboard/emulation/qemu-riscv/uart.c b/src/mainboard/emulation/qemu-riscv/uart.c index 40192c9..6647cde 100644 --- a/src/mainboard/emulation/qemu-riscv/uart.c +++ b/src/mainboard/emulation/qemu-riscv/uart.c @@ -21,7 +21,6 @@ #include <console/uart.h> #include <arch/io.h> #include <boot/coreboot_tables.h> -#include "frontend.h"
static uint8_t *buf = (void *)0x3f8; uintptr_t uart_platform_base(int idx)