<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-637632445865419900</id><updated>2026-06-21T17:22:11.544+08:00</updated><category term="影音"/><category term="C 語言"/><category term="Android"/><category term="kernel"/><category term="SystemC"/><category term="ARM"/><category term="verilog"/><category term="英文"/><category term="BIOS"/><category term="經典c程式100例"/><category term="雜項"/><category term="socket"/><category term="投資"/><category term="霹靂布袋戲"/><category term="Linux"/><category term="mangos"/><category term="平行處理"/><category term="理財"/><category term="生活"/><category term="計算機組織"/><category term="ubuntu"/><category term="定義"/><category term="Bootloader"/><category term="DoCoMo"/><category term="專案管理"/><category term="ESL"/><category term="Protocol"/><category term="USB"/><category term="VirrtualPlatform"/><category term="Audio"/><category term="Brillo"/><category term="CSS"/><category term="Graphic"/><category term="LLVM"/><category term="MPEG"/><category term="WindowsTool"/><category term="感測器"/><category term="BigData"/><category term="C#"/><category term="GPL"/><category term="Google"/><category term="MID"/><category term="OpenSourceTool"/><category term="banchmark"/><category term="bluespec"/><category term="jpeg"/><category term="mysql"/><category term="tensorflow"/><category term="x86"/><category term="專利"/><category term="數學"/><category term="論文"/><title type='text'>史丹利部落格</title><subtitle type='html'>倘若您認為「本網站」內容、圖案、超連結等侵害他人之著作權或不願意被連結，請留言通知站長，站長看到留言後會立即移除。</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>301</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-2734423178962595236</id><published>2020-09-09T22:04:00.003+08:00</published><updated>2020-09-09T22:04:16.494+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="投資"/><title type='text'>一個小故事讓我們明白資金流通的意義</title><content type='html'>&lt;p&gt;“又是炎熱小鎮慵懶的一天。太陽高掛，街道無人，每個人都債台高築，靠信用度日。這時，從外地來了一位有錢的旅客，他進了一家旅館，拿出一張1000 元鈔票放在櫃檯，說想先看看房間，挑一間合適的過夜，就在此人上樓的時候----&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;店主抓了這張1000 元鈔，跑到隔壁屠戶那裡支付了他欠的肉錢。&lt;/p&gt;&lt;p&gt;屠夫有了1000 元，橫過馬路付清了豬農的豬本錢。&lt;/p&gt;&lt;p&gt;豬農拿了1000 元，出去付了他欠的飼料款。&lt;/p&gt;&lt;p&gt;那個賣飼料的老兄，拿到1000 元趕忙去付清他召妓的錢1000 元，&lt;/p&gt;&lt;p&gt;這名妓女衝到旅館付了她所欠的房錢。&lt;/p&gt;&lt;p&gt;旅館店主忙把這1000 元放到櫃檯上，以免旅客下樓時起疑。此時那人正下樓來，拿起1000 元，聲稱沒一間滿意的，他把錢收進口袋，走了……&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;這一天，沒有人生產了什麼東西，也沒有人得到什麼東西，可全鎮的債務都清了，大家很開心。&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;　　看清楚了吧，故事中沒有這1000 元的流通，每個人都債台高築，有了這1000 元的流通，每個人都不欠錢了，也就是說，實際效果是每個人都賺了1000 元，還清了債務。&lt;/p&gt;&lt;p&gt;　　&lt;/p&gt;&lt;p&gt;　　故事有趣逗人，可這道理是非常深刻的。它說出了財富的來源---- 資金流通。&lt;/p&gt;&lt;p&gt;　　&lt;/p&gt;&lt;p&gt;　　那有人問了， 1000 元只不過是在每人各自手中拿著跑了一圈會到原地，又沒有產生任何實質的物質財富，比如大米、鋼鐵，煤炭…… ，怎麼就產生了財富，全是虛的嘛。可是事情就這麼神奇。&lt;/p&gt;&lt;p&gt;　　&lt;/p&gt;&lt;p&gt;實際上來旅館住宿的那個旅客，他帶的那1000 元就是財富來源的本金，這1000 元是有勞動價值的，他的辛苦勞動賺來的錢。也就是說我們社會中的每個人的勞動付出，勞動價值，體現在社會上就是金錢。&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;錢幣就是勞動價值的符號。&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;　　當這1000 元在每個人手中流動時，實質上是勞動的價值在流動，是有實實在在的東西在裡邊的，這當然就會產生財富的。只不過是流通的太快了，叫人不可思議啦。&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;如果流通慢點，就是這樣的情景：店主借了1000 元，多開一段時間旅館錢就賺出來；屠夫多殺兩頭豬；豬農多樣一段時間豬；賣飼料的多做點飼料；妓女…… . 。這就也都賺錢了，債務也都能還清。只是資金流通的慢了，財富增長的慢了。&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;　　如果不流通，店主不動那1000元，每個人還都是債台高築。對每個人來說也就是沒創造出財富來。&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;也 可以舉一個現實生活中的例子：比如我是一個電廠工人，一個月拿到了2000 元工資，這就是我一個月的勞動價值。我買了農民的米麵、蔬菜；農民買了種子、化肥；化肥廠買了鋼材原料用於建廠，生產；鋼鐵廠買了煤炭煉鋼；煤炭生產要用 到電力，形成一個循環圈。 （當然社會上經濟生產的循環是輻射開的，非常龐大的系統，這裡只是做一個單一的鏈條循環圈說說）。假如一個月時間一個循環下來創造財富2 萬元，那要是半個月資金循環一次呢，那一個月就有4 萬元的財富，一周循環一次呢，一個月就有8 萬元的財富。可見同樣一個月的時間，資金流通快了創造的財富就大得多了。&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;明白了 財富來自於資金流通！ ！&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/2734423178962595236/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/2734423178962595236' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/2734423178962595236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/2734423178962595236'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2020/09/blog-post.html' title='一個小故事讓我們明白資金流通的意義'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-6799701182938303884</id><published>2020-08-05T11:16:00.006+08:00</published><updated>2020-08-05T11:16:45.107+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ARM"/><title type='text'>ARM Debug Breakpoint</title><content type='html'>&lt;div&gt;記錄一下!&lt;/div&gt;&lt;a href=&quot;https://github.com/scottt/debugbreak&quot;&gt;https://github.com/scottt/debugbreak&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/6799701182938303884/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/6799701182938303884' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/6799701182938303884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/6799701182938303884'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2020/08/arm-debug-breakpoint.html' title='ARM Debug Breakpoint'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-7494232134780876152</id><published>2018-12-25T10:50:00.002+08:00</published><updated>2018-12-25T10:51:24.629+08:00</updated><title type='text'>Backup .gitignore with path</title><content type='html'>find . -name .gitignore -exec cp --parents {} ../backup/ \;</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/7494232134780876152/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/7494232134780876152' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/7494232134780876152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/7494232134780876152'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2018/12/backup-gitignore-with-path.html' title='Backup .gitignore with path'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-1534010062070685476</id><published>2018-02-09T11:19:00.001+08:00</published><updated>2018-02-09T11:19:56.876+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="雜項"/><title type='text'>Chrome Browser White Screen 白屏問題</title><content type='html'>昨天差點昏倒, 因為Chrome Browser一開啟後居然一片白畫面. 雖然還有IE可以用, 但就是習慣Chrome了啊, 然後開始Google別人如何解決, 不過看起來不少人遇到相同的問題, 但都沒什麼解決方法. 什麼掃毒啦, 重新安裝Chrome啦, 砍掉Default啦....對我都沒用, 又不想重新安裝系統.&lt;br /&gt;
&lt;br /&gt;
我遇到的狀況如下圖, 除了右上角的3個按鈕以外, 其它的都是白的.&lt;br /&gt;
後來發現一件事, 其實Chrome是好的, 它的所有功能都是正常的, 唯一的問題是畫出來的結果&quot;白色&quot;. 你可以試試在原本的輸入網址的地方打字看看, 或是原本的X按鈕下方, 試著點看看Setting按鈕.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHV-dPFsxBLxXkzQiUrcYPYrajais16HgBlouSdYeN4YMWDby8_a-_u_A8I3fuBU2J2xe3KDf86wFsO1dfCGSOvsS6HdGbJ1ov3LfdDlWs15I_qOS-oaR3sebiUAuBH8_rreOFARt5TZs/s1600/chrome-white1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;701&quot; data-original-width=&quot;807&quot; height=&quot;277&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHV-dPFsxBLxXkzQiUrcYPYrajais16HgBlouSdYeN4YMWDby8_a-_u_A8I3fuBU2J2xe3KDf86wFsO1dfCGSOvsS6HdGbJ1ov3LfdDlWs15I_qOS-oaR3sebiUAuBH8_rreOFARt5TZs/s320/chrome-white1.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
(Chrome Browser白屏的狀況)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgBypUCMKDBk60LFl974LppSTsy5YuSzfrH7Kzb4ilthymrQQ9eWglFmqrXnGsdaqdM5ZK_qZ-8vRE6eAor7fyJ1S4YWKfroo30-kbFyGHgD-8xh8dxSqtM4-QIxYxQCJo_A9LSu2iWuw/s1600/chrome-white2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;701&quot; data-original-width=&quot;807&quot; height=&quot;277&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgBypUCMKDBk60LFl974LppSTsy5YuSzfrH7Kzb4ilthymrQQ9eWglFmqrXnGsdaqdM5ZK_qZ-8vRE6eAor7fyJ1S4YWKfroo30-kbFyGHgD-8xh8dxSqtM4-QIxYxQCJo_A9LSu2iWuw/s320/chrome-white2.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
(在網址列還可以打字)&lt;/div&gt;
&lt;br /&gt;
如果你是跟我相同的情況, 目前我有一個解決方案, 如下圖所示.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGQ1ONNLcR8j9cxFObKVL7tQj1wHNsPe7ZEmCozlzGC9jf1itIcpPRElzmParbvac3iLecOEAKfmKZhYJfEMLkrX9sFEPvFTAoZfq5l3OWsWvxSartcrDSnPBI2xgk0J0KviMnMuyV4P8/s1600/chrome-disable-gpu.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;604&quot; data-original-width=&quot;421&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGQ1ONNLcR8j9cxFObKVL7tQj1wHNsPe7ZEmCozlzGC9jf1itIcpPRElzmParbvac3iLecOEAKfmKZhYJfEMLkrX9sFEPvFTAoZfq5l3OWsWvxSartcrDSnPBI2xgk0J0KviMnMuyV4P8/s320/chrome-disable-gpu.png&quot; width=&quot;223&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
就是在啟動chrome時, 多加一個參數, 把使用GPU的功能關閉. 如此一來一切就正常了.&lt;br /&gt;
目前我的情況看起來是, Chrome Browser跟我的Ultra Station USB棒子搶GPU資源, Chrome Browser搶輸了, 所以畫不出來, 我只要拔掉Ultra Station USB棒子, Chrome就正常了, 要2個同時運作, 只能先把Chrome的GPU繪圖加速關閉了.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/1534010062070685476/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/1534010062070685476' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/1534010062070685476'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/1534010062070685476'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2018/02/chrome-browser-white-screen.html' title='Chrome Browser White Screen 白屏問題'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHV-dPFsxBLxXkzQiUrcYPYrajais16HgBlouSdYeN4YMWDby8_a-_u_A8I3fuBU2J2xe3KDf86wFsO1dfCGSOvsS6HdGbJ1ov3LfdDlWs15I_qOS-oaR3sebiUAuBH8_rreOFARt5TZs/s72-c/chrome-white1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-2735576870969427245</id><published>2017-12-14T18:29:00.001+08:00</published><updated>2017-12-14T18:29:21.508+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="tensorflow"/><title type='text'>tensorflow build_pip_package error</title><content type='html'>在build_pip_package時遇到問題:&lt;br /&gt;
&lt;br /&gt;
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg&lt;br /&gt;
四 12月 14 18:11:04 CST 2017 : === Using tmpdir: /tmp/tmp.cyP6dwC7mh&lt;br /&gt;
~/tensorflow/bazel-bin/tensorflow/tools/pip_package/build_pip_package.runfiles ~/tensorflow&lt;br /&gt;
~/tensorflow&lt;br /&gt;
/tmp/tmp.cyP6dwC7mh ~/tensorflow&lt;br /&gt;
四 12月 14 18:11:06 CST 2017 : === Building wheel&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;error in tensorflow setup command: &#39;install_requires&#39; must be a string or list of strings containing valid project/version requirement specifiers&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;sudo pip install -U setuptools&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/2735576870969427245/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/2735576870969427245' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/2735576870969427245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/2735576870969427245'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2017/12/tensorflow-buildpippackage-error.html' title='tensorflow build_pip_package error'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-7317803184026650731</id><published>2017-11-02T16:36:00.002+08:00</published><updated>2017-11-02T16:36:46.523+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SystemC"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>pthread operation not permitted error</title><content type='html'>出現這種錯誤, 看起來是因為Ubuntu基於安全性的考量, 在使用ptrace時有所限制.&lt;br /&gt;
而限制的設定檔在/etc/sysctl.d/10-ptrace.conf&lt;br /&gt;
預設內容為:&amp;nbsp;kernel.yama.ptrace_scope = 1&lt;br /&gt;
&lt;br /&gt;
A PTRACE scope of &quot;0&quot; is the more permissive mode.&lt;br /&gt;
A scope of &quot;1&quot; limits # PTRACE only to direct child processes.&lt;br /&gt;
&lt;br /&gt;
只要把kernel.yama.ptrace_scope 改為0, 然後重新開機即可.&lt;br /&gt;
&lt;br /&gt;
PS:如果你的帳號可以sudo的話, 那也可以用sudo 或root去執行你的程式, 這種情況下是不會被限制的.</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/7317803184026650731/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/7317803184026650731' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/7317803184026650731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/7317803184026650731'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2017/11/pthread-operation-not-permitted-error.html' title='pthread operation not permitted error'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-4767159355945635282</id><published>2017-09-25T11:33:00.001+08:00</published><updated>2017-09-25T11:33:19.159+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SystemC"/><title type='text'>GCC編譯錯誤: relocation truncated to fit: R_X86_64_32S against symbol `xxxxx` defined in `.bss&#39; section in xxxxx</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
在GCC的編譯參數加入&quot;-mcmodel=xxxx&quot;, 即可解決這個編譯錯誤的問題&lt;br /&gt;
&lt;br /&gt;
-mcmodel=tiny&lt;br /&gt;
Generate code for the tiny code model. The program and its statically defined symbols must be within 1GB of each other. Pointers are 64 bits. Programs can be statically or dynamically linked. This model is not fully implemented and mostly treated as ‘small’.&lt;br /&gt;
-mcmodel=small&lt;br /&gt;
Generate code for the small code model. The program and its statically defined symbols must be within 4GB of each other. Pointers are 64 bits. Programs can be statically or dynamically linked. This is the default code model.&lt;br /&gt;
-mcmodel=large&lt;br /&gt;
Generate code for the large code model. This makes no assumptions about addresses and sizes of sections. Pointers are 64 bits. Programs can be statically linked only.</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/4767159355945635282/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/4767159355945635282' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/4767159355945635282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/4767159355945635282'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2017/09/gcc-relocation-truncated-to-fit.html' title='GCC編譯錯誤: relocation truncated to fit: R_X86_64_32S against symbol `xxxxx` defined in `.bss&#39; section in xxxxx'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-479051339477953419</id><published>2017-03-15T15:11:00.000+08:00</published><updated>2017-03-15T15:11:28.191+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Beej&#39;s Guide to Network Programming</title><content type='html'>發現一本寫的還不錯的Linux socket 網路程式設計書,&amp;nbsp;對初學者而言是一份很好的開始&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi63HPALxkJRwiL96RB0oVl7jmbDbnlLM-N1czyddZcZsQkitd5TcPRI9cpdvJO04GBoyAknZgyTytbdaK_vCW32TekCzjx967yXvLrNbXU35tKV7HZAt1mG1gs46v9g51khlqpB130ilA/s1600/beejsguite.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi63HPALxkJRwiL96RB0oVl7jmbDbnlLM-N1czyddZcZsQkitd5TcPRI9cpdvJO04GBoyAknZgyTytbdaK_vCW32TekCzjx967yXvLrNbXU35tKV7HZAt1mG1gs46v9g51khlqpB130ilA/s1600/beejsguite.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span id=&quot;goog_1083196020&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_1083196021&quot;&gt;&lt;/span&gt;&lt;br /&gt;
Beej&#39;s Guide to Network Programming&lt;br /&gt;
譯者：Aaron Liao（廖明沂），May, 2014&lt;br /&gt;
&lt;br /&gt;
GitBook：&lt;a href=&quot;https://www.gitbook.com/book/myliao/beej-s-guide-to-network-programming-chinese-zhtw/details&quot; style=&quot;background-color: white; color: #551a8b; font-family: georgia, serif; font-size: 16px; letter-spacing: 1px; text-decoration: none;&quot;&gt;Beej&#39;s Guide to Network Programming GitBook&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
繁體中文網頁版:&amp;nbsp;&lt;a href=&quot;http://beej-zhtw.netdpi.net/&quot;&gt;http://beej-zhtw.netdpi.net/&lt;/a&gt;&lt;br /&gt;
英文官網:&amp;nbsp;&lt;a href=&quot;http://beej.us/guide/bgnet/&quot;&gt;http://beej.us/guide/bgnet/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/479051339477953419/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/479051339477953419' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/479051339477953419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/479051339477953419'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2017/03/beejs-guide-to-network-programming.html' title='Beej&#39;s Guide to Network Programming'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi63HPALxkJRwiL96RB0oVl7jmbDbnlLM-N1czyddZcZsQkitd5TcPRI9cpdvJO04GBoyAknZgyTytbdaK_vCW32TekCzjx967yXvLrNbXU35tKV7HZAt1mG1gs46v9g51khlqpB130ilA/s72-c/beejsguite.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-3049349815744915822</id><published>2016-12-06T14:53:00.001+08:00</published><updated>2016-12-06T14:53:25.058+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MPEG"/><title type='text'>MediaInfo Tool</title><content type='html'>記錄一下一個工具&lt;a href=&quot;https://zh.wikipedia.org/wiki/MediaInfo&quot;&gt;MediaInfo&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://upload.wikimedia.org/wikipedia/commons/9/98/MediaInfo_(2).png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;548&quot; src=&quot;https://upload.wikimedia.org/wikipedia/commons/9/98/MediaInfo_(2).png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/3049349815744915822/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/3049349815744915822' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/3049349815744915822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/3049349815744915822'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2016/12/mediainfo-tool.html' title='MediaInfo Tool'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-6667096533367297188</id><published>2016-10-18T21:07:00.001+08:00</published><updated>2016-10-18T21:07:24.065+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="理財"/><title type='text'>兩堆狗屎的經濟學</title><content type='html'>兩堆狗屎的經濟學&lt;br /&gt;
&lt;br /&gt;
兩個聰明的經濟學天才青年，經常為一些高深的經濟學理論爭論不休。&lt;br /&gt;
&lt;br /&gt;
一天飯復一起去散步 &amp;nbsp; &amp;nbsp;正在難分高下的時候&lt;br /&gt;
&lt;br /&gt;
為了某個數學驗證的證明&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; 兩位傑出突然發現前面的草地上有一堆狗屎&lt;br /&gt;
&lt;br /&gt;
又爭執了起來&lt;br /&gt;
&lt;br /&gt;
甲就對乙說：「如果你能把它吃下去，我願意出五丰萬。」&lt;br /&gt;
&lt;br /&gt;
千萬的誘惑可真不小，吃還是不吃呢？&lt;br /&gt;
&lt;br /&gt;
乙拿 出紙筆，進行了精確的數學計算，很快得出了經濟學上的最佳報酬率&lt;br /&gt;
&lt;br /&gt;
解： &amp;nbsp;吃！於是甲損失了五千萬！&lt;br /&gt;
&lt;br /&gt;
當然，乙的這頓加餐吃的也並不輕鬆。&lt;br /&gt;
&lt;br /&gt;
兩個人繼續散步，突然又發現另一堆狗屎，&lt;br /&gt;
&lt;br /&gt;
這時候乙開始劇烈的反胃，而甲也有點心疼剛才花掉的五千萬了。&lt;br /&gt;
&lt;br /&gt;
於是乙對甲說：「你把它吃下去，我也給你五丰萬 · 」&lt;br /&gt;
&lt;br /&gt;
於是，不同的計算方法，相同的計算結果一 『 吃！ 』&lt;br /&gt;
&lt;br /&gt;
甲滿意足的收回了五千萬，&lt;br /&gt;
&lt;br /&gt;
而乙似乎也找到了一點心理平衡。&lt;br /&gt;
&lt;br /&gt;
可是突然問，天才們同時嚎啕大又：鬧了半天我們什麼也沒有得到，卻白白的吃了兩堆狗屎！&lt;br /&gt;
&lt;br /&gt;
他們怎麼也想不通，只好去請教他們的教授，一位著名的經濟學泰斗給池們解釋原因。&lt;br /&gt;
&lt;br /&gt;
教授聽了兩位高足的故事，沒想到泰斗也嚎啕大又起來。&lt;br /&gt;
&lt;br /&gt;
好不容易等情緒穩定了一點，只見經濟學泰斗顫巍巍的舉起一根手指頭，無比激動地說：「一億啊！一億啊！一我親愛 的同學，我代表國家感謝你們，你們僅僅吃了兩堆狗屎，就為國家的GDP國內生產毛頜）貢獻了一億的產值！」</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/6667096533367297188/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/6667096533367297188' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/6667096533367297188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/6667096533367297188'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2016/10/blog-post.html' title='兩堆狗屎的經濟學'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-6029643781555934427</id><published>2016-10-14T21:57:00.001+08:00</published><updated>2016-10-14T21:57:06.052+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'> Awesome Cheatsheet</title><content type='html'>裏面有很多有趣的Cheatsheet&lt;br /&gt;
&lt;a href=&quot;https://github.com/detailyang/awesome-cheatsheet&quot;&gt;Awesome Cheatsheet&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/6029643781555934427/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/6029643781555934427' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/6029643781555934427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/6029643781555934427'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2016/10/awesome-cheatsheet.html' title=' Awesome Cheatsheet'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-4747777115262845405</id><published>2016-06-18T14:29:00.002+08:00</published><updated>2016-06-18T14:30:49.435+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="計算機組織"/><title type='text'>10分鐘了解CPU如何運作</title><content type='html'>&lt;iframe width=&quot;854&quot; height=&quot;480&quot; src=&quot;https://www.youtube.com/embed/ZyPewh04OzQ&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/4747777115262845405/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/4747777115262845405' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/4747777115262845405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/4747777115262845405'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2016/06/10cpu.html' title='10分鐘了解CPU如何運作'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/ZyPewh04OzQ/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-7509424019077368174</id><published>2016-05-03T10:51:00.000+08:00</published><updated>2016-05-03T10:51:44.016+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BigData"/><title type='text'>陳兆麟老師的 IT 實務應用範例 Hadoop實務應用範例</title><content type='html'>紀錄一下, 陳兆麟老師在Hadoop所分享的資料&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;https://drive.google.com/folderview?id=0B7_CUSsY2cbnSXlZQjdUazl1alk&amp;usp=sharing&amp;tid=0B7_CUSsY2cbnbm90UTNDWmcwaGs#list&quot;&gt;陳兆麟老師的 IT 實務應用範例 › Hadoop 實務應用範例&lt;/a&gt;&lt;br&gt;
我需要的&lt;a href=&quot;https://drive.google.com/file/d/0B7_CUSsY2cbnSk1kOXVVX1VOdnM/view&quot;&gt;在樹莓派安裝 Hadoop 執行 MapReduce 應用程式(For Single Node)&lt;/a&gt;
</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/7509424019077368174/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/7509424019077368174' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/7509424019077368174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/7509424019077368174'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2016/05/it-hadoop.html' title='陳兆麟老師的 IT 實務應用範例 Hadoop實務應用範例'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-1443382779428492050</id><published>2016-03-29T15:13:00.000+08:00</published><updated>2016-04-09T13:55:33.509+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SystemC"/><title type='text'>SystemC stack_protect assertion!</title><content type='html'> virtual void sc_core::sc_cor_qt::stack_protect(bool): Assertion `ret == 0&#39; failed.&lt;br&gt;
&lt;br&gt;
當你遇到這個錯誤時, 代表可能是你的vm.max_map_count太小了.&lt;br&gt;
在systemc裏的這個QuickThread裏面會用到mprotect, 主要功能是切換stack的保護開關, 但這個保護在每個process有數量上的限制.

