锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美伊人久久大香线蕉综合69,精品久久久久久无码中文字幕 ,一级做a爱片久久毛片http://www.shnenglu.com/huyi/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ------ Keep life simple<br> GMail/GTalk/MSN:huyi.zg@gmail.comzh-cnWed, 07 May 2025 06:32:30 GMTWed, 07 May 2025 06:32:30 GMT60鍙戝竷涓涓棩璇眽瀛楀亣鍚嶈漿鎹㈣蔣浠剁粰澶уhttp://www.shnenglu.com/huyi/archive/2007/05/30/25110.htmlHuYiHuYiWed, 30 May 2007 03:03:00 GMThttp://www.shnenglu.com/huyi/archive/2007/05/30/25110.htmlhttp://www.shnenglu.com/huyi/comments/25110.htmlhttp://www.shnenglu.com/huyi/archive/2007/05/30/25110.html#Feedback18http://www.shnenglu.com/huyi/comments/commentRss/25110.htmlhttp://www.shnenglu.com/huyi/services/trackbacks/25110.htmlhttp://www.shnenglu.com/huyi/archive/2006/03/15/4207.html

涓嬭澆鍦板潃錛?br>http://www.shnenglu.com/Files/huyi/kanji.rar

浣跨敤鏂瑰紡錛?br>閫変腑涓嶇煡閬撹闊崇殑鏃ユ枃姹夊瓧錛堜腑鍥芥眽瀛楁棤鏁堬級(jí)錛岀劧鍚嶤trl+C鍗沖彲銆傚湪緋葷粺鎵樼洏鍥炬爣涓婄偣鍑誨乏閿紝鍙互鎵撳紑鍏抽棴鐩戣鍔熻兘銆?br>
杞歡鎴睆:



2007騫?鏈?1鏃?br>鏀懼嚭1.5鐗堬紝鏀瑰姩濡備笅錛?br>1.緹庡寲浜?jiǎn)鐣岄潰锛屾敼杩涗簡(jiǎn)鍓嶄竴鐗堟湰涓樉紺洪敊浣嶇殑闂銆?br>2.3縐掑悗鏌ヨ紿楀彛鑷姩灝忔椂銆?br>3.鍋氫簡(jiǎn)閮ㄥ垎榪囨護(hù)錛岃兘榪囨護(hù)鎺夎澶氶潪鏃ユ枃姹夊瓧鐨勪笢瑗褲?br>4.宸﹂敭榛樿绔嬪嵆鍏抽棴紿楀彛錛屽彸閿畾浣忕獥鍙o紝浣夸箣涓嶄細(xì)鑷姩娑堝け銆?br>鏂扮殑鎴浘灝變笉鏀懼嚭浜?jiǎn)锛屾諱箣婕備寒浜?jiǎn)寰堝锛屽笇鏈涘ぇ瀹毒lх畫鏀寔銆?br>

HuYi 2007-05-30 11:03 鍙戣〃璇勮
]]>
灝嗘垚鍛樺嚱鏁頒綔涓簊td::for_each鐨勭涓変釜鍙傛暟http://www.shnenglu.com/huyi/archive/2006/12/22/16736.htmlHuYiHuYiFri, 22 Dec 2006 07:10:00 GMThttp://www.shnenglu.com/huyi/archive/2006/12/22/16736.htmlhttp://www.shnenglu.com/huyi/comments/16736.htmlhttp://www.shnenglu.com/huyi/archive/2006/12/22/16736.html#Feedback3http://www.shnenglu.com/huyi/comments/commentRss/16736.htmlhttp://www.shnenglu.com/huyi/services/trackbacks/16736.htmlvoid CBookEditDlg::ForEachBookFunctor(Book book)
{
聽(tīng)聽(tīng)聽(tīng) ......
}
for_each(books.begin(), books.end(), std::bind1st(mem_fun(&CBookEditDlg::ForEachBookFunctor), this));

鍏抽敭鐐瑰湪浜巑em_fun鍜宐ind1st鐨勪嬌鐢ㄣ?br />
for_each鐨勫疄鐜頒腑鏈鏍稿績(jī)鐨勪竴涓皟鐢細(xì)functor(*iterater);
鐢變簬綾婚潪闈?rùn)鎬佹垚鍛樺嚱鏁幫紝蹇呴』鍦ㄥ疄渚嬩笂璋冪敤錛?instance->*pfn)(params);
鎵浠or_each鏃犳硶鐩存帴浣跨敤浼犺繃鍘葷殑鍑芥暟鍦板潃錛屽嚱鏁版寚閽堢殑絎竴涓弬鏁版槸綾葷殑涓涓疄渚嬫寚閽堬紙this鎸囬拡)錛屾墍浠ュ繀欏繪兂鍔炴硶鎶婅繖涓寚閽堜紶榪囧幓錛堜嬌鐢╯td::bind1st錛?br />
鍏充簬mem_fun鐨勪竴浜涜祫鏂欙紝璇峰弬鑰?br />http://www.stlchina.org/documents/EffectiveSTL/files/item_41.html

瀵逛簬甯︿袱涓互涓婂弬鏁扮殑鎴愬憳鍑芥暟錛岀敤stl鏄笉鑳借揪鍒扮洰鐨勭殑錛屽洜涓簃em_fun鍙兘鐢熸垚涓嶅甫鍙傛暟錛屾垨鑰呮槸浠呭甫涓涓弬鏁扮殑鍑芥暟瀵硅薄錛坒unctor)錛宐ind1st鍜宐ind2st涔熷彧鑳藉絎竴涓垨鑰呮槸絎簩涓弬鏁拌繘琛岀粦瀹氥?br />瑕佸疄鐜板浠繪剰鏁伴噺鍙傛暟鐨勬垚鍛樺嚱鏁扮敓鎴恌unctor錛屽繀欏誨stl榪涜鎵╁睍錛屾墍騫竍oost宸茬粡鍋氬埌浜?jiǎn)杩欑偣锛宐oost::bind鍜宐oost::mem_fn灝辨槸鏇村姞娉涘寲鐨剆td::bind1st鍜宻td::mem_func

聽(tīng)聽(tīng)聽(tīng) void ForEachClassFunctor(Class c, CTreeItem treeItem)
聽(tīng)聽(tīng)聽(tīng) {
聽(tīng)聽(tīng)聽(tīng) 聽(tīng)聽(tīng)聽(tīng) treeView.InsertItem(c.name.c_str(), treeItem, NULL);
聽(tīng)聽(tīng)聽(tīng) }

聽(tīng)聽(tīng)聽(tīng) void ForEachBookFunctor(Book book)
聽(tīng)聽(tīng) 聽(tīng){
聽(tīng)聽(tīng) 聽(tīng)聽(tīng)聽(tīng) 聽(tīng)CTreeItem treeItem = treeView.InsertItem(book.name.c_str(), NULL, NULL);
聽(tīng)聽(tīng) 聽(tīng)聽(tīng)聽(tīng) 聽(tīng)vector<Class> v;
聽(tīng)聽(tīng) 聽(tīng)聽(tīng)聽(tīng) 聽(tīng)v.push_back(Class(0,0,"nameClass1", "titleClass1"));
聽(tīng)聽(tīng) 聽(tīng)聽(tīng)聽(tīng) 聽(tīng)for_each(v.begin(), v.end(),
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) boost::bind(boost::mem_fn(&CBookEditDlg::ForEachClassFunctor), this, _1, treeItem));
聽(tīng)聽(tīng) 聽(tīng)}


