Arm的GIC库
该库提供了Arm的GIC的API。
初始化
安全世界的主CPU
use gic :: v2 :: GICv2;
let gicv2 = GICv2 :: new (GICD_BASE, GICC_BASE);
let props = [];
// Primary CPU initialization
// Enable the secure GIC distributor interface
// Enable SPIs, PPIs & SGIs
gicv2. distif_init ( & props);
// Per CPU initialization
// Enable the Group 0 SGIs and PPIs
gicv2. pcpu_distif_init ( & props);
// Enable secure interrupts and use