Index

A: drive 396, 574 active objects 2–3, 120–6, audio 40 A class 193 231, 273, 430, 490–4, system alarms 204–5, 745 ABI see Application Binary 502–48, 568–74, 763–4, alerts, audio 40 Interface 787–8 algorithms ABLD tool 175 see also asynchronous allocation strategies 306, 829, AbortNow 472 operations; event-driven 848–9 aborts programs defragmentation 736 see also exceptions TRequestStatus 231, 273, lock-free algorithms 836–9, concepts 208–9, 210–19, 430, 493–4, 502–48, 847 236–49, 262 570–4, 763–4, 787–8 moving memory model 283–7 AbsoluteTimerExpired 671, Add 246, 341, 674 multiple memory model 294–5 AddEvent 683–5 493–4, 671, performance issues 826–50 abstract allocator class, concepts 756–62 scheduling 767–823 AddFileSystem 302–4 341 selection issues 839 AddHalEntry 496–8 Abstract Control Model (ACM) workload analysis 729–30 address spaces 604–12 alignment issues, efficient code homonyms 275–8, 288–91 accelerators, multimedia 19–20, 832–3 moving memory model 42 AllFiles 328–30 275–87, 421–2, 651 accepted message-state Alloc 302–5 multiple memory model Allocate client-server ITC 141–3 287–96, 426, 650–1 270–3 AllocateSupervisorStack kernel-side messages 149–50 processes 93, 102–15, ‘accepting’ messages, client-server 252–62, 275–91 272–3 ITC 132–43 synonyms 276–8, 288–91 AllocateUserStack 272–3 access counts, kernel objects virtual/physical addresses allocation strategies 163–73 254–62, 275–91, 297–8, see also free-store allocators access issues 740–2 algorithms 306, 829, 848–9 data-caging concepts 327–30, Adjust 270–1 chunks 14–15, 95–7, 160, 345–6 AdjustDoubleEnded 270–1 166, 173–7, 184–7, 192, files 128–9, 327–30, 336–86, Again 198–201 264–73, 278–87, 292–4, 409–10 AGCH, GSM protocol 789–807 298–309, 562–74, 638–9 ACM see Abstract Control Model agents, debuggers 616–37, comparisons’ tables 309–10 Activate 450–6 640–3 efficient code 829, 848–9 active mode 662, 676, 716 alarms failures 311–14 868 INDEX allocation strategies (continued) Application-specific Integrated 275–87, 300–4, 421–2, 426, free-store allocators 251–2, Circuits (ASICs) 8, 10, 620–3, 634–7, 642, 652–3, 299–306, 309–10, 742–5, 11–13, 19–29, 194–5, 738–9, 775–9, 797–807, 848–9 483–4, 488 826–50 heaps 298, 299–306, 848–9 see also System-on-Chip debuggers 620–3, 634–7, 642, memory 293–4, 298–309, concepts 19–29, 620–3 652–3 559–62, 638–9, 829, Application-specific exceptions 210–15, 220–36, 848–9 Semi-conductor Parts (ASSPs) 237–49 performance issues 829, 848–9 see also System-on-Chip memory model 255–62, allocator APIs, concepts 251–2, concepts 20–9 274–87, 300–4, 421–2, 300–1 Application-Specific Standard 426 AllocLen 302–5 Product (ASSP), concepts 4, MMU features 255–62, AllocShadowPage 640 9–10, 12–13, 14, 187–95, 274–87 AllocSize 302–5 220–36, 246–9, 479–87, performance issues 826–50 ALWAYS BUILD AS ARM 24–5 552–62, 577–9, 596–601 RealView compiler 387, 621–3 ANI files 442–3 applications registers 212–15, 220–36, Animate 444–56 see also executables; 237–49, 256–62, 775–9 animation DLLs processes; software ARM CPU software layer, concepts client communications 448–50 basic concepts 3–4, 210, 318, 12, 15–16, 19–29, 31–3, client-side code 453–6 476–7, 825–50 41–2, 47–9, 66–71, 100–12, concepts 429–36, 442–56 domain manager 751, 756–62 161, 173, 179–80, 187–95, creation 442–3 LRTA 808–23, 835–50 210–15, 220–38, 252–3 handwriting example 442–56 multi-tasking aspects 3–4, ARM Ltd 20, 23–5 pointer events 450–2 13–15 ARM v3 274 sending events 452–6 platform security 318 ARM v5 sprite anims 443–56 priorities 4–7, 13–15, 210, see also caches types 443–4 810–23, 825–6, 834–50 concepts 24, 27–8, 274–8, anonymous chunks shutdown 431–74, 535–43, 287, 294, 642, 826, see also chunks 737, 750–62 829–31, 833–4, 836–9 concepts 308–9 windows 457–62 ARM v5TE 24, 27, 826 AP see application processor architectures ARM v6 APIs see Application Programming see also ARM...; EKA2...; see also caches Interfaces X86... concepts 28, 271, 274, 287, AppendHandler 673–4 F32 system architecture 333, 288–95, 319–20, 829–31, appendices 851–66 335–86, 424, 579, 656–8 836–9 Application Binary Interface (ABI) kernel architecture 4, 6–13, never-execute bit 319–20 413–27 23, 187–95, 251–3, 783–8 ARM v7 426 application processor (AP) shutdown options 751–62 ARM VFP (vector floating point) see also System-on-Chip software layering 11–13, 43, 241, 246–9 concepts 17–43, 826–31 47–9, 187–95, 252–314 ArmMmu 193–4 Application Programming OS kernel architecture ArmVectorSwi 176 Interfaces (APIs) 1–2, 4, 6–13, 187–95, 251–3, arrays 11, 30, 95–7, 154, 118–44, 150–60, 188–9, 262–73, 783–8 168–73, 816–21 231–6, 243–6, 262–73, ARM9 826–7 classes 11 298–310, 320–6, 335–46, ARM11 827–8 object indexes 168–73 365–7, 614–59, 669–76, ARM926 831–3 ASCII code 166, 389–90, 684, 732–3, 758–62 Arm 192–3, 654–6 398–400, 579, 826 Application Space Identifiers ARM architecture 20–8, 210–15, Asic 194–5, 483–4, 488, 496, (ASIDs) 28, 288–9, 292–5 220–49, 255–62, 271, 654–6, 682, 689, 743–5 INDEX 869

see also variant extensions backups, shutdown 751 Board Support Package (BSP), AsicInitialise 483–4 backwards compatibility, concepts 43, 740–2, 826, see ASICs Application-specific client-server ITC 139 845 Integrated Circuits Bad Block Manager (BBM) boolean flags 148, 198–201, 352 ASIDs see Application Space 379–85 boot processes Identifiers base area, client windows 465–6 Assabet platform 10, 787–8 base classes 12–13, 124–6, see also EFILE...; assembler code 12–13, 192–3, 161–2, 442–3 EKERN...; ESTART... 219–24, 826–7, 849 see also TDes... alternative startup scenarios assp.h 194–5 Base Port Kit (BPK) 43, 483 383–5, 747–50 ASSP see Application-Specific base porters 689, 704 concepts 10–13, 22–6, 30–2, Standard Product base support package, concepts 41–3, 71, 90–2, 237–49, ASSPs see Application-specific 11–13, 43 310, 335–9, 376, 383–4, Semi-conductor Parts baseband processor (BP) AsyncClose 166 see also telephony stack 429–30, 476–80, 578–9, asynchronous message queues audio 19, 39–40 737–64 see also inter-thread concepts 9, 17–20, 39–40, core loader 30, 383–5, communications 795–7 737–42, 747–50 concepts 145–60, 531–43 function 795–6 CPU 738–42 sending methods 137–50 baseline instruction set, ARM v5TE emulator 97, 749–50 visibility issues 146 24 exceptions 740–5 asynchronous operations batteries 17–18, 30, 40, 41–2, 145–60, 344, 350–8, 362–4, 334–5, 376, 586–7, extensions 10, 479–80, 490–4, 501–2, 527–43, 659–736, 795–7, 828 738–64, 810 544–8, 568–74, 787–8 see also power... file server 338–9, 383–5, 579, see also active objects chargers 795–7 737–64 AsyncNotifyChanges 91 BBM see Bad Block Manager GUI 738–42, 747–50 atomic instructions, concepts BCCH, GSM protocol 789–807 high-level processes 739–42 776–9, 836–9 BeginRedraw 469 initialization 739–65 attached state, state machine bibliography 865–6 134–9 binary searches, efficiency benefits kernel 13–15, 90–2, 338–9, attributes, processes 96 826 476–80, 579, 737–64 audio 17–21, 39–40, 92, 307 Bind 232–6, 814–21 miniboot program 383–5, see also multimedia bit fields, handles 167–8 747–50 AP 19–21 BitBlt 455–6 MMU 738–42 BP 19, 39–40 BitBltMasked 455–6 NAND flash memory 30, 32, data types 39–40 bitmaps 432, 444–56, 464–71 383–5, 737–64 latency 39–40 blank windows, drawing 467 multimedia 39–40 blocks null thread 13–15, 90–1, voice calls 19, 39–40 BBM 379–85 744–5, 835–50 Available 302–5 FDBs 369–75, 829 737–47 awaiting-message state, state memory 262–73, 298–310, stages overview 737–45, machine 130–43 368–75, 379–85, 747–50, 747–50 779, 822–3, 829 supervisory thread 10, 91–3, threads 49–62, 70, 76, 80, 479–80, 737–64 Babbage, Charles 161 98–112, 351–8, 544, backup behind, drawing 469–70 780–8, 822–3 Symbian OS 737–47 backup content windows, drawing Bluetooth connectivity (BT) 9, timeline overview 740–5 467–8 39–40, 42, 616, 807–8 window server 429–30, 746–7 870 INDEX

BootEpoc 97, 749–50 masters 20–43 CalcDefaultThreadPriority bootrom.bin 742 slaves 21–9 108–9 bootstrapping byte array, properties entity 154 call control stack 18–20, 807 concepts 737–42, 747–50 callbacks 590–4, 634–8, 704–5, definition 737 709–10, 714, 717, 816–21 superpage 742 C++ 221, 223, 240, 298–310, calling threads, device drivers bounding rectangles, concepts 411–13, 427, 482–4, 623, 484–7 468–9 652–3, 739–40, 743, 849 camera images, RAM requirements see BP baseband processor C32 comms server 118, 606–12 29–30 see BPK Base Port Kit C 1, 298–310, 339–40 Campbell, Joseph 315 Cancel breakpoints, debuggers 243, 615, C: drive (NAND flash memory) 122–6, 197–201, 620, 641–52 31, 338, 385, 392, 574–89, 554–62 Broadcast CancelSessionOp 86–8 611 353–4, Brutus 10 Cache 561–2, 642 357–8 BSP see Board Support Package caches CancelTransition 761–2 .bss sections, DLLs 113, 421–3, see also buffers; physical CancelWakeupEventNotifi- 639, 810 memory cation 670, 672–3, 761–2 BT see Bluetooth concepts 25–9, 251–3, 262, CAnim 443–56 buffers 25–6, 30–2, 38, 105–12, 275–87, 288–91, 374–5, CAnimDll 443–56 160, 225–31, 257–62, 377–81, 396, 560, 642, CAnimGc 444–56 275–87, 320, 340, 344–5, 830–4 capability-model concepts 409, 478–9, 552–74, CPU 27–8, 262, 275–8 DLLs 321–4, 487 610–12, 797–807, 823, definition 830–1 platform security 317, 320–6, 833–4, 839–40 efficiency issues 26–8, 253, 473–4, 487, 492, 498, see also caches 262, 830–4 515–17, 522–4, 580–1 file server 340 expense 831 rules 320–4 flash components 32 FAT file system 377–81 Caps 580–1 inter-thread communications flush requirements 27–9, 41, capture, events 185, 245–6, 160, 298, 307–10, 562–74, 278–87, 290, 377–81, 429–30, 493–4, 632–7 823 782–3 CaptureEventHook 185, LCDs 38, 550–62 Harvard cache 277–8, 426, 429–30, 493–4 memory 257–62, 275–87, 830–1 CAR 248–9 553–74, 797–807, 833–4, hit ratio 26–7 CAsyncNotifier 380–1 839–40 influences 831–2 categorization decisions, executive MMU 257–62, 275–87, kernel 28, 251–2 () calls 183–7 565–6 LFFS 374–5 CBase 163, 444–56 shared I/O buffers 160, 298, loader 396, 398–400 CBCH, GSM protocol 789–807 307–10, 562–74 LRU scheme 377–81 CBitmapContext 444–56 TLBs 25–6, 257–62, metadata 377–81 CC, GSM layer 807 275–94 NAND flash memory 377–81 CCacheNotifyDirChange types 833–4 removable media 377–81 399–400 bugs 1–2, 5–6 types 27–9, 277–8 CCoeControl 468 see also debuggers virtual indexes/tags 275–8 CDC see Communications Device burst types, GSM protocol ‘write-back with dirty bit’ type Class 790–807 377 CDirCB 347–64, 366–7, 404–6 bus 20–43, 336–9, 380, 477–9, Cache::SyncMemory... CDirCB::ReadL 404–6 500–48, 574–612, 618, 561–2 CDirectScreenAccess 471–2 674–5, 703–4, 777–9 CActive 121–6, 536–43 CDirScan 344 see also USB CActive::RunError 536–43 CDisconnectThread 352–8 INDEX 871

CDiskSpaceInfo 363–4 change notification global/local contrasts 264–5, CDMA protocol 9 see also notification schemes 282–7, 292–4, 307, 308–9, CDriveThread 352–8 file server 341, 362–4, 320, 401, 562 CEikAppUI::HandleCommandL 379–80, 581, 587 inter-thread communications 756 shutdown 754–62 160, 173–7, 184–7, central repository, shared files supervisory thread 91–2, 264–73, 292–4, 298–310, 330, 345–6 634–7 cexec.cia 176–7 ChangeWaitingThread- 562–74, 744–5, 822–3 CExtChangeInfo 363–4 Priority 820–1 memory 14–15, 95–7, 160, CF see Compact Flash Channel 542–3 166, 173–7, 184–7, 192, CFatDirCB 359–62 ChannelCreate 510–17 264–73, 278–87, 292–4, CFatFileCB 359–62, 366–7 ChannelRequest 525–6 298–310, 320, 401, CFatFileSystem 359–62 channels 675, 709, 713–15, 562–74, 610–12, 626–37, CFatMountCB 359–62, 366–7, 721–2 740–5, 782–3 379–80 see also logical device drivers MMU 264–70, 278–9, 565–6 CFatMountCB::DeleteL definition 478 peripherals 562–74 379–80 character events, key events types 264–70, 282–3, 301, CFbsBitGc 455–6, 471–2 438–40 307–9, 562–74 CFbsScreenDevice 432, CharacterFinished 452–6 CISC-based CPUs 215–19 471–2 charge levels 697–8, 725 CKeyTranslator CFileCB 347–64, 366–7 CheckDisk 341 436–40 CFileMan 343–4 CheckSuperPageSignature CLafShutdownManagerBase CFileManObserver 344 190, 263–73 753–62 CFileShare 347–64, 366–7 CheckSuspendThenReady clam-shell devices 431–74, CFileSystem 359–62, 365–7 813–21 762–3 CFormatCB 347–64, 366–7 children, windows tree 458–66 classes CFsBitGc 445–56 ChunkAddress 568–74 see also C...; M...; R...; CFsBitMapDevice 445–56 ChunkBase 175–7 T... CFsDispatchObject ChunkClose 347–64 564–74 base classes 12–13 CFsInternalRequest 352–8 ChunkCommitContiguous device drivers 499–502, CFsMessageRequest 352–62 565–6 582–9 CFsObjectIx 347–64 ChunkCommitPhysical 565–6 CFsRequest 352–8, 361–2 ChunkCreate 563–74 DMA 553–62 CGraphicsContext 444–56 chunks EUSER library 4–6, 11 CHandwriting 453–6 see also DChunk; RChunk iterator classes 506–8 CHandwritingAnim 444–56 adjust functions 270–1, 626–7 local media LDD 582–7 CHandwritingAnimDll anonymous chunks 308–9 local media sub-systems 443–56 concepts 14–15, 95–7, 160, 574–89 CHandwritingAnimDll 166, 173–7, 184–7, 192, media drivers 574–89 ::CreateInstanceL 264–73, 278–87, 292–4, MMC 594–600 443–56 298–310, 320, 401, power management 665–736 CHandwritingAnim 562–74, 610–12, 626–37, USB 603–12 ::HandlePointerMove 740–5, 782–3 windows 456–62 450–6 critique 293–4, 307–9, CHandwriting 562–74 cleanup 70, 75–7, 82–93, 109, ::CreateSpriteL 454–6 device drivers 308–9, 562–74 311–13, 835–50 CHandwriting disconnected chunks 264–70, Clear 233–6 ::FillInSpriteMember 272–3, 293–4, 307–10 ClearPoints 453–6 454–6 DMA 307, 562, 568–74 ClearSprite 453–6 872 INDEX client API closing state, state machine attributes 413–27 domain manager 756–62 134–9 DLLs 114–15, 271, 400–10, file server 339–64 clusters 412–17, 423–7, 626–7 window server 429–74 FAT file system 375–81 flags 414–16 client controller, USB 607–12 lost clusters 376–81 lists 413–27 client requests 402–27, 430–74, CMD signal 595–6 restrictions 416–17 715–16 CMountCB 359–62, 365–7 code-relocation section, E32 image client windows CNotifyInfo 363–4 file format 390–3, 400–1, concepts 457–61, 464–6 CNotifyMediaChange 380–1, 407–10 screen modes 464–5 581 CodeSegLock 113–15, 413, client-handle property, windows CObject 164–5, 178 416, 418–19, 630 462–6 CObjectIx 165 Command 444–56 client-registered events, window code 1, 5–6, 12–13, 24, 114–15, command buffer, window server server 434–5, 752–62 252–3, 257–62, 626–7, 473–4 client-server, platform security 638–9, 643–52, 825–50 command storing, redrawing see also 324–6, 473–4 compiled...; software; 470–1 CommandBufL client-server ITC source... 473–4 CommandL see also inter-thread alignment issues 832–3 473–4 CommandReplyL communications C++ 221, 223, 240, 298–310, 444–56 backwards compatibility 139 411–13, 427, 482–4, 623, CommDD 326 652–3, 739–40, 743, 849 Commit 270–1 concepts 117–44, 177, caches 26–8, 253, 262, 830–2 committing, physical addresses 319–26, 335–46, 387, compressed code 24–5, 28, 254–65, 307–8 430–5 31, 382, 387–93, 409, comms 5–6, 13–15, 92, 118, cookies 122–9 638–9 779–88, 797–807 design issues 119–20, 139–43 efficiency issues 5, 826–50 comms server 118 historical background 117–19 format 257–62, 387–93, Communications Device Class IPCv2 118, 124, 128–9, 638–9 (CDC) 604–12 143–4, 319–20 general/special cases 828 Compact Flash (CF) 334 kernel-side architecture performance issues 5, 825–50 compiled code 24, 31, 387–427, 119–20, 124–6, 128–43, processes 94–7, 114–15, 830, 849 324–6, 473–4 252–3, 257–62, 626–7, see also code; executables message pools 134–46 638–9, 643–52 THUMB 24, 31, 650, 826, 830 ‘message-centric’ architecture real-time performance 834–50 Complete 532–43, 716–17 118–44 relocated/relocatable code completed queue, nanokernel minimal states 139–43 257–62, 270–1, 390–3, timers 195–201, 780–8 user-side architecture 118–29, 400–1, 407–10, 626–7 components 4, 9–10, 12–13, 476–548 small-request penalties 828–9 17–18, 20–2, 30–3, 40, CLK signal 595–6 testing 826–50 41–2, 187–95, 334–5, 376, clock 35–6, 190, 442, 707, tight loops 826–8 586–7, 659–736, 795–7, 828 728–31, 787–8, 829–32 ‘unrolling the loop’ techniques see also hardware; mobile see also timers 827–8 phones frequencies 728–31 code section, E32 image file format composite devices, USB 602–12 inputs 707 388–93, 398–410, 638–9 composite file system, concepts Close 76, 122–6, 131–43, ‘code segment handle’ 419–20 384–5 156–7, 165–73, 342–3, 487, code segments (CS) 215–19, Compress 302–5 503–8, 517, 528–9, 534–5, 270–1, 282–7, 400–10, compressed files 24–5, 28, 31, 554–62, 588–9, 630 412–27, 626–7 337–9, 382, 387–93, 409, CloseChunk 570–4 see also DCodeSeg 638–9 INDEX 873 concrete classes 6, 81, 104–12, CopyInterSeg 179 Symbian OS kernel 12–13, 149–50, 189–90, 192, 194, core loader, boot processes 30, 192–5 303 383–5, 737–42, 747–50 CPU-specific registers, scheduling see also NFast...; TDfc corrupt disks 334, 380–1 100–12 conditional variables, threads counts 5–7, 49, 54, 72–5, CpuIdle 671, 681–2, 689, 85–8 78–88, 164–73, 184–7, 695–6, 704–5, 709–10, Cone 468–71 196–201, 208, 557–62 718–19 Config 503–8, 519–48 see also semaphores crashes 2, 10, 100–12, 179, 307, Configure 539–43 CPL see current privilege level 311–14, 493–4, 623–4 Connect 342–3, 403–6, 580–9 CPolicyServer 125–6, see also debuggers connectivity features 9, 39–40, 325–6, 429–74 post-mortem analysis tools 42, 615–59, 807–9 cpp files 153, 174, 492–4, 623–5 see also Bluetooth...; 637–40, 654–6 CRawDiskCB 347–64 Ethernet...; infrared...; CProxyDrive::DeleteNotify CRawEventReceiver 430 serial...; USB... 379–80 Create... 190, 263–73, 299, debuggers 615–59 CPSR, exceptions 211–15, 443–56, 498–548, 626–9 constant-data section, E32 image 221–4 CreateAll 815–21 CreateCAnimDllL file format 388–93, 400–1, CPU 3–9, 12–36, 41–2, 66–71, 443–56 CreateChunk 638–9 161, 173–215, 251–62, 296, 570–4 Construct CreateInstanceL 454–6 488, 619–23, 663–5, 668, 443–56 ConstructL CreateLogicalDevice 445–56 678, 680–2, 694–6, 704–36, constructors, DLLs 113, 411–12, 498–548 738–42, 771–3, 826–31, 427, 445–56 CreatePhysicalDevice 839–40, 844–50 container classes 162, 164–73 499–548 boot processes 738–42 Context 627, 637–8 CreateSpriteL 454–6 caches 27–8, 262 context, executive (exec) calls CreateVariant 190, 263–73, CISC-based CPUs 215–19 177–8, 787–8 743–5, 750 emulator performance 849–50 context switch times, concepts CRequestThread 352–8 LRTA 808–23 7–8, 14–15, 57–8, 102–12, CRequestThread::Receive MMU 254–62, 296, 740–2 274–9, 283–6, 293–6, 312, 355–8 new CPU family 296 340–6, 634–8, 774–5, critical processes/threads 55–8, 782–8 requirements 23, 826–31 78, 89–90, 102–12, 160, 312, CONTEXTID 295–6 RISC-based CPUs 23–4, 215 631–7 contiguous RAM 298–310, 553, static priority-based scheduling critical sections, threads 55–8, 560–2, 565–6, 569–74, 771–4 78, 102–12, 160, 312, 631–7 610–12 SVR mode 742 critical state, nanokernel timers control blocks 98–112, CPU software layers 12–29, 197–201, 780–8 198–201, 780–8, 800–7 31–3, 41–2, 47–9, 66–71, crt0.obj 65 nanokernel timers 198–201, 161, 173, 179–80, 187, CS see code segments 780–8, 800–7 192–5, 210–15, 251, 252–3, CS values 218–19 scheduling 98–112, 780–8, 488, 826–31 CSaveNotifier 754–62 800–7 see also ARM...; Win32...; CServer2 120–9, 131–43, cookies, client-server ITC 122–9 X86... 347–64, 429–74 Coppeard, Jon 737–64 concepts 12–13, 192–5, CServer2::Start 131–43 coprocessor fault handler 240–1, 210–15, 251 CServer 144 246–9 exceptions 210–15 CServerFs 347–64 coprocessor instructions 24, memory model 12–13, 193–4, CServerLoader 240–9, 741, 743–5 252–3 ::NewSessionL 403–6 Copy 509–17, 828, 832–3 nanokernel 12–13, 192–5 CSession2 120–9, 319–20 874 INDEX

