Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30509
Change subject: soc/amd/stoneyridge: Don't use CAR_GLOBAL ......................................................................
soc/amd/stoneyridge: Don't use CAR_GLOBAL
All platforms using this code have NO_CAR_GLOBAL_MIGRATION.
Change-Id: I422d5637caa1b55fa6bad30d25f5e34cbba40851 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/soc/amd/stoneyridge/spi.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/30509/1
diff --git a/src/soc/amd/stoneyridge/spi.c b/src/soc/amd/stoneyridge/spi.c index 9baf433..1f168c2 100644 --- a/src/soc/amd/stoneyridge/spi.c +++ b/src/soc/amd/stoneyridge/spi.c @@ -32,7 +32,7 @@
#define SPI_DEBUG_DRIVER IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
-static uintptr_t spibar CAR_GLOBAL; +static uintptr_t spibar;
static uintptr_t get_spibase(void) {
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/30509
to look at the new patch set (#3).
Change subject: soc/amd/stoneyridge: Don't use CAR_GLOBAL ......................................................................
soc/amd/stoneyridge: Don't use CAR_GLOBAL
All platforms using this code have NO_CAR_GLOBAL_MIGRATION.
Change-Id: I422d5637caa1b55fa6bad30d25f5e34cbba40851 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/soc/amd/stoneyridge/spi.c 1 file changed, 7 insertions(+), 13 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/30509/3
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30509 )
Change subject: soc/amd/stoneyridge: Don't use CAR_GLOBAL ......................................................................
Patch Set 4: Code-Review+1
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30509 )
Change subject: soc/amd/stoneyridge: Don't use CAR_GLOBAL ......................................................................
Patch Set 4:
I'll extend this to cover "agesa_dispatcher CAR_GLOBAL" under soc/amd/common.
Kyösti Mälkki has uploaded a new patch set (#5) to the change originally created by Arthur Heymans. ( https://review.coreboot.org/c/coreboot/+/30509 )
Change subject: soc/amd/common: Don't use CAR_GLOBAL ......................................................................
soc/amd/common: Don't use CAR_GLOBAL
All platforms using this code have NO_CAR_GLOBAL_MIGRATION.
Change-Id: I422d5637caa1b55fa6bad30d25f5e34cbba40851 Signed-off-by: Arthur Heymans arthur@aheymans.xyz Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/soc/amd/common/block/pi/agesawrapper.c M src/soc/amd/stoneyridge/spi.c 2 files changed, 12 insertions(+), 22 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/30509/5
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30509 )
Change subject: soc/amd/common: Don't use CAR_GLOBAL ......................................................................
Patch Set 5:
(2 comments)
https://review.coreboot.org/#/c/30509/5/src/soc/amd/stoneyridge/spi.c File src/soc/amd/stoneyridge/spi.c:
https://review.coreboot.org/#/c/30509/5/src/soc/amd/stoneyridge/spi.c@38 PS5, Line 38: spibar = base; code indent should use tabs where possible
https://review.coreboot.org/#/c/30509/5/src/soc/amd/stoneyridge/spi.c@38 PS5, Line 38: spibar = base; please, no spaces at the start of a line
Kyösti Mälkki has uploaded a new patch set (#6) to the change originally created by Arthur Heymans. ( https://review.coreboot.org/c/coreboot/+/30509 )
Change subject: soc/amd/common: Don't use CAR_GLOBAL ......................................................................
soc/amd/common: Don't use CAR_GLOBAL
All platforms using this code have NO_CAR_GLOBAL_MIGRATION.
Change-Id: I422d5637caa1b55fa6bad30d25f5e34cbba40851 Signed-off-by: Arthur Heymans arthur@aheymans.xyz Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/soc/amd/common/block/pi/agesawrapper.c M src/soc/amd/stoneyridge/spi.c 2 files changed, 12 insertions(+), 22 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/30509/6
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30509 )
Change subject: soc/amd/common: Don't use CAR_GLOBAL ......................................................................
Patch Set 6: Code-Review+1
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30509 )
Change subject: soc/amd/common: Don't use CAR_GLOBAL ......................................................................
Patch Set 6: Code-Review+2
Marshall Dawson has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30509 )
Change subject: soc/amd/common: Don't use CAR_GLOBAL ......................................................................
Patch Set 6: Code-Review+2
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30509 )
Change subject: soc/amd/common: Don't use CAR_GLOBAL ......................................................................
Patch Set 6:
This reminded me we have not merged cache-coherency patch: https://review.coreboot.org/c/coreboot/+/26115
I'll split that one. If I remember correctly the non-shared MTRR setup caused an issue where quadcores failed to boot with soc/stoney while old binaryPI/Carrizo board port worked?
Kyösti Mälkki has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/30509 )
Change subject: soc/amd/common: Don't use CAR_GLOBAL ......................................................................
soc/amd/common: Don't use CAR_GLOBAL
All platforms using this code have NO_CAR_GLOBAL_MIGRATION.
Change-Id: I422d5637caa1b55fa6bad30d25f5e34cbba40851 Signed-off-by: Arthur Heymans arthur@aheymans.xyz Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com Reviewed-on: https://review.coreboot.org/c/30509 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Paul Menzel paulepanter@users.sourceforge.net Reviewed-by: Aaron Durbin adurbin@chromium.org Reviewed-by: Marshall Dawson marshalldawson3rd@gmail.com --- M src/soc/amd/common/block/pi/agesawrapper.c M src/soc/amd/stoneyridge/spi.c 2 files changed, 12 insertions(+), 22 deletions(-)
Approvals: build bot (Jenkins): Verified Paul Menzel: Looks good to me, but someone else must approve Aaron Durbin: Looks good to me, approved Marshall Dawson: Looks good to me, approved
diff --git a/src/soc/amd/common/block/pi/agesawrapper.c b/src/soc/amd/common/block/pi/agesawrapper.c index 0fcb93e..89cb9be 100644 --- a/src/soc/amd/common/block/pi/agesawrapper.c +++ b/src/soc/amd/common/block/pi/agesawrapper.c @@ -14,7 +14,6 @@ * GNU General Public License for more details. */
-#include <arch/early_variables.h> #include <arch/acpi.h> #include <cpu/x86/mtrr.h> #include <cbfs.h> @@ -613,23 +612,20 @@ return (AMD_MODULE_HEADER *)image->ModuleInfoOffset; }
-static MODULE_ENTRY agesa_dispatcher CAR_GLOBAL; +static MODULE_ENTRY agesa_dispatcher;
MODULE_ENTRY agesa_get_dispatcher(void) { const AMD_MODULE_HEADER *module; static const char id[8] = AGESA_ID; - MODULE_ENTRY val = car_get_var(agesa_dispatcher);
- if (val != NULL) - return val; + if (agesa_dispatcher != NULL) + return agesa_dispatcher;
module = agesawrapper_locate_module(id); if (!module) return NULL;
- val = module->ModuleDispatcher; - car_set_var(agesa_dispatcher, val); - - return val; + agesa_dispatcher = module->ModuleDispatcher; + return agesa_dispatcher; } diff --git a/src/soc/amd/stoneyridge/spi.c b/src/soc/amd/stoneyridge/spi.c index 9baf433..9d62f67 100644 --- a/src/soc/amd/stoneyridge/spi.c +++ b/src/soc/amd/stoneyridge/spi.c @@ -17,7 +17,6 @@ #include <stdlib.h> #include <string.h> #include <arch/io.h> -#include <arch/early_variables.h> #include <lib.h> #include <timer.h> #include <console/console.h> @@ -32,36 +31,31 @@
#define SPI_DEBUG_DRIVER IS_ENABLED(CONFIG_DEBUG_SPI_FLASH)
-static uintptr_t spibar CAR_GLOBAL; - -static uintptr_t get_spibase(void) -{ - return car_get_var(spibar); -} +static uintptr_t spibar;
static void set_spibar(uintptr_t base) { - car_set_var(spibar, base); + spibar = base; }
static inline uint8_t spi_read8(uint8_t reg) { - return read8((void *)(get_spibase() + reg)); + return read8((void *)(spibar + reg)); }
static inline uint32_t spi_read32(uint8_t reg) { - return read32((void *)(get_spibase() + reg)); + return read32((void *)(spibar + reg)); }
static inline void spi_write8(uint8_t reg, uint8_t val) { - write8((void *)(get_spibase() + reg), val); + write8((void *)(spibar + reg), val); }
static inline void spi_write32(uint8_t reg, uint32_t val) { - write32((void *)(get_spibase() + reg), val); + write32((void *)(spibar + reg), val); }
static void dump_state(const char *str) @@ -75,7 +69,7 @@ printk(BIOS_DEBUG, "TxByteCount: %x\n", spi_read8(SPI_TX_BYTE_COUNT)); printk(BIOS_DEBUG, "RxByteCount: %x\n", spi_read8(SPI_RX_BYTE_COUNT)); printk(BIOS_DEBUG, "CmdCode: %x\n", spi_read8(SPI_CMD_CODE)); - hexdump((void *)(get_spibase() + SPI_FIFO), SPI_FIFO_DEPTH); + hexdump((void *)(spibar + SPI_FIFO), SPI_FIFO_DEPTH); }
static int wait_for_ready(void)