Linux Ubuntu裏的預設值/proc/sys/vm/max_map_count為66530&lt;br&gt;
你可以下這個命令試看看: sudo sysctl -w vm.max_map_count=131060&lt;br&gt;
&lt;br&gt;
vm.max_map_count在Understand Linux Kernel一書中解釋為&lt;br&gt;
The map_count field of the memory descriptor contains the number of regions owned by the process.&lt;br&gt;
By default, a process may own up to 65536 different memory regions; however, the system administrator may change this limit by writing in the /proc/sys/vm/max_map_count file.&lt;br&gt;
</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/1443382779428492050/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/1443382779428492050' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/1443382779428492050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/1443382779428492050'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2016/03/systemc-stackprotect-assertion.html' title='SystemC stack_protect assertion!'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-4336854041942944249</id><published>2016-03-25T19:58:00.001+08:00</published><updated>2016-03-25T19:58:28.338+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>How to write share libraries.</title><content type='html'>&lt;iframe src=&quot;//www.slideshare.net/slideshow/embed_code/key/c1g1RpenjiiwIB&quot; width=&quot;668&quot; height=&quot;714&quot; frameborder=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; scrolling=&quot;no&quot; style=&quot;border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;&quot; allowfullscreen&gt; &lt;/iframe&gt; &lt;div style=&quot;margin-bottom:5px&quot;&gt; &lt;strong&gt; &lt;a href=&quot;//www.slideshare.net/stenlyho/how-to-write-shared-libraries-60023588&quot; title=&quot;How to write shared libraries!&quot; target=&quot;_blank&quot;&gt;How to write shared libraries!&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a target=&quot;_blank&quot; href=&quot;//www.slideshare.net/stenlyho&quot;&gt;Stanley Ho&lt;/a&gt;&lt;/strong&gt; &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/4336854041942944249/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/4336854041942944249' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/4336854041942944249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/4336854041942944249'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2016/03/how-to-write-share-libraries.html' title='How to write share libraries.'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-3373733151877795143</id><published>2016-03-22T22:20:00.002+08:00</published><updated>2016-03-22T22:20:40.528+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="影音"/><title type='text'>「求知若渴、虛懷若愚」Steve Jobs 賈伯斯史丹佛大學演講（完整版）</title><content type='html'>&lt;iframe width=&quot;854&quot; height=&quot;480&quot; src=&quot;https://www.youtube.com/embed/cqmW0ax08B8&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/3373733151877795143/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/3373733151877795143' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/3373733151877795143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/3373733151877795143'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2016/03/steve-jobs.html' title='「求知若渴、虛懷若愚」Steve Jobs 賈伯斯史丹佛大學演講（完整版）'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/cqmW0ax08B8/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-1897403843952551989</id><published>2016-03-19T22:44:00.000+08:00</published><updated>2016-03-19T22:45:24.516+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C 語言"/><title type='text'>Jserv AMaCC</title><content type='html'>記錄一下Jserv和學生陳建霖、梁穎睿合作開發的small C Compiler.&lt;br&gt;
&lt;br&gt;
* 可輸出 ARM 架構的 ELF 執行檔&lt;br&gt;
* 可編譯自己並輸出合法的執行檔 (self-compilation)&lt;br&gt;
* 支援 C89 經典語法&lt;br&gt;
* 支援動態連結函式庫，可很容易使用作業系統提供的服務&lt;br&gt;
* 提供 JIT 編譯器支援，對於想理解 ARM 架構和虛擬機器設計者，不失是個參考&lt;br&gt;
程式碼發布於 GitHub: &lt;a href=&quot;https://github.com/jserv/amacc&quot;&gt;https://github.com/jserv/amacc&lt;/a&gt;&lt;br&gt;</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/1897403843952551989/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/1897403843952551989' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/1897403843952551989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/1897403843952551989'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2016/03/jserv-amacc.html' title='Jserv AMaCC'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-1923242129556116067</id><published>2016-03-19T22:40:00.000+08:00</published><updated>2016-03-19T22:40:11.698+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Linux Performance Observability Tools</title><content type='html'>Linux Performance Observability Tools
這個表畫的真的讚!
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJFSm5Eg3AdYqgvR6S-t1rdkQbq4wgCsrK6tGy_nt5DCr4ChVPpjEuH8Szp3yuwznJ8d2qZB-0lkxTLw_shzZUQkPPpphyphenhyphen4L9p1-dDU6ugXOVZBG5N9mMPWDyQtZ-VGQ5bBeaQAT2aGBc/s1600/linux_observability_tools.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJFSm5Eg3AdYqgvR6S-t1rdkQbq4wgCsrK6tGy_nt5DCr4ChVPpjEuH8Szp3yuwznJ8d2qZB-0lkxTLw_shzZUQkPPpphyphenhyphen4L9p1-dDU6ugXOVZBG5N9mMPWDyQtZ-VGQ5bBeaQAT2aGBc/s640/linux_observability_tools.png&quot; /&gt;&lt;/a&gt;
來源:
&lt;a href=&quot;http://www.brendangregg.com/linuxperf.html&quot;&gt;Linux Performance&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/1923242129556116067/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/1923242129556116067' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/1923242129556116067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/1923242129556116067'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2016/03/linux-performance-observability-tools.html' title='Linux Performance Observability Tools'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJFSm5Eg3AdYqgvR6S-t1rdkQbq4wgCsrK6tGy_nt5DCr4ChVPpjEuH8Szp3yuwznJ8d2qZB-0lkxTLw_shzZUQkPPpphyphenhyphen4L9p1-dDU6ugXOVZBG5N9mMPWDyQtZ-VGQ5bBeaQAT2aGBc/s72-c/linux_observability_tools.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-1645631422689859880</id><published>2016-03-12T13:24:00.000+08:00</published><updated>2016-03-12T13:24:59.344+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Revolution OS &amp; The Code</title><content type='html'>紀錄片&lt;br /&gt;
Revolution OS作業系統革命&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;569&quot; src=&quot;https://www.youtube.com/embed/vWwvh3036Fw&quot; width=&quot;758&quot;&gt;&lt;/iframe&gt;
&lt;br&gt;The Code&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;569&quot; src=&quot;https://www.youtube.com/embed/XMm0HsmOTFI&quot; width=&quot;758&quot;&gt;&lt;/iframe&gt;

