__init void early_shadow_reg(unsigned long reg, unsigned int n) { int i; char ascii[11] = " 0x"; n = n / 4; reg = reg << ((8 - n) * 4); n += 3; for (i = 3; i <= n ; i++) { ascii[i] = hex_asc_lo(reg >> 28); reg <<= 4; } early_shadow_write(NULL, ascii, n); }
/* * since we can't use printk, dump numbers (as hex), n = # bits */ __init void early_shadow_reg(unsigned long reg, unsigned int n) { /* * can't use any "normal" kernel features, since thay * may not be relocated to their execute address yet */ int i; char ascii[11] = " 0x"; n = n / 4; reg = reg << ((8 - n) * 4); n += 3; for (i = 3; i <= n ; i++) { ascii[i] = hex_asc_lo(reg >> 28); reg <<= 4; } early_shadow_write(NULL, ascii, n); }