Created
January 25, 2013 07:40
-
-
Save ma34s/4632559 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//---------------------------------------------------------------- | |
//ログ入れたコード | |
int exynos_smc_read_oemflag(u32 ctrl_word, u32 *val) | |
{ | |
#if 1 | |
register u32 reg0 __asm__("r0"); | |
register u32 reg1 __asm__("r1"); | |
register u32 reg2 __asm__("r2"); | |
register u32 reg3 __asm__("r3"); | |
u32 idx = 0; | |
for (idx = 0; reg2 != ctrl_word; idx++) { | |
reg0 = -202; | |
reg1 = 1; | |
reg2 = idx; | |
LOG(KERN_INFO "[%s:sta] %x %x %x %x ", __func__,reg0,reg1,reg2,reg3 ); | |
__asm__ volatile ("smc 0\n":"+r" (reg0), "+r"(reg1), | |
"+r"(reg2), "+r"(reg3) | |
); | |
LOG(KERN_INFO "[%s:end] %x %x %x %x ", __func__,reg0,reg1,reg2,reg3 ); | |
if (reg1) | |
return -1; | |
} | |
reg0 = -202; | |
reg1 = 1; | |
reg2 = idx; | |
LOG(KERN_INFO "[%s:sta] %x %x %x %x ", __func__,reg0,reg1,reg2,reg3 ); | |
__asm__ volatile ("smc 0\n":"+r" (reg0), "+r"(reg1), "+r"(reg2), | |
"+r"(reg3) | |
); | |
LOG(KERN_INFO "[%s:end] %x %x %x %x ", __func__,reg0,reg1,reg2,reg3 ); | |
if (reg1) | |
return -1; | |
*val = reg2; | |
#else | |
*val = 0; | |
#endif | |
return 0; | |
} | |
//---------------------------------------------------------------- | |
// 出力 | |
/* | |
<6>System has 4 CPU's, we are on CPU #0 | |
<6> Binding this process to CPU #0. | |
<6> active mask is 1, setting it to mask=1 | |
<6>And now we are on CPU #0 | |
<6>get_fuse | |
<6>[exynos_smc_read_oemflag:sta] ffffff36 1 0 0 | |
<6>[exynos_smc_read_oemflag:end] 0 2f31000 1 0 | |
<6>System has 4 CPU's, we are on CPU #0 | |
<6> Binding this process to CPU #0. | |
<6> active mask is 1, setting it to mask=f | |
<6>And now we are on CPU #0 | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
これの21行目でreg=0x2f31000 なのでretuenしてるようだ・・・