更多訊息說明請參考:
&lt;br /&gt;
&lt;a href=&quot;http://mropengate.blogspot.tw/2016/02/revolution-osthe-code.html&quot;&gt;《Revolution OS》與《The Code》心得（上）：自由軟體 和 開源軟體 的歷史與展望&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/1645631422689859880/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/1645631422689859880' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/1645631422689859880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/1645631422689859880'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2016/03/revolution-os-code.html' title='Revolution OS &amp; The Code'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/vWwvh3036Fw/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-1548497344539711043</id><published>2016-01-30T21:33:00.000+08:00</published><updated>2016-01-30T22:10:26.425+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="banchmark"/><title type='text'>siege - HTTP regression testing and benchmarking utility</title><content type='html'>突然發現一個工具 siege, 它可以用來模擬送大量的要求(request)到網頁伺服器上.&lt;br /&gt;
&lt;br /&gt;
比如底下的範例:&lt;br /&gt;
siege -d10 -c10 -t1m http://192.168.0.1/test.html&lt;br /&gt;
&lt;br /&gt;
-d 10 表示每個要求之間的最大延遲為10秒&lt;br /&gt;
-c 10 代表同時有10個使用者&lt;br /&gt;
-t1m 表示全部測試時間為1分鐘&lt;br /&gt;
&lt;br /&gt;
另外看到一個不錯的想法, 可以用樹莓派來建構實驗用網路架構&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;img alt=&quot;raspberry-pi-dramble-lemp-redis-architecture.png&quot; src=&quot;https://github.com/geerlingguy/raspberry-pi-dramble/blob/master/images/raspberry-pi-dramble-lemp-redis-architecture.png?raw=true&quot; /&gt;&lt;/div&gt;
&lt;br /&gt;
參考資料:&lt;br /&gt;
&lt;a href=&quot;http://raspberrywebserver.com/raspberrypicluster/raspberry-pi-server-cluster-tests.html&quot;&gt;Raspberry Pi Server Cluster Tests&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://github.com/geerlingguy/raspberry-pi-dramble&quot;&gt;geerlingguy/raspberry-pi-dramble&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/1548497344539711043/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/1548497344539711043' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/1548497344539711043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/1548497344539711043'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2016/01/siege-http-regression-testing-and.html' title='siege - HTTP regression testing and benchmarking utility'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-1191265556193514270</id><published>2016-01-19T14:12:00.001+08:00</published><updated>2016-01-19T14:12:39.909+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="VirrtualPlatform"/><title type='text'>Gem5 Memory Model Classes List</title><content type='html'>&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: &amp;quot;andale mono&amp;quot; , &amp;quot;lucida console&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;fixed&amp;quot; , monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt; ./build/ARM/gem5.opt configs/example/fs.py --list-mem-types
gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 compiled Jan  6 2016 12:56:49
gem5 started Jan 19 2016 14:09:40
gem5 executing on ubuntu-core40
command line: ./build/ARM/gem5.opt configs/example/fs.py --list-mem-types

Available memory classes:
        GDDR5_4000_x64
        HMC_2500_x32
        DRAMCtrl
        LPDDR3_1600_x32
        LPDDR2_S4_1066_x32
        WideIO_200_x128
        DDR3_1600_x64
        RubyMemoryControl
        DDR3_2133_x64
        SimpleMemory
        DDR4_2400_x64
&lt;/code&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/1191265556193514270/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/1191265556193514270' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/1191265556193514270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/1191265556193514270'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2016/01/gem5-memory-model-classes-list.html' title='Gem5 Memory Model Classes List'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-8973334985293769508</id><published>2016-01-06T15:35:00.002+08:00</published><updated>2016-01-18T18:01:33.451+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="VirrtualPlatform"/><title type='text'>Gem5 Simulator</title><content type='html'>&lt;b&gt;官方網址&lt;/b&gt;: &lt;a href=&quot;http://www.gem5.org/Main_Page&quot;&gt;http://www.gem5.org/Main_Page&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
它是什麼呢? 官方的說明如下:&lt;br /&gt;
The gem5 simulator is a modular platform for computer-system architecture research, encompassing system-level architecture as well as processor microarchitecture.&lt;br /&gt;
&lt;br /&gt;
你可以先看看底下的Video, 它介紹了Gem5運行過程以及最後跑起來的狀況:&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;480&quot; src=&quot;https://www.youtube.com/embed/gd_DtxQD5kc&quot; width=&quot;854&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;首先要下載Gem5的系統模擬程式 (&lt;a href=&quot;http://www.gem5.org/Download&quot;&gt;Gem5 Download&lt;/a&gt;)&lt;/b&gt;&lt;br /&gt;
它是使用hg指令下載, 因此你的系統必需有安裝mercurial套件.&lt;br /&gt;
(1)sudo apt-get install mercurial&lt;br /&gt;
(2)hg clone http://repo.gem5.org/gem5-stable&lt;br /&gt;
你也可以先去&lt;a href=&quot;http://repo.gem5.org/gem5-stable&quot;&gt;http://repo.gem5.org/gem5-stable&lt;/a&gt;看看過去開發的歷史狀況&lt;br /&gt;
下圖的參考過程:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_7UlI31pqU5H6k_L9hOmzcGNT2Zi8k0p5M0WE5kWFQpcWywholu72VDudxZ-LaQ0vghbRP8YGGW6SvEI5A51XPPPWvTwQSIghU7BF8VjwDjD_rpQTeSNqjKaAimh26HB9h8l6S_HKb1k/s1600/download-gem5-stable.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;528&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_7UlI31pqU5H6k_L9hOmzcGNT2Zi8k0p5M0WE5kWFQpcWywholu72VDudxZ-LaQ0vghbRP8YGGW6SvEI5A51XPPPWvTwQSIghU7BF8VjwDjD_rpQTeSNqjKaAimh26HB9h8l6S_HKb1k/s640/download-gem5-stable.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
載完之後, 你會看到下面的檔案資料&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBUKF-Kst6yJB3xuAHGqA9QRByGJbvlymcCio8qLwnmXMm_1SjpvKzyacUHTa-M248cIJ-oiK3ZWRShTsVuA9NjqxTGgPB-ly-ulv0s74ON18etWXrOWS3sBd4FYvzTGjpcftAuAlkBiM/s1600/gem5-stable-folder.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;28&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBUKF-Kst6yJB3xuAHGqA9QRByGJbvlymcCio8qLwnmXMm_1SjpvKzyacUHTa-M248cIJ-oiK3ZWRShTsVuA9NjqxTGgPB-ly-ulv0s74ON18etWXrOWS3sBd4FYvzTGjpcftAuAlkBiM/s640/gem5-stable-folder.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
這個目錄的架構大約如下面的介紹:&lt;br /&gt;
&lt;pre style=&quot;box-sizing: border-box; color: #333333; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 15px; font-stretch: normal; overflow: auto; white-space: pre-wrap;&quot;&gt;The basic source release includes these subdirectories:
   - configs: example simulation configuration scripts
   - ext: less-common external packages needed to build gem5
   - src: source code of the gem5 simulator
   - system: source for some optional system software for simulated systems
   - tests: regression tests
   - util: useful utility programs and files&lt;/pre&gt;