CSession 144, 319–20, DArmPlatChunk 194 DDriver1Device 500–48 347–64 DArmPlatProcess 194 DDriver1Factory 500–48 CSessionFs 347–64 DArmPlatThread 66–71, 194 de Bono, Edward 251 CSessionFs::CreateL DAT signal 595–6 deadline monotonic scheduling, 347–64 data cache (DCache), concepts concepts 771–2 CSessionFs::Disconnect 26–9 deadline-driven scheduling, 348–64 .data section 389–93, 400–1, concepts 772–4 CSessionFs::ServiceL 421–3 deadlines, real-time issues 347–64, 404–6 data structures, kernel 45, 55–6 765–823, 834–50 CSessionLoader::ServiceL data-caging concepts, platform deadlocks, mutexes 80–1 403–6 security 317, 327–30, death, permanent processes/threads CShareableSession 144 345–6 55, 56, 59, 74, 88–90, 623–5 CSpriteAnim 444–56 data-relocation section, E32 image debug.h 645 CStdChangeInfo 363–4 file format 391–3, 400–1, DebugFunction 302–5 CSY 606–12 407–10 debuggers CTimer 442, 448–56 see also DBase 163–4, 425–6, 500–48, emulator CTimer::Lock 448–56 570–4, 588–9, 599–600 agents 616–37, 640–3 Ctrl+Esc keys 440 DBatteryMonitor 697–8 APIs 614–59 current privilege level (CPL) DBMS 330 architecture 613–25 216–19 ARM architecture 620–3, DCache see data cache CurrentContext 814–21 DChannelSerialDriver... 634–7, 642, 652–3 CurrentThreadHasCap- blind spots 656 711–18, 720–1 ability 487, 498, 522–48 breakpoints 243, 615, 620, DChunk 177, 190, 192, 264–73, customization 678–88 641–52 562–74 cutils.cpp 654–6 code and data section 638–9 see also shared chunks CWindowAnim 443–56 concepts 5–6, 10, 15–16, 69, concepts 264–70, 562–74 CWindowBase 460–2 96, 100–12, 184–7, 243, key members 268–70 CWindowServer 429–74 303–5, 338, 493–4, DCodeSeg 95–7, 114–15, 192, CWsClient 473–4 613–58, 744–5 CWsClientWindow 458–62 263–73, 400–17, 419–27 connectivity features 615–59 see also CWsGroupWindow 458–62 code segments context switch events 634–7 CWsRootWindow 458–62 concepts 270–1, 400–17, design goals 5–6, 15–16, CWsScreenDevice 464–6 419–20 613–14 DCodeSeg::CodeSegLock CWsTopClientWindow 458–62 EKA1/EKA2 contrasts 614–15, CWsWindow 461–2 113–15, 413, 416, 630 641, 643–4 CWsWindowBase 461–2 DCodeSeg::GlobalList emulator debuggers 615 CWsWindowGroup 461–2 413–27 exceptions 243, 619–20, CWsWindowRedraw 461–2 DCodeSeg::Loaded 422 623–5, 626–37 cyclic scheduling DComm16550 539–43 extensions 10, 493–4, 644–56 concepts 767–74, 779–80 DCondVar 85–8 hardware-assisted debuggers disadvantages 769–70, DCondVar::Wait 87–8 620–3 779–80 DDebuggerInfo 644–52 host PC 616–25, 640–52 DDevice1PddFactory 500–48 JIT triggers 619–20, 641–3 DDK see Device Driver Kit JTAG debuggers 36, 620–3, D: drive (MMC) 338, 392, DDmaChannel 559–62 643–58 574–89 DDmaRequest 553–62 kernel debug interface 625–40, DAC 320, 796–7 DDR RAM 834 651–2 DACR see domain access control DDriver1 500–48 kernel event notification register DDriver1Channel 500–48 625–37 INDEX 875

kernel state 651–2 DECLARE STANDARD ASSP delivered message-state LLDs 630–1, 641–3 489–90 client-server ITC 141–3 logger utilities 623–4, 643–52 DECLARE STANDARD EXTEN- kernel-side messages 149–50 multi-threaded software 15 SION 489–90, 491–4, delivery and message pool non-current thread memory 497–500, 505–8 management, sessions DECLARE STANDARD LDD 650–1 134–46 OS awareness 615–25, 498–9, 505–8 DeltaCurrentConsumption DECLARE STANDARD PDD 643–52 674 498–9, 505–8 output 184, 623–5, 652–6 decoding, GSM protocol demand paging 262, 311 panics 619–20, 626–37 791–807 DEpocProcess 190, 192 PDDs 631, 641–3 Decommit 270–1 descriptor classes 11, 456 platform security 618–20 Deep Sleep power mode 41, design issues post-mortem analysis tools 762–4 client-server ITC 119–20, 623–5 deferred function calls (DFCs) 6, 139–43 prints 184, 623–5, 652–6 13–15, 54–9, 89–99, goals 4–6, 13–16, 57, 117–20, protocol messages 617–25 147–50, 160, 165–6, 252–3, 271, 280–7, 290–4, redirect user trace 652–8 198–201, 223–36, 269–73, 315–31, 350–8, 613–14, reference documentation 491–4, 522–74, 585–6, 779–807, 850 627–31 610–12, 699–700, 710–20, kernel architecture 4–15, remote debuggers 614–15, 745, 787–8, 806–10, 835–50 252–3, 783–8 617–25 concepts 6, 13–15, 54–9, limitations 14–15, 834–5, responsibilities 619–20, 640–1 89–99, 147–50, 160, 840–2 ROM shadow API 639–42 165–6, 198–201, 223–36, mobile phones 17–43, run-mode debuggers 615–20, 269–73, 491–4, 522–43, 315–31, 833–50 623–4 555–62, 573–4, 585–6, modular designs 3–5, 14 source-level debuggers 15–16, 610–12, 745, 787–8, moving memory model 280–7, 620, 624 806–10, 835–50 294, 309–10 stop-mode debuggers 620–3, device drivers 491–4, 502, multiple memory model 643–52 522–43, 573–4, 585–6 target agents 640–3 interrupts 6, 13–15, 54–5, 59, 291–4, 309–10 target phone 616–25, 640–52 89, 91–2, 223–4, 227–31, performance 833–50 thread context 637–8, 646–52 233–6, 491–4, 502, 522–8, robust designs 2–3, 5–6, timers 36, 655–8 787–8, 806–10, 835–50 117–18, 260–2, 274, latency reductions 843–4 trace channel 652–8 281–3, 319–20 purposes 91–2, 147–50 trace macros 656–8 solutions 13–15, 57, 117–20, queue 92, 529–43, 585–6, types 15, 614–25 252–3, 271, 280–7, 290–4, 745, 787–8, 822–3, DEBUGGER SUPPORT 625, 315–31, 350–8, 613–14, 845–50 779–807, 850 631–4 supervisory thread 91–2, 99, DEBUG HALT Symbian OS 4–16, 57, 36 160 DebugNotifySessions 117–20, 252–3, 271, 367 threads 13–15, 54–5, 59, 89, 280–7, 290–4, 315–31, DebugOutputChar 653, 654–6 91–2, 99, 160, 165–6, DebugSupportEnabled 631–4 227–31, 233–6, 491–4, 350–8, 613–14, 779–807 Dec 165–73 522–8, 529–43, 585–6, destructors 113, 122, 163–73, DECLARE EXTENSION LDD 787–8, 806–10, 835–50 427, 481–4 499, 505–8 define operation, properties client-server ITC 122 DECLARE EXTENSION PDD 155–60 DLLs 113, 427, 481–4 499, 505–8 defragmentation algorithms 736 development tools see tools DECLARE FLAGS FUNC 526 delete 299–306, 535–43 device 481 876 INDEX

Device Driver Kit (DDK) 43, opening 508–48 concepts 795–7 544–8 overview 477–9 functions 796–7 device drivers 3–6, 10–13, 43, peripherals 3, 4, 5–6, 10, 308, digitizer 13, 92, 430–74, 495–8 69–70, 92, 191–2, 220–36, 549–612 Direct Memory Access (DMA) 10, 285–7, 308–9, 320–6, platform security 320–6, 20–9, 32–5, 36–7, 39, 296, 333–86, 475–548, 574–89, 484–7, 515–17, 522–4 298–310, 479–80, 488, 613–58, 675, 698–722, 730, request gateway function 549–62, 568–74, 608, 727, 733, 755–62, 822–6, 835–50 523–6, 542–3 839–40, 844–50 see also EDEV.LIB; roles 476–7 chunks 307, 562, 568–74 extensions; local media shared chunks 308–9, 562–74, classes overview 553–62 sub-systems; logical...; 822–3 concepts 36–7, 39, 307, physical... shutdown 755–62 549–62, 568–74, 727, asynchronous operations static data initialization 480–1, 839–40 490–4, 501–2, 527–43, 490–4, 740 interrupts 36–7, 549–50, 544–8, 568–74 synchronous operations 839–40, 844–50 basic concepts 3–6, 10–13, 501–2, 527–8, 536–43, latency impacts 844–5 43, 69–70, 92, 191–2, 544–8 memory allocations 559–62 308–9, 326, 333–86, threads 13–15, 69–70, 76, 92, performance issues 839–40, 475–548, 825–6 147–50, 285–7, 475–548 844–50 calling threads 484–7 unloading 508 power savings 37, 549–50 classes overview 499–502, user process memory 484–7, scatter-graph DMA engines 37, 582–9 502–8 550–62 concepts 3–6, 10–13, 43, user-side access 484–7, software framework 552–62 69–70, 92, 191–2, 308–9, 502–8, 517–48 direct memory model 326, 333–86, 475–548, verified devices 506–8 concepts 8, 12, 106, 191–2, 574–89, 613–58, 755–62, ‘device not available’ exceptions, 253, 296, 651 822–3, 825–6 X86 architecture 240–3 MMU 296 creation 498–548, 630–1 device platform direct screen access (DSA), window DDK 43, 544–8 see also hardware server 471–2 definition 476–7 concepts 17–43 directories 11, 25–6, 254–62, DFCs 491–4, 502, 522–43, DeviceFree 508 275–87, 288–94, 327–30, 573–4, 585–6 DeviceSize 598–600 339–46, 349–64, 366–7, EKA1/EKA2 contrasts 518–19, D EXC 623–5, 634, 639 369–75, 396–400, 740–2 543–8, 618 DFC threads, concepts 13–15, see also paths emulator 613–58, 849–50 92, 529–43, 845–50 operations 341–3, 349–64, entry points 481–4, 488–90, DfcQInit 530 366–7 498–9, 504–8 DfcQue0 92, 529–30 page directories 25–6, execution model 501–2 DfcQue1 92, 529–30 254–62, 275–87, 288–94, finding devices 506–8, DFCs see deferred function calls 742 514–17 DfcThread0 529–43 RDir 341–3, 349–64 HAL 475, 494–8 DfcThread1 529–43 structure 369–75 interactions 517–48 DfcThread... 529–43, 835–6 dirty bits, cache modifications 29 loading 498–548, 630–1 Dhrystone 833 Disable 233–6 LRTA/Symbian OS dictaphones, audio 40 DisableWakeupEvents 670, communication 822–3 digital ink, sprite anims 443–56 672, 683–5, 761–4 media drivers 574–89 digital signal processor (DSP) 9, Disconnect 123–6, 459–60, message queues 531–43 18–19, 20–9, 39–40, 246–7, 581 model choice 548 795–7 disconnect-pending state, state naming conventions 505–6 see also coprocessor.. machine 134–9 INDEX 877 disconnected chunks, concepts concepts 500–48, 609–10 concepts 138–9, 162–73, 185, 264–70, 272–3, 293–4, definition 528–9 312–13, 418–19, 421–2, 307–10 DLogicalChannelBase 236, 510–17, 534–5 disconnected sessions, file server 500–48 key members 164–5 356–8 concepts 500–48 DObject::Close 165–73 disk services, Symbian OS 3 definition 521–2 DObjectCon 169–73, 189–90 Dispatch 631–4 DLogicalChannelBase see also object containers dispatcher ::Request 526–8 concepts 169–73 interrupts 219–24, 231–6 DLogicalChannel::Close DMutex 171–3 nanokernel 173–7, 179–81, 535–43 key members 172–3 DObject::Dec 165–73 183, 185, 193, 195, 219–24 DLogicalDevice 95, 498–548 roles 222–3 DObject::DoAppendName DMA.DLL 552–62 DispatchObjectCloseOp 167–73 DMA see Direct Memory Access 353–4, 358 DObjectIx 162, 167–73 DMedia 582–7 displays 17–18, 19–20, 30–1, see also object indexes DMediaChangeBase 590–4 37–9 concepts 162, 167–73 DMediaDriver see also liquid crystal displays; 582–7, 588–9, key members 168–9 screens 590–4 DObjectIx::HandleMutex Dive-Reclus, Corinne 315–31 see also media drivers 170–1 diverted threads 60–2 DMemModelChunk 192 DObjectIx::iCount 169–73 DKernelEventHandler DMemModelCodeSeg 424–7 DObjectIx::iNextInstance 245–6, 631–4 DMemModelProcess 192 167–73 DKernelEventHandler DMemModelThread 192 DObject::Lock 167–73 ::DebugSupportEnabled DMMCMediaChange 590–4 DObject::Open 165–73 631–4 DMMCMediaDriverFlash DObject::RequestUser- DKernelEventHandler 590–4, 597–600 Handle 138–9 ::Dispatch 631–4 DMMCPsu 590–4 DoCancel 518–48 DKernelEventHandler DMMCSession 597–600 DoConnect 122–6 ::EExcHandled 246 DMMCSocket 590–4, 597–600 DoControl 502–48 DKernelEventHandler DMMCStack 597–600 DoCreate 65–6, 508–17, ::ERunNext 246, 633–4 DMsgQueue, concepts 145–6, 518–48, 713–14 DKernelEventHandler 783–4 documentation 1–2 ::ETraceHandled DoEnque 631, DMutex 80–8, 96, 171–3, 235–6 DoIt 653 783–4 460–2, 490–4 DLddUsbcChannel 607–12 Dolengo, Marcus 825 concepts 80–8, 96, 171–3, see also USB... domain access control register 783–4 DLibrary 70, 95, 112–15, 167, (DACR) 100, 275–8, 283–7 key members 84–5 271, 411–14, 417–27, 630 domain manager 666–8, 677, object containers 171–3 concepts 112–15, 167, 271, 751, 756–62 DMyController 411–14, 417–19 491–4 concepts 751, 756–62 DMyDevice key members 114 570–4 overview 756–8 object names 167 DMyEventHandler 632–7 domains 100, 275–87, 376 states 418–19 DNandMediaDriver 582–7 DoPowerUp 714, 721 DLL$DATA 310 DObject 66–71, 79, 84, 86, DoRequest 502–48 DLLs see dynamically loaded 94–5, 113–15, 132–46, DoSvControl 544–8 libraries 162–73, 185, 312–13, double-buffered DMA engines, DLocalDrive 582–7 418–19, 421–2, 510–17, concepts 37 DLogicalChannel 500–48, 534–5 double-ended chunks, concepts 609–10 see also kernel objects 264–70, 301 878 INDEX

DPBusPrimaryMedia 590–4 DriverApiClass 477–9 thread types 71–2 DPBusPsuBase 590–4 drives DThread::CalcDefault- DPBusSocket 590–4 concepts 31, 333–5, 337–9, ThreadPriority 108–9 DPhysicalChannel 518 340–67, 396–7, 574–9 DThread::Context 627, DPhysicalDevice 95, letters 31, 333–5, 337–9, 637–8 499–548 340–6, 359, 396–7, DThread::Create 63–93 DPlatMMCStack 597–600 574–9 DThread::DoCreate 65–6 DPowerController 675, 677, local drives 338, 576–89 DThread::ECreated 422 680–1, 683–4, 704 mounted drives 335–9, 341, DThread::EpocThread- DPowerController::CpuIdle 347–67, 574–9, 586–7, Function 65–6 689 611–12 DThread::EReady 422 DPowerController DSA see direct screen access DThread::iIpcCount 137–9, ::PowerDown 678 DSemaphore 78–80 142–3 DPowerHal 676, 685–6 DSerialDriverPowerHandler DThread::iUnknownState- DPowerHandler... 673–4, 711–14 Handler 75 677–80, 700, 705 DSerialDriverPowerHandler DThread::RawRead 650 DPowerManager... 672–4 ::PowerDown 719–20 DThread::RawWrite 650 DPowerModel 189–90, 671–2 DSerialDriverPowerHandler DThread::RequestComplete DPrimaryMediaBase 582–7, ::PowerUp 719 240, 286–7 590–4 DServer 121–9, 131–43 DThread::Suspend 643 DProcess DServer::Accept 132–43 dumb LCD displays 38–9 see also processes DServer::Cancel 131–43 duplex links 538, 549–50 concepts 93–7, 112–15, 167, DServer::Close 131–43 Duplicate 132–43 189–90, 192, 263–73, DServer::Deliver 131–43 DUsbClientController 292–4, 404–6, 414, DServer::Receive 131–43 607–12 418–22, 744–5 DSession 121–43 see also USB... key members 95–6 DSession::Add 130–43 DWin32Platform 190 object names 167 DSession::Close 135–9 DWin32Process 192 DProcess::iCodeSeg 112–13 DSession::CloseFrom- DWsScreenDevice 464–6 drag events, window server Disconnect 135–9 DXXXBatteryMonitor 698, 431–4, 438–74 DSession::Detach 130–43 700 DRAM 20–9, 30, 788, 832–4 DSession::New 134–9 DXXXPowerController DrawBitmap 467–8 DSession::Send 135–9 682–3, 704 drawing DSimpleSerialChannel DXXXPowerController area 466 529–48 ::AbsoluteTimerExpired backup behind 469–70 DSimpleSerialLDD 499–517 685 backup content windows DSimpleSerialPDD 514–17 DXXXPowerHandler 699, 705 467–8 DSP see digital signal processor dynamic memory 7, 20–9, blank windows 467 DThread 7–8, 62–93, 108–9, 305–6, 840–2 command storing 470–1 141–3, 150, 189–90, 192, dynamic priority-based scheduling, flicker-free redrawing 470 240, 264–73, 312–13, 422, concepts 772–4 mode 464–6 526–48, 627, 744–5, 785 dynamic RHeap redraw windows 468–71 concepts 66–71, 79–80, see also RHeap windows 466–71 83–5, 108–9, 150, 192, concepts 305–6, 840–2 DrawLine 450–6 264–73, 312–13, 422, dynamically loaded libraries (DLLs) DrawNow 468–9 526–8, 744–5, 785 animation DLLs 429–36, DrawPoint 450–6 embedded nanothread 66 442–56 DriveList 340–1 key members 68–70, 108–9, capability-model concepts driver objects 712 272–3, 312–13 321–4, 487 INDEX 879

code segments 114–15, e32const.h 177 earliest deadline first scheduling 270–1, 400–10, 412–17, E32Dll 97, 412, 481–4, 493–4 (EDF), concepts 772–4, 423–7, 626–7 E32Image 401–6, 419–27 779–80 concepts 7–13, 66, 72, 95–7, E32Image::Construct 403–6 EARLY DEBUG 654–6 112–15, 129, 174–7, 183, E32Image::DoLoadCodeSeg EArm... 648–52 266–73, 284–7, 294, 297, 423–7 earpieces 795–7 320–6, 333–9, 389–427, E32Image::FinaliseDlls EAttached 113–15, 418–19, 429–36, 442–56, 476–548, 405–6 427 552–62, 626–31, 740–2 E32ImageHeader 401–6, EAttaching 113–15, 418–19 dependencies 397 855–9 EAX 221–4 device drivers 476–548 E32Image::LoadCodeSeg EButton1Down 431–74 EXE files 97, 113–15 423–7 EButton1Up 431–74 loader 112–15, 271, 321–4, E32Image::LoadDlls 405–6 ECaseClose 431–74 387–427, 476–7, 490, E32Image::LoadProcess ECaseOpen 431–74, 763–4 504–8, 626–31, 638–9 403–6 ECaseSwitchDisplayOff name strings 389–90 E32Loader 400–6, 410, 686–7 object states 113–15, 627 411–12, 419–22 ECaseSwitchDisplayOn plug-in DLLs 336–9, 364–5, E32Loader::CodeSegCreate 686–7 429, 442–56, 499, 504–8 see 423–7 ECC Error Correction Code polymorphic DLLs 335–9, 362, E32Loader::CodeSegInfo EChangePriority 812–21 365–7, 499, 504–8 EChangesFreeMemory 420 313–14 processes 95–7, 112–15, 129, EChangesOutOfMemory E32Loader::CodeSegLoaded 284–7, 294, 297–8, 320–6 313–14 405–6, 410, 426–7 reference-counted objects ECloseMsg E32Loader::CodeSegNext 535–7, 543, 721 113–14, 415–16, 418–19 EColor... 464–8 404–6, 419–22 RLibrary 112–15, 271, ECOMM.LDD 478–9 E32Loader::CodeSegOpen 323–4, 393–427, 627, ECOMP.FSY 385 420–2 641–3 EControlConfig 536–43 E32Loader::LibraryAttach search rules 397–8, 402–6, ECreated 113–15, 418–19 411–12 410–12, 419–22 ECUST.DLL 490, 750 E32Loader::Library- shared-library DLLs 480–7 ECX 221–4 Attached shim DLL files 394 411–12 .edata section 388–93, 639 E32Loader::LibraryCreate statically-linked DLLs 321–4, EDebugPortJTAG 654–6 409–10 411–12, 426–7 EDetaching 113–15 E32Loader::ProcessCreate uses 112–13, 321, 417–19, EDetachPending 113–15, 427 429–36, 442–56, 627 404–10, 420–2 EDEV.LIB 481–4 version numbers 394–6, E32Loader::ProcessLoaded see also device drivers 410–12 405–6, 422 EDF see earliest deadline first... XIP ROM 392–3, 400–1, E32Main 65–6 EDisplayHalScreenInfo 406–27, 477, 504–8 e32property.h 150–60 497–8 E32Startup 65–6, 97, EDisplayHalSetState 487, 749–50 498 E32 image file format e32std.h 89 Edll EUserCode 266–70 see also executables E32STRT 750 EDllData 266–70 concepts 387–93, 398–427, E: drive 338, 576 EDrawModePEN 452–6 638–9 EABI 414 EDX 221–4 sections 387–93, 398–410, EAccessoryPower 686, 701 EEventAddCodeSeg 630 421–2, 638–9 EActive 431–74 EEventAddLibrary 629–30 e32cmn.h 302 EAllThreadsCritical 89–90 EEventAddProcess 627–8 880 INDEX

