<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>arm &#8211; richliu&#039;s blog</title>
	<atom:link href="https://blog.richliu.com/tag/arm/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.richliu.com</link>
	<description>Linux, 工作, 生活, 家人</description>
	<lastBuildDate>Thu, 01 Dec 2022 08:28:37 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>
	<item>
		<title>Multi-socket is doomed</title>
		<link>https://blog.richliu.com/2022/06/28/4679/multi-socket-is-doomed/</link>
					<comments>https://blog.richliu.com/2022/06/28/4679/multi-socket-is-doomed/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Tue, 28 Jun 2022 06:45:21 +0000</pubDate>
				<category><![CDATA[Computer/Technical]]></category>
		<category><![CDATA[ARM]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[Ampere]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[HPC]]></category>
		<guid isPermaLink="false">https://blog.richliu.com/?p=4679</guid>

					<description><![CDATA[<p>Brendan Gregg 在 2021 年的演講提到的 Multi-socket is doomed 他的理 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2022/06/28/4679/multi-socket-is-doomed/">Multi-socket is doomed</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p> Brendan Gregg 在 <a href="https://www.usenix.org/system/files/lisa21_slides_gregg_computing.pdf" target="_blank" rel="noreferrer noopener">2021 年的演講</a>提到的 Multi-socket is doomed <br />他的理由是如果在 cloud 上擴展 CPU ，可以再加開 instance 就好，沒有必要一定要讓該機器的 CPU 數變多，因為跨 CPU 的存取的工程非常浩大，而且會有很多問題產生<br /><br />今天我們就看到有人就這樣幹了</p>



<span id="more-4679"></span>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1544" height="836" src="https://blog.richliu.com/wp-content/uploads/2022/06/image-6.png" alt="" class="wp-image-4682" srcset="https://blog.richliu.com/wp-content/uploads/2022/06/image-6.png 1544w, https://blog.richliu.com/wp-content/uploads/2022/06/image-6-600x325.png 600w, https://blog.richliu.com/wp-content/uploads/2022/06/image-6-768x416.png 768w, https://blog.richliu.com/wp-content/uploads/2022/06/image-6-1536x832.png 1536w" sizes="(max-width: 1544px) 100vw, 1544px" /><figcaption>下圖就是一個 CPU 內部架構的示意圖，在大型 CPU 內，通常 CPU 會分成幾塊存取 DRAM 以提高效率，像是這圖上就會分成四塊，如果程式在每一塊內的 CPU 內上執行，通常會優先配給那一塊存取速度較快的 DRAM 區域，但是還是免不了要跨 socket 去存取另外一邊的 DRAM 內容，這時候 Latency 就會非常高，即使是在同一顆 CPU 內，不同 numa node 相互存取的效能也會比相同 numa node 稍低一點<br /><br />除了一般應用程式存取以外，還有一個叫 cache coherence （快取一致性）的機制也會影響效能，例如在 Node 0 的 CPU 要寫一個值到記憶體，它必需要通知所有的 CPU 你要將你的 cache 內的資料清空，以保持存取該記憶體的資料一致性，這個雖然頻寬佔用不高，但是總是一筆額外的傳輸開銷，尤其是要出 CPU 那就更快了。</figcaption></figure>



<figure class="wp-block-image size-full"><img decoding="async" width="499" height="244" src="https://blog.richliu.com/wp-content/uploads/2022/06/image-5.png" alt="" class="wp-image-4681"/></figure>



<p>而且我們現在單核心的 CPU core 數已經夠高了，沒有必要一定要搞 multi-socket system <br /><br />像 Ampere AltraMax 已經到達 128 核心<br />Amazon Graviton 3 也有 64 核心</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1028" height="570" src="https://blog.richliu.com/wp-content/uploads/2022/06/image-7.png" alt="" class="wp-image-4683" srcset="https://blog.richliu.com/wp-content/uploads/2022/06/image-7.png 1028w, https://blog.richliu.com/wp-content/uploads/2022/06/image-7-600x333.png 600w, https://blog.richliu.com/wp-content/uploads/2022/06/image-7-768x426.png 768w" sizes="(max-width: 1028px) 100vw, 1028px" /></figure>



<p>當然 Amazon 並沒有展示出他們的系統，但是他們圖上提到一件事<br /><br />這是一個 3 核心的系統，當然一般都是用 CCIX 接起來，應該會是二的倍數，像是 2 顆或是 4 顆<br />但是 Amazon 的系統是用 Nitro Card 接起來，</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1008" height="524" src="https://blog.richliu.com/wp-content/uploads/2022/06/image-8.png" alt="" class="wp-image-4684" srcset="https://blog.richliu.com/wp-content/uploads/2022/06/image-8.png 1008w, https://blog.richliu.com/wp-content/uploads/2022/06/image-8-600x312.png 600w, https://blog.richliu.com/wp-content/uploads/2022/06/image-8-768x399.png 768w" sizes="(max-width: 1008px) 100vw, 1008px" /></figure>



<p>Nitro Card 是一塊多功能 DPU Card ，負責資料傳輸加解密等等，看資料似乎也負責管理 edge VM 系統，還有當作 storage 系統<br /></p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1026" height="533" src="https://blog.richliu.com/wp-content/uploads/2022/06/image-9.png" alt="" class="wp-image-4685" srcset="https://blog.richliu.com/wp-content/uploads/2022/06/image-9.png 1026w, https://blog.richliu.com/wp-content/uploads/2022/06/image-9-600x312.png 600w, https://blog.richliu.com/wp-content/uploads/2022/06/image-9-768x399.png 768w" sizes="(max-width: 1026px) 100vw, 1026px" /></figure>



<p>沒有想到 Amazon 衝的這麼快，真的就丟掉 multi-socket 架構，這個應該是整個系統都為了加速 Cloud native system 而生，軟體 CPU 跟不上的用硬體去推<br />也完全符合 Brendan Gregg 所說的情境<br /><br />而像 Ampere 下一代的 CPU 更多核，那又更密集了，也符合 Brendan Gregg 的預測<br /><br />未來 data center 可能就會走半板單 CPU 的架構吧，學 Amazon 的 triple-cores 不現實，一般真要搞 2U 4 systems 還是可以做到的，也比較相容工業標準<br /><br />Ref. <br /><a href="https://www.servethehome.com/amazon-aws-graviton3-hits-ga-with-3-sockets-per-motherboard-designs-tri-socket-arm/" target="_blank" rel="noopener">AWS Graviton3 Hits GA with 3 Sockets Per Motherboard Designs</a><br /><a href="https://www.servethehome.com/aws-nitro-the-big-cloud-dpu-deployment-detailed/" target="_blank" rel="noopener">AWS Nitro the Big Cloud DPU Deployment Detailed</a><br /></p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2022/06/28/4679/multi-socket-is-doomed/">Multi-socket is doomed</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.richliu.com/2022/06/28/4679/multi-socket-is-doomed/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[跟風] 程式設計師, 你調試過最難的 BUG</title>
		<link>https://blog.richliu.com/2015/01/07/1730/%e8%b7%9f%e9%a2%a8-%e7%a8%8b%e5%bc%8f%e8%a8%ad%e8%a8%88%e5%b8%ab-%e4%bd%a0%e8%aa%bf%e8%a9%a6%e9%81%8e%e6%9c%80%e9%9b%a3%e7%9a%84-bug/</link>
					<comments>https://blog.richliu.com/2015/01/07/1730/%e8%b7%9f%e9%a2%a8-%e7%a8%8b%e5%bc%8f%e8%a8%ad%e8%a8%88%e5%b8%ab-%e4%bd%a0%e8%aa%bf%e8%a9%a6%e9%81%8e%e6%9c%80%e9%9b%a3%e7%9a%84-bug/#comments</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Tue, 06 Jan 2015 16:22:32 +0000</pubDate>
				<category><![CDATA[ARM]]></category>
		<category><![CDATA[Embedded]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[IC Design]]></category>
		<category><![CDATA[工作]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[Hardest Bug]]></category>
		<category><![CDATA[linux kernel]]></category>
		<guid isPermaLink="false">http://blog.richliu.com/?p=1730</guid>

					<description><![CDATA[<p>看到一篇文章 簡體中文翻譯: 程序员，你调试过的最难的 Bug 是？ 原文: What&#8217;s the [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2015/01/07/1730/%e8%b7%9f%e9%a2%a8-%e7%a8%8b%e5%bc%8f%e8%a8%ad%e8%a8%88%e5%b8%ab-%e4%bd%a0%e8%aa%bf%e8%a9%a6%e9%81%8e%e6%9c%80%e9%9b%a3%e7%9a%84-bug/">[跟風] 程式設計師, 你調試過最難的 BUG</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>看到一篇文章<br />
簡體中文翻譯: <a href="http://blog.jobbole.com/50995/" target="_blank" rel="noopener">程序员，你调试过的最难的 Bug 是？</a><br />
原文: <a href="http://www.quora.com/Whats-the-hardest-bug-youve-debugged" target="_blank" rel="noopener">What&#8217;s the hardest bug you&#8217;ve debugged?</a></p>
<p>看原文比翻譯好一點, 從原文大概只可能猜出, 改過 timer 之後, 可能影響到 interrupt 的速度.<br />
但是從最後的描述猜也可能是動到 clock tree 去影響 timer 進而影響到其他的行為.<br />
有碰到這種 BUG 的第一個一定先猜 timing , 純軟體的反而不會這樣想, 所以他覺得最難的 BUG<br />
我們看起來就還好.</p>
<p>這個描述讓我也想寫一下, 我碰過最難的 BUG.<br />
<span id="more-1730"></span></p>
<p>那是新的 SoC 剛回來的時候, 各個 block 都要驗, 我是負責帶領系統驗証部門的,<br />
所以一開始就有一大堆 BUG, 其中有一個 BUG 就是資料存取有問題, 而且要很久才會出現一次的.</p>
<p><strong>最難的 BUG 要件之一就是很久才會出現一次, 這表示會搞很久. </strong></p>
<p>因為當時我是負責 SATA 部份的驗証, 所以這個工作自然就是我去追了.<br />
看倌呀, SOC 就是統統要自己來, 從 hardware CPU/SATA/CLOCK 到 kernel 層都可能有問題.</p>
<p>第一件事情就是, 想辦法找出可以複製的方法. 我們知道資料存取有問題<br />
所以我就寫了一個 sh script 從 A Disk Copy 到 B Disk 再做比對. 然後一直 COPY 下去, 直到找到為止.</p>
<p>這個 sh script 大概可以在 200 次大檔案 COPY, 找到一次錯誤的結果.<br />
大概要花二個小時以上, 一開始的時候, 這個 script 執行下去, 其實並沒有辦法抓出問題.</p>
<p>流程大概是這樣<br />
# dd if=/dev/zero of=test bs=1M count=1024<br />
# md5sum test<br />
這樣就會有一次寫入, 一次讀出, 這樣就可以比對 md5.</p>
<p>有沒有看出什麼問題?</p>
<p>其實這個錯誤可能很少人會意會到, 就是測試 pattern 不能為零, 假設今天 block 寫錯了, 而資料是零, 再怎麼寫入讀出, 資料還是正確的. 所以後來我都改用 AV file 做 test pattern, 工程師的惡趣味就在這邊了.<br />
&#8220;我今天有 update 新的 test pattern 哦&#8230;. &#8221;<br />
大家就知道發生什麼事情了.</p>
<p>修改完 script 之後,  md5 checksum 的結果的確是不一樣. 這時就要猜測是什麼地方在作怪.<br />
首先一定先關心 SATA Hardware 是不是有問題, 所以就拿 PCIe SATA 還有 USB 來驗証比對.<br />
同時間, 看 Linux kernel 追 SATA 這一層在搞什麼飛機.</p>
<p>其實相對於 USB Protocol , AHCI SATA Interface 是很簡單的 interface, 很快的就排除掉這個犯人了. 而且 PCIe SATA 和 USB 的結果顯示也是會複製錯誤.</p>
<p>這下子人就可能是 CPU 和 Kernel 殺的. 還有記憶體.<br />
SoC 守則, 只要資料有錯, 八成是記憶體殺的. 各位可能會問, 那為什麼要先測 SATA? 因為記憶體己經先掃過一輪沒問題了, 所以當然先丟 SATA. 不過這邊的先掃過一輪沒有問題是不是真的沒有問題&#8230;.<br />
這個原因是這樣, 所謂的記憶體沒有問題是用 NON-OS Code 下去掃的, 可能會有切 MMU Mode 和 NonMMU Mode. 總之是這樣測的.</p>
<p>然後我就 mount ramdisk 開 memtest 狂測一天. 果然出問題了. 哼哼, 是你吧.<br />
不過接下來問題才大條. RAM 出問題很麻煩的. 要怎麼定位到到底是什麼出問題呢?</p>
<p>專業的讀者應該就會猜, 那就降速跑.<br />
正解, RAM 出問題就要先降速跑. 所以 DRAM 就跑在 200Mhz (DDR2-800 是 400Mhz, 最低應該是 DDR-400 跑在 200Mhz). 反正都降速, 所以 CPU 也從 600Mhz 降到 400Mhz 跑.<br />
當然老天一定不會這麼容易讓我們破關的, 所以資料錯誤的 BUG 還是可以重現.<br />
同時間 NON-OS 的測試結果仍然是顯示沒有問題.</p>
<p>然後就是猜了. 因為如果 NON-OS 的 memory test 是正確的, 而 Linux 是錯誤的, 那可能問題是出在其他的部份. 這麼複雜的系統一定就是要猜.</p>
<p>猜也是一門學問, 接下來就是先關 L1/L2 Cache .<br />
各位, 為什麼 CACHE 要最後再測, 因為 CACHE 關掉整個系統會變更慢. 所以預期二小時會發生的, 可能測試就要拉到二天, 我還有碰過 Cache 關掉就複製不出來的 BUG.</p>
<p>Disable Cache 有二項, 因為 L2 Enable 一定要 L1 也 Enable.<br />
Disable L1/L2<br />
Disable L2<br />
除了 Disable Cache 以外, 和 CPU 相關的還有 SMP (因為 SoC 有二顆 CPU), 還有 Cache Driver 新舊版的問題.</p>
<p>這幾個測試項測下來, 果然 Disable Cache 就不會出問題了, 而且是 Disable L2 Cache.</p>
<p>走到這邊大概己經測試了三個星期. 快搞死了, SoC 慢就算了, 掉資料是不允許的啊啊啊.<br />
對一個 engineer 來說這根本是不可接受的事.<br />
而且同時間還有一堆 BUG 待解待查. SoC 剛回來天天都是屁股在燒.</p>
<p>為了保險起見. 必需要找到資料錯誤的 Pattern .<br />
所以寫了一個可以 binary compare 並且顯示出那邊不一樣的小程式.<br />
翻了一下當年的痕跡, 原來除了 binary compare, 還有程式內加上 invalidate cache 的相關程式.<br />
我還記得為了這件事翻了整層的 Linux kernel cache 和 memory management 機制.</p>
<p>最後確認到是 cache 的問題是, 使用 binary compare 找出 32bytes, 相當於一條 L2 cache line size.<br />
而且可以重覆這個測試.</p>
<p>到這邊幾乎可以確定是 L2 cache Line 的問題, 而且是硬體的問題, 當然 L2 還有一些測試項目.<br />
像是調整 Cache Latency 之類的. 這個應該都做了, 不過做了以後應該是更久才會再出現一次.</p>
<p>所以我就將我知道的東西整理一下, 寫了一封信問 ARM . (還好當時公司有付錢買 ARM 的服務).</p>
<p>ARM 的回答也很乾脆,<br />
關掉那個 L2 Cache I Prefetch 的功能就可以了. 在 PL310 內, 這個功能只是 1 bit 的改變.<br />
(I Prefetch 是 Instruction Prefetch command , 快要執行到指令時, 先去記憶體先抓回來放在 Cache 內)</p>
<p><strong>然後就一切正常了&#8230;..</strong></p>
<p><strong>然後就一切正常了&#8230;..</strong></p>
<p><strong>然後就一切正常了&#8230;..</strong></p>
<p>1 個 bit, 快要一個月的青春啊~~ 所以這個 BUG 記到現在還在記.</p>
<p>這應該算難嗎? 不知道的 BUG 都很難, 知道之後就不難了.</p>
<p>==</p>
<p>後記1: NON-OS 為什麼沒有測出來, 其實 Cache 那邊的參數也是從 NON-OS 來的, 為什麼 NON-OS 沒有問題呢?<br />
猜想是因為 NON-OS 的 Code Size 很小, 所以 Code 都在 L1 Cache 內, 並不會動用到 I prefetch 的功能. 所以自然也驗不出來了.</p>
<p>後記2: 我覺得很多細節我都忘了, 所以這應該只是大致的情節. 雖然寫起來很輕鬆, 但是當時很慘烈呀~~~~</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2015/01/07/1730/%e8%b7%9f%e9%a2%a8-%e7%a8%8b%e5%bc%8f%e8%a8%ad%e8%a8%88%e5%b8%ab-%e4%bd%a0%e8%aa%bf%e8%a9%a6%e9%81%8e%e6%9c%80%e9%9b%a3%e7%9a%84-bug/">[跟風] 程式設計師, 你調試過最難的 BUG</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.richliu.com/2015/01/07/1730/%e8%b7%9f%e9%a2%a8-%e7%a8%8b%e5%bc%8f%e8%a8%ad%e8%a8%88%e5%b8%ab-%e4%bd%a0%e8%aa%bf%e8%a9%a6%e9%81%8e%e6%9c%80%e9%9b%a3%e7%9a%84-bug/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>ARM NEON memcpy</title>
		<link>https://blog.richliu.com/2013/03/21/1429/neon-memcpy/</link>
					<comments>https://blog.richliu.com/2013/03/21/1429/neon-memcpy/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Thu, 21 Mar 2013 08:28:40 +0000</pubDate>
				<category><![CDATA[ARM]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[memcpy]]></category>
		<category><![CDATA[neon]]></category>
		<guid isPermaLink="false">http://blog.richliu.com/?p=1429</guid>

					<description><![CDATA[<p>FourDollar 在 Plurk 上提到的, NEON 是 SIMD 的指令, 可以同時做矩陣運算, 拿來 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2013/03/21/1429/neon-memcpy/">ARM NEON memcpy</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>FourDollar 在 <a href="http://www.plurk.com/p/ibz9tg" target="_blank" rel="noopener">Plurk </a>上提到的, NEON 是 SIMD 的指令, 可以同時做矩陣運算, 拿來做一些記憶體搬移和運算都會比較快.<br />
VFP 是 SIMD 的指令, 不過背後是循序運算, 還是比 CPU 快, 但是相對上不會比較快.</p>
<p><a href="http://gitorious.org/0xdroid/bionic/commit/2ccf85280eb59b90bdf540dcc06e5d00c7f4be63/diffs" target="_blank" rel="noopener"> Added NEON optimized memcpy + armv6 unaligned memory access.</a><br />
<a href="https://github.com/genesi/imx-libc-neon/blob/master/memcpy-neon.S" target="_blank" rel="noopener">imx-libc-neon / memcpy-neon.S </a><br />
<a href="http://jserv.blogspot.tw/2009/06/android-memcpy.html" target="_blank" rel="noopener">改善 Android 中 memcpy 效能</a><br />
<a href="http://sourceware.org/ml/libc-ports/2009-07/msg00000.html" target="_blank" rel="noopener">ARM: NEON optimized implementation of memcpy.</a><br />
<a href="http://sourceware.org/ml/libc-ports/2009-07/msg00000.html" target="_blank" rel="noopener">http://sourceware.org/ml/libc-ports/2009-07/msg00000.html</a></p>
<p>之前有碰過 DMA 搬 Data 和 CPU 搬速度差不多的狀況.<br />
看起來拿閒置的 NEON 來用也是不錯的.<br />
但是 NEON dimension 太大, 如果不是有關影像處理, 只拿來做 data copy 就有點浪費了.</p>
<p>Update:<br />
NEON 是要配合 prefetch 才會快, 如果沒有 prefetch 是差不多的, 和我之前的認知類似. </p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2013/03/21/1429/neon-memcpy/">ARM NEON memcpy</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.richliu.com/2013/03/21/1429/neon-memcpy/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>如何確認 uclibc 是有 VFP 最佳化的?</title>
		<link>https://blog.richliu.com/2010/09/01/985/%e5%a6%82%e4%bd%95%e7%a2%ba%e8%aa%8d-uclibc-%e6%98%af%e6%9c%89-vfp-%e6%9c%80%e4%bd%b3%e5%8c%96%e7%9a%84/</link>
					<comments>https://blog.richliu.com/2010/09/01/985/%e5%a6%82%e4%bd%95%e7%a2%ba%e8%aa%8d-uclibc-%e6%98%af%e6%9c%89-vfp-%e6%9c%80%e4%bd%b3%e5%8c%96%e7%9a%84/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Wed, 01 Sep 2010 10:59:00 +0000</pubDate>
				<category><![CDATA[ARM]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[eabi]]></category>
		<category><![CDATA[GCC]]></category>
		<category><![CDATA[uclibc]]></category>
		<category><![CDATA[VFP]]></category>
		<guid isPermaLink="false">http://blog.richliu.com/?p=985</guid>

					<description><![CDATA[<p>這標題隨便下的, 只是一個筆記的 Note. 一般來說使用 arm 的平台很少會去注意是不是有 VFP 支援, [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2010/09/01/985/%e5%a6%82%e4%bd%95%e7%a2%ba%e8%aa%8d-uclibc-%e6%98%af%e6%9c%89-vfp-%e6%9c%80%e4%bd%b3%e5%8c%96%e7%9a%84/">如何確認 uclibc 是有 VFP 最佳化的?</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>這標題隨便下的, 只是一個筆記的 Note.<br />
<span id="more-985"></span></p>
<p>一般來說使用 arm 的平台很少會去注意是不是有 VFP 支援, 一般 Embedded Linux 內會用到數學函式運算的系統不多. (當然 Android 之後就變多了).</p>
<p>首先看來一個簡單的程式<br />
[C]<br />
int main(void){<br />
double a=2.2,b=1.1,c;</p>
<p>c=a*b;<br />
return 0;<br />
}<br />
[/C]<br />
這時用 arm-linux-gcc 去 compile 這行程式, 預設是 software floating point<br />
我們會看到, 程式會去呼叫 function __aeabi_mul 去運算 dmul.</p>
<p>[BASH]<br />
# arm-linux-gcc -c -g -Wa,-a,-ad 1.c ; arm-linux-objdump -dS 1.o  | less<br />
[/BASH]</p>
<p>[TEXT]<br />
c=a*b;<br />
30:   e24b002c        sub     r0, fp, #44     ; 0x2c<br />
34:   e8900003        ldm     r0, {r0, r1}<br />
38:   e24b2024        sub     r2, fp, #36     ; 0x24<br />
3c:   e892000c        ldm     r2, {r2, r3}<br />
40:   ebfffffe        bl      0 &lt;__aeabi_dmul&gt;<br />
44:   e1a03000        mov     r3, r0<br />
48:   e1a04001        mov     r4, r1<br />
4c:   e50b301c        str     r3, [fp, #-28]<br />
50:   e50b4018        str     r4, [fp, #-24]<br />
[/TEXT]</p>
<p>如果是使用 VFP 呢? 只要簡單幾行指令就可以完成原來還要呼叫 eabi_dmul 的事情<br />
[BASH]<br />
# arm-linux-gcc -mfloat-abi=softfp -c -g -Wa,-a,-ad 1.c ; arm-linux-objdump -dS 1.o  | less<br />
[/BASH]<br />
可以得到<br />
[TEXT]<br />
c=a*b;<br />
30:   ed1b6b0b        vldr    d6, [fp, #-44]<br />
34:   ed1b7b09        vldr    d7, [fp, #-36]<br />
38:   ee267b07        fmuld   d7, d6, d7<br />
3c:   ed0b7b07        vstr    d7, [fp, #-28]<br />
[/TEXT]</p>
<p>而 __eabi_dmul 藏在那邊呢? 答案就在 gcc 內<br />
在 gcc source code , gcc/config/arm/arm.c:  內有這一行 define<br />
set_optab_libfunc (smul_optab, DFmode, &#8220;__aeabi_dmul&#8221;);<br />
而 gcc/config/arm/ieee754-df.S 內記錄著 aeabi_dmul 的實際 software code.<br />
看起來落落長, 難怪效能差很多 :p</p>
<p>那 uclibc binary 有沒有支援 vfp 怎麼檢查呢 ?<br />
我先暫時是去 dump libm.so 的內容, 如果有使用到 vldr, fmuld 之類的指令, 表示確實有用到 VFP 的指令.<br />
[BASH]<br />
# arm-linux-objdump -dS libm-0.9.31.so<br />
[/BASH]<br />
*註: 看起來 uclibc 會有自己的數學指令(不確定)</p>
<p>uclibc 要如何支援, 如果是用 buildroot, 在 uclibc 的 configure file 加上一行<br />
[TEXT]<br />
UCLIBC_EXTRA_CFLAGS=&#8221;-mfloat-abi=softfp&#8221;<br />
[/TEXT]</p>
<p>編完 uclibc 之後, 我們可以用 objdump 看  libm.so 的 Assembly code<br />
[BASH]<br />
# arm-linux-objdump -D libm-0.9.31.so | less<br />
[/BASH]</p>
<p>有 v 開頭的指令很多都是 vfp 的指令<br />
[TEXT]<br />
00007dd0 <sin>:<br />
    7dd0:       e1a03001        mov     r3, r1<br />
    7dd4:       e3c32102        bic     r2, r3, #-2147483648    ; 0x80000000<br />
    7dd8:       e59f30a4        ldr     r3, [pc, #164]  ; 7e84 </sin><sin +0xb4><br />
    7ddc:       e52de004        push    {lr}            ; (str lr, [sp, #-4]!)<br />
    7de0:       e1520003        cmp     r2, r3<br />
    7de4:       e24dd01c        sub     sp, sp, #28     ; 0x1c<br />
    7de8:       ec410b17        vmov    d7, r0, r1<br />
    7dec:       d3a02000        movle   r2, #0  ; 0x0<br />
    7df0:       d3a03000        movle   r3, #0  ; 0x0<br />
    7df4:       d3a0c000        movle   ip, #0  ; 0x0<br />
    7df8:       da000010        ble     7e40 </sin><sin +0x70><br />
    7dfc:       e59f3084        ldr     r3, [pc, #132]  ; 7e88 </sin><sin +0xb8><br />
    7e00:       e1520003        cmp     r2, r3<br />
    7e04:       ce376b47        fsubdgt d6, d7, d7<br />
    7e08:       cc510b16        vmovgt  r0, r1, d6<br />
[/TEXT]</p>
<p>最後測試 Library 的速度, 以下是測試 Code.<br />
[C]<br />
cat 1.c<br />
#include <stdio .h><br />
#include <math .h></p>
<p>int main(void){</p>
<p>        double result,result2;
        int i,j,count=0;</p>
<p>        for(j=0;j&lt;10000;j++){
        for(i=0;i&lt;180;i++){
        result = sin(i);
        result2 = sin(0-i);
        if(result == -result2){
         count++;
        }
        }
        }</p>
<p>        printf(&#8221; count:%d\n&#8221;, count);</p>
<p>        return 0;
}
[/C]
無 VFP Library Support 的數據.
[TEXT]
count:1800000
real    0m 15.64s
user    0m 15.64s
sys     0m 0.00s
[/TEXT]
有 VFP Library Support 的數據
[TEXT]
count:1800000
real    0m 2.42s
user    0m 2.42s
sys     0m 0.00s
[/TEXT]
差了 6.46 倍. </math></stdio></sin></p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2010/09/01/985/%e5%a6%82%e4%bd%95%e7%a2%ba%e8%aa%8d-uclibc-%e6%98%af%e6%9c%89-vfp-%e6%9c%80%e4%bd%b3%e5%8c%96%e7%9a%84/">如何確認 uclibc 是有 VFP 最佳化的?</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.richliu.com/2010/09/01/985/%e5%a6%82%e4%bd%95%e7%a2%ba%e8%aa%8d-uclibc-%e6%98%af%e6%9c%89-vfp-%e6%9c%80%e4%bd%b3%e5%8c%96%e7%9a%84/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Patch RVDS 4.0 at Linux</title>
		<link>https://blog.richliu.com/2010/06/30/947/patch-rvds-4-0-at-linux/</link>
					<comments>https://blog.richliu.com/2010/06/30/947/patch-rvds-4-0-at-linux/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Wed, 30 Jun 2010 03:13:38 +0000</pubDate>
				<category><![CDATA[ARM]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[RVDS]]></category>
		<guid isPermaLink="false">http://blog.richliu.com/?p=947</guid>

					<description><![CDATA[<p>在 Linux 上上 RVDS 4.0 的 Patch Command 如下 [BASH] # ﻿~/ARM/ [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2010/06/30/947/patch-rvds-4-0-at-linux/">Patch RVDS 4.0 at Linux</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>在 Linux 上上 RVDS 4.0 的 Patch Command 如下</p>
<p>[BASH]</p>
<p># ﻿~/ARM/bin/linux-pentium/setuplinux.bin patch &#8211;source RVDS_4_0_dist_to_4-all-all_stnd.armpatch &#8211;target ~/ARM</p>
<p>[/BASH]</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2010/06/30/947/patch-rvds-4-0-at-linux/">Patch RVDS 4.0 at Linux</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.richliu.com/2010/06/30/947/patch-rvds-4-0-at-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Boot Monitor Flash 基本操作</title>
		<link>https://blog.richliu.com/2010/03/31/898/boot-monitor-flash-%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c/</link>
					<comments>https://blog.richliu.com/2010/03/31/898/boot-monitor-flash-%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Wed, 31 Mar 2010 08:20:11 +0000</pubDate>
				<category><![CDATA[ARM]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[Boot monitor]]></category>
		<category><![CDATA[flash]]></category>
		<guid isPermaLink="false">http://blog.richliu.com/?p=898</guid>

					<description><![CDATA[<p>ARM PB11MPCore Boot Monitor Version:    V4.1 Build Date [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2010/03/31/898/boot-monitor-flash-%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c/">Boot Monitor Flash 基本操作</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>ARM PB11MPCore Boot Monitor<br />
Version:    V4.1<br />
Build Date: Oct 24 2007<br />
Tile Site : Tile Not Fitted<br />
Endian:     Little<br />
K:\&gt;</p>
<p><span id="more-898"></span></p>
<p>產生 mkimage</p>
<p>./mkimage -A arm -O linux -T kernel -C none -a 8000 -e 8000 -n arm_v -d ./arch/arm/boot/zImage uImage</p>
<p>K:\&gt; flash</p>
<p>Flash&gt; list image<br />
Flash Area Base 0x40000000</p>
<p>Address     Name<br />
&#8212;&#8212;-     &#8212;-<br />
0x40000000  Boot_Monitor<br />
0x40040000  SYSTEM.DAT<br />
0x40080000  U-BOOT<br />
0x400C0000  uimage<br />
0x40280000  BASE</p>
<p>Flash Area Base 0x43FC0000</p>
<p>Address     Name<br />
&#8212;&#8212;-     &#8212;-</p>
<p>Flash Area Base 0x44000000</p>
<p>Address     Name<br />
&#8212;&#8212;-     &#8212;-</p>
<p>Flash Area Base 0x47FC0000</p>
<p>Address     Name<br />
&#8212;&#8212;-     &#8212;-<br />
Flash&gt; erase image uimage<br />
Erasing Flash</p>
<p>Flash&gt; write binary uimage<br />
Erasing Flash<br />
Writing Flash<br />
Progress 0%<br />
Progress 3%<br />
..<br />
Progress 100%<br />
Flash&gt; run U-BOOT</p>
<p>ref.<br />
<a href="http://scottshulinux.blogspot.com/2008/09/arm-realview-pb11mpcore-6-bootloader.html" target="_blank" rel="noopener">ARM RealView PB11MPCore (2) &#8211; Installation<br />
ARM RealView PB11MPCore (6) BootMonitor</a></p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2010/03/31/898/boot-monitor-flash-%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c/">Boot Monitor Flash 基本操作</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.richliu.com/2010/03/31/898/boot-monitor-flash-%e5%9f%ba%e6%9c%ac%e6%93%8d%e4%bd%9c/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[ARM][Linux] 建立 ARM 平台的 Debian System</title>
		<link>https://blog.richliu.com/2009/12/25/829/armlinux-%e5%bb%ba%e7%ab%8b-arm-%e5%b9%b3%e5%8f%b0%e7%9a%84-debian-system/</link>
					<comments>https://blog.richliu.com/2009/12/25/829/armlinux-%e5%bb%ba%e7%ab%8b-arm-%e5%b9%b3%e5%8f%b0%e7%9a%84-debian-system/#comments</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Fri, 25 Dec 2009 05:43:01 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Embedded]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[ARM11]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[debootstrap]]></category>
		<guid isPermaLink="false">http://blog.richliu.com/?p=829</guid>

					<description><![CDATA[<p>在 Embedded system 下, 使用現有的系統驗證 SoC 功能是非常棒的.最大的好處就是不用到處找 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2009/12/25/829/armlinux-%e5%bb%ba%e7%ab%8b-arm-%e5%b9%b3%e5%8f%b0%e7%9a%84-debian-system/">[ARM][Linux] 建立 ARM 平台的 Debian System</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>在 Embedded system 下, 使用現有的系統驗證 SoC 功能是非常棒的.<br />最大的好處就是不用到處找工具編一堆有的沒有的, 時間可以花在更重要的地方</p>



<p>像我將 debian 裝好之後, 就可以跑 wireshark 了</p>



<p>本圖中, 最左邊的是 console, 中間的視窗是 EVB 上的 wireshark, 右邊的視窗是 PC 端的 wireshark<br /><a title="Flickr 上 richliu(有錢劉) 的 使用 wireshark *2 debug tcp stream" href="http://www.flickr.com/photos/richliu_tw/4186338737/" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="http://farm3.static.flickr.com/2545/4186338737_04601bbf13_m.jpg" alt="使用 wireshark *2 debug tcp stream" width="240" height="100"/></a></p>



<p>真是超好用的&#8230;&#8230;</p>



<span id="more-829"></span>



<p>首先先裝 debootstrap<br /># apt-get install debootstrap<br />再裝 sid 系統 (現在應該是 unstable)</p>



<pre class="wp-block-preformatted">debootstrap --verbose --foreign --arch armel sid ./sid http://ftp.tw.debian.org/debian
# 若以上連結失效, 可以改用
debootstrap --verbose --foreign --arch armel sid ./sid http://ftp.twaren.net/Debian/debian/
</pre>



<p id="block-a79ce910-9e82-4b55-82ab-0f551c1bfc43">在此一提, 我是用 ARM11MPCore 平台, 用 armel (使用 EABI) 比較好, 記得有些套件在 armel 才會有. arm 己經沒有了

抓完套件下來以後, 將 sid 打包起來, 丟到 target 上去, 再解壓到 /</p>



<p>接下來在 Target board 上下</p>



<pre class="wp-block-preformatted">/debootstrap/debootstrap --second-stage</pre>



<p><br />運氣好就可以解完, 如果解不完就重做一次看看<br />因為我是在 host PC 上做的, 所以在做的時候有一些 information 就會帶過去</p>



<p>修改 /etc/fstab</p>



<pre class="wp-block-preformatted"><br />/dev/sda1 / ext3 defaults,noatime,check=none 0 0<br />proc /proc proc defaults 0 0<br />devpts /dev/pts devpts mode=0620,gid=5 0 0</pre>



<p><br /></p>



<p>因為我是要常常開關測試, 所以不希望 fsck disk,<br />在 format disk 後, 可以考慮下這種參數</p>



<pre class="wp-block-preformatted">
# mke2fs -j /dev/sda
# tune2fs -c 0 -i 0 /dev/sda1
</pre>



<p>/etc/inittab 也要修改, getty 的部份可以全部關掉 (如果有 LCD 可以留 1,2 個下來)</p>



<p></p>



<pre class="wp-block-preformatted">

T0:23:respawn:/sbin/getty -L ttyS0 38400 vt100
#1:2345:respawn:/sbin/getty 38400 tty1
#2:23:respawn:/sbin/getty 38400 tty2
#3:23:respawn:/sbin/getty 38400 tty3
#4:23:respawn:/sbin/getty 38400 tty4
#5:23:respawn:/sbin/getty 38400 tty5
#6:23:respawn:/sbin/getty 38400 tty6
</pre>



<p><br />產生 sources.list</p>



<pre class="wp-block-preformatted"># echo "deb http://ftp.tw.debian.org/debian unstable main non-free contrib" > /etc/apt/sources.list
</pre>



<p><br />設定環境變數</p>



<pre class="wp-block-preformatted">echo LANG=\"C\" >> /etc/environment</pre>



<p></p>



<p><br />接下來就網路設一設, 然後就可以開始安裝環境了</p>



<pre class="wp-block-preformatted"># apt-get update
# apt-get install openssh-server
# apt-get install rcconf
</pre>



<p>接下來有用過 ubuntu 應該就很熟了&#8230;.</p>



<p>Ref.<br /><a title="deboostrap-debian" href="http://emqbit.com/deboostrap-debian" target="_blank" rel="noopener"><br />http://emqbit.com/deboostrap-debian</a><br />Ref. 這個不錯<br />https://help.ubuntu.com/community/Installation/FromLinux</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2009/12/25/829/armlinux-%e5%bb%ba%e7%ab%8b-arm-%e5%b9%b3%e5%8f%b0%e7%9a%84-debian-system/">[ARM][Linux] 建立 ARM 平台的 Debian System</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.richliu.com/2009/12/25/829/armlinux-%e5%bb%ba%e7%ab%8b-arm-%e5%b9%b3%e5%8f%b0%e7%9a%84-debian-system/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Linux kernel PCI Domains Support for ARM</title>
		<link>https://blog.richliu.com/2009/12/17/831/linux-kernel-pci-domains-support-for-arm/</link>
					<comments>https://blog.richliu.com/2009/12/17/831/linux-kernel-pci-domains-support-for-arm/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Wed, 16 Dec 2009 16:11:15 +0000</pubDate>
				<category><![CDATA[隨手札記]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PCI]]></category>
		<guid isPermaLink="false">http://blog.richliu.com/?p=831</guid>

					<description><![CDATA[<p>Linux kernel 支援不同 domain 的 PCI, 看起來是 ACPI 的功能之一. 其他平台看起 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2009/12/17/831/linux-kernel-pci-domains-support-for-arm/">Linux kernel PCI Domains Support for ARM</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Linux kernel 支援不同 domain 的 PCI, 看起來是 ACPI 的功能之一.<br />
其他平台看起來也有支援, 像是 sparc or mips 都有.</p>
<p>但是在 ARM 上並沒有這樣的支援</p>
<p>我的平台有 2 個 PCIe Host Controller , 而且都要設定在 PCIe bus 0 上面.<br />
這時就拿 PCI domain 的 code 來用最快,<br />
以下就是 Sample Code 和 ARM 部份的 Patch Code (不含我目前使用平台的 Patch)</p>
<p><span id="more-831"></span><br />
  Seems ARM don&#8217;s support PCI Domains function now.<br />
Here is a tiny patch for PCI Domains support</p>
<p>   It&#8217;s work on my platform,<br />
There are two PCIe host controller on my platform, and both bus number<br />
should be 0<br />
So, use PCI Domain to control both PCIe host controller is better choice.</p>
<p>Here is platform PCIe sample code,<br />
static struct hw_pci cxxxxxx_pcie0 __initdata = {<br />
       .swizzle = pci_std_swizzle,<br />
       .map_irq = cxxxxxx_pcie0_map_irq,<br />
       .nr_controllers = 1,<br />
       .nr_domains = 0,<br />
       .setup = cxxxxxx_pci_setup,<br />
       .scan = cxxxxxx_pci_scan_bus,<br />
       .preinit = cxxxxxx_pci_preinit,<br />
       .postinit = cxxxxxx_pcie0_postinit,<br />
};<br />
static struct hw_pci cxxxxxx_pcie1 __initdata = {<br />
       .swizzle = pci_std_swizzle,<br />
       .map_irq = cxxxxxx_pcie1_map_irq,<br />
       .nr_controllers = 1,<br />
       .nr_domains = 1,<br />
       .setup = cxxxxxx_pci_setup,<br />
       .scan = cxxxxxx_pci_scan_bus,<br />
       .postinit = cxxxxxx_pcie1_postinit,<br />
};</p>
<p>static int __init cxxxxxx_pci_init(void)<br />
{<br />
       pci_common_init(&#038;cxxxxxx_pcie0);<br />
       pci_common_init(&#038;cxxxxxx_pcie1);<br />
       return 0;<br />
}</p>
<p>&#8212;<br />
diff &#8211;git a/arch/arm/Kconfig b/arch/arm/Kconfig<br />
index 79a3074..33a49ba 100644<br />
&#8212; a/arch/arm/Kconfig<br />
+++ b/arch/arm/Kconfig<br />
@@ -865,6 +865,10 @@ config PCI<br />
      your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or<br />
      VESA. If you have PCI, say Y, otherwise N.</p>
<p>+config PCI_DOMAINS<br />
+        def_bool y<br />
+        depends on PCI<br />
+<br />
 config PCI_SYSCALL<br />
    def_bool PCI</p>
<p>diff &#8211;git a/arch/arm/include/asm/mach/pci.h<br />
b/arch/arm/include/asm/mach/pci.h<br />
index a38bdc7..f099067 100644<br />
&#8212; a/arch/arm/include/asm/mach/pci.h<br />
+++ b/arch/arm/include/asm/mach/pci.h<br />
@@ -20,6 +20,9 @@ struct hw_pci {<br />
    void        (*postinit)(void);<br />
    u8        (*swizzle)(struct pci_dev *dev, u8 *pin);<br />
    int        (*map_irq)(struct pci_dev *dev, u8 slot, u8 pin);<br />
+#ifdef CONFIG_PCI_DOMAINS<br />
+    int        nr_domains;<br />
+#endif<br />
 };</p>
<p> /*<br />
@@ -37,8 +40,12 @@ struct pci_sys_data {<br />
                    /* IRQ mapping                */<br />
    int        (*map_irq)(struct pci_dev *, u8, u8);<br />
    struct hw_pci    *hw;<br />
+#ifdef CONFIG_PCI_DOMAINS<br />
+    int        domain;<br />
+#endif<br />
 };</p>
<p>+<br />
 /*<br />
 * This is the standard PCI-PCI bridge swizzling algorithm.<br />
 */<br />
diff &#8211;git a/arch/arm/include/asm/pci.h b/arch/arm/include/asm/pci.h<br />
index 0abf386..57ce5bd 100644<br />
&#8212; a/arch/arm/include/asm/pci.h<br />
+++ b/arch/arm/include/asm/pci.h<br />
@@ -25,6 +25,11 @@ static inline void pcibios_penalize_isa_irq(int irq,<br />
int active)<br />
    /* We don&#8217;t do dynamic PCI IRQ allocation */<br />
 }</p>
<p>+#ifdef CONFIG_PCI_DOMAINS<br />
+int pci_domain_nr(struct pci_bus *bus);<br />
+int pci_proc_domain(struct pci_bus *bus);<br />
+#endif<br />
+<br />
 /*<br />
 * The PCI address space does equal the physical memory address space.<br />
 * The networking and block device layers use this boolean for bounce<br />
diff &#8211;git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c<br />
index 8096819..b364ca8 100644<br />
&#8212; a/arch/arm/kernel/bios32.c<br />
+++ b/arch/arm/kernel/bios32.c<br />
@@ -531,6 +531,7 @@ static void __init pcibios_init_hw(struct hw_pci *hw)<br />
        sys->busnr   = busnr;<br />
        sys->swizzle = hw->swizzle;<br />
        sys->map_irq = hw->map_irq;<br />
+        sys->domain  = hw->nr_domains;<br />
        sys->resource[0] = &#038;ioport_resource;<br />
        sys->resource[1] = &#038;iomem_resource;</p>
<p>@@ -694,3 +695,20 @@ int pci_mmap_page_range(struct pci_dev *dev, struct<br />
vm_area_struct *vma,</p>
<p>    return 0;<br />
 }<br />
+#ifdef CONFIG_PCI_DOMAINS<br />
+int pci_domain_nr(struct pci_bus *bus)<br />
+{<br />
+<br />
+        //struct pci_sysdata *sd = bus->sysdata;<br />
+        struct pci_sys_data *sd = bus->sysdata;<br />
+        return sd->domain;<br />
+<br />
+}<br />
+EXPORT_SYMBOL(pci_domain_nr);<br />
+<br />
+int pci_proc_domain(struct pci_bus *bus)<br />
+{<br />
+        return pci_domain_nr(bus);<br />
+}<br />
+EXPORT_SYMBOL(pci_proc_domain);<br />
+#endif</p>
<p>Ref<br />
<a href="http://lwn.net/Articles/247773/" target="_blank" rel="noopener">x86/x86-64 PCI domain support</a></p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2009/12/17/831/linux-kernel-pci-domains-support-for-arm/">Linux kernel PCI Domains Support for ARM</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.richliu.com/2009/12/17/831/linux-kernel-pci-domains-support-for-arm/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>ARM 的 Oprofile</title>
		<link>https://blog.richliu.com/2009/12/12/820/arm-%e7%9a%84-oprofile/</link>
					<comments>https://blog.richliu.com/2009/12/12/820/arm-%e7%9a%84-oprofile/#comments</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Fri, 11 Dec 2009 19:02:18 +0000</pubDate>
				<category><![CDATA[Embedded]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[ARM11]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[oprofile]]></category>
		<guid isPermaLink="false">http://blog.richliu.com/?p=820</guid>

					<description><![CDATA[<p>最近在弄 ARM11 的 Oprofile, 結果發現執行 opcontrol 的動作之後, 沒有 log 的 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2009/12/12/820/arm-%e7%9a%84-oprofile/">ARM 的 Oprofile</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>最近在弄 ARM11 的 Oprofile, 結果發現執行 opcontrol 的動作之後, 沒有 log 的動作.<br />
大致上的訊息是這樣的<br />
[Bash]<br />
# opcontrol &#8211;shutdown<br />
Stopping profiling.<br />
Killing daemon.<br />
# Stopping profiling.<br />
Killing daemon.<br />
opreport image:/vmlinux -l -w -g &gt; oprofile.txt<br />
error: no sample files found: profile specification too strict ?<br />
[/Bash]</p>
<p>這時請改用 timer interrupt</p>
<p>在 load oprofile modules 加上 timer=1<br />
若是 static link 時, 就要在 boot_cmd 加上 oprofile.timer=1</p>
<p>似乎目前的 kernel oprofile 不支援 ARM11MPCore.</p>
<p>http://oprofile.sourceforge.net/doc/detailed-parameters.html#timer</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2009/12/12/820/arm-%e7%9a%84-oprofile/">ARM 的 Oprofile</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.richliu.com/2009/12/12/820/arm-%e7%9a%84-oprofile/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>Sharp ARM Base Netbook PC-Z1 NetWalker</title>
		<link>https://blog.richliu.com/2009/09/28/812/sharp-arm-base-netbook-pc-z1/</link>
					<comments>https://blog.richliu.com/2009/09/28/812/sharp-arm-base-netbook-pc-z1/#comments</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Mon, 28 Sep 2009 11:18:50 +0000</pubDate>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[netbook]]></category>
		<category><![CDATA[PC-Z1]]></category>
		<category><![CDATA[SHARP]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://blog.richliu.com/?p=812</guid>

					<description><![CDATA[<p>最近 Sharp 開始出售第一台 ARM Base 的 Netbook , 取名 NetWalker 不過說他 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2009/09/28/812/sharp-arm-base-netbook-pc-z1/">Sharp ARM Base Netbook PC-Z1 NetWalker</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>最近 Sharp 開始出售第一台 ARM Base 的 Netbook , 取名 <a href="http://www.sharp.co.jp/netwalker/index.html" target="_blank" rel="noopener">NetWalker<br />
</a>不過說他是 Netbook 我個人覺得這一台的定位比較像是放在比電子字典更強一點點的功能.</p>
<p><span id="more-812"></span></p>
<p>而名稱叫 NetWalker 應該會讓人想到 Walkman 吧 <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>列出主要的元件<br />
CPU: FreeScale i.MX515<br />
RAM: 512MByte (固定)<br />
OS: Ubuntu 9.04 (特別版)<br />
LCD: 5&#8243; 1024*600 touch screen<br />
Flash: 4G Flash + 2G User Space.<br />
Wireless: 802.11 B/G<br />
SDCard: microSD/microSDHC (至少可以放32G)<br />
3 秒開機<br />
10 小時使用時間.<br />
定價: Y$45,000.- (約 NT:16,000.-, 日幣最近很貴)</p>
<p>而且操控方式感覺還不錯<br />
<a href="https://blog.richliu.com/wp-content/uploads/2009/09/3962402040_dfc36148d3_o.png"><img loading="lazy" decoding="async" class="aligncenter  wp-image-2327" src="https://blog.richliu.com/wp-content/uploads/2009/09/3962402040_dfc36148d3_o.png" alt="" width="361" height="342" srcset="https://blog.richliu.com/wp-content/uploads/2009/09/3962402040_dfc36148d3_o.png 614w, https://blog.richliu.com/wp-content/uploads/2009/09/3962402040_dfc36148d3_o-300x284.png 300w" sizes="(max-width: 361px) 100vw, 361px" /></a></p>
<p>ATOM Netbook 裝 Linux 都沒有市場了, 那 ARM Netbook 有什麼搞頭呢?</p>
<p>從規格和網頁來看, 大概會主打長時間的行動上網, 不過我到覺得這個應該是主打電子辭典和電子書. 如果還可以混個 Facebook, 做個社交也不錯.</p>
<p>從電子辭典切入的確是一個非常好的點, 大小差不多, 價格雖然貴了很多, 但是可以取代必要品的位置(就是一定會帶的東西). 如果還可以看電子書, 那這個平台的功能就又更多了, 加上長時間使用(10小時算不錯了). 這是一個很好的試金石.</p>
<p>台灣的系統廠加加油, 如果 ACER/ASUS 推出這樣的產品, 搭配快譯通/無敵的系統. 賣你 NT:15,000.- 你會願意買嗎? (快譯通和無敵可能不願意做這個賠錢貨的市場就是了 :p)</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2009/09/28/812/sharp-arm-base-netbook-pc-z1/">Sharp ARM Base Netbook PC-Z1 NetWalker</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.richliu.com/2009/09/28/812/sharp-arm-base-netbook-pc-z1/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>htop cross compile 碰到 undefined references to `rpl_malloc&#8217;</title>
		<link>https://blog.richliu.com/2009/08/20/790/htop-cross-compile-%e7%a2%b0%e5%88%b0-undefined-references-to-rpl_malloc/</link>
					<comments>https://blog.richliu.com/2009/08/20/790/htop-cross-compile-%e7%a2%b0%e5%88%b0-undefined-references-to-rpl_malloc/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Thu, 20 Aug 2009 10:11:58 +0000</pubDate>
				<category><![CDATA[隨手札記]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[htop]]></category>
		<category><![CDATA[rpl_malloc]]></category>
		<guid isPermaLink="false">http://blog.richliu.com/?p=790</guid>

					<description><![CDATA[<p>Cross compile htop 碰到的錯誤訊息. undefined references to `rp [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2009/08/20/790/htop-cross-compile-%e7%a2%b0%e5%88%b0-undefined-references-to-rpl_malloc/">htop cross compile 碰到 undefined references to `rpl_malloc&#8217;</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Cross compile htop 碰到的錯誤訊息.</p>
<blockquote><p>undefined references to `rpl_malloc&#8217;</p></blockquote>
<blockquote><p>下這行指令就好了<br />
# ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes ./configure &#8211;with-gnu-ld &#8211;host=arm-linux</p></blockquote>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2009/08/20/790/htop-cross-compile-%e7%a2%b0%e5%88%b0-undefined-references-to-rpl_malloc/">htop cross compile 碰到 undefined references to `rpl_malloc&#8217;</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.richliu.com/2009/08/20/790/htop-cross-compile-%e7%a2%b0%e5%88%b0-undefined-references-to-rpl_malloc/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>ARM RealView ICE, RealView Trace 開箱文</title>
		<link>https://blog.richliu.com/2008/12/22/665/arm-realview-ice-realview-trace-%e9%96%8b%e7%ae%b1%e6%96%87/</link>
					<comments>https://blog.richliu.com/2008/12/22/665/arm-realview-ice-realview-trace-%e9%96%8b%e7%ae%b1%e6%96%87/#comments</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Mon, 22 Dec 2008 06:51:35 +0000</pubDate>
				<category><![CDATA[Embedded]]></category>
		<category><![CDATA[工作]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[Realview ICE]]></category>
		<category><![CDATA[Realview Trace]]></category>
		<category><![CDATA[開箱文]]></category>
		<guid isPermaLink="false">http://blog.richliu.com/?p=665</guid>

					<description><![CDATA[<p>最近公司買了 ARM Realview ICE 和 RealView Trace. 所以就照一照, 弄個開箱文 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2008/12/22/665/arm-realview-ice-realview-trace-%e9%96%8b%e7%ae%b1%e6%96%87/">ARM RealView ICE, RealView Trace 開箱文</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>最近公司買了 ARM Realview ICE 和 RealView Trace.<br />
所以就照一照, 弄個開箱文. 這二台加起來超過 US$7,000.- 以上<br />
RealView Development Suite Professional Floating License 要價 US$12,000.- 以上, 軟體果然比硬體貴多了<br />
我猜 ARM 應該覺得大家都會用盜版呀&#8230;.<br />
<span id="more-665"></span></p>
<p>Realview ICE 的外盒, 很大一盒 :p<br />
<a href="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00843_3126840625_o.jpg"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-3138" src="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00843_3126840625_o-1024x768.jpg" alt="" width="620" height="465" srcset="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00843_3126840625_o-1024x768.jpg 1024w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00843_3126840625_o-300x225.jpg 300w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00843_3126840625_o-768x576.jpg 768w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00843_3126840625_o.jpg 2048w" sizes="(max-width: 620px) 100vw, 620px" /></a></p>
<p>拆了外箱<br />
<a href="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00844_3126840075_o.jpg"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-3139" src="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00844_3126840075_o-1024x768.jpg" alt="" width="620" height="465" srcset="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00844_3126840075_o-1024x768.jpg 1024w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00844_3126840075_o-300x225.jpg 300w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00844_3126840075_o-768x576.jpg 768w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00844_3126840075_o.jpg 2048w" sizes="(max-width: 620px) 100vw, 620px" /></a></p>
<p>第一層, 手冊和 RVD 的光碟片<br />
<a href="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00845_3126842195_o.jpg"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-3140" src="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00845_3126842195_o-1024x768.jpg" alt="" width="620" height="465" srcset="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00845_3126842195_o-1024x768.jpg 1024w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00845_3126842195_o-300x225.jpg 300w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00845_3126842195_o-768x576.jpg 768w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00845_3126842195_o.jpg 2048w" sizes="(max-width: 620px) 100vw, 620px" /></a></p>
<p>第二層, Realview ICE 的本體<br />
<a href="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00846_3127668966_o.jpg"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-3142" src="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00846_3127668966_o-1024x768.jpg" alt="" width="620" height="465" srcset="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00846_3127668966_o-1024x768.jpg 1024w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00846_3127668966_o-300x225.jpg 300w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00846_3127668966_o-768x576.jpg 768w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00846_3127668966_o.jpg 2048w" sizes="(max-width: 620px) 100vw, 620px" /></a></p>
<p>拿出重要的線材擺在一起, 最右邊的線是 LVDS 的線, 傳輸距離長, 可以用的 clock 較高(up to 50Mhz)<br />
<a href="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00847_3126842937_o.jpg"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-3143" src="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00847_3126842937_o-1024x768.jpg" alt="" width="620" height="465" srcset="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00847_3126842937_o-1024x768.jpg 1024w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00847_3126842937_o-300x225.jpg 300w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00847_3126842937_o-768x576.jpg 768w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00847_3126842937_o.jpg 2048w" sizes="(max-width: 620px) 100vw, 620px" /></a></p>
<p>來一個 LVDS to 20pin JTAG 轉接頭的特寫<br />
<a href="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00848_3127670988_o.jpg"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-3144" src="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00848_3127670988_o-1024x768.jpg" alt="" width="620" height="465" srcset="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00848_3127670988_o-1024x768.jpg 1024w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00848_3127670988_o-300x225.jpg 300w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00848_3127670988_o-768x576.jpg 768w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00848_3127670988_o.jpg 2048w" sizes="(max-width: 620px) 100vw, 620px" /></a></p>
<p>RealView Trace 的盒子, 其實和 RealView ICE 的一樣大, 只是比較薄而己<br />
<a href="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00850_3127671598_o.jpg"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-3145" src="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00850_3127671598_o-1024x768.jpg" alt="" width="620" height="465" srcset="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00850_3127671598_o-1024x768.jpg 1024w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00850_3127671598_o-300x225.jpg 300w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00850_3127671598_o-768x576.jpg 768w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00850_3127671598_o.jpg 2048w" sizes="(max-width: 620px) 100vw, 620px" /></a></p>
<p>內層只有手冊和 RealView Trace<br />
<a href="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00851_3127672572_o.jpg"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-3146" src="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00851_3127672572_o-1024x768.jpg" alt="" width="620" height="465" srcset="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00851_3127672572_o-1024x768.jpg 1024w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00851_3127672572_o-300x225.jpg 300w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00851_3127672572_o-768x576.jpg 768w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00851_3127672572_o.jpg 2048w" sizes="(max-width: 620px) 100vw, 620px" /></a></p>
<p>來個疊疊樂, 但是 Realview ICE 和 Realview Trace 就是要這樣疊起來用的, 所以是一定要疊的<br />
<a href="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00859_3127673032_o.jpg"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-3147" src="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00859_3127673032_o-1024x768.jpg" alt="" width="620" height="465" srcset="https://blog.richliu.com/wp-content/uploads/2008/12/dsc00859_3127673032_o-1024x768.jpg 1024w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00859_3127673032_o-300x225.jpg 300w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00859_3127673032_o-768x576.jpg 768w, https://blog.richliu.com/wp-content/uploads/2008/12/dsc00859_3127673032_o.jpg 2048w" sizes="(max-width: 620px) 100vw, 620px" /></a></p>
<p>因為手上有 ETM 的 ARM11 Demoboard 都在使用中, 所以 Realview Trace 就先收起來了.<br />
根據在國內廠商接觸的經驗, 買 ARM Realview ICE 的應該很多, 會買到 Realview Trace 的應該就很少了<br />
IC Design House 如果不是做 ARM11 以上的高階產品, 要包 ETM, 用不到 RealView Trace.<br />
系統廠買到的機會還比較高, 因為案子可能會用 ARM11, 然後像 Qualcomm 可能就會包 ETM<br />
進系統. 這時系統廠整合的時候有機會用到 Realview Trace.<br />
但是系統廠 cost down 的很嚴重, 所以最多也只會買到 Realview ICE.<br />
目前我想得到的公司應該只有 Faraday Technology (智原), 他們有 ARM CPU 的 IP</p>
<p>如果你知道還有那一家公司還有買 Realview Trace, 要告訴我們, 讓大家拜一下 <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>後記: 其實我的開箱文沒有辦法寫得金光閃閃, 瑞氣千條, 開箱之後產品會發光, 我都是有圖就好, 大家多包涵了.</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2008/12/22/665/arm-realview-ice-realview-trace-%e9%96%8b%e7%ae%b1%e6%96%87/">ARM RealView ICE, RealView Trace 開箱文</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.richliu.com/2008/12/22/665/arm-realview-ice-realview-trace-%e9%96%8b%e7%ae%b1%e6%96%87/feed/</wfw:commentRss>
			<slash:comments>8</slash:comments>
		
		
			</item>
		<item>
		<title>[新聞][想法] Ubuntu announces ARM port</title>
		<link>https://blog.richliu.com/2008/11/21/648/%e6%96%b0%e8%81%9e%e6%83%b3%e6%b3%95-ubuntu-announces-arm-port/</link>
					<comments>https://blog.richliu.com/2008/11/21/648/%e6%96%b0%e8%81%9e%e6%83%b3%e6%b3%95-ubuntu-announces-arm-port/#comments</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Fri, 21 Nov 2008 08:03:30 +0000</pubDate>
				<category><![CDATA[Embedded]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[netbook]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://blog.richliu.com/?p=648</guid>

					<description><![CDATA[<p>原文在 http://linuxdevices.com/news/NS9527593286.html 節錄如下 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2008/11/21/648/%e6%96%b0%e8%81%9e%e6%83%b3%e6%b3%95-ubuntu-announces-arm-port/">[新聞][想法] Ubuntu announces ARM port</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>原文在 http://linuxdevices.com/news/NS9527593286.html<br />
節錄如下:</p>
<blockquote><p><span style="font-size: small; font-family: Arial,Helvetica;">Canonical announced it will port Ubuntu Desktop Linux to the ARMv7 architecture. Targeted at netbooks, the Ubuntu ARM distribution could set the stage for Intel to lose the &#8220;software advantage&#8221; that has enabled x86 to shrug off attacks from other architectures for the last 30 years.</span></p></blockquote>
<p>沒有想到 ARM netbook 來的這麼快, OLPC 的構想, eeePC 的成功, 到現在 Linux Desktop 可以殺出重圍, 在 Windows XP 的環境下, 取得些許市佔率, 靠 netbook 取得一席之地, 這是眾人並未預期的.</p>
<p>ARMv7 架構的 Cortex-A 系列 CPU 應該是可以達到 netbook 低標的 CPU , 有著可以接受的效能, 可以接受的 NEON(MMX like) 的 SIMD 系統, 用軟體可以撥 HD 影片. 而眾家 2D/3D Engine 其實也很成熟了, 所以從市場的角度看. Netbook 的出現其實是讓 Embedded System 往上去吃原本 Desktop 的市場. ARM 選擇 Canonical 的 ubuntu 應該是看上市佔率高, Desktop 整合度高. 雖然 Debian 早就有 ARM 套件, 但是商業運作上還是不如 Canonical , Desktop 整合度看起來也不夠好.</p>
<p>Ubuntu ARM 版本會基於 Cortex-A 系列 CPU 發行, 未來會考慮 ARMv6(ARM11 系列), ARMv5(ARM9 系列)指令集. 不過我想應該 Cortex 弄完了以後, 其他平台並不是太大的問題.</p>
<p>這一塊並不是 Microsoft 不想染指, 而是心有餘而力不足. MCE 的出現不就是 Microsoft 進入客廳的試腳石, 除了高級用戶外, 似乎並沒有看到 MCE 在太多家庭出現. 至少我去別人家沒有看過, 我自己家也沒有, 說不定明年發消費券之後, 我會考慮去弄一台 MCE + HTPC 弄個可以播的系統出來. 我現在的客廳的電腦播 H.264 有點吃力(Pentium4 2.0G). 但是接下來能, Microsoft 能用 Windows CE 去吃這一塊嗎? 至少目前沒有看到這樣的可能性.</p>
<p>我在想, 如果未來 ubuntu 堪用以後, 是不是 Linux Desktop 會大大方方的走入 Home Digital 的市場<br />
像是 MID 手持系統, 或是 Tivo 這種錄影機, 甚至是 BT Download, 結合 bt movie download, 也有可能開拓隨選即播的市場.</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2008/11/21/648/%e6%96%b0%e8%81%9e%e6%83%b3%e6%b3%95-ubuntu-announces-arm-port/">[新聞][想法] Ubuntu announces ARM port</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.richliu.com/2008/11/21/648/%e6%96%b0%e8%81%9e%e6%83%b3%e6%b3%95-ubuntu-announces-arm-port/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>[新聞][想法] Google 瀏覽器引擎可在 ARM 平台執行.</title>
		<link>https://blog.richliu.com/2008/10/30/623/%e6%96%b0%e8%81%9e%e6%83%b3%e6%b3%95-google-%e7%80%8f%e8%a6%bd%e5%99%a8%e5%bc%95%e6%93%8e%e5%8f%af%e5%9c%a8-arm-%e5%b9%b3%e5%8f%b0%e5%9f%b7%e8%a1%8c/</link>
					<comments>https://blog.richliu.com/2008/10/30/623/%e6%96%b0%e8%81%9e%e6%83%b3%e6%b3%95-google-%e7%80%8f%e8%a6%bd%e5%99%a8%e5%bc%95%e6%93%8e%e5%8f%af%e5%9c%a8-arm-%e5%b9%b3%e5%8f%b0%e5%9f%b7%e8%a1%8c/#comments</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Thu, 30 Oct 2008 03:30:12 +0000</pubDate>
				<category><![CDATA[Embedded]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[Google]]></category>
		<guid isPermaLink="false">http://blog.richliu.com/?p=623</guid>

					<description><![CDATA[<p>原文在 EETIME Google&#8217;s browser engine running on ARM [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2008/10/30/623/%e6%96%b0%e8%81%9e%e6%83%b3%e6%b3%95-google-%e7%80%8f%e8%a6%bd%e5%99%a8%e5%bc%95%e6%93%8e%e5%8f%af%e5%9c%a8-arm-%e5%b9%b3%e5%8f%b0%e5%9f%b7%e8%a1%8c/">[新聞][想法] Google 瀏覽器引擎可在 ARM 平台執行.</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a title="Google Chrome (by richliu(有錢劉))" href="http://flickr.com/photos/richliu_tw/2985326335/" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignleft" title="Google Chrome (by richliu(有錢劉))" src="http://farm4.static.flickr.com/3002/2985326335_130684fcdd_m.jpg" alt="Google Chrome (by richliu(有錢劉))" width="125" height="144" /></a>原文在 EETIME <a href="http://www.eetimes.com/showArticle.jhtml?articleID=210300117" target="_blank" rel="noopener"><span class="storyheadline">Google&#8217;s browser engine running on ARM</span></a></p>
<p>節錄內文如下</p>
<blockquote><p>Google has ported a core part of its new browser to the ARM processor as well as to the x86. Google co-founder Sergey Brin said all or parts of the new <a href="http://www.google.com/chrome" target="_blank" rel="noopener">Chrome browser</a> could be available for mobile devices such as cellphones within a few months.</p></blockquote>
<p>個人的想法是, 果然 Google Browser 是想取代 OS 做成桌面平台, 目前 Mobile Phone 幾乎都是 ARM chip 的天下, 現在<span style="color: #0000ff;">連桌機(Desktop Mobile Phone)都有可能用 ARM, 以後還有 MID, 低價 NetBook</span> . 等等..<br />
拉回來看, 至少 iPhone 內用的是 ARM11 620Mhz 的 CPU. 別忘了還有 Android 哦. PC 市場打不過 Microsoft , 但是 Embedded 市場就難說, 至少 Embedded System 的市場非 Microsoft 還是佔大宗, 主要還是價格因素.</p>
<p>延續之前的話題, 為什麼不是 Wintel 的組合呢? 在 Embedded System 的市場, 價格決定一切呀, Wintel 平台我猜光 License + Hardware 目標價在 US$40. ARM 平台大概是 US$20. 雖然效能不如 ATOM, 但是從手機的評價看起來, ARM 平台不會差到那邊去, 但是價格只有一半, 或是更低.</p>
<p>不過大家看了這麼久, 會有一個問題, 為什麼不是 MIPS 呢? 話說 MIPS 這家公司似乎營運不太好. ARM 還是大宗, 所以 Porting 本來就是要找市佔率大的呀..</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2008/10/30/623/%e6%96%b0%e8%81%9e%e6%83%b3%e6%b3%95-google-%e7%80%8f%e8%a6%bd%e5%99%a8%e5%bc%95%e6%93%8e%e5%8f%af%e5%9c%a8-arm-%e5%b9%b3%e5%8f%b0%e5%9f%b7%e8%a1%8c/">[新聞][想法] Google 瀏覽器引擎可在 ARM 平台執行.</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.richliu.com/2008/10/30/623/%e6%96%b0%e8%81%9e%e6%83%b3%e6%b3%95-google-%e7%80%8f%e8%a6%bd%e5%99%a8%e5%bc%95%e6%93%8e%e5%8f%af%e5%9c%a8-arm-%e5%b9%b3%e5%8f%b0%e5%9f%b7%e8%a1%8c/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>[新聞][想法] ARM想進入迷你筆電市場</title>
		<link>https://blog.richliu.com/2008/10/16/609/%e6%96%b0%e8%81%9e%e6%83%b3%e6%b3%95-arm%e6%83%b3%e9%80%b2%e5%85%a5%e8%bf%b7%e4%bd%a0%e7%ad%86%e9%9b%bb%e5%b8%82%e5%a0%b4/</link>
					<comments>https://blog.richliu.com/2008/10/16/609/%e6%96%b0%e8%81%9e%e6%83%b3%e6%b3%95-arm%e6%83%b3%e9%80%b2%e5%85%a5%e8%bf%b7%e4%bd%a0%e7%ad%86%e9%9b%bb%e5%b8%82%e5%a0%b4/#comments</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Thu, 16 Oct 2008 06:56:56 +0000</pubDate>
				<category><![CDATA[Embedded]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[工作]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[netbook]]></category>
		<category><![CDATA[zdnet]]></category>
		<category><![CDATA[新聞]]></category>
		<guid isPermaLink="false">http://blog.richliu.com/2008/10/16/609/</guid>

					<description><![CDATA[<p>其實進入 Netbook 這個市場, 對 ARM 來說應該不是這麼難, 現在 ARM CPU 的 Perfor [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2008/10/16/609/%e6%96%b0%e8%81%9e%e6%83%b3%e6%b3%95-arm%e6%83%b3%e9%80%b2%e5%85%a5%e8%bf%b7%e4%bd%a0%e7%ad%86%e9%9b%bb%e5%b8%82%e5%a0%b4/">[新聞][想法] ARM想進入迷你筆電市場</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p> 其實進入 Netbook 這個市場, 對 ARM 來說應該不是這麼難, 現在 ARM CPU 的 Performance 不比當年了, 重點是價格相對於ATOM 的系統會便宜很多.<br />
搭配 ARM 的公司幾乎都是做 SoC. 成本還比 ATOM 低.<br />
至於效能嘛, 當然還是差了一點, 不過買 Netbook 的人會很在意效能嗎?</p>
<p>以目前我們在規劃的產品來說, ARM11 MPCore, PCIe, SATA, Gigabit Nic , LCD Control, 2D/3D 加速引擊, 己經具備了低階 Netbook 所需的元素, 問題就在於, 怎麼樣整合 Linux 進來用.  要和誰合作?</p>
<p>而市場目標是什麼, 投票用 Linux, 教學用, 還是家用多媒體環境呢?<br />
像 ARM 都是客制化市場, 或許出可以放 FullHD 的類 eeeBox 也不是不可能.<br />
而成本還更低, 因為內建 H.264 decoder engine.</p>
<p>至於 ARM 和 Microsoft 合作執行 Windows XP, 我個人則是認為這還要一段時間, 畢竟不僅僅是換 CPU 而己, 很多 Driver , 人員訓練, SoC 的選用, 都是問題. 不像是 Linux, 只要是有 ARM solution, 幾乎都有 Linux 的 driver, 差別就在有沒有整合進 Linux kernel main tree 和 open source 了.</p>
<p>問題還是在於, 市場對於這樣產品的接受度如何? 畢竟搭載龍芯(Dragon)的 Netbook 早就現身了, 但是一直都沒有大賣的訊息出來. 到底是從 Dragon MIPs CPU 的效能太差呢? 還是整合的 Linux Package 不實用? 這些都是 ARM 進入這個市場需要面對的.</p>
<p>不過我個人是樂觀其成, 畢竟 PC 市場己經非效能導向, 而是從高階到低階都有市場, 說不定下一次就是我們家的產品跟著上, 運氣好的話說不定會有我們家產品做的 Netbook :p</p>
<p>原文節錄如下.</p>
<p><span id="more-609"></span></p>
<p><a href="http://www.zdnet.com.tw/news/ce/0,2000085674,20132477,00.htm?feed=RSS:+CNET%A5x%C6W+-+%B3%CC%B7s20%ABh%B7s%BBD" target="_blank" rel="noopener">ARM想進入迷你筆電市場</a></p>
<p><cite>ZDNET新聞專區：曠文溱</cite> <cite>2008/10/15 22:26:02</cite></p>
<p>明（09）年的Computex展，就會看到數款搭載ARM架構處理器的迷你筆電（Netbook），該公司高層指出。</p>
<p>搶在IDF即將於下週一（10/20）在台北舉辦之前，近年來因為英特爾宣佈行動網路裝置（MID）計畫，而有點懷恨在心的ARM，今（15）日在台宣佈即將攻進英特爾已經開花結果的Netbook。</p>
<p>該公司表示從去（07）年中的Computex，ARM就積極與ODM/OEM大廠，以及軟體業者洽談，進行產品的相容性測試，成果即將在明年揭曉。</p>
<p>「ARM的陣容龐大（指合作伙伴數），勢必具有成本優勢；單晶片設計可以增加電池續航力；在高畫質影音表現上遠勝過英特爾的Atom，」ARM行動運算總監Bob Morris洋洋灑灑列出該公司的勝出點。</p>
<p>不 過，<font color="#ff0000">軟體支援性恐怕會是ARM的痛腳之一</font>。Netbook和手持裝置的使用行為終究不一樣，消費者要的是和在電腦上不無二致的使用經驗。雖然在手機市場獨 占鼇頭多年，但是能否把所有在電腦上運行的軟體搬移到ARM架構上，舉例而言，微軟的Windows XP作業系統，就是ARM必須要準備的功夫。</p>
<p><font color="#ff0000">「ARM和微軟持續合作，」Morris說，「不過，還無法肯定支援Windows XP的ARM架構Netbook什麼時候會推出市場。」該公司初期將以Linux為主要支援對象。</font></p>
<p>原 本井水不犯河水的英特爾和ARM，從去年開始即開始產生市場互相侵輒的景況。起自於英特爾在去年秋季IDF上，宣佈新一代MID平台將採用一款名為 Silverthorne的晶片。暗批傳統採用ARM晶片的手機在連網時總讓使用者受挫，表將以運算性能更為強大、也有更多軟體支援的x86處理器進軍手 持裝置市場。</p>
<p>英特爾一放話，立刻惹惱過去並未大肆宣傳，一向隱身在所有手機之內的ARM。ARM反唇相譏搭載英特爾處理器的UMPC或者MID，不過就是規格比較爛的電腦。</p>
<p>「ARM不會特別要劃出一個市場、歸類一個產品類別叫做MID，ARM是要讓手持裝置擁有連網能力，」Morris說。</p>
<p>MID不過是第一波戰火。眼看Netbook市場已成為筆記型電腦市場主要成長動能，ARM也躍躍欲試。雖然該公司尚無法揭露合作伙伴，但已表現信心滿滿。</p>
<p>Morris引用研究機構ABI Research的數據，指出從明年至2013年全球Netbook市場，採用ARM架構的系統出貨量，將從393萬台成長至2366萬台；於此同時，x86架構的平台出貨量，由1062萬台增長至3550萬台。</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2008/10/16/609/%e6%96%b0%e8%81%9e%e6%83%b3%e6%b3%95-arm%e6%83%b3%e9%80%b2%e5%85%a5%e8%bf%b7%e4%bd%a0%e7%ad%86%e9%9b%bb%e5%b8%82%e5%a0%b4/">[新聞][想法] ARM想進入迷你筆電市場</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.richliu.com/2008/10/16/609/%e6%96%b0%e8%81%9e%e6%83%b3%e6%b3%95-arm%e6%83%b3%e9%80%b2%e5%85%a5%e8%bf%b7%e4%bd%a0%e7%ad%86%e9%9b%bb%e5%b8%82%e5%a0%b4/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
		<item>
		<title>[ARM] chroot 出現 Message &#8220;Illegal Instruction&#8221;</title>
		<link>https://blog.richliu.com/2008/02/21/558/arm-chroot-%e5%87%ba%e7%8f%be-message-illegal-instruction/</link>
					<comments>https://blog.richliu.com/2008/02/21/558/arm-chroot-%e5%87%ba%e7%8f%be-message-illegal-instruction/#comments</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Thu, 21 Feb 2008 12:45:21 +0000</pubDate>
				<category><![CDATA[Embedded]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[kernel]]></category>
		<guid isPermaLink="false">http://blog.richliu.com/2008/02/21/558/</guid>

					<description><![CDATA[<p>記錄一下, 不僅僅是 chroot 以外, 如果執行任何程式有 &#8220;Illegal Instruct [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2008/02/21/558/arm-chroot-%e5%87%ba%e7%8f%be-message-illegal-instruction/">[ARM] chroot 出現 Message &#8220;Illegal Instruction&#8221;</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>記錄一下,</p>
<p>不僅僅是 chroot 以外, 如果執行任何程式有 &#8220;Illegal Instruction&#8221; 時, 記得將 kernel 的 NWFPE 選項 enable.</p>
<p>The post <a rel="nofollow" href="https://blog.richliu.com/2008/02/21/558/arm-chroot-%e5%87%ba%e7%8f%be-message-illegal-instruction/">[ARM] chroot 出現 Message &#8220;Illegal Instruction&#8221;</a> appeared first on <a rel="nofollow" href="https://blog.richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.richliu.com/2008/02/21/558/arm-chroot-%e5%87%ba%e7%8f%be-message-illegal-instruction/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
