home *** CD-ROM | disk | FTP | other *** search
view JSON data
|
view as text
|
open on a Mac
|
open on a PC
This file was processed as: LaTeX Document
(document/latex).
You can browse this item here: smp.tex
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Corel 10 Texture (image/corel10Texture)
| ext
| Unsupported |
1%
| dexvert
| Croteam texture file (image/croteamTextureFile)
| ext
| Unsupported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news or mail text
| default
| |
99%
| file
| LaTeX 2e document text
| default
| |
98%
| file
| LaTeX document text
| default
| |
97%
| file
| LaTeX document, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/rfc822
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 3a 20 6d 69 | 63 68 61 65 6c 40 50 68 |From: mi|chael@Ph|
|00000010| 79 73 69 6b 2e 55 6e 69 | 2d 44 6f 72 74 6d 75 6e |ysik.Uni|-Dortmun|
|00000020| 64 2e 44 45 20 28 4d 69 | 63 68 61 65 6c 20 44 69 |d.DE (Mi|chael Di|
|00000030| 72 6b 6d 61 6e 6e 29 0a | 0a 74 68 61 6e 6b 73 20 |rkmann).|.thanks |
|00000040| 66 6f 72 20 79 6f 75 72 | 20 69 6e 66 6f 72 6d 61 |for your| informa|
|00000050| 74 69 6f 6e 2e 20 41 74 | 74 61 63 68 65 64 20 69 |tion. At|tached i|
|00000060| 73 20 74 68 65 20 74 65 | 78 2d 63 6f 64 65 20 6f |s the te|x-code o|
|00000070| 66 20 79 6f 75 72 0a 53 | 4d 50 2d 64 6f 63 75 6d |f your.S|MP-docum|
|00000080| 65 6e 74 61 74 69 6f 6e | 20 3a 0a 2d 3d 2d 3d 2d |entation| :.-=-=-|
|00000090| 3d 2d 3d 2d 3d 2d 3d 2d | 3d 2d 3d 2d 3d 2d 3d 2d |=-=-=-=-|=-=-=-=-|
|000000a0| 3d 2d 3d 2d 3d 2d 3d 2d | 3d 2d 3d 2d 3d 2d 3d 2d |=-=-=-=-|=-=-=-=-|
|000000b0| 3d 2d 3d 2d 3d 2d 3d 2d | 3d 2d 3d 2d 3d 2d 3d 2d |=-=-=-=-|=-=-=-=-|
|000000c0| 3d 2d 3d 2d 3d 2d 3d 2d | 3d 2d 3d 2d 3d 2d 3d 2d |=-=-=-=-|=-=-=-=-|
|000000d0| 3d 2d 3d 0a 5c 64 6f 63 | 75 6d 65 6e 74 63 6c 61 |=-=.\doc|umentcla|
|000000e0| 73 73 5b 5d 7b 61 72 74 | 69 63 6c 65 7d 0a 5c 70 |ss[]{art|icle}.\p|
|000000f0| 61 72 69 6e 64 65 6e 74 | 30 2e 30 63 6d 0a 5c 70 |arindent|0.0cm.\p|
|00000100| 61 72 73 6b 69 70 30 2e | 32 63 6d 0a 0a 5c 62 65 |arskip0.|2cm..\be|
|00000110| 67 69 6e 7b 64 6f 63 75 | 6d 65 6e 74 7d 0a 0a 5c |gin{docu|ment}..\|
|00000120| 62 65 67 69 6e 7b 63 65 | 6e 74 65 72 7d 0a 5c 4c |begin{ce|nter}.\L|
|00000130| 41 52 47 45 20 5c 62 66 | 0a 41 6e 20 49 6d 70 6c |ARGE \bf|.An Impl|
|00000140| 65 6d 65 6e 74 61 74 69 | 6f 6e 20 4f 66 20 4d 75 |ementati|on Of Mu|
|00000150| 6c 74 69 70 72 6f 63 65 | 73 73 6f 72 20 4c 69 6e |ltiproce|ssor Lin|
|00000160| 75 78 0a 5c 6e 6f 72 6d | 61 6c 73 69 7a 65 0a 5c |ux.\norm|alsize.\|
|00000170| 65 6e 64 7b 63 65 6e 74 | 65 72 7d 0a 0a 7b 20 5c |end{cent|er}..{ \|
|00000180| 69 74 0a 54 68 69 73 20 | 64 6f 63 75 6d 65 6e 74 |it.This |document|
|00000190| 20 64 65 73 63 72 69 62 | 65 73 20 74 68 65 20 69 | describ|es the i|
|000001a0| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 20 6f 66 |mplement|ation of|
|000001b0| 20 61 20 73 69 6d 70 6c | 65 20 53 4d 50 20 0a 4c | a simpl|e SMP .L|
|000001c0| 69 6e 75 78 20 6b 65 72 | 6e 65 6c 20 65 78 74 65 |inux ker|nel exte|
|000001d0| 6e 73 69 6f 6e 20 61 6e | 64 20 68 6f 77 20 74 6f |nsion an|d how to|
|000001e0| 20 75 73 65 20 74 68 69 | 73 20 74 6f 20 64 65 76 | use thi|s to dev|
|000001f0| 65 6c 6f 70 20 53 4d 50 | 20 4c 69 6e 75 78 20 6b |elop SMP| Linux k|
|00000200| 65 72 6e 65 6c 73 20 66 | 6f 72 20 0a 61 72 63 68 |ernels f|or .arch|
|00000210| 69 74 65 63 74 75 72 65 | 73 20 6f 74 68 65 72 20 |itecture|s other |
|00000220| 74 68 61 6e 20 74 68 65 | 20 49 6e 74 65 6c 20 4d |than the| Intel M|
|00000230| 50 20 76 31 2e 31 20 61 | 72 63 68 69 74 65 63 74 |P v1.1 a|rchitect|
|00000240| 75 72 65 20 66 6f 72 20 | 50 65 6e 74 69 75 6d 20 |ure for |Pentium |
|00000250| 61 6e 64 20 34 38 36 20 | 0a 70 72 6f 63 65 73 73 |and 486 |.process|
|00000260| 6f 72 73 2e 7d 0a 0a 5c | 68 66 69 6c 6c 20 41 6c |ors.}..\|hfill Al|
|00000270| 61 6e 20 43 6f 78 2c 20 | 31 39 39 35 0a 0a 0a 54 |an Cox, |1995...T|
|00000280| 68 65 20 61 75 74 68 6f | 72 20 77 69 73 68 65 73 |he autho|r wishes|
|00000290| 20 74 6f 20 74 68 61 6e | 6b 20 43 61 6c 64 65 72 | to than|k Calder|
|000002a0| 61 20 49 6e 63 20 28 20 | 68 74 74 70 3a 2f 2f 77 |a Inc ( |http://w|
|000002b0| 77 77 2e 63 61 6c 64 65 | 72 61 2e 63 6f 6d 20 29 |ww.calde|ra.com )|
|000002c0| 0a 77 68 6f 73 65 20 64 | 6f 6e 61 74 69 6f 6e 20 |.whose d|onation |
|000002d0| 6f 66 20 61 6e 20 41 53 | 55 53 20 64 75 61 6c 20 |of an AS|US dual |
|000002e0| 70 65 6e 74 69 75 6d 20 | 62 6f 61 72 64 20 6d 61 |pentium |board ma|
|000002f0| 64 65 20 74 68 69 73 20 | 70 72 6f 6a 65 63 74 20 |de this |project |
|00000300| 70 6f 73 73 69 62 6c 65 | 2c 20 0a 61 6e 64 20 54 |possible|, .and T|
|00000310| 68 6f 6d 61 73 20 52 61 | 64 6b 65 2c 20 77 68 6f |homas Ra|dke, who|
|00000320| 73 65 20 69 6e 69 74 69 | 61 6c 20 77 6f 72 6b 20 |se initi|al work |
|00000330| 6f 6e 20 6d 75 6c 74 69 | 70 72 6f 63 65 73 73 6f |on multi|processo|
|00000340| 72 20 4c 69 6e 75 78 20 | 66 6f 72 6d 65 64 20 0a |r Linux |formed .|
|00000350| 74 68 65 20 62 61 63 6b | 62 6f 6e 65 20 6f 66 20 |the back|bone of |
|00000360| 74 68 69 73 20 70 72 6f | 6a 65 63 74 2e 0a 0a 5c |this pro|ject...\|
|00000370| 73 65 63 74 69 6f 6e 7b | 42 61 63 6b 67 72 6f 75 |section{|Backgrou|
|00000380| 6e 64 3a 20 54 68 65 20 | 49 6e 74 65 6c 20 4d 50 |nd: The |Intel MP|
|00000390| 20 73 70 65 63 69 66 69 | 63 61 74 69 6f 6e 2e 7d | specifi|cation.}|
|000003a0| 0a 4d 6f 73 74 20 49 42 | 4d 20 50 43 20 73 74 79 |.Most IB|M PC sty|
|000003b0| 6c 65 20 6d 75 6c 74 69 | 70 72 6f 63 65 73 73 6f |le multi|processo|
|000003c0| 72 20 6d 6f 74 68 65 72 | 62 6f 61 72 64 73 20 63 |r mother|boards c|
|000003d0| 6f 6d 62 69 6e 65 20 49 | 6e 74 65 6c 20 34 38 36 |ombine I|ntel 486|
|000003e0| 20 6f 72 20 50 65 6e 74 | 69 75 6d 20 0a 70 72 6f | or Pent|ium .pro|
|000003f0| 63 65 73 73 6f 72 73 20 | 61 6e 64 20 67 6c 75 65 |cessors |and glue|
|00000400| 20 63 68 69 70 73 65 74 | 73 20 77 69 74 68 20 61 | chipset|s with a|
|00000410| 20 68 61 72 64 77 61 72 | 65 2f 73 6f 66 74 77 61 | hardwar|e/softwa|
|00000420| 72 65 20 73 70 65 63 69 | 66 69 63 61 74 69 6f 6e |re speci|fication|
|00000430| 2e 20 54 68 65 20 0a 73 | 70 65 63 69 66 69 63 61 |. The .s|pecifica|
|00000440| 74 69 6f 6e 20 70 6c 61 | 63 65 73 20 6d 75 63 68 |tion pla|ces much|
|00000450| 20 6f 66 20 74 68 65 20 | 6f 6e 75 73 20 66 6f 72 | of the |onus for|
|00000460| 20 68 61 72 64 20 77 6f | 72 6b 20 6f 6e 20 74 68 | hard wo|rk on th|
|00000470| 65 20 63 68 69 70 73 65 | 74 20 61 6e 64 20 0a 68 |e chipse|t and .h|
|00000480| 61 72 64 77 61 72 65 20 | 72 61 74 68 65 72 20 74 |ardware |rather t|
|00000490| 68 61 6e 20 74 68 65 20 | 6f 70 65 72 61 74 69 6e |han the |operatin|
|000004a0| 67 20 73 79 73 74 65 6d | 2e 0a 0a 54 68 65 20 49 |g system|...The I|
|000004b0| 6e 74 65 6c 20 70 65 6e | 74 69 75 6d 20 70 72 6f |ntel pen|tium pro|
|000004c0| 63 65 73 73 6f 72 73 20 | 68 61 76 65 20 61 20 77 |cessors |have a w|
|000004d0| 69 64 65 20 76 61 72 69 | 65 74 79 20 6f 66 20 69 |ide vari|ety of i|
|000004e0| 6e 62 75 69 6c 74 20 66 | 61 63 69 6c 69 74 69 65 |nbuilt f|acilitie|
|000004f0| 73 20 66 6f 72 20 0a 73 | 75 70 70 6f 72 74 69 6e |s for .s|upportin|
|00000500| 67 20 6d 75 6c 74 69 70 | 72 6f 63 65 73 73 69 6e |g multip|rocessin|
|00000510| 67 2c 20 69 6e 63 6c 75 | 64 69 6e 67 20 68 61 72 |g, inclu|ding har|
|00000520| 64 77 61 72 65 20 63 61 | 63 68 65 20 63 6f 68 65 |dware ca|che cohe|
|00000530| 72 65 6e 63 79 2c 20 62 | 75 69 6c 74 20 69 6e 20 |rency, b|uilt in |
|00000540| 0a 69 6e 74 65 72 70 72 | 6f 63 65 73 73 6f 72 20 |.interpr|ocessor |
|00000550| 69 6e 74 65 72 72 75 70 | 74 20 68 61 6e 64 6c 69 |interrup|t handli|
|00000560| 6e 67 20 61 6e 64 20 61 | 20 73 65 74 20 6f 66 20 |ng and a| set of |
|00000570| 61 74 6f 6d 69 63 20 74 | 65 73 74 20 61 6e 64 20 |atomic t|est and |
|00000580| 73 65 74 2c 20 0a 65 78 | 63 68 61 6e 67 65 20 61 |set, .ex|change a|
|00000590| 6e 64 20 73 69 6d 69 6c | 61 72 20 6f 70 65 72 61 |nd simil|ar opera|
|000005a0| 74 69 6f 6e 73 2e 20 54 | 68 65 20 63 61 63 68 65 |tions. T|he cache|
|000005b0| 20 63 6f 68 65 72 65 6e | 63 79 20 69 6e 20 70 61 | coheren|cy in pa|
|000005c0| 72 74 69 63 75 6c 61 72 | 20 6d 61 6b 65 73 20 74 |rticular| makes t|
|000005d0| 68 65 20 0a 6f 70 65 72 | 61 74 69 6e 67 20 73 79 |he .oper|ating sy|
|000005e0| 73 74 65 6d 73 20 6a 6f | 62 20 66 61 72 20 65 61 |stems jo|b far ea|
|000005f0| 73 69 65 72 2e 0a 0a 54 | 68 65 20 73 70 65 63 69 |sier...T|he speci|
|00000600| 66 69 63 61 74 69 6f 6e | 20 64 65 66 69 6e 65 73 |fication| defines|
|00000610| 20 61 20 64 65 74 61 69 | 6c 65 64 20 63 6f 6e 66 | a detai|led conf|
|00000620| 69 67 75 72 61 74 69 6f | 6e 20 73 74 72 75 63 74 |iguratio|n struct|
|00000630| 75 72 65 20 69 6e 20 52 | 4f 4d 20 74 68 61 74 20 |ure in R|OM that |
|00000640| 0a 74 68 65 20 62 6f 6f | 74 20 75 70 20 70 72 6f |.the boo|t up pro|
|00000650| 63 65 73 73 6f 72 20 63 | 61 6e 20 72 65 61 64 20 |cessor c|an read |
|00000660| 74 6f 20 66 69 6e 64 20 | 74 68 65 20 66 75 6c 6c |to find |the full|
|00000670| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 6f | configu|ration o|
|00000680| 66 20 74 68 65 20 0a 70 | 72 6f 63 65 73 73 6f 72 |f the .p|rocessor|
|00000690| 73 20 61 6e 64 20 62 75 | 73 73 65 73 2e 20 49 74 |s and bu|sses. It|
|000006a0| 20 61 6c 73 6f 20 64 65 | 66 69 6e 65 73 20 61 20 | also de|fines a |
|000006b0| 70 72 6f 63 65 64 75 72 | 65 20 66 6f 72 20 73 74 |procedur|e for st|
|000006c0| 61 72 74 69 6e 67 20 75 | 70 20 74 68 65 20 0a 6f |arting u|p the .o|
|000006d0| 74 68 65 72 20 70 72 6f | 63 65 73 73 6f 72 73 2e |ther pro|cessors.|
|000006e0| 0a 0a 0a 5c 73 65 63 74 | 69 6f 6e 7b 4d 75 74 75 |...\sect|ion{Mutu|
|000006f0| 61 6c 20 45 78 63 6c 75 | 73 69 6f 6e 20 57 69 74 |al Exclu|sion Wit|
|00000700| 68 69 6e 20 41 20 53 69 | 6e 67 6c 65 20 50 72 6f |hin A Si|ngle Pro|
|00000710| 63 65 73 73 6f 72 20 4c | 69 6e 75 78 20 4b 65 72 |cessor L|inux Ker|
|00000720| 6e 65 6c 7d 0a 46 6f 72 | 20 61 6e 79 20 6b 65 72 |nel}.For| any ker|
|00000730| 6e 65 6c 20 74 6f 20 66 | 75 6e 63 74 69 6f 6e 20 |nel to f|unction |
|00000740| 69 6e 20 61 20 73 61 6e | 65 20 6d 61 6e 6e 65 72 |in a san|e manner|
|00000750| 20 69 74 20 68 61 73 20 | 74 6f 20 70 72 6f 76 69 | it has |to provi|
|00000760| 64 65 20 69 6e 74 65 72 | 6e 61 6c 20 0a 6c 6f 63 |de inter|nal .loc|
|00000770| 6b 69 6e 67 20 61 6e 64 | 20 70 72 6f 74 65 63 74 |king and| protect|
|00000780| 69 6f 6e 20 6f 66 20 69 | 74 73 20 6f 77 6e 20 74 |ion of i|ts own t|
|00000790| 61 62 6c 65 73 20 74 6f | 20 70 72 65 76 65 6e 74 |ables to| prevent|
|000007a0| 20 74 77 6f 20 70 72 6f | 63 65 73 73 65 73 20 75 | two pro|cesses u|
|000007b0| 70 64 61 74 69 6e 67 20 | 0a 74 68 65 6d 20 61 74 |pdating |.them at|
|000007c0| 20 6f 6e 63 65 20 61 6e | 64 20 66 6f 72 20 65 78 | once an|d for ex|
|000007d0| 61 6d 70 6c 65 20 61 6c | 6c 6f 63 61 74 69 6e 67 |ample al|locating|
|000007e0| 20 74 68 65 20 73 61 6d | 65 20 6d 65 6d 6f 72 79 | the sam|e memory|
|000007f0| 20 62 6c 6f 63 6b 2e 20 | 54 68 65 72 65 20 61 72 | block. |There ar|
|00000800| 65 20 0a 74 77 6f 20 73 | 74 72 61 74 65 67 69 65 |e .two s|trategie|
|00000810| 73 20 66 6f 72 20 74 68 | 69 73 20 77 69 74 68 69 |s for th|is withi|
|00000820| 6e 20 63 75 72 72 65 6e | 74 20 55 6e 69 78 20 61 |n curren|t Unix a|
|00000830| 6e 64 20 55 6e 69 78 6c | 69 6b 65 20 6b 65 72 6e |nd Unixl|ike kern|
|00000840| 65 6c 73 2e 20 0a 54 72 | 61 64 69 74 69 6f 6e 61 |els. .Tr|aditiona|
|00000850| 6c 20 75 6e 69 78 20 73 | 79 73 74 65 6d 73 20 66 |l unix s|ystems f|
|00000860| 72 6f 6d 20 74 68 65 20 | 65 61 72 6c 69 65 73 74 |rom the |earliest|
|00000870| 20 6f 66 20 64 61 79 73 | 20 75 73 65 20 61 20 73 | of days| use a s|
|00000880| 63 68 65 6d 65 20 6f 66 | 20 27 43 6f 61 72 73 65 |cheme of| 'Coarse|
|00000890| 20 0a 47 72 61 69 6e 65 | 64 20 4c 6f 63 6b 69 6e | .Graine|d Lockin|
|000008a0| 67 27 20 77 68 65 72 65 | 20 74 68 65 20 65 6e 74 |g' where| the ent|
|000008b0| 69 72 65 20 6b 65 72 6e | 65 6c 20 69 73 20 70 72 |ire kern|el is pr|
|000008c0| 6f 74 65 63 74 65 64 20 | 61 73 20 61 20 73 6d 61 |otected |as a sma|
|000008d0| 6c 6c 20 6e 75 6d 62 65 | 72 20 6f 66 20 0a 6c 6f |ll numbe|r of .lo|
|000008e0| 63 6b 73 20 6f 6e 6c 79 | 2e 20 53 6f 6d 65 20 6d |cks only|. Some m|
|000008f0| 6f 64 65 72 6e 20 73 79 | 73 74 65 6d 73 20 75 73 |odern sy|stems us|
|00000900| 65 20 66 69 6e 65 20 67 | 72 61 69 6e 65 64 20 6c |e fine g|rained l|
|00000910| 6f 63 6b 69 6e 67 2e 20 | 42 65 63 61 75 73 65 20 |ocking. |Because |
|00000920| 66 69 6e 65 20 0a 67 72 | 61 69 6e 65 64 20 6c 6f |fine .gr|ained lo|
|00000930| 63 6b 69 6e 67 20 68 61 | 73 20 6d 6f 72 65 20 6f |cking ha|s more o|
|00000940| 76 65 72 68 65 61 64 20 | 69 74 20 69 73 20 6e 6f |verhead |it is no|
|00000950| 72 6d 61 6c 6c 79 20 75 | 73 65 64 20 6f 6e 6c 79 |rmally u|sed only|
|00000960| 20 6f 6e 20 0a 6d 75 6c | 74 69 70 72 6f 63 65 73 | on .mul|tiproces|
|00000970| 73 6f 72 20 6b 65 72 6e | 65 6c 73 20 61 6e 64 20 |sor kern|els and |
|00000980| 72 65 61 6c 20 74 69 6d | 65 20 6b 65 72 6e 65 6c |real tim|e kernel|
|00000990| 73 2e 20 49 6e 20 61 20 | 72 65 61 6c 20 74 69 6d |s. In a |real tim|
|000009a0| 65 20 6b 65 72 6e 65 6c | 20 74 68 65 20 0a 66 69 |e kernel| the .fi|
|000009b0| 6e 65 20 67 72 61 69 6e | 65 64 20 6c 6f 63 6b 69 |ne grain|ed locki|
|000009c0| 6e 67 20 72 65 64 75 63 | 65 73 20 74 68 65 20 61 |ng reduc|es the a|
|000009d0| 6d 6f 75 6e 74 20 6f 66 | 20 74 69 6d 65 20 6c 6f |mount of| time lo|
|000009e0| 63 6b 73 20 61 72 65 20 | 68 65 6c 64 20 61 6e 64 |cks are |held and|
|000009f0| 20 72 65 64 75 63 65 73 | 20 0a 74 68 65 20 63 72 | reduces| .the cr|
|00000a00| 69 74 69 63 61 6c 20 28 | 74 6f 20 72 65 61 6c 20 |itical (|to real |
|00000a10| 74 69 6d 65 20 70 72 6f | 67 72 61 6d 6d 69 6e 67 |time pro|gramming|
|00000a20| 20 61 74 20 6c 65 61 73 | 74 29 20 6c 61 74 65 6e | at leas|t) laten|
|00000a30| 63 79 20 74 69 6d 65 73 | 2e 0a 0a 57 69 74 68 69 |cy times|...Withi|
|00000a40| 6e 20 74 68 65 20 4c 69 | 6e 75 78 20 6b 65 72 6e |n the Li|nux kern|
|00000a50| 65 6c 20 63 65 72 74 61 | 69 6e 20 67 75 61 72 61 |el certa|in guara|
|00000a60| 6e 74 65 65 73 20 61 72 | 65 20 6d 61 64 65 2e 20 |ntees ar|e made. |
|00000a70| 4e 6f 20 70 72 6f 63 65 | 73 73 20 72 75 6e 6e 69 |No proce|ss runni|
|00000a80| 6e 67 20 69 6e 20 0a 6b | 65 72 6e 65 6c 20 6d 6f |ng in .k|ernel mo|
|00000a90| 64 65 20 77 69 6c 6c 20 | 62 65 20 70 72 65 2d 65 |de will |be pre-e|
|00000aa0| 6d 70 74 65 64 20 62 79 | 20 61 6e 6f 74 68 65 72 |mpted by| another|
|00000ab0| 20 6b 65 72 6e 65 6c 20 | 6d 6f 64 65 20 70 72 6f | kernel |mode pro|
|00000ac0| 63 65 73 73 20 75 6e 6c | 65 73 73 20 69 74 20 0a |cess unl|ess it .|
|00000ad0| 76 6f 6c 75 6e 74 61 72 | 69 6c 79 20 73 6c 65 65 |voluntar|ily slee|
|00000ae0| 70 73 2e 20 20 54 68 69 | 73 20 65 6e 73 75 72 65 |ps. Thi|s ensure|
|00000af0| 73 20 74 68 61 74 20 62 | 6c 6f 63 6b 73 20 6f 66 |s that b|locks of|
|00000b00| 20 6b 65 72 6e 65 6c 20 | 63 6f 64 65 20 61 72 65 | kernel |code are|
|00000b10| 20 0a 65 66 66 65 63 74 | 69 76 65 6c 79 20 61 74 | .effect|ively at|
|00000b20| 6f 6d 69 63 20 77 69 74 | 68 20 72 65 73 70 65 63 |omic wit|h respec|
|00000b30| 74 20 74 6f 20 6f 74 68 | 65 72 20 70 72 6f 63 65 |t to oth|er proce|
|00000b40| 73 73 65 73 20 61 6e 64 | 20 67 72 65 61 74 6c 79 |sses and| greatly|
|00000b50| 20 73 69 6d 70 6c 69 66 | 69 65 73 20 0a 6d 61 6e | simplif|ies .man|
|00000b60| 79 20 6f 70 65 72 61 74 | 69 6f 6e 2e 20 53 65 63 |y operat|ion. Sec|
|00000b70| 6f 6e 64 6c 79 20 69 6e | 74 65 72 72 75 70 74 73 |ondly in|terrupts|
|00000b80| 20 6d 61 79 20 70 72 65 | 2d 65 6d 70 74 20 61 20 | may pre|-empt a |
|00000b90| 6b 65 72 6e 65 6c 20 72 | 75 6e 6e 69 6e 67 20 70 |kernel r|unning p|
|00000ba0| 72 6f 63 65 73 73 2c 20 | 0a 62 75 74 20 77 69 6c |rocess, |.but wil|
|00000bb0| 6c 20 61 6c 77 61 79 73 | 20 72 65 74 75 72 6e 20 |l always| return |
|00000bc0| 74 6f 20 74 68 61 74 20 | 70 72 6f 63 65 73 73 2e |to that |process.|
|00000bd0| 20 41 20 70 72 6f 63 65 | 73 73 20 69 6e 20 6b 65 | A proce|ss in ke|
|00000be0| 72 6e 65 6c 20 6d 6f 64 | 65 20 6d 61 79 20 0a 64 |rnel mod|e may .d|
|00000bf0| 69 73 61 62 6c 65 20 69 | 6e 74 65 72 72 75 70 74 |isable i|nterrupt|
|00000c00| 73 20 6f 6e 20 74 68 65 | 20 70 72 6f 63 65 73 73 |s on the| process|
|00000c10| 6f 72 20 61 6e 64 20 67 | 75 61 72 61 6e 74 65 65 |or and g|uarantee|
|00000c20| 20 73 75 63 68 20 61 6e | 20 69 6e 74 65 72 72 75 | such an| interru|
|00000c30| 70 74 69 6f 6e 20 77 69 | 6c 6c 20 0a 6e 6f 74 20 |ption wi|ll .not |
|00000c40| 6f 63 63 75 72 2e 20 54 | 68 65 20 66 69 6e 61 6c |occur. T|he final|
|00000c50| 20 67 75 61 72 61 6e 74 | 65 65 20 69 73 20 74 68 | guarant|ee is th|
|00000c60| 61 74 20 61 6e 20 69 6e | 74 65 72 72 75 70 74 20 |at an in|terrupt |
|00000c70| 77 69 6c 6c 20 6e 6f 74 | 20 62 65 20 70 72 65 2d |will not| be pre-|
|00000c80| 65 6d 70 74 65 64 20 0a | 62 79 20 61 20 6b 65 72 |empted .|by a ker|
|00000c90| 6e 65 6c 20 74 61 73 6b | 2e 20 54 68 61 74 20 69 |nel task|. That i|
|00000ca0| 73 20 69 6e 74 65 72 72 | 75 70 74 73 20 77 69 6c |s interr|upts wil|
|00000cb0| 6c 20 72 75 6e 20 74 6f | 20 63 6f 6d 70 6c 65 74 |l run to| complet|
|00000cc0| 69 6f 6e 20 6f 72 20 62 | 65 20 0a 70 72 65 2d 65 |ion or b|e .pre-e|
|00000cd0| 6d 70 74 65 64 20 62 79 | 20 6f 74 68 65 72 20 69 |mpted by| other i|
|00000ce0| 6e 74 65 72 72 75 70 74 | 73 20 6f 6e 6c 79 2e 0a |nterrupt|s only..|
|00000cf0| 0a 54 68 65 20 53 4d 50 | 20 6b 65 72 6e 65 6c 20 |.The SMP| kernel |
|00000d00| 63 68 6f 6f 73 65 73 20 | 74 6f 20 63 6f 6e 74 69 |chooses |to conti|
|00000d10| 6e 75 65 20 74 68 65 73 | 65 20 62 61 73 69 63 20 |nue thes|e basic |
|00000d20| 67 75 61 72 61 6e 74 65 | 65 73 20 69 6e 20 6f 72 |guarante|es in or|
|00000d30| 64 65 72 20 74 6f 20 6d | 61 6b 65 20 0a 69 6e 69 |der to m|ake .ini|
|00000d40| 74 69 61 6c 20 69 6d 70 | 6c 65 6d 65 6e 74 61 74 |tial imp|lementat|
|00000d50| 69 6f 6e 20 61 6e 64 20 | 64 65 70 6c 6f 79 6d 65 |ion and |deployme|
|00000d60| 6e 74 20 65 61 73 69 65 | 72 2e 20 20 41 20 73 69 |nt easie|r. A si|
|00000d70| 6e 67 6c 65 20 6c 6f 63 | 6b 20 69 73 20 6d 61 69 |ngle loc|k is mai|
|00000d80| 6e 74 61 69 6e 65 64 20 | 0a 61 63 72 6f 73 73 20 |ntained |.across |
|00000d90| 61 6c 6c 20 70 72 6f 63 | 65 73 73 6f 72 73 2e 20 |all proc|essors. |
|00000da0| 54 68 69 73 20 6c 6f 63 | 6b 20 69 73 20 72 65 71 |This loc|k is req|
|00000db0| 75 69 72 65 64 20 74 6f | 20 61 63 63 65 73 73 20 |uired to| access |
|00000dc0| 74 68 65 20 6b 65 72 6e | 65 6c 20 73 70 61 63 65 |the kern|el space|
|00000dd0| 2e 20 0a 41 6e 79 20 70 | 72 6f 63 65 73 73 6f 72 |. .Any p|rocessor|
|00000de0| 20 6d 61 79 20 68 6f 6c | 64 20 69 74 20 61 6e 64 | may hol|d it and|
|00000df0| 20 6f 6e 63 65 20 69 74 | 20 69 73 20 68 65 6c 64 | once it| is held|
|00000e00| 20 6d 61 79 20 61 6c 73 | 6f 20 72 65 2d 65 6e 74 | may als|o re-ent|
|00000e10| 65 72 20 74 68 65 20 6b | 65 72 6e 65 6c 20 0a 66 |er the k|ernel .f|
|00000e20| 6f 72 20 69 6e 74 65 72 | 72 75 70 74 73 20 61 6e |or inter|rupts an|
|00000e30| 64 20 6f 74 68 65 72 20 | 73 65 72 76 69 63 65 73 |d other |services|
|00000e40| 20 77 68 65 6e 65 76 65 | 72 20 69 74 20 6c 69 6b | wheneve|r it lik|
|00000e50| 65 73 20 75 6e 74 69 6c | 20 74 68 65 20 6c 6f 63 |es until| the loc|
|00000e60| 6b 20 69 73 20 0a 72 65 | 6c 69 6e 71 75 69 73 68 |k is .re|linquish|
|00000e70| 65 64 2e 20 54 68 69 73 | 20 6c 6f 63 6b 20 65 6e |ed. This| lock en|
|00000e80| 73 75 72 65 73 20 74 68 | 61 74 20 61 20 6b 65 72 |sures th|at a ker|
|00000e90| 6e 65 6c 20 6d 6f 64 65 | 20 70 72 6f 63 65 73 73 |nel mode| process|
|00000ea0| 20 77 69 6c 6c 20 6e 6f | 74 20 62 65 20 0a 70 72 | will no|t be .pr|
|00000eb0| 65 2d 65 6d 70 74 65 64 | 20 61 6e 64 20 65 6e 73 |e-empted| and ens|
|00000ec0| 75 72 65 73 20 74 68 61 | 74 20 62 6c 6f 63 6b 69 |ures tha|t blocki|
|00000ed0| 6e 67 20 69 6e 74 65 72 | 72 75 70 74 73 20 69 6e |ng inter|rupts in|
|00000ee0| 20 6b 65 72 6e 65 6c 20 | 6d 6f 64 65 20 62 65 68 | kernel |mode beh|
|00000ef0| 61 76 65 73 20 0a 63 6f | 72 72 65 63 74 6c 79 2e |aves .co|rrectly.|
|00000f00| 20 54 68 69 73 20 69 73 | 20 67 75 61 72 61 6e 74 | This is| guarant|
|00000f10| 65 65 64 20 62 65 63 61 | 75 73 65 20 6f 6e 6c 79 |eed beca|use only|
|00000f20| 20 74 68 65 20 70 72 6f | 63 65 73 73 6f 72 20 68 | the pro|cessor h|
|00000f30| 6f 6c 64 69 6e 67 20 74 | 68 65 20 6c 6f 63 6b 20 |olding t|he lock |
|00000f40| 0a 63 61 6e 20 62 65 20 | 69 6e 20 6b 65 72 6e 65 |.can be |in kerne|
|00000f50| 6c 20 6d 6f 64 65 2c 20 | 6f 6e 6c 79 20 6b 65 72 |l mode, |only ker|
|00000f60| 6e 65 6c 20 6d 6f 64 65 | 20 70 72 6f 63 65 73 73 |nel mode| process|
|00000f70| 65 73 20 63 61 6e 20 64 | 69 73 61 62 6c 65 20 69 |es can d|isable i|
|00000f80| 6e 74 65 72 72 75 70 74 | 73 20 0a 61 6e 64 20 6f |nterrupt|s .and o|
|00000f90| 6e 6c 79 20 74 68 65 20 | 70 72 6f 63 65 73 73 6f |nly the |processo|
|00000fa0| 72 20 68 6f 6c 64 69 6e | 67 20 74 68 65 20 6c 6f |r holdin|g the lo|
|00000fb0| 63 6b 20 6d 61 79 20 68 | 61 6e 64 6c 65 20 61 6e |ck may h|andle an|
|00000fc0| 20 69 6e 74 65 72 72 75 | 70 74 2e 0a 0a 53 75 63 | interru|pt...Suc|
|00000fd0| 68 20 61 20 63 68 6f 69 | 63 65 20 69 73 20 68 6f |h a choi|ce is ho|
|00000fe0| 77 65 76 65 72 20 70 6f | 6f 72 20 66 6f 72 20 70 |wever po|or for p|
|00000ff0| 65 72 66 6f 72 6d 61 6e | 63 65 2e 20 49 6e 20 74 |erforman|ce. In t|
|00001000| 68 65 20 6c 6f 6e 67 65 | 72 20 74 65 72 6d 20 69 |he longe|r term i|
|00001010| 74 20 69 73 20 0a 6e 65 | 63 65 73 73 61 72 79 20 |t is .ne|cessary |
|00001020| 74 6f 20 6d 6f 76 65 20 | 74 6f 20 66 69 6e 65 72 |to move |to finer|
|00001030| 20 67 72 61 69 6e 65 64 | 20 70 61 72 61 6c 6c 65 | grained| paralle|
|00001040| 6c 69 73 6d 20 69 6e 20 | 6f 72 64 65 72 20 74 6f |lism in |order to|
|00001050| 20 67 65 74 20 74 68 65 | 20 62 65 73 74 20 0a 73 | get the| best .s|
|00001060| 79 73 74 65 6d 20 70 65 | 72 66 6f 72 6d 61 6e 63 |ystem pe|rformanc|
|00001070| 65 2e 20 54 68 69 73 20 | 63 61 6e 20 62 65 20 64 |e. This |can be d|
|00001080| 6f 6e 65 20 68 69 65 72 | 61 72 63 68 69 63 61 6c |one hier|archical|
|00001090| 6c 79 20 62 79 20 67 72 | 61 64 75 61 6c 6c 79 20 |ly by gr|adually |
|000010a0| 72 65 66 69 6e 69 6e 67 | 20 0a 74 68 65 20 6c 6f |refining| .the lo|
|000010b0| 63 6b 73 20 74 6f 20 63 | 6f 76 65 72 20 73 6d 61 |cks to c|over sma|
|000010c0| 6c 6c 65 72 20 61 72 65 | 61 73 2e 20 57 69 74 68 |ller are|as. With|
|000010d0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 6b 65 72 | the cur|rent ker|
|000010e0| 6e 65 6c 20 68 69 67 68 | 6c 79 20 43 50 55 20 62 |nel high|ly CPU b|
|000010f0| 6f 75 6e 64 20 0a 70 72 | 6f 63 65 73 73 20 73 65 |ound .pr|ocess se|
|00001100| 74 73 20 70 65 72 66 6f | 72 6d 20 77 65 6c 6c 20 |ts perfo|rm well |
|00001110| 62 75 74 20 49 2f 4f 20 | 62 6f 75 6e 64 20 74 61 |but I/O |bound ta|
|00001120| 73 6b 20 73 65 74 73 20 | 63 61 6e 20 65 61 73 69 |sk sets |can easi|
|00001130| 6c 79 20 64 65 67 65 6e | 65 72 61 74 65 20 74 6f |ly degen|erate to|
|00001140| 20 0a 6e 65 61 72 20 73 | 69 6e 67 6c 65 20 70 72 | .near s|ingle pr|
|00001150| 6f 63 65 73 73 6f 72 20 | 70 65 72 66 6f 72 6d 61 |ocessor |performa|
|00001160| 6e 63 65 20 6c 65 76 65 | 6c 73 2e 20 54 68 69 73 |nce leve|ls. This|
|00001170| 20 72 65 66 69 6e 65 6d | 65 6e 74 20 77 69 6c 6c | refinem|ent will|
|00001180| 20 62 65 20 6e 65 65 64 | 65 64 20 74 6f 20 0a 67 | be need|ed to .g|
|00001190| 65 74 20 74 68 65 20 62 | 65 73 74 20 66 72 6f 6d |et the b|est from|
|000011a0| 20 4c 69 6e 75 78 2f 53 | 4d 50 2e 0a 0a 5c 73 75 | Linux/S|MP...\su|
|000011b0| 62 73 65 63 74 69 6f 6e | 7b 43 68 61 6e 67 65 73 |bsection|{Changes|
|000011c0| 20 54 6f 20 54 68 65 20 | 50 6f 72 74 61 62 6c 65 | To The |Portable|
|000011d0| 20 4b 65 72 6e 65 6c 20 | 43 6f 6d 70 6f 6e 65 6e | Kernel |Componen|
|000011e0| 74 73 7d 0a 54 68 65 20 | 6b 65 72 6e 65 6c 20 63 |ts}.The |kernel c|
|000011f0| 68 61 6e 67 65 73 20 61 | 72 65 20 73 70 6c 69 74 |hanges a|re split|
|00001200| 20 69 6e 74 6f 20 67 65 | 6e 65 72 69 63 20 53 4d | into ge|neric SM|
|00001210| 50 20 73 75 70 70 6f 72 | 74 20 63 68 61 6e 67 65 |P suppor|t change|
|00001220| 73 20 61 6e 64 20 0a 61 | 72 63 68 69 74 65 63 74 |s and .a|rchitect|
|00001230| 75 72 65 20 73 70 65 63 | 69 66 69 63 20 63 68 61 |ure spec|ific cha|
|00001240| 6e 67 65 73 20 6e 65 63 | 65 73 73 61 72 79 20 74 |nges nec|essary t|
|00001250| 6f 20 61 63 63 6f 6d 6d | 6f 64 61 74 65 20 65 61 |o accomm|odate ea|
|00001260| 63 68 20 64 69 66 66 65 | 72 65 6e 74 20 0a 70 72 |ch diffe|rent .pr|
|00001270| 6f 63 65 73 73 6f 72 20 | 74 79 70 65 20 4c 69 6e |ocessor |type Lin|
|00001280| 75 78 20 69 73 20 70 6f | 72 74 65 64 20 74 6f 2e |ux is po|rted to.|
|00001290| 0a 0a 0a 5c 73 75 62 73 | 75 62 73 65 63 74 69 6f |...\subs|ubsectio|
|000012a0| 6e 7b 49 6e 69 74 69 61 | 6c 69 73 61 74 69 6f 6e |n{Initia|lisation|
|000012b0| 7d 0a 54 68 65 20 66 69 | 72 73 74 20 70 72 6f 62 |}.The fi|rst prob|
|000012c0| 6c 65 6d 20 77 69 74 68 | 20 61 20 6d 75 6c 74 69 |lem with| a multi|
|000012d0| 70 72 6f 63 65 73 73 6f | 72 20 6b 65 72 6e 65 6c |processo|r kernel|
|000012e0| 20 69 73 20 73 74 61 72 | 74 69 6e 67 20 74 68 65 | is star|ting the|
|000012f0| 20 6f 74 68 65 72 20 0a | 70 72 6f 63 65 73 73 6f | other .|processo|
|00001300| 72 73 20 75 70 2e 20 4c | 69 6e 75 78 2f 53 4d 50 |rs up. L|inux/SMP|
|00001310| 20 64 65 66 69 6e 65 73 | 20 74 68 61 74 20 61 20 | defines| that a |
|00001320| 73 69 6e 67 6c 65 20 70 | 72 6f 63 65 73 73 6f 72 |single p|rocessor|
|00001330| 20 65 6e 74 65 72 73 20 | 74 68 65 20 6e 6f 72 6d | enters |the norm|
|00001340| 61 6c 20 0a 6b 65 72 6e | 65 6c 20 65 6e 74 72 79 |al .kern|el entry|
|00001350| 20 70 6f 69 6e 74 20 73 | 74 61 72 74 5c 5f 6b 65 | point s|tart\_ke|
|00001360| 72 6e 65 6c 28 29 2e 20 | 4f 74 68 65 72 20 70 72 |rnel(). |Other pr|
|00001370| 6f 63 65 73 73 6f 72 73 | 20 61 72 65 20 61 73 73 |ocessors| are ass|
|00001380| 75 6d 65 64 20 6e 6f 74 | 20 74 6f 20 62 65 20 0a |umed not| to be .|
|00001390| 73 74 61 72 74 65 64 20 | 6f 72 20 74 6f 20 68 61 |started |or to ha|
|000013a0| 76 65 20 62 65 65 6e 20 | 63 61 70 74 75 72 65 64 |ve been |captured|
|000013b0| 20 65 6c 73 65 77 68 65 | 72 65 2e 20 54 68 65 20 | elsewhe|re. The |
|000013c0| 66 69 72 73 74 20 70 72 | 6f 63 65 73 73 6f 72 20 |first pr|ocessor |
|000013d0| 62 65 67 69 6e 73 20 74 | 68 65 20 0a 6e 6f 72 6d |begins t|he .norm|
|000013e0| 61 6c 20 4c 69 6e 75 78 | 20 69 6e 69 74 69 61 6c |al Linux| initial|
|000013f0| 69 73 61 74 69 6f 6e 20 | 73 65 71 75 65 6e 63 65 |isation |sequence|
|00001400| 73 20 61 6e 64 20 73 65 | 74 73 20 75 70 20 70 61 |s and se|ts up pa|
|00001410| 67 69 6e 67 2c 20 69 6e | 74 65 72 72 75 70 74 73 |ging, in|terrupts|
|00001420| 20 61 6e 64 20 0a 74 72 | 61 70 20 68 61 6e 64 6c | and .tr|ap handl|
|00001430| 65 72 73 2e 20 41 66 74 | 65 72 20 69 74 20 68 61 |ers. Aft|er it ha|
|00001440| 73 20 6f 62 74 61 69 6e | 65 64 20 74 68 65 20 70 |s obtain|ed the p|
|00001450| 72 6f 63 65 73 73 6f 72 | 20 69 6e 66 6f 72 6d 61 |rocessor| informa|
|00001460| 74 69 6f 6e 20 61 62 6f | 75 74 20 74 68 65 20 0a |tion abo|ut the .|
|00001470| 62 6f 6f 74 20 43 50 55 | 2c 20 74 68 65 20 61 72 |boot CPU|, the ar|
|00001480| 63 68 69 74 65 63 74 75 | 72 65 20 73 70 65 63 69 |chitectu|re speci|
|00001490| 66 69 63 20 66 75 6e 63 | 74 69 6f 6e 20 0a 0a 0a |fic func|tion ...|
|000014a0| 7b 5c 74 74 20 5c 62 66 | 7b 76 6f 69 64 20 73 6d |{\tt \bf|{void sm|
|000014b0| 70 5c 5f 73 74 6f 72 65 | 5c 5f 63 70 75 5c 5f 69 |p\_store|\_cpu\_i|
|000014c0| 6e 66 6f 28 69 6e 74 20 | 70 72 6f 63 65 73 73 6f |nfo(int |processo|
|000014d0| 72 5c 5f 69 64 29 20 7d | 7d 0a 0a 69 73 20 63 61 |r\_id) }|}..is ca|
|000014e0| 6c 6c 65 64 20 74 6f 20 | 73 74 6f 72 65 20 61 6e |lled to |store an|
|000014f0| 79 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 61 62 |y inform|ation ab|
|00001500| 6f 75 74 20 74 68 65 20 | 70 72 6f 63 65 73 73 6f |out the |processo|
|00001510| 72 20 69 6e 74 6f 20 61 | 20 70 65 72 20 70 72 6f |r into a| per pro|
|00001520| 63 65 73 73 6f 72 20 0a | 61 72 72 61 79 2e 20 54 |cessor .|array. T|
|00001530| 68 69 73 20 69 6e 63 6c | 75 64 65 73 20 74 68 69 |his incl|udes thi|
|00001540| 6e 67 73 20 6c 69 6b 65 | 20 74 68 65 20 62 6f 67 |ngs like| the bog|
|00001550| 6f 6d 69 70 73 20 73 70 | 65 65 64 20 72 61 74 69 |omips sp|eed rati|
|00001560| 6e 67 73 2e 0a 0a 48 61 | 76 69 6e 67 20 63 6f 6d |ngs...Ha|ving com|
|00001570| 70 6c 65 74 65 64 20 74 | 68 65 20 6b 65 72 6e 65 |pleted t|he kerne|
|00001580| 6c 20 69 6e 69 74 69 61 | 6c 69 73 61 74 69 6f 6e |l initia|lisation|
|00001590| 20 74 68 65 20 61 72 63 | 68 69 74 65 63 74 75 72 | the arc|hitectur|
|000015a0| 65 20 73 70 65 63 69 66 | 69 63 20 0a 66 75 6e 63 |e specif|ic .func|
|000015b0| 74 69 6f 6e 0a 0a 7b 5c | 74 74 20 5c 62 66 20 76 |tion..{\|tt \bf v|
|000015c0| 6f 69 64 20 73 6d 70 5c | 5f 62 6f 6f 74 5c 5f 63 |oid smp\|_boot\_c|
|000015d0| 70 75 73 28 76 6f 69 64 | 29 20 7d 0a 0a 69 73 20 |pus(void|) }..is |
|000015e0| 63 61 6c 6c 65 64 20 61 | 6e 64 20 69 73 20 65 78 |called a|nd is ex|
|000015f0| 70 65 63 74 65 64 20 74 | 6f 20 73 74 61 72 74 20 |pected t|o start |
|00001600| 75 70 20 65 61 63 68 20 | 6f 74 68 65 72 20 70 72 |up each |other pr|
|00001610| 6f 63 65 73 73 6f 72 20 | 61 6e 64 20 63 61 75 73 |ocessor |and caus|
|00001620| 65 20 69 74 20 74 6f 20 | 0a 65 6e 74 65 72 20 73 |e it to |.enter s|
|00001630| 74 61 72 74 5c 5f 6b 65 | 72 6e 65 6c 28 29 20 77 |tart\_ke|rnel() w|
|00001640| 69 74 68 20 69 74 73 20 | 70 61 67 69 6e 67 20 72 |ith its |paging r|
|00001650| 65 67 69 73 74 65 72 73 | 20 61 6e 64 20 6f 74 68 |egisters| and oth|
|00001660| 65 72 20 63 6f 6e 74 72 | 6f 6c 20 0a 69 6e 66 6f |er contr|ol .info|
|00001670| 72 6d 61 74 69 6f 6e 20 | 63 6f 72 72 65 63 74 6c |rmation |correctl|
|00001680| 79 20 6c 6f 61 64 65 64 | 2e 20 45 61 63 68 20 6f |y loaded|. Each o|
|00001690| 74 68 65 72 20 70 72 6f | 63 65 73 73 6f 72 20 73 |ther pro|cessor s|
|000016a0| 6b 69 70 73 20 74 68 65 | 20 73 65 74 75 70 20 65 |kips the| setup e|
|000016b0| 78 63 65 70 74 20 0a 66 | 6f 72 20 63 61 6c 6c 69 |xcept .f|or calli|
|000016c0| 6e 67 20 74 68 65 20 74 | 72 61 70 20 61 6e 64 20 |ng the t|rap and |
|000016d0| 69 72 71 20 69 6e 69 74 | 69 61 6c 69 73 61 74 69 |irq init|ialisati|
|000016e0| 6f 6e 20 66 75 6e 63 74 | 69 6f 6e 73 20 74 68 61 |on funct|ions tha|
|000016f0| 74 20 61 72 65 20 6e 65 | 65 64 65 64 20 6f 6e 20 |t are ne|eded on |
|00001700| 0a 73 6f 6d 65 20 70 72 | 6f 63 65 73 73 6f 72 73 |.some pr|ocessors|
|00001710| 20 74 6f 20 73 65 74 20 | 65 61 63 68 20 43 50 55 | to set |each CPU|
|00001720| 20 75 70 20 63 6f 72 72 | 65 63 74 6c 79 2e 20 20 | up corr|ectly. |
|00001730| 54 68 65 73 65 20 66 75 | 6e 63 74 69 6f 6e 73 20 |These fu|nctions |
|00001740| 77 69 6c 6c 20 0a 70 72 | 6f 62 61 62 6c 79 20 6e |will .pr|obably n|
|00001750| 65 65 64 20 74 6f 20 62 | 65 20 6d 6f 64 69 66 69 |eed to b|e modifi|
|00001760| 65 64 20 69 6e 20 65 78 | 69 73 74 69 6e 67 20 6b |ed in ex|isting k|
|00001770| 65 72 6e 65 6c 73 20 74 | 6f 20 63 6f 70 65 20 77 |ernels t|o cope w|
|00001780| 69 74 68 20 74 68 69 73 | 2e 0a 0a 0a 45 61 63 68 |ith this|....Each|
|00001790| 20 61 64 64 69 74 69 6f | 6e 61 6c 20 43 50 55 20 | additio|nal CPU |
|000017a0| 74 68 65 20 63 61 6c 6c | 73 20 74 68 65 20 61 72 |the call|s the ar|
|000017b0| 63 68 69 74 65 63 74 75 | 72 65 20 73 70 65 63 69 |chitectu|re speci|
|000017c0| 66 69 63 20 66 75 6e 63 | 74 69 6f 6e 0a 0a 7b 5c |fic func|tion..{\|
|000017d0| 74 74 20 5c 62 66 20 76 | 6f 69 64 20 73 6d 70 5c |tt \bf v|oid smp\|
|000017e0| 5f 63 61 6c 6c 69 6e 28 | 76 6f 69 64 29 7d 0a 0a |_callin(|void)}..|
|000017f0| 77 68 69 63 68 20 64 6f | 65 73 20 61 6e 79 20 66 |which do|es any f|
|00001800| 69 6e 61 6c 20 73 65 74 | 75 70 20 61 6e 64 20 74 |inal set|up and t|
|00001810| 68 65 6e 20 73 70 69 6e | 73 20 74 68 65 20 70 72 |hen spin|s the pr|
|00001820| 6f 63 65 73 73 6f 72 20 | 77 68 69 6c 65 20 74 68 |ocessor |while th|
|00001830| 65 20 62 6f 6f 74 20 0a | 75 70 20 70 72 6f 63 65 |e boot .|up proce|
|00001840| 73 73 6f 72 20 66 6f 72 | 6b 73 20 6f 66 66 20 65 |ssor for|ks off e|
|00001850| 6e 6f 75 67 68 20 69 64 | 6c 65 20 74 68 72 65 61 |nough id|le threa|
|00001860| 64 73 20 66 6f 72 20 65 | 61 63 68 20 70 72 6f 63 |ds for e|ach proc|
|00001870| 65 73 73 6f 72 2e 20 54 | 68 69 73 20 69 73 20 0a |essor. T|his is .|
|00001880| 6e 65 63 65 73 73 61 72 | 79 20 62 65 63 61 75 73 |necessar|y becaus|
|00001890| 65 20 74 68 65 20 73 63 | 68 65 64 75 6c 65 72 20 |e the sc|heduler |
|000018a0| 61 73 73 75 6d 65 73 20 | 74 68 65 72 65 20 69 73 |assumes |there is|
|000018b0| 20 61 6c 77 61 79 73 20 | 73 6f 6d 65 74 68 69 6e | always |somethin|
|000018c0| 67 20 74 6f 20 72 75 6e | 2e 20 0a 48 61 76 69 6e |g to run|. .Havin|
|000018d0| 67 20 67 65 6e 65 72 61 | 74 65 64 20 74 68 65 73 |g genera|ted thes|
|000018e0| 65 20 74 68 72 65 61 64 | 73 20 61 6e 64 20 66 6f |e thread|s and fo|
|000018f0| 72 6b 65 64 20 69 6e 69 | 74 20 74 68 65 20 61 72 |rked ini|t the ar|
|00001900| 63 68 69 74 65 63 74 75 | 72 65 20 73 70 65 63 69 |chitectu|re speci|
|00001910| 66 69 63 20 0a 0a 7b 5c | 74 74 20 5c 62 66 20 76 |fic ..{\|tt \bf v|
|00001920| 6f 69 64 20 73 6d 70 5c | 5f 63 6f 6d 6d 65 6e 63 |oid smp\|_commenc|
|00001930| 65 28 76 6f 69 64 29 7d | 0a 0a 66 75 6e 63 74 69 |e(void)}|..functi|
|00001940| 6f 6e 20 69 73 20 69 6e | 76 6f 6b 65 64 2e 20 54 |on is in|voked. T|
|00001950| 68 69 73 20 64 6f 65 73 | 20 61 6e 79 20 66 69 6e |his does| any fin|
|00001960| 61 6c 20 73 65 74 75 70 | 20 61 6e 64 20 69 6e 64 |al setup| and ind|
|00001970| 69 63 61 74 65 73 20 74 | 6f 20 74 68 65 20 73 79 |icates t|o the sy|
|00001980| 73 74 65 6d 20 0a 74 68 | 61 74 20 6d 75 6c 74 69 |stem .th|at multi|
|00001990| 70 72 6f 63 65 73 73 6f | 72 20 6d 6f 64 65 20 69 |processo|r mode i|
|000019a0| 73 20 6e 6f 77 20 61 63 | 74 69 76 65 2e 20 41 6c |s now ac|tive. Al|
|000019b0| 6c 20 74 68 65 20 70 72 | 6f 63 65 73 73 6f 72 73 |l the pr|ocessors|
|000019c0| 20 73 70 69 6e 6e 69 6e | 67 20 69 6e 20 74 68 65 | spinnin|g in the|
|000019d0| 20 0a 73 6d 70 5c 5f 63 | 61 6c 6c 69 6e 28 29 20 | .smp\_c|allin() |
|000019e0| 66 75 6e 63 74 69 6f 6e | 20 61 72 65 20 6e 6f 77 |function| are now|
|000019f0| 20 72 65 6c 65 61 73 65 | 64 20 74 6f 20 72 75 6e | release|d to run|
|00001a00| 20 74 68 65 20 69 64 6c | 65 20 70 72 6f 63 65 73 | the idl|e proces|
|00001a10| 73 65 73 2c 20 77 68 69 | 63 68 20 0a 74 68 65 79 |ses, whi|ch .they|
|00001a20| 20 77 69 6c 6c 20 72 75 | 6e 20 77 68 65 6e 20 74 | will ru|n when t|
|00001a30| 68 65 79 20 68 61 76 65 | 20 6e 6f 20 72 65 61 6c |hey have| no real|
|00001a40| 20 77 6f 72 6b 20 74 6f | 20 70 72 6f 63 65 73 73 | work to| process|
|00001a50| 2e 0a 0a 0a 5c 73 75 62 | 73 75 62 73 65 63 74 69 |....\sub|subsecti|
|00001a60| 6f 6e 7b 53 63 68 65 64 | 75 6c 69 6e 67 7d 0a 54 |on{Sched|uling}.T|
|00001a70| 68 65 20 6b 65 72 6e 65 | 6c 20 73 63 68 65 64 75 |he kerne|l schedu|
|00001a80| 6c 65 72 20 69 6d 70 6c | 65 6d 65 6e 74 73 20 61 |ler impl|ements a|
|00001a90| 20 73 69 6d 70 6c 65 20 | 62 75 74 20 76 65 72 79 | simple |but very|
|00001aa0| 20 61 6e 64 20 65 66 66 | 65 63 74 69 76 65 20 74 | and eff|ective t|
|00001ab0| 61 73 6b 20 0a 73 63 68 | 65 64 75 6c 65 72 2e 20 |ask .sch|eduler. |
|00001ac0| 54 68 65 20 62 61 73 69 | 63 20 73 74 72 75 63 74 |The basi|c struct|
|00001ad0| 75 72 65 20 6f 66 20 74 | 68 69 73 20 73 63 68 65 |ure of t|his sche|
|00001ae0| 64 75 6c 65 72 20 69 73 | 20 75 6e 63 68 61 6e 67 |duler is| unchang|
|00001af0| 65 64 20 69 6e 20 74 68 | 65 20 0a 6d 75 6c 74 69 |ed in th|e .multi|
|00001b00| 70 72 6f 63 65 73 73 6f | 72 20 6b 65 72 6e 65 6c |processo|r kernel|
|00001b10| 2e 20 41 20 70 72 6f 63 | 65 73 73 6f 72 20 66 69 |. A proc|essor fi|
|00001b20| 65 6c 64 20 69 73 20 61 | 64 64 65 64 20 74 6f 20 |eld is a|dded to |
|00001b30| 65 61 63 68 20 74 61 73 | 6b 2c 20 61 6e 64 20 74 |each tas|k, and t|
|00001b40| 68 69 73 20 0a 6d 61 69 | 6e 74 61 69 6e 73 20 74 |his .mai|ntains t|
|00001b50| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 74 68 65 |he numbe|r of the|
|00001b60| 20 70 72 6f 63 65 73 73 | 6f 72 20 65 78 65 63 75 | process|or execu|
|00001b70| 74 69 6e 67 20 61 20 67 | 69 76 65 6e 20 74 61 73 |ting a g|iven tas|
|00001b80| 6b 2c 20 6f 72 20 61 20 | 6d 61 67 69 63 20 0a 63 |k, or a |magic .c|
|00001b90| 6f 6e 73 74 61 6e 74 20 | 28 4e 4f 5c 5f 50 52 4f |onstant |(NO\_PRO|
|00001ba0| 43 5c 5f 49 44 29 20 20 | 69 6e 64 69 63 61 74 69 |C\_ID) |indicati|
|00001bb0| 6e 67 20 74 68 65 20 6a | 6f 62 20 69 73 20 6e 6f |ng the j|ob is no|
|00001bc0| 74 20 61 6c 6c 6f 63 61 | 74 65 64 20 74 6f 20 61 |t alloca|ted to a|
|00001bd0| 20 70 72 6f 63 65 73 73 | 6f 72 2e 20 0a 09 20 0a | process|or. .. .|
|00001be0| 45 61 63 68 20 70 72 6f | 63 65 73 73 6f 72 20 65 |Each pro|cessor e|
|00001bf0| 78 65 63 75 74 65 73 20 | 74 68 65 20 73 63 68 65 |xecutes |the sche|
|00001c00| 64 75 6c 65 72 20 69 74 | 73 65 6c 66 20 61 6e 64 |duler it|self and|
|00001c10| 20 77 69 6c 6c 20 73 65 | 6c 65 63 74 20 74 68 65 | will se|lect the|
|00001c20| 20 6e 65 78 74 20 74 61 | 73 6b 20 0a 74 6f 20 72 | next ta|sk .to r|
|00001c30| 75 6e 20 66 72 6f 6d 20 | 61 6c 6c 20 72 75 6e 6e |un from |all runn|
|00001c40| 61 62 6c 65 20 70 72 6f | 63 65 73 73 65 73 20 6e |able pro|cesses n|
|00001c50| 6f 74 20 61 6c 6c 6f 63 | 61 74 65 64 20 74 6f 20 |ot alloc|ated to |
|00001c60| 61 20 64 69 66 66 65 72 | 65 6e 74 20 70 72 6f 63 |a differ|ent proc|
|00001c70| 65 73 73 6f 72 2e 20 0a | 54 68 65 20 61 6c 67 6f |essor. .|The algo|
|00001c80| 72 69 74 68 6d 20 75 73 | 65 64 20 62 79 20 74 68 |rithm us|ed by th|
|00001c90| 65 20 73 65 6c 65 63 74 | 69 6f 6e 20 69 73 20 6f |e select|ion is o|
|00001ca0| 74 68 65 72 77 69 73 65 | 20 75 6e 63 68 61 6e 67 |therwise| unchang|
|00001cb0| 65 64 2e 20 54 68 69 73 | 20 69 73 20 0a 61 63 74 |ed. This| is .act|
|00001cc0| 75 61 6c 6c 79 20 69 6e | 61 64 65 71 75 61 74 65 |ually in|adequate|
|00001cd0| 20 66 6f 72 20 74 68 65 | 20 66 69 6e 61 6c 20 73 | for the| final s|
|00001ce0| 79 73 74 65 6d 20 62 65 | 63 61 75 73 65 20 74 68 |ystem be|cause th|
|00001cf0| 65 72 65 20 61 72 65 20 | 61 64 76 61 6e 74 61 67 |ere are |advantag|
|00001d00| 65 73 20 74 6f 20 0a 6b | 65 65 70 69 6e 67 20 61 |es to .k|eeping a|
|00001d10| 20 70 72 6f 63 65 73 73 | 20 6f 6e 20 74 68 65 20 | process| on the |
|00001d20| 73 61 6d 65 20 43 50 55 | 2c 20 65 73 70 65 63 69 |same CPU|, especi|
|00001d30| 61 6c 6c 79 20 6f 6e 20 | 70 72 6f 63 65 73 73 6f |ally on |processo|
|00001d40| 72 20 62 6f 61 72 64 73 | 20 77 69 74 68 20 70 65 |r boards| with pe|
|00001d50| 72 20 0a 70 72 6f 63 65 | 73 73 6f 72 20 73 65 63 |r .proce|ssor sec|
|00001d60| 6f 6e 64 20 6c 65 76 65 | 6c 20 63 61 63 68 65 73 |ond leve|l caches|
|00001d70| 2e 0a 0a 54 68 72 6f 75 | 67 68 6f 75 74 20 74 68 |...Throu|ghout th|
|00001d80| 65 20 6b 65 72 6e 65 6c | 20 74 68 65 20 76 61 72 |e kernel| the var|
|00001d90| 69 61 62 6c 65 20 27 63 | 75 72 72 65 6e 74 27 20 |iable 'c|urrent' |
|00001da0| 69 73 20 75 73 65 64 20 | 61 73 20 61 20 67 6c 6f |is used |as a glo|
|00001db0| 62 61 6c 20 66 6f 72 20 | 74 68 65 20 0a 63 75 72 |bal for |the .cur|
|00001dc0| 72 65 6e 74 20 70 72 6f | 63 65 73 73 2e 20 49 6e |rent pro|cess. In|
|00001dd0| 20 4c 69 6e 75 78 2f 53 | 4d 50 20 74 68 69 73 20 | Linux/S|MP this |
|00001de0| 62 65 63 6f 6d 65 73 20 | 61 20 6d 61 63 72 6f 20 |becomes |a macro |
|00001df0| 77 68 69 63 68 20 65 78 | 70 61 6e 64 73 20 74 6f |which ex|pands to|
|00001e00| 20 0a 63 75 72 72 65 6e | 74 5c 5f 73 65 74 5b 73 | .curren|t\_set[s|
|00001e10| 6d 70 5c 5f 70 72 6f 63 | 65 73 73 6f 72 5c 5f 69 |mp\_proc|essor\_i|
|00001e20| 64 28 29 5d 2e 20 54 68 | 69 73 20 65 6e 61 62 6c |d()]. Th|is enabl|
|00001e30| 65 73 20 61 6c 6d 6f 73 | 74 20 74 68 65 20 65 6e |es almos|t the en|
|00001e40| 74 69 72 65 20 6b 65 72 | 6e 65 6c 20 74 6f 20 0a |tire ker|nel to .|
|00001e50| 62 65 20 75 6e 61 77 61 | 72 65 20 6f 66 20 74 68 |be unawa|re of th|
|00001e60| 65 20 61 72 72 61 79 20 | 6f 66 20 72 75 6e 6e 69 |e array |of runni|
|00001e70| 6e 67 20 70 72 6f 63 65 | 73 73 6f 72 73 2c 20 62 |ng proce|ssors, b|
|00001e80| 75 74 20 73 74 69 6c 6c | 20 61 6c 6c 6f 77 73 20 |ut still| allows |
|00001e90| 74 68 65 20 53 4d 50 20 | 0a 61 77 61 72 65 20 6b |the SMP |.aware k|
|00001ea0| 65 72 6e 65 6c 20 6d 6f | 64 75 6c 65 73 20 74 6f |ernel mo|dules to|
|00001eb0| 20 73 65 65 20 61 6c 6c | 20 6f 66 20 74 68 65 20 | see all| of the |
|00001ec0| 72 75 6e 6e 69 6e 67 20 | 70 72 6f 63 65 73 73 65 |running |processe|
|00001ed0| 73 2e 0a 0a 54 68 65 20 | 66 6f 72 6b 20 73 79 73 |s...The |fork sys|
|00001ee0| 74 65 6d 20 63 61 6c 6c | 20 69 73 20 6d 6f 64 69 |tem call| is modi|
|00001ef0| 66 69 65 64 20 74 6f 20 | 67 65 6e 65 72 61 74 65 |fied to |generate|
|00001f00| 20 6d 75 6c 74 69 70 6c | 65 20 70 72 6f 63 65 73 | multipl|e proces|
|00001f10| 73 65 73 20 77 69 74 68 | 20 61 20 0a 70 72 6f 63 |ses with| a .proc|
|00001f20| 65 73 73 20 69 64 20 6f | 66 20 7a 65 72 6f 20 75 |ess id o|f zero u|
|00001f30| 6e 74 69 6c 20 74 68 65 | 20 53 4d 50 20 6b 65 72 |ntil the| SMP ker|
|00001f40| 6e 65 6c 20 73 74 61 72 | 74 73 20 75 70 20 70 72 |nel star|ts up pr|
|00001f50| 6f 70 65 72 6c 79 2e 20 | 54 68 69 73 20 69 73 20 |operly. |This is |
|00001f60| 0a 6e 65 63 65 73 73 61 | 72 79 20 62 65 63 61 75 |.necessa|ry becau|
|00001f70| 73 65 20 70 72 6f 63 65 | 73 73 20 6e 75 6d 62 65 |se proce|ss numbe|
|00001f80| 72 20 31 20 6d 75 73 74 | 20 62 65 20 69 6e 69 74 |r 1 must| be init|
|00001f90| 2c 20 61 6e 64 20 69 74 | 20 69 73 20 64 65 73 69 |, and it| is desi|
|00001fa0| 72 61 62 6c 65 20 74 68 | 61 74 20 0a 61 6c 6c 20 |rable th|at .all |
|00001fb0| 74 68 65 20 73 79 73 74 | 65 6d 20 74 68 72 65 61 |the syst|em threa|
|00001fc0| 64 73 20 61 72 65 20 70 | 72 6f 63 65 73 73 20 30 |ds are p|rocess 0|
|00001fd0| 2e 20 0a 0a 54 68 65 20 | 66 69 6e 61 6c 20 61 72 |. ..The |final ar|
|00001fe0| 65 61 20 77 69 74 68 69 | 6e 20 74 68 65 20 73 63 |ea withi|n the sc|
|00001ff0| 68 65 64 75 6c 69 6e 67 | 20 6f 66 20 70 72 6f 63 |heduling| of proc|
|00002000| 65 73 73 65 73 20 74 68 | 61 74 20 64 6f 65 73 20 |esses th|at does |
|00002010| 63 61 75 73 65 20 70 72 | 6f 62 6c 65 6d 73 20 0a |cause pr|oblems .|
|00002020| 69 73 20 74 68 65 20 66 | 61 63 74 20 74 68 65 20 |is the f|act the |
|00002030| 75 6e 69 70 72 6f 63 65 | 73 73 6f 72 20 6b 65 72 |uniproce|ssor ker|
|00002040| 6e 65 6c 20 68 61 72 64 | 20 63 6f 64 65 73 20 74 |nel hard| codes t|
|00002050| 65 73 74 73 20 66 6f 72 | 20 74 68 65 20 69 64 6c |ests for| the idl|
|00002060| 65 20 74 68 72 65 61 64 | 73 20 0a 61 73 20 74 61 |e thread|s .as ta|
|00002070| 73 6b 5b 30 5d 20 61 6e | 64 20 74 68 65 20 69 6e |sk[0] an|d the in|
|00002080| 69 74 20 70 72 6f 63 65 | 73 73 20 61 73 20 74 61 |it proce|ss as ta|
|00002090| 73 6b 5b 31 5d 2e 20 42 | 65 63 61 75 73 65 20 74 |sk[1]. B|ecause t|
|000020a0| 68 65 72 65 20 61 72 65 | 20 6d 75 6c 74 69 70 6c |here are| multipl|
|000020b0| 65 20 69 64 6c 65 20 0a | 74 68 72 65 61 64 73 20 |e idle .|threads |
|000020c0| 69 74 20 69 73 20 6e 65 | 63 65 73 73 61 72 79 20 |it is ne|cessary |
|000020d0| 74 6f 20 72 65 70 6c 61 | 63 65 20 74 68 65 73 65 |to repla|ce these|
|000020e0| 20 77 69 74 68 20 74 65 | 73 74 73 20 74 68 61 74 | with te|sts that|
|000020f0| 20 74 68 65 20 70 72 6f | 63 65 73 73 20 69 64 20 | the pro|cess id |
|00002100| 69 73 20 0a 30 20 61 6e | 64 20 61 20 73 65 61 72 |is .0 an|d a sear|
|00002110| 63 68 20 66 6f 72 20 70 | 72 6f 63 65 73 73 20 49 |ch for p|rocess I|
|00002120| 44 20 31 2c 20 72 65 73 | 70 65 63 74 69 76 65 6c |D 1, res|pectivel|
|00002130| 79 2e 0a 0a 5c 73 75 62 | 73 75 62 73 65 63 74 69 |y...\sub|subsecti|
|00002140| 6f 6e 7b 4d 65 6d 6f 72 | 79 20 4d 61 6e 61 67 65 |on{Memor|y Manage|
|00002150| 6d 65 6e 74 7d 0a 54 68 | 65 20 6d 65 6d 6f 72 79 |ment}.Th|e memory|
|00002160| 20 6d 61 6e 61 67 65 6d | 65 6e 74 20 63 6f 72 65 | managem|ent core|
|00002170| 20 6f 66 20 74 68 65 20 | 65 78 69 73 74 69 6e 67 | of the |existing|
|00002180| 20 4c 69 6e 75 78 20 73 | 79 73 74 65 6d 20 66 75 | Linux s|ystem fu|
|00002190| 6e 63 74 69 6f 6e 73 20 | 0a 61 64 65 71 75 61 74 |nctions |.adequat|
|000021a0| 65 6c 79 20 77 69 74 68 | 69 6e 20 74 68 65 20 6d |ely with|in the m|
|000021b0| 75 6c 74 69 70 72 6f 63 | 65 73 73 6f 72 20 66 72 |ultiproc|essor fr|
|000021c0| 61 6d 65 77 6f 72 6b 20 | 70 72 6f 76 69 64 69 6e |amework |providin|
|000021d0| 67 20 74 68 65 20 6c 6f | 63 6b 69 6e 67 20 69 73 |g the lo|cking is|
|000021e0| 20 0a 75 73 65 64 2e 20 | 43 65 72 74 61 69 6e 20 | .used. |Certain |
|000021f0| 70 72 6f 63 65 73 73 6f | 72 20 73 70 65 63 69 66 |processo|r specif|
|00002200| 69 63 20 61 72 65 61 73 | 20 64 6f 20 6e 65 65 64 |ic areas| do need|
|00002210| 20 63 68 61 6e 67 69 6e | 67 2c 20 69 6e 20 70 61 | changin|g, in pa|
|00002220| 72 74 69 63 75 6c 61 72 | 20 0a 69 6e 76 61 6c 69 |rticular| .invali|
|00002230| 64 61 74 65 28 29 20 6d | 75 73 74 20 69 6e 76 61 |date() m|ust inva|
|00002240| 6c 69 64 61 74 65 20 74 | 68 65 20 54 4c 42 27 73 |lidate t|he TLB's|
|00002250| 20 6f 66 20 61 6c 6c 20 | 70 72 6f 63 65 73 73 6f | of all |processo|
|00002260| 72 73 20 62 65 66 6f 72 | 65 20 69 74 20 72 65 74 |rs befor|e it ret|
|00002270| 75 72 6e 73 2e 0a 0a 0a | 5c 73 75 62 73 75 62 73 |urns....|\subsubs|
|00002280| 65 63 74 69 6f 6e 7b 4d | 69 73 63 65 6c 6c 61 6e |ection{M|iscellan|
|00002290| 65 6f 75 73 20 46 75 6e | 63 74 69 6f 6e 73 7d 0a |eous Fun|ctions}.|
|000022a0| 54 68 65 20 70 6f 72 74 | 61 62 6c 65 20 53 4d 50 |The port|able SMP|
|000022b0| 20 63 6f 64 65 20 72 65 | 73 74 73 20 6f 6e 20 61 | code re|sts on a|
|000022c0| 20 73 6d 61 6c 6c 20 73 | 65 74 20 6f 66 20 66 75 | small s|et of fu|
|000022d0| 6e 63 74 69 6f 6e 73 20 | 61 6e 64 20 76 61 72 69 |nctions |and vari|
|000022e0| 61 62 6c 65 73 20 0a 74 | 68 61 74 20 61 72 65 20 |ables .t|hat are |
|000022f0| 70 72 6f 76 69 64 65 64 | 20 62 79 20 74 68 65 20 |provided| by the |
|00002300| 70 72 6f 63 65 73 73 6f | 72 20 73 70 65 63 69 66 |processo|r specif|
|00002310| 69 63 61 74 69 6f 6e 20 | 66 75 6e 63 74 69 6f 6e |ication |function|
|00002320| 61 6c 69 74 79 2e 20 54 | 68 65 73 65 20 61 72 65 |ality. T|hese are|
|00002330| 0a 0a 7b 5c 74 74 20 5c | 62 66 20 69 6e 74 20 73 |..{\tt \|bf int s|
|00002340| 6d 70 5c 5f 70 72 6f 63 | 65 73 73 6f 72 5c 5f 69 |mp\_proc|essor\_i|
|00002350| 64 28 76 6f 69 64 29 20 | 7d 0a 0a 77 68 69 63 68 |d(void) |}..which|
|00002360| 20 72 65 74 75 72 6e 73 | 20 74 68 65 20 69 64 65 | returns| the ide|
|00002370| 6e 74 69 74 79 20 6f 66 | 20 74 68 65 20 70 72 6f |ntity of| the pro|
|00002380| 63 65 73 73 20 74 68 65 | 20 63 61 6c 6c 20 69 73 |cess the| call is|
|00002390| 20 65 78 65 63 75 74 65 | 64 20 75 70 6f 6e 2e 20 | execute|d upon. |
|000023a0| 54 68 69 73 20 0a 63 61 | 6c 6c 20 69 73 20 61 73 |This .ca|ll is as|
|000023b0| 73 75 6d 65 64 20 74 6f | 20 62 65 20 76 61 6c 69 |sumed to| be vali|
|000023c0| 64 20 61 74 20 61 6c 6c | 20 74 69 6d 65 73 2e 20 |d at all| times. |
|000023d0| 54 68 69 73 20 6d 61 79 | 20 6d 65 61 6e 20 61 64 |This may| mean ad|
|000023e0| 64 69 74 69 6f 6e 61 6c | 20 74 65 73 74 73 20 0a |ditional| tests .|
|000023f0| 61 72 65 20 6e 65 65 64 | 65 64 20 64 75 72 69 6e |are need|ed durin|
|00002400| 67 20 69 6e 69 74 69 61 | 6c 69 73 61 74 69 6f 6e |g initia|lisation|
|00002410| 2e 0a 0a 0a 7b 5c 74 74 | 20 5c 62 66 20 69 6e 74 |....{\tt| \bf int|
|00002420| 20 73 6d 70 5c 5f 6e 75 | 6d 5c 5f 63 70 75 73 3b | smp\_nu|m\_cpus;|
|00002430| 7d 0a 0a 54 68 69 73 20 | 69 73 20 74 68 65 20 6e |}..This |is the n|
|00002440| 75 6d 62 65 72 20 6f 66 | 20 70 72 6f 63 65 73 73 |umber of| process|
|00002450| 6f 72 73 20 69 6e 20 74 | 68 65 20 73 79 73 74 65 |ors in t|he syste|
|00002460| 6d 2e 20 5c 0a 0a 7b 5c | 74 74 20 5c 62 66 20 76 |m. \..{\|tt \bf v|
|00002470| 6f 69 64 20 73 6d 70 5c | 5f 6d 65 73 73 61 67 65 |oid smp\|_message|
|00002480| 5c 5f 70 61 73 73 28 69 | 6e 74 20 74 61 72 67 65 |\_pass(i|nt targe|
|00002490| 74 2c 20 69 6e 74 20 6d | 73 67 2c 20 75 6e 73 69 |t, int m|sg, unsi|
|000024a0| 67 6e 65 64 20 6c 6f 6e | 67 20 64 61 74 61 2c 0a |gned lon|g data,.|
|000024b0| 09 09 69 6e 74 20 77 61 | 69 74 29 7d 0a 0a 54 68 |..int wa|it)}..Th|
|000024c0| 69 73 20 66 75 6e 63 74 | 69 6f 6e 20 70 61 73 73 |is funct|ion pass|
|000024d0| 65 73 20 6d 65 73 73 61 | 67 65 73 20 62 65 74 77 |es messa|ges betw|
|000024e0| 65 65 6e 20 70 72 6f 63 | 65 73 73 6f 72 73 2e 20 |een proc|essors. |
|000024f0| 41 74 20 74 68 65 20 6d | 6f 6d 65 6e 74 20 69 74 |At the m|oment it|
|00002500| 20 69 73 20 6e 6f 74 20 | 0a 73 75 66 66 69 63 69 | is not |.suffici|
|00002510| 65 6e 74 6c 79 20 64 65 | 66 69 6e 65 64 20 74 6f |ently de|fined to|
|00002520| 20 73 65 6e 73 69 62 6c | 79 20 64 6f 63 75 6d 65 | sensibl|y docume|
|00002530| 6e 74 20 61 6e 64 20 6e | 65 65 64 73 20 63 6c 65 |nt and n|eeds cle|
|00002540| 61 6e 69 6e 67 20 75 70 | 20 61 6e 64 20 66 75 72 |aning up| and fur|
|00002550| 74 68 65 72 20 0a 77 6f | 72 6b 2e 20 52 65 66 65 |ther .wo|rk. Refe|
|00002560| 72 20 74 6f 20 74 68 65 | 20 70 72 6f 63 65 73 73 |r to the| process|
|00002570| 6f 72 20 73 70 65 63 69 | 66 69 63 20 63 6f 64 65 |or speci|fic code|
|00002580| 20 64 6f 63 75 6d 65 6e | 74 61 74 69 6f 6e 20 66 | documen|tation f|
|00002590| 6f 72 20 6d 6f 72 65 20 | 64 65 74 61 69 6c 73 2e |or more |details.|
|000025a0| 0a 0a 0a 5c 73 75 62 73 | 65 63 74 69 6f 6e 7b 41 |...\subs|ection{A|
|000025b0| 72 63 68 69 74 65 63 74 | 75 72 65 20 53 70 65 63 |rchitect|ure Spec|
|000025c0| 69 66 69 63 20 43 6f 64 | 65 20 46 6f 72 20 74 68 |ific Cod|e For th|
|000025d0| 65 20 49 6e 74 65 6c 20 | 4d 50 20 50 6f 72 74 7d |e Intel |MP Port}|
|000025e0| 0a 54 68 65 20 61 72 63 | 68 69 74 65 63 74 75 72 |.The arc|hitectur|
|000025f0| 65 20 73 70 65 63 69 66 | 69 63 20 63 6f 64 65 20 |e specif|ic code |
|00002600| 66 6f 72 20 74 68 65 20 | 69 6e 74 65 6c 20 70 6f |for the |intel po|
|00002610| 72 74 20 73 70 6c 69 74 | 73 20 66 61 69 72 6c 79 |rt split|s fairly|
|00002620| 20 63 6c 65 61 6e 6c 79 | 20 0a 69 6e 74 6f 20 66 | cleanly| .into f|
|00002630| 6f 75 72 20 73 65 63 74 | 69 6f 6e 73 2e 20 46 69 |our sect|ions. Fi|
|00002640| 72 73 74 6c 79 20 74 68 | 65 20 69 6e 69 74 69 61 |rstly th|e initia|
|00002650| 6c 69 73 61 74 69 6f 6e | 20 63 6f 64 65 20 75 73 |lisation| code us|
|00002660| 65 64 20 74 6f 20 62 6f | 6f 74 20 74 68 65 20 0a |ed to bo|ot the .|
|00002670| 73 79 73 74 65 6d 2c 20 | 73 65 63 6f 6e 64 6c 79 |system, |secondly|
|00002680| 20 74 68 65 20 6d 65 73 | 73 61 67 65 20 68 61 6e | the mes|sage han|
|00002690| 64 6c 69 6e 67 20 61 6e | 64 20 73 75 70 70 6f 72 |dling an|d suppor|
|000026a0| 74 20 63 6f 64 65 2c 20 | 74 68 69 72 64 6c 79 20 |t code, |thirdly |
|000026b0| 74 68 65 20 0a 69 6e 74 | 65 72 72 75 70 74 20 61 |the .int|errupt a|
|000026c0| 6e 64 20 6b 65 72 6e 65 | 6c 20 73 79 73 63 61 6c |nd kerne|l syscal|
|000026d0| 6c 20 65 6e 74 72 79 20 | 66 75 6e 63 74 69 6f 6e |l entry |function|
|000026e0| 20 68 61 6e 64 6c 69 6e | 67 20 61 6e 64 20 66 69 | handlin|g and fi|
|000026f0| 6e 61 6c 6c 79 20 74 68 | 65 20 0a 65 78 74 65 6e |nally th|e .exten|
|00002700| 73 69 6f 6e 73 20 74 6f | 20 73 74 61 6e 64 61 72 |sions to| standar|
|00002710| 64 20 6b 65 72 6e 65 6c | 20 66 61 63 69 6c 69 74 |d kernel| facilit|
|00002720| 69 65 73 20 74 6f 20 63 | 6f 70 65 20 77 69 74 68 |ies to c|ope with|
|00002730| 20 6d 75 6c 74 69 70 6c | 65 20 70 72 6f 63 65 73 | multipl|e proces|
|00002740| 73 6f 72 73 2e 0a 0a 5c | 73 75 62 73 75 62 73 65 |sors...\|subsubse|
|00002750| 63 74 69 6f 6e 7b 49 6e | 69 74 69 61 6c 69 73 61 |ction{In|itialisa|
|00002760| 74 69 6f 6e 7d 09 0a 54 | 68 65 20 69 6e 74 65 6c |tion}..T|he intel|
|00002770| 20 4d 50 20 61 72 63 68 | 69 74 65 63 74 75 72 65 | MP arch|itecture|
|00002780| 20 63 61 70 74 75 72 65 | 73 20 61 6c 6c 20 74 68 | capture|s all th|
|00002790| 65 20 70 72 6f 63 65 73 | 73 6f 72 73 20 65 78 63 |e proces|sors exc|
|000027a0| 65 70 74 20 66 6f 72 20 | 61 20 73 69 6e 67 6c 65 |ept for |a single|
|000027b0| 20 0a 70 72 6f 63 65 73 | 73 6f 72 20 6b 6e 6f 77 | .proces|sor know|
|000027c0| 6e 20 61 73 20 74 68 65 | 20 27 62 6f 6f 74 20 70 |n as the| 'boot p|
|000027d0| 72 6f 63 65 73 73 6f 72 | 27 20 69 6e 20 74 68 65 |rocessor|' in the|
|000027e0| 20 42 49 4f 53 20 61 74 | 20 62 6f 6f 74 20 74 69 | BIOS at| boot ti|
|000027f0| 6d 65 2e 20 54 68 75 73 | 20 61 20 0a 73 69 6e 67 |me. Thus| a .sing|
|00002800| 6c 65 20 70 72 6f 63 65 | 73 73 6f 72 20 65 6e 74 |le proce|ssor ent|
|00002810| 65 72 73 20 74 68 65 20 | 6b 65 72 6e 65 6c 20 62 |ers the |kernel b|
|00002820| 6f 6f 74 75 70 20 63 6f | 64 65 2e 20 54 68 65 20 |ootup co|de. The |
|00002830| 66 69 72 73 74 20 70 72 | 6f 63 65 73 73 6f 72 20 |first pr|ocessor |
|00002840| 0a 65 78 65 63 75 74 65 | 73 20 74 68 65 20 62 6f |.execute|s the bo|
|00002850| 6f 74 73 74 72 61 70 20 | 63 6f 64 65 2c 20 6c 6f |otstrap |code, lo|
|00002860| 61 64 73 20 61 6e 64 20 | 75 6e 63 6f 6d 70 72 65 |ads and |uncompre|
|00002870| 73 73 65 73 20 74 68 65 | 20 6b 65 72 6e 65 6c 2e |sses the| kernel.|
|00002880| 20 48 61 76 69 6e 67 20 | 0a 75 6e 70 61 63 6b 65 | Having |.unpacke|
|00002890| 64 20 74 68 65 20 6b 65 | 72 6e 65 6c 20 69 74 20 |d the ke|rnel it |
|000028a0| 73 65 74 73 20 75 70 20 | 74 68 65 20 70 61 67 69 |sets up |the pagi|
|000028b0| 6e 67 20 61 6e 64 20 63 | 6f 6e 74 72 6f 6c 20 72 |ng and c|ontrol r|
|000028c0| 65 67 69 73 74 65 72 73 | 20 74 68 65 6e 20 65 6e |egisters| then en|
|000028d0| 74 65 72 73 20 0a 74 68 | 65 20 43 20 6b 65 72 6e |ters .th|e C kern|
|000028e0| 65 6c 20 73 74 61 72 74 | 75 70 2e 0a 0a 54 68 65 |el start|up...The|
|000028f0| 20 61 73 73 65 6d 62 6c | 65 72 20 73 74 61 72 74 | assembl|er start|
|00002900| 75 70 20 63 6f 64 65 20 | 66 6f 72 20 74 68 65 20 |up code |for the |
|00002910| 6b 65 72 6e 65 6c 20 69 | 73 20 6d 6f 64 69 66 69 |kernel i|s modifi|
|00002920| 65 64 20 73 6f 20 74 68 | 61 74 20 69 74 20 63 61 |ed so th|at it ca|
|00002930| 6e 20 62 65 20 0a 75 73 | 65 64 20 62 79 20 74 68 |n be .us|ed by th|
|00002940| 65 20 6f 74 68 65 72 20 | 70 72 6f 63 65 73 73 6f |e other |processo|
|00002950| 72 73 20 74 6f 20 64 6f | 20 74 68 65 20 70 72 6f |rs to do| the pro|
|00002960| 63 65 73 73 6f 72 20 69 | 64 65 6e 74 69 66 69 63 |cessor i|dentific|
|00002970| 61 74 69 6f 6e 20 61 6e | 64 20 76 61 72 69 6f 75 |ation an|d variou|
|00002980| 73 20 0a 6f 74 68 65 72 | 20 6c 6f 77 20 6c 65 76 |s .other| low lev|
|00002990| 65 6c 20 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e |el confi|guration|
|000029a0| 73 20 62 75 74 20 64 6f | 65 73 20 6e 6f 74 20 65 |s but do|es not e|
|000029b0| 78 65 63 75 74 65 20 74 | 68 6f 73 65 20 70 61 72 |xecute t|hose par|
|000029c0| 74 73 20 6f 66 20 74 68 | 65 20 0a 73 74 61 72 74 |ts of th|e .start|
|000029d0| 75 70 20 63 6f 64 65 20 | 74 68 61 74 20 77 6f 75 |up code |that wou|
|000029e0| 6c 64 20 64 61 6d 61 67 | 65 20 74 68 65 20 72 75 |ld damag|e the ru|
|000029f0| 6e 6e 69 6e 67 20 73 79 | 73 74 65 6d 20 28 73 75 |nning sy|stem (su|
|00002a00| 63 68 20 61 73 20 63 6c | 65 61 72 69 6e 67 20 74 |ch as cl|earing t|
|00002a10| 68 65 20 42 53 53 20 0a | 73 65 67 6d 65 6e 74 29 |he BSS .|segment)|
|00002a20| 2e 20 0a 0a 49 6e 20 74 | 68 65 20 69 6e 69 74 69 |. ..In t|he initi|
|00002a30| 61 6c 69 73 61 74 69 6f | 6e 20 64 6f 6e 65 20 62 |alisatio|n done b|
|00002a40| 79 20 74 68 65 20 66 69 | 72 73 74 20 70 72 6f 63 |y the fi|rst proc|
|00002a50| 65 73 73 6f 72 20 74 68 | 65 20 61 72 63 68 2f 69 |essor th|e arch/i|
|00002a60| 33 38 36 2f 6d 6d 2f 69 | 6e 69 74 20 0a 63 6f 64 |386/mm/i|nit .cod|
|00002a70| 65 20 69 73 20 6d 6f 64 | 69 66 69 65 64 20 74 6f |e is mod|ified to|
|00002a80| 20 73 63 61 6e 20 74 68 | 65 20 6c 6f 77 20 70 61 | scan th|e low pa|
|00002a90| 67 65 2c 20 74 6f 70 20 | 70 61 67 65 20 61 6e 64 |ge, top |page and|
|00002aa0| 20 42 49 4f 53 20 66 6f | 72 20 69 6e 74 65 6c 20 | BIOS fo|r intel |
|00002ab0| 4d 50 20 0a 73 69 67 6e | 61 74 75 72 65 20 62 6c |MP .sign|ature bl|
|00002ac0| 6f 63 6b 73 2e 20 54 68 | 69 73 20 69 73 20 6e 65 |ocks. Th|is is ne|
|00002ad0| 63 65 73 73 61 72 79 20 | 62 65 63 61 75 73 65 20 |cessary |because |
|00002ae0| 74 68 65 20 4d 50 20 73 | 69 67 6e 61 74 75 72 65 |the MP s|ignature|
|00002af0| 20 62 6c 6f 63 6b 73 20 | 6d 75 73 74 20 0a 62 65 | blocks |must .be|
|00002b00| 20 72 65 61 64 20 61 6e | 64 20 70 72 6f 63 65 73 | read an|d proces|
|00002b10| 73 65 64 20 62 65 66 6f | 72 65 20 74 68 65 20 6b |sed befo|re the k|
|00002b20| 65 72 6e 65 6c 20 69 73 | 20 61 6c 6c 6f 77 65 64 |ernel is| allowed|
|00002b30| 20 74 6f 20 61 6c 6c 6f | 63 61 74 65 20 61 6e 64 | to allo|cate and|
|00002b40| 20 64 65 73 74 72 6f 79 | 20 0a 74 68 65 20 70 61 | destroy| .the pa|
|00002b50| 67 65 20 61 74 20 74 68 | 65 20 74 6f 70 20 6f 66 |ge at th|e top of|
|00002b60| 20 6c 6f 77 20 6d 65 6d | 6f 72 79 2e 20 48 61 76 | low mem|ory. Hav|
|00002b70| 69 6e 67 20 65 73 74 61 | 62 6c 69 73 68 65 64 20 |ing esta|blished |
|00002b80| 74 68 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 0a 70 |the numb|er of .p|
|00002b90| 72 6f 63 65 73 73 6f 72 | 73 20 69 74 20 72 65 73 |rocessor|s it res|
|00002ba0| 65 72 76 65 73 20 61 20 | 73 65 74 20 6f 66 20 70 |erves a |set of p|
|00002bb0| 61 67 65 73 20 74 6f 20 | 70 72 6f 76 69 64 65 20 |ages to |provide |
|00002bc0| 61 20 73 74 61 63 6b 20 | 63 6f 6d 65 20 62 6f 6f |a stack |come boo|
|00002bd0| 74 20 75 70 20 61 72 65 | 61 20 0a 66 6f 72 20 65 |t up are|a .for e|
|00002be0| 61 63 68 20 70 72 6f 63 | 65 73 73 6f 72 20 69 6e |ach proc|essor in|
|00002bf0| 20 74 68 65 20 73 79 73 | 74 65 6d 2e 20 54 68 65 | the sys|tem. The|
|00002c00| 73 65 20 6d 75 73 74 20 | 62 65 20 61 6c 6c 6f 63 |se must |be alloc|
|00002c10| 61 74 65 64 20 61 74 20 | 73 74 61 72 74 75 70 20 |ated at |startup |
|00002c20| 74 6f 20 0a 65 6e 73 75 | 72 65 20 74 68 65 79 20 |to .ensu|re they |
|00002c30| 66 61 6c 6c 20 62 65 6c | 6f 77 20 74 68 65 20 31 |fall bel|ow the 1|
|00002c40| 4d 62 20 62 6f 75 6e 64 | 61 72 79 2e 0a 0a 46 75 |Mb bound|ary...Fu|
|00002c50| 72 74 68 65 72 20 70 72 | 6f 63 65 73 73 6f 72 73 |rther pr|ocessors|
|00002c60| 20 61 72 65 20 73 74 61 | 72 74 65 64 20 75 70 20 | are sta|rted up |
|00002c70| 69 6e 20 73 6d 70 5c 5f | 62 6f 6f 74 5c 5f 63 70 |in smp\_|boot\_cp|
|00002c80| 75 73 28 29 20 62 79 20 | 70 72 6f 67 72 61 6d 6d |us() by |programm|
|00002c90| 69 6e 67 20 74 68 65 20 | 0a 41 50 49 43 20 63 6f |ing the |.APIC co|
|00002ca0| 6e 74 72 6f 6c 6c 65 72 | 20 72 65 67 69 73 74 65 |ntroller| registe|
|00002cb0| 72 73 20 61 6e 64 20 73 | 65 6e 64 69 6e 67 20 61 |rs and s|ending a|
|00002cc0| 6e 20 69 6e 74 65 72 2d | 70 72 6f 63 65 73 73 6f |n inter-|processo|
|00002cd0| 72 20 69 6e 74 65 72 72 | 75 70 74 20 28 49 50 49 |r interr|upt (IPI|
|00002ce0| 29 20 74 6f 20 0a 74 68 | 65 20 70 72 6f 63 65 73 |) to .th|e proces|
|00002cf0| 73 6f 72 2e 20 54 68 69 | 73 20 6d 65 73 73 61 67 |sor. Thi|s messag|
|00002d00| 65 20 63 61 75 73 65 73 | 20 74 68 65 20 74 61 72 |e causes| the tar|
|00002d10| 67 65 74 20 70 72 6f 63 | 65 73 73 6f 72 20 74 6f |get proc|essor to|
|00002d20| 20 62 65 67 69 6e 20 65 | 78 65 63 75 74 69 6e 67 | begin e|xecuting|
|00002d30| 20 0a 63 6f 64 65 20 61 | 74 20 74 68 65 20 73 74 | .code a|t the st|
|00002d40| 61 72 74 20 6f 66 20 61 | 6e 79 20 70 61 67 65 20 |art of a|ny page |
|00002d50| 6f 66 20 6d 65 6d 6f 72 | 79 20 77 69 74 68 69 6e |of memor|y within|
|00002d60| 20 74 68 65 20 6c 6f 77 | 65 73 74 20 31 4d 62 2c | the low|est 1Mb,|
|00002d70| 20 69 6e 20 31 36 62 69 | 74 20 0a 72 65 61 6c 20 | in 16bi|t .real |
|00002d80| 6d 6f 64 65 2e 20 54 68 | 65 20 6b 65 72 6e 65 6c |mode. Th|e kernel|
|00002d90| 20 75 73 65 73 20 74 68 | 65 20 73 69 6e 67 6c 65 | uses th|e single|
|00002da0| 20 70 61 67 65 20 69 74 | 20 61 6c 6c 6f 63 61 74 | page it| allocat|
|00002db0| 65 64 20 66 6f 72 20 65 | 61 63 68 20 70 72 6f 63 |ed for e|ach proc|
|00002dc0| 65 73 73 6f 72 20 0a 74 | 6f 20 75 73 65 20 61 73 |essor .t|o use as|
|00002dd0| 20 73 74 61 63 6b 2e 20 | 42 65 66 6f 72 65 20 62 | stack. |Before b|
|00002de0| 6f 6f 74 69 6e 67 20 61 | 20 67 69 76 65 6e 20 43 |ooting a| given C|
|00002df0| 50 55 20 74 68 65 20 72 | 65 6c 6f 63 61 74 61 62 |PU the r|elocatab|
|00002e00| 6c 65 20 63 6f 64 65 20 | 66 72 6f 6d 20 0a 74 72 |le code |from .tr|
|00002e10| 61 6d 70 6f 6c 69 6e 65 | 2e 53 20 61 6e 64 20 74 |ampoline|.S and t|
|00002e20| 72 61 6d 70 6f 6c 69 6e | 65 33 32 2e 53 20 69 73 |rampolin|e32.S is|
|00002e30| 20 63 6f 70 69 65 64 20 | 74 6f 20 74 68 65 20 62 | copied |to the b|
|00002e40| 6f 74 74 6f 6d 20 6f 66 | 20 69 74 73 20 73 74 61 |ottom of| its sta|
|00002e50| 63 6b 20 70 61 67 65 20 | 0a 61 6e 64 20 75 73 65 |ck page |.and use|
|00002e60| 64 20 61 73 20 74 68 65 | 20 74 61 72 67 65 74 20 |d as the| target |
|00002e70| 66 6f 72 20 74 68 65 20 | 73 74 61 72 74 75 70 2e |for the |startup.|
|00002e80| 20 0a 0a 54 68 65 20 74 | 72 61 6d 70 6f 6c 69 6e | ..The t|rampolin|
|00002e90| 65 20 63 6f 64 65 20 63 | 61 6c 63 75 6c 61 74 65 |e code c|alculate|
|00002ea0| 73 20 74 68 65 20 64 65 | 73 69 72 65 64 20 73 74 |s the de|sired st|
|00002eb0| 61 63 6b 20 62 61 73 65 | 20 66 72 6f 6d 20 74 68 |ack base| from th|
|00002ec0| 65 20 63 6f 64 65 20 0a | 73 65 67 6d 65 6e 74 20 |e code .|segment |
|00002ed0| 28 73 69 6e 63 65 20 74 | 68 65 20 63 6f 64 65 20 |(since t|he code |
|00002ee0| 73 65 67 6d 65 6e 74 20 | 6f 6e 20 73 74 61 72 74 |segment |on start|
|00002ef0| 75 70 20 69 73 20 74 68 | 65 20 62 6f 74 74 6f 6d |up is th|e bottom|
|00002f00| 20 6f 66 20 74 68 65 20 | 73 74 61 63 6b 29 2c 20 | of the |stack), |
|00002f10| 0a 20 65 6e 74 65 72 73 | 20 33 32 62 69 74 20 6d |. enters| 32bit m|
|00002f20| 6f 64 65 20 61 6e 64 20 | 6a 75 6d 70 73 20 74 6f |ode and |jumps to|
|00002f30| 20 74 68 65 20 6b 65 72 | 6e 65 6c 20 65 6e 74 72 | the ker|nel entr|
|00002f40| 79 20 61 73 73 65 6d 62 | 6c 65 72 2e 20 54 68 69 |y assemb|ler. Thi|
|00002f50| 73 20 61 73 20 0a 64 65 | 73 63 72 69 62 65 64 20 |s as .de|scribed |
|00002f60| 61 62 6f 76 65 20 69 73 | 20 6d 6f 64 69 66 69 65 |above is| modifie|
|00002f70| 64 20 74 6f 20 6f 6e 6c | 79 20 65 78 65 63 75 74 |d to onl|y execut|
|00002f80| 65 20 74 68 65 20 70 61 | 72 74 73 20 6e 65 63 65 |e the pa|rts nece|
|00002f90| 73 73 61 72 79 20 66 6f | 72 20 65 61 63 68 20 0a |ssary fo|r each .|
|00002fa0| 70 72 6f 63 65 73 73 6f | 72 2c 20 61 6e 64 20 74 |processo|r, and t|
|00002fb0| 68 65 6e 20 74 6f 20 65 | 6e 74 65 72 20 73 74 61 |hen to e|nter sta|
|00002fc0| 72 74 5c 5f 6b 65 72 6e | 65 6c 28 29 2e 20 4f 6e |rt\_kern|el(). On|
|00002fd0| 20 65 6e 74 65 72 69 6e | 67 20 74 68 65 20 6b 65 | enterin|g the ke|
|00002fe0| 72 6e 65 6c 20 74 68 65 | 20 0a 70 72 6f 63 65 73 |rnel the| .proces|
|00002ff0| 73 6f 72 20 69 6e 69 74 | 69 61 6c 69 73 65 73 20 |sor init|ialises |
|00003000| 69 74 73 20 74 72 61 70 | 20 61 6e 64 20 69 6e 74 |its trap| and int|
|00003010| 65 72 72 75 70 74 20 68 | 61 6e 64 6c 65 72 73 20 |errupt h|andlers |
|00003020| 62 65 66 6f 72 65 20 65 | 6e 74 65 72 69 6e 67 20 |before e|ntering |
|00003030| 0a 73 6d 70 5c 5f 63 61 | 6c 6c 69 6e 28 29 2c 20 |.smp\_ca|llin(), |
|00003040| 77 68 65 72 65 20 69 74 | 20 72 65 70 6f 72 74 73 |where it| reports|
|00003050| 20 69 74 73 20 73 74 61 | 74 75 73 20 61 6e 64 20 | its sta|tus and |
|00003060| 73 65 74 73 20 61 20 66 | 6c 61 67 20 74 68 61 74 |sets a f|lag that|
|00003070| 20 63 61 75 73 65 73 20 | 74 68 65 20 0a 62 6f 6f | causes |the .boo|
|00003080| 74 20 70 72 6f 63 65 73 | 73 6f 72 20 74 6f 20 63 |t proces|sor to c|
|00003090| 6f 6e 74 69 6e 75 65 20 | 61 6e 64 20 6c 6f 6f 6b |ontinue |and look|
|000030a0| 20 66 6f 72 20 66 75 72 | 74 68 65 72 20 70 72 6f | for fur|ther pro|
|000030b0| 63 65 73 73 6f 72 73 2e | 20 54 68 65 20 70 72 6f |cessors.| The pro|
|000030c0| 63 65 73 73 6f 72 20 0a | 74 68 65 6e 20 73 70 69 |cessor .|then spi|
|000030d0| 6e 73 20 75 6e 74 69 6c | 20 73 6d 70 5c 5f 63 6f |ns until| smp\_co|
|000030e0| 6d 6d 65 6e 63 65 28 29 | 20 69 73 20 69 6e 76 6f |mmence()| is invo|
|000030f0| 6b 65 64 2e 0a 0a 48 61 | 76 69 6e 67 20 73 74 61 |ked...Ha|ving sta|
|00003100| 72 74 65 64 20 65 61 63 | 68 20 70 72 6f 63 65 73 |rted eac|h proces|
|00003110| 73 6f 72 20 75 70 20 74 | 68 65 20 73 6d 70 5c 5f |sor up t|he smp\_|
|00003120| 63 6f 6d 6d 65 6e 63 65 | 28 20 29 20 66 75 6e 63 |commence|( ) func|
|00003130| 74 69 6f 6e 20 66 6c 69 | 70 73 20 61 20 0a 66 6c |tion fli|ps a .fl|
|00003140| 61 67 2e 20 45 61 63 68 | 20 70 72 6f 63 65 73 73 |ag. Each| process|
|00003150| 6f 72 20 73 70 69 6e 6e | 69 6e 67 20 69 6e 20 73 |or spinn|ing in s|
|00003160| 6d 70 5c 5f 63 61 6c 6c | 69 6e 28 29 20 74 68 65 |mp\_call|in() the|
|00003170| 6e 20 6c 6f 61 64 73 20 | 74 68 65 20 74 61 73 6b |n loads |the task|
|00003180| 20 72 65 67 69 73 74 65 | 72 20 0a 77 69 74 68 20 | registe|r .with |
|00003190| 74 68 65 20 74 61 73 6b | 20 73 74 61 74 65 20 73 |the task| state s|
|000031a0| 65 67 6d 65 6e 74 20 28 | 54 53 53 29 20 6f 66 20 |egment (|TSS) of |
|000031b0| 69 74 73 20 69 64 6c 65 | 20 74 68 72 65 61 64 20 |its idle| thread |
|000031c0| 61 73 20 69 73 20 6e 65 | 65 64 65 64 20 66 6f 72 |as is ne|eded for|
|000031d0| 20 74 61 73 6b 20 0a 73 | 77 69 74 63 68 69 6e 67 | task .s|witching|
|000031e0| 2e 0a 0a 5c 73 75 62 73 | 75 62 73 65 63 74 69 6f |...\subs|ubsectio|
|000031f0| 6e 7b 4d 65 73 73 61 67 | 65 20 48 61 6e 64 6c 69 |n{Messag|e Handli|
|00003200| 6e 67 20 61 6e 64 20 53 | 75 70 70 6f 72 74 20 43 |ng and S|upport C|
|00003210| 6f 64 65 7d 0a 54 68 65 | 20 61 72 63 68 69 74 65 |ode}.The| archite|
|00003220| 63 74 75 72 65 20 73 70 | 65 63 69 66 69 63 20 63 |cture sp|ecific c|
|00003230| 6f 64 65 20 69 6d 70 6c | 65 6d 65 6e 74 73 20 74 |ode impl|ements t|
|00003240| 68 65 20 73 6d 70 5c 5f | 70 72 6f 63 65 73 73 6f |he smp\_|processo|
|00003250| 72 5c 5f 69 64 28 29 20 | 66 75 6e 63 74 69 6f 6e |r\_id() |function|
|00003260| 20 0a 62 79 20 71 75 65 | 72 79 69 6e 67 20 74 68 | .by que|rying th|
|00003270| 65 20 41 50 49 43 20 6c | 6f 67 69 63 61 6c 20 69 |e APIC l|ogical i|
|00003280| 64 65 6e 74 69 74 79 20 | 72 65 67 69 73 74 65 72 |dentity |register|
|00003290| 2e 20 42 65 63 61 75 73 | 65 20 74 68 65 20 41 50 |. Becaus|e the AP|
|000032a0| 49 43 20 69 73 6e 27 74 | 20 0a 6d 61 70 70 65 64 |IC isn't| .mapped|
|000032b0| 20 69 6e 74 6f 20 74 68 | 65 20 6b 65 72 6e 65 6c | into th|e kernel|
|000032c0| 20 61 64 64 72 65 73 73 | 20 73 70 61 63 65 20 61 | address| space a|
|000032d0| 74 20 62 6f 6f 74 2c 20 | 74 68 65 20 69 6e 69 74 |t boot, |the init|
|000032e0| 69 61 6c 20 76 61 6c 75 | 65 20 72 65 74 75 72 6e |ial valu|e return|
|000032f0| 65 64 20 69 73 20 0a 72 | 69 67 67 65 64 20 62 79 |ed is .r|igged by|
|00003300| 20 73 65 74 74 69 6e 67 | 20 74 68 65 20 41 50 49 | setting| the API|
|00003310| 43 20 62 61 73 65 20 70 | 6f 69 6e 74 65 72 20 74 |C base p|ointer t|
|00003320| 6f 20 70 6f 69 6e 74 20 | 61 74 20 61 20 73 75 69 |o point |at a sui|
|00003330| 74 61 62 6c 65 20 63 6f | 6e 73 74 61 6e 74 2e 20 |table co|nstant. |
|00003340| 0a 4f 6e 63 65 20 74 68 | 65 20 73 79 73 74 65 6d |.Once th|e system|
|00003350| 20 73 74 61 72 74 73 20 | 64 6f 69 6e 67 20 74 68 | starts |doing th|
|00003360| 65 20 53 4d 50 20 73 65 | 74 75 70 20 28 69 6e 20 |e SMP se|tup (in |
|00003370| 73 6d 70 5c 5f 62 6f 6f | 74 5c 5f 63 70 75 73 28 |smp\_boo|t\_cpus(|
|00003380| 29 29 2c 20 74 68 65 20 | 41 50 49 43 20 0a 69 73 |)), the |APIC .is|
|00003390| 20 6d 61 70 70 65 64 20 | 77 69 74 68 20 61 20 76 | mapped |with a v|
|000033a0| 72 65 6d 61 70 28 29 20 | 63 61 6c 6c 20 61 6e 64 |remap() |call and|
|000033b0| 20 74 68 65 20 61 70 69 | 63 20 70 6f 69 6e 74 65 | the api|c pointe|
|000033c0| 72 20 69 73 20 61 64 6a | 75 73 74 65 64 20 0a 61 |r is adj|usted .a|
|000033d0| 70 70 72 6f 70 72 69 61 | 74 65 6c 79 2e 20 46 72 |ppropria|tely. Fr|
|000033e0| 6f 6d 20 74 68 65 6e 20 | 6f 6e 20 74 68 65 20 72 |om then |on the r|
|000033f0| 65 61 6c 20 41 50 49 43 | 20 6c 6f 67 69 63 61 6c |eal APIC| logical|
|00003400| 20 69 64 65 6e 74 69 74 | 79 20 72 65 67 69 73 74 | identit|y regist|
|00003410| 65 72 20 69 73 20 0a 72 | 65 61 64 2e 0a 0a 4d 65 |er is .r|ead...Me|
|00003420| 73 73 61 67 65 20 70 61 | 73 73 69 6e 67 20 69 73 |ssage pa|ssing is|
|00003430| 20 61 63 63 6f 6d 70 6c | 69 73 68 65 64 20 75 73 | accompl|ished us|
|00003440| 69 6e 67 20 61 20 70 61 | 69 72 20 6f 66 20 49 50 |ing a pa|ir of IP|
|00003450| 49 27 73 20 6f 6e 20 69 | 6e 74 65 72 72 75 70 74 |I's on i|nterrupt|
|00003460| 20 31 33 20 0a 28 75 6e | 75 73 65 64 20 62 79 20 | 13 .(un|used by |
|00003470| 74 68 65 20 38 30 34 38 | 36 20 46 50 55 27 73 20 |the 8048|6 FPU's |
|00003480| 69 6e 20 53 4d 50 20 6d | 6f 64 65 29 20 61 6e 64 |in SMP m|ode) and|
|00003490| 20 69 6e 74 65 72 72 75 | 70 74 20 31 36 2e 20 54 | interru|pt 16. T|
|000034a0| 77 6f 20 61 72 65 20 75 | 73 65 64 20 69 6e 20 0a |wo are u|sed in .|
|000034b0| 6f 72 64 65 72 20 74 6f | 20 73 65 70 61 72 61 74 |order to| separat|
|000034c0| 65 20 6d 65 73 73 61 67 | 65 73 20 74 68 61 74 20 |e messag|es that |
|000034d0| 63 61 6e 6e 6f 74 20 62 | 65 20 70 72 6f 63 65 73 |cannot b|e proces|
|000034e0| 73 65 64 20 75 6e 74 69 | 6c 20 74 68 65 20 72 65 |sed unti|l the re|
|000034f0| 63 65 69 76 65 72 20 0a | 6f 62 74 61 69 6e 73 20 |ceiver .|obtains |
|00003500| 74 68 65 20 6b 65 72 6e | 65 6c 20 73 70 69 6e 6c |the kern|el spinl|
|00003510| 6f 63 6b 20 66 72 6f 6d | 20 6d 65 73 73 61 67 65 |ock from| message|
|00003520| 73 20 74 68 61 74 20 63 | 61 6e 20 62 65 20 70 72 |s that c|an be pr|
|00003530| 6f 63 65 73 73 65 64 20 | 0a 69 6d 6d 65 64 69 61 |ocessed |.immedia|
|00003540| 74 65 6c 79 2e 20 49 6e | 20 65 66 66 65 63 74 20 |tely. In| effect |
|00003550| 49 52 51 20 31 33 20 69 | 73 20 61 20 66 61 73 74 |IRQ 13 i|s a fast|
|00003560| 20 49 52 51 20 68 61 6e | 64 6c 65 72 20 74 68 61 | IRQ han|dler tha|
|00003570| 74 20 64 6f 65 73 20 6e | 6f 74 20 6f 62 74 61 69 |t does n|ot obtai|
|00003580| 6e 20 0a 74 68 65 20 6c | 6f 63 6b 73 2c 20 61 6e |n .the l|ocks, an|
|00003590| 64 20 63 61 6e 6e 6f 74 | 20 63 61 75 73 65 20 61 |d cannot| cause a|
|000035a0| 20 72 65 73 63 68 65 64 | 75 6c 65 2c 20 77 68 69 | resched|ule, whi|
|000035b0| 6c 65 20 49 52 51 20 31 | 36 20 69 73 20 61 20 73 |le IRQ 1|6 is a s|
|000035c0| 6c 6f 77 20 49 52 51 20 | 74 68 61 74 20 0a 6d 75 |low IRQ |that .mu|
|000035d0| 73 74 20 61 63 71 75 69 | 72 65 20 74 68 65 20 6b |st acqui|re the k|
|000035e0| 65 72 6e 65 6c 20 73 70 | 69 6e 6c 6f 63 6b 73 20 |ernel sp|inlocks |
|000035f0| 61 6e 64 20 63 61 6e 20 | 63 61 75 73 65 20 61 20 |and can |cause a |
|00003600| 72 65 73 63 68 65 64 75 | 6c 65 2e 20 54 68 69 73 |reschedu|le. This|
|00003610| 20 0a 69 6e 74 65 72 72 | 75 70 74 20 69 73 20 75 | .interr|upt is u|
|00003620| 73 65 64 20 66 6f 72 20 | 70 61 73 73 69 6e 67 20 |sed for |passing |
|00003630| 6f 6e 20 73 6c 61 76 65 | 20 74 69 6d 65 72 20 6d |on slave| timer m|
|00003640| 65 73 73 61 67 65 73 20 | 66 72 6f 6d 20 74 68 65 |essages |from the|
|00003650| 20 70 72 6f 63 65 73 73 | 6f 72 20 0a 74 68 61 74 | process|or .that|
|00003660| 20 72 65 63 65 69 76 65 | 73 20 74 68 65 20 74 69 | receive|s the ti|
|00003670| 6d 65 72 20 69 6e 74 65 | 72 72 75 70 74 20 74 6f |mer inte|rrupt to|
|00003680| 20 74 68 65 20 72 65 73 | 74 20 6f 66 20 74 68 65 | the res|t of the|
|00003690| 20 70 72 6f 63 65 73 73 | 6f 72 73 2c 20 73 6f 20 | process|ors, so |
|000036a0| 74 68 61 74 20 0a 74 68 | 65 79 20 63 61 6e 20 72 |that .th|ey can r|
|000036b0| 65 73 63 68 65 64 75 6c | 65 20 72 75 6e 6e 69 6e |eschedul|e runnin|
|000036c0| 67 20 74 61 73 6b 73 2e | 0a 0a 0a 5c 73 75 62 73 |g tasks.|...\subs|
|000036d0| 75 62 73 65 63 74 69 6f | 6e 7b 45 6e 74 72 79 20 |ubsectio|n{Entry |
|000036e0| 41 6e 64 20 45 78 69 74 | 20 43 6f 64 65 7d 0a 41 |And Exit| Code}.A|
|000036f0| 20 73 69 6e 67 6c 65 20 | 73 70 69 6e 6c 6f 63 6b | single |spinlock|
|00003700| 20 70 72 6f 74 65 63 74 | 73 20 74 68 65 20 65 6e | protect|s the en|
|00003710| 74 69 72 65 20 6b 65 72 | 6e 65 6c 2e 20 54 68 65 |tire ker|nel. The|
|00003720| 20 69 6e 74 65 72 72 75 | 70 74 20 68 61 6e 64 6c | interru|pt handl|
|00003730| 65 72 73 2c 20 74 68 65 | 20 0a 73 79 73 63 61 6c |ers, the| .syscal|
|00003740| 6c 20 65 6e 74 72 79 20 | 63 6f 64 65 20 61 6e 64 |l entry |code and|
|00003750| 20 74 68 65 20 65 78 63 | 65 70 74 69 6f 6e 20 68 | the exc|eption h|
|00003760| 61 6e 64 6c 65 72 73 20 | 61 6c 6c 20 61 63 71 75 |andlers |all acqu|
|00003770| 69 72 65 20 74 68 65 20 | 6c 6f 63 6b 20 62 65 66 |ire the |lock bef|
|00003780| 6f 72 65 20 0a 65 6e 74 | 65 72 69 6e 67 20 74 68 |ore .ent|ering th|
|00003790| 65 20 6b 65 72 6e 65 6c | 20 70 72 6f 70 65 72 2e |e kernel| proper.|
|000037a0| 20 57 68 65 6e 20 74 68 | 65 20 70 72 6f 63 65 73 | When th|e proces|
|000037b0| 73 6f 72 20 69 73 20 74 | 72 79 69 6e 67 20 74 6f |sor is t|rying to|
|000037c0| 20 61 63 71 75 69 72 65 | 20 74 68 65 20 0a 73 70 | acquire| the .sp|
|000037d0| 69 6e 6c 6f 63 6b 20 69 | 74 20 73 70 69 6e 73 20 |inlock i|t spins |
|000037e0| 63 6f 6e 74 69 6e 75 61 | 6c 6c 79 20 6f 6e 20 74 |continua|lly on t|
|000037f0| 68 65 20 6c 6f 63 6b 20 | 77 69 74 68 20 69 6e 74 |he lock |with int|
|00003800| 65 72 72 75 70 74 73 20 | 64 69 73 61 62 6c 65 64 |errupts |disabled|
|00003810| 2e 20 54 68 69 73 20 0a | 63 61 75 73 65 73 20 61 |. This .|causes a|
|00003820| 20 73 70 65 63 69 66 69 | 63 20 64 65 61 64 6c 6f | specifi|c deadlo|
|00003830| 63 6b 20 70 72 6f 62 6c | 65 6d 2e 20 54 68 65 20 |ck probl|em. The |
|00003840| 6c 6f 63 6b 20 6f 77 6e | 65 72 20 6d 61 79 20 6e |lock own|er may n|
|00003850| 65 65 64 20 74 6f 20 73 | 65 6e 64 20 61 6e 20 0a |eed to s|end an .|
|00003860| 69 6e 76 61 6c 69 64 61 | 74 65 20 72 65 71 75 65 |invalida|te reque|
|00003870| 73 74 20 74 6f 20 74 68 | 65 20 72 65 73 74 20 6f |st to th|e rest o|
|00003880| 66 20 74 68 65 20 70 72 | 6f 63 65 73 73 6f 72 73 |f the pr|ocessors|
|00003890| 20 61 6e 64 20 77 61 69 | 74 20 66 6f 72 20 74 68 | and wai|t for th|
|000038a0| 65 73 65 20 74 6f 20 0a | 63 6f 6d 70 6c 65 74 65 |ese to .|complete|
|000038b0| 20 62 65 66 6f 72 65 20 | 63 6f 6e 74 69 6e 75 69 | before |continui|
|000038c0| 6e 67 2e 20 41 20 70 72 | 6f 63 65 73 73 6f 72 20 |ng. A pr|ocessor |
|000038d0| 73 70 69 6e 6e 69 6e 67 | 20 6f 6e 20 74 68 65 20 |spinning| on the |
|000038e0| 6c 6f 63 6b 20 77 6f 75 | 6c 64 20 6e 6f 74 20 62 |lock wou|ld not b|
|000038f0| 65 20 0a 61 62 6c 65 20 | 74 6f 20 64 6f 20 74 68 |e .able |to do th|
|00003900| 75 73 2e 20 54 68 75 73 | 20 74 68 65 20 6c 6f 6f |us. Thus| the loo|
|00003910| 70 20 6f 66 20 74 68 65 | 20 73 70 69 6e 6c 6f 63 |p of the| spinloc|
|00003920| 6b 20 74 65 73 74 73 20 | 61 6e 64 20 68 61 6e 64 |k tests |and hand|
|00003930| 6c 65 73 20 69 6e 76 61 | 6c 69 64 61 74 65 20 0a |les inva|lidate .|
|00003940| 72 65 71 75 65 73 74 73 | 2e 20 49 66 20 74 68 65 |requests|. If the|
|00003950| 20 69 6e 76 61 6c 69 64 | 61 74 65 20 62 69 74 20 | invalid|ate bit |
|00003960| 66 6f 72 20 74 68 65 20 | 73 70 69 6e 6e 69 6e 67 |for the |spinning|
|00003970| 20 43 50 55 20 69 73 20 | 73 65 74 20 74 68 65 20 | CPU is |set the |
|00003980| 70 72 6f 63 65 73 73 6f | 72 20 0a 69 6e 76 61 6c |processo|r .inval|
|00003990| 69 64 61 74 65 73 20 69 | 74 73 20 54 4c 42 20 61 |idates i|ts TLB a|
|000039a0| 6e 64 20 61 74 6f 6d 69 | 63 61 6c 6c 79 20 63 6c |nd atomi|cally cl|
|000039b0| 65 61 72 73 20 74 68 65 | 20 62 69 74 2e 20 57 68 |ears the| bit. Wh|
|000039c0| 65 6e 20 74 68 65 20 73 | 70 69 6e 6c 6f 63 6b 20 |en the s|pinlock |
|000039d0| 69 73 20 0a 6f 62 74 61 | 69 6e 65 64 20 74 68 61 |is .obta|ined tha|
|000039e0| 74 20 70 72 6f 63 65 73 | 73 6f 72 20 77 69 6c 6c |t proces|sor will|
|000039f0| 20 74 61 6b 65 20 61 6e | 20 49 50 49 20 61 6e 64 | take an| IPI and|
|00003a00| 20 69 6e 20 74 68 65 20 | 49 50 49 20 74 65 73 74 | in the |IPI test|
|00003a10| 20 74 68 65 20 62 69 74 | 20 61 6e 64 20 0a 73 6b | the bit| and .sk|
|00003a20| 69 70 20 74 68 65 20 69 | 6e 76 61 6c 69 64 61 74 |ip the i|nvalidat|
|00003a30| 65 20 61 73 20 74 68 65 | 20 62 69 74 20 69 73 20 |e as the| bit is |
|00003a40| 63 6c 65 61 72 2e 0a 0a | 4f 6e 65 20 63 6f 6d 70 |clear...|One comp|
|00003a50| 6c 65 78 69 74 79 20 6f | 66 20 74 68 65 20 73 70 |lexity o|f the sp|
|00003a60| 69 6e 6c 6f 63 6b 20 69 | 73 20 74 68 61 74 20 61 |inlock i|s that a|
|00003a70| 20 70 72 6f 63 65 73 73 | 20 72 75 6e 6e 69 6e 67 | process| running|
|00003a80| 20 69 6e 20 6b 65 72 6e | 65 6c 20 6d 6f 64 65 20 | in kern|el mode |
|00003a90| 0a 63 61 6e 20 73 6c 65 | 65 70 20 76 6f 6c 75 6e |.can sle|ep volun|
|00003aa0| 74 61 72 69 6c 79 20 61 | 6e 64 20 62 65 20 70 72 |tarily a|nd be pr|
|00003ab0| 65 2d 65 6d 70 74 65 64 | 2e 20 41 20 73 77 69 74 |e-empted|. A swit|
|00003ac0| 63 68 20 66 72 6f 6d 20 | 73 75 63 68 20 61 20 70 |ch from |such a p|
|00003ad0| 72 6f 63 65 73 73 20 74 | 6f 20 61 20 0a 70 72 6f |rocess t|o a .pro|
|00003ae0| 63 65 73 73 20 65 78 65 | 63 75 74 69 6e 67 20 69 |cess exe|cuting i|
|00003af0| 6e 20 75 73 65 72 20 73 | 70 61 63 65 20 6d 61 79 |n user s|pace may|
|00003b00| 20 72 65 64 75 63 65 20 | 74 68 65 20 6c 6f 63 6b | reduce |the lock|
|00003b10| 20 63 6f 75 6e 74 2e 20 | 54 6f 20 74 72 61 63 6b | count. |To track|
|00003b20| 20 74 68 69 73 20 0a 74 | 68 65 20 6b 65 72 6e 65 | this .t|he kerne|
|00003b30| 6c 20 75 73 65 73 20 61 | 20 73 79 73 63 61 6c 6c |l uses a| syscall|
|00003b40| 5c 5f 63 6f 75 6e 74 20 | 61 6e 64 20 61 20 70 65 |\_count |and a pe|
|00003b50| 72 20 70 72 6f 63 65 73 | 73 20 6c 6f 63 6b 5c 5f |r proces|s lock\_|
|00003b60| 64 65 70 74 68 20 70 61 | 72 61 6d 65 74 65 72 20 |depth pa|rameter |
|00003b70| 74 6f 20 0a 74 72 61 63 | 6b 20 74 68 65 20 6b 65 |to .trac|k the ke|
|00003b80| 72 6e 65 6c 20 6c 6f 63 | 6b 20 73 74 61 74 65 2e |rnel loc|k state.|
|00003b90| 20 54 68 65 20 73 77 69 | 74 63 68 5c 5f 74 6f 28 | The swi|tch\_to(|
|00003ba0| 29 20 66 75 6e 63 74 69 | 6f 6e 20 69 73 20 6d 6f |) functi|on is mo|
|00003bb0| 64 69 66 69 65 64 20 69 | 6e 20 53 4d 50 20 0a 6d |dified i|n SMP .m|
|00003bc0| 6f 64 65 20 74 6f 20 61 | 64 6a 75 73 74 20 74 68 |ode to a|djust th|
|00003bd0| 65 20 6c 6f 63 6b 20 61 | 70 70 72 6f 70 72 69 61 |e lock a|ppropria|
|00003be0| 74 65 6c 79 2e 0a 0a 54 | 68 65 20 66 69 6e 61 6c |tely...T|he final|
|00003bf0| 20 70 72 6f 62 6c 65 6d | 20 69 73 20 74 68 65 20 | problem| is the |
|00003c00| 69 64 6c 65 20 74 68 72 | 65 61 64 2e 20 49 6e 20 |idle thr|ead. In |
|00003c10| 74 68 65 20 73 69 6e 67 | 6c 65 20 70 72 6f 63 65 |the sing|le proce|
|00003c20| 73 73 6f 72 20 6b 65 72 | 6e 65 6c 20 74 68 65 20 |ssor ker|nel the |
|00003c30| 0a 69 64 6c 65 20 74 68 | 72 65 61 64 20 65 78 65 |.idle th|read exe|
|00003c40| 63 75 74 65 73 20 27 68 | 6c 74 27 20 69 6e 73 74 |cutes 'h|lt' inst|
|00003c50| 72 75 63 74 69 6f 6e 73 | 2e 20 54 68 69 73 20 73 |ructions|. This s|
|00003c60| 61 76 65 73 20 70 6f 77 | 65 72 20 61 6e 64 20 72 |aves pow|er and r|
|00003c70| 65 64 75 63 65 73 20 74 | 68 65 20 0a 72 75 6e 6e |educes t|he .runn|
|00003c80| 69 6e 67 20 74 65 6d 70 | 65 72 61 74 75 72 65 20 |ing temp|erature |
|00003c90| 6f 66 20 74 68 65 20 70 | 72 6f 63 65 73 73 6f 72 |of the p|rocessor|
|00003ca0| 73 20 77 68 65 6e 20 74 | 68 65 79 20 61 72 65 20 |s when t|hey are |
|00003cb0| 69 64 6c 65 2e 20 48 6f | 77 65 76 65 72 20 69 74 |idle. Ho|wever it|
|00003cc0| 20 6d 65 61 6e 73 20 0a | 74 68 65 20 70 72 6f 63 | means .|the proc|
|00003cd0| 65 73 73 20 73 70 65 6e | 64 73 20 61 6c 6c 20 69 |ess spen|ds all i|
|00003ce0| 74 73 20 74 69 6d 65 20 | 69 6e 20 6b 65 72 6e 65 |ts time |in kerne|
|00003cf0| 6c 20 6d 6f 64 65 20 61 | 6e 64 20 77 6f 75 6c 64 |l mode a|nd would|
|00003d00| 20 74 68 75 73 20 68 6f | 6c 64 20 74 68 65 20 0a | thus ho|ld the .|
|00003d10| 6b 65 72 6e 65 6c 20 73 | 70 69 6e 6c 6f 63 6b 2e |kernel s|pinlock.|
|00003d20| 20 54 68 65 20 53 4d 50 | 20 69 64 6c 65 20 74 68 | The SMP| idle th|
|00003d30| 72 65 61 64 20 63 6f 6e | 74 69 6e 75 61 6c 6c 79 |read con|tinually|
|00003d40| 20 72 65 73 63 68 65 64 | 75 6c 65 73 20 61 20 6e | resched|ules a n|
|00003d50| 65 77 20 74 61 73 6b 20 | 61 6e 64 20 0a 72 65 74 |ew task |and .ret|
|00003d60| 75 72 6e 73 20 74 6f 20 | 75 73 65 72 20 6d 6f 64 |urns to |user mod|
|00003d70| 65 2e 20 54 68 69 73 20 | 69 73 20 66 61 72 20 66 |e. This |is far f|
|00003d80| 72 6f 6d 20 69 64 65 61 | 6c 20 61 6e 64 20 77 69 |rom idea|l and wi|
|00003d90| 6c 6c 20 62 65 20 6d 6f | 64 69 66 69 65 64 20 74 |ll be mo|dified t|
|00003da0| 6f 20 75 73 65 20 0a 27 | 68 6c 74 27 20 69 6e 73 |o use .'|hlt' ins|
|00003db0| 74 72 75 63 74 69 6f 6e | 73 20 61 6e 64 20 72 65 |truction|s and re|
|00003dc0| 6c 65 61 73 65 20 74 68 | 65 20 73 70 69 6e 6c 6f |lease th|e spinlo|
|00003dd0| 63 6b 20 73 6f 6f 6e 2e | 20 55 73 69 6e 67 20 27 |ck soon.| Using '|
|00003de0| 68 6c 74 27 20 69 73 20 | 65 76 65 6e 20 6d 6f 72 |hlt' is |even mor|
|00003df0| 65 20 0a 62 65 6e 65 66 | 69 63 69 61 6c 20 6f 6e |e .benef|icial on|
|00003e00| 20 61 20 6d 75 6c 74 69 | 70 72 6f 63 65 73 73 6f | a multi|processo|
|00003e10| 72 20 73 79 73 74 65 6d | 20 61 73 20 69 74 20 61 |r system| as it a|
|00003e20| 6c 6d 6f 73 74 20 63 6f | 6d 70 6c 65 74 65 6c 79 |lmost co|mpletely|
|00003e30| 20 74 61 6b 65 73 20 61 | 6e 20 69 64 6c 65 20 0a | takes a|n idle .|
|00003e40| 70 72 6f 63 65 73 73 6f | 72 20 6f 66 66 20 74 68 |processo|r off th|
|00003e50| 65 20 62 75 73 2e 0a 0a | 49 6e 74 65 72 72 75 70 |e bus...|Interrup|
|00003e60| 74 73 20 61 72 65 20 64 | 69 73 74 72 69 62 75 74 |ts are d|istribut|
|00003e70| 65 64 20 62 79 20 61 6e | 20 69 38 32 34 38 39 20 |ed by an| i82489 |
|00003e80| 41 50 49 43 2e 20 54 68 | 69 73 20 63 68 69 70 20 |APIC. Th|is chip |
|00003e90| 69 73 20 73 65 74 20 75 | 70 20 74 6f 20 77 6f 72 |is set u|p to wor|
|00003ea0| 6b 20 0a 61 73 20 61 6e | 20 65 6d 75 6c 61 74 69 |k .as an| emulati|
|00003eb0| 6f 6e 20 6f 66 20 74 68 | 65 20 74 72 61 64 69 74 |on of th|e tradit|
|00003ec0| 69 6f 6e 61 6c 20 50 43 | 20 69 6e 74 65 72 72 75 |ional PC| interru|
|00003ed0| 70 74 20 63 6f 6e 74 72 | 6f 6c 6c 65 72 73 20 77 |pt contr|ollers w|
|00003ee0| 68 65 6e 20 74 68 65 20 | 0a 6d 61 63 68 69 6e 65 |hen the |.machine|
|00003ef0| 20 62 6f 6f 74 73 20 28 | 73 6f 20 74 68 61 74 20 | boots (|so that |
|00003f00| 61 6e 20 49 6e 74 65 6c | 20 4d 50 20 6d 61 63 68 |an Intel| MP mach|
|00003f10| 69 6e 65 20 62 6f 6f 74 | 73 20 6f 6e 65 20 43 50 |ine boot|s one CP|
|00003f20| 55 20 61 6e 64 20 50 43 | 20 0a 63 6f 6d 70 61 74 |U and PC| .compat|
|00003f30| 69 62 6c 65 29 2e 20 54 | 68 65 20 6b 65 72 6e 65 |ible). T|he kerne|
|00003f40| 6c 20 68 61 73 20 61 6c | 6c 20 74 68 65 20 72 65 |l has al|l the re|
|00003f50| 6c 65 76 61 6e 74 20 6c | 6f 63 6b 73 20 62 75 74 |levant l|ocks but|
|00003f60| 20 64 6f 65 73 20 6e 6f | 74 20 79 65 74 20 0a 72 | does no|t yet .r|
|00003f70| 65 70 72 6f 67 72 61 6d | 20 74 68 65 20 38 32 34 |eprogram| the 824|
|00003f80| 38 39 20 74 6f 20 64 65 | 6c 69 76 65 72 20 69 6e |89 to de|liver in|
|00003f90| 74 65 72 72 75 70 74 73 | 20 74 6f 20 61 72 62 69 |terrupts| to arbi|
|00003fa0| 74 72 61 72 79 20 70 72 | 6f 63 65 73 73 6f 72 73 |trary pr|ocessors|
|00003fb0| 20 61 73 20 69 74 20 0a | 73 68 6f 75 6c 64 2e 20 | as it .|should. |
|00003fc0| 54 68 69 73 20 72 65 71 | 75 69 72 65 73 20 66 75 |This req|uires fu|
|00003fd0| 72 74 68 65 72 20 6d 6f | 64 69 66 69 63 61 74 69 |rther mo|dificati|
|00003fe0| 6f 6e 20 6f 66 20 74 68 | 65 20 73 74 61 6e 64 61 |on of th|e standa|
|00003ff0| 72 64 20 4c 69 6e 75 78 | 20 69 6e 74 65 72 72 75 |rd Linux| interru|
|00004000| 70 74 20 0a 68 61 6e 64 | 6c 69 6e 67 20 63 6f 64 |pt .hand|ling cod|
|00004010| 65 2c 20 61 6e 64 20 69 | 73 20 70 61 72 74 69 63 |e, and i|s partic|
|00004020| 75 6c 61 72 6c 79 20 6d | 65 73 73 79 20 61 73 20 |ularly m|essy as |
|00004030| 74 68 65 20 69 6e 74 65 | 72 72 75 70 74 20 68 61 |the inte|rrupt ha|
|00004040| 6e 64 6c 65 72 20 62 65 | 68 61 76 69 6f 75 72 20 |ndler be|haviour |
|00004050| 0a 68 61 73 20 74 6f 20 | 63 68 61 6e 67 65 20 61 |.has to |change a|
|00004060| 73 20 73 6f 6f 6e 20 61 | 73 20 74 68 65 20 38 32 |s soon a|s the 82|
|00004070| 34 38 39 20 69 73 20 73 | 77 69 74 63 68 65 64 20 |489 is s|witched |
|00004080| 69 6e 74 6f 20 53 4d 50 | 20 6d 6f 64 65 2e 0a 0a |into SMP| mode...|
|00004090| 0a 5c 73 75 62 73 75 62 | 73 65 63 74 69 6f 6e 7b |.\subsub|section{|
|000040a0| 45 78 74 65 6e 73 69 6f | 6e 73 20 54 6f 20 53 74 |Extensio|ns To St|
|000040b0| 61 6e 64 61 72 64 20 46 | 61 63 69 6c 69 74 69 65 |andard F|acilitie|
|000040c0| 73 7d 0a 54 68 65 20 6b | 65 72 6e 65 6c 20 6d 61 |s}.The k|ernel ma|
|000040d0| 69 6e 74 61 69 6e 73 20 | 61 20 73 65 74 20 6f 66 |intains |a set of|
|000040e0| 20 70 65 72 20 70 72 6f | 63 65 73 73 6f 72 20 63 | per pro|cessor c|
|000040f0| 6f 6e 74 72 6f 6c 20 69 | 6e 66 6f 72 6d 61 74 69 |ontrol i|nformati|
|00004100| 6f 6e 20 73 75 63 68 20 | 61 73 20 0a 74 68 65 20 |on such |as .the |
|00004110| 73 70 65 65 64 20 6f 66 | 20 74 68 65 20 70 72 6f |speed of| the pro|
|00004120| 63 65 73 73 6f 72 20 66 | 6f 72 20 64 65 6c 61 79 |cessor f|or delay|
|00004130| 20 6c 6f 6f 70 73 2e 20 | 54 68 65 73 65 20 66 75 | loops. |These fu|
|00004140| 6e 63 74 69 6f 6e 73 20 | 6f 6e 20 74 68 65 20 53 |nctions |on the S|
|00004150| 4d 50 20 0a 6b 65 72 6e | 65 6c 20 6c 6f 6f 6b 20 |MP .kern|el look |
|00004160| 74 68 65 20 76 61 6c 75 | 65 73 20 75 70 20 69 6e |the valu|es up in|
|00004170| 20 61 20 70 65 72 20 70 | 72 6f 63 65 73 73 6f 72 | a per p|rocessor|
|00004180| 20 61 72 72 61 79 20 74 | 68 61 74 20 69 73 20 73 | array t|hat is s|
|00004190| 65 74 20 75 70 20 66 72 | 6f 6d 20 74 68 65 20 0a |et up fr|om the .|
|000041a0| 64 61 74 61 20 67 65 6e | 65 72 61 74 65 64 20 61 |data gen|erated a|
|000041b0| 74 20 62 6f 6f 74 20 75 | 70 20 62 79 20 74 68 65 |t boot u|p by the|
|000041c0| 20 73 6d 70 5c 5f 73 74 | 6f 72 65 5c 5f 63 70 75 | smp\_st|ore\_cpu|
|000041d0| 5c 5f 69 6e 66 6f 28 29 | 20 66 75 6e 63 74 69 6f |\_info()| functio|
|000041e0| 6e 2e 20 54 68 69 73 20 | 0a 69 6e 63 6c 75 64 65 |n. This |.include|
|000041f0| 73 20 6f 74 68 65 72 20 | 66 61 63 74 73 20 73 75 |s other |facts su|
|00004200| 63 68 20 61 73 20 77 68 | 65 74 68 65 72 20 74 68 |ch as wh|ether th|
|00004210| 65 72 65 20 69 73 20 61 | 6e 20 46 50 55 20 6f 6e |ere is a|n FPU on|
|00004220| 20 74 68 65 20 70 72 6f | 63 65 73 73 6f 72 2e 20 | the pro|cessor. |
|00004230| 54 68 65 20 0a 63 75 72 | 72 65 6e 74 20 6b 65 72 |The .cur|rent ker|
|00004240| 6e 65 6c 20 64 6f 65 73 | 20 6e 6f 74 20 68 61 6e |nel does| not han|
|00004250| 64 6c 65 20 66 6c 6f 61 | 74 69 6e 67 20 70 6f 69 |dle floa|ting poi|
|00004260| 6e 74 20 63 6f 72 72 65 | 63 74 6c 79 2c 20 74 68 |nt corre|ctly, th|
|00004270| 69 73 20 72 65 71 75 69 | 72 65 73 20 73 6f 6d 65 |is requi|res some|
|00004280| 20 0a 63 68 61 6e 67 65 | 73 20 74 6f 20 74 68 65 | .change|s to the|
|00004290| 20 74 65 63 68 6e 69 71 | 75 65 73 20 74 68 65 20 | techniq|ues the |
|000042a0| 73 69 6e 67 6c 65 20 43 | 50 55 20 6b 65 72 6e 65 |single C|PU kerne|
|000042b0| 6c 20 75 73 65 73 20 74 | 6f 20 6d 69 6e 69 6d 69 |l uses t|o minimi|
|000042c0| 73 65 20 66 6c 6f 61 74 | 69 6e 67 20 0a 70 6f 69 |se float|ing .poi|
|000042d0| 6e 74 20 70 72 6f 63 65 | 73 73 6f 72 20 72 65 6c |nt proce|ssor rel|
|000042e0| 6f 61 64 73 2e 0a 0a 54 | 68 65 20 68 69 67 68 6c |oads...T|he highl|
|000042f0| 79 20 75 73 65 66 75 6c | 20 61 74 6f 6d 69 63 20 |y useful| atomic |
|00004300| 62 69 74 20 6f 70 65 72 | 61 74 69 6f 6e 73 20 61 |bit oper|ations a|
|00004310| 72 65 20 70 72 65 66 69 | 78 65 64 20 77 69 74 68 |re prefi|xed with|
|00004320| 20 74 68 65 20 27 6c 6f | 63 6b 27 20 0a 70 72 65 | the 'lo|ck' .pre|
|00004330| 66 69 78 20 69 6e 20 74 | 68 65 20 53 4d 50 20 6b |fix in t|he SMP k|
|00004340| 65 72 6e 65 6c 20 74 6f | 20 6d 61 69 6e 74 61 69 |ernel to| maintai|
|00004350| 6e 20 74 68 65 69 72 20 | 61 74 6f 6d 69 63 20 70 |n their |atomic p|
|00004360| 72 6f 70 65 72 74 69 65 | 73 20 77 68 65 6e 20 75 |ropertie|s when u|
|00004370| 73 65 64 20 0a 6f 75 74 | 73 69 64 65 20 6f 66 20 |sed .out|side of |
|00004380| 28 61 6e 64 20 62 79 29 | 20 74 68 65 20 73 70 69 |(and by)| the spi|
|00004390| 6e 6c 6f 63 6b 20 61 6e | 64 20 6d 65 73 73 61 67 |nlock an|d messag|
|000043a0| 65 20 63 6f 64 65 2e 20 | 41 6d 6f 6e 67 73 74 20 |e code. |Amongst |
|000043b0| 6f 74 68 65 72 20 74 68 | 69 6e 67 73 20 0a 74 68 |other th|ings .th|
|000043c0| 69 73 20 69 73 20 6e 65 | 65 64 65 64 20 66 6f 72 |is is ne|eded for|
|000043d0| 20 74 68 65 20 69 6e 76 | 61 6c 69 64 61 74 65 20 | the inv|alidate |
|000043e0| 68 61 6e 64 6c 65 72 2c | 20 61 73 20 61 6c 6c 20 |handler,| as all |
|000043f0| 20 43 50 55 27 73 20 77 | 69 6c 6c 20 69 6e 76 61 | CPU's w|ill inva|
|00004400| 6c 69 64 61 74 65 20 61 | 74 20 0a 74 68 65 20 73 |lidate a|t .the s|
|00004410| 61 6d 65 20 74 69 6d 65 | 20 77 69 74 68 6f 75 74 |ame time| without|
|00004420| 20 61 6e 79 20 6c 6f 63 | 6b 73 2e 0a 0a 49 6e 74 | any loc|ks...Int|
|00004430| 65 72 72 75 70 74 20 31 | 33 20 66 6c 6f 61 74 69 |errupt 1|3 floati|
|00004440| 6e 67 20 70 6f 69 6e 74 | 20 65 72 72 6f 72 20 72 |ng point| error r|
|00004450| 65 70 6f 72 74 69 6e 67 | 20 69 73 20 72 65 6d 6f |eporting| is remo|
|00004460| 76 65 64 2e 20 54 68 69 | 73 20 66 61 63 69 6c 69 |ved. Thi|s facili|
|00004470| 74 79 20 69 73 20 0a 6e | 6f 74 20 75 73 61 62 6c |ty is .n|ot usabl|
|00004480| 65 20 6f 6e 20 61 20 6d | 75 6c 74 69 70 72 6f 63 |e on a m|ultiproc|
|00004490| 65 73 73 6f 72 20 62 6f | 61 72 64 2c 20 6e 6f 72 |essor bo|ard, nor|
|000044a0| 20 72 65 6c 65 76 61 6e | 74 20 74 6f 20 74 68 65 | relevan|t to the|
|000044b0| 20 49 6e 74 65 6c 20 4d | 50 20 0a 61 72 63 68 69 | Intel M|P .archi|
|000044c0| 74 65 63 74 75 72 65 20 | 77 68 69 63 68 20 64 6f |tecture |which do|
|000044d0| 65 73 20 6e 6f 74 20 63 | 6f 76 65 72 20 74 68 65 |es not c|over the|
|000044e0| 20 38 30 33 38 36 2f 38 | 30 33 38 37 20 70 72 6f | 80386/8|0387 pro|
|000044f0| 63 65 73 73 6f 72 20 70 | 61 69 72 2e 20 5c 0a 0a |cessor p|air. \..|
|00004500| 54 68 65 20 2f 70 72 6f | 63 20 66 69 6c 65 73 79 |The /pro|c filesy|
|00004510| 73 74 65 6d 20 73 75 70 | 70 6f 72 74 20 69 73 20 |stem sup|port is |
|00004520| 63 68 61 6e 67 65 64 20 | 73 6f 20 74 68 61 74 20 |changed |so that |
|00004530| 74 68 65 20 2f 70 72 6f | 63 2f 63 70 75 69 6e 66 |the /pro|c/cpuinf|
|00004540| 6f 20 66 69 6c 65 20 0a | 63 6f 6e 74 61 69 6e 73 |o file .|contains|
|00004550| 20 61 20 63 6f 6c 75 6d | 6e 20 66 6f 72 20 65 61 | a colum|n for ea|
|00004560| 63 68 20 70 72 6f 63 65 | 73 73 6f 72 20 70 72 65 |ch proce|ssor pre|
|00004570| 73 65 6e 74 2e 20 54 68 | 69 73 20 69 6e 66 6f 72 |sent. Th|is infor|
|00004580| 6d 61 74 69 6f 6e 20 69 | 73 20 65 78 74 72 61 63 |mation i|s extrac|
|00004590| 74 65 64 20 0a 66 72 6f | 6d 20 74 68 65 20 64 61 |ted .fro|m the da|
|000045a0| 74 61 20 73 61 76 65 20 | 62 79 20 73 6d 70 5c 5f |ta save |by smp\_|
|000045b0| 73 74 6f 72 65 5c 5f 63 | 70 75 5c 5f 69 6e 66 6f |store\_c|pu\_info|
|000045c0| 28 29 2e 0a 0a 5c 65 6e | 64 7b 64 6f 63 75 6d 65 |()...\en|d{docume|
|000045d0| 6e 74 7d 0a | |nt}. | |
+--------+-------------------------+-------------------------+--------+--------+