EEventAddThread 628–9 EEventUnloadLdd 631 406, 409–10, 518–19, EEventCaseClosed 434–74, EEventUnloadPdd 631 779–80 752–62 EEventUpdateChunk 629 debuggers 614–15, 641, EEventCaseOpened 434–74, EEventUpdateProcess 628 643–4 763–4 EEventUpdateThread 629 device drivers 518–19, 543–8 EEventDeleteChunk 629 EEventUserTrace 631 local media sub-systems 577–9 EEventDragDrop 433–74 EEventWindowGroupList- performance issues 825, 842–3 EEventErrorMessage 434–74 Changed 434–74 shared I/O buffers 562 EEventFocusGained 433–74 EEventWindowGroupsChanged EKA2 (EPOC Kernel Architecture EEventFocusGroupChanged 434–74 2) 1–17, 160, 161–206, 434–74 eexe.lib 65 251–73, 280–7, 318, 345–6, EEventFocusLost 433–74 EExecChannelRequest 525–6 389–90, 406, 409–12, EEventHwExc 246, 627 EExecChunkBase 175–7 613–58, 694–5, 779–88, EEventKey 433–74 EEXT.LIB 481–4 797–807, 810–23, 825–6 EEventKeyDown 433–74 see also kernel extensions see also Symbian OS EEventKeyRepeat 433–74 efficiency issues 2–3, 5, 26–8, basic concepts 3–4, 253–62, EEventKeySwitchOff 253, 282–3, 826–50 345–6, 394–5, 406, see also 434–74, 752–62 performance 409–12, 476–7, 779–88, EEventKeyUp 433–74 caches 26–8, 253, 262, 830–4 797–807, 825–6 EEventKillThread 629 code 5, 826–50 debuggers 613–15, 641, EEventLoadedProcess 628 EFILE.EXE 335–9, 385, 740–2, 643–4 EEventLoadLdd 630 745–6, 750 design goals 4–6, 13–16, 57, EEventLoadPdd 631 EFixedMedia... 578–9 117–20, 252–3, 271, EEventMarkInvalid 433–74 EFLAGS register 218–19, 221–4 280–7, 290–4, 315–31, EEventMessageReady 433–74 EForceResume 812–21 350–8, 613–14, 779–807, EEventModifiersChanged EFSRV.DLL 335–46 850 434–74 EGood 698 design limitations 14–15, EEventNewChunk 629 EGray16 465–6 834–5, 840–2 EEventNull 433–74 EHalGroup... 186–7, 494–8 EEventPassword 433–74 EHalGroupDisplay 495–8 design solutions 13–15, 57, EEventPointer 433–74 EHalGroupKernel 186–7, 117–20, 252–3, 271, EEventPointerBufferReady 495–8 280–7, 290–4, 315–31, 433–74 EHalGroupMedia 494–8 350–8, 613–14, 779–807, EEventPointerEnter 433–74 EHalGroupPower 495–8, 665, 850 EEventPointerExit 433–74 669, 671, 752–62 device drivers 499–548 EEventRemoveCodeSeg 630 EHalGroupVariant 495–8 disabling pre-emption 109–12, EEventRemoveLibrary 630 EHoldMutexPending 82, 85 811–21, 836–9, 842–50 EEventRemoveProcess 628 EHwEvent 642 emulator 3, 5–6, 8, 14, 15–17, EEventRemoveThread 629 EHwOP... 449–56 47–9, 59–62, 109–12, 183, EEventScreenDeviceChanged EHwState.. 450–6 190–2, 249, 252–3, 297–8, 434–74 EInactive 431–74 309–10, 431, 613–58, EEventStartThread 629 EIP values 218–19 849–50 EEventSwExc 627 EIpcClient 177 exceptions 239–49 EEventSwitchOff 434–74, EIS values 218–19 executables’ version-numbers 752–62 EKA1 2–3, 6–14, 61–2, 80, 92, 394–6, 410–12 EEventSwitchOn 434–74, 96–7, 110–12, 115, 129, 138, executive calls 161, 173–206, 763–4 160, 164–6, 178, 180–1, 183, 419–20 EEventUnloadingProcess 186–7, 201, 271, 274, 302, GSM protocol stack 797–807 628 350, 367, 379, 381, 390, 394, historical background 1–3 INDEX 881

interrupts 219–36, 779–88, ELFTRAN 387–93 entry points 97, 183 797–807, 825–6, 835–50 ELoaded 113–15, 418–19, 427 exceptions 249, 619–20, local media sub-systems 577–9 ELOCAL.FSY 335–9, 367, 385 626–37 LRTA 808–23, 835–50 ELOCD.LDD 336–9, 479, 494, executive (exec) calls 183 modular design 3–5, 14 575–89 extensions 490, 750 multi-tasking aspects 3–4, see also local media...; logical F32 system architecture 338 13–15 device drivers file server 338, 849–50 new CPU family 296 ELogicalChannel 513–17 interrupts 111–12, 183 open but resource-constrained ELogicalDevice 505–48 JTAG 36, 620–3, 643–58 environments 4, 253–62, email clients 3 key requirements 15–16, 327, 779–88, 797–807 EMapAttrCacheMax 564 252–3 performance issues 5, 825–50 EMapAttrFullyBlocking 564 limitations 614–15 portability goals 5–6, 252–3, EMapAttrUserRw 561–2 media performance 849 480 EMarkData 415–16, 424–7 memory model 8, 12, 106, pre-emptively multitasking OS EMarkDataFlagsCheck 190–2, 252–3, 297–8, 4, 7, 13–15, 46, 55–6, 414–16 309–10, 613–58 61–2, 98–112, 779–88, EMarkDataFlagsValid performance issues 849–50 797–807, 811–21, 825–6, 414–16, 424–7 platforms 15–16, 190 835–50 EMarkDataInit 415–16, pre-emption 111–12, 249 priority-based multitasking 424–7 processes 96–7, 183 4–7, 13–15, 47, 53–8, EMarkDataPresent 415–16, scheduling 109–12, 613–58 64–6, 69–70, 74–6, 424–7 threads 59–62, 109–12, 183, 78–88, 90–7, 98–112, EMarkDebug 415–16 297–8, 615–59 779–88, 797–807, 810–23, EMarkLdr 414–16, 420–2 Win32 12–13, 15–16, 59–62, 825–6 EMarkListDeps 414–16 97, 109–12, 190–2, 297–8, real-time aspects 4–7, 318, EMarkLoaded 414–16, 422, 435, 615–59, 749–50 779–88, 797–807, 810–23, 426–7 Windows 14, 15–16, 59–62, 825–6 EMarkUnListDeps 414–16 96–7, 249, 297–8, 309–10, services 161–206 embedded OSs, concepts 253–4 431, 490, 495–8, 615–59, single-user aspects 3 emergency shutdown 722–3 749–50 software interrupts 186, emulator 3–8, 14–17, 47–9, emulator memory model, concepts 219–36, 779–88, 797–807, 59–62, 109–12, 183, 190–2, 8, 12, 106, 190–2, 252–3, 825–6 249, 252–3, 297–8, 309–10, 297–8, 309–10, 613–58 software layering 11–13, 43, 338, 431, 490, 495–8, Emulator::Lock 62 47–9, 187–95, 252–314 613–58, 749–50, 849–50 EMultiMediaFlash 598–600 thread types 13–14 see also debuggers; Epoc... EMultiMediaIO 598–600 user-mode threads 161–206 boot processes 97, 749–50 EMultiMediaROM 598–600 EKERN.EXE 140–3, 183, 740–5 concepts 12–13, 15–16, 17, Enable 541–3 ekern.lib 492–4 47–9, 59–62, 96, 109–12, EnableWakeupEvents 670, EKernelCode 266–70 183, 190–2, 249, 252–3, 672, 677, 683–4, 760–2 EKernelData 265–70 297–8, 309–10, 338, 431, encoding, GSM protocol EKernelStack 266–70 490, 613–58, 749–50, 791–807 EKeyDown 431–74 849–50 encryption software 337, 788, EKeyOff 752–62 CPU performance 849–50 792–807 EKeyUp 431–74 debug architecture 613–25 EndOfInterrupt 111–12 EKLL.LIB 481–4 design solutions 14, 252–3, endpoints, USB 603–4 ELeaveCS 812–21 297–8, 613–14, 849–50 EndRedraw 469 ELF format files 387–93, 409 device drivers 613–58, energy sources 734 ELFFS.FSY 335–9 849–50 ENET.LDD 479 882 INDEX

Enlarge 580–1 EPowerHalSwitchOff 752–62 ESP see explicitly designated stack ENone 431–74 EPriorityForeground 835–6 pointer register ENotCritical 89–90 EProcessCritical 89–90 ESpPlusOffset 649–52 Enque 235–6 EProcessPermanent 89–90 ESpriteNoChildClip 454–6 Entry 340–1 EPsuOff 592–4 ESpriteNoShadows 454–6 entry points EPsuOnCurLimit 592–4 ESTART.EXE 338–9, 365–7, device drivers 481–4, 488–90, EPsuOnFull 592–4 382, 384–5, 579, 740–2, 498–9, 504–8 EPwOff 670, 677 745–6, 749, 751 emulator 97, 183 EPwStandby 670, 677 see also startup extensions 481–4, 488–90, EQ, GSM protocol 798–807 ESuspend 812–21 498 ERamDrive 266–70 ESwitchOff 431–74, 752–62 ENumNState 815–21 EReady 54–5 ESwitchoffTRawEvent 688 environmental factors 701–4 ERedraw 431–74 ESwitchOn 431–74, 763–4 EOffsetFromSp 649–52 ERelease 812–21 ESync... 447–8 EOffsetFromStackTop ERemovableMedia... 578–9 ESystemCritical 90 649–52 ERequestRead 538–43 ESystemPermanent 90 EPBusCardAbsent 592–4 ERequestReadCancel 542–3 ETEL see telephony server EPBUSMMC.DLL 575–89, ERequestWrite 541–3 Ethernet 92 596–600 ERequestWriteCancel 542–3 ETHERNET 479 EPBUSMV.DLL 596–600 EResume 812–21 Ethernet 616 EPBusOff 592–4 EROFS.FSY 385 EThread... 646–52 EPBusOn 593–4 Error Correction Code (ECC) ETimeout 813–21 EPBusPoweringUp 593–4 32–3 ETraceHandled 631, 653 EPBusPowerUpPending 593–4 errorcode 245 EUART1.PDD 478–9 EPBusPsuFault 593–4 errors 1–2, 22, 32–3, 52–4, EUART2.PDD 478–9 EPenDisplayOn 686–7 62–6, 77, 119, 154–8, EUndefined 649–52 EPhysicalDevice 505–48 208–49, 257–62, 311–14, EUpdateModifiers 431–74 EPOC32, historical background 374–5, 600, 613–58 EUSER 175, 183, 186–7, 2–3, 117 see also exceptions 313–14, 336–9, 749–50 EPOC.EXE 749–50 lasterror 257–62 EUSER.DLL 175, 183, 186–7, EPOC.INI 338, 849–50 LFFS recovery 374–5 336–9, 393–427, 580, EPOC kernel 1–3, 12–13, 59, MMC recovery 600 641–3, 653, 755–62 190–2 NAND flash memory 32–3 EUSER library 4–6, 11, 66, see also EKA... OOM errors 311–14 140–3, 174–8, 183–7, Epoc::AllocShadowPage 640 ERunNext 246, 633–4 266–73, 336–9 epocallowdlldata 493–4 ES register, X86 architecture concepts 6, 11, 140–3, 174–8, Epoc::FreeShadowPage 640 215–19 183–7, 266–70 Epoc::FreezeShadowPage EScheduler... 646–52 definition 6 640 ESDRV 479 design goals 5–6 EPointerMove 431–74 ESharedIo 267–70 functions 11 EPointerSwitchOn 431–74 ESharedKernelMultiple kernel 4–6, 11, 178, 183–7 EPowerBackup 686, 701 267–70, 563–4 privileged access 11 EPowerBackupStatus 686, ESharedKernelSingle threads 11, 140–3, 174–8, 701 267–70, 563–4 183–7 EPowerBatteryStatus 686, ESharedKernelMirror EUserCode 266–70 701 267–70 EUserData 266–70 EPowerExternal 686, 701 ESHELL.EXE 339, 657–8 EUserSelfModCode 266–70 EPowerGood 686, 701 ESOCK see socket server EVAR.LIB 481–4 EPowerHal... 686–8 ESOUND.LDD 479 see also variant extensions INDEX 883 event handlers 185, 241, 245–6, concepts 6, 12–13, 23, 33–4, EXE files 96–7, 113–15, 156, 429–74, 493–4, 626–37, 50–5, 62–6, 69–70, 91–2, 270–1, 297–8, 320–6, 333, 642–52, 752–62 100–12, 173–206, 207–49, 387–427 concepts 241, 245–6, 429–74, 413, 619–20, 623–5, see also executables 626–37, 642–52 626–37, 743, 843–50 Exec 170–87 window server 429–74, coprocessor fault handler exec.cpp 174 752–62 240–1, 246–9 Exec::CaptureEventHook event hooks 185, 429–30, debuggers 243, 619–20, 185 493–4, 634–7, 644–53, 623–5, 626–37 Exec::ChannelCreate 808–9 definition 207–8 510–17 Exec::ChannelRequest event services, extensions 493–4 EKA2 handling 239–49, event-driven architecture 726–7 525–6 779–88, 797–807 event-driven programs 2–3, 98, Exec::ChunkBase 174–7, 185 emulator 249, 619–20 111, 120–6, 726–7 Exec::DebugPrint 184, faults 209, 210–19, 236–49 see also active objects 654–6 invalid pointers 241–2 EventDfcFn 492–4 Exec::FastCounter 184 events kernel event handlers 241, Exec::HandleInfo 170–3 capture 185, 245–6, 429–30, 245–6, 429–74, 493–4, ExecHandler::ChunkBase 493–4, 632–7 626–37, 642–52 177 exceptions 6, 12–13, 23, ‘lazy’ context switching 242–3 ExecHandler::CodeSeg- 33–4, 91–2, 100–12, ‘magic’ handler 239–41 Create 405–6, 423–7 173–206, 207–49, 623–5, nanokernel 6, 188–9, 193–4, ExecHandler::CodeSeg- 626–37, 743 219–49, 780–8 Loaded 405–6 kernel event notification phases 219–24, 236–49 ExecHandler::CodeSegNext 245–6, 625–37 postamble phase 239–49 405–6 sources 430, 626–31 preamble phase 236–49 ExecHandler::DeviceFree types 430–5, 626–31 programmed exceptions 508 window server 429–74 210–19 ExecHandler::Message- EWaitMutex 81–2, 85–8 real hardware 210–19 Complete 135–9, 142–3 EWaitMutexSuspended 82, registers 212–15, 219–24, ExecHandler::Process- 85–8 236–49 Create 405–6, 420–2 EWaitSemaphore 79–80, resets 208–9, 210–19 ExecHandler::Process- Loaded 816–21 responses 219–24, 236–49 406 EWSRV.EXE ExecHandler::ServerCreate 339 TExcTrap handlers 239–44 see also window server 131–43 traps 173, 209–19, 236–49, exception handling, threads ExecHandler::SetSession- 311–14 50–5, 62–6, 69–70, 100–12, Ptr 135–9 types 207–19, 626–31 173–206, 207–49, 619–20 Exec::Heap 184 user-side exception handlers exceptions Exec::MathRandom 184–5 see also errors; interrupts 241 Exec::MutexWait 185 aborts 208–9, 210–19, using 241–3 Exec::ProcessSetPriority 236–49, 262 vector addresses 213–15, 185 APIs 243–9 217–36 execs.txt 175 ARM architecture 210–15, X86 architecture 210, 215–36, Exec::SempaphoreSignalN 220–36, 237–49 238–49 185 boot processes 740–5 XTRAP 243–5, 273, 631 Exec::SetDebugMask categories 207–19, 236–49, ExcIpcHandler 273 (TUint32) 184 626–31 exclusive access monitors, Exec::ThreadId 185 causes 207–19, 626–31 concepts 836–9 Exec::TickCount 184 884 INDEX executables execute-calls tables, threads extensions 4, 9–13, 72, 191–5, see also dynamically loaded 50–5, 175–83 231–6, 337–9, 475–548, libraries; EXE...; processes; execution model, device drivers 552–62, 577–9, 644–52, software 501–2 654–6, 738–64, 810–23 concepts 12–13, 190, 320–30, execution times, tasks 774–5, see also 333, 387–427, 740–2, 780–8, 825–50 Application-Specific...; 825–50 executive (exec) calls 50–5, 161, device drivers; kernel...; E32 image file format 387–93, 173–206, 245, 313, 400–6, platform...; variant... 638–9 410, 411–12, 419–22, boot processes 10, 479–80, ELF format files 387–93, 409 485–7, 501–2, 787–8 738–64, 810 file headers 392–6, 398–401, categorization decisions 183–7 concepts 9–13, 191–5, 407–10 concepts 50–5, 161, 173–206, 231–6, 337–9, 475–548, format 387–93, 638–9 245, 313, 419–20, 485–7, 552–62, 577–9, 644–52, 654–6, 810–23 loader 387–427 501–2 debuggers 10, 493–4, 644–56 management issues 387–427 context 177–8, 787–8 definition 477, 479 names 329, 389–90, 394–8, EKA1/EKA2 changes 178, emulator 490, 750 421–2 180–1, 183, 186–7 entry points 481–4, 488–90, PE files 96–7, 387, 390–3, emulator 183 498 409–10 flow of execution 173–7 event services 493–4 kumem performance issues 5, 825–50 functions 179–80, 245, file names 344–5 platform security 320–30 326, 485–7, 533–43 file server 337–9 platform software layer 12–13, mechanism 173–83 installation 488–90 190 slow/fast comparisons 177–8, kernel extensions 475–548, program SIDs 328–30, 420–2 179–87 810 project files 320–6, 328–30, user-mode memory accesses logger utilities 493–4 442–3, 480, 492–4, 625 178–9, 484–7, 501–2 optional utilities 493–4 ROM image file format 392–3 Exec::WaitForRequest roles 477, 479, 490–4 searches 394–400, 402–6, 649–52 system services 494 410–12, 419–22 exits types 4, 479–87 sections 387–93, 398–410, processes 93–7 user process memory 484–7 421–2, 638–9 threads 49–58, 61–6, 68–70, uses 477, 479, 490–4, 810 secure hash 329–30 74–8, 83–5, 88–90, 93–7, types 392–3 110–12, 312 version numbers 394–6, ExitThread 61–2 F32 system architecture 398–400, 410–12 expiry, timers 197–201, 810 see also file server; loader XIP ROM 31–2, 115, 258–62, explicitly designated stack pointer concepts 333, 335–86, 396, 265–71, 292–4, 309–10, register (ESP), X86 architecture 424, 579, 656–8 320, 364–5, 383, 392–3, 215–19 emulator 338 400–1, 406–27, 477, 488, export-directory section, E32 image startup 338–9, 384–5, 579 504–8, 737–64 file format 388–93, 400–1, text shells 339, 507–8 execute in place ROM (XIP ROM) 405–6, 409–10 f32file.h 339–40 31–2, 115, 258–62, 265–71, EXPORT C 443, 480–1, 491–4, f32fsys.h 365–7 292–4, 309–10, 320, 364–5, 498–9, 507–8, 525–6, FACCH, GSM protocol 790–807 383, 392–3, 400–1, 406–27, 532–43, 682, 692 factory objects 365–7, 498–548 477, 488, 504–8, 737–64 exported functions 365–7, 443 FadeBehind 467 concepts 31–2, 392–3, EXSTART extension 10, 420–2, failures 2, 303–5, 311–14 406–27, 477, 488, 504, 479–80, 494, 745, 750 fast exec calls 175–7, 179–87 737–64 extension 481, 488–90 see also executive... INDEX 885 fast executive table 181–3 RFile 128–9, 341–3, 349–64 processes 340–6 Fast Interrupt reQuest (FIQ) 33–4, shared files 330–1, 345–6 removable media devices 181, 211–15, 224–5, 233–6, File Allocation Table see FAT... 334–5, 360–2, 364–5, 237–8, 743–5, 787–8, File Data Blocks (FDBs) 369–75, 375–81, 574–89 799–807, 843–50 829 request-dispatch details 361–2 fast mutexes file headers, executables 392–6, request-processing issues see also NFastMutex 398–401, 407–10 350–8 concepts 56–8, 77–8, 81, 98, file server requests 350–62, 364–86 100–12, 149–50, 165–73, see also F32 system ROM drive/image (Z:) 337–9, 176–7, 188–9, 230, 235–6, architecture; loader; RF... 364, 384–5, 611–12 240–1, 312, 528, 781–8, asynchronous/synchronous server-side classes 347–64 823, 838–50 operations 344, 350–8, sessions 340–58 definition 781–2, 847 362–4 shutdown 751–62 performance issues 847–50 boot processes 338–9, 383–5, sub-session objects 341–6 restrictions 782, 847 579, 737–64 terminology 334–5 FAT12 375–81 buffers 340 text shells 339, 507–8 FAT16 375–81 change notification 341, threads 338–9, 347, 350–8, FAT32 375–81 362–4, 379–80, 581, 587 361–2, 579 FAT file system 31, 335–9, client API 339–64 user-mode threads 11 359–62, 364–6, 375–81, concepts 3–11, 31–3, file systems 611–12, 741–2 118–44, 317–31, 333–86, API 365–7 caches 377–81 475, 574–89, 611–12, composite file system 384–5 concepts 375–81, 611–12, 737–64, 849–50 concepts 31, 335–86, 393–4, 741–2 data-caging concepts 317, 611–12, 740–50, 826, delete notification 379–80 327–30, 345–6 849–50 removable media systems disconnected sessions 356–8 drives 335–9, 341, 347–67, 375–81, 611–12 drive letters 31, 333–5, 337–9, 574–9 rugged FAT version 376–81 340–6, 359, 396–7 exported functions 365–7 types 375–6 drives 31, 333–9, 340–6, FAT file system 31, 335–9, faults 347–67, 396–7, 574–9 359–62, 364–6, 375–81, see also exceptions emulator 338, 849–50 611–12, 741–2 concepts 209, 210–19, extensions 337–9 file-server interfaces 359–86 236–49, 261–2 file names 344–5 file/directory structure 369–75 FCCH, GSM protocol 789–807 file-system interfaces 359–86 LFFS 31–2, 364–5, 367–75, FCSE PID 279–80 flash memory 30–3, 333–5, 378, 746–8, 849–50 FDBs see File Data Blocks 337–9, 364–5, 367–86, mass storage file system Feather, Douglas 429–74 746–8 611–12 Feynman, Richard 765 high-level services 343–4 media drivers 364–86, FIFO order 34–5, 37, 98, initialization 339, 347–64, 574–89, 611–12, 849–50 129–43, 196, 225–31, 233–6, 579, 740–6 ROFS 31, 365, 381–5, 576–9, 351–8, 552–62, 796–7 media drivers 574–89 747–50 file access 128–9, 327–30, memory module 8 types 364–86, 611–12 336–86, 409–10 multi-threaded design 350–8 USB 611–12 data-caging concepts 327–30, notifiers 341, 362–4, 379–80 files 11, 339–46 345–6 object requests 353–4 deletions 343–4, 379–80 operations 128–9, 341–3, overview 333–9 names 344–5, 375, 389–90, 349–86, 409–10 platform security 317, 327–30, 396–8, 421–2 platform security 327–30, 611–12 operations 128–9, 341–3, 409–10, 611–12 plug-ins 336–46, 364–5 349–86, 409–10 886 INDEX

