system-arm: GICv2/GICv3 have different Distributor addresses
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Mon, 6 Jan 2020 16:11:55 +0000 (16:11 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Tue, 7 Jan 2020 16:32:44 +0000 (16:32 +0000)
https://gem5-review.googlesource.com/c/public/gem5/+/22823 didn't
take into consideration that GICv3's Distributor is placed at a
different address than GICv2's one.
This is reflected by the value in VExpress_GEM5_V2 and in the
FDT in system/arm/dt/platforms/vexpress_gem5_v2_base.dtsi

Change-Id: Ie7661d4e9d3db0c5fe9eb9cea3a24a5e7c266676
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Adrian Herrera <adrian.herrera@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23953
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
system/arm/bootloader/arm64/makefile

index 252db99060020344dfc4026b59998d25f480c363..4834cf535f228d6cea6daecf4dd92c9708f03b2b 100644 (file)
@@ -34,7 +34,7 @@ DESTDIR = $(error Please set DESTDIR to wanted installation directory)
 CFLAGS = -march=armv8-a
 CPPFLAGS = -DPHYS_OFFSET=0x80000000 -DCNTFRQ=0x01800000 \
                   -DUART_BASE=0x1c090000 -DSYSREGS_BASE=0x1c010000 \
-                  -DGIC_DIST_BASE=0x2c001000 -Dkernel=0x80080000 \
+                  -Dkernel=0x80080000 \
                   -Dmbox=0x8000fff8 -Ddtb=0x80000100
 
 LDFLAGS = -N -Ttext 0x00000010 -non_shared -static
@@ -46,11 +46,14 @@ all: mkdir $(BUILDDIR)/boot_emm.arm64 \
        $(BUILDDIR)/boot_v2.arm64
 
 #v1 has a GIC V2
-$(BUILDDIR)/boot_emm.o: CPPFLAGS += -UGICV3 -DGIC_CPU_BASE=0x2c002000
-$(BUILDDIR)/boot.o: CPPFLAGS += -UGICV3 -DGIC_CPU_BASE=0x2c002000
+$(BUILDDIR)/boot_emm.o: CPPFLAGS += -UGICV3 -DGIC_CPU_BASE=0x2c002000 \
+       -DGIC_DIST_BASE=0x2c001000
+$(BUILDDIR)/boot.o: CPPFLAGS += -UGICV3 -DGIC_CPU_BASE=0x2c002000 \
+       -DGIC_DIST_BASE=0x2c001000
 
 #V2 has a GIC V3
-$(BUILDDIR)/boot_v2.o: CPPFLAGS += -DGICV3 -DGIC_REDIST_BASE=0x2c010000
+$(BUILDDIR)/boot_v2.o: CPPFLAGS += -DGICV3 -DGIC_REDIST_BASE=0x2c010000 \
+       -DGIC_DIST_BASE=0x2c000000
 
 $(BUILDDIR)/%.arm64: $(BUILDDIR)/%.o
        $(LD) -o $@ $< $(LDFLAGS)