HuYi 2006-12-22 15:10 鍙戣〃璇勮
]]>
UTF-8涓嶶nicode鐨勭浉浜掕漿鎹?/title><link>http://www.shnenglu.com/huyi/archive/2006/12/22/16734.html</link><dc:creator>HuYi</dc:creator><author>HuYi</author><pubDate>Fri, 22 Dec 2006 07:09:00 GMT</pubDate><guid>http://www.shnenglu.com/huyi/archive/2006/12/22/16734.html</guid><wfw:comment>http://www.shnenglu.com/huyi/comments/16734.html</wfw:comment><comments>http://www.shnenglu.com/huyi/archive/2006/12/22/16734.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.shnenglu.com/huyi/comments/commentRss/16734.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/huyi/services/trackbacks/16734.html</trackback:ping><description><![CDATA[浠婂ぉ鐢ㄥ埌浜?jiǎn)Sqlite,鐢變簬瀹冨唴閮ㄦ槸浣跨敤UTF-8緙栫爜錛屾墍浠ュ湪Windows搴旂敤涓嚭鐜頒簡(jiǎn)涔辯爜銆?br />綆鍗曠殑鎼滅儲(chǔ)浜?jiǎn)涓涓嬶紝鐩鎬簰杞崲鐨勬柟娉曞緢澶氾紝鎴戣寰楁瘮杈冨ソ鐨勶紝鏄?br /><a target="_blank">http://www.vckbase.com/document/viewdoc/?id=1444</a><br /><br />鎴戠◢寰敼榪涗簡(jiǎn)涓涓?<br /><br />聽(tīng)聽(tīng)聽(tīng) static WCHAR* UTF82Unicode(WCHAR* pBuffer,char *pSource, int buff_size)<br />聽(tīng)聽(tīng)聽(tīng) {<br />聽(tīng)聽(tīng)聽(tīng) 聽(tīng)聽(tīng)聽(tīng) int i, j, max;<br />聽(tīng)聽(tīng)聽(tīng) 聽(tīng)聽(tīng)聽(tīng) char* uchar = (char *)pBuffer;<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) max = buff_size - 2;<br />聽(tīng)聽(tīng)聽(tīng) 聽(tīng)聽(tīng)聽(tīng) for(i = 0, j = 0; pSource[j] != '\0'; i += 2, j += 3)<br />聽(tīng)聽(tīng)聽(tīng) 聽(tīng)聽(tīng)聽(tīng) {<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) if (i > max) {<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) break;<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) }<br />聽(tīng)聽(tīng)聽(tīng) 聽(tīng)聽(tīng)聽(tīng) 聽(tīng)聽(tīng)聽(tīng) uchar[i+1] = ((pSource[j] & 0x0F) << 4) + ((pSource[j+1] >> 2) & 0x0F);<br />聽(tīng)聽(tīng)聽(tīng) 聽(tīng)聽(tīng)聽(tīng) 聽(tīng)聽(tīng)聽(tīng) uchar[i] = ((pSource[j+1] & 0x03) << 6) + (pSource[j+2] & 0x3F);<br />聽(tīng)聽(tīng)聽(tīng) 聽(tīng)聽(tīng)聽(tīng) }<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) uchar[i] = '\0';<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) uchar[i+1] = '\0';<br />聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) return pBuffer;<br />聽(tīng)聽(tīng)聽(tīng) }<br /><br />鍦╓indows涓殑璇濓紝榪樻湁鏇寸畝鍗曠殑鏂規(guī)硶瀹屾垚杞崲錛?br />姣斿浠嶶TF-8鍒癠nicode:<br />聽(tīng)聽(tīng)聽(tīng) WCHAR buff[255];<br />聽(tīng)聽(tīng)聽(tīng) <span style="FONT-WEIGHT: bold">MultiByteToWideChar</span>(CP_UTF8, 0, argv[i], -1, buff, sizeof(buff));<br />聽(tīng)聽(tīng)聽(tīng) item.name = W2A(buff);<br /><br />argv[i]鏄杞崲鐨勫瓧鑺傛暟緇?img src ="http://www.shnenglu.com/huyi/aggbug/16734.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/huyi/" target="_blank">HuYi</a> 2006-12-22 15:09 <a href="http://www.shnenglu.com/huyi/archive/2006/12/22/16734.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍏充簬鏂囦歡鎿嶄綔鐨勫皝瑁呭鐞?/title><link>http://www.shnenglu.com/huyi/archive/2006/10/14/13675.html</link><dc:creator>HuYi</dc:creator><author>HuYi</author><pubDate>Sat, 14 Oct 2006 08:45:00 GMT</pubDate><guid>http://www.shnenglu.com/huyi/archive/2006/10/14/13675.html</guid><wfw:comment>http://www.shnenglu.com/huyi/comments/13675.html</wfw:comment><comments>http://www.shnenglu.com/huyi/archive/2006/10/14/13675.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/huyi/comments/commentRss/13675.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/huyi/services/trackbacks/13675.html</trackback:ping><description><![CDATA[ <div class="swgcymm" id="inbdy">File綾繪湰韜茍涓嶆寔鏈夋枃浠跺彞鏌勶紝瀹冨彧鏄泦涓簡(jiǎn)涓緋誨垪瀵規(guī)枃浠剁殑鎿嶄綔鏂規(guī)硶錛屽Create錛孫pen絳夌瓑銆傝繖浜涙柟娉曞叏閮ㄩ兘鏄潤(rùn)鎬佺殑錛屼篃涓嶈繘琛屼換浣曠殑瀹夊叏媯(gè)嫻嬶紝浠呬粎<wbr>鏄洿鎺ヨ皟鐢╬spsdk鏉ュ畬鎴愪換鍔★紝濡傛灉鍑虹幇閿欒錛屽垯榪斿洖璐熷箋?<br />File鐨凮pen絳夋柟娉曞彲浠ュ垱寤洪拡瀵規(guī)寚瀹氭枃浠惰鍐欑殑嫻佸璞ileStream錛屽彞鏌勭敱FileStream鑷繁鍒涘緩鍜屾寔鏈夌鐞嗭紝File::Open鍙槸浼?wbr>杈捐礬寰勪俊鎭?<br />鍙互鎶奆ile鐪嬩綔鏄竴涓棬闈紝闆嗕腑浜?jiǎn)瀵规枃錃g鐨勬墍鏈夋搷浣滐紝騫朵笖涓嶉渶瑕佸垱寤篎ile瀵硅薄灝卞彲浠ョ洿鎺ユ墽琛岃繖浜涙搷浣溿傛墍浠ヨFile涓烘枃浠剁殑鍗曚竴鎿嶄綔鎻愪緵浜?jiǎn)蹇嶏L(fēng)畝渚跨殑<wbr>鏂瑰紡銆?<br />闄や簡(jiǎn)鍑犱釜鍒涘緩FileStream嫻佺殑鎿嶄綔澶栵紝鍏朵粬鎿嶄綔閮戒笉浼?xì)闀挎湡鍗犵敤鍙ユ焺璧勬簮锛岄伒弩@"鍙ユ焺鍒涘緩-鎵ц鍏蜂綋鎿嶄綔-閲婃斁鍙ユ焺"鐨勬楠ゃ?<br /><p>濡傛灉闇瑕侀綣佺殑鎿嶄綔鏂囦歡錛屽垯闇瑕佷竴涓被鏉ラ暱鏈熸寔鏈夊彞鏌勶紝閬垮厤緇忓父鎬х殑鎵撳紑鍜屽叧闂枃浠訛紝鏁呮寮曞叆FileInfo綾匯侳ileInfo鎵цAppend絳夋搷浣滄椂錛?wbr>閮芥槸浣跨敤浜嬪厛鎵撳紑鐨勬枃浠跺彞鏌勩?<br />鍚屾椂錛孎ileInfo涔熷彲浠ュ垱寤篎ileStream瀹炰緥錛屼絾榪欎釜鏃跺欙紝鏂囦歡鐨勫彞鏌勭敓鍛藉懆鏈熷簲璇ョ敱FileInfo鏉ョ鐞嗭紝FileStream鍙互浣跨敤榪欎釜<wbr>鍙ユ焺錛屼絾涓嶈兘緇撴潫鍏剁敓鍛藉懆鏈燂紝FileStream::Close()鏂規(guī)硶浠呬粎浣胯繖涓祦澶勪簬鍏抽棴錛堜笉鍙鍐欙級(jí)鐘舵侊紝浣嗗茍涓嶅疄闄呭叧闂枃浠跺彞鏌勩?<br />榪欑鎯呭喌涓嬶紝FileInfo鎵鍒涘緩鐨凢ileStream::Close()鐨勮涓哄拰鍓嶉潰File鎵鍒涘緩鐨凢ileStream::Close()琛屼負(fù)鏈夊樊寮?wbr>銆傚洜涓篎ile騫朵笉鎸佹湁鍙ユ焺錛屾墍浠ュ畠鍒涘緩浜?jiǎn)FileStream瀵硅薄鍚庯紝鍙ユ焺搴旇鐢盕ileStream鏉ョ鐞嗐備絾FileInfo鎵鍒涘緩鐨凢ileStrea<wbr>m鏄嬌鐢ㄧ殑FileInfo鎵鍒涘緩濂界殑鍙ユ焺錛屾墍浠ュ畠騫朵笉瀵規(guī)鍙ユ焺璐熻矗銆?<br /></wbr></wbr></wbr></wbr></p><p>瀹炵幇絳栫暐錛?<br />1.浣跨敤鍩轟簬緇ф壙鐨勫鎬佹垨鍩轟簬妯℃澘鐨勯潤(rùn)澶氭併?<br />2.浣跨敤鍑芥暟鍥炶皟銆傛妸Close鍋氭垚璋冪敤鍑芥暟鎸囬拡錛岄氳繃涓嶅悓鐨凢ileStream鏋勯犲嚱鏁拌皟鐢紝鏉ヨ緗寚閽堟寚鍚戜笉鍚岀殑Close鍑芥暟瀹炵幇銆傦紙鍏抽棴鍙ユ焺鎴栦笉鍏抽棴<wbr>鍙ユ焺錛?<br />榪欎袱縐嶅仛娉曠殑浼樺姡鎬ф鍦ㄨ冭瘉涓紝璇鋒彁鍑烘剰瑙併?<br /><br /><br />琛ュ厖錛欶ile鍜孎ileInfo鐨勫叧緋誨湪dotnet涓篃鏈変綋鐜幫紝涓嶈繃浠栦滑涓昏鏄粠閿欒媯(gè)嫻嬫柟闈㈣冭檻銆?br />鏈緇堢殑鐩殑鏄涓哄鎴鋒彁渚涗竴涓粺涓鐨勭晫闈紝鎵浠ヤ笉鑳界敤澶鏉傜殑妯℃澘銆?br /><br />緇忚繃鎱庨噸鑰冭檻錛屾垜榪樻槸鍐沖畾鐢ㄨ櫄鍑芥暟錛屾斁寮冧簡(jiǎn)妯℃澘銆?br /></wbr></p></wbr></wbr></wbr></div> <img src ="http://www.shnenglu.com/huyi/aggbug/13675.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/huyi/" target="_blank">HuYi</a> 2006-10-14 16:45 <a href="http://www.shnenglu.com/huyi/archive/2006/10/14/13675.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>涓轟粈涔堣鐢ㄢ?(鈥濆彇浠b?鈥?http://www.shnenglu.com/huyi/archive/2006/10/13/13637.htmlHuYiHuYiFri, 13 Oct 2006 05:50:00 GMThttp://www.shnenglu.com/huyi/archive/2006/10/13/13637.htmlhttp://www.shnenglu.com/huyi/comments/13637.htmlhttp://www.shnenglu.com/huyi/archive/2006/10/13/13637.html#Feedback1http://www.shnenglu.com/huyi/comments/commentRss/13637.htmlhttp://www.shnenglu.com/huyi/services/trackbacks/13637.html鍦ㄥ仛鏃ュ織鎺ュ彛鐨勬椂鍊欙紝鐪熷疄鐨勬帴鍙e嚱鏁板簲璇ユ槸濡備笅鏍峰紡鐨勶細(xì)
__static_logger__.log(int level,const char* fmt, ...);
榪欓噷浣跨敤浜?jiǎn)printf綾諱技鐨勬妧鏈細(xì)鍙彉鍙傛暟銆?br />榪欎釜鎶鏈彲浠ュ姩鎬佺殑鏇挎崲瀛楃涓瞗mt涓殑鍐呭銆?br />鍚屾椂錛岃繖涓柟娉曞彲鑳戒細(xì)琚噸杞斤紝鐢ㄤ簬涓嶉渶瑕佸彲鍙樺弬鏁扮殑鎯呭喌錛?br />__static_logger__.log(int level,const char* fmt);