files (continued) floating point coprocessors FsThreadManager 355 parsing classes 340–1, 344–5, 242–3 FSWait 528, 532–43 352–4 flush requirements, caches 27–9, FSY files 335–9, 358, 367, 385, RFile 128–9, 341–3, 349–64 41, 278–87, 290, 377–81, 575–89, 606 shared files 330–1, 345–6 782–3 FT32 file server 118 structure 369–75 FM radios 40 FTL see Flash Translation Layer FillInSpriteMember 454–6 FMSignal 188, 528 Furber, Steve 21 final state, nanokernel timers FMWait 188, 528 FXT files 336–9, 385, 575–89 197–201, 780–8 focus, window server 433–74 FinaliseDrives 376, 761–2 FocusChanged 444–56 games, audio 40 Find 506–8 FOFF 646–52 FOMA see firmware over the air garbage collector 313–14 finding objects 169–71, 344, GC see graphics context 506–8 ForceRemount 580–1 ForceResume 812–21 GCC98r2 387, 394–5, 414 FindPhysicalDevice 510–17 GDBSTUB 618 Format 580–1 FinishedTransmitting GDT see global descriptor table formats 257–62, 335–9, 341–3, 539–43 general cases, efficient code 828 349–64, 387–93, 638–9 FIQ see Fast Interrupt reQuest general purpose I/O lines (GPIO) FPEXC register 242–3, 248–9 firmware over the air (FOMA) 751 9 free 299–306 firmware see flash memory Get 154–60, 341, 665, 686–7 see also free-store allocators Firth, Robert 45–115 GetBufInfo 569–74 free message-state flash components 9, 20–2, 30–3, GetCaps 510–17 client-server ITC 141–3 258–62, 333–5, 337–9, GetChunkHandle 569–74 kernel-side messages 149–50 364–75 GetConfig 520 free-store allocators 66, 184, buffers 32 GetDefModeMaxNumColors 251–2, 299–306, 309–10, concepts 30–3, 258–62 455–6 742–5, 848–9 RAM requirements 30 GetDir 341 see also free; operator types 31–3 GetDriverList 517 new; RHeap flash memory GetLastGeneratedCharacter allocator APIs 251–2, 300–1, see also 456 NAND...; NOR...; 309–10 ROM... GetRawEvents 435–6, 446–56 concepts 251–2, 298–310, GetSavedThreadRegister concepts 333–5, 337–9, 742–5, 848–9 364–86, 574–89, 594–602, 648–52 key services 300–4 GetSpriteMember 445–56 737–64 Symbian OS 301–5, 742–5, GetStatus 480–1 definition 333, 368 848–9 GetWindowGroupNameFrom- erasure 368 FreeLogicalDevice 508 Identifier 464–6 file server 30–3, 333–5, FreePhysicalDevice 508 Gillies, Donald 765 337–9, 364–5, 367–86, Freescale MXC 830 global chunks 264–5, 282–7, 746–8 FreeShadowPage 640 292–4, 307, 308–9, 401, 562 MMC 594–602 FreeSupervisorStack 272–3 concepts 264–5, 282–7, operations 368 FreeUserStack 272–3 292–4, 307, 308–9, 401, RAM 334, 381–4 FreezeShadowPage 640 562 user-data storage 334, 367–75, Freitas, Carlos 659–736, 737–64 definition 562 377–85, 392 frequency scaling, CPUs 728–31, global data structures 55–8, Flash Translation Layer (FTL) 31, 797–807 95–7, 112–15, 167–73, 337, 378–81, 611–12 FsNotify 363–4 292–4 flicker-free redrawing, windows FsRegisterThread 192, critical sections 55–8 470 263–73 global descriptor table (GDT) flickering screens 452, 470 FSSignal 528 216–19 INDEX 887 glossary 851–4 pre-processing handler 176–7, batteries 17–18, 30, 40, 41–2, GMSK modulation 796 185, 526 334–5, 376, 586–7, GNU 618–20 processes 95–7, 100–15, 659–736, 795–7, 828 Goldfuss, J.H. 737 119–44, 176–7, 185, 526 BP 9, 17–20, 39–40 GPIO see general purpose I/O threads 51–66, 68–72, 88–90, concepts 4, 9–43, 190–2, lines 100–12, 119–44, 176–7, 194–5, 251–3, 274–87, graphics 444–56 185, 526 333–9, 475–548, 795–7, graphics context (GC) 444–56, handles 839–40 471–2 see also objects debuggers 620–3 group windows, concepts bit fields 167–8 device drivers 3–6, 10–13, 43, 457–66 concepts 7–8, 95–7, 113–15, 69–70, 92, 191–2, 220–36, GSM protocol 5–6, 8–9, 14, 19, 118–44, 156–60, 161–206, 285–7, 308–9, 320–6, 46, 779, 788–807 299, 330–1, 341–6, 393–4, 333–86 burst types 790–807 419–20, 513 DMA 10, 20–9, 32–5, 36–7, concepts 5–6, 8–9, 14, 779, definition 161–2, 167–8 39, 296, 298–310, 479–80, 788–807 finding objects 169–71 488, 549–62, 568–74, design goals 5–6, 8–9, 14, kernel objects 163–73, 299, 839–40, 844–50 779, 788–807 513, 625, 644–52 exceptions 210–19 EKA2 implementation object indexes 162, 167–73 flash components 9, 20–2, 797–807 perform methods 162 30–3 encoding 791–807 pointers 163, 166–7 GSM hardware 795–7 hardware 795–7 property handles 156–7 historical background 1–3 idle mode 793 protection mechanisms 170–1 internal drive hardware 333–4 introduction 788–93 RHandleBase 150–60, interrupts 5–7, 12–13, 14–15, layer threads 806–7 161–2, 167–73, 518–48, 23, 33–7, 207–8, 219–36, logical channels 788–93 566–7 real time application 788–807 HandleShutdownEventL 296, 376–81, 491–4, 502, 767–79, 809–10, 825–6, traffic mode 793–5, 804–7 755–62 835–50 GUI 38–9, 738–42, 747–50 HandleSuspend 819–21 HandleTimeout 820–1 LCDs 10, 20–3, 30–1, 34, handwriting recognition 429, 37–9, 475, 479, 487, 496–8, 550–62, 727, 829 HAL 665, 669, 671, 674, 676, 442–56 moving memory model 274–8, 685–8, 701 hard real time 421–2 HAL see hardware abstraction see also real time multiple memory model layer concepts 766–7 HalData::ECpuSpeed 849–50 hardware 4, 9–43, 187–95, 287–96 HalFunction 497–8, 752–62 207–8, 251–3, 274–87, operating-system functions 3 HAL::Get 665, 686–7 333–9, 475–548, 660–3, overview 333–9 HAL::Set 665, 686–7 795–7, 826–50 performance issues 826–50 HandleCommandL 756 see also ARM...; Memory power management 17–19, HandleMsg 528–9, 533–43, Management Unit; mobile 23, 30, 41–2, 90–1, 376, 547–8, 715, 721 phones; X86... 586–7, 589–94, 659–736, HandlePointerMove 450–6 accelerators 19–20, 42 744–5, 751–62 HandlePriorityChange AP 17–20, 826–31 RAM 9, 13, 19, 20–33, 56, 819–21 ASSP 4, 9–10, 12–13, 14, 64–6, 92, 115, 220–36, HandleRelease 819–21 187–95, 220–36, 246–9, 251–4 HandleResume 819–21 479–87, 552–62, 577–9, silicon chips 17–43, 826–31 handlers 596–601 SoC 19–43 HAL groups 186–7 audio 17–21, 39–40 synonyms 276–8, 288–91 888 INDEX hardware (continued) I-node, LFFS 369–75 concepts 6, 84, 99–106, timers 4, 6, 9, 13–15, 35–6, I/O buffers see shared I/O 110–12, 195–201, 223–4, 41–2, 188–9, 195–205 buffers 227–31, 233–8, 813–21, two-chip solution 17–29 IA-32 architecture see X86... 835–50 variant extensions 4, 9–10, IA-32 FPU 241 interrupts 223–4, 227–31, 12–13, 187, 194–5, IAT see import address table 233–8, 813–21, 835–50 231–6, 337–9, 479–87, ICache see instruction cache mutexes 84 552–62, 577–9, 654–6, ICE see In-Circuit Emulator RTOS personality layers 738–64 .idata section 388–93 228–9, 231, 813–21, variant-specific components 4, IDBs see indirect blocks 835–50 9–10, 12–13, 187–95 IDE see Integrated Development scheduling 99–106, 110–12, hardware abstraction layer (HAL) Environment 227–31, 233–8, 835–50 4, 13, 186–90, 195, 475, identity attribute, properties entity implementation, platform security 494–8, 741–5 154–60 328–30 definition 495–6 IDfcFn 818–21 import address table (IAT), E32 device drivers 475, 494–8 IDFCs see immediate deferred image file format 388–93, functions 186–7, 195, function calls 400–1, 409–10 494–8 idle mode 130–43, 197–201, import-data section, E32 image file kernel services 186–7, 495–8, 662, 665, 668, 681–2, 689, format 389–401, 404–10 745 694–6, 703–5, 710, 718, IMPORT C 480–1, 491–4, LCD HAL 487, 496–8 723–9, 793–807 513–17, 518–48, 670, 682, registration 496–8 concepts 793–807 692, 697 hardware mode, client windows operations performed 793 In-Circuit Emulator (ICE) 620–3 464–6 idle thread see null thread inactivity monitoring 716–18 Hardware for Symbian OS 3 idle time 18–19, 35–6, 39, 41, InactivityDfc 717 Harrison, Richard 340 130–43, 195–205, 373–4, independent software layer Harvard cache 277–8, 426, 662, 665, 668, 681–2, 689, see also nanokernel; Symbian 830–1 694–6, 703–5, 710, 718, OS... heaps 65–6, 184, 298–310, 319, 723–9, 793–807 concepts 12–13, 161, 187–95, 840–2 IDT see interrupt descriptor 252–3 see also Rheap table functions 12–13, 187–95 concepts 298, 299–306, 319, IDTR register 218–19 read-modify-write APIs 189–90 840–2 IEEE 620–3 indirect blocks (IDBs), LFFS threads 66, 298–310, 319 #ifndef KERNEL MODE 369–75 Henry, Morgan 613–58 519–22, 570–4 Info 514–17 high-bandwidth activities, design image software layer see platform InfoCopy 486–7, 497–8 goals 5–6 software layer infrared connectivity 616 high-level boot processes 739–42 image-header section, E32 image Initialise 743–5 high-level services, file server file format 388–93, InitialiseMicrokernel 343–4 398–401 743–5 hit ratio, caches 26–7 images initialization 669 holding queue, nanokernel timers E32 image file format 387–93, boot processes 739–65 195–201, 780–8 398–400 file server 339, 347–64, 579, holding state, nanokernel timers efficient code 829 740–6 197–201, 780–8 RAM requirements 29–30 kernel 743–5 holding threads, mutexes 80–8, IMB see instruction memory initialized-data section, E32 image 171–3 barrier file format 389–93, 400–1 homonyms 275–8, 288–91 immediate deferred function calls InitiateRead 541–3 hypervisor system 808–9 (IDFCs) InitiateWrite 541–3 INDEX 889

InitProperties 490 shared chunks 160, 173–7, disabling 233–6, 776–9, InitSvHeapChunk 191–2, 184–7, 264–73, 292–4, 818–21, 823, 836–9, 263–73 298–310, 562–74, 822–3 842–50 InitSvStackChunk 191–2, shared I/O buffers 160, 298, dispatcher 219–24, 231–6 263–73 307–10, 562–74 DMA 36–7, 549–50, 839–40, InitSystemTime 190, 263–73 internal drive hardware, concepts 844–50 Install 505–17 333–4 EKA2 handling 219–36, installed binaries, platform security internal RAM (IRAM) 20–9, 779–88, 797–807, 825–6 329–30, 611 30–1, 375–81 emulator 111–12, 183 instruction cache (ICache), concepts 30–1, 375–6 fast/slow exec calls 175–7, concepts 26–9, 31 FAT file system 375–6 179–87 instruction memory barrier (IMB) Interrupt 194–5, 231–6, FIQ 33–4, 181, 211–15, 184, 426 541–3, 814–21 224–5, 233–6, 237–8, Integrated Development interrupt descriptor table (IDT) 743–5, 787–8, 799–807, Environment (IDE) 614–59 218–19, 220–36 843–50 Intel 20, 24, 827–30 interrupt gates, X86 exceptions hardware 5–7, 12–13, 14–15, 8086 architecture 1–2 218–19 23, 33–7, 207–8, 219–36, SA1100 10 Interrupt ReQuest (IRQ) 33–4, 296, 376–81, 491–4, 502, XScale processors 20, 24, 211–15, 222–4, 233–6, 767–79, 809–10, 825–6 827–31 237–8, 743–5, 843–50 IDFCs 223–4, 227–31, 233–8, interrupt service routines (ISRs) Intel IA-32 see X86... 813–21, 835–50 165–6, 195, 197–201, intellectual property (IP) 20–1 IRQ 33–4, 211–15, 222–4, 220–38, 308–9, 502, 743–5, inter-processor communication 233–6, 237–8, 743–5, 806–7, 809–10, 813–21, (IPC) 17–29, 40, 118–44, 843–50 835–50 150–60, 285–7, 295–6, ISRs 165–6, 195, 197–201, Interrupt::Bind 232–6 319–20, 324–6 220–38, 308–9, 502, Interrupt::Clear 233–6 client-server ITC 118–44, 177, 743–5, 806–7, 809–10, Interrupt::Disable 233–6 319–20, 324–6, 473–4 813–21, 835–50 Interrupt::Enable 541–3 publish and subscribe system InterruptHandler 492–4 maskable interrupts 208, 214, 150–60, 309–10, 330, interrupts 740 744–5, 758 see also exceptions; latency nanokernel 6, 188–9, 193–4, v1 118–19, 319–20 APIs 231–6 219–36, 780–8 v2 118, 124, 128–9, 143–4, boot processes 740–5 phases 219–24, 236–49 319–20 code flow 220–36 postamble phase 220, 223–5 inter-thread communications (ITC) concepts 5–7, 12–13, 14–15, pre-emption lock 226, 234–6, see also client-server ITC 23, 33–7, 91–3, 99–112, 491–4, 770–9, 825–6, asynchronous message queues 173–206, 207–49, 296, 835–50 145–6, 531–43 376–81, 491–4, 502, preamble phase 220–39 concepts 117–60, 173–206, 522–8, 740–5, 767–79, RTOS 767–79, 809–10, 286–7, 298–310, 324–6, 784–8, 797–807, 809–10, 825–6, 835–50 335–9, 473–4, 744–5, 825–6, 835–50 scheduling interactions 822–3 definition 207–8 224–31, 233–6, 767–79, kernel-side messages 147–50, design goals 5–6, 14–15, 809–10, 825–6, 835–50 160, 531–43, 544–8 779–88, 797–807 SWIs 173–86, 206, 207–49, message pools 134–46 DFCs 6, 13–15, 54–5, 59, 89, 809–10, 825–6 publish and subscribe system 91–2, 223–4, 227–31, tasks 767–79, 835–50 150–60, 309–10, 330, 233–6, 491–4, 522–8, types 33–5 744–5, 758 787–8, 806–10, 835–50 using 231–6 890 INDEX

Interrupt::SetPriority Kern::AddHalEntry 187 memory management 251–3, 233–6 Kern::AsyncNotifyChanges 313–14 INTR line 219 91 panics 6, 68, 89–90, 157–8, invalid area, client windows 466 Kern::ChunkAddress 568–74 241, 273, 347, 401, 450–6, invalid pointers 241–2, 319, 326 Kern::ChunkClose 564–74 533–4, 548, 619–20, Invalidate 466, 471 Kern::ChunkCommit- 626–37 IP see intellectual property Contiguous 565–6 platform security 318–31 IPC see inter-processor Kern::ChunkCommitPhysical pre-emption lock 4, 7, 13–15, communication 565–6 46, 55–6, 61–2, 98–112, IRAM see internal RAM Kern::ChunkCreate 563–74 226, 234–6, 249, 311–12, see IRQ Interrupt ReQuest Kern::ChunkPhysical- 491–4, 770–88, 811–21, IsAvailable 516–17 Address 568–74 825–6, 835–50 IsIDFC 235–6 KERN$CODE 309–10 priority level 210 IsQueued 235–6 Kern::DfcQue0 92, 529–30 process creation 93–7, IsRomAddress 191–2, 263–73 Kern::DfcQue1 92, 529–30 113–15, 320–6 ISRs see interrupt service routines kernel publish and subscribe system ISRSignal 817–21 see also CPU...; EKA2; 150–60, 309–10, 330, IsWakeupEventEnable 684 memory...; nanokernel 744–5, 758 ITC see inter-thread boot processes 13–15, 90–2, scheduling 98–112, 780–8 communications 338–9, 476–80, 737–64 section address 280–7 iterator classes, concepts 506–8 caches 28, 251–2 shutdown 752–62 client-server ITC 117–44 system transition 757–62 concepts 1–16, 23, 28, 35–6, threads 13–15, 45–93, Java 301, 313, 320 43, 45–115, 150–60, 161–206, 412–27, 486–7, see also nonnative 161–206, 210, 241, 501–2, 527–8, 585–6, programming systems 251–314, 318–31, 401, 609–12, 615–59, 743–5, JIT 320, 619–20, 641–3 412–27, 475–548, 737–64, 783–8, 835–50 JPEG decoder 25 783–8 timers 4,6,9,13–15,35–6, JTAG (Joint Test Action Group), data structures 45, 55–6 debuggers 36, 620–3, debug interface 625–40, 49–50, 90–2, 188–9, 643–58 651–2 195–205, 230, 479–80, definition 3–4 745, 783–4 design issues 4–15, 252–3, trace channel 652–8 kernel extensions KBufSize 503–8 783–8 see also EEXT.LIB; KDEBUG.DLL 644–52 DLLs 476–548, 552–62 extensions KDefaultDebugPort 655–6 EUSER library 4–6, 11, 178, KDeviceAllowAll 512–17 183–7 concepts 475–548, 810, 826 KDeviceAllowInfo 512–17 event handlers 241, 245–6, definition 475, 479 KDeviceAllowPhysical- 429–74, 493–4, 626–37, entry points 481–4, 488–90, Device 511–17, 522–48 642–52, 752–62 498 KDeviceAllowUnit 511–17 failures 311–14 system services 494 KDLL 480 initialization routines 743–5 kernel.h 189, 489, 510–11, KDrive... 360–2 kernel services 136, 161–206, 528 KEerrCancel 670 229–31, 251–3, 313–14, kernel heap, concepts 7 Kern 91–2, 187, 189–90, 318–20, 479–87, 513, kernel lock see pre-emption lock 486–7, 496–8 743–5, 783–8 kernel objects 66–71, 79, 84, 86, KERN-EXEC3 262, 548 library-loading involvement 94–5, 113–15, 132–43, Kern::AddEvent 493–4, 423–7, 504 145–6, 162–73, 185, 479–80, 756–62 LRTA 808–23, 835–50 513, 625–37, 644–52 INDEX 891

see also DObject kernel-side architecture 119–20, Kern::ThreadDesRead 273, access counts 163–73 124–6, 128–43, 160, 326 concepts 162–73, 479–80, 161–206, 298–310, 324–6, Kern::ThreadDesWrite 513, 625–37, 644–52 400, 412–27, 476–548, 189–90, 486–7, 537–43 debuggers 625–37, 661–736, 825–6 Kern::ThreadKill 538–43 644–52 kernel-side code management Kern::ThreadRawRead handles 163–73, 299, 513, 412–27, 566–74, 613–58, 189–90, 273, 486–7, 538–43 625, 644–52 744–5 Kern::TimerDfcQ 92 layout tables 644, 645–52 loader 412–27 ‘KERN–EXEC 3’ panic code 241 names 163–4, 166–73 shared chunks 566–74 KErrAbort 543 ownership 164–73 kernel-side debug KErrAlreadyExists 640 reference-counted kernel objects see also debuggers KErrArgument 489, 670 162–73, 415–16, concepts 613–58 KErrBadDescriptor 244–5 KErrCancel 418–19 kernel-side messages 543 KErrCompletion kernel server calls 178, 183 see also inter-thread 588–9 KErrDied kernel services 136, 161–206, communications 77 KErrGeneral 229–31, 251–3, 313–14, concepts 147–50, 160, 165, 248, 482–4 KErrInUse 318–20, 479–87, 513, 531–43, 544–8 670 KErrNoMemory 154, 497, 743–5, 783–8 states 149–50 512–17, 523–4 see also EKA2... KernelInfo 190, 263–73 KErrNone 52–4, 165, 244, 248, example user-accessible services KernelMain 743–5, 750 450–6, 483–4, 489–90, 183–7 KernelModuleEntry 482–3, 497–9, 503–17, 530–43, executive calls 161, 173–206, 488–90, 494, 498–9 571–4, 588–9, 813–21 419–20, 485–7 Kern::Free 523 KErrNotFound 156, 573 HAL functions 186–7, 195, Kern::HalFunction 186–7 KErrNotSupported 522–4, 495–8, 745 Kern::MachinePowerStatus 538–43 kernel 187–95, 513, 783–8 672, 698 KErrPermissionDenied 155, objects and handles 161–73, Kern::MakeHandleAndOpen 487, 498, 522–4 299, 479–80, 513, 783–4 566–7 KErrTimeOut 813–21 Kern::Message software layers 187–95 533–43 K::EventThread 185 Kern::OpenSharedChunk timers 195–205, 479–80, 745, KExecFlagClaim 526 783–4 567–74 KExecFlagPreProcess 526 user-mode threads 161, Kern::PollingWait 539–43, KEXT 481–4 173–206 694 key events kernel software layers 11–13, 43, Kern::Printf 653 character events 438–40 47–9, 187–95, 252–314 kern priv.h 190–1, 193, concepts 436–40, 752–62 kernel threads 262–3 queue-priority overflows see also DFC...; null...; Kern::ProcessCreate 440–2 supervisory...; timer... 420–2, 627–8 ups and downs 431–42 concepts 13–15, 90–2, Kern::QueryVersion- window server 431–4, 486–7, 501–2, 527–8, Supported 511–17, 523–4 436–74, 752–62 586, 609–12, 615–59, Kern::RequestComplete keyboards 11, 13–15, 92, 743–64, 783–8, 835–50 536–43 318–31, 431–74, 495–8, kernel-mode free store, RHeap Kern::RoundToPageSize 752–62, 795–7 305–6 560–2, 565–6, 571–2 Kill 56, 59 kernel-mode software, memory Kern::SafeReAlloc 171–3 kill operations, mutexes 83–8 model 298–310, Kern::ThreadCreate 65, KMaxCoprocessors 246–9 625 628–9 KMaxHalGroups 495–8 892 INDEX

KMaxKernelName 509–13 latency loader 112–15, 271, 321–4, KMaxLargePropertySize 154 see also interrupts 387–427, 476–7, 490, KMaxTInt 542–3 audio 39–40 504–8, 626–31, 638–9, KMaxUnits 511–17 concepts 5–6, 7–8, 13–15, 30, 740–2 KMediaDriverDeferRequest 34–5, 98–112, 784–8, search rules 397–8, 410–12, 588–9 826–50 419–22 KModuleEntryReason- design goals 5–6, 13–15, uses 112–13, 321, 417–19 ExtensionInit1 482–4 784–8 LIBRARY 492 KModuleEntryReason- DMA impacts 844–5 lifecycle, threads 54–5, 72–5 ExtensionInit 65–6, key measure 785–8, 841–5 Linux 4 482–4 performance 785–8, 826–50 liquid crystal displays (LCDs) 10, KModuleEntryReason- reduction techniques 842–5, 20–3, 30–1, 34, 37–9, 475, ProcessDetach 65–6, 846 479, 487, 496–8, 550–62, 483, 508 worst-case scenarios 786–8, 727, 795–7, 829 KModuleEntryReason- 839 see also screens ProcessInit 65–6 Lauterbach 621 KModuleEntryReason- concepts 37–9, 479, 487, layering concepts, software 496–8, 550–62, 795–7, ThreadInit 65–6 11–13, 43 829 KModuleEntryReason- Layland, J.W. 771–2 VariantInit 482–4, types 38 layout tables, kernel objects 644, Liu, C.L. 771–2 494 645–52 Load 323–4, 393–427, 442–56 KMyDeviceBufSize 569–74 ‘lazy’ context switching, exceptions LoadDllL 455–6 KNullDebugPort 655–6 242–3 loader KNullUid 328 LCD HAL 487, 496–8 KNullUnit see also file server 511–17 LCDs see liquid crystal displays KPlatDeviceTxChan ARM 421–2 572 LDD 481–4 K::PowerModel cache 396, 398–400 669, 671 LDDs see logical device drivers KThreadAttAddressSpace classes 392–3, 401–6 LDREX/STREX 836–9 client requests 402–27 105–12 ‘leakage’, memory 311 KThreadAttImplicit- Least Recently Used (LRU), caches concepts 93, 112–15, 321–4, SystemLock 104–12 377–81 329–30, 335, 339, 382–3, KThreadFlagProcess- Leave 311–13 387–427, 476–7, 611, Critical 89–90 leaving mechanism 6 626–31, 638–9, 737–42, KThreadFlagProcess- legacy client-server framework, 746–8 Permanent 89–90, IPCv1 118–19 DLLs 112–15, 271, 321–4, 93–4 legacy real time application (LRTA) 387–427, 476–7, 490, KTRACE OPT 656–8 808–23, 835–50 504–8, 626–31, 638–9, KUDesGet 485–6 Leung, J.Y.T. 771–2 740–2 KUDesInfo 485–6 LFFS see Log Flash File System E32 image file format 387–427 KUDesPut 485–6 libraries 4–13, 66, 70, 72, kernel-side code management KUDesSetLength 485–6 112–15, 164–7, 183–7, 412–27 KUidSystemCategoryValue 266–73, 284–7, 294, 297, libraries 112–15, 271, 321–4, 156 336–9, 387–427, 626–31, 387–427, 476–7, 490, kumem functions, executive (exec) 740–2 504–8, 626–31, 638–9, calls 179–80, 245, 326, see also dynamically loaded...; 740–2 485–7, 533–43 EUSER... non-XIP executables 392–3, concepts 112–15, 167, 183–7, 400–1, 406–13, 424–5 LAF see Look And Feel 266–73, 398, 410–12, platform security 321–4, lasterror 257–62 417–27, 626–31, 740–2 329–30, 396, 611 INDEX 893