&lt;br /&gt;
下載完gem5原始程式後, 就可以編譯gem5的執行檔出來了.&lt;br /&gt;
Gem5採用&lt;a href=&quot;https://zh.wikipedia.org/wiki/SCons&quot;&gt;SCons&lt;/a&gt;作為其開發工具, 因此你除了需要先安裝編譯程之外還需要安裝SCons相關的東西.&lt;br /&gt;
(1)sudo apt-get install scons swig python python-dev zlib1g-dev m4 protobuf{-c,}-compiler libgoogle-perftools-dev g++ build-essential&lt;br /&gt;
(2)scons build/ARM/gem5.opt -j 20 &amp;nbsp; &amp;lt;==這個是開始編譯Gem5.&lt;br /&gt;
&lt;br /&gt;
編譯方式可分為gem5.debug, gem5.opt, gem5.fast, gem5.prof四種&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;下載所需要的系統映像檔&lt;/b&gt;&lt;br /&gt;
它目前有提供三種(1)ARM(2)X86(3)ALPHA, 我們先下載ARM的, 因為前面是編譯ARM的版本.&lt;br /&gt;
(1)下載ARM Full-System Files&lt;br /&gt;
wget&amp;nbsp;http://www.gem5.org/dist/current/arm/aarch-system-2014-10.tar.xz&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCpdqYfweB7xSGLBHtZ5SF8Vo1oPxebGmsTE7jZvkHYH9LIjb6TIiCxIXutI_IcXvxT-ETAQVHFYSe85FXM3RelOtdPWULfvAJ6w6qRweOyrGaunmTKumRfpkl3WrqQ0vlnylSzYuMHF0/s1600/download-arm-full-system.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCpdqYfweB7xSGLBHtZ5SF8Vo1oPxebGmsTE7jZvkHYH9LIjb6TIiCxIXutI_IcXvxT-ETAQVHFYSe85FXM3RelOtdPWULfvAJ6w6qRweOyrGaunmTKumRfpkl3WrqQ0vlnylSzYuMHF0/s640/download-arm-full-system.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
(2)先建個目錄, 進到這個目錄把aarch-system-2014-10.tar.xz解壓縮&lt;br /&gt;
mkdir aarch-system&lt;br /&gt;
cd aarch-system&lt;br /&gt;
tar vxf ../aarch-system-2014-10.tar.xz&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWp67zvc4XYcr0waGtqQi0aRU3aRcOBUzUTfBlVR3fFguk5WcKRHQ0WTe985jdIDcI1dqtoKbWIUwFqECKjVmGcGEflSSC-ydOB_mNpLycWymjrnsYPeoY_TMOKcy2ZAMMgSIttLVL5-Y/s1600/download-arm-full-system-2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;378&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWp67zvc4XYcr0waGtqQi0aRU3aRcOBUzUTfBlVR3fFguk5WcKRHQ0WTe985jdIDcI1dqtoKbWIUwFqECKjVmGcGEflSSC-ydOB_mNpLycWymjrnsYPeoY_TMOKcy2ZAMMgSIttLVL5-Y/s640/download-arm-full-system-2.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;使用Gem5系統模擬器把系統映像檔運行起來&lt;/b&gt;&lt;br /&gt;
這時要回到gem5-stable的目錄下&lt;br /&gt;
首先要先做一件事, 設定一個&lt;span style=&quot;color: red;&quot;&gt;M5_PATH&lt;/span&gt;環境變數, 將它的內容設定到你的系統映像檔位置.&lt;br /&gt;
export M5_PATH=/home/stanley/aarch-system&lt;br /&gt;
當然你也可以使用如同影片裏的方法, 將這個export放到~/.bashrc裏去&lt;br /&gt;
&lt;br /&gt;
接著就可以開始運行模擬了, 輸入下面的指令.&lt;br /&gt;
build/ARM/gem5.opt -d /tmp/output configs/example/fs.py&lt;br /&gt;
&lt;br /&gt;
模擬的方式也可分為兩種&lt;br /&gt;
(1)Full System(FS)&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;For booting operating systems&lt;/li&gt;
&lt;li&gt;Models bare hardware, including devices&lt;/li&gt;
&lt;li&gt;Interrupts, exceptions, privileged instructions, fault handlers&lt;/li&gt;
&lt;li&gt;Simulated UART output&lt;/li&gt;
&lt;li&gt;Simulated frame buffer output&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
(2)Syscall Emulation(SE)&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;For running individual applications, or set of applications on MP&lt;/li&gt;
&lt;li&gt;Models user-visible ISA plus common system calls&lt;/li&gt;
&lt;li&gt;System calls emulated, typically by calling host OS&lt;/li&gt;
&lt;li&gt;Simplified address translation model, no scheduling&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
執行過程如下:&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 compiled Jan  6 2016 12:56:49
gem5 started Jan  6 2016 14:21:30
gem5 executing on ubuntu-core40
command line: build/ARM/gem5.opt -d /tmp/output configs/example/fs.py

