[coreboot-gerrit] Change in coreboot[master]: arch/riscv: hls_init: Initialize time{, cmp} with dummy pointers

Jonathan Neuschäfer (Code Review) gerrit at coreboot.org
Sun Sep 24 01:11:59 CEST 2017


Jonathan Neuschäfer has uploaded this change for review. ( https://review.coreboot.org/21657


Change subject: arch/riscv: hls_init: Initialize time{,cmp} with dummy pointers
......................................................................

arch/riscv: hls_init: Initialize time{,cmp} with dummy pointers

In current versions of spike, the config string is not available
anymore, because RISC-V is moving toward OpenFirmware-derived device
trees (either in FDT or text format). Using query_config_string leads to
a crash in these versions of spike.

With this commit and If0bea4bf52d ("riscv: Update register address"),
coreboot reaches the romstage again, on spike.

Change-Id: Ib1e6565145f0b2252deb1f4658221a4f816e2af4
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
---
M src/arch/riscv/mcall.c
1 file changed, 3 insertions(+), 6 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/57/21657/1

diff --git a/src/arch/riscv/mcall.c b/src/arch/riscv/mcall.c
index 7728fba..111cb64 100644
--- a/src/arch/riscv/mcall.c
+++ b/src/arch/riscv/mcall.c
@@ -92,16 +92,13 @@
 
 void hls_init(uint32_t hart_id)
 {
-	query_result res;
-
 	printk(BIOS_SPEW, "hart %d: HLS is %p\n", hart_id, HLS());
 	memset(HLS(), 0, sizeof(*HLS()));
 	HLS()->hart_id = hart_id;
 
-	res = query_config_string(configstring(), "rtc{addr");
-	HLS()->time = (void *)get_uint(res);
-	res = query_config_string(configstring(), "core{0{0{timecmp");
-	HLS()->timecmp = (void *)get_uint(res);
+	/* Initialize these pointers with dummy values, for now */
+	HLS()->time = NULL;
+	HLS()->timecmp = NULL;
 
 	printk(BIOS_SPEW, "Time is %p and timecmp is %p\n",
 	       HLS()->time, HLS()->timecmp);

-- 
To view, visit https://review.coreboot.org/21657
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib1e6565145f0b2252deb1f4658221a4f816e2af4
Gerrit-Change-Number: 21657
Gerrit-PatchSet: 1
Gerrit-Owner: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170923/466345d5/attachment.html>


More information about the coreboot-gerrit mailing list