閫氬父錛屾垜浠繕?shù)細(xì)瀹氫箟涓浜涜緟鍔╃敤鐨勫畯錛?br />#define KLOG(X) \
聽(tīng)聽(tīng)聽(tīng) do { \
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) KDBG::printf X; \
聽(tīng)聽(tīng)聽(tīng) } while (0)

浣跨敤鐨勬椂鍊欙紝蹇呴』鎸夌収涓嬮潰鐨勬牸寮忥細(xì)
KLOG((LM_ERROR, "%s\n", strerror(errno)));
娉ㄦ剰錛屼嬌鐢ㄤ簡(jiǎn)鍙屽眰鐨勬嫭鍙封?(鈥?br />
涓轟粈涔堜笉鎶婂畯鏀規(guī)垚錛?br />#define KLOG(X,Y,...) \
聽(tīng)聽(tīng)聽(tīng) do { \
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) KDBG::log(X,Y,__VA_ARGS__); \
聽(tīng)聽(tīng)聽(tīng) } while (0)s
浠庤屾寜濡備笅鐨勨滄爣鍑嗗艦寮忊濇潵浣跨敤LOG鍛紵
KLOG(LM_ERROR, "%s\n", strerror(errno));


絳旀鏄畯涓嶈兘鍍忓嚱鏁伴偅鏍烽噸杞斤紝KLOG瀹忓彧鑳芥湁涓涓紝灝辨槸鏈鍚庡畾涔夌殑閭d釜錛屼篃灝辨槸鑳芥帴鍙楃殑鍙傛暟涓暟鏄浐瀹氱殑銆?br />



HuYi 2006-10-13 13:50 鍙戣〃璇勮
]]>
浜岀幆鍗佷笁閮庝紶璇翠腑鐨勮澶?/title><link>http://www.shnenglu.com/huyi/archive/2006/07/31/10736.html</link><dc:creator>HuYi</dc:creator><author>HuYi</author><pubDate>Mon, 31 Jul 2006 10:26:00 GMT</pubDate><guid>http://www.shnenglu.com/huyi/archive/2006/07/31/10736.html</guid><wfw:comment>http://www.shnenglu.com/huyi/comments/10736.html</wfw:comment><comments>http://www.shnenglu.com/huyi/archive/2006/07/31/10736.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.shnenglu.com/huyi/comments/commentRss/10736.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/huyi/services/trackbacks/10736.html</trackback:ping><description><![CDATA[ <span id="qyigwgs" class="content" id="lblContent"> <font style="FONT-SIZE: 12px; FONT-FAMILY: Verdana">1.8T鍙戝姩鏈烘繪垚聽(tīng)55000鍏?br />澶т紬鍘熷巶MO250鍙橀熺聽(tīng)20000<br />1.8T鍗婅醬聽(tīng)3000<br />BMC榪涙苯聽(tīng)2500<br />榪愬姩嬈懼疂鏉ュ嚫杞醬聽(tīng)3000<br />榪愬姩嬈懼疂鏉ユ丁杞?800<br />SUPERSPRING鍏ㄦ鎺掓皵聽(tīng)9800<br />灝劇墮聽(tīng)7000<br />娉曢浄濂ョ鍚堝櫒聽(tīng)3000<br />鍘熷巶180鍖圭數(shù)鑴戠▼搴徛?800<br />DENSO鐏姳濉灺?00<br />HKS娉勬皵闃聽(tīng)2800<br />4鍏枻鍥炴補(bǔ)闃聽(tīng)300<br /><br />SPAXJ鍑忛渿鍣?000<br />NEUSPEED鍓嶅悗闃插炬潌聽(tīng)2000<br />鍘熷巶鍓?12mm鍚?56mm鍒硅濺鐩?000<br />浠縍S418瀵歌疆鍦埪?200<br />綾沖叾鏋桺S2杞儙聽(tīng)10000<br /><br />鑷姞宸ュ墠鍚庡寘鍥綽?000<br />鑷埗鏈哄ご鐩柭?500<br />姘欐皵澶х伅聽(tīng)1800<br />HKS娑¤疆鍘嬪姏琛?00<br />SPARCO鏂瑰悜鐩樎?800<br />4MOTION妗f妸聽(tīng)1200</font> </span> <img src ="http://www.shnenglu.com/huyi/aggbug/10736.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/huyi/" target="_blank">HuYi</a> 2006-07-31 18:26 <a href="http://www.shnenglu.com/huyi/archive/2006/07/31/10736.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鎬庝箞鎵嶈兘鎴愪竴鍚嶆灦鏋勫笀錛?/title><link>http://www.shnenglu.com/huyi/archive/2006/07/28/10617.html</link><dc:creator>HuYi</dc:creator><author>HuYi</author><pubDate>Thu, 27 Jul 2006 16:02:00 GMT</pubDate><guid>http://www.shnenglu.com/huyi/archive/2006/07/28/10617.html</guid><wfw:comment>http://www.shnenglu.com/huyi/comments/10617.html</wfw:comment><comments>http://www.shnenglu.com/huyi/archive/2006/07/28/10617.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.shnenglu.com/huyi/comments/commentRss/10617.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/huyi/services/trackbacks/10617.html</trackback:ping><description><![CDATA[ <p>榪欎釜棰樼洰澶т簡(jiǎn)鐐癸紝涓嶉傚悎鎴戣繖縐嶅垰鍙傚姞宸ヤ綔涓嶄箙鐨勪漢鏉ュ洖絳斻?br /><br />Blog寰堜箙娌℃湁鏇存柊浜?jiǎn)锛尳{斿簲浜?jiǎn)鏈嬪弸鍐欑偣杩欐枤w潰鐨勭湅娉曪紝灝卞湪榪欓噷琛ㄨ揪涓涓嬭嚜宸辯殑鎰忚錛屾姏鐮栧紩鐜夈?br /><br />鏋舵瀯甯堜篃鏈変笉鍚岀殑綾誨瀷銆傛垜涓昏鎯寵璁鴻蔣浠舵柟闈㈢殑鏋舵瀯甯堛?br /><br />涓鏄綋緋葷粨鏋勭駭鐨勶紝瑕佽礋璐d駭鍝佺殑閮ㄧ講錛岀‖浠訛紝緗戠粶絳夌瓑寰堝鏁翠綋涓婄殑涓滆タ錛岃繖涓綾諱笉浠呴渶瑕佹墡瀹炶屽箍娉涚殑鍩虹鐭ヨ瘑錛屾洿闇瑕佺粡楠岋紝鐗瑰埆鏄湪澶т紒涓氬伐浣滅殑緇忛獙銆傝繖涓鐐逛篃鏄湪鍗曚綅鐪嬩簡(jiǎn)涓浜涙棩鏈漢鐨勮璁★紝鎵嶆參鎱綋浼?xì)鍒般?br /><br />浜屾槸杞歡鏈韓鐨勬灦鏋勶紝鏄垜鎯抽噸鐐硅璁虹殑銆?br />杞歡搴旂敤鐨勯鍩熶笉鍚岋紝鏋舵瀯涔熸湁寰堝ぇ鐨勫樊鍒紝宓屽叆寮忔湁宓屽叆寮忕殑鍋氭硶錛岀數(shù)淇¤蔣浠舵湁鐢?shù)淇¤蒋錃g鐨勫仛娉曪紝浼佷笟搴旂敤鏈変紒涓氬簲鐢ㄧ殑鍋氭硶錛屾闈㈡湁妗岄潰鐨勫仛娉曘傚鏋滆鍏ㄩ儴璁ㄨ錛屾垜娌℃湁榪欎釜瀹炲姏錛屾墍浠ュ彧璇存渶甯歌鐨勪紒涓氬簲鐢ㄥ紑鍙戝拰妗岄潰杞歡寮鍙戙?br /><br />鏈閲嶈鐨勫熀紜錛屾垜瑙夊緱鏄疧O錛屼笉綆″疄闄呯紪紼嬭璁℃槸鍚︽槸OO鐨勶紝閮藉簲璇ヤ簡(jiǎn)瑙o紝鍏峰OO鐨勬濇兂銆傚己璋冧竴涓嬶紝閲囩敤鏈鍚堥傜殑鎬濇兂鍜屾墜孌墊潵寮鍙戣蔣浠訛紝鑰屼笉涓瀹氶潪瑕佺敤OO錛屾垨鑰呮槸闈炰笉鐢∣O銆傛垜姣旇緝鍧氫俊鐨勪竴鐐規(guī)槸錛屽綋浠e強(qiáng)鏈潵鐨勭▼搴忓憳錛屾垨璁稿湪瀹為檯宸ヤ綔涓笉闇瑕佺敤鍒癘O錛屾瘮濡傝鎼炲祵鍏ュ紡寮鍙戯紝鎴栬匧inux搴曞眰鏂歸潰寮鍙戠殑錛堜簨瀹炰笂錛孡inux涓篃鐢ㄥ埌浜?jiǎn)OO錛屾瘮濡傛枃浠剁郴緇燂級(jí)錛屼絾蹇呴』鏄簡(jiǎn)瑙O鐨勩?br /><br /><strong>涓錛屼竾涓堥珮妤間粠鍦拌搗錛屼竴鍔涙壙鎷呴潬鍦板熀<br /></strong><br />1銆傛晱鎹瘋蔣浠跺紑鍙?br /><br /><img src="http://www.china-pub.com/computers/ebook10000-15000/13569/cover.gif" /><br /><br />涓轟粈涔堟帹鑽愯繖鏈憿錛熷叾瀹炴槸鎺ㄨ崘榪欐湰涔︾殑鍓嶅崐閮ㄥ垎銆傚洜涓哄畠鐨勫墠涓鍗婁竴瀹氬彲浠ヨ浜鴻崇洰涓鏂幫紝璁╀漢鐭ラ亾OO闄や簡(jiǎn)灝佽錛岀戶鎵匡紝澶氭佷互澶栵紝榪樻湁鏇村鐨勪笢瑗匡紝鑰屼笖榪欐湰涔﹀崄鍒嗗鏄撴噦銆?br /><br /><br />2銆傘奜OP鍚濆綍銆?br /><br /><img src="http://www.china-pub.com/computers/ebook15001-20000/16830/cover.gif" /><br />緇濆鐨勭粡鍏革紝涓嶈繃灝辨瘮杈冩灟鐕ヤ簡(jiǎn)銆傚叏閮ㄦ槸鍏充簬OO鐨勭悊璁哄強(qiáng)璁捐鍑嗗垯銆傛墍浠ヨ櫧鐒墮潪甯稿熀紜錛屼絾騫舵病鏈変綔涓虹涓姝ユ帹鑽愮殑涔︺傜湅榪欎釜錛岄渶瑕佸OO鏈変簡(jiǎn)涓瀹氱殑浜?jiǎn)瑙eQ屾墠鑳藉潥鎸佷笅鍘匯?br /><br /><strong>浜岋紝欏鴻棨鎽哥摐錛屽鏍圭┒搴?br /></strong>鍒濆鐨勪漢甯歌錛孫O灝辨槸瀵硅薄錛屽氨鏄皝瑁呯戶鎵垮鎬併傚錛屾病閿欙紝浣嗚璦鏄庝箞鏀寔榪欎簺OO鐗規(guī)х殑鍛紵<br /><br />1銆傛繁搴︽帰绱++瀵硅薄妯″瀷<br /><br /><img src="http://www.china-pub.com/computers/ebook/3290/cover.gif" /><br /><br />鎴戜滑CPP綺変笣鏈夌浜?jiǎn)锛屾湰涔︽帰鐑?chǔ)浜?jiǎn)C++瀵筄O鐨勬敮鎸侊紝搴曞眰瀵硅薄妯″瀷瀹炵幇絳夐潪甯告湁浠峰肩殑鍐呭銆傚悓鏍鋒槸鐩稿鏋嚗鐨勶紝鑰屼笖棰囧叿闅懼害錛屾墍浠ュ涔?fàn)涔嬪墠鏈濂藉C++榪欓棬璇█鐔熸?zhèn)夊Q岃屼笖鏈夊叴瓚e幓浜?jiǎn)瑙e畠鐨勬湰璐ㄣ?br />瀵逛簬闈濩PP甯淳鎴愬憳錛岀湅榪欎釜鍙兘姣旇緝鍥伴毦錛屼絾鎴戜篃鎵句笉鍑哄叾浠栨浛浠g殑瀛︿範(fàn)涔︾睄浜?jiǎn)锛岀煡閬撶殑鏈嬪弸璇疯ˉ鍏呫?br /><br /><strong>絎笁錛岀粌鎷?/strong><br />鍐呭姛鍩虹鏈変簡(jiǎn)錛屽氨璇ョ粌涔?fàn)鍓戞嫑鎷宠白兒?jiǎn)銆?br /><br />杞歡璁捐鐨勫墤璋憋紝灝辨槸璁捐妯″紡錛屽氨鏄墠浜烘葷粨鍑烘潵鐨勫璺紝褰撶劧浣犱篃鍙互鑷垱銆備絾鑷垱涔嬪墠錛屼竴瀹氳澶氱湅澶氭兂錛屽厖鍒嗗惛鍙栧墠浜虹殑綺鵑珦銆?br /><br />1錛孞ava涓庢ā寮?br /><br /><img src="http://www.china-pub.com/computers/ebook/8182/cover.gif" /><br /><br />鍥戒漢鍐欑殑涓嶅緱涓嶆帹鑽愮殑涓鏈ソ涔︼紙涔熸湁寰堝浜鴻浠栧お鍟板棪錛夈傛垜鍒濆鐨勬椂鍊欙紝涓涓婃潵灝辨槸Gof鐨勪紶涓栫粡鍏革紝緇撴灉钖勮杽鐨勪竴鏈唽瀛愶紝鑺變簡(jiǎn)鎴戞暣鏁翠竴騫寸殑鏃墮棿錛岃繕瑙夊緱鐞嗚В涓嶅銆傚綋鎴戠湅浜?jiǎn)涓閬岼ava涓庢ā寮忥紝璞佺劧寮鏈楋紝濡傛灉鍏堟湁浜?jiǎn)杩欎釜锛屼竴瀹氫笉浼?xì)瑙夊緱璁捐妯″紡閭d箞闅俱?br /><br />2銆傝璁℃ā寮忥細(xì)鍙鐢ㄩ潰鍚戝璞¤蔣浠剁殑鍩虹<br /><img src="http://www.china-pub.com/computers/ebook/0684/cover.gif" /><br />鍓嶉潰鎵鎻愬埌鐨勨滀紶涓栦箣浣溾濓紝涓轟粈涔堥偅涔堢粡鍏革紵鍥犱負(fù)鍙ュ彞璇濋兘鏄粡鍏革紝鍙互璇存病鏈変竴鍙ュ簾璇濓紙銆妀ava涓庢ā寮忋嬪氨琚漢璇存垚搴熻瘽榪炵瘒錛夈?br />java涓庢ā寮忥紝鎴戠湅瀹屽悗灝遍佸コ鏈嬪弸浜?jiǎn)锛岃岃繖鏈功錛屾垜鍗翠繚瀛樹(shù)簡(jiǎn)璧鋒潵錛屼綔涓烘墜鍐屾煡錛岃繖灝辨槸鎴戠殑鐢ㄦ硶銆?br /><br /><br /><br /><br /><br />鏈畬寰呯畫銆傘傘?br /></p> <img src ="http://www.shnenglu.com/huyi/aggbug/10617.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/huyi/" target="_blank">HuYi</a> 2006-07-28 00:02 <a href="http://www.shnenglu.com/huyi/archive/2006/07/28/10617.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Linux鍚姩鍗忚Ver.2.04http://www.shnenglu.com/huyi/archive/2006/06/20/8745.htmlHuYiHuYiTue, 20 Jun 2006 06:46:00 GMThttp://www.shnenglu.com/huyi/archive/2006/06/20/8745.htmlhttp://www.shnenglu.com/huyi/comments/8745.htmlhttp://www.shnenglu.com/huyi/archive/2006/06/20/8745.html#Feedback0http://www.shnenglu.com/huyi/comments/commentRss/8745.htmlhttp://www.shnenglu.com/huyi/services/trackbacks/8745.html聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) THE LINUX/I386 BOOT PROTOCOL
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) ----------------------------

聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) H. Peter Anvin <hpa@zytor.com>
聽(tīng)聽(tīng)聽(tīng)Last update 2005-09-02

On the i386 platform, the Linux kernel uses a rather complicated boot
convention.聽(tīng) This has evolved partially due to historical aspects, as
well as the desire in the early days to have the kernel itself be a
bootable image, the complicated PC memory model and due to changed
expectations in the PC industry caused by the effective demise of
real-mode DOS as a mainstream operating system.

Currently, four versions of the Linux/i386 boot protocol exist.

Old kernels:聽(tīng)zImage/Image support only.聽(tīng) Some very early kernels
聽(tīng)聽(tīng)may not even support a command line.

Protocol 2.00:聽(tīng)(Kernel 1.3.73) Added bzImage and initrd support, as
聽(tīng)聽(tīng)well as a formalized way to communicate between the
聽(tīng)聽(tīng)boot loader and the kernel.聽(tīng) setup.S made relocatable,
聽(tīng)聽(tīng)although the traditional setup area still assumed
聽(tīng)聽(tīng)writable.

Protocol 2.01:聽(tīng)(Kernel 1.3.76) Added a heap overrun warning.

Protocol 2.02:聽(tīng)(Kernel 2.4.0-test3-pre3) New command line protocol.
聽(tīng)聽(tīng)Lower the conventional memory ceiling.聽(tīng)No overwrite
聽(tīng)聽(tīng)of the traditional setup area, thus making booting
聽(tīng)聽(tīng)safe for systems which use the EBDA from SMM or 32-bit
聽(tīng)聽(tīng)BIOS entry points.聽(tīng) zImage deprecated but still
聽(tīng)聽(tīng)supported.

Protocol 2.03:聽(tīng)(Kernel 2.4.18-pre1) Explicitly makes the highest possible
聽(tīng)聽(tīng)initrd address available to the bootloader.

Protocol 2.04:聽(tīng)(Kernel 2.6.14) Extend the syssize field to four bytes.


**** MEMORY LAYOUT

The traditional memory map for the kernel loader, used for Image or
zImage kernels, typically looks like:

聽(tīng)|聽(tīng)聽(tīng)聽(tīng) |
0A0000聽(tīng)+------------------------+
聽(tīng)|聽(tīng) Reserved for BIOS聽(tīng) |聽(tīng)Do not use.聽(tīng) Reserved for BIOS EBDA.
09A000聽(tīng)+------------------------+
聽(tīng)|聽(tīng) Stack/heap/cmdline聽(tīng) |聽(tīng)For use by the kernel real-mode code.
098000聽(tīng)+------------------------+聽(tīng)
聽(tīng)|聽(tīng) Kernel setup聽(tīng)聽(tīng) |聽(tīng)The kernel real-mode code.
090200聽(tīng)+------------------------+
聽(tīng)|聽(tīng) Kernel boot sector聽(tīng) |聽(tīng)The kernel legacy boot sector.
090000聽(tīng)+------------------------+
聽(tīng)|聽(tīng) Protected-mode kernel |聽(tīng)The bulk of the kernel image.
010000聽(tīng)+------------------------+
聽(tīng)|聽(tīng) Boot loader聽(tīng)聽(tīng) |聽(tīng)<- Boot sector entry point 0000:7C00
001000聽(tīng)+------------------------+
聽(tīng)|聽(tīng) Reserved for MBR/BIOS |
000800聽(tīng)+------------------------+
聽(tīng)|聽(tīng) Typically used by MBR |
000600聽(tīng)+------------------------+
聽(tīng)|聽(tīng) BIOS use only聽(tīng) |
000000聽(tīng)+------------------------+


When using bzImage, the protected-mode kernel was relocated to
0x100000 ("high memory"), and the kernel real-mode block (boot sector,
setup, and stack/heap) was made relocatable to any address between
0x10000 and end of low memory.聽(tīng)Unfortunately, in protocols 2.00 and
2.01 the command line is still required to live in the 0x9XXXX memory
range, and that memory range is still overwritten by the early kernel.
The 2.02 protocol resolves that problem.

It is desirable to keep the "memory ceiling" -- the highest point in
low memory touched by the boot loader -- as low as possible, since
some newer BIOSes have begun to allocate some rather large amounts of
memory, called the Extended BIOS Data Area, near the top of low
memory.聽(tīng) The boot loader should use the "INT 12h" BIOS call to verify
how much low memory is available.

Unfortunately, if INT 12h reports that the amount of memory is too
low, there is usually nothing the boot loader can do but to report an
error to the user.聽(tīng) The boot loader should therefore be designed to
take up as little space in low memory as it reasonably can.聽(tīng) For
zImage or old bzImage kernels, which need data written into the
0x90000 segment, the boot loader should make sure not to use memory
above the 0x9A000 point; too many BIOSes will break above that point.


**** THE REAL-MODE KERNEL HEADER

In the following text, and anywhere in the kernel boot sequence, "a
sector" refers to 512 bytes.聽(tīng) It is independent of the actual sector
size of the underlying medium.

The first step in loading a Linux kernel should be to load the
real-mode code (boot sector and setup code) and then examine the
following header at offset 0x01f1.聽(tīng) The real-mode code can total up to
32K, although the boot loader may choose to load only the first two
sectors (1K) and then examine the bootup sector size.

The header looks like:

Offset聽(tīng)Proto聽(tīng)Name聽(tīng)聽(tīng)Meaning
/Size

01F1/1聽(tīng)ALL(1聽(tīng)setup_sects聽(tīng)The size of the setup in sectors
01F2/2聽(tīng)ALL聽(tīng)root_flags聽(tīng)I(yíng)f set, the root is mounted readonly
01F4/4聽(tīng)2.04+(2聽(tīng)syssize聽(tīng)聽(tīng)The size of the 32-bit code in 16-byte paras
01F8/2聽(tīng)ALL聽(tīng)ram_size聽(tīng)DO NOT USE - for bootsect.S use only
01FA/2聽(tīng)ALL聽(tīng)vid_mode聽(tīng)Video mode control
01FC/2聽(tīng)ALL聽(tīng)root_dev聽(tīng)Default root device number
01FE/2聽(tīng)ALL聽(tīng)boot_flag聽(tīng)0xAA55 magic number
0200/2聽(tīng)2.00+聽(tīng)jump聽(tīng)聽(tīng)Jump instruction
0202/4聽(tīng)2.00+聽(tīng)header聽(tīng)聽(tīng)Magic signature "HdrS"
0206/2聽(tīng)2.00+聽(tīng)version聽(tīng)聽(tīng)Boot protocol version supported
0208/4聽(tīng)2.00+聽(tīng)realmode_swtch聽(tīng)Boot loader hook (see below)
020C/2聽(tīng)2.00+聽(tīng)start_sys聽(tīng)The load-low segment (0x1000) (obsolete)
020E/2聽(tīng)2.00+聽(tīng)kernel_version聽(tīng)Pointer to kernel version string
0210/1聽(tīng)2.00+聽(tīng)type_of_loader聽(tīng)Boot loader identifier
0211/1聽(tīng)2.00+聽(tīng)loadflags聽(tīng)Boot protocol option flags
0212/2聽(tīng)2.00+聽(tīng)setup_move_size聽(tīng)Move to high memory size (used with hooks)
0214/4聽(tīng)2.00+聽(tīng)code32_start聽(tīng)Boot loader hook (see below)
0218/4聽(tīng)2.00+聽(tīng)ramdisk_image聽(tīng)initrd load address (set by boot loader)
021C/4聽(tīng)2.00+聽(tīng)ramdisk_size聽(tīng)initrd size (set by boot loader)
0220/4聽(tīng)2.00+聽(tīng)bootsect_kludge聽(tīng)DO NOT USE - for bootsect.S use only
0224/2聽(tīng)2.01+聽(tīng)heap_end_ptr聽(tīng)Free memory after setup end
0226/2聽(tīng)N/A聽(tīng)pad1聽(tīng)聽(tīng)Unused
0228/4聽(tīng)2.02+聽(tīng)cmd_line_ptr聽(tīng)32-bit pointer to the kernel command line
022C/4聽(tīng)2.03+聽(tīng)initrd_addr_max聽(tīng)Highest legal initrd address

(1) For backwards compatibility, if the setup_sects field contains 0, the
聽(tīng)聽(tīng)聽(tīng) real value is 4.

(2) For boot protocol prior to 2.04, the upper two bytes of the syssize
聽(tīng)聽(tīng)聽(tīng) field are unusable, which means the size of a bzImage kernel
聽(tīng)聽(tīng)聽(tīng) cannot be determined.

If the "HdrS" (0x53726448) magic number is not found at offset 0x202,
the boot protocol version is "old".聽(tīng) Loading an old kernel, the
following parameters should be assumed:

聽(tīng)I(yíng)mage type = zImage
聽(tīng)initrd not supported
聽(tīng)Real-mode kernel must be located at 0x90000.

Otherwise, the "version" field contains the protocol version,
e.g. protocol version 2.01 will contain 0x0201 in this field.聽(tīng) When
setting fields in the header, you must make sure only to set fields
supported by the protocol version in use.

The "kernel_version" field, if set to a nonzero value, contains a
pointer to a null-terminated human-readable kernel version number
string, less 0x200.聽(tīng) This can be used to display the kernel version to
the user.聽(tīng) This value should be less than (0x200*setup_sects).聽(tīng) For
example, if this value is set to 0x1c00, the kernel version number
string can be found at offset 0x1e00 in the kernel file.聽(tīng) This is a
valid value if and only if the "setup_sects" field contains the value
14 or higher.

Most boot loaders will simply load the kernel at its target address
directly.聽(tīng) Such boot loaders do not need to worry about filling in
most of the fields in the header.聽(tīng) The following fields should be
filled out, however:

聽(tīng) vid_mode:
聽(tīng)Please see the section on SPECIAL COMMAND LINE OPTIONS.

聽(tīng) type_of_loader:
聽(tīng)I(yíng)f your boot loader has an assigned id (see table below), enter
聽(tīng)0xTV here, where T is an identifier for the boot loader and V is
聽(tīng)a version number.聽(tīng) Otherwise, enter 0xFF here.

聽(tīng)Assigned boot loader ids:
聽(tīng)0聽(tīng) LILO
聽(tīng)1聽(tīng) Loadlin
聽(tīng)2聽(tīng) bootsect-loader
聽(tīng)3聽(tīng) SYSLINUX
聽(tīng)4聽(tīng) EtherBoot
聽(tīng)5聽(tīng) ELILO
聽(tīng)7聽(tīng) GRuB
聽(tīng)8聽(tīng) U-BOOT

聽(tīng)Please contact <hpa@zytor.com> if you need a bootloader ID
聽(tīng)value assigned.

聽(tīng) loadflags, heap_end_ptr:
聽(tīng)I(yíng)f the protocol version is 2.01 or higher, enter the
聽(tīng)offset limit of the setup heap into heap_end_ptr and set the
聽(tīng)0x80 bit (CAN_USE_HEAP) of loadflags.聽(tīng) heap_end_ptr appears to
聽(tīng)be relative to the start of setup (offset 0x0200).

聽(tīng) setup_move_size:
聽(tīng)When using protocol 2.00 or 2.01, if the real mode
聽(tīng)kernel is not loaded at 0x90000, it gets moved there later in
聽(tīng)the loading sequence.聽(tīng) Fill in this field if you want
聽(tīng)additional data (such as the kernel command line) moved in
聽(tīng)addition to the real-mode kernel itself.

聽(tīng) ramdisk_image, ramdisk_size:
聽(tīng)I(yíng)f your boot loader has loaded an initial ramdisk (initrd),
聽(tīng)set ramdisk_image to the 32-bit pointer to the ramdisk data
聽(tīng)and the ramdisk_size to the size of the ramdisk data.

聽(tīng)The initrd should typically be located as high in memory as
聽(tīng)possible, as it may otherwise get overwritten by the early
聽(tīng)kernel initialization sequence.聽(tīng) However, it must never be
聽(tīng)located above the address specified in the initrd_addr_max
聽(tīng)field.聽(tīng)The initrd should be at least 4K page aligned.

聽(tīng) cmd_line_ptr:
聽(tīng)I(yíng)f the protocol version is 2.02 or higher, this is a 32-bit
聽(tīng)pointer to the kernel command line.聽(tīng) The kernel command line
聽(tīng)can be located anywhere between the end of setup and 0xA0000.
聽(tīng)Fill in this field even if your boot loader does not support a
聽(tīng)command line, in which case you can point this to an empty
聽(tīng)string (or better yet, to the string "auto".)聽(tīng) If this field
聽(tīng)is left at zero, the kernel will assume that your boot loader
聽(tīng)does not support the 2.02+ protocol.

聽(tīng) ramdisk_max:
聽(tīng)The maximum address that may be occupied by the initrd
聽(tīng)contents.聽(tīng) For boot protocols 2.02 or earlier, this field is
聽(tīng)not present, and the maximum address is 0x37FFFFFF.聽(tīng) (This
聽(tīng)address is defined as the address of the highest safe byte, so
聽(tīng)if your ramdisk is exactly 131072 bytes long and this field is
聽(tīng)0x37FFFFFF, you can start your ramdisk at 0x37FE0000.)


**** THE KERNEL COMMAND LINE

The kernel command line has become an important way for the boot
loader to communicate with the kernel.聽(tīng) Some of its options are also
relevant to the boot loader itself, see "special command line options"
below.

The kernel command line is a null-terminated string currently up to
255 characters long, plus the final null.聽(tīng) A string that is too long
will be automatically truncated by the kernel, a boot loader may allow
a longer command line to be passed to permit future kernels to extend
this limit.

If the boot protocol version is 2.02 or later, the address of the
kernel command line is given by the header field cmd_line_ptr (see
above.)聽(tīng) This address can be anywhere between the end of the setup
heap and 0xA0000.

If the protocol version is *not* 2.02 or higher, the kernel
command line is entered using the following protocol:

聽(tīng)At offset 0x0020 (word), "cmd_line_magic", enter the magic
聽(tīng)number 0xA33F.

聽(tīng)At offset 0x0022 (word), "cmd_line_offset", enter the offset
聽(tīng)of the kernel command line (relative to the start of the
聽(tīng)real-mode kernel).
聽(tīng)
聽(tīng)The kernel command line *must* be within the memory region
聽(tīng)covered by setup_move_size, so you may need to adjust this
聽(tīng)field.


**** SAMPLE BOOT CONFIGURATION

As a sample configuration, assume the following layout of the real
mode segment (this is a typical, and recommended layout):

聽(tīng)0x0000-0x7FFF聽(tīng)Real mode kernel
聽(tīng)0x8000-0x8FFF聽(tīng)Stack and heap
聽(tīng)0x9000-0x90FF聽(tīng)Kernel command line

Such a boot loader should enter the following fields in the header:

聽(tīng)unsigned long base_ptr;聽(tīng)/* base address for real-mode segment */

聽(tīng)if ( setup_sects == 0 ) {
聽(tīng)聽(tīng)setup_sects = 4;
聽(tīng)}

聽(tīng)if ( protocol >= 0x0200 ) {
聽(tīng)聽(tīng)type_of_loader = <type code>;
聽(tīng)聽(tīng)if ( loading_initrd ) {
聽(tīng)聽(tīng)聽(tīng)ramdisk_image = <initrd_address>;
聽(tīng)聽(tīng)聽(tīng)ramdisk_size = <initrd_size>;
聽(tīng)聽(tīng)}
聽(tīng)聽(tīng)if ( protocol >= 0x0201 ) {
聽(tīng)聽(tīng)聽(tīng)heap_end_ptr = 0x9000 - 0x200;
聽(tīng)聽(tīng)聽(tīng)loadflags |= 0x80; /* CAN_USE_HEAP */
聽(tīng)聽(tīng)}
聽(tīng)聽(tīng)if ( protocol >= 0x0202 ) {
聽(tīng)聽(tīng)聽(tīng)cmd_line_ptr = base_ptr + 0x9000;
聽(tīng)聽(tīng)} else {
聽(tīng)聽(tīng)聽(tīng)cmd_line_magic聽(tīng)= 0xA33F;
聽(tīng)聽(tīng)聽(tīng)cmd_line_offset = 0x9000;
聽(tīng)聽(tīng)聽(tīng)setup_move_size = 0x9100;
聽(tīng)聽(tīng)}
聽(tīng)} else {
聽(tīng)聽(tīng)/* Very old kernel */

聽(tīng)聽(tīng)cmd_line_magic聽(tīng)= 0xA33F;
聽(tīng)聽(tīng)cmd_line_offset = 0x9000;

聽(tīng)聽(tīng)/* A very old kernel MUST have its real-mode code
聽(tīng)聽(tīng)聽(tīng)聽(tīng) loaded at 0x90000 */

聽(tīng)聽(tīng)if ( base_ptr != 0x90000 ) {
聽(tīng)聽(tīng)聽(tīng)/* Copy the real-mode kernel */
聽(tīng)聽(tīng)聽(tīng)memcpy(0x90000, base_ptr, (setup_sects+1)*512);
聽(tīng)聽(tīng)聽(tīng)/* Copy the command line */
聽(tīng)聽(tīng)聽(tīng)memcpy(0x99000, base_ptr+0x9000, 256);

聽(tīng)聽(tīng)聽(tīng)base_ptr = 0x90000;聽(tīng)聽(tīng) /* Relocated */
聽(tīng)聽(tīng)}

聽(tīng)聽(tīng)/* It is recommended to clear memory up to the 32K mark */
聽(tīng)聽(tīng)memset(0x90000 + (setup_sects+1)*512, 0,
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) (64-(setup_sects+1))*512);
聽(tīng)}


**** LOADING THE REST OF THE KERNEL

The 32-bit (non-real-mode) kernel starts at offset (setup_sects+1)*512
in the kernel file (again, if setup_sects == 0 the real value is 4.)
It should be loaded at address 0x10000 for Image/zImage kernels and
0x100000 for bzImage kernels.

The kernel is a bzImage kernel if the protocol >= 2.00 and the 0x01
bit (LOAD_HIGH) in the loadflags field is set:

聽(tīng)is_bzImage = (protocol >= 0x0200) && (loadflags & 0x01);
聽(tīng)load_address = is_bzImage ? 0x100000 : 0x10000;

Note that Image/zImage kernels can be up to 512K in size, and thus use
the entire 0x10000-0x90000 range of memory.聽(tīng) This means it is pretty
much a requirement for these kernels to load the real-mode part at
0x90000.聽(tīng) bzImage kernels allow much more flexibility.


**** SPECIAL COMMAND LINE OPTIONS

If the command line provided by the boot loader is entered by the
user, the user may expect the following command line options to work.
They should normally not be deleted from the kernel command line even
though not all of them are actually meaningful to the kernel.聽(tīng) Boot
loader authors who need additional command line options for the boot
loader itself should get them registered in
Documentation/kernel-parameters.txt to make sure they will not
conflict with actual kernel options now or in the future.

聽(tīng) vga=<mode>
聽(tīng)<mode> here is either an integer (in C notation, either
聽(tīng)decimal, octal, or hexadecimal) or one of the strings
聽(tīng)"normal" (meaning 0xFFFF), "ext" (meaning 0xFFFE) or "ask"
聽(tīng)(meaning 0xFFFD).聽(tīng) This value should be entered into the
聽(tīng)vid_mode field, as it is used by the kernel before the command
聽(tīng)line is parsed.

聽(tīng) mem=<size>
聽(tīng)<size> is an integer in C notation optionally followed by K, M
聽(tīng)or G (meaning << 10, << 20 or << 30).聽(tīng) This specifies the end
聽(tīng)of memory to the kernel. This affects the possible placement
聽(tīng)of an initrd, since an initrd should be placed near end of
聽(tīng)memory.聽(tīng) Note that this is an option to *both* the kernel and
聽(tīng)the bootloader!

聽(tīng) initrd=<file>
聽(tīng)An initrd should be loaded.聽(tīng) The meaning of <file> is
聽(tīng)obviously bootloader-dependent, and some boot loaders
聽(tīng)(e.g. LILO) do not have such a command.

In addition, some boot loaders add the following options to the
user-specified command line:

聽(tīng) BOOT_IMAGE=<file>
聽(tīng)The boot image which was loaded.聽(tīng) Again, the meaning of <file>
聽(tīng)is obviously bootloader-dependent.

聽(tīng) auto
聽(tīng)The kernel was booted without explicit user intervention.

If these options are added by the boot loader, it is highly
recommended that they are located *first*, before the user-specified
or configuration-specified command line.聽(tīng) Otherwise, "init=/bin/sh"
gets confused by the "auto" option.


**** RUNNING THE KERNEL

The kernel is started by jumping to the kernel entry point, which is
located at *segment* offset 0x20 from the start of the real mode
kernel.聽(tīng) This means that if you loaded your real-mode kernel code at
0x90000, the kernel entry point is 9020:0000.

At entry, ds = es = ss should point to the start of the real-mode
kernel code (0x9000 if the code is loaded at 0x90000), sp should be
set up properly, normally pointing to the top of the heap, and
interrupts should be disabled.聽(tīng) Furthermore, to guard against bugs in
the kernel, it is recommended that the boot loader sets fs = gs = ds =
es = ss.

In our example from above, we would do:

聽(tīng)/* Note: in the case of the "old" kernel protocol, base_ptr must
聽(tīng)聽(tīng)聽(tīng) be == 0x90000 at this point; see the previous sample code */

聽(tīng)seg = base_ptr >> 4;

聽(tīng)cli();聽(tīng)/* Enter with interrupts disabled! */

聽(tīng)/* Set up the real-mode kernel stack */
聽(tīng)_SS = seg;
聽(tīng)_SP = 0x9000;聽(tīng)/* Load SP immediately after loading SS! */

聽(tīng)_DS = _ES = _FS = _GS = seg;
聽(tīng)jmp_far(seg+0x20, 0);聽(tīng)/* Run the kernel */

If your boot sector accesses a floppy drive, it is recommended to
switch off the floppy motor before running the kernel, since the
kernel boot leaves interrupts off and thus the motor will not be
switched off, especially if the loaded kernel has the floppy driver as
a demand-loaded module!


**** ADVANCED BOOT TIME HOOKS

If the boot loader runs in a particularly hostile environment (such as
LOADLIN, which runs under DOS) it may be impossible to follow the
standard memory location requirements.聽(tīng) Such a boot loader may use the
following hooks that, if set, are invoked by the kernel at the
appropriate time.聽(tīng) The use of these hooks should probably be
considered an absolutely last resort!

IMPORTANT: All the hooks are required to preserve %esp, %ebp, %esi and
%edi across invocation.

聽(tīng) realmode_swtch:
聽(tīng)A 16-bit real mode far subroutine invoked immediately before
聽(tīng)entering protected mode.聽(tīng) The default routine disables NMI, so
聽(tīng)your routine should probably do so, too.

聽(tīng) code32_start:
聽(tīng)A 32-bit flat-mode routine *jumped* to immediately after the
聽(tīng)transition to protected mode, but before the kernel is
聽(tīng)uncompressed.聽(tīng) No segments, except CS, are set up; you should
聽(tīng)set them up to KERNEL_DS (0x18) yourself.

聽(tīng)After completing your hook, you should jump to the address
聽(tīng)that was in this field before your boot loader overwrote it.



HuYi 2006-06-20 14:46 鍙戣〃璇勮
]]>
Google涓轟粈涔堜細(xì)琚皝閿?http://www.shnenglu.com/huyi/archive/2006/05/31/8002.htmlHuYiHuYiWed, 31 May 2006 15:28:00 GMThttp://www.shnenglu.com/huyi/archive/2006/05/31/8002.htmlhttp://www.shnenglu.com/huyi/comments/8002.htmlhttp://www.shnenglu.com/huyi/archive/2006/05/31/8002.html#Feedback13http://www.shnenglu.com/huyi/comments/commentRss/8002.htmlhttp://www.shnenglu.com/huyi/services/trackbacks/8002.html寰堟棭浠ュ墠灝卞惉璇磋繃Google琚皝閿佺殑娑堟伅,鍥犱負(fù)鑷繁娌℃湁閬囧埌榪?涔熶笉澶浉淇$湡浼?xì)鏈墭q欐牱鐨勪簨鎯?澶氬彲絎戝憖.

