int AwaitEvent( int evtType )
EVENT_BLOCKEDREADY when the evemt
occursmain( ) {
Tid server;
int evtType, data;
Receive( &server, &evtType, ... );
// Other initialization
Reply( server, ... );
FOREVER {
data = AwaitEvent( evtType );
Send( server, &data, ... );
}
}
main( ) {
notifier = Create( HIGHEST, ... );
// other initialization
Send( notifier, &evtType, ... );
FOREVER {
Receive( &requester, &request, ... );
switch ( request.type ) {
case NOTIFIER:
data = request.data;
Reply( notifier );
break;
case CLIENT:
...
}
}
}
Related to three free choices above.
Strategy 1: Kernel does it all
movs)Return value contains the volatile data
Strategy 2: Notifier does most of it
The second disbling of interrupts seems unnecessary. Why do we do it?
What do you do when there are no tasks to run?
HALT
All input signals are
Base addresses
0x800B00000x800C0000VIC powers up with
Initialization
On an interrupt
For debugging
| Register Name | Offset | R/W | Description |
| VICxIRQStatus | 0x00 | RO | One bit for each interrupt source
1 if interrupt is asserted and not masked |
| VICxFIQStatus | 0x04 | RO | As above for FIQ |
| VICxRawIntr | 0x08 | RO | As above but not masked |
| VICxIntSelect | 0x0c | R/W | 0: IRQ, 1: FIQ |
| VICxIntEnable | 0x10 | R/W | 0: Masked, 1: Enabled |
| VICxIntEnClear | 0x14 | WO | Clears bits in VICxIntEnable |
| VICxSoftInt | 0x18 | R/W | Asserts interrupt from software |
| VICxSoftIntClear | 0x1c | WO | Clears interrupt from software |
| VICxProtection | 0x20 | R/W | Bit 0 enables protection from user mode access |
| VICxVectAddr | 0x30 | R/W | Enables priority hardware
See documentation. |
Initialization
When an interrupt occurs
| Register Name | Offset | R/W | Description |
| VICxVectAddr | 0x030 | R/W | Read: address of vector for highest priority interrupt
Write: service complete, enable priority hardware |
| VICxDefVectAddr | 0x034 | R/W | Default vector address |
| VICxVectAddry | 0x100+4y | R/W | Vector address for interrupt y |
| VICxVectCntly | 0x200+4y | R/W | Control register for interrupt y
Bit[0-4]: interrupt source for interrupt y Bit[5]: enable vectored interrupt y |
Return to: