Looking at my previous Aarch64 projects, I see that the Fire3 and the Allwinner h5 both use the GIC400. I never did get interrupts working for the h5, but I had good luck with the Fire3, so I may be able to use Fire3 code for the RK3399.
The RK3399 manual has no specific details on the GIC-500. The ARM documents provide the details, as they have in the past.
The GIC-500 implements GIC v3, whereas the GIC-400 implmented GIC v2.
The two are quite different. You may see mention of backwards compatibility with GIC v2, but I never see details or explanation. That road does not seem like one to pursue.
The manual for GIC v3 (including GIC v4) is 930 pages! A lot to digest, so here we go.
The RK3399 TRM does list the numeric assignment of interrupt numbers to devices in section 1.3 of the manual. For example UART2 (our console) is 132. Timer 0 is 113. This table is all important.
Tom's electronics pages / tom@mmto.org