Global frequency set at 1000000000000 ticks per second
warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (512 Mbytes)
info: kernel located at: /home/stanley/gem5/aarch-system/binaries/vmlinux.aarch32.ll_20131205.0-gem5
Listening for system connection on port 5900
Listening for system connection on port 3456
0: system.remote_gdb.listener: listening for remote gdb #0 on port 7000
info: Using bootloader at address 0x10
info: Using kernel entry physical address at 0x80008000
info: Loading DTB file: /home/stanley/gem5/aarch-system/binaries/vexpress.aarch32.ll_20131205.0-gem5.1cpu.dtb at address 0x88000000
**** REAL SIMULATION ****
warn: Existing EnergyCtrl, but no enabled DVFSHandler found.
info: Entering event queue @ 0.  Starting simulation...
warn: Not doing anything for miscreg ACTLR
warn: Not doing anything for write of miscreg ACTLR
warn: The clidr register always reports 0 caches.
warn: clidr LoUIS field of 0b001 to match current ARM implementations.
warn: The csselr register isn&#39;t implemented.
warn:   instruction &#39;mcr dccmvau&#39; unimplemented
warn:   instruction &#39;mcr icimvau&#39; unimplemented
warn:   instruction &#39;mcr bpiallis&#39; unimplemented
warn:   instruction &#39;mcr icialluis&#39; unimplemented
warn:   instruction &#39;mcr dccimvac&#39; unimplemented
warn: Tried to read RealView I/O at offset 0x60 that doesn&#39;t exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn&#39;t exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn&#39;t exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn&#39;t exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn&#39;t exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn&#39;t exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn&#39;t exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn&#39;t exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn&#39;t exist
warn: Tried to write RVIO at offset 0xa8 (data 0) that doesn&#39;t exist
info: trap check M:0 N:0 1:0 2:0 hdcr 0, hcptr 3fff, hstr 0
info: trap check M:0 N:0 1:0 2:0 hdcr 0, hcptr 3fff, hstr 0
info: trap check M:0 N:0 1:0 2:0 hdcr 0, hcptr 3fff, hstr 0
info: trap check M:0 N:0 1:0 2:0 hdcr 0, hcptr 3fff, hstr 0
info: trap check M:0 N:0 1:0 2:0 hdcr 0, hcptr 3fff, hstr 0
info: trap check M:0 N:0 1:0 2:0 hdcr 0, hcptr 3fff, hstr 0
info: trap check M:0 N:0 1:0 2:0 hdcr 0, hcptr 3fff, hstr 0
54397052500: system.terminal: attach terminal 0
info: trap check M:0 N:0 1:0 2:0 hdcr 0, hcptr 3fff, hstr 0
info: trap check M:0 N:0 1:0 2:0 hdcr 0, hcptr 3fff, hstr 0
info: trap check M:0 N:0 1:0 2:0 hdcr 0, hcptr 3fff, hstr 0
info: trap check M:0 N:0 1:0 2:0 hdcr 0, hcptr 3fff, hstr 0
info: trap check M:0 N:0 1:0 2:0 hdcr 0, hcptr 3fff, hstr 0
info: trap check M:0 N:0 1:0 2:0 hdcr 0, hcptr 3fff, hstr 0
info: trap check M:0 N:0 1:0 2:0 hdcr 0, hcptr 3fff, hstr 0
info: trap check M:0 N:0 1:0 2:0 hdcr 0, hcptr 3fff, hstr 0
warn: CP14 unimplemented crn[1], opc1[0], crm[3], opc2[4]
warn: CP14 unimplemented crn[1], opc1[0], crm[0], opc2[4]
warn: CP14 unimplemented crn[0], opc1[0], crm[7], opc2[0]
warn: Returning zero for read from miscreg pmcr
warn: Ignoring write to miscreg pmcntenclr
warn: Ignoring write to miscreg pmintenclr
warn: Ignoring write to miscreg pmovsr
warn: Ignoring write to miscreg pmcr
&lt;/code&gt;&lt;/pre&gt;
上面這個是模擬器的訊息. 接下來我們要開一個新的terminal使用telnet連上這台機器&lt;br /&gt;
telnet 127.0.0.1 3456&lt;br /&gt;
然後你會看到開機訊息如下&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is &#39;^]&#39;.
==== m5 slave terminal: Terminal 0 ====
Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpuset
Linux version 3.13.0-rc2 (tony@vamp) (gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-16ubuntu4) ) #1 SMP PREEMPT Mon Oct 13 15:09:23 EDT 2014
Kernel was built at commit id &#39;&#39;
CPU: ARMv7 Processor [410fc0f0] revision 0 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: V2P-CA15
bootconsole [earlycon0] enabled
Memory policy: Data cache writealloc
kdebugv2m: Following are test values to confirm proper working
kdebugv2m: Ranges 42000000 0
kdebugv2m: Regs 30000000 1000000
kdebugv2m: Virtual-Reg f0000000
kdebugv2m: pci node addr_cells 3
kdebugv2m: pci node size_cells 2
kdebugv2m: motherboard addr_cells 2
On node 0 totalpages: 131072
free_area_init_node: node 0, pgdat 8072dcc0, node_mem_map 8078f000
  Normal zone: 1024 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 131072 pages, LIFO batch:31
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956969942ns
PERCPU: Embedded 8 pages/cpu @80b97000 s11648 r8192 d12928 u32768
pcpu-alloc: s11648 r8192 d12928 u32768 alloc=8*4096
pcpu-alloc: [0] 0
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
Kernel command line: earlyprintk=pl011,0x1c090000 console=ttyAMA0 lpj=19988480 norandmaps rw loglevel=8 mem=512MB root=/dev/sda1
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 495584K/524288K available (5248K kernel code, 249K rwdata, 1540K rodata, 295K init, 368K bss, 28704K reserved, 0K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xa0800000 - 0xff000000   (1512 MB)
    lowmem  : 0x80000000 - 0xa0000000   ( 512 MB)
    pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)
    modules : 0x7f000000 - 0x7fe00000   (  14 MB)
      .text : 0x80008000 - 0x806a942c   (6790 kB)
      .init : 0x806aa000 - 0x806f3d80   ( 296 kB)
      .data : 0x806f4000 - 0x80732754   ( 250 kB)
       .bss : 0x80732754 - 0x8078e9d8   ( 369 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
        RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
NR_IRQS:16 nr_irqs:16 16
Architected cp15 timer(s) running at 25.16MHz (phys).
sched_clock: 56 bits at 25MHz, resolution 39ns, wraps every 2730666655744ns
Switching to timer-based delay loop
Console: colour dummy device 80x30
Calibrating delay loop (skipped) preset value.. 3997.69 BogoMIPS (lpj=19988480)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
CPU0: update cpu_power 1024
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x804fee68 - 0x804fee9c
Brought up 1 CPUs
SMP: Total of 1 processors activated.
CPU: All CPU(s) started in SVC mode.
VFP support v0.3: implementor 41 architecture 4 part 30 variant a rev 0
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
of_amba_device_create(): amba_device_add() failed (-19) for /smb/motherboard/iofpga@3,00000000/sysctl@020000
of_amba_device_create(): amba_device_add() failed (-19) for /smb/motherboard/iofpga@3,00000000/aaci@040000
of_amba_device_create(): amba_device_add() failed (-19) for /smb/motherboard/iofpga@3,00000000/mmci@050000
of_amba_device_create(): amba_device_add() failed (-19) for /smb/motherboard/iofpga@3,00000000/uart@0a0000
of_amba_device_create(): amba_device_add() failed (-19) for /smb/motherboard/iofpga@3,00000000/uart@0b0000
of_amba_device_create(): amba_device_add() failed (-19) for /smb/motherboard/iofpga@3,00000000/uart@0c0000
of_amba_device_create(): amba_device_add() failed (-19) for /smb/motherboard/iofpga@3,00000000/wdt@0f0000
hw-breakpoint: Debug register access (0xee113e93) caused undefined instruction on CPU 0
hw-breakpoint: Debug register access (0xee013e90) caused undefined instruction on CPU 0
hw-breakpoint: Debug register access (0xee003e17) caused undefined instruction on CPU 0
hw-breakpoint: CPU 0 failed to disable vector catch
Serial: AMBA PL011 UART driver
1c090000.uart: ttyAMA0 at MMIO 0x1c090000 (irq = 37, base_baud = 0) is a PL011 rev3
console [ttyAMA0] enabled
console [ttyAMA0] enabled
bootconsole [earlycon0] disabled
bootconsole [earlycon0] disabled
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x0000-0xffffffff]
pci_bus 0000:00: root bus resource [mem 0x00000000-0xffffffff]
pci_bus 0000:00: root bus resource [bus 00-ff]
pci 0000:00:00.0: [8086:1075] type 00 class 0x020000
pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x0001ffff]
pci 0000:00:00.0: reg 0x30: [mem 0x00000000-0x000007ff pref]
pci 0000:00:01.0: [8086:7111] type 00 class 0x010185
pci 0000:00:01.0: reg 0x10: [io  0x0000-0x0007]
pci 0000:00:01.0: reg 0x14: [io  0x0000-0x0003]
pci 0000:00:01.0: reg 0x18: [io  0x0000-0x0007]
pci 0000:00:01.0: reg 0x1c: [io  0x0000-0x0003]
pci 0000:00:01.0: reg 0x20: [io  0x0000-0x000f]
pci 0000:00:01.0: reg 0x30: [mem 0x00000000-0x000007ff pref]
PCI: bus0: Fast back to back transfers disabled
pci 0000:00:00.0: BAR 0: assigned [mem 0x40000000-0x4001ffff]
pci 0000:00:00.0: BAR 6: assigned [mem 0x40020000-0x400207ff pref]
pci 0000:00:01.0: BAR 6: assigned [mem 0x40020800-0x40020fff pref]
pci 0000:00:01.0: BAR 4: assigned [io  0x2f000000-0x2f00000f]
pci 0000:00:01.0: BAR 0: assigned [io  0x2f000010-0x2f000017]
pci 0000:00:01.0: BAR 2: assigned [io  0x2f000018-0x2f00001f]
pci 0000:00:01.0: BAR 1: assigned [io  0x2f000020-0x2f000023]
pci 0000:00:01.0: BAR 3: assigned [io  0x2f000024-0x2f000027]
pci_bus 0000:00: resource 4 [io  0x0000-0xffffffff]
pci_bus 0000:00: resource 5 [mem 0x00000000-0xffffffff]
PCI map irq: slot 0, pin 1, devslot 0, irq: 68
PCI map irq: slot 1, pin 2, devslot 1, irq: 69
bio: create slab &amp;lt;bio-0&amp;gt; at 0
vgaarb: loaded
SCSI subsystem initialized
libata version 3.00 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti &amp;lt;giometti@linux.it&amp;gt;
PTP clock support registered
Advanced Linux Sound Architecture Driver Initialized.
Switched to clocksource arch_sys_counter
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP: reno registered
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 64 bytes, default 64
hw perfevents: enabled with ARMv7_Cortex_A15 PMU driver, 1 counters available
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 967
io scheduler noop registered (default)
brd: module loaded
loop: module loaded
ata_piix 0000:00:01.0: version 2.13
PCI: enabling device 0000:00:01.0 (0040 -&amp;gt; 0041)
scsi0 : ata_piix
scsi1 : ata_piix
ata1: PATA max UDMA/33 cmd 0x2f000010 ctl 0x2f000020 bmdma 0x2f000000 irq 69
ata2: PATA max UDMA/33 cmd 0x2f000018 ctl 0x2f000024 bmdma 0x2f000008 irq 69
e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI
e100: Copyright(c) 1999-2006 Intel Corporation
e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI
e1000: Copyright (c) 1999-2006 Intel Corporation.
PCI: enabling device 0000:00:00.0 (0040 -&amp;gt; 0042)
ata1.00: ATA-7: M5 IDE Disk, , max UDMA/66
ata1.00: 1048320 sectors, multi 0: LBA
ata1.00: configured for UDMA/33
scsi 0:0:0:0: Direct-Access     ATA      M5 IDE Disk      n/a  PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 1048320 512-byte logical blocks: (536 MB/511 MiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn&#39;t support DPO or FUA
 sda: sda1
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:0:0: [sda] Attached SCSI disk
e1000 0000:00:00.0 eth0: (PCI:33MHz:32-bit) 00:90:00:00:00:01
e1000 0000:00:00.0 eth0: Intel(R) PRO/1000 Network Connection
e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
e1000e: Copyright(c) 1999 - 2013 Intel Corporation.
igb: Intel(R) Gigabit Ethernet Network Driver - version 5.0.5-k
igb: Copyright (c) 2007-2013 Intel Corporation.
igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.0.2-k
igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
ixgbe: Intel(R) 10 Gigabit PCI Express Network Driver - version 3.15.1-k
ixgbe: Copyright (c) 1999-2013 Intel Corporation.
ixgbevf: Intel(R) 10 Gigabit PCI Express Virtual Function Network Driver - version 2.11.3-k
ixgbevf: Copyright (c) 2009 - 2012 Intel Corporation.
ixgb: Intel(R) PRO/10GbE Network Driver - version 1.0.135-k2-NAPI
ixgb: Copyright (c) 1999-2008 Intel Corporation.
smsc911x: Driver version 2008-10-21
smsc911x 1a000000.ethernet (unregistered net_device): couldn&#39;t get clock -2
nxp-isp1760 1b000000.usb: NXP ISP1760 USB Host Controller
nxp-isp1760 1b000000.usb: new USB bus registered, assigned bus number 1
nxp-isp1760 1b000000.usb: Scratch test failed.
nxp-isp1760 1b000000.usb: can&#39;t setup: -19
nxp-isp1760 1b000000.usb: USB bus 1 deregistered
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
rtc-pl031 1c170000.rtc: rtc core: registered pl031 as rtc0
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
ashmem: initialized
logger: created 256K log &#39;log_main&#39;
logger: created 256K log &#39;log_events&#39;
logger: created 256K log &#39;log_radio&#39;
logger: created 256K log &#39;log_system&#39;
oprofile: using timer interrupt.
TCP: cubic registered
NET: Registered protocol family 10
NET: Registered protocol family 17
rtc-pl031 1c170000.rtc: setting system clock to 2009-01-01 00:00:00 UTC (1230768000)
ALSA device list:
  No soundcards found.
input: AT Raw Set 2 keyboard as /devices/smb.14/motherboard.15/iofpga.17/1c060000.kmi/serio0/input/input0
input: touchkitPS/2 eGalax Touchscreen as /devices/smb.14/motherboard.15/iofpga.17/1c070000.kmi/serio1/input/input2
VFS: Mounted root (ext2 filesystem) on device 8:1.
Freeing unused kernel memory: 292K (806aa000 - 806f3000)
init started: BusyBox v1.15.3 (2010-05-07 01:27:07 BST)
starting pid 673, tty &#39;&#39;: &#39;/etc/rc.d/rc.local&#39;
warning: can&#39;t open /etc/mtab: No such file or directory
Thu Jan  1 00:00:02 UTC 2009
S: devpts
Thu Jan  1 00:00:02 UTC 2009
starting pid 694, tty &#39;&#39;: &#39;/sbin/getty -L ttySA0 38400 vt100&#39;

AEL login: root
root


BusyBox v1.15.3 (2010-05-07 01:27:07 BST) built-in shell (ash)
Enter &#39;help&#39; for a list of built-in commands.

#
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
接下來我們看看/tmp/output這個目錄下的東西, 共產生了四個檔案&lt;br /&gt;
config.ini及config.json是屬於Files describing the configuration&lt;br /&gt;
(1)config.ini &amp;nbsp; &amp;nbsp;-&amp;nbsp;ini formatted file that has all the objects and their parameters&lt;br /&gt;
(2)config.json -&amp;nbsp;json formatted file which is easy to parse for input into other simulators (e.g. power)&lt;br /&gt;
stats.txt屬於Statistics&lt;br /&gt;
(3)stats.txt&lt;br /&gt;
*.terminal屬於系統資訊輸出檔&lt;br /&gt;
(4)system.terminal -&amp;nbsp;Serial port output from the simulation&lt;br /&gt;
&lt;br /&gt;
底下是config.ini的內容
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;[root]
type=Root
children=system
eventq_index=0
full_system=true
sim_quantum=0
time_sync_enable=false
time_sync_period=100000000000
time_sync_spin_threshold=100000000

[system]
type=LinuxArmSystem
children=bridge cf0 clk_domain cpu cpu_clk_domain cpu_voltage_domain dvfs_handler intrctrl iobridge iobus mem_ctrls membus realview terminal vncserver voltage_domain
atags_addr=134217728
boot_loader=/home/stanley/gem5/aarch-system/binaries/boot_emm.arm
boot_osflags=earlyprintk=pl011,0x1c090000 console=ttyAMA0 lpj=19988480 norandmaps rw loglevel=8 mem=512MB root=/dev/sda1
cache_line_size=64
clk_domain=system.clk_domain
dtb_filename=/home/stanley/gem5/aarch-system/binaries/vexpress.aarch32.ll_20131205.0-gem5.1cpu.dtb
early_kernel_symbols=false
enable_context_switch_stats_dump=false
eventq_index=0
flags_addr=469827632
gic_cpu_addr=738205696
have_large_asid_64=false
have_lpae=false
have_security=false
have_virtualization=false
highest_el_is_64=false
init_param=0
kernel=/home/stanley/gem5/aarch-system/binaries/vmlinux.aarch32.ll_20131205.0-gem5
kernel_addr_check=true
load_addr_mask=268435455
load_offset=2147483648
machine_type=VExpress_EMM
mem_mode=atomic
mem_ranges=2147483648:2684354559
memories=system.mem_ctrls system.realview.nvmem system.realview.vram
mmap_using_noreserve=false
multi_proc=true
num_work_ids=16
panic_on_oops=false
panic_on_panic=false
phys_addr_range_64=40
readfile=
reset_addr_64=0
symbolfile=
work_begin_ckpt_count=0
work_begin_cpu_id_exit=-1
work_begin_exit_count=0
work_cpus_ckpt_count=0
work_end_ckpt_count=0
work_end_exit_count=0
work_item_id=-1
system_port=system.membus.slave[1]

[system.bridge]
type=Bridge
clk_domain=system.clk_domain
delay=50000
eventq_index=0
ranges=788529152:805306367 721420288:725614591 805306368:1073741823 1073741824:1610612735 402653184:469762047 469762048:536870911
req_size=16
resp_size=16
master=system.iobus.slave[0]
slave=system.membus.master[0]

[system.cf0]
type=IdeDisk
children=image
delay=1000000
driveID=master
eventq_index=0
image=system.cf0.image

[system.cf0.image]
type=CowDiskImage
children=child
child=system.cf0.image.child
eventq_index=0
image_file=
read_only=false
table_size=65536

[system.cf0.image.child]
type=RawDiskImage
eventq_index=0
image_file=/home/stanley/gem5/aarch-system/disks/linux-aarch32-ael.img
read_only=true

[system.clk_domain]
type=SrcClockDomain
clock=1000
domain_id=-1
eventq_index=0
init_perf_level=0
voltage_domain=system.voltage_domain

[system.cpu]
type=AtomicSimpleCPU
children=dstage2_mmu dtb interrupts isa istage2_mmu itb tracer
branchPred=Null
checker=Null
clk_domain=system.cpu_clk_domain
cpu_id=0
do_checkpoint_insts=true
do_quiesce=true
do_statistics_insts=true
dstage2_mmu=system.cpu.dstage2_mmu
dtb=system.cpu.dtb
eventq_index=0
fastmem=false
function_trace=false
function_trace_start=0
interrupts=system.cpu.interrupts
isa=system.cpu.isa
istage2_mmu=system.cpu.istage2_mmu
itb=system.cpu.itb
max_insts_all_threads=0
max_insts_any_thread=0
max_loads_all_threads=0
max_loads_any_thread=0
numThreads=1
profile=0
progress_interval=0
simpoint_start_insts=
simulate_data_stalls=false
simulate_inst_stalls=false
socket_id=0
switched_out=false
system=system
tracer=system.cpu.tracer
width=1
workload=
dcache_port=system.membus.slave[4]
icache_port=system.membus.slave[3]

[system.cpu.dstage2_mmu]
type=ArmStage2MMU
children=stage2_tlb
eventq_index=0
stage2_tlb=system.cpu.dstage2_mmu.stage2_tlb
sys=system
tlb=system.cpu.dtb

[system.cpu.dstage2_mmu.stage2_tlb]
type=ArmTLB
children=walker
eventq_index=0
is_stage2=true
size=32
walker=system.cpu.dstage2_mmu.stage2_tlb.walker

[system.cpu.dstage2_mmu.stage2_tlb.walker]
type=ArmTableWalker
clk_domain=system.cpu_clk_domain
eventq_index=0
is_stage2=true
num_squash_per_cycle=2
sys=system

[system.cpu.dtb]
type=ArmTLB
children=walker
eventq_index=0
is_stage2=false
size=64
walker=system.cpu.dtb.walker

[system.cpu.dtb.walker]
type=ArmTableWalker
clk_domain=system.cpu_clk_domain
eventq_index=0
is_stage2=false
num_squash_per_cycle=2
sys=system
port=system.membus.slave[6]

[system.cpu.interrupts]
type=ArmInterrupts
eventq_index=0

[system.cpu.isa]
type=ArmISA
eventq_index=0
fpsid=1090793632
id_aa64afr0_el1=0
id_aa64afr1_el1=0
id_aa64dfr0_el1=1052678
id_aa64dfr1_el1=0
id_aa64isar0_el1=0
id_aa64isar1_el1=0
id_aa64mmfr0_el1=15728642
id_aa64mmfr1_el1=0
id_aa64pfr0_el1=17
id_aa64pfr1_el1=0
id_isar0=34607377
id_isar1=34677009
id_isar2=555950401
id_isar3=17899825
id_isar4=268501314
id_isar5=0
id_mmfr0=270536963
id_mmfr1=0
id_mmfr2=19070976
id_mmfr3=34611729
id_pfr0=49
id_pfr1=4113
midr=1091551472
pmu=Null
system=system

[system.cpu.istage2_mmu]
type=ArmStage2MMU
children=stage2_tlb
eventq_index=0
stage2_tlb=system.cpu.istage2_mmu.stage2_tlb
sys=system
tlb=system.cpu.itb

[system.cpu.istage2_mmu.stage2_tlb]
type=ArmTLB
children=walker
eventq_index=0
is_stage2=true
size=32
walker=system.cpu.istage2_mmu.stage2_tlb.walker

[system.cpu.istage2_mmu.stage2_tlb.walker]
type=ArmTableWalker
clk_domain=system.cpu_clk_domain
eventq_index=0
is_stage2=true
num_squash_per_cycle=2
sys=system

[system.cpu.itb]
type=ArmTLB
children=walker
eventq_index=0
is_stage2=false
size=64
walker=system.cpu.itb.walker

[system.cpu.itb.walker]
type=ArmTableWalker
clk_domain=system.cpu_clk_domain
eventq_index=0
is_stage2=false
num_squash_per_cycle=2
sys=system
port=system.membus.slave[5]

[system.cpu.tracer]
type=ExeTracer
eventq_index=0

[system.cpu_clk_domain]
type=SrcClockDomain
clock=500
domain_id=-1
eventq_index=0
init_perf_level=0
voltage_domain=system.cpu_voltage_domain

[system.cpu_voltage_domain]
type=VoltageDomain
eventq_index=0
voltage=1.000000

[system.dvfs_handler]
type=DVFSHandler
domains=
enable=false
eventq_index=0
sys_clk_domain=system.clk_domain
transition_latency=100000000

[system.intrctrl]
type=IntrControl
eventq_index=0
sys=system

[system.iobridge]
type=Bridge
clk_domain=system.clk_domain
delay=50000
eventq_index=0
ranges=2147483648:2684354559
req_size=16
resp_size=16
master=system.membus.slave[2]
slave=system.iobus.master[27]

[system.iobus]
type=NoncoherentXBar
clk_domain=system.clk_domain
eventq_index=0
forward_latency=1
frontend_latency=2
response_latency=2
use_default_range=true
width=16
default=system.realview.pciconfig.pio
master=system.realview.uart.pio system.realview.realview_io.pio system.realview.timer0.pio system.realview.timer1.pio system.realview.clcd.pio system.realview.hdlcd.pio system.realview.kmi0.pio system.realview.kmi1.pio system.realview.cf_ctrl.pio system.realview.cf_ctrl.config system.realview.rtc.pio system.realview.vram.port system.realview.l2x0_fake.pio system.realview.uart1_fake.pio system.realview.uart2_fake.pio system.realview.uart3_fake.pio system.realview.sp810_fake.pio system.realview.watchdog_fake.pio system.realview.aaci_fake.pio system.realview.lan_fake.pio system.realview.usb_fake.pio system.realview.mmc_fake.pio system.realview.energy_ctrl.pio system.realview.ide.pio system.realview.ide.config system.realview.ethernet.pio system.realview.ethernet.config system.iobridge.slave
slave=system.bridge.master system.realview.clcd.dma system.realview.cf_ctrl.dma system.realview.ide.dma system.realview.ethernet.dma

[system.mem_ctrls]
type=DRAMCtrl
IDD0=0.075000
IDD02=0.000000
IDD2N=0.050000
IDD2N2=0.000000
IDD2P0=0.000000
IDD2P02=0.000000
IDD2P1=0.000000
IDD2P12=0.000000
IDD3N=0.057000
IDD3N2=0.000000
IDD3P0=0.000000
IDD3P02=0.000000
IDD3P1=0.000000
IDD3P12=0.000000
IDD4R=0.187000
IDD4R2=0.000000
IDD4W=0.165000
IDD4W2=0.000000
IDD5=0.220000
IDD52=0.000000
IDD6=0.000000
IDD62=0.000000
VDD=1.500000
VDD2=0.000000
activation_limit=4
addr_mapping=RoRaBaCoCh
bank_groups_per_rank=0
banks_per_rank=8
burst_length=8
channels=1
clk_domain=system.clk_domain
conf_table_reported=true
device_bus_width=8
device_rowbuffer_size=1024
device_size=536870912
devices_per_rank=8
dll=true
eventq_index=0
in_addr_map=true
max_accesses_per_row=16
mem_sched_policy=frfcfs
min_writes_per_switch=16
null=false
page_policy=open_adaptive
range=2147483648:2684354559
ranks_per_channel=2
read_buffer_size=32
static_backend_latency=10000
static_frontend_latency=10000
tBURST=5000
tCCD_L=0
tCK=1250
tCL=13750
tCS=2500
tRAS=35000
tRCD=13750
tREFI=7800000
tRFC=260000
tRP=13750
tRRD=6000
tRRD_L=0
tRTP=7500
tRTW=2500
tWR=15000
tWTR=7500
tXAW=30000
tXP=0
tXPDLL=0
tXS=0
tXSDLL=0
write_buffer_size=64
write_high_thresh_perc=85
write_low_thresh_perc=50
port=system.membus.master[5]

[system.membus]
type=CoherentXBar
children=badaddr_responder
clk_domain=system.clk_domain
eventq_index=0
forward_latency=4
frontend_latency=3
response_latency=2
snoop_filter=Null
snoop_response_latency=4
system=system
use_default_range=false
width=16
default=system.membus.badaddr_responder.pio
master=system.bridge.slave system.realview.nvmem.port system.realview.gic.pio system.realview.vgic.pio system.realview.local_cpu_timer.pio system.mem_ctrls.port
slave=system.realview.hdlcd.dma system.system_port system.iobridge.master system.cpu.icache_port system.cpu.dcache_port system.cpu.itb.walker.port system.cpu.dtb.walker.port

[system.membus.badaddr_responder]
type=IsaFake
clk_domain=system.clk_domain
eventq_index=0
fake_mem=false
pio_addr=0
pio_latency=100000
pio_size=8
ret_bad_addr=true
ret_data16=65535
ret_data32=4294967295
ret_data64=18446744073709551615
ret_data8=255
system=system
update_data=false
warn_access=warn
pio=system.membus.default
[system.realview]
type=RealView
children=aaci_fake cf_ctrl clcd energy_ctrl ethernet generic_timer gic hdlcd ide kmi0 kmi1 l2x0_fake lan_fake local_cpu_timer mmc_fake nvmem pciconfig realview_io rtc sp810_fake timer0 timer1 uart uart1_fake uart2_fake uart3_fake usb_fake vgic vram watchdog_fake
eventq_index=0
intrctrl=system.intrctrl
pci_cfg_base=805306368
pci_cfg_gen_offsets=false
pci_io_base=0
system=system

[system.realview.aaci_fake]
type=AmbaFake
amba_id=0
clk_domain=system.clk_domain
eventq_index=0
ignore_access=false
pio_addr=470024192
pio_latency=100000
system=system
pio=system.iobus.master[18]

[system.realview.cf_ctrl]
type=IdeController
BAR0=471465984
BAR0LegacyIO=true
BAR0Size=256
BAR1=471466240
BAR1LegacyIO=true
BAR1Size=4096
BAR2=1
BAR2LegacyIO=false
BAR2Size=8
BAR3=1
BAR3LegacyIO=false
BAR3Size=4
BAR4=1
BAR4LegacyIO=false
BAR4Size=16
BAR5=1
BAR5LegacyIO=false
BAR5Size=0
BIST=0
CacheLineSize=0
CapabilityPtr=0
CardbusCIS=0
ClassCode=1
Command=1
DeviceID=28945
ExpansionROM=0
HeaderType=0
InterruptLine=31
InterruptPin=1
LatencyTimer=0
LegacyIOBase=0
MSICAPBaseOffset=0
MSICAPCapId=0
MSICAPMaskBits=0
MSICAPMsgAddr=0
MSICAPMsgCtrl=0
MSICAPMsgData=0
MSICAPMsgUpperAddr=0
MSICAPNextCapability=0
MSICAPPendingBits=0
MSIXCAPBaseOffset=0
MSIXCAPCapId=0
MSIXCAPNextCapability=0
MSIXMsgCtrl=0
MSIXPbaOffset=0
MSIXTableOffset=0
MaximumLatency=0
MinimumGrant=0
PMCAPBaseOffset=0
PMCAPCapId=0
PMCAPCapabilities=0
PMCAPCtrlStatus=0
PMCAPNextCapability=0
PXCAPBaseOffset=0
PXCAPCapId=0
PXCAPCapabilities=0
PXCAPDevCap2=0
PXCAPDevCapabilities=0
PXCAPDevCtrl=0
PXCAPDevCtrl2=0
PXCAPDevStatus=0
PXCAPLinkCap=0
PXCAPLinkCtrl=0
PXCAPLinkStatus=0
PXCAPNextCapability=0
ProgIF=133
Revision=0
Status=640
SubClassCode=1
SubsystemID=0
SubsystemVendorID=0
VendorID=32902
clk_domain=system.clk_domain
config_latency=20000
ctrl_offset=2
disks=
eventq_index=0
io_shift=2
pci_bus=2
pci_dev=0
pci_func=0
pio_latency=30000
platform=system.realview
system=system
config=system.iobus.master[9]
dma=system.iobus.slave[2]
pio=system.iobus.master[8]

[system.realview.clcd]
type=Pl111
amba_id=1315089
clk_domain=system.clk_domain
enable_capture=true
eventq_index=0
gic=system.realview.gic
int_num=46
pio_addr=471793664
pio_latency=10000
pixel_clock=41667
system=system
vnc=system.vncserver
dma=system.iobus.slave[1]
pio=system.iobus.master[4]

[system.realview.energy_ctrl]
type=EnergyCtrl
clk_domain=system.clk_domain
dvfs_handler=system.dvfs_handler
eventq_index=0
pio_addr=470286336
pio_latency=100000
system=system
pio=system.iobus.master[22]

[system.realview.ethernet]
type=IGbE
BAR0=0
BAR0LegacyIO=false
BAR0Size=131072
BAR1=0
BAR1LegacyIO=false
BAR1Size=0
BAR2=0
BAR2LegacyIO=false
BAR2Size=0
BAR3=0
BAR3LegacyIO=false
BAR3Size=0
BAR4=0
BAR4LegacyIO=false
BAR4Size=0
BAR5=0
BAR5LegacyIO=false
BAR5Size=0
BIST=0
CacheLineSize=0
CapabilityPtr=0
CardbusCIS=0
ClassCode=2
Command=0
DeviceID=4213
ExpansionROM=0
HeaderType=0
InterruptLine=1
InterruptPin=1
LatencyTimer=0
LegacyIOBase=0
MSICAPBaseOffset=0
MSICAPCapId=0
MSICAPMaskBits=0
MSICAPMsgAddr=0
MSICAPMsgCtrl=0
MSICAPMsgData=0
MSICAPMsgUpperAddr=0
MSICAPNextCapability=0
MSICAPPendingBits=0
MSIXCAPBaseOffset=0
MSIXCAPCapId=0
MSIXCAPNextCapability=0
MSIXMsgCtrl=0
MSIXPbaOffset=0
MSIXTableOffset=0
MaximumLatency=0
MinimumGrant=255
PMCAPBaseOffset=0
PMCAPCapId=0
PMCAPCapabilities=0
PMCAPCtrlStatus=0
PMCAPNextCapability=0
PXCAPBaseOffset=0
PXCAPCapId=0
PXCAPCapabilities=0
PXCAPDevCap2=0
PXCAPDevCapabilities=0
PXCAPDevCtrl=0
PXCAPDevCtrl2=0
PXCAPDevStatus=0
PXCAPLinkCap=0
PXCAPLinkCtrl=0
PXCAPLinkStatus=0
PXCAPNextCapability=0
ProgIF=0
Revision=0
Status=0
SubClassCode=0
SubsystemID=4104
SubsystemVendorID=32902
VendorID=32902
clk_domain=system.clk_domain
config_latency=20000
eventq_index=0
fetch_comp_delay=10000
fetch_delay=10000
hardware_address=00:90:00:00:00:01
pci_bus=0
pci_dev=0
pci_func=0
phy_epid=896
phy_pid=680
pio_latency=30000
platform=system.realview
rx_desc_cache_size=64
rx_fifo_size=393216
rx_write_delay=0
system=system
tx_desc_cache_size=64
tx_fifo_size=393216
tx_read_delay=0
wb_comp_delay=10000
wb_delay=10000
config=system.iobus.master[26]
dma=system.iobus.slave[4]
pio=system.iobus.master[25]
[system.realview.generic_timer]
type=GenericTimer
eventq_index=0
gic=system.realview.gic
int_phys=29
int_virt=27
system=system

[system.realview.gic]
type=Pl390
clk_domain=system.clk_domain
cpu_addr=738205696
cpu_pio_delay=10000
dist_addr=738201600
dist_pio_delay=10000
eventq_index=0
int_latency=10000
it_lines=128
platform=system.realview
system=system
pio=system.membus.master[2]

[system.realview.hdlcd]
type=HDLcd
amba_id=1314816
clk_domain=system.clk_domain
enable_capture=true
eventq_index=0
gic=system.realview.gic
int_num=117
pio_addr=721420288
pio_latency=10000
pixel_clock=7299
system=system
vnc=system.vncserver
workaround_swap_rb=true
dma=system.membus.slave[0]
pio=system.iobus.master[5]

[system.realview.ide]
type=IdeController
BAR0=1
BAR0LegacyIO=false
BAR0Size=8
BAR1=1
BAR1LegacyIO=false
BAR1Size=4
BAR2=1
BAR2LegacyIO=false
BAR2Size=8
BAR3=1
BAR3LegacyIO=false
BAR3Size=4
BAR4=1
BAR4LegacyIO=false
BAR4Size=16
BAR5=1
BAR5LegacyIO=false
BAR5Size=0
BIST=0
CacheLineSize=0
CapabilityPtr=0
CardbusCIS=0
ClassCode=1
Command=0
DeviceID=28945
ExpansionROM=0
HeaderType=0
InterruptLine=2
InterruptPin=2
LatencyTimer=0
LegacyIOBase=0
MSICAPBaseOffset=0
MSICAPCapId=0
MSICAPMaskBits=0
MSICAPMsgAddr=0
MSICAPMsgCtrl=0
MSICAPMsgData=0
MSICAPMsgUpperAddr=0
MSICAPNextCapability=0
MSICAPPendingBits=0
MSIXCAPBaseOffset=0
MSIXCAPCapId=0
MSIXCAPNextCapability=0
MSIXMsgCtrl=0
MSIXPbaOffset=0
MSIXTableOffset=0
MaximumLatency=0
MinimumGrant=0
PMCAPBaseOffset=0
PMCAPCapId=0
PMCAPCapabilities=0
PMCAPCtrlStatus=0
PMCAPNextCapability=0
PXCAPBaseOffset=0
PXCAPCapId=0
PXCAPCapabilities=0
PXCAPDevCap2=0
PXCAPDevCapabilities=0
PXCAPDevCtrl=0
PXCAPDevCtrl2=0
PXCAPDevStatus=0
PXCAPLinkCap=0
PXCAPLinkCtrl=0
PXCAPLinkStatus=0
PXCAPNextCapability=0
ProgIF=133
Revision=0
Status=640
SubClassCode=1
SubsystemID=0
SubsystemVendorID=0
VendorID=32902
clk_domain=system.clk_domain
config_latency=20000
ctrl_offset=0
disks=system.cf0
eventq_index=0
io_shift=0
pci_bus=0
pci_dev=1
pci_func=0
pio_latency=30000
platform=system.realview
system=system
config=system.iobus.master[24]
dma=system.iobus.slave[3]
pio=system.iobus.master[23]

[system.realview.kmi0]
type=Pl050
amba_id=1314896
clk_domain=system.clk_domain
eventq_index=0
gic=system.realview.gic
int_delay=1000000
int_num=44
is_mouse=false
pio_addr=470155264
pio_latency=100000
system=system
vnc=system.vncserver
pio=system.iobus.master[6]

[system.realview.kmi1]
type=Pl050
amba_id=1314896
clk_domain=system.clk_domain
eventq_index=0
gic=system.realview.gic
int_delay=1000000
int_num=45
is_mouse=true
pio_addr=470220800
pio_latency=100000
system=system
vnc=system.vncserver
pio=system.iobus.master[7]

[system.realview.l2x0_fake]
type=IsaFake
clk_domain=system.clk_domain
eventq_index=0
fake_mem=false
pio_addr=739246080
pio_latency=100000
pio_size=4095
ret_bad_addr=false
ret_data16=65535
ret_data32=4294967295
ret_data64=18446744073709551615
ret_data8=255
system=system
update_data=false
warn_access=
pio=system.iobus.master[12]

[system.realview.lan_fake]
type=IsaFake
clk_domain=system.clk_domain
eventq_index=0
fake_mem=false
pio_addr=436207616
pio_latency=100000
pio_size=65535
ret_bad_addr=false
ret_data16=65535
ret_data32=4294967295
ret_data64=18446744073709551615
ret_data8=255
system=system
update_data=false
warn_access=
pio=system.iobus.master[19]

[system.realview.local_cpu_timer]
type=CpuLocalTimer
clk_domain=system.clk_domain
eventq_index=0
gic=system.realview.gic
int_num_timer=29
int_num_watchdog=30
pio_addr=738721792
pio_latency=100000
system=system
pio=system.membus.master[4]

[system.realview.mmc_fake]
type=AmbaFake
amba_id=0
clk_domain=system.clk_domain
eventq_index=0
ignore_access=false
pio_addr=470089728
pio_latency=100000
system=system
pio=system.iobus.master[21]

[system.realview.nvmem]
type=SimpleMemory
bandwidth=73.000000
clk_domain=system.clk_domain
conf_table_reported=false
eventq_index=0
in_addr_map=true
latency=30000
latency_var=0
null=false
range=0:67108863
port=system.membus.master[1]

[system.realview.pciconfig]
type=PciConfigAll
bus=0
clk_domain=system.clk_domain
eventq_index=0
pio_addr=0
pio_latency=30000
platform=system.realview
size=268435456
system=system
pio=system.iobus.default

[system.realview.realview_io]
type=RealViewCtrl
clk_domain=system.clk_domain
eventq_index=0
idreg=35979264
pio_addr=469827584
pio_latency=100000
proc_id0=335544320
proc_id1=335544320
system=system
pio=system.iobus.master[1]

[system.realview.rtc]
type=PL031
amba_id=3412017
clk_domain=system.clk_domain
eventq_index=0
gic=system.realview.gic
int_delay=100000
int_num=36
pio_addr=471269376
pio_latency=100000
system=system
time=Thu Jan  1 00:00:00 2009
pio=system.iobus.master[10]

[system.realview.sp810_fake]
type=AmbaFake
amba_id=0
clk_domain=system.clk_domain
eventq_index=0
ignore_access=true
pio_addr=469893120
pio_latency=100000
system=system
pio=system.iobus.master[16]

[system.realview.timer0]
type=Sp804
amba_id=1316868
clk_domain=system.clk_domain
clock0=1000000
clock1=1000000
eventq_index=0
gic=system.realview.gic
int_num0=34
int_num1=34
pio_addr=470876160
pio_latency=100000
system=system
pio=system.iobus.master[2]

[system.realview.timer1]
type=Sp804
amba_id=1316868
clk_domain=system.clk_domain
clock0=1000000
clock1=1000000
eventq_index=0
gic=system.realview.gic
int_num0=35
int_num1=35
pio_addr=470941696
pio_latency=100000
system=system
pio=system.iobus.master[3]

[system.realview.uart]
type=Pl011
clk_domain=system.clk_domain
end_on_eot=false
eventq_index=0
gic=system.realview.gic
int_delay=100000
int_num=37
pio_addr=470351872
pio_latency=100000
platform=system.realview
system=system
terminal=system.terminal
pio=system.iobus.master[0]

[system.realview.uart1_fake]
type=AmbaFake
amba_id=0
clk_domain=system.clk_domain
eventq_index=0
ignore_access=false
pio_addr=470417408
pio_latency=100000
system=system
pio=system.iobus.master[13]
[system.realview.uart2_fake]
type=AmbaFake
amba_id=0
clk_domain=system.clk_domain
eventq_index=0
ignore_access=false
pio_addr=470482944
pio_latency=100000
system=system
pio=system.iobus.master[14]

[system.realview.uart3_fake]
type=AmbaFake
amba_id=0
clk_domain=system.clk_domain
eventq_index=0
ignore_access=false
pio_addr=470548480
pio_latency=100000
system=system
pio=system.iobus.master[15]

[system.realview.usb_fake]
type=IsaFake
clk_domain=system.clk_domain
eventq_index=0
fake_mem=false
pio_addr=452984832
pio_latency=100000
pio_size=131071
ret_bad_addr=false
ret_data16=65535
ret_data32=4294967295
ret_data64=18446744073709551615
ret_data8=255
system=system
update_data=false
warn_access=
pio=system.iobus.master[20]

[system.realview.vgic]
type=VGic
clk_domain=system.clk_domain
eventq_index=0
gic=system.realview.gic
hv_addr=738213888
pio_delay=10000
platform=system.realview
ppint=25
system=system
vcpu_addr=738222080
pio=system.membus.master[3]

[system.realview.vram]
type=SimpleMemory
bandwidth=73.000000
clk_domain=system.clk_domain
conf_table_reported=false
eventq_index=0
in_addr_map=true
latency=30000
latency_var=0
null=false
range=402653184:436207615
port=system.iobus.master[11]

[system.realview.watchdog_fake]
type=AmbaFake
amba_id=0
clk_domain=system.clk_domain
eventq_index=0
ignore_access=false
pio_addr=470745088
pio_latency=100000
system=system
pio=system.iobus.master[17]

[system.terminal]
type=Terminal
eventq_index=0
intr_control=system.intrctrl
number=0
output=true
port=3456

[system.vncserver]
type=VncServer
eventq_index=0
frame_capture=false
number=0
port=5900

[system.voltage_domain]
type=VoltageDomain
eventq_index=0
voltage=1.000000
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;ARM硬體原件清單:&lt;/b&gt;&lt;br /&gt;
ARM PrimeCell Technical Reference Manual Real Time Clock (PL031)&lt;br /&gt;
ARM PrimeCell PS2 Keyboard/Mouse Interface (PL050)&lt;br /&gt;
ARM Dual-Timer Module (SP804)&lt;br /&gt;
ARM PrimeCell System Controller (SP810)&lt;br /&gt;
ARM PrimeCell Generic Interrupt Controller (PL390)&lt;br /&gt;
ARM PrimeCell PS2 Keyboard/Mouse Interface (PL050)&lt;br /&gt;
ARM PrimeCell Color LCD Controller (PL111)&lt;br /&gt;
ARM PrimeCell UART (PL011)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;參考資料:&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.arm.ecs.soton.ac.uk/sites/www.arm.ecs.soton.ac.uk/files/gem5_tutorial.pdf&quot;&gt;Gem5 Tutorial&lt;/a&gt; - Sascha Bischoff / Andreas Hansson&lt;br /&gt;
&lt;a href=&quot;http://www.m5sim.org/Introduction&quot;&gt;Gem5 Introduce&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.dejazzer.com/coen4730/doc/hw4_multicores_GEM5_McPAT.pdf&quot;&gt;COEN-4730 Computer Architecture(Fall 2015)&lt;/a&gt; - 有pre-compiled PARSEC 2.1 Benchmarks: FS mode for ALPHA architecture&lt;br /&gt;
&lt;a href=&quot;http://www.m5sim.org/Running_gem5&quot;&gt;Running Gem5&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.m5sim.org/SCons_build_system&quot;&gt;Gem5 Scons Build System&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.m5sim.org/Build_System&quot;&gt;Gem5 Build System&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.gem5.org/dist/tutorials/isca_pres_2011.pdf&quot;&gt;http://www.gem5.org/dist/tutorials/isca_pres_2011.pdf&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://github.com/uart/gem5-mirror&quot;&gt;Gem5 Git Mirror&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/8973334985293769508/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/8973334985293769508' title='4 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/8973334985293769508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/8973334985293769508'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2016/01/gem5-simulator.html' title='Gem5 Simulator'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/gd_DtxQD5kc/default.jpg" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-4703210922397984620</id><published>2015-12-28T23:56:00.001+08:00</published><updated>2015-12-29T00:03:18.180+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>ImageView寬高時保持原比例</title><content type='html'>我只是要把一張bitmap放到App上置中秀出來, 並且可以保持原比例的放滿整個畫面.&lt;br /&gt;
為這樣子的功能Google了蠻久的, 因為總覺得不需要太複雜的設定, 就要可以達到這樣子的目的才對啊. 最後終於發現為什麼我一開始無法保持原比例放大了. 目前的結論如下:&lt;br /&gt;
&lt;br /&gt;
layout的xml設定如下(它是一個LinearLayout 再加一個ImageView)&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;
&amp;lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
    android:orientation=&quot;vertical&quot;
    android:layout_width=&quot;match_parent&quot;
    android:layout_height=&quot;match_parent&quot;
    android:layout_gravity=&quot;center&quot;
    android:gravity=&quot;center&quot; &amp;gt;
    &amp;lt;ImageView android:id=&quot;@+id/template_imageview&quot;
        android:layout_width=&quot;match_parent&quot;
        android:layout_height=&quot;match_parent&quot;
        &amp;gt;
    &amp;lt;/ImageView&amp;gt;
&amp;lt;/LinearLayout&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
android:layout_height=&quot;match_parent&quot; &amp;lt;=== 很多人說要用&quot;wrap_content&quot;&lt;br /&gt;
&lt;br /&gt;
然後在Java的程式裏面&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;ImageView imageView = (ImageView) findViewById(R.id.template_imageview);
imageView.setImageBitmap(downloadBitmap);
imageView.setAdjustViewBounds(true);
&lt;/code&gt;&lt;/pre&gt;
最重要的一行imageView.setAdjustViewBounds(true); 不設定為true的話無法放大圖片.&lt;!-----&gt;</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/4703210922397984620/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/4703210922397984620' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/4703210922397984620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/4703210922397984620'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2015/12/imageview.html' title='ImageView寬高時保持原比例'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-2738372727876159844</id><published>2015-12-28T14:05:00.001+08:00</published><updated>2015-12-28T14:07:23.267+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>避免螢幕旋轉再次自動執行onCreate()</title><content type='html'>寫了一個程式, 裏面放了三個ListView, 依情況分別設定想要秀出來的ListView, 這時才發現, 當我旋轉手機後, 居然會重新呼叫onCreate(), 整個流程就從頭來過了.&lt;br /&gt;
&lt;br /&gt;
查了一下官網的資料&lt;a href=&quot;http://developer.android.com/guide/topics/resources/runtime-changes.html#HandlingTheChange&quot;&gt;Handling The Change&lt;/a&gt;, 有教要如何避開這種情況. 主要是要做2個修正.&lt;br /&gt;
(1)AndroidManifest.xml (2)新增onConfigurationChanged&lt;br /&gt;
&lt;br /&gt;
這兩個修改步驟如下:&lt;br /&gt;
(1)在AndroidManifest.xml裏面加入下圖, 紅色框框的文字.&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
新增的設定為&lt;span style=&quot;color: #660e7a; font-family: 細明體; font-size: 9pt; font-weight: bold;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: 細明體; font-size: 9pt; font-weight: bold;&quot;&gt;:configChanges=&lt;/span&gt;&lt;span style=&quot;color: green; font-family: 細明體; font-size: 9pt; font-weight: bold;&quot;&gt;&quot;orientation|keyboardHidden|screenSize&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOCsjMvdz6Ul-fjOuvNWsTbsVWDEfxzJGPWqlZ5taiIosOIYItEixVfYpHt7CYVJMMwallwwDe1hb0KCtsfa569fTuCvO6T4FvF60KQU4VAoYVLejLgCLPwbfvH9sj6kC51zUeil-j0Y0/s1600/android-config-change.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;566&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOCsjMvdz6Ul-fjOuvNWsTbsVWDEfxzJGPWqlZ5taiIosOIYItEixVfYpHt7CYVJMMwallwwDe1hb0KCtsfa569fTuCvO6T4FvF60KQU4VAoYVLejLgCLPwbfvH9sj6kC51zUeil-j0Y0/s640/android-config-change.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
(2)在你的Activity.java檔案裏, 加入下面的程式碼&lt;br /&gt;
&lt;pre style=&quot;background-color: white; font-family: 細明體; font-size: 9pt;&quot;&gt;&lt;span style=&quot;color: olive;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public void &lt;/span&gt;onConfigurationChanged(Configuration newConfig){
    &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;super&lt;/span&gt;.onConfigurationChanged(newConfig);

}&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-family: 細明體; font-size: 9pt;&quot;&gt;&lt;/pre&gt;
根據實驗, 這樣子的修改後, 真的不會又被呼叫一次onCreate()了.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/2738372727876159844/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/2738372727876159844' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/2738372727876159844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/2738372727876159844'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2015/12/oncreate.html' title='避免螢幕旋轉再次自動執行onCreate()'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOCsjMvdz6Ul-fjOuvNWsTbsVWDEfxzJGPWqlZ5taiIosOIYItEixVfYpHt7CYVJMMwallwwDe1hb0KCtsfa569fTuCvO6T4FvF60KQU4VAoYVLejLgCLPwbfvH9sj6kC51zUeil-j0Y0/s72-c/android-config-change.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-637632445865419900.post-8918166193624208218</id><published>2015-12-26T17:05:00.001+08:00</published><updated>2015-12-26T17:05:17.434+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C 語言"/><title type='text'>Modern C - Jens Gustedt</title><content type='html'>Jserv推廌的一本電子書, 由&lt;span style=&quot;background-color: white; color: #141823; font-family: helvetica, arial, sans-serif; font-size: 15px; line-height: 20.7px;&quot;&gt;在 INRIA (法國國立電腦科學及自動化研究院) 任職的 Jens Gustedt 撰寫. 主要是&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #141823; font-family: helvetica, arial, sans-serif; font-size: 15px; line-height: 20.7px;&quot;&gt;探討新的 C 語言規格和應用規範.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #141823; font-family: helvetica, arial, sans-serif; font-size: 15px; line-height: 20.7px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;714&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;//www.slideshare.net/slideshow/embed_code/key/nmPUl9oqWOwhfj&quot; style=&quot;border-width: 1px; border: 1px solid #CCC; margin-bottom: 5px; max-width: 100%;&quot; width=&quot;668&quot;&gt; &lt;/iframe&gt; &lt;br /&gt;
&lt;div style=&quot;margin-bottom: 5px;&quot;&gt;
&lt;strong&gt; &lt;a href=&quot;https://www.slideshare.net/stenlyho/modern-c-56451516&quot; target=&quot;_blank&quot; title=&quot;Modern c&quot;&gt;Modern c&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a href=&quot;https://www.slideshare.net/stenlyho&quot; target=&quot;_blank&quot;&gt;Stanley Ho&lt;/a&gt;&lt;/strong&gt; &lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://stenlyho.blogspot.com/feeds/8918166193624208218/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/637632445865419900/8918166193624208218' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/8918166193624208218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/637632445865419900/posts/default/8918166193624208218'/><link rel='alternate' type='text/html' href='http://stenlyho.blogspot.com/2015/12/modern-c-jens-gustedt.html' title='Modern C - Jens Gustedt'/><author><name>史丹利</name><uri>http://www.blogger.com/profile/05091261540809330037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>