[coreboot-gerrit] Change in coreboot[master]: console/flashsconsole: Add spi flash console for debugging

Youness Alaoui (Code Review) gerrit at coreboot.org
Tue May 30 18:17:33 CEST 2017


Youness Alaoui has posted comments on this change. ( https://review.coreboot.org/19849 )

Change subject: console/flashsconsole: Add spi flash console for debugging
......................................................................


Patch Set 10:

(2 comments)

> I'd leave it as is. Issues that you brought up can be fixed as
 > needed. I think with Furquan's SPI changes a lot of the flash part
 > drivers are fixed to not use globals. That just leaves the spi
 > flash controller drivers. It looks like the 'flashes' variable in
 > spi_flash.c should be const, but I doubt that's what you are
 > hitting.

Ok, I'll leave it as is. 
The issue I got previously were indeed all the global vars in the spi drivers which got fixed by Furquan's changes. But compiling for broadwell still fails because of a lack of timer_monotonic_get, and when I add monotonic_timer.c to the Makefile for romstage, it complains about mono_count global variable, which I remove and replace the timer_monotonic_get code in broadwell with the implementation in skylake (which doesn't need a global var), then I get issues with the spi_ctrlr_bus_map and spi_ctrlr_bus_map_count in spi-generic.c. After I removed those and commented out the spi_setup_slave, it worked, no more issues. I didn't test it though.

I'm still baffled as to why I only get the global vars warning (and missing timer_monotonic_get) in romstage but not in bootblock.

https://review.coreboot.org/#/c/19849/10/Makefile.inc
File Makefile.inc:

PS10, Line 819: ifeq ($(CONFIG_CONSOLE_SPI_FLASH),y)
              : FMAP_CONSOLE_BASE := $(call int-add, $(FMAP_FMAP_BASE) $(FMAP_FMAP_SIZE))
              : FMAP_CONSOLE_SIZE := $(CONFIG_CONSOLE_SPI_FLASH_BUFFER_SIZE)
              : FMAP_CONSOLE_ENTRY := CONSOLE@$(FMAP_CONSOLE_BASE) $(FMAP_CONSOLE_SIZE)
              : else # ifeq ($(CONFIG_CONSOLE_SPI_FLASH),y)
              : FMAP_CONSOLE_ENTRY :=
              : FMAP_CONSOLE_BASE := 0
              : FMAP_CONSOLE_SIZE := 0
              : endif # ifeq ($(CONFIG_CONSOLE_SPI_FLASH),y)
> It seems to me that this sequence could be used for both branches of the co
I've made both conditions the same. I don't understand what you meant about it being a pain because of :=


https://review.coreboot.org/#/c/19849/10/src/drivers/spi/flashconsole.c
File src/drivers/spi/flashconsole.c:

PS10, Line 19: #include <cbfs.h>
> no longer needed
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I74a297b94f6881d8c27cbe5168f161d8331c3df3
Gerrit-PatchSet: 10
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Youness Alaoui <snifikino at gmail.com>
Gerrit-Reviewer: Aaron Durbin <adurbin at chromium.org>
Gerrit-Reviewer: Julius Werner <jwerner at chromium.org>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: Philippe Mathieu-Daudé <philippe.mathieu.daude at gmail.com>
Gerrit-Reviewer: Youness Alaoui <snifikino at gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
Gerrit-HasComments: Yes



More information about the coreboot-gerrit mailing list