processes 93, 112–15, 321–4, Lofthouse, Tony 475–548 LRTA see legacy real time 329–30, 382–3, 393–427, Log Flash File System (LFFS), application 626–31, 638–9 concepts 31–2, 364–5, LRU see Least Recently Used requests 402–27 367–75, 378, 746–8, 849–50 ROM file system 339, 392–3, logger utilities 396–7, 402–6, 746–8 debuggers 623–4, 643–52 M class 191–2, 262–73 searches 394–400, 402–6, extensions 493–4 see also model software layer 410–12, 419–22 post-mortem analysis tools M-state, Symbian OS threads services 393–4 623–4 72–5 startup 339, 384–5, 476–7, logical channels, GSM protocol MacOSX 3 578–9, 737–42, 746–8 788–93 MachinePowerStatus 672, version numbers 394–6, logical device drivers (LDDs) 698 398–400, 410–12 see also device drivers; local ‘magic’ handler, exceptions LoadLibrary 297 media sub-systems 239–41 LoadLogicalDevice advanced factory concepts MaintainBackup 467–8 393–427, 503–8, 627 515–17 MakeChunkHandle 570–4 LoadPhysicalDevice 503–8 classes overview 499–502, MakeHandleAndOpen 566–7 loads, energy sources 734 582–7 MAKSYM 624–5 local drives, concepts 338, closure 534 malicious code, robustness needs 576–89 concepts 4, 10, 95, 325–6, 5–6, 128–30, 254–5, 260–2, local media LDD, concepts 574, 336–9, 355, 359–62, 274, 281–3, 326, 330 582–9, 611–12 477–87, 498–548, 574–89, malloc 251–2, 299–306 local media sub-systems 606–12, 630–1, 641–3 MAllocator 302–4 see also logical device drivers; creation 498–548, 630–1 concepts 302–4 peripherals; physical device debuggers 630–1, 641–3 key members 302–3 drivers definition 477–8 MAnimGeneralFunctions classes 574–89 EKA1/EKA2 contrasts 544–8, 435–6, 444–56 concepts 336–9, 380–1, 384, 587 MAnimGeneralFunctions 479, 494, 513, 529–30, LDD factory 509–13, 515–17, ::GetRawEvents 435–6, 574–94, 601–2, 611–12 544–8, 630–1 446–56 definition 574 loading 503–48, 630–1 MAnimSpriteFunctions EKA1/EKA2 contrasts 577–9, local media LDD 574, 582–9, 444–56 587 611–12 MAnimWindowFunctions ELOCD.LDD 336–9, 479, 494, logical-channel creation 522–3 444–56 575–89 naming conventions 505–6 manufacturers loading 513 opening 509–48 mobile phones 8–9, 20, 333, overview 574–9 roles 477–8, 509–13 384, 833 TBusLocalDrive 336–9, USB 606–12 personal layer 8–9 380, 574–89, 611–12 logons, threads 70, 77–8, silicon chips 20, 23–5, 826–31 user-side interface class 88–90 Mars Pathfinder mission (1997) 579–82, 588–9, 611–12 ‘long-running’ operations 351–8 777–9 Lock 62, 77–8, 167–73, Look And Feel (LAF) 752–64 maskable interrupts 448–56, 816–21 lost clusters 376–81 see also interrupts lock-free algorithms, performance low memory, concepts 311–14 concepts 208, 214, 740 issues 836–9, 847 low power states 668, 670, masked ROM, concepts 333–5, LockedDec 189 694–6, 702–4, 724–7, 738–40 LockedInc 189, 527–8 731–3 Maugham, W. Somerset 1 LockedSetClear 527–8 see also off mode; standby MaxTranSpeedInKilohertz LockSystem 535–43 mode 598–600 894 INDEX

May, Dennis 207–49, 387–427, chunks 14–15, 95–7, 160, Memory Management Units 765–823 166, 173–7, 184–7, 192, (MMUs) MDirectScreenAccess 472 264–73, 278–87, 292–4, ARM architecture 255–62, media, emergency shutdown 298–310, 320, 401, 274–87 722–3 562–74, 610–12, 626–37, boot processes 738–42 media drivers 740–5, 782–3 buffers 257–62, 275–87 see also local media DMA 10, 20–9, 32–5, 36–7, chunks 264–70, 278–9, sub-systems; physical...; 39, 296, 298–310, 479–80, 565–6 removable... 488, 549–62, 568–74, concepts 7–8, 12–14, 21–9, classes 574–89 839–40, 844–50 38, 66–71, 93, 105–12, concepts 329–30, 334–43, dynamic memory 7, 20–9, 178–9, 191–4, 210–15, 360–2, 364–86, 574–89, 305–6, 840–2 251–70, 275–96, 479–80, 611–12, 835–50 efficient code 829–50 560, 565–6, 652, 738–45, definition 574, 588 garbage collector 313–14 783, 810 DMediaDriver 582–7, ‘leakage’ 311 CPU 254–62, 296, 740–2 588–9 low memory 311–14 definition 254 file systems 364–86, 574–89, management 7–8, 12–14, direct memory model 296 611–12, 849–50 21–9, 38, 66–71, 93, disabling benefits 296 IDs 578–9 105–12, 178–9, 191–4, exceptions 210–15 local media LDD 574, 582–9, 210–15, 251–70, 275–96, key features 254–62 611–12 313–14, 479–80, 560, memory protection 260–1, user-side interface class 565–6, 652, 738–45, 783, 275–8, 281–3, 287–8, 579–82, 588–9, 611–12 810, 822–3 293–4, 783 media formats 335–9 maps 21–6, 251, 254–62, 272, page tables 25–6, 28, 105–12, MEDLFS 479 275–87, 293–4, 644–52, 254–62, 275–87, 288–91, MEDMMC.PDD 479, 575–89, 740–2 565–6 596–600 non-current thread memory TLBs 25–6, 257–62, 275–94 MEDNAND.PDD 479, 575–89 650–1 TTBR 256–62, 275, 287–96 mega-pixel camera images, RAM overwritten memory 319–20 virtual/physical addresses requirements 29–30 pages 25–6, 28, 105–12, 254–62, 275–91, 740–2 Mem::Copy 828, 832–3 254–62, 275–87, 288–94, memory model memcpy 178–9, 300, 832–3 301–9, 313–14, 565–6, allocation strategies 293–4, memget 485–7 740–2 298–309, 311–14, 559–62, memory 3–4, 7–8, 11–13, 14, performance issues 829, 638–9, 829, 848–9 21–9, 54, 251–314, 319, 833–4, 848–9 APIs 262–73, 298–310 333–5, 479–80, 738–42, physical memory 21–6, ARM architecture 255–62, 825–6, 829–50 251–62, 275–87, 830–2 274–87, 300–4, 421–2, see also flash...; RAM...; process memory context 426 ROM... 259–62, 274–9, 283–6, caches 25–9, 251–3, 262, alignment issues 832–3 292–6, 319 275–87, 288–91 allocation strategies 293–4, shared memory 160, 173–7, chunks 14–15, 95–7, 160, 298–309, 311–14, 559–62, 184–7, 264–73, 292–4, 166, 173–7, 184–7, 192, 638–9, 829, 848–9 298, 306–10, 562–74, 264–73, 278–87, 292–4, blocks 262–73, 298–310, 777–9 298–310, 562–74, 740–5 368–75, 379–85, 747–50, throughput 833–4 concepts 7–8, 11–16, 23–9, 779, 822–3, 829 unused pages 313–14 54–8, 71, 78, 91–3, buffers 257–62, 275–87, virtual memory maps 25–6, 99–112, 160, 161, 178–9, 553–74, 797–807, 823, 230, 251–62, 272, 275–87, 187–95, 251–314, 318, 833–4, 839–40 293–4, 311, 644–52, 742 421–2, 424–7, 613–58 INDEX 895 context switch times 7–8, shared memory 160, 173–7, MMP files 25, 320–6, 328–30, 14–15, 57–8, 102–12, 184–7, 264–73, 292–4, 442–3, 480–1, 492–4 274–9, 283–6, 293–6, 312, 298, 306–10, 562–74, see also project files 340–6, 634–8, 774–5, 777–9 MmuBase 193–4 782–8 supervisory thread 91–2 MMUs see Memory Management CPU software layers 12–13, types 8, 12, 106, 191–2, 251, Units 193–4, 252–3 274–98, 421–2, M::NewCodeSeg 263–73, DChunk 177, 190, 192, 650–1 424–7 264–73 virtual/physical addresses mobile phones 8–9, 17–43, DCodeSeg 95–7, 114–15, 254–62, 275–91, 297–8, 315–31, 333–5, 376, 381–2, 192, 263–73, 400–17, 740–2 586–7, 659–736, 795–7, 424–7 Memory Stick 334, 589–94 828, 850 definition 251–2 memput 485–7 see also hardware direct memory model 8, 12, Message 533–43 AP 17–29, 826–31 106, 191–2, 253, 296, message pools, client-server ITC audio 17–21, 39–40 651 134–46 batteries 17–18, 30, 40, 41–2, DProcess 93–7, 112–15, message queues 8, 34–5, 37, 334–5, 376, 586–7, 167, 189–90, 192, 263–73, 87–8, 98, 118–60, 300–1, 659–736, 795–7, 828 292–4, 404–6, 414, 531–43, 809–10 BP 9, 17–20, 39–40 418–22, 744–5 see also asynchronous... design issues 17–43, 315–31, 779–88, 797–807, 850 DThread 272–3 ‘message-centric’ architecture, DMA 10, 20–9, 32–5, 36–7, emulator memory model 8, 12, client-server ITC 118–44 39, 296, 298–310, 479–80, 106, 190–2, 252–3, 297–8, message-pending state, state 488, 549–62, 568–74, 309–10, 613–58 machine 130–43 839–40, 844–50 free-store allocators 251–2, messages 8, 34–5, 37, 87–8, 98, flash components 9, 20–2, 299–306, 309–10, 742–5, 118–60, 300–1, 531–43, 30–3, 258–62 848–9 617–25, 809–10 idle mode 130–43, 197–201, heaps 298, 299–306 metadata 662, 665, 668, 681–2, 689, interfaces 262–73, 298–310 caches 377–81 694–6, 703–5, 710, 718, layering concepts 11–13, 43, LFFS 374–5 723–9, 793–807 187–95, 252–314 Metrowerks 618 interrupts 5–7, 12–13, 14–15, MEventHandler low memory 311–14 435–6, 23, 33–7, 207–8, 219–36, memory protection 260–1, 444–56 376–81, 491–4, 502, 275–8, 281–3, 287–8, MEventHandler::OfferRaw- 767–79, 809–10, 825–6, 293–4, 297–8, 782–3 Event 435–6, 444–56 835–50 model software layer 190–2, microcontrollers 795–7 LCDs 10, 20–3, 30–1, 34, 252–3, 262–73 concepts 795–7 37–9, 475, 479, 487, moving memory model 8, 12, functions 796–7 496–8, 550–62, 727, 829 57–8, 101–12, 191–2, 253, microphones 795–7 manufacturers 8–9, 20, 333–5, 274–87, 294, 309–10, miniboot program 383–5, 384, 833 421–2, 625, 651, 782–8 747–50 personal aspects 315–16 multiple memory model 8, 12, minimal states, client-server ITC platform security 112, 154–60, 106–12, 191–2, 253, 139–43 178–9, 315–31 287–96, 309–10, 426, 625, minimal window, uses 339 power management 17–19, 650–1 MkDir 341 23, 30, 41–2, 90–1, 376, platform software layer 190, MM, GSM layer 807 586–7, 589–94, 659–736, 252–3, 262–73 MMC see MultiMediaCard 744–5, 751–62 programmer APIs 298–310 MMF see multimedia framework quality determinants 18 896 INDEX mobile phones (continued) scheduling 101–12 concepts 8, 12, 106–12, RAM 29–31, 251–4 thread request complete 286–7 191–2, 253, 287–96, remote access 375–6 virtual/physical addresses 309–10, 426, 625, 650–1 SoC 19–43 275–87 design issues 291–4, 309–10 timers 4, 6, 9, 13–15, 35–6, MP3 playback, audio 40 hardware 287–96 41–2, 195–205, 230, MPowerInput 693, 707 memory protection 287–8, 783–4, 829–32 MSaveObserver 754–62 293–4 traffic mode 793–5, 804–7 MSFS.FSY 606 process context switch 295 two-chip solution 17–29 MsgQFunc 529, 533–43 synonyms 288–91 mobile SDRAM, concepts 30 MShutdownEventObserver thread request complete 295–6 model software layer 753–62 virtual/physical addresses see also M class multi-level resources 693 287–96 concepts 12–13, 187, 190–5, multi-tasking aspects, Symbian OS multiple sessions, client-server ITC 252–3, 262–73 3–4, 13–15 117–44 functions 12–13, 190–2 multi-threaded design, file server multiple timers 36 see also memory model 190–2, 252–3, 350–8 timers 262–73 multi-threaded pre-emptible kernel, mutexes 5–7, 56–8, 72–88, see modem baseband processor design solutions 13–15, 95–9, 100–12, 113–15, mode svc 149–50, 165–73, 176–7, 50 491–4, 613–14, 780–8 185–9, 201, 230, 235–6, modular design, Symbian OS multilevel page directories, 3–5, 14 240–1, 312, 413–19, 528, concepts 254–62, 279–87, monitoring 673–8, 744–5, 776–9, 288–94, 742 batteries 696–701 781–8, 823, 838–50 multimedia 5–6, 13–15, 17–20, environmental factors 701–4 see also mutual exclusion; 37–40, 334–5, 574–89 motion estimation units 246–7 priority... accelerators 19–20, 42 see also coprocessor... concepts 5–7, 56–8, 72–88, audio 39–40 mounted drives, file systems 95–9, 109, 113–15, design goals 5–6, 13–15 335–9, 341, 347–67, 574–9, 149–50, 170–3, 185–9, RAM requirements 29–30 586–7, 611–12 201, 230, 235–6, 240–1, MountFileSystem 341 multimedia framework (MMF), 413–19, 528, 744–5, mouse 431–74, 495–8 concepts 40 776–9, 781–8, 838–50 move events, pointer events MultiMediaCard (MMC) 9, conditional variables 85–8 431–4, 438–74 334–5, 337, 488, 574–602 deadlocks 80–1 MoveToActive 716 bus configuration 600 definition 7, 777, 846 MoveToRetention 718 classes 594–600 design goals 5–7, 785 moving memory model concepts 594–602 fast mutexes 56–8, 77–8, 81, address spaces 275–87, definition 594–5 98, 100–12, 149–50, 421–2, 651 error recovery 600 165–73, 176–7, 188–9, algorithms 283–7 overview 594–5 230, 235–6, 240–1, 312, concepts 8, 12, 57–8, 101–12, power management 601–2 528, 781–8, 823, 838–50 191–2, 253, 274–87, 294, signals 594–602 IDFC 84 309–10, 421–2, 625, 651, software controller 595–600 kill operations 83–8 782–8 types 594–5 performance issues 846–50 design issues 280–7, 294, multiple memory model priorities 80–8, 776–9, 781–8 309–10, 782–8 address spaces 287–96, 426, processes 95–7, 113–15, hardware 274–8 650–1 170–1 optimizations 282–7 algorithms 294–5 resets 85–8 protection 275–8, 281–3, ASIDs 288–9, 292–5 restrictions 782 782–3 complexities 290–1 resume operations 83–8 INDEX 897

RTOS 776–9, 838–50 caches 377–81 nanokernel timers 6, 188, suspend operations 83–8 characteristics 377–81 195–203, 230, 780–8 threads 56–8, 72–88, 98, composite file system 384–5 see also NTimer; timers 100–12, 149–50, 165–73, concepts 20–2, 30, 31–3, 334, cancellation 196–201, 230, 176–7, 185–6, 188–9, 230, 337–9, 364–5, 375–81, 781–8 235–6, 240–1, 312, 413, 574–89, 611–12, 737–64 concepts 195–201, 780–8 416, 418–19, 528, 781–8, errors 32–3 control blocks 198–201, 838–50 FAT translation layer 31, 337, 780–8, 800–7 tick timers 201 375–81 expiry 197–201 mutual exclusion NOR contrasts 378 queues 195–201, 230, 780–8 see also mutexes RAM-shadowing scheme start functions 198–201, concepts 55–6, 775–88, 381–4, 747–50 780–8 809–10, 836–9, 841–50 ROFS 382–5, 576–9, 747–50 states 197–201, 780–8 nanothreads 55–6, 780–8, NANDFTL.FXT 336–9, 385 nanothreads 46–93, 98, 841–50 nandloader 384–5 173–206, 219–36, 527–8, priority inversion 777–9, NANDLOADER.EXE 384–5 544, 638, 780–8, 810–23 780–8, 836–9, 841–50 NanoBlock 811–21 see also threads RTOS 775–88, 809–10, nanokernel blocks 49–62, 70, 544 836–9, 841–50 see also NKern concepts 46–93, 98, 188–95, unbounded priority inversion APIs 188–9 219–36, 780–8, 810–23 scenario 777–9, 836–9, concepts 4–16, 46–93, 98, creation 50–5, 60–2 841–50 108–12, 161, 173–206, critical sections 55–8 mykext.cpp 492–4 219–36, 252–3, 527–8, death 55, 56, 59, 623–5 mykext.dll 492–4 638, 780–8, 810–23 emulator 59–62 MyRescheduleCallback concrete classes 189 exits 49–58, 61–2, 110–12 636–7 CPU software layers 12–13, fast mutexes 56–8, 80–1, 98, 192–5, 252–3 176–7, 188–9, 230, 528, design solutions 14, 613–14, 781–8, 823, 838–50 N-state, nanothreads 72, 811–21 780–8 lifecycle 54–5 names 163–4, 166–73, 329, dispatcher 173–7, 179–81, mutual exclusion 55–6, 344–5, 375, 389–90, 396–8, 183, 185, 193, 195, 219–24 780–8, 841–50 421–2 dynamic memory 7, 840–2 N-state 72, 811–21 DLL name string 389–90 exceptions 6, 188–9, 193–4, personality layers 55, 59, executables 329, 389–90, 219–49, 780–8 71–2, 181–3, 231, 810–23, 394–8, 421–2 interrupts 6, 188–9, 193–4, 835–50 files 344–5, 375, 389–90, 219–36, 780–8 states 49–55, 60–2, 811–21 396–8, 421–2 limitations 7, 62 suspension 49–62 IPCv2 319 memory allocations 62 waiting 49–55, 57–8, 78–88, kernel objects 163–4, 166–73, personality layers 4, 8–9, 55, 98, 811–21 421–2 59, 71–2, 74–5, 181–3, ncthrd.cpp 637–8 LDD/PDD factory objects 231, 807–23, 835–50 never-execute bit, ARM v6 505–6 read-modify-write APIs 189–90 319–20 objects 163–4, 166–73, 319, roles 4–16, 780–1 new 299–306 421–2 scheduling responsibilities 98, NewChunk 174–7, 264 parsing classes 340–1, 344–5, 108–12, 780–8 NewCodeSeg 263–73 352–4 separation solution 14 NewL 445–56 NAND flash memory threads 46–93, 173–206, NewProcess 263–73 boot processes 30, 32, 383–5, 219–36, 527–8, 544, 638, NewSessionL 120–6 737–64 780–8, 810–23 NextObject 507–8 898 INDEX

NFastMutex 6, 81, 104–12, see also interrupts NThreadBaseOperation 189, 528, 847 concepts 208 811–21 see also fast mutexes non-volatile registers, scheduling NThreadBase::Release NFastSemaphore 6, 149–50, 100–12 812–21 189, 528 nonnative programming systems NThreadBase::Resume NKern 6, 50–5, 65–6, 188, 301 812–21 252–3, 527–43, 546–8, see also Java NThreadBase::SetPriority 811–21 NOR flash memory 812–21 see also nanokernel concepts 30, 31–2, 334, NThreadBase::Suspend nkern.h 188 364–5, 367–75, 377–81, 812–21 NKern::CurrentContext 737–64, 849–50 NThread::Create 52–4, 60–2 NThread::EDead 814–21 deletions 32 61–2, 74 NThread::ESuspended NKern::Exit 54 NAND contrasts 378 60–2 NThread::Idle NKern::FMSignal 188, 528 RAM requirements 30 112 NThread::ModifyCar 248–9 NKern::FMWait 188, 528 reliability 32 NKern::FSSignal NThread::ModifyFpExc 528 normal chunks, concepts 264–70 NKern::FSWait 528, 532–43 NormalizeExecutableFile- 248–9 NKern::InsertScheduler- NThread::SetUserContext- Name 190, 263–73 Hooks Type 647–52 634–7 notification schemes 77–8, 91–2, NKern::Lock 816–21 NThread::StartThread 144, 341, 362–4, 379–80, NKern::LockSystem 535–43 60–2 581, 587, 625–37, 754–62 NKern::NanoBlock 811–21 NThreadState, concepts 54–5 see also change notification NKern::RescheduleCall- NThread::TUserContextType notifiers, file server 341, 362–4, back 636–7 638 379–80 NKern::SchedulerHooks NTickCount 202–5 NotifyChange 341, 363–4, 634–7 NTimer 6, 188, 195–203, 695, NKern::SetRescheduleCall- 581 741 NotifyDiskSpace 341 back 636–7 see also nanokernel timers NotifyPowerDown 588–9 NKern::Sleep 6 concepts 195–203 NotifyWakeupEvent NKern::ThreadCreate 50–5, 684 requirements 195–6 NO WAIT 65–6 816–21 NTimerQ 695 NKern::ThreadEnterCS NThread Nucleus 9, 808–10 546–8 ARM version 47–9 NULL 57–8, 69, 82, 85, 96, 99, NKern::ThreadGetUser- concepts 46–93, 100–12, 105, 131–43, 166, 171–3, Context 637–8 149–50, 188–9, 231, 234–5, 247, 268, 294, 303, NKern::ThreadLeaveCS 248–9 359, 389, 459, 532–3, 634–7 571–4, 640, 812–21 key members 49–50, 59–60 null thread NKern::ThreadSetUser- NThreadBase concepts 13–15, 90–1, 112, Context 637–8 concepts 46–54, 59–60, 178, 196, 744–5, 835–50 NKern::UnLockSystem 811–21 purposes 90–1, 196, 744–5 535–43 key members 49–50 nk priv.h 46 NThreadBase::Check- NMI line 219 SuspendThenReady obey file, ROM 338–9 non-client registered events, 813–21 object code see compiled code window server 433–5, NThreadBase::Create 52–4 object containers 162, 167–73 753–4 NThreadBase::ENumNState see also DObjectCon non-current thread memory, 815–21 concepts 171–3 debuggers 650–1 NThreadBase::ForceResume object indexes non-maskable interrupts 812–21 see also DObjectIx INDEX 899