涓嶈繃鑷粠鎰熷彈鍒頒簡(jiǎn)涓嬈ourceforge琚皝,灝辮寰楀湪涓浗,鎴栬鐪熶細(xì)鍙戠敓榪欐牱鐨勪簨鎯?

浠婂ぉ,google緇堜簬鎸備簡(jiǎn),gmail涔熸寕浜?鎴戜篃鏃犺浜?

鎵撳惉浜?jiǎn)涓涓?鍏ㄥ浗濂藉鍦版柟鐨勭綉鍙嬮兘璁塊棶涓嶄簡(jiǎn)google浜?

涓氬唴鏈浠や漢閯欒鐨勬渚嬭帿榪囦簬寰蔣闈犳崋緇慖E鎼炶法浜?jiǎn)缃戞?寰蔣鐨勮繖涓劸姘旇嚦浠婅繕鏄ぇ瀹墮剻瑙嗗畠鐨勪富鍥?浣嗘槸璇鋒敞鎰?寰蔣騫舵病鏈夌姝indows鐢ㄦ埛浣跨敤緗戞櫙鐨勬湇鍔?!!!

甯屾湜涓浗鐨刧oogle浜嬩歡涓嶈鎴愪負(fù)浠栧浗鐨勭瑧鏌?

http://post.baidu.com/f?kz=103530334

