From 59493717ad7aee5e4d6179b00c66b21af79e0376 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Wed, 13 Apr 2016 21:00:12 +0200 Subject: northbridge/amd/{lx,gx2}: remove immediate accesses of 0 gcc doesn't like these because they're undefined behavior, so use zeroptr instead. For the loop that just does a number of writes (0..4), use zeroptr + i. Checked the disassembly (AMD_RUMBA and PCENGINES_ALIX2D) to not contain ud2 anymore and to look reasonable where zeroptr was used. Change-Id: I4a58220ec9a10c465909ca4ecbe5366d0a8cc0df Signed-off-by: Patrick Georgi Reviewed-on: https://review.coreboot.org/14345 Reviewed-by: Stefan Reinauer Tested-by: build bot (Jenkins) --- src/northbridge/amd/gx2/northbridgeinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/northbridge/amd/gx2/northbridgeinit.c') diff --git a/src/northbridge/amd/gx2/northbridgeinit.c b/src/northbridge/amd/gx2/northbridgeinit.c index 319d95a8ef..348cdb941c 100644 --- a/src/northbridge/amd/gx2/northbridgeinit.c +++ b/src/northbridge/amd/gx2/northbridgeinit.c @@ -656,7 +656,7 @@ void northbridge_init_early(void) /* Now that the descriptor to memory is set up. */ /* The memory controller needs one read to synch its lines before it can be used. */ - i = *(volatile int *) 0; + read32(zeroptr); GeodeLinkPriority(); -- cgit v1.2.3