![](http://datasheet.mmic.net.cn/260000/PPSMMANUAL_datasheet_15946768/PPSMMANUAL_179.png)
35-8
Trap UTrap Usage in PPSM
Programmer’s Manual
Personal Portable System Manager
Programmer’s Manual
35-5
Chapter 35 Trap Usage in PPSM
PPSM tools access the PPSM system kernel internally via the TRAP instruction.
When an application makes a PPSM toolset call, a pre-defined TRAP instruction
is called with the correct arguments assigned to the various registers instead of
calling the actual function.
On the 68K, there are 16 TRAPs that can be used.
instruction mapping for the PPSM tools.
shows the TRAP
35.1
PPSM Tools Calling Structure
For the protection of the PPSM object code and security, two levels of indirection
is introduced in the PPSM when an application makes a system call.
The first level is a stub library call. A PPSM tools stub interface is supplied to the
application developers. This is a complete library of the PPSM tools but the
function body consists of parameter passing and TRAP instruction call only.
The second level is the TRAP system call, which takes in the parameters passed
in by the stub library and makes an actual system call to the PPSM function.
With this implementation, application developed code can reside in RAM, while
PPSM system code can be in ROM. Hence, ensuring object code protection and
portability of the PPSM system code.
35.2
TRAP Implementation
Figure 34-1 shows a block diagram of the event that takes place when an
application makes a system call. The stub library and the TRAP instruction jump
sections are implemented in low level assembler language to minimize the
Table 34-2 Trap Instructions Mapping
TRAP Number
TRAP Vector
TRAP Address
PPSM Tools
1
0x21
0x84
PPSM Basic Tools
2
0x22
0x88
PPSM Extended tools
3
0x23
0x8C
Touch Panel tools
4
0x24
0x90
LCD Display tools
5
0x25
0x94
Timer tools
6
0x26
0x98
PCMCIA IC Card
7
0x27
0x9C
Communication tools
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.