Merge remote-tracking branch 'android-aosp/upstream' into HEAD

Bug: 122085007
Change-Id: I45892a854e13d5db692b02343ec368eeb22efaae
diff --git a/LICENSE b/LICENSE
index 0e0b4b9..e5f8a04 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,3 +1,6 @@
+All modifications and additions Copyright Google Inc., 2013-2018.
+Licensed under the terms of the GPL v.2 (same license as original work).
+
 The following points clarify the QEMU license:
 
 1) QEMU as a whole is released under the GNU General Public License,
diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c
index b3ac2d1..e57cc26 100644
--- a/hw/intc/arm_gic.c
+++ b/hw/intc/arm_gic.c
@@ -1609,6 +1609,22 @@
             *data = s->abpr[cpu];
         }
         break;
+    case 0x20: /* Aliased Interrupt Acknowledge */
+        if (!gic_has_groups(s) || (s->security_extn && !attrs.secure)) {
+            *data = 0;
+        } else {
+            attrs.secure = false;
+            *data = gic_acknowledge_irq(s, cpu, attrs);
+        }
+        break;
+    case 0x28: /* Aliased Highest Priority Pending Interrupt */
+        if (!gic_has_groups(s) || (s->security_extn && !attrs.secure)) {
+            *data = 0;
+        } else {
+            attrs.secure = false;
+            *data = gic_get_current_pending_irq(s, cpu, attrs);
+        }
+        break;
     case 0xd0: case 0xd4: case 0xd8: case 0xdc:
     {
         int regno = (offset - 0xd0) / 4;
@@ -1679,6 +1695,14 @@
     case 0x10: /* End Of Interrupt */
         gic_complete_irq(s, cpu, value & 0x3ff, attrs);
         return MEMTX_OK;
+    case 0x24: /* Aliased End Of Interrupt */
+        if (!gic_has_groups(s) || (s->security_extn && !attrs.secure)) {
+            /* unimplemented, or NS access: RAZ/WI */
+        } else {
+            attrs.secure = false;
+            gic_complete_irq(s, cpu, value & 0x3ff, attrs);
+        }
+        return MEMTX_OK;
     case 0x1c: /* Aliased Binary Point */
         if (!gic_has_groups(s) || (gic_cpu_ns_access(s, cpu, attrs))) {
             /* unimplemented, or NS access: RAZ/WI */