concepts 162, 167–73 OpenSharedChunk 567–74 P class 190, 262–73 finding objects 169–71 operating systems see also platform software protection mechanisms see also Symbian OS layer 170–1 basic concepts 3–4, 253–4, packet data, BP 19 objects 262, 476–7 page directories, concepts 25–6, see also handles boot processes 737–47 254–62, 275–87, 288–94, allocators 299–306 concepts 1–16, 45–115, 742 concepts 2–3, 7–8, 13–15, 252–4, 262, 737–47, page faults, concepts 209, 113–14, 120–6, 161–73, 762–4, 767–823 242–9, 261–2 299–306, 312–13, 341–3, definition 3 page tables, MMU 25–6, 28, 353–4, 456–62, 479–80, embedded OSs 253–4 105–12, 254–62, 275–87, 626–37 PCs 2, 262, 311, 315–17 288–91, 565–6, 740–2 containers 162, 167–73 RTOS 2–7, 9, 14–15, 19, 46, pages, memory 25–6, 28, deletions 13–15, 165–73 50, 71–5, 181–3, 228–9, 105–12, 254–62, 275–87, finding objects 169–71, 344, 231, 283–6, 318, 767–823, 288–94, 301–9, 313–14, 506–8 825–6, 835–50 565–6, 740–2 kernel objects 162–73, shutdown 535–43, 737, PageSizeInBytes 191–2, 479–80, 513, 625–37, 750–62 263–73 operator delete 300–6 644–52 Panic 626–37, 642 operator new 251–2, 300–6 names 163–4, 166–73, 319, panics 6, 68, 89–90, 157–8, see also free-store allocators 421–2 241, 273, 347, 401, 450–6, OPL see Open Programming reference-counted objects 7–8, 533–4, 548, 619–20, 626–37 Language 113–14, 162–73, 415–16, parents, windows tree 458–66 optimizations 418–19 Parker, Jason 17–43 see also performance... short names 166–73 Parse 341 efficient code 826–50 sub-session objects 341–6 ParseMask 522–48 moving memory model 282–7 transient objects 312–13 parsing classes 340–1, 344–5, selection factors 830–1 windows 456–62 ordered queue, nanokernel timers 352–4 oby files 478–9, 488 195–201, 780–8 Partial Array Self Refresh (PASR) off mode 662, 664, 666–8, 670, ordered state, nanokernel timers 30 676–8, 710, 757–62 197–201, 780–8 partition tables, concepts 335, off-screen bitmaps (OSBs) 470 ordinal-position property, windows 384 OfferRawEvent 435–6, 462–6 PartitionInfo 588–9 444–56 ordinal-priority property, windows PartitionInfoComplete 589 OMAP chips, Texas Instruments 462–6 partitions 20, 24, 829–31, 846–7 OSBs see off-screen bitmaps see also volumes On-The-Go (OTG) 602–4 OSE 808, 810 concepts 335, 360, 384, 834–6 OneShot 198–201 OTG see On-The-Go tasks 834–6 OOM see Out of Memory Out of Memory (OOM) errors PASR see Partial Array Self Refresh Open 165–73, 404–6, 487, 311–14, 434 passwords 433 503–17, 545–8, output, debuggers 184, 623–5, paths 327–30, 340–6, 396–8, 569–74 652–6 410–12 open but resource-constrained overflows, stack 46, 320 see also directories environments, EKA2 4, overwritten memory, process file names 344–5 253–62, 327, 779–88, memory context 319–20 PC Cards 530, 578–9, 589–94 797–807 ownership PCH, GSM protocol 789–807 Open Programming Language kernel objects 164–73 PCM see pulse code modulated (OPL) 1, 440 power handlers 674–5 data 900 INDEX

PCs 2, 262, 311, 315–17, 327, peripheral software layers 11–13, RTOS 4, 9, 71–2, 74–5, 616–25, 739 187–95, 252–3 181–3, 228–9, 231, see also emulator peripherals 667–8, 673–6, 807–23, 835–50 PDAs 1–3 679–80, 699, 702–8, 722–7, threads 55, 59, 71–2, 74–5, see also Psion 731–3 181–3, 228–9, 231, PDD 481–4 see also local media 807–23, 835–50 PddConfigure 539–43 sub-systems PETRAN pre-processing tool 387 PDDs see physical device drivers AP 19–29, 826–31 Philips Nexperia PNX4008 24 PddStart 539–43 bus controllers 589–94 physical caches see also caches PE files see Portable Executable concepts 3, 4, 5–7, 10, 12–13, concepts 27–8, 251–3, 262, files 14–15, 19–29, 33–7, 308, 275–87, 288–91 pens, window server 431–74 549–612, 740–2 physical device drivers (PDDs) perceptions, users 660 device drivers 3, 4, 5–6, 10, see also device drivers; local performance 1–2, 17, 18, 23, 308, 549–612 26–8, 41–2, 253, 262, media sub-systems; media... DMA 36–7, 549–62, 568–74, advanced factory concepts 282–3, 785–8, 825–50 839–40, 844–50 see also 515–17 efficiency...; power... FIFO buffers 552, 796–7 alignment issues 832–3 automatic searches 514–17 interrupts 5–7, 12–13, 14–15, caches 26–8, 253, 262, 830–4 classes overview 499–502 23, 33–7, 207–8, 219–36, concepts 785–8, 825–50 concepts 4, 10, 95, 325–6, 296, 376–81, 491–4, 502, 336–9, 477–9, 498–548, CPU requirements 23, 262, 767–79, 809–10, 825–6, 552–62, 574–600, 631 826–31 835–50 creation 498–548, 631 design issues 833–50 local media sub-systems debuggers 631, 641–3 DMA problems 839–40, 574–89 definition 478, 513 844–50 media drivers 574–89 EKA1/EKA2 contrasts 544–8 efficient code 5, 826–50 MMC support 594–602 loading 503–48, 631 EKA1/EKA2 comparisons 825, PSL 552–62, 596–601 naming conventions 505–6 842–3 QoS APIs 732–3 PDD factory 513–17, 544–8 emulator 849–50 roles 478–9, 513–17 fast mutexes 847–50 shared chunks 562–74 USB support 602–12 user-specified PDD 514–17 hardware considerations physical memory 21–6, 251–62, 826–50 permanent processes/threads, death 89–90, 623–5 275–87, 830–2 improvement techniques see also caches; Memory permissions, platform security 825–50 Management Unit; Random 155, 317–31, 409, 487, 498, key measures 785–8 Access Memory 522–4 latency 785–8, 826–50 concepts 21–6, 251, 254–62, personal aspects, mobile phones lock-free algorithms 836–9, 275–87, 740–2, 830–2 315–16 847 virtual/physical addresses memory 829, 833–4, 848–9 personal information management 254–62, 275–91, 297–8, mutexes 846–50 (PIM) 8–9, 14 307, 740–2 pragmatism 833 personality layers physical memory maps 21–6, priority inversion 836–9, concepts 4, 8–9, 55, 59, 71–2, 251, 254–62, 272, 275–87, 841–50 74–5, 181–3, 231, 807–23, 293–4 real-time performance 834–50 835–50 PIC see Programmable Interrupt RHeap 306, 840–2, 848–9 design goals 8–9, 807–23 Controller silicon chips 826–31 nanothreads 55, 59, 71–2, PIL see platform-independent layer tasks 774–5, 780–8, 825–50 181–3, 231, 810–23, PIM see personal information testing 826–50 835–50 management INDEX 901 pixels user-mode memory access ports, EKA1 2–3 efficient code 829 318–19, 484–7, 515–17 POSIX-style condition variables LCDs 29–30, 37–9, 829 window server 473–4 85–8, 339–40 planning platform software layer post-mortem analysis tools, see also tasks see also P class concepts 623–5 operating-system functions 3–4 concepts 12–13, 187, 190–5, postamble phase platform.h 191, 564, 640 252–3, 262–73 exceptions 239–49 platform security 112, 154–60, executable images 12–13, 190 interrupts 220, 223–5 178–9, 315–31, 345–6, 396, functions 12–13, 190–5, PostKeyEvent 453–6 473–4, 484–7, 498, 515–17, 252–3 PostRawEvent 453–6 522–4, 611–12 memory model 190, 252–3, Power 669–70, 673, 677, applications 318 262–73 755–62 capability-model concepts 317, platform-independent layer (PIL) power controller 664–5, 668–9, 320–6, 473–4, 487, 492, see also extensions 673, 675–6, 682–4, 692 498, 515–17, 522–4, concepts 4, 479–87, 500–48, power handlers 665, 667–8, 580–1 552–62, 596–601, 607–12 673–7, 699–700, 705, client-server 324–6, 473–4 platform-specific layer (PSL) 711–14, 719–20 concepts 315–31, 345–6, 396, 675–8 power loss events 722–3 see also power management (PM) 17–19, 473–4, 487, 492, 498, extensions 23, 30, 41–2, 90–1, 334–5, 515–17, 522–4, 580–1, concepts 4, 479–87, 500–48, 552–62, 579, 596–601, 376–81, 495–8, 586–7, 611–12 607–12 589–94, 601–2, 659–736, constraints 316 plug-in DLLs 336–9, 364–5, 429, 744–5, 751–62 data-caging concepts 317, 442–56, 499, 504–8 see also performance... 327–30, 345–6 see also dynamically loaded advanced management debuggers 618–20 libraries; polymorphic... 727–36 device drivers 320–6, 484–7, plug-ins, file server 336–46, batteries 17–18, 30, 40, 41–2, 515–17, 522–4 364–5 334–5, 376, 586–7, DLL loading 321–4 PM see power management 659–736, 795–7, 828 executables 320–30 P::NewProcess 263–73 classes 665–736 file access 327–30, 409–10, pointer events CPU requirements 23 611–12 animation DLLs 450–2 DMA 37, 549–50 file server 317, 327–30, window server 431–4, 438–74 domain manager 666–8, 677, 611–12 pointers 751, 756–62 goals 316–17 handles 163, 166–7 framework 663–88 implementation 328–30 invalid pointers 241–2, 319, idle time 723–7 kernel 318–31 326 MMC 601–2 loader 321–4, 329–30, 396, LFFS 369–75 model overview 665–76 611 PollingWait 539–43, 694 named power modes 41 PC contrasts 315–17 polymorphic DLLs 335–9, 362, null thread 13–15, 90–1, permissions 155, 317–31, 409, 365–7, 499, 504–8 744–5 487, 498, 522–4 see also dynamically loaded PASR/TCSR uses 30 program SIDs 328–30, 420–2 libraries; plug-in... power states 757–62 removable media 329–30, 611 POP instruction, X86 architecture shutdown 751–62 shared files 330–1, 345–6 215–19, 238–41 states 661–70, 675–8, 680–2, static data 320, 321–4 portability goals, EKA2 5–6, 689, 694–6, 702–10, TCB 317–30, 345–6 252–3, 480, 779 716–18, 723–9, 731–3, TCE 317, 318, 324–6, 329 Portable Executable files (PE) 757–62 unit-of-trust concepts 316–20 96–7, 387, 390–3, 409–10 timers 35–6, 90–1, 586–7 902 INDEX power management (PM) concepts 770–9, 811–21, RTOS 770–823, 825–6, (continued) 825–6 834–50 typical management 688–723 disabling 776–9, 811–21, 823, spectrum 835–6 power manager 664, 667–73, 836–9, 842–50 static priority-based scheduling 677–8, 719–21 interrupts 226, 234–6, 491–4, 771–4, 780–8 power removal, rugged FAT file 770–9, 825–6, 835–50 threads 47, 53–8, 64–6, system 376–81 problems 771 69–70, 74–6, 78–88, power sources 734 RTOS 770–9, 835–50 90–7, 98–112, 197–201, power states 757–62 pre-emptively multitasking OS, 224, 529–30, 780–8, power-aware device drivers EKA2 4, 7, 13–15, 46, 55–6, 810–23, 825–6, 834–50 707–22 61–2, 98–112, 779–88, priority ceiling protocol power-saving mode, BP 19 797–807, 811–21, 825–6, see also mutexes Power::CancelWakeupEvent- 835–50 concepts 778–9 Notification 761–2 pre-processing handler 176–7, priority inheritance Power::DisableWakeup- 185, 526 see also mutexes Events 761–4 preamble phase concepts 4, 58, 69, 76, 78–88, PowerDown 670, 672–3, 677–8, exceptions 236–49 778–9, 781–8 680–1, 706, 709–10, interrupts 220–36 definition 778 719–20 predictability requirements, RTOS threads 58, 69, 76, 78–88, PowerDownDfc 720 774–5, 780–8 781–8 PowerDownDone 674, 677, PrepareForSwitchOff priority-based multitasking OS, 679–80 435–74 EKA2 4–7, 13–15, 47, Power::EnableWakeupEvents PreprocessHandler 176–7 53–8, 64–6, 69–70, 74–6, 677, 760–2 Print 516–17, 627, 631 78–88, 90–7, 98–112, PowerHalFunction 671, printf 184 197–201, 529–30, 779–88, 685–8, 701 prints, debuggers 184, 623–5, 797–807, 810–23, 825–6 PowerHal::PowerHal- 652–6 privacy 315–31 Function 701 PRINTSTK 625 see also platform security powering up/down 679–81, 716, PRINTSYM 624–5 private 719–21 priorities 4–7, 13–15, 47, 53–8, directory 327–30 PowerMgmt 473–4, 759–62 64–88, 90–112, 197–201, privilege levels, X86 CPU software PowerModel 669, 671 529–30, 770–823, 825–50 layer 215–19 Power::PowerDown 677, applications 4–7, 13–15, 210, process memory context, concepts 755–62 810–23, 825–6, 834–50 259–62, 274–9, 283–6, Power::RequestWakeup- concepts 4, 58, 69, 76, 78–88, 292–6, 319 EventNotification 677, 770–823, 825–6, 834–50 ProcessCreate 420–2, 627–8 760–2 EKA2 4–7, 13–15, 47, 53–8, processes PowerUp 678–80, 709–10, 64–6, 69–70, 74–6, see also boot processes; 719 78–88, 90–7, 98–112, DProcess; threads PowerUpDfc 721 197–201, 529–30, 779–88, address spaces 93, 102–15, PowerUpDone 674, 678–9, 680 797–807, 810–23, 825–6, 252–62, 275–91 PPP connections 225–31 834–50 ASIDs 28, 288–9, 292–5 pragmatism, performance issues inversion 777–9, 780–8, attributes 96 833 836–9, 841–50 capability-model concepts pre-emption lock 4, 7, 13–15, mutexes 80–8, 776–9 320–6 46, 55–6, 61–2, 98–112, mutual exclusion 55–6, client-server ITC 117–44, 177 226, 234–6, 249, 311–12, 775–88, 836–9, 841–50 code 94–7, 114–15, 252–3, 491–4, 770–88, 811–21, pre-emption lock 770–9, 257–62, 626–7, 638–9, 825–6, 835–50 825–6, 835–50 643–52 INDEX 903

concepts 7–8, 13–16, 28, 45, project files PUSH instruction, X86 architecture 65–6, 89–90, 92–115, see also MMP files 215–19, 238–41 167–73, 252–3, 271–2, concepts 320–6, 328–30, PXT files 336–9 275–92, 320–6, 330–1, 442–3, 480, 492–4, 393–427, 430–5, 626–37, 625 744–5, 810–21 properties Q: drive 576 creation 93–7, 113–15, see also publish and subscribe QoS see quality of service 320–6, 393–427, 626–31, system quality, services 731–3 744–5 concepts 150–60 quality determinants, mobile definition 45, 93, 271–2 deletions 155–60 DLLs 95–7, 112–15, 129, phones 18 handles 156–7 quality of service (QoS) APIs 284–7, 294, 297–8, 320–6 inter-thread communications emulator 96–7, 183 732–3 150–60 QueryVersionSupported EXE files 96–7, 113–15, 156, key attributes 154–60 270–1, 297–8, 320–6, 511–17, 523–4 operations 155–60 Queue 558–62, 754–62 333 real-time issues 160, 767–9 queues exits 93–7 windows 462–6 cleanup queues 70, 75–7, file server 340–6 protocol messages, debuggers 82–8, 109, 835–50 handlers 95–7, 100–15, 617–25 client-server ITC 117–44, 119–44, 176–7, 185, ProtServ capability 130 430–5 526 PSemaphore 815–21 DFC queues 92, 529–43, interrupts 206, 207–49 Psion 1–3, 117 585–6, 745, 787–8, 822–3, limitations 252–3, 840–2 historical background 1–3, 845–50 loader 93, 112–15, 321–4, 117 FIFO order 34–5, 37, 98, 329–30, 382–3, 393–427, Organisers 1–3, 117 129–43, 196, 225–31, 626–31, 638–9 Series 5 2, 117 233–6, 351–8, 552–62, mutexes 95–7, 113–15, PSL see platform-specific layer 796–7 170–1, 785 message queues 8, 34–5, 37, over-riding heap creation 66 PSR 237–8 87–8, 98, 118–60, 300–1, priorities 93–7 PSU state 590–4 PThread 531–43, 809–10 search rules 396–8, 402–6, 814–21 PThreadState nanokernel timers 195–201, 419–22 815–21 230, 780–8 shared object-handles 93–7, publish operation, properties scheduling 34–5, 37, 98–112, 330–1 155–60 129–43, 196, 225–31, thread connections 93–4, publish and subscribe system 8, 233–6, 780–8, 822–3, 167–73, 271–2 92, 150–60, 309–10, 330, 845–50 unit-of-trust concepts 316–20 744–5, 758 window server 430–1, 440–74 window server 430–5 see also inter-thread QVGA display 30–1, 38 processing-message state, state communications; properties machine 134–9 concepts 150–60, 309–10, program counter register 54, 208 330, 744–5, 758 program SIDs, platform security key entities 152–3 R: drive 576 328–30, 420–2 operations 155–60 RACH, GSM protocol 789–807 Programmable Interrupt Controller real-time issues 160 RaiseException 626–37, (PIC) 33–5 shared memory 309 642 programmed exceptions, concepts pulse code modulated data (PCM) RAllocator 66, 184, 303–5 210–19 39 concepts 303–5 programmer APIs, memory model ‘pulse swallowing’, tick timers key members 303–4 298–310 201–2 RAM see Random Access Memory 904 INDEX

RAM-shadowing scheme, NAND concepts 477–9, 510–48, real time 2–7, 9, 14–15, 19, 46, flash memory 381–4, 579–89, 618 50, 71–5, 160, 181–3, 747–50 definition 518–19, 544–6 228–9, 231, 283–6, 318, 671, Random Access Memory (RAM) EKA1/EKA2 contrasts 544–8, 680, 765–823, 825, 834–50 9, 13, 19–33, 56, 64–6, 92, 618 code-writing techniques 115, 220–36, 251–87, request gateway function 834–50 298–310, 334–5, 351–2, 523–6 concepts 160, 671, 680, 364–5, 392–3, 400–12, 477, RCA see Relative Card Address 765–823, 825, 834–50 642, 735–6, 738–64, 831–4 RCall::Dial 324–6 definition 765–6, 825 boot processes 738–64 RChangeNotifier 91–2, 313 examples 765–74 capacity 29–30, 253–4, 284, RChunk 174–7, 308, 562–74, hard/soft distinctions 766–7 834 626–7 performance issues 834–50 concepts 29–33, 251–62, see also chunks properties 160, 765–823 298–310, 334–5, 351–2, RChunk::Base 174–7, 569–74 real time clock (RTC) 671, 680 364–5, 392–3, 400–12, RChunk::Create 626–7 real-time operating systems (RTOS) 477, 738–64, 831–4 RCondVar 86–8 basic features 809–10 contiguous RAM 298–310, RCondVar::Wait 87–8 challenges 767–823 553, 560–2, 565–6, RCriticalSection 110–12, concepts 2–7, 9, 14–15, 19, 569–74, 610–12 312 46, 50, 71–5, 181–3, DDR RAM 834 .rdata section 388–93, 639 228–9, 231, 283–6, 318, 767–823, 835–50 DRAM 20–9, 30, 788, 832–4 RDebug 516–17, 627 definition 767 flash memory 334, 381–4 RDebug::Print 516–17, 627, design solutions 14–15, low-power modes 41 631, 652–6 779–88, 797–807 non-XIP executables 392–3, RDebug::RawPrint 653–6 dynamic priority-based 400–1, 406–13, 424–5 RDevUsbClient 605–12 scheduling 772–4 performance issues 831–4 RDir 341–3, 349–64, 404–6 EKA2 4–7, 318, 779–88, requirements 29–30, 254 RDir::Open 404–6 797–807, 810–23, 825–6 SDRAM 30, 681, 695, 701, RDir::Read 404–6 GSM example application RDmDomain 760–2 725–6, 734–6, 787–8, 834 788–807 RDmDomainManager 759–62 tag RAM (caches) 831–2 IDFCs 228–9, 231, 813–21, RDriver1 virtual/physical addresses 520–48 835–50 Read 254–62, 275–91, 297–8, 503–8, 519–48, 580–2 latencies and performance 740–2 Read Only File System (ROFS) 31, 785–8 RAnim 445–56 365, 381–5, 576–9, 747–50 mutual exclusion 775–88, RAnim::Construct 445–56 concepts 31, 365, 381–5, 809–10, 836–9, 841–50 RAnimDll::Load 442–56 747–50 personality layers 4, 9, 71–2, RArray 95–7, 517 core OS image 381–2 74–5, 181–3, 228–9, 231, Ratcliffe, Mitch 613 image 382–3 807–23, 835–50 rate monotonic scheduling, NAND flash memory 382–3, predictability requirements concepts 771–2 576–9, 747–50 774–5, 780–8 RawPrint 653 read-modify-write APIs, priorities 779–823, 825–6, RawRead 273, 650 independent software layer 834–50 RawWrite 273, 650 189–90 priority ceiling protocol 778–9 RBackedupWindow 461, ReadCancel 519–48 priority inheritance 778–9, 467–71 ReadDesHeader 273 781–8 RBlankWindow 461, 465–6 ReadUserData 320–6 properties required 160, RBusLogicalChannel 477–9, ready list, scheduling 98–112, 767–79 500–48, 579–89, 618 230, 780–8 requirements 767–79, 809–10 INDEX 905