浠呬互姝よ創(chuàng)綰康Google GMail 聽(tīng)GTalk




鏀寔Google鐨勬湅鍙嬭鍦ㄨ繖閲岀鍚嶅惂!

甯屾湜zf鏃╃偣鎶?font color="#0000ff">G
Mail鍜?font color="#0000ff">GTalk榪樼粰鎴戜滑!!



HuYi 2006-05-31 23:28 鍙戣〃璇勮
]]>
榪欏洖鐪嬭濂借創(chuàng)瀛愬氨鏈夎瘽璇翠簡(jiǎn)^^http://www.shnenglu.com/huyi/archive/2006/05/26/7673.htmlHuYiHuYiFri, 26 May 2006 02:37:00 GMThttp://www.shnenglu.com/huyi/archive/2006/05/26/7673.htmlhttp://www.shnenglu.com/huyi/comments/7673.htmlhttp://www.shnenglu.com/huyi/archive/2006/05/26/7673.html#Feedback1http://www.shnenglu.com/huyi/comments/commentRss/7673.htmlhttp://www.shnenglu.com/huyi/services/trackbacks/7673.html闃呰鍏ㄦ枃

HuYi 2006-05-26 10:37 鍙戣〃璇勮
]]>
午夜久久久久久禁播电影| 久久男人AV资源网站| 亚洲精品无码成人片久久| 久久综合给合久久国产免费| 久久久免费精品re6| 国产精品青草久久久久福利99| 蜜臀久久99精品久久久久久| 人人狠狠综合久久88成人| 91精品免费久久久久久久久| 久久久噜噜噜久久| 久久久久久人妻无码| 久久久久亚洲爆乳少妇无| 97久久超碰国产精品旧版| 久久精品亚洲乱码伦伦中文| 久久久久久夜精品精品免费啦| 久久se精品一区二区影院| 国产精品久久午夜夜伦鲁鲁| 香港aa三级久久三级老师2021国产三级精品三级在 | 国产农村妇女毛片精品久久| 亚洲级αV无码毛片久久精品| 久久99久久无码毛片一区二区| 精品久久8x国产免费观看| 欧美亚洲国产精品久久| 97精品伊人久久久大香线蕉| 国产精品禁18久久久夂久| 狠狠色噜噜色狠狠狠综合久久| 久久无码一区二区三区少妇 | 久久综合久久综合九色| 久久久久女人精品毛片| 久久久久亚洲av无码专区导航 | 亚洲国产成人久久综合碰碰动漫3d| 亚洲伊人久久大香线蕉综合图片| 亚洲国产精品综合久久网络| 国产精品免费久久久久久久久| 97久久国产亚洲精品超碰热| 69SEX久久精品国产麻豆| www性久久久com| 色综合久久久久网| 久久久久久A亚洲欧洲AV冫 | 久久久久99精品成人片| 久久国产精品二国产精品|