[[email protected]: Re: BDI and 85xx]
FYI - how does it look now?
----- Forwarded message from Edson Seabra <[email protected]> -----
From: Edson Seabra <[email protected]>
Date: Mon, 14 Nov 2005 12:11:19 -0800
To: "marcelo.tosatti" <[email protected]>
Subject: Re: BDI and 85xx
Hi, Marcelo.
I re-make the changes following the Dan suggestion.
Can you check if he will accept them this time ?
Thanks,
-Edson.
(See attached file: 8xx_gdb.diff)
Dan Malek <[email protected]> wrote on 11/07/2005 09:17:46 AM:
Quoted 19 lines · Marcelo Tosatti
Quoted 2 lines
Edson had to patch this in to get BDI to work on 85xx with 2.6.14.
How about we just change
MSR_KERNELandMSR_USER
in the include file #define instead of all of this run-time code? Or, change the code so it preserves DE in general, so we don't need a special kernel configuration just for the BDI?The original reason I did the
BDI_SWITCHwas due to the overhead of tracking user PTE switches in the context switch code. I don't like the way this has been overloaded to mean "BDI general operation." We should be able to attach a BDI2000 to any kernel configuration and always get kernel debugging capability. TheBDI_SWITCHwas to enable the extra feature (with some overhead) of debugging into user applications, it never should have affected any kernel debug operation.
Quoted 9 lines
It's unfortunate that Book-E is such a PITA for debuggers, but let's please find a better way of using these features. Separate kernel configurations to enable hardware debugging isn't acceptable.
Thanks.
-- Dan
----- End forwarded message -----
Quoted 1 line · Kumar Gala
It doesn't look very good since nothing appears to be attached :)
Doh my bad. Attached it is.
Makefile renamed from opt/montavista/pro/devkit/lsp/linux-2.6.14/Makefile +1 -1
@@ -524,7 +524,7 @@ endif ifdef CONFIG_DEBUG_INFO -CFLAGS += -g +CFLAGS += -g -ggdb endif include $(srctree)/arch/$(ARCH)/Makefile
asm-ppc/reg.h renamed from opt/montavista/pro/devkit/lsp/linux-2.6.14/include/asm-ppc/reg.h +4 -0
@@ -49,8 +49,12 @@#endif #ifndef MSR_KERNEL +#ifdef CONFIG_BDI_SWITCH +#define MSR_KERNEL (MSR_DE|MSR_ME|MSR_RI|MSR_IR|MSR_DR) +#else #define MSR_KERNEL (MSR_ME|MSR_RI|MSR_IR|MSR_DR)#endif +#endif #define MSR_USER (MSR_KERNEL|MSR_PR|MSR_EE)
It doesn't look very good since nothing appears to be attached :)
- kumar
Quoted 63 lines · Marcelo Tosatti
FYI - how does it look now?
----- Forwarded message from Edson Seabra
<[email protected]> -----From: Edson Seabra <[email protected]>
Date: Mon, 14 Nov 2005 12:11:19 -0800
To: "marcelo.tosatti" <[email protected]>
Subject: Re: BDI and 85xxHi, Marcelo.
I re-make the changes following the Dan suggestion.
Can you check if he will accept them this time ?
Thanks,
-Edson.(See attached file: 8xx_gdb.diff)
Dan Malek <[email protected]> wrote on 11/07/2005 09:17:46 AM:
Quoted 19 lines · Marcelo Tosatti
Quoted 2 lines
Edson had to patch this in to get BDI to work on 85xx with 2.6.14.
How about we just change
MSR_KERNELandMSR_USER
in the include file #define instead of all of this run-time code? Or, change the code so it preserves DE in general, so we don't need a special kernel configuration just for the BDI?The original reason I did the
BDI_SWITCHwas due to the overhead of tracking user PTE switches in the context switch code. I don't like the way this has been overloaded to mean "BDI general operation." We should be able to attach a BDI2000 to any kernel configuration and always get kernel debugging capability. TheBDI_SWITCHwas to enable the extra feature (with some overhead) of debugging into user applications, it never should have affected any kernel debug operation.Quoted 9 lines
It's unfortunate that Book-E is such a PITA for debuggers, but let's please find a better way of using these features. Separate kernel configurations to enable hardware debugging isn't acceptable.
Thanks.
-- Dan----- End forwarded message -----
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Quoted 4 lines · Marcelo Tosatti
Doh my bad. Attached it is.
<8xx_gdb.diff>
Well, this probably works for you but have you considered how it affects others?
I'm not going to get into the -ggdb flags discussion, since I know we've had that in the past. Why is this needed and should it be done for everyone?
Your update of MSR_KERNEL will work for you,
but won't work on anything that isn't a Book E processor. You can't make this a generic update to all processors. It will fail on everything that really wants to use the BDI_SWITCH configuration option as it was intended. The DE in Book E conflicts with BE in traditional PPC.
This also doesn't do anything to address my real concern, we shouldn't have to create a special kernel configuration just to attach a debugger .........
Thanks.
-- Dan
Quoted 15 lines · Dan Malek
Quoted 4 lines · Marcelo Tosatti
Doh my bad. Attached it is.
<8xx_gdb.diff>
Well, this probably works for you but have you considered how it affects others?
I'm not going to get into the -ggdb flags discussion, since I know we've had that in the past. Why is this needed and should it be done for everyone?
Quoted 6 lines
Your update of
MSR_KERNELwill work for you,
but won't work on anything that isn't a Book E processor. You can't make this a generic update to all processors. It will fail on everything that really wants to use theBDI_SWITCHconfiguration option as it was intended. The DE in Book E conflicts with BE in traditional PPC.
We should but this in asm-ppc/reg_booke.h since book-e has its own MSR_* defines.
Quoted 3 lines
This also doesn't do anything to address my real concern, we shouldn't have to create a special kernel configuration just to attach a debugger .........
I'm not 100% sure this is even possible on some of the book-e variants.
- kumar
Quoted 1 line · Kumar Gala
I'm not 100% sure this is even possible on some of the book-e variants.
I suspect we could if we didn't just keep whacking the MSR with some constant value :-) What happens if we just leave DE set all of the time? I know as part of ptrace, etc. it can get manipulated, but if we are debugging through COP we shouldn't get to these software functions.
-- Dan