RASPBERRY PI 2既R9在LINUX KERNEL是拿來做其麼呢?

剛剛睇U-BOOT (U-BOOT都係LINUX改出 0黎)既SOURCE CODE
我見到佢個BUILD PROCESS指明唔要改R9.

呢點令我奇怪。
跟住SEARCH ARM 既CALLING CONVENTION。
發現佢係PLATFORM INDEPENDENT。

Platform register.
The meaning of this register is defined by the platform standard.
The role of register r9 is platform specific. A virtual platform may assign any role to this register and must document this usage. For example, it may designate it as the static base (SB) in a position-independent data model, or it may designate it as the thread register (TR) in an environment with thread-local storage. The usage of this register may require that the value held is persistent across all calls. A virtual platform that has no need for such a special register may designate r9 as an additional callee-saved variable register, v6.

咁佢奇實係拿來做其麼呢?
有無人玩過LINUX SOURCE CODE?
COMPILE LINUX KERNEL都會是這樣嗎?
請分享一下。。

謝。

嘩, 乜玩到咁深入, 連 uboot src 都睇埋,
有 uboot src, com 到 work 到, 已經阿里吉帝,
都話 platform specific, 咁佢要點就點,
搞佢做乜
arm 啲 kernel src, patched 得好緊要,
有啲廠家好耐先放 src 出嚟, apu 就更加唔洗講,
冇乜影, 抵被 intel 打死

TOP

本帖最後由 dsscss 於 2015-9-27 15:47 編輯

回覆 2# cal22cal

原來R9係專係放struct global_data (gd_t)既ADDRESS.
gd_t係u-boot專用 0黎 pass initialized board configuration 落去下一個STAGE.

網上SEARCH gd_t同R9的關係,
原來本身gd_t係放 0係 R8的.
所以網上有D文章會講U-BOOT gd_t 係放 0係 R8.
但實際上已OUTDATED.
(因為關於calling convention standard, 所以係AUG 2013 改做用R9而唔用R8.)
http://lists.denx.de/pipermail/u-boot/2013-August/160604.html

gd_t 係用 0黎 PASS CONFIGURATION 落去另一個LOADER PROCESS

若果啟動LINUX KERNEL,
需要PASS ATAG LIST落LINUX KERNEL.
而ATAG LIST就係由gd_t GEN出 0黎

若果係U-BOOT的SPL (Secondary Program Loader),
就咁單純PASS落去U-BOOT的SPL ENTRY POINT.

TOP

我係唔識嘅
不過 op 用咗咁多時間睇 doc, 不如寫個 guide 出嚟,
話唔定, 有啲大佬有用, 交流交流

TOP