scheduling methods 767–823, X86 architecture 215–36, requestor privilege level (RPL), X86 835–50 238–49 CPU software layer 216–19 static priority-based scheduling RegisterUserActivity 671 requests 771–4, 780–8 relational databases, DBMS 330 clients 715–16 realloc 300–6 Relative Card Address (RCA) file server 350–62, 364–86 RealView compiler, ARM 601–2 loader 402–27 architecture 387, 621–3 Release 693, 707, 812–21 RequestSystemTransition Receive 532–43 relocated/relocatable code, 760–4 ReceiveData 520 concepts 257–62, 270–1, RequestUserHandle 132–43 ReceiveDataCancel 520 390–3, 400–1, 407–10, RequestWakeupEvent- reclaimed media space, LFFS 626–7 Notification 670, 672, 372–5 remote access, mobile phones 677, 760–2 RectDrawnTo 452–6 375–6 reschedule needed flag 227–31 recursion 106 remote debuggers RescheduleCallback 636–7 redirect user trace, debuggers see also debuggers reschedules 99–112 see also 652–8 concepts 614–15, 617–25 scheduling Redraw 444–56 removable media reserving, virtual addresses redraw events, window server 4, see also media drivers 254–62 Reset 431, 440–74 bus controllers 589–94 302–5 redraw windows, drawing caches 377–81 reset vector, concepts 738–9 468–71 resets, concepts 85–8, 91–2, concepts 329–30, 334–5, ReduceSize 580–1 208–9, 210–19, 738–42 360–2, 364–5, 375–81, reference-counted objects resource directory 327–30 392–3, 574–89, 611–12 concepts 7–8, 113–14, resource management 689–94 device types 334, 360–2, 375 162–73, 415–16, 418–19 ResponseP 600 FAT file system 375–81, DLLs 113–14, 415–16, Restart 472 611–12 418–19 RestoreIrqs 543 file server 334–5, 360–2, references, property handles Resume 812–21 364–5, 375–81 156–7 resume operations, mutexes 83–8 ‘reflashed’ memory, concepts 739 notification schemes 380–1, ResumeWaitingThread 820–1 refreshing 30, 681, 695, 725–7, 581 retention mode 662, 689, 694–6, 734–6 platform security 329–30, 611 702–6, 718, 724–6 regions, windows 465–6 power removal 376–81 retrieve operation, properties Remove Register 676, 697 674 155–60 RegisterCpuIdleCallback RemoveHalEntry 496–8 RFastLock 838–9 714 RemoveHandler 673–4 RFile 128–9, 341–6, 349–64 RegisterInterruptHandlers RemoveSchedulerHooks RFile::AdoptFromClient 492–4 636–7 346 registers 12–13, 35–6, 53–5, rendezvous notifications, threads RFile::AdoptFromCreator 100–12, 180–206, 212–15, 77–8, 144 346 219–49, 256–62, 295, 775–9 Renesas SuperH 287 RFile::AdoptFromServer ARM architecture 212–15, Request 519–48, 588–9 346 220–36, 237–49, 256–62, request gateway function, device RFile::Create 349–64 775–9 drivers 523–6, 542–3 RFile::Read 366–7 exceptions 212–15, 219–24, RequestAllocator 353–4 RFile::Replace 353–4 236–49 RequestComplete 129, 240, RFile::TransferToClient program counter register 54, 273, 286–7, 296 345–6 208 RequestEvent 430, 493–4 RFile::TransferToProcess scheduling 100–12, 775–9 RequestOffEvents 474 345–6 906 INDEX

RFile::TransferToServer RLoader 393–427 MMC 594–602 (continued) see also loader shadow APIs 639–40 RFile::TransferToServer RLoader::Connect 403–6 ROM drive/image (Z:) 345–6 RLoader::LoadLibrary see also flash... RFormat 341–3, 349–64 410–12 access 337, 351–2 RFs 340–64, 761–2 RLoader::LoadProcess concepts 31, 333–9, 351–2, see also file server 403–6 384–5, 392–3, 396–7, RFs::AddFileSystem 366–7, RLocalDrive 579–89 402–6, 488, 611–12, 393–427 RMessage2 132–43, 319–20, 639–40, 746–7 RFs::Close 356–8 325–6, 347–64 file server 337–9, 364, 384–5, RFs::Connect 340–64 RMessageK 70, 132–43, 177 611–12 RFs::ControlIo 367 RMessageKBase 139–43 format 335, 392–3 RFs::DebugNotify 367 RMessagePtr2 123–6, 137–9, loader 339, 392–3, 396–7, RFs::Drive 352–8 242, 273, 319, 353–8, 363 402–6, 746–7 RFs::FinaliseDrives 376, RMessagePtr2::Complete obey file 338–9 761–2 137–9, 353–8 startup 338–9, 384–5, 579 RMessagePtr2::Read RFs::MkDir 365–6 242 ROMBUILD tool 392–3, 657–8 RMessagePtr2::ReadL RFs::MountFileSystem root windows, tree concepts 366–7 319–20 457–61 RFs::NotifyChange RMessagePtr2::Write 242 352–8 ”rootnames”, ASCII 398–400 RFs::NotifyChangeCancel RMessageU2 133–43 rotating media devices 334 RMsgQueue, concepts 146, 363–4 round-robin scheduling 101–12, RFs::Rename 353–4, 366–7 783–4 231, 809–10 RFs::SetNotifyUser 381 RMsgQueueBase 146 RoundToPageSize 560–2, RFs::SetSessionPath 352–8 RMutex 84–8, 838–9 565–6, 571–2 RHandleBase 150–60, 161–2, RMutex::Count 85 RPhysicalDeviceArray 517 167–73, 518–48, 566–7 RMyDevice 573–4 RPL see requestor privilege level RHandleBase::Close 156–7, RNotifier 381 RProcess, concepts 94–7, 393, 167–73 robust designs 2–3, 5–6, 396–8, 627–8, 642 RHandWritingAnim 455–6 117–18, 260–2, 274, 281–3, RProcess::Create 393–427, RHeap 298–310, 840–2, 848–9 319–20 see also free-store allocators ROFS see Read Only File System 627–8 RProcess::Panic concepts 298, 305–6, 840–2, Rogers, Andrew 117–60 642 RProperty 848–9 roll-forward metadata updates, 150–60 RProperty::Attach performance 306, 840–2, LFFS 374 156–7 848–9 ROM 4, 10, 21–33, 115, 252–3, RProperty::Cancel 158–60 usage models 305–6 258–71, 284–7, 292–4, RProperty::Define 155–60 RHeap::ReAlloc 302–5 309–10, 320, 333–5, 351–2, RProperty::Delete 156–60 RImageFinder 401–6 364–5, 383, 392–3, 400–1, RProperty::Get 157–8 ring tones 40 406–27, 477, 488, 504–8, RProperty::KMaxProperty- rings see privilege levels 594–602, 639–40, 642, Size 154–60 RISC-based CPUs 23–5, 215 737–64 RPropertyRef 151–60 RLdrReq 401–6 debuggers 639–42 RProperty::Set 157–8 RLibrary 112–15, 271, 323–4, execute in place ROM (XIP RProperty::Subscribe 393–427, 627, 641–3 ROM) 31–2, 115, 158–60 RLibrary::Init 411–12 258–62, 265–71, 292–4, RR 807, 832 RLibrary::Load 323–4, 309–10, 320, 364–5, 383, RRawDisk 341–3, 349–64 393–427, 627 392–3, 400–1, 406–27, RSemaphore 79–80, 783–4 RLibrary::Lookup 641–3 477, 488, 504–8, 737–64 RServer2 121–43, 319–20 INDEX 907

RSessionBase 122–9, 144, RWsSprite 443–56 multiple memory model 342–3, 393, 473–4 RX, GSM protocol 797–807 106–12 see also client-server... mutual exclusion 55–6, RSessionBase::Create- 775–88, 809–10, 836–9, Session 122–6, 129 SACCH, GSM protocol 790–807 841–50 Safe... 528 RSessionBase::Send 473–4 nanokernel 98, 108–12, Sales, Jane 1–16, 45–115, RSessionBase::SendReceive 780–8 117–60, 161–206, 825 140–3, 473–4 pre-emption lock 100–12, 226, SaveL 755–62 RSimpleSerialChannel 234–6, 249, 311–12, ScanDrive 341, 376, 380–1 503–8, 519–48 491–4, 770–9, 811–21, scatter-graph DMA engines, RSubSessionBase 126–9, concepts 37, 550–62 825–6, 835–50 144, 342–3 SCH, GSM protocol 789–807 priority ceiling protocol 778–9 RTC count 202 ScheduleKernelCleanup 508 priority inheritance 778–9, see RTC real time clock SchedulerHooks 634–7 781–8 RThread 63–6, 108–9, 129, scheduling 46–7, 98–112, queues 34–5, 37, 98–112, 144, 319–20, 626–37 224–31, 260, 283–6, 129–43, 196, 225–31, RThread::Create 63–6, 479–80, 613–58, 740–2, 233–6, 780–8, 822–3, 628–9 767–823, 835–50 845–50 RThread::Panic 642 assumptions 774 rate monotonic scheduling RThread::RaiseException concepts 98–112, 224–31, 771–2 626–37, 642 260, 283–6, 479–80, ready list 98–112, 230, 780–8 RThread::ReadL 319–20 767–823, 835–50 registers 100–12, 775–9 RThread::RequestComplete control block 98–112, 780–8, reschedule needed flag 129 800–7 227–31 RThread::SetPriority cyclic scheduling 767–74, round-robin scheduling 108–9 779–80 101–12, 231, 809–10 RTimer::After 783 deadline monotonic scheduling RTOS 767–823, 835–50 RTimer::At 783 771–2 static priority-based scheduling RTOS see real-time operating deadline-driven scheduling 771–4, 780–8 systems 772–4 Symbian OS threads 108–9, rugged FAT version 376–81 dynamic priority-based 822–3 Run mode, power management scheduling 772–4 tasks 767–823 EDF scheduling 772–4, 41–2 types 767–79 779–80 run-mode debuggers Scobie, Peter 333–86, 387–427, emulator 109–12, 613–58 see also debuggers 549–612 FIFO order 34–5, 37, 98, concepts 615–20, 623–4 SCpInfo... 247–8 129–43, 196, 225–31, RunError 536–43 SCreateThread 60–2 233–6, 351–8, 552–62, RunL 120–6, 347–64 796–7 screen modes, client windows RunThread 65–6 IDFCs 99–106, 110–12, 464–5 RWindow 461–6 227–31, 233–8, 813–21, screens 3, 11, 17–18, 37–9, RWindowBase 443–56, 835–50 429–74, 495–8 458–62, 465–72 interrupts interactions 224–31, see also displays; liquid crystal RWindowGroup 458–66 233–6, 767–79, 809–10, displays RWindowTreeNode 461–2, 825–6, 835–50 common resolutions 38 467–72 LRTA/Symbian OS direct screen access 471–2 RWsSession 435–74 communication 822–3 flickers 452, 470 RWsSession::PrepareFor- moving memory model touch-screens 9, 42, 475 SwitchOff 435–74 101–12 window server 3, 11, 429–74 908 INDEX

SCSI Primary Commands (SPC) threads 49, 54, 72–5, 78–88, Set 154–60, 234–6, 665, 606–12 149–50, 167, 185–6, 686–7, 762 SD see Secure Digital card 188–9, 230, 354–5, 528, SetBackgroundColor 460–2 SDblQue 531–43 809–10, 813–21, 847–8 SetBaudRateDivisor 540–3 SDCCH, GSM protocol 790–807 SemaphoreTable 815–21 SetColor 467 SDIO devices 530, 578–9, semiconductor devices SetConfig 503–8, 520–48 595–600, 703–4 ASSP 9–10 SetCurrentConsumption SDK 125–6 concepts 9, 17–29 674 SDmaDesHdr 553–62 Send 137–9, 473–4, 532–43 SetDfcQ 234–6, 491–4, SDmaPseudoDes 555–62 SendData 520 529–43 SDObjectIxRec 168–73 SendDataCancel 520 SetDrawData 456 SDRAM 30, 681, 695, 701, SendEatenDownEvent 453–6 SetFaded 467 725–6, 734–6, 787–8, 834 SendEventToWindowGroup SetFunction 236 SetHandle Seal, Dave 274 474 566–7 SetHomeTime searches SendReceive 140–3, 473–4, 671 SetLCR device drivers 506–8, 514–17 532–43 540–3 SetPriority executables 394–400, 402–6, serial communications devices 812–21 SetReturnedHandle 410–12, 419–22 478, 503–48, 616 510–17, 566–7, 572–4 processes 396–8, 402–6, Serial Peripheral Interface (SPI) SetShape 465–6 419–22 594–602 second timers SetSize 465–6 Series 60 phones, screen sizes see also TSecondLink SetSizeErr 465–6 38–9 concepts 204–5, 745 SetStatus 480–1 server-side classes, file server sectors, concepts 334–5, 375–81 SetSubst 341 347–64 Secure Digital card (SD) 334, SetSuperPageSignature servers 3–11, 31–3, 117–44, 574–600 190, 263–73 317–31, 333–86, 429–74, secure hash, executables 329–30 SetupCacheFlushPtr 191–2, 737, 751–62, 835–50 secure identifiers (SIDs), programs 263–73 see also file...; window... 156, 328–30, 420–2 SetUpCIM... 599–600 security attribute, properties entity client-server ITC 117–44, SetUserContextType 647–52 154–60 335–46 shadow APIs, ROM 639–40 segments comms server 118 shadow area, client windows LFFS 371–5 concepts 3, 117–44, 319–26, 466 X86 CPU software layer 347–64, 429–74, 731, shadowing scheme, NAND 215–19 751–62 RAM-shadowing scheme SelectUart 539–43 domain manager 751, 756–62 381–4, 747–50 self-clocking circuits 41 shutdown server 737, 751–62 Share 129, 139 self-refreshing, SDRAM 681, 695, socket server 118 ShareAuto 129, 139 725–6, 734–6 telephony server 118 shared chunks semaphore count 816–21 types 3, 117–18, 429, 731, see also DChunk semaphores 751–62 concepts 160, 173–7, 184–7, concepts 5–7, 49, 54, 72–5, service quality 731–3 264–73, 292–4, 298–310, 78–88, 99, 149–50, 167, ServiceL 123–6, 347–64 562–74, 822–3 185–6, 188–9, 230, 354–5, session-attached state, state creation 562–4, 570–4 528, 776–9, 809–10, machine 130–43 definition 160, 562 813–21, 847–8 sessions destruction 564–5, 570–4 definition 7, 847 client-server ITC 117–44 device drivers 308–9, 562–74, operation types 78–9 delivery and message pool 822–3 RTOS 776–9, 813–21, 847 management 134–46 examples 568–74 INDEX 909

inter-thread communications sleep and wakeup events see also real time 160, 173–7, 184–7, 762–4 concepts 766–7 264–73, 292–4, 298–310, startup contrasts 750–1 software 1–16, 23–5, 33–4, 562–74, 822–3 Shutdown 535–43, 720 91–2, 100–12, 173–249, kernel-side code access siblings, windows tree 458–66 298–310, 320–30, 333, 337 566–74 SIDs see secure identifiers see also applications; memory commitment 565–6 Signal 86–8, 817–21 executables; operating peripherals 562–74 signal operations, threads 79, systems; source code user-side code access 566–74, 86–8 alignment issues 832–3 822–3 signaling stacks 5–6, 8–9, 14, assembler code 12–13, 192–3, shared files, platform security 46–54, 779, 788–807 219–24, 826–7, 849 330–1, 345–6 see also CDMA...; GSM... C++ 221, 223, 240, 298–310, shared I/O buffers design goals 5–6, 8–9, 14, 411–13, 427, 482–4, 623, deprecation 307, 562 779, 788–807 652–3, 739–40, 743, 849 inter-thread communications signals caches 26–8, 253, 262, 830–4 160, 298, 307–10, MMC 594–602 562–74 debuggers breakpoints 243, USB 602–3 615, 620, 641–52 shared memory 160, 173–7, silent running mode 41, 762–4 184–7, 264–73, 292–4, DMA framework 552–62 silicon chips 17–43, 826–31 efficiency issues 5, 826–50 298, 306–10, 562–74, see also application processor; 777–9 emulator 3, 5–6, 8, 14, 15–16, baseband processor shared power resources 706–7 17, 849–50 manufacturers 20, 23–5, ‘shared session’ concept, encryption software 337, 788, 826–31 client-server ITC 118–44 792–807 performance issues 826–31 shared-library DLLs, device drivers exceptions 6, 12–13, 23, RAM 29–31 480–7 33–4, 91–2, 100–12, SoC 19–43 SharedMultilevelResource 173–206, 207–49, 626–37 two-chip solution 17–29 693 general/special cases 828 silicon physics 728 ShareProtected 129, 139 layering concepts 11–13, 43, shift key 436 SIM cards 17–18, 793, 795–7 SimulateRawEvent 187–95, 252–314 shim DLL files 394 474 single-core phones 14 limitations 840–2 short names, objects 166–73 malicious code 5–6, 128–30, shutdown 431–74, 535–43, single-user aspects, Symbian OS 3 254–5, 260–2, 274, 281–3, 676–8, 720, 722–3, 737, 326, 330 750–62 SizeChangedL 445–56 MMC controller 595–600 architectures 751–62 sleep state 6, 41, 54–5, 762–4 performance issues 1–2, 5, 17, backups 751 slow exec calls 175–7, 179–87 18, 23, 26–8, 41–2, 253, concepts 535–43, 722–3, 737, see also executive... 262, 282–3, 785–8, 750–62 slow executive table 181–3 definition 750–1 SLOW EXEC4 525–6 825–50 domain manager 751, 756–62 smart LCD displays 38–9 programmer APIs 298–310 file server 751–62 SMS, GSM protocol 807 real-time performance 834–50 FOMA 751 SNThreadCreateInfo 50–5 small-request penalties 828–9 initiating parties 752 concepts 50–5 testing 826–50 notification issues 754–62 key members 51–2 third-party suppliers 8–9, power 751–62 SNThreadHandlers 51–2, 72 253–4, 274 scenarios 751 SoC see System-on-Chip tight loops 826–8 sequence 755–6, 760–2 socket server (ESOCK) 118 ‘unrolling the loop’ techniques server 737, 751–62 soft real time 827–8 910 INDEX software exception instructions, sprite anims, concepts 443–56 threads 49–55, 60–2, 64–6, executive (exec) calls sproperty.cpp 153 70–5, 85–90, 113–15, 173–206 sproperty.h 151 130–43, 147–50, 418–19, software installer see loader SStdEpocThreadCreateInfo 450–6, 531–43, 651–2, software interrupts (SWIs) 64–5 811–21 173–86, 206, 207–49, stabilization periods 694 static data 320, 321–4, 480–1, 809–10, 825–6 stack 5–6, 8–9, 14, 19, 46–93, 490–4, 740 concepts 173–86, 206, 101–12, 178, 319 static priority-based scheduling, 207–49, 809–10, 825–6 see also telephony stack concepts 771–4, 780–8 EKA2 186, 219–36, 779–88, overflows 46, 320 statically-linked DLLs 321–4, 797–807, 825–6 threads 46–93, 101–12, 178, 409–10 uses 206 319 STDLIB 339–46 solid state removable media stack pointers 101–12, 208–9, SThreadCreateInfo 63–6 devices 334 215–19, 241–2 concepts 63–6 Sony Ericsson P900 316 standby mode 662, 666–8, 670, key members 64 sound driver, device drivers 479 676–8, 680–1, 710, Stichbury, Jo 118, 120 Stop sound see audio 757–64 543 SOURCE 321, 492 Start 122–6, 539–43 stop-mode debuggers see also source code start functions, nanokernel timers debuggers concepts 620–3, 643–52 see also code; software 198–201, 780–8 STORE 340–6 ASCII preferences 166 StartExtensions 190, streamed data, BP 19 assembler code 12–13, 192–3, 263–73 STREX 836–9 219–24, 826–7, 849 StartL 471–2 strings see descriptor classes badly-written code 5, 826–34 StartOfInterrupt 111–12 Strong, Jasmine 825–50 C++ 221, 223, 240, 298–310, StartThread 54, 65–6 structs, alignment issues 832–3 411–13, 427, 482–4, 623, startup 338–9, 384–5, 429–30, sub-sessions 126–9, 144, 341–6 652–3, 739–40, 743, 476–80, 578–9, 737–64 classes 341–3 849 see also boot...; ESTART... client-server ITC 126–9, alternative startup scenarios C 1, 298–310 345–6 efficiency issues 5, 826–50 383–5, 747–50 file server 341–6 general/special cases 828 definition 750–1 Subscribe 154–60 malicious code 5–6, 128–30, F32 system architecture 338–9, subscribe operation, properties 254–5, 260–2, 274, 281–3, 384–5, 579 155–60 326, 330 shutdown contrasts 750–1 subscribe properties 8, 92, performance issues 5, 825–50 stages overview 737–45, 150–60 small-request penalties 828–9 747–50 see also publish... tight loops 826–8 timeline overview 740–5 substitute drives 341 source-level debuggers state machines 708–9 Supercaps 722, 734 see also debuggers client-server ITC 130–9 superpage, bootstrapping 742 concepts 15–16, 620, 624 PPP connections 225–31 supervisory thread SOURCEPATH 321 StateHandler 811–21 boot processes 10, 91–3, SPC see SCSI Primary Commands states 479–80, 737–64 speakers 17–18, 40 nanothreads 49–55, 60–2, concepts 10, 13–15, 23, 45–6, see also audio 811–21 91–3, 166, 173–83, special cases, efficient code 828 power states 661–70, 675–8, 211–15, 272–3, 292–4, SPI see Serial Peripheral Interface 680–2, 689, 694–6, 309–10, 409–10, 479–80, SPlatDmaDesc 553–62 702–10, 716–18, 723–9, 485–7, 737–64 spreadsheets 3 731–3, 757–62 deletions 91–2, 166 INDEX 911

