svn commit: r357304 - head/sys/arm64/arm64

Andrew Turner andrew at FreeBSD.org
Thu Jan 30 18:49:19 UTC 2020


Author: andrew
Date: Thu Jan 30 18:49:19 2020
New Revision: 357304
URL: https://svnweb.freebsd.org/changeset/base/357304

Log:
  Shift the ITS processor ID after reading it.
  
  When using the processor ID value we mask off the low and high bits that
  should be zero. Unfortunatly we don't shift the ID value so it won't be
  affected. Add the shift when reading the ID as this will need to align
  with the address based target value.
  
  MFC after:	2 weeks
  Sponsored by:	DARPA, AFRL

Modified:
  head/sys/arm64/arm64/gicv3_its.c

Modified: head/sys/arm64/arm64/gicv3_its.c
==============================================================================
--- head/sys/arm64/arm64/gicv3_its.c	Thu Jan 30 18:34:08 2020	(r357303)
+++ head/sys/arm64/arm64/gicv3_its.c	Thu Jan 30 18:49:19 2020	(r357304)
@@ -685,7 +685,8 @@ its_init_cpu(device_t dev, struct gicv3_its_softc *sc)
 		target = vtophys(rman_get_virtual(&rpcpu->res));
 	} else {
 		/* This ITS wants the unique processor number */
-		target = GICR_TYPER_CPUNUM(gic_r_read_8(gicv3, GICR_TYPER));
+		target = GICR_TYPER_CPUNUM(gic_r_read_8(gicv3, GICR_TYPER)) <<
+		    CMD_TARGET_SHIFT;
 	}
 
 	sc->sc_its_cols[cpuid]->col_target = target;


More information about the svn-src-head mailing list