private uint irqMask2; // copy of interrupt mask internal Pic(PnpConfig config) { PicResources pr = new PicResources(config); IoMemoryRange range = pr.registers; IoMemory regs = range.MemoryAtOffset(0, PicRegisterSize, Access.ReadWrite); intcps_revision = regs.MappedPortAtOffset(INTCPS_REVISION, 4, Access.Read); intcps_sysconfig = regs.MappedPortAtOffset(INTCPS_SYSCONFIG, 4, Access.ReadWrite); intcps_sysstatus = regs.MappedPortAtOffset(INTCPS_SYSSTATUS, 4, Access.Read); intcps_sir_irq = regs.MappedPortAtOffset(INTCPS_SIR_IRQ, 4, Access.Read); intcps_sir_fiq = regs.MappedPortAtOffset(INTCPS_SIR_FIQ, 4, Access.Read); intcps_control = regs.MappedPortAtOffset(INTCPS_CONTROL, 4, Access.ReadWrite); intcps_protection = regs.MappedPortAtOffset(INTCPS_PROTECTION, 4, Access.ReadWrite); intcps_idle = regs.MappedPortAtOffset(INTCPS_IDLE, 4, Access.ReadWrite); intcps_irq_priority = regs.MappedPortAtOffset(INTCPS_IRQ_PRIORITY, 4, Access.ReadWrite); intcps_fiq_priority = regs.MappedPortAtOffset(INTCPS_FIQ_PRIORITY, 4, Access.ReadWrite); intcps_threshhold = regs.MappedPortAtOffset(INTCPS_THRESHHOLD, 4, Access.ReadWrite); intcps_itr = CreatePortVector(regs, INTCPS_ITR, Access.Read); intcps_mir = CreatePortVector(regs, INTCPS_MIR, Access.ReadWrite); intcps_mir_clear = CreatePortVector(regs, INTCPS_MIR_CLEAR, Access.Write); intcps_mir_set = CreatePortVector(regs, INTCPS_MIR_SET, Access.Write); intcps_isr_set = CreatePortVector(regs, INTCPS_ISR_SET, Access.ReadWrite); intcps_isr_clear = CreatePortVector(regs, INTCPS_ISR_CLEAR, Access.Write); intcps_pending_irq = CreatePortVector(regs, INTCPS_PENDING_IRQ, Access.Read); intcps_pending_fiq = CreatePortVector(regs, INTCPS_PENDING_FIQ, Access.Read); intcps_ilr = regs.MappedPortAtOffset( INTCPS_ILR_Base, INTCPS_ILR_Offset * INTCPS_Vectors, Access.ReadWrite ); }
internal uint Read(IoMappedPort register) { uint outValue; IoResult result = register.Read32NoThrow(0, out outValue); DebugStub.Assert(IoResult.Success == result); return(outValue); }
// Constructor internal TimerOmap3430(PnpConfig config, Pic pic) { #if VERBOSE DebugStub.WriteLine("TimerOmap3430: create"); #endif TimerResources tr = new TimerResources(config); this.config = config; this.pic = pic; this.irq = tr.irq.Irq; IoMemory timerRegisters = tr.registers .MemoryAtOffset(0, Omap3430_TIMER1_RegisterSize, Access.ReadWrite); tisr = timerRegisters.MappedPortAtOffset(Omap3430_TISR, 4, Access.ReadWrite); tier = timerRegisters.MappedPortAtOffset(Omap3430_TIER, 4, Access.ReadWrite); tclr = timerRegisters.MappedPortAtOffset(Omap3430_TCLR, 4, Access.ReadWrite); tcrr = timerRegisters.MappedPortAtOffset(Omap3430_TCRR, 4, Access.ReadWrite); tldr = timerRegisters.MappedPortAtOffset(Omap3430_TLDR, 4, Access.ReadWrite); // _ARM_ERRATA problem with how functional clock is unstuck tcrr.Write32(0, 0); }
internal void Write(IoMappedPort register, uint value) { IoResult result = register.Write32NoThrow(0, value); DebugStub.Assert(IoResult.Success == result); }