DFCs 91–2, 99, 160 design solutions 13–15, 57, threads 3, 6–8, 10, 11, 13–15, executive (exec) calls 117–20, 252–3, 271, 62–93, 108–9, 147–50, 173–206, 485–7 280–7, 290–4, 315–31, 615–59, 822–3 purposes 91–3 350–8, 613–14, 779–807, tick timers 201–5, 745 SWIs 173–86, 206, 207–49, 850 timers 199–205, 783–4 809–10, 825–6 emulator 3–8, 14–17, 47–9, USB 603–12 Suspend 56, 643, 812–21 59–62, 109–12, 183, v5 442, 452 SuspendWaitingThread 190–2, 249, 252–3, 297–8, v6.0 118 820–1 309–10, 338, 431, 490, v7.0 144, 438, 469 suspension 495–8, 613–58, 749–50, v8.0 470–1 v8.1 435 mutexes 83–8 849–50 v9 117, 429, 657 threads 49–62, 73–5, 80–8, EPOC kernel 1–3 v9.1 657 171–3 free-store allocators 301–5, SvHeap Symbian OS C++ for Mobile 309–10 742–5, 848–9 Phones (Harrison) 340 SVR mode, CPU 742 kernel architecture 4, 6–13, SvStack Symbian OS Explained 309–10 23, 187–95, 251–3, 783–8, SwEvent (Stichbury) 118 473–4 825–6 SWIs see software interrupts synchronization objects LRTA communication 821–3 see also switches mutexes; semaphores modular design 3–5, 14 context switch times 7–8, concepts 5–8, 46, 49, 56–8, multi-tasking aspects 3–4, 14–15, 57–8, 102–12, 72–5, 78–88, 100–12, 13–15 709–10, 776–9, 780–8, 274–9, 283–6, 293–6, 312, open but resource-constrained 809–23 340–6, 634–8, 774–5, environments 4, 253–62, threads 46, 49, 56–8, 72–5, 782–8 327, 779–88, 797–807 78–88, 780–8, 809–23 threads 46–9, 56–8, 99–112, overview 3–4, 333–9, 476–7, synchronous messages, sending 782–8 850 methods 137–50 Switchoff 432, 677–8, 688, platform security 112, 154–60, synchronous operations 344, 752–62 178–9, 315–31, 484–7, 351–8, 501–2, 527–8, SwitchThreads 111–12 515–17, 522–4 536–43, 544–8 Symbian OS SyncMemory... 561–2 see also EKA2...; mobile porting options 381–2 power management 17–19, synonyms 276–8, 288–91 phones; operating systems; sys 23, 30, 41–2, 90–1, 334–5, directory 327–30, 396–400 threads SYSSTART.EXE 376–81, 495–8, 586–7, 339 basic concepts 3–16, 189–90, system alarms, second timers 589–94, 601–2, 661–736, 192–5, 333–9, 381–4, 204–5, 745 744–5, 751–62 387–93, 476–7, system calls see programmed priority-based multitasking 821–3 exceptions 4–7, 13–15, 47, 53–8, boot processes 737–64 system clock 35–6, 190 concepts 3–16, 45–115, 64–6, 69–70, 74–6, system directory 396–400 161–206, 333–9, 381–4, 78–88, 90–7, 98–112, system lock, concepts 7–8, 387–93, 850 779–88, 797–807, 810–23, 100–12, 130–9, 151–60, design goals 4–6, 13–16, 57, 825–6 176–7, 179–81, 184–7, 230, 117–20, 252–3, 271, RAM requirements 29, 254 535, 652, 783–8, 825–6 280–7, 290–4, 315–31, real-time aspects 4–7, 318, system memory management 350–8, 613–14, 779–807, 779–88, 797–807 251–3, 313–14, 810 850 shutdown 535–43, 737, system resets 85–8, 91–2, design limitations 14–15, 750–62 208–9, 210–19, 738–42 834–5, 840–2 single-user aspects 3 system starter 740–8 912 INDEX system startup 338–9, 384–5, operating-system functions TDisplayHalFunction 495, 429–30, 476–80, 578–9, 3–4, 765–823 496–8 737–64 partitioning considerations TDisplayMode 464–6 system ticks 695–6 834–6 TDmac 553–62 system transition, concepts performance issues 774–5, TDmaChannel 553–62 757–62 780–8, 825–50 TDmaDbChannel 553–62 system-critical processes/threads priority inheritance 778–9, TDmaSbChannel 553–62 90 781–8 TDmaSgChannel 553–62 System-on-Chip (SoC) 19–43 real time 765–823 TDrive 359–62, 380–1, see also application processor; scheduling 767–823 399–400, 404–6, 574–89, Application-specific... switch times 774–5, 782–8 745–6 system-permanent TBusLocalDrive 336–9, 380, TDriveCacheHeader 399–400 processes/threads 90 574–89, 611–12 TDrive::DirOpen 404–6 system-wide power transitions see also local media TDrive::MkDir 365–6 664–5, 667–8 sub-system TDrive::Rename 366–7 SYSTEMINCLUDE 321, 492 concepts 574–89, 611–12 telephony audio SystemShutdown 760–2 definition 579–80 see also audio SystemTimeChanged 671 derivation 579–80 concepts 39–40 TCapability 487 telephony server (ETEL) 118, 318, see T16550UartIfc::K16550IER TCB Trusted Computing Base 324–6 TCE see Trusted Computing telephony stack 541–3 see also T16550UartIfc::K16550LCR Environment baseband processor; TCH, GSM protocol 790–807 CDMA...; GSM... 540–3 TChangeQue concepts 19, 46, 788–807, tag RAM 363–4 TChannelCreateInfo see also caches 509–17 810–23 TChunkAttribute concepts 831–2 267–70 design goals 5–6, 8–9, 14, TChunkCreateInfo TAllocFail 303–5 563–74 779, 788–807 TChunkType Tannenbaum, Andrew 549 265–70 temperature 701 TARGET 321, 492–4 TClientInterface 491–4 Temperature Compensated Self target agents, debuggers 640–3 TCodeSegCreateInfo 401–6, Refresh (TCSR) 30 TARGETTYPE 321, 480–1, 423–7 templated classes 146 492–4 TCommConfigV01 536–43 TERCET.EXE 257–62 TArmContextElement 647–52 TCompiledSecurityPolicy TerminateThread 61–2 TArmExcInfo 244–6, 627 154–60 testing 826–50 TArmRegisters 647–52 TControl 519–48 TEventCode 752–62 task gates, X86 exceptions TCP/IP connections 619 Texas Instruments 20, 24, 218–19 TCpOperation 246–9 829–31 task state segment (TSS) 217–19 TCritical 89–90 TExcTrap handlers 239–44 Tasker, Martin 1–16 TCSR see Temperature .text section 388–93, 639 tasks Compensated Self Refresh text shells, F32 system architecture see also planning TDes base class 124–6 339, 507–8 deadlines 765–823, 834–50 TDesC base class 124–6, 442–3, TFileCacheRecord 399–400 execution times 774–5, 509–17, 529–30 TFileName 344–5 780–8, 825–50 TDfc 189, 233–6, 744–5 TFindFile 344 interrupts 767–79, 835–50 TDfcQue 582–7 TFindHandleBase 506–8 multi-tasking aspects 3–4, TDfc::SetDfcQ 236 TFindLogicalDevice 506–8, 13–15 TDirectoryCacheHeader 516–17 mutual exclusion 55–6, 399–400 TFindPhysicalDevice 775–88, 836–9, 841–50 TDiskSpaceQue 363–4 506–8, 517 INDEX 913

TFullName 507–8 blocks 49–62, 70, 76, 80, handlers 51–66, 68–72, THalFunc 497–8 98–112, 351–8, 544, 88–90, 100–12, 119–44, THalFunctionGroup:: 186–7 780–8, 822–3 176–7, 185, 526 THandAnimArgUnion 449–56 cleanup queues 70, 75–7, heaps 66, 298–310, 319 TheCompleteDataSection- 82–8, 109, 835–50 inter-thread communications Process 286–92 client-server ITC 117–44, 177, 117–60, 173–206, 286–7, TheCurrentDataSection- 324–6 298–310, 324–6, 335–9, Process 286–92 concepts 6–8, 13–15, 45–93, 473–4, 744–5, 822–3 TheCurrentProcess 286–92 117–60, 260, 271–2, 319, lifecycle 54–5, 72–5 TheCurrentVMProcess 402–27, 501–2, 615–59, logons 70, 77–8, 88–90 286–92 809–23 M-state 72–5 TheScheduler.iReschedule- conditional variables 85–8 multi-threaded pre-emptible NeededFlag 99–103 creation 50–5, 60–6, 93–7, kernel 13–15, 491–4 third-party suppliers 8–9, 253–4, 626–31 mutexes 56–8, 72–88, 98, 274 critical sections 55–8, 78, 100–12, 149–50, 165–73, Thoelke, Andrew 251, 737–64 102–12, 160, 312, 631–7 176–7, 185–6, 188–9, 230, THotKey 437–40 death 55, 56, 59, 74, 88–90, 235–6, 240–1, 312, 413, ‘thrashing’ 312 623–5 416, 418–19, 528, 781–8, Thread Local Storage (TLS) 310 definition 45 838–50 mutual exclusion 55–6, thread-relative threads 167, 625 device drivers 13–15, 69–70, 780–8, 836–9, 841–50 thread-safe message queues 76, 92, 147–50, 285–7, N-state 72, 811–21 87–8, 300–1 475–548 nanokernel 46–93, 173–206, ThreadCreate 62–6 DFCs 13–15, 54–5, 59, 89, 219–36, 527–8, 544, 638, ThreadDesRead 189–90, 273, 91–2, 99, 160, 165–6, 780–8, 810–23 486–7 227–31, 233–6, 491–4, nanokernel threads 46–93, ThreadDesWrite 189–90, 522–8, 529–43, 585–6, 173–206, 230, 527–8, 544, 486–7, 537–43 787–8, 806–10, 835–50 638, 780–8, 810–23, ThreadEnterCS 546–8 diverted threads 60–2 835–50 ThreadGetDes... 486–7 emulator 59–62, 109–12, 183, operating-system functions 3, ThreadGetUserContext 297–8, 615–59 6–8, 10, 13–15 637–8 EUSER library 11, 140–3, over-riding heap creation 66 ThreadKill 538–43 174–8, 183–7 personality layers 55, 59, ThreadLeaveCS 571–4, 640, exception handling 50–5, 71–2, 74–5, 181–3, 812–21 62–6, 69–70, 100–12, 228–9, 231, 807–23, ThreadRawRead 189–90, 273, 173–206, 207–49 835–50 486–7, 538–43 execute-calls tables 50–5, priorities 47, 53–8, 64–6, ThreadRawWrite 189–90, 175–83 69–70, 74–6, 78–88, 486–7 exits 49–58, 61–6, 68–70, 90–7, 98–112, 197–201, threads 3, 6–15, 45–93, 98–112, 74–8, 83–5, 88–90, 93–7, 224, 529–30, 780–8, 117–73, 260, 271–2, 286–7, 110–12, 312 810–23, 825–6, 834–50 319, 430–7, 475–548, fast mutexes 56–8, 77–8, priority inheritance 58, 69, 76, 615–59, 709–10, 780–8, 80–1, 98, 100–12, 149–50, 78–88, 781–8 809–23 165–73, 176–7, 188–9, ready list 98–112, 230, 780–8 see also kernel threads; 230, 235–6, 240–1, 312, rendezvous notifications 77–8, nanothreads; processes 528, 781–8, 823, 838–50 144, 581 asynchronous message queues file server 338–9, 347, 350–8, request complete 129, 240, 145–6, 150–60, 531–43 361–2, 579 273, 286–7, 295–6 914 INDEX threads (continued) Tick 188 TLocalDrvRequest 582–7 semaphores 49, 54, 72–5, tick count 196–201 TLogon::LogonLock 77–8 78–88, 149–50, 167, tick timers, Symbian OS 201–5, TLS see Thread Local Storage 185–6, 188–9, 230, 354–5, 745 TMachineConfig 189–90 528, 809–10, 813–21, tight loops, code 826–8 TMessageBase 147–50, 847–8 time-slicing needs, threads 71–2, 528–48 stack 46–93, 101–12, 178, 98, 780–8 concepts 147–50 319 TIMED OUT 816–21 key members 147–50 states 49–55, 60–2, 64–6, timeouts 49–55, 766, 816–21 TMessageBase::EAccepted 70–5, 85–90, 113–15, timer management functions, RTOS 149–50 130–43, 147–50, 418–19, 810 TMessageBase::EDelivered 450–6, 531–43, 651–2, timer threads, concepts 13–15, 149–50 811–21 49–55, 92, 99–102, 835 TMessageBase::EFree supervisory thread 10, 13–15, timer tick 184, 188, 195–201 149–50 23, 45–6, 91–3, 166, TimerCallBack 717 TMessageQue 148–50, 173–206, 211–15, 272–3, timers 4, 6, 9, 13–15, 35–6, 500–48, 582–7 292–4, 309, 479–80, 41–2, 49–55, 90–2, 98–112, concepts 148–50, 531–43 485–7, 737–64 188–9, 195–205, 230, 442, key members 148–50 TMessageQue::MsgLock suspension 49–62, 73–5, 448, 474, 745, 780–8, 795–7, 810, 829–32 149–50 80–8, 171–3 see also nanokernel...; TMMCCard 597–600 switches 46–9, 56–8, 99–112, Symbian OS... TMmcCardArray 597–600 782–8 cancellation 196–201 TMMCStackConfig 597–600 Symbian OS 3, 6–8, 10, 11, concepts 13–15, 35–6, 41–2, TModuleMemoryInfo 639 13–15, 62–93, 108–9, 188–9, 195–205, 230, 442, TOffsetTableEntry 645–52 147–50, 615–59, 822–3 448, 745, 781–8, 795–7, TOnoffInfoV1 688 synchronization objects 46, 49, 810, 829–32 tools 56–8, 72–5, 78–88, debuggers 36, 655–8 debuggers 613–58 780–8, 809–23 expiry 197–201, 810 emulator 3, 5–6, 8, 14, 15–17, system-critical threads 90 kernel services 195–205, 47–9, 59–62, 109–12, 183, time-slicing needs 71–2, 98, 479–80, 745, 783–4 190–2, 249, 252–3, 297–8, 780–8 multiple timers 36 309–10, 431, 613–58, timeouts 49–55, 766, 816–21 power management 35–6, 749–50, 849–50 timer threads 13–15, 49–55, 90–1, 586–7, 659–736 top-client windows, tree concepts 92, 99–102, 835 second timers 204–5, 745 457–61 types 71–2, 89–93, 319 states 197–201 TOperation 347–64 user-mode threads 7–8, 11, 46, tick timers 201–5, 745 TOperation::DoRequestL 62–93, 108–9, 118–29, TInfoFunction 513–17 348–64 160, 161–206, 260–2, TIpcArgs 124–6 TOperation::Initialise 281–3, 402–27, 501–2 TKernelEvent 627–31 348–64 waiting 50–5, 57–8, 70, 73–5, TKernelHalFunction 495–8 TOperation::IsSync 356 78–88, 98, 102–12, TKeyData 437–40 touch-screens 9, 42, 475 130–43, 811–21 TLBs see Translation Look-aside see also pointers window server 430–74 Buffers TParse 344–5, 353–4 ThreadSetUserContext TLdrInfo 401–6 TParseBase 340, 344–5 637–8 TLibraryFunction TParsePtr 344–5 throughput, memory 833–4 LibraryLookup 185 TParsePtrC 344–5 THUMB instruction set, ARM v5TE TlinearSection 421–2 TPartitionEntry 583–7 24–5, 28, 31, 650, 826, 830 TLocalDrv 582–7 TPartitionInfo 582–7 INDEX 915

TPathListRecord 399–400 TRescheduleCallback 636–7 TUsbc... 607–12 TPBusCallBack 590–4 TRgb 467 TUserContextType 638, 647 TPckgBuf 456, 516–17 Trojan horse attacks 329 TVariantHalFunction 495–8 TPlatDmac 553–62 TRomHeader 488, 655–6 TVer 519–48 TPlatMMCStack 597–600 TRomImageHeader 392–3, TVersion 510–48 TPlatSgChannel 553–62 401–6, 413–27, 481–4, TWalkWindow... 460–2 TWalkWindowTreeBase TPowerHalFunction 495, 861–3 460–2 two-chip solution, mobile phones 496–8 trust levels, unit-of-trust concepts 17–29 TPowerState 666 316–20 TWsEvent 441–2 TPriListLink 46–50, 811–21 Trusted Computing Base (TCB), concepts 317–30, 345–6 TX, GSM protocol 797–807 TProcessCreateInfo 401–6 TXXXPowerController- TProperty Trusted Computing Environment 153–60 Interface 682–3, 692, (TCE), concepts 317, 318, concepts 153–60 699 324–6, 329 TPropertyInfo 151–60 type attribute, properties entity TSaveType 755–62 TPropertySubsRequest 154–60 TScheduler::Reschedule 151–60 TPtrC8 537–43 61–2, 110–12 TSecondLink trace channel, kernel 652–8 204–5 u32exec.h 175 see also traffic mode, concepts 793–5, second timers u32property.h 151 TSecondQ 91, 204 u32std.h 804–7 89 TSecurityPolicy 155–60 transferring state, nanokernel timers UARTs 9, 225–31, 233–6, TSpriteMember 452–6 478–9, 655, 797 197–201, 780–8 TSS see task state segment uc exe.cia 65–6 transient objects 312–13 TSuperPage 189–90 UDC see USB Device Controller TranslateKey 437–40 TSupplyInfoV1 700 UID3 328 Translation Look-aside Buffers TSupplyStatus 697–8 UID 321 (TLBs), concepts 25–6, TTBR0 295–6 UIDs see unique identifiers 257–62, 275–95 TTBR see Translation Table Base UIQ phones, screen sizes 38–9 Translation Table Base Register Register umem... 485–7 (TTBR) 256–62, 275, TThreadCleanup 75–6, 82–8 unattached state, state machine 287–96 TThreadMessage 147–50, 130–43 see also page tables 531–43 unbounded priority inversion TRAP scenario 777–9, 836–9, , concepts 311–13 TThreadMutexCleanup 76 trap gates, X86 exceptions TThreadMutexCleanupItem 841–50 undefined instructions, traps 218–19 76 209–10, 240–9 traps TThreadPriority 108–9 Unicode text 154, 166, 398–400, see also exceptions TThreadState 73–5 826 concepts 173, 209–19, TThreadType 71 unique identifiers (UIDs) 377–81, 236–49, 311–14 TTickLink 200–5 389–90, 396–404, 410–12, invalid pointers 241–2 concepts 200–5 416–17, 420–2, 424–7 TRawEvent 431–74, 752–62 fields 202–3 volumes 361 TRawEvent::TType 431–74 TTickQ unit-of-trust concepts, platform TRegion 465–6 concepts 201–5 security 316–20 TRequest 519–48 fields 203–4 Unix 3 TRequestStatus 231, 273, TTickQ::iInTick 201 Unlock 62, 78 430, 493–4, 502–48, 570–4, TTickQ::Mutex 201 UnlockSystem 535–43 677, 763–4, 787–8 TUint... 175–7, 184–7, ‘unrolling the loop’ techniques, see also active objects 482–4, 502, 528, 558–74 tight loops 827–8 916 INDEX unsubscribe operation, properties platform security 318–19, User::LoadLogicalDevice (continued) 484–7, 515–17 393–427, 503–8, 627 unsubscribe operation, properties user-mode threads User::LoadPhysicalDevice 155–60 concepts 7–8, 11, 46, 62–93, 503–8 unused pages, memory 108–9, 118–29, 160, 161, User::Panic 626–37 management 313–14 173–206, 260–2, 281–7, User::RaiseException 642 UpdateSprite 451–6 298–310, 320–6, 393–4, User::RequestEvent 430, ups and downs, key events 402–27, 501–2, 562, 493–4 431–42 808–23 user::SetHomeTime 671 UserSvr usage count 693, 706 executive calls 161, 173–206, 409–10, 432, 493–4, USB Device Controller (UDC) 419–20, 485–7, 501–2 671, 687, 752–62 UserSvr:CaptureEventHook 604–12 failures 311–14 493–4 USB (Universal Serial Bus) 9, 10, file server 11 UserSvr::ExecuteInSuper- 20–1, 42, 219–20, 307, kernel services 161, 173–206, visorMode 409–10 375–6, 478, 490–4, 513, 320–6 UserSvr::SetMemory- 550–62, 602–12, 840 latency reduction 846 alternative interfaces 608–12 Thresholds 313 loader 402–27 classes 603–12 UserSvr::WsSwitchOnScreen LRTA 808–23 client controller 607–10 432 SWIs 173–86, 206 composite devices 602–12 User::SwitchAllocator 305 user-side access concepts 602–12, 840 User::TickCount 202–5 device drivers 484–7, 502–8, configuration 603–7 User::WaitForRequest 517–48 endpoints 603–4 132–43, 273, 503–8, media devices 579–82, 588–9, LDDs 607–12 541–3 611–12 mass storage file system RTOS 822–3 611–12 shared chunks 566–74, 822–3 overview 602–4 Validate shared I/O buffers 562 513–17 performance issues 840 ValidateName 509–17 user-side architecture 118–29, signals 602–3 VAR 481–4 160, 161–206, 241, 476–548, software architecture 604–7 Variant 481, 488, 492–4, 625, 752–62 USBCC.DLL 605–12 669, 682, 691–2 user-side exception handlers 241 Use 693, 707 variant extensions user-side interfaces 669–70 User 132–43, 202–5, 273, see also Asic; EVAR.LIB User::CaptureEventHook 303–5, 503–48 concepts 12–13, 194–5, 429–30 user.h 175 231–6, 479–87, 552–62, USER$CODE user input, window server 3, 11 310 577–9, 654–6, User::DebugMask user interfaces (UIs) 660–1 657–8 738–64 User::FreeLogicalDevice user perceptions 660 hardware 4, 9–10, 12–13, user process memory, device 508 187, 194–5, 231–6, 337–9, drivers 484–7, 502–8 User::FreePhysicalDevice 479–87, 552–62, 654–6, user-data storage, flash memory 508 738–64 334, 367–75, 377–85, UserHal::SwitchOff 432, variant.mmh 492–4, 625 392 677–8, 688, 752–62 variant-specific idle 681–2 user-initiated shutdown UserHeap 65–6, 304–5 variant-specific power controller 676–8 UserHeap::SetupThreadHeap 664 user-mode free store, RHeap 65–6 VariantHal 496 305–6 USERINCLUDE 321 VariantInitialise 490 user-mode memory access User::Leave 303–5 variantmediadef.h 577–9 device drivers 484–7 User::LeaveIfError 454–6 VariantTarget 492–4 INDEX 917 vector addresses, exceptions volumes client-registered events 434–5, 213–15, 217–36 see also partitions 752–62 vectors.cia 176 clusters 375 command buffer 473–4 version numbers, executables concepts 335, 340–1, 360–1, concepts 3, 4, 6, 11, 339, 394–6, 398–400, 375–81 429–75, 493–4, 752–62, 410–12 unique identifiers 361 835–50 VFAT file system 375–81 VRTX 808 definition 429 VSCAN.PXT see also FAT... 336–9 direct screen access 471–2 VT see video telephony VFP (vector floating point) 241, drawing 466–72 246–9 event types 430–5 see also coprocessor... event-processing methods VIC 34–5 Wait 87–8 435–40, 446–56 video capture/playback, audio WaitCancel 820–1 events from the kernel 431–74, 40 WAIT FOREVER 816–21 752–62 WaitForRequest video recording, RAM 132–43, events to the clients 432–74 requirements 30 273, 503–8, 541–3, handwriting recognition 429, 649–52 video telephony (VT), audio 40 442–56 waiting virtual caches kernel’s event handler 429–74, see also see also mutexes; semaphores caches 752–62 concepts 27–8, 253 threads 49–55, 57–8, 70, key events 431–4, 436–74, virtual functions 435–6, 444–56, 73–5, 78–88, 98, 102–12, 752–62 460–2 130–43, 811–21 non-client registered events virtual indexes/tags, caches wakeup events 665, 667–8, 670, 433–5, 753–4 275–8 677, 683–5, 696, 757–64, objects 456–62 virtual memory maps 25–6, 230, 835–50 WakeUpEvent overflowing queues 440–2 251–62, 272, 275–87, 673, 676, platform security 473–4 293–4, 311, 644–52 684–5 WalkWindowTree pointer events 431–4, 438–74 virtual/physical addresses 460–2 WCET see worst-case execution queues 430–1, 440–74 homonyms 275–8, time 288–91 redraw events 4, 431, 440–74 wear-leveling scheme, LFFS memory model 254–62, responsibilities 429–30 373–4 275–91, 297–8, 307, windows 456–71 Whitehead, J. 771–2 740–2 windows wildcard searches, PDDs MMU features 254–62, applications 457–62 514–17 275–91, 740–2 backup behind 469–70 Williams, Stefan 475–548 backup content windows synonyms 276–8, 288–91 Win32, emulator 12–13, 15–16, VirtualAlloc 467–8 297 59–62, 97, 109–12, 190–2, blank windows 467 VirtualProtect 298 297–8, 435, 615–59, classes 456–62 viruses 329, 337 749–50 client windows 457–61, visibility issues, asynchronous window anims, concepts message queues 146 443–56 464–6 visible area, client windows window server (WSERV) command storing 470–1 466 see also animation DLLs; concepts 456–62 voice calls 19, 39–40 EWSRV.EXE drawing 466–71 see also audio boot processes 429, 746–7 flicker-free redrawing 470 IPC 40 client API 429–74 group windows 457–66 voltage, CPUs 728–31 client queues 430–1, importance 457 Volume 340–1 440–74 objects 456–62 918 INDEX

properties 462–6 WriteBuffer 569–74 XIP ROM see execute in place redraw windows 468–71 WriteCancel 519–48 ROM regions 465–6 WriteDeviceData 473–4 XScale processors, Intel 20, 24, tree 457–66 WriteUserData 320–6 827–31 window server 456–71 WSERV see window server XT DEFAULT 244–5 Wins::InitProperties 490 WSINI.INI 464–5 XTRAP, concepts 243–5, 273, Windows 2, 3, 4, 14, 15–16, www.symbian.com/books 866 312–13, 631 59–62, 96–7 www.symbian.com/partners 43 XTRAPD 244 emulator 14, 15–16, 59–62, XXXResource Manager 96–7, 249, 297–8, 309–10, 689–94 431, 490, 495–8, 615–59, X86 CPU software layer 749–50 concepts 12, 15–16, 47–9, workloads, CPUs 728–31 179–81, 192–5, 210, Y: drive 396–7 worst-case execution time (WCET), 215–36, 238–49, 287, YieldTo 104–12 deadlines 767–74, 839 836–9 worst-case latency scenarios ‘device not available’ exceptions 786–8, 839 240–3 Z: drive (ROM drive/image) 31, wrapper functions 508–17, exceptions 210, 215–36, 333–5, 337–9, 384–5, 631–2, 654–6 238–49 396–7, 574–89, 611–12, WrDmaService 572–4 memory addressing 215–19 745–6 Write 519–48, 580–2 privilege levels 215–19 write buffers 569–74, 833–4 registers 215–36, 238–49 see also buffers RPL 216–19 zero-divides exception 626 ‘write-back with dirty bit’ cache segment selectors 215–19 scheme 377 X86Mmu 193–4