RE: [Fastboot] [PATCH]IA64 kexec/kdump patch for INIT

Zou, Nanhai
2006-09-08T01:20:01Z

> -----Original Message-----
> From: linux-ia64-owner@vger.kernel.org
> [mailto:linux-ia64-owner@vger.kernel.org] On Behalf Of Takao Indoh
> Sent: 2006Äê9ÔÂ7ÈÕ 22:49
> To: Yu, Luming
> Cc: fastboot@lists.osdl.org; Keith Owens; linux-ia64@vger.kernel.org
> Subject: RE: [Fastboot] [PATCH]IA64 kexec/kdump patch for INIT
>
> On Thu, 7 Sep 2006 21:01:17 +0800, "Yu, Luming" wrote:
>
> >>>Did saved Os gp in SAL OS state somehow get overridden before
> >>>ia64_set_kernel_registers prior to invocation of ia64_init_handler?
> >>>
> >>>I assume the following code (in ia64_set_kernel_registers )
> >>should restore
> >>>correct GP value.
> >>>
> >>>ia64_set_kernel_registers:
> >>> ...
> >>> ;;
> >>> ld8 r1=[temp4] // OS GP from SAL OS state
> >>
> >>Yes, but this gp value is physical address.
> >>In the next line, gp is changed to virtual address.
> >>
> >>DATA_PA_TO_VA(r1,temp1)
> >>
> >>This macro just sets region7 bit, so gp value becomes region7 address.
> >
> >Ok, could you please confirm what is the value of r1 before
> >DATA_PA_TO_VA(r1, temp1)?
> >I guess we need to set r1 = __gp in ia64_set_kernel_registers.
> >If not, this is a bug. Am I right?
>
> In the ia64_mca_init, the value of ia64_tpa(ia64_getreg(_IA64_REG_GP)
> is registered as gp value. When cpu comes into the above code, r1 is set
> to this value, I think. Therefore, r1 has physical address of __gp
> before DATA_PA_TO_VA(r1, temp1). How do you think?
>
> I think you are right, I also think r1 has to be set to __gp before
> calling ia64_init_handler.
>
Yes, I agree GP should be set to __gp before calling into ia64_init_handler, not only the region issue.
E.g. If an OS_INIT happen in the context of a module, the GP value could be point to the modules GP.

Thanks
Zou Nan hai

> Regards,
> Takao Indoh
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html