register initialization error on test9 ?
Hi,
there seems to be a register initialization error on test9 kernel.
arch/ia64/kernel/head.S renamed from arch/ia64/kernel/head.S.org +2 -4
@@ -73,15 +73,13 @@ mov ar.fpsr=r2 ;; -#ifdef CONFIG_IA64_EARLY_PRINTK - mov r2=6 - mov r3=(8<<8) | (28<<2) + movl r2=6<<61 + mov r3=(6<<8) | (28<<2) ;; mov rr[r2]=r3 ;; srlz.i ;; -#endif #define isAP p2 // are we booting an Application Processor (not the BSP)?
----------------
In the original code, RR[0] is initialized instead of RR[6]. I don't know whether the RID value should be 8 or 6, but it is later re-initialized to 6 in ia64_rid_init().
And, this initialization should be done for all application processors (APs) even if CONFIG_IA64_EARLY_PRINTK is not defined, because RR[6] is used for translation when printk() is called by AP.
When AP calls printk(), writes to VGA region (0xc0000000000bxxxx) is occured because console_drivers is already initialized by BSP.
Is this right ?
I don't know the detail of address translation.
--
Hiro Fujita
Hitachi, Ltd.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Hiro Fujita
Hiro> And, this initialization should be done for all application Hiro> processors (APs) even if CONFIG_IA64_EARLY_PRINTK is not Hiro> defined, because RR[6] is used for translation when printk() Hiro> is called by AP.
No, printk normally doesn't write to the console until the memory subsystem (and PCI) has been initialized, so this code isn't needed unless EARLY_PRINTK is set.
Aside from that, your patch looks fine.
Thanks,
--david