arch-arm: Refactor code to check if gic is GicV2
authorChun-Chen TK Hsu <chunchenhsu@google.com>
Tue, 1 Oct 2019 13:22:27 +0000 (21:22 +0800)
committerChun-Chen TK Hsu <chunchenhsu@google.com>
Thu, 14 Nov 2019 00:04:20 +0000 (00:04 +0000)
commit7f25332af078d0843b8f9e343def59c22d12c6a0
tree8ee22c7fefd9a5e54c0dabd807739ed5d5b7b78d
parentc2f2913ff23505ceba82f8e5f044ce032455765b
arch-arm: Refactor code to check if gic is GicV2

Refactor code to use cpu_addr only when gic is GicV2 since cpu_addr is
only meanful to GicV2.

Test: Boot Android P successfully with the following command:
M5_PATH=$PWD/fs_files ./build/ARM/gem5.opt
./configs/example/arm/fs_bigLITTLE.py --dtb
$PWD/fs_files/binaries/armv8_gem5_v2_1cpu.dtb --kernel
$PWD/fs_files/binaries/vmlinux --disk $PWD/fs_files/disks/disk.img
--kernel-init "/init" --cpu-type fastmodel --machine-type
VExpressFastmodel --big-cpu-clock "2GHz" --big-cpus 1 --little-cpus 0
--mem-size 8GB --kernel-cmd "earlyprintk=pl011,0x1c090000
console=ttyAMA0 lpj=19988480 norandmaps rw loglevel=8 mem=8GB
root=/dev/vda1 init=/init androidboot.hardware=gem5 qemu=1 qemu.gles=2
android.bootanim=0 vmalloc=640MB android.early.fstab=/fstab.gem5
androidboot.selinux=permissive audit=0 cma=128M"

Change-Id: Iedd1388f292685c25f1effcd2e14b3db8899dff9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21339
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
src/arch/arm/fastmodel/GIC/gic.cc
src/arch/arm/fastmodel/GIC/gic.hh
src/arch/arm/system.cc
src/dev/arm/base_gic.hh
src/dev/arm/gic_v2.cc
src/dev/arm/gic_v2.hh
src/dev/arm/gic_v3.cc
src/dev/arm/gic_v3.hh