Re: [U-Boot] [PATCH 3/4] powerpc/85xx:Update NOR code base to support debugger

2012-03-12 Thread Prabhakar Kushwaha

Hi Wolfgang,

On Wednesday 07 March 2012 05:35 PM, Wolfgang Denk wrote:

Dear Prabhakar Kushwaha,

In message<4f56deb0.6060...@freescale.com>  you wrote:

+   _mas0 = MAS0_TLBSEL(1) |
+   MAS0_ESEL(CONFIG_DEBUGGER_TEMP_TLB);

You are using an undocumented CONFIG_ option here.

This CONFIG_ is defined as part of documentation patch sent in this series

CONFIG_ options must be documented in the README.


Sure


+#if defined(CONFIG_E500_V1_V2)&&   !defined(CONFIG_SYS_RAMBOOT)

What if no such debug support is needed, and code size hurts?

sure it will. I agree with you.
But this piece of code overcome debug restriction of e500 and e500v2
cores and  I think fixing restriction is a good way to go.

What do we do to disable this code if no debug support is needed, and
the code size is considered critical?


i will put this piece of code  under #if defined 
(CONFIG_DEBUGGER_TEMP_TLB).
This piece of code will only be enabled when someone wants debugging 
here. And the requirement is temporary TLB.



+#define CONFIG_DEBUGGER_TEMP_TLB   3

Undocumented!


This CONFIG_ is defined as part of documentation patch sent in this series

This is not sufficient, see above.


i will add the description.

Regards,
Prabhakar




___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/4] powerpc/85xx:Update NOR code base to support debugger

2012-03-07 Thread Wolfgang Denk
Dear Prabhakar Kushwaha,

In message <4f56deb0.6060...@freescale.com> you wrote:
> 
> >> +  _mas0 = MAS0_TLBSEL(1) |
> >> +  MAS0_ESEL(CONFIG_DEBUGGER_TEMP_TLB);
> > You are using an undocumented CONFIG_ option here.
> 
> This CONFIG_ is defined as part of documentation patch sent in this series

CONFIG_ options must be documented in the README.

> >> +#if defined(CONFIG_E500_V1_V2)&&  !defined(CONFIG_SYS_RAMBOOT)
> > What if no such debug support is needed, and code size hurts?
> 
> sure it will. I agree with you.
> But this piece of code overcome debug restriction of e500 and e500v2 
> cores and  I think fixing restriction is a good way to go.

What do we do to disable this code if no debug support is needed, and
the code size is considered critical?

> >> +#define CONFIG_DEBUGGER_TEMP_TLB  3
> > Undocumented!
> >
> This CONFIG_ is defined as part of documentation patch sent in this series

This is not sufficient, see above.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Virtue is a relative term.
-- Spock, "Friday's Child", stardate 3499.1
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/4] powerpc/85xx:Update NOR code base to support debugger

2012-03-06 Thread Prabhakar Kushwaha

Hi Wolfgang,

On Tuesday 06 March 2012 08:15 PM, Wolfgang Denk wrote:

Dear Prabhakar Kushwaha,

In message<1329296055-28541-1-git-send-email-prabha...@freescale.com>  you 
wrote:

Update the NOR code base to support NOR-boot debugging.
It ovecome e500 and e500v2's second limitation i.e. IVPR + IVOR15 should be
valid fetchable OP code address.

While executing in translated space (AS=1), whenever a debug exception is
generated, the MSR[DS/IS] gets cleared and the processor tries to fetch an
instruction from the debug exception vector (IVPR|IVOR15); since now we are in
AS=0, the application needs to ensure the proper configuration to have
IVOR|IVOR15 accessible from AS=0 also.

Signed-off-by: Radu Lazarescu
Signed-off-by: Prabhakar Kushwaha

...

+   _mas0 = MAS0_TLBSEL(1) |
+   MAS0_ESEL(CONFIG_DEBUGGER_TEMP_TLB);

You are using an undocumented CONFIG_ option here.


This CONFIG_ is defined as part of documentation patch sent in this series



+++ b/arch/powerpc/cpu/mpc85xx/start.S
@@ -184,6 +184,48 @@ l2_disabled:
andi.   r1,r3,L1CSR0_DCE@l
beq 2b

+#if defined(CONFIG_E500_V1_V2)&&  !defined(CONFIG_SYS_RAMBOOT)

What if no such debug support is needed, and code size hurts?



sure it will. I agree with you.
But this piece of code overcome debug restriction of e500 and e500v2 
cores and  I think fixing restriction is a good way to go.




@@ -107,6 +107,7 @@
  #define CONFIG_MAX_CPUS   1
  #define CONFIG_FSL_SDHC_V2_3
  #define CONFIG_SYS_FSL_NUM_LAWS   12
+#define CONFIG_DEBUGGER_TEMP_TLB   3

Undocumented!


This CONFIG_ is defined as part of documentation patch sent in this series

--Prabhakar


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/4] powerpc/85xx:Update NOR code base to support debugger

2012-03-06 Thread Wolfgang Denk
Dear Prabhakar Kushwaha,

In message <1329296055-28541-1-git-send-email-prabha...@freescale.com> you 
wrote:
> Update the NOR code base to support NOR-boot debugging.
> It ovecome e500 and e500v2's second limitation i.e. IVPR + IVOR15 should be
> valid fetchable OP code address.
> 
> While executing in translated space (AS=1), whenever a debug exception is
> generated, the MSR[DS/IS] gets cleared and the processor tries to fetch an
> instruction from the debug exception vector (IVPR|IVOR15); since now we are in
> AS=0, the application needs to ensure the proper configuration to have
> IVOR|IVOR15 accessible from AS=0 also.
> 
> Signed-off-by: Radu Lazarescu 
> Signed-off-by: Prabhakar Kushwaha 
...
> + _mas0 = MAS0_TLBSEL(1) |
> + MAS0_ESEL(CONFIG_DEBUGGER_TEMP_TLB);

You are using an undocumented CONFIG_ option here.

> +++ b/arch/powerpc/cpu/mpc85xx/start.S
> @@ -184,6 +184,48 @@ l2_disabled:
>   andi.   r1,r3,L1CSR0_DCE@l
>   beq 2b
>  
> +#if defined(CONFIG_E500_V1_V2) && !defined(CONFIG_SYS_RAMBOOT)

What if no such debug support is needed, and code size hurts?


> @@ -107,6 +107,7 @@
>  #define CONFIG_MAX_CPUS  1
>  #define CONFIG_FSL_SDHC_V2_3
>  #define CONFIG_SYS_FSL_NUM_LAWS  12
> +#define CONFIG_DEBUGGER_TEMP_TLB 3

Undocumented!

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
If at first you don't succeed, you are running about average.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot