linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* RE: BDI2000 PTEs
@ 2001-11-28  4:51 Rudolf Ladyzhenskii
  2001-11-28  6:19 ` Dan Malek
  0 siblings, 1 reply; 5+ messages in thread
From: Rudolf Ladyzhenskii @ 2001-11-28  4:51 UTC (permalink / raw)
  To: 'Dan Malek', Rudolf Ladyzhenskii
  Cc: 'linuxppc-embedded@lists.linuxppc.org'


Thanks for reply, Dan

>
> Rudolf Ladyzhenskii wrote:
>
> > ..... At the moment I have memory translation enabled in BDI2000.
> > PTBASE is set to 0xf0 and this entry is cleared.
>
> That's not correct.

>
> > .... This works for kernel
> > debugging, but memory translation fails when I try to do
> dynamically loaded
> > module debugging.

All I need for kernel debugging is BAT only translation. I cleared it
according to BDI2000 manual.


> > I guess I have to set PTE pointers for BDI2000.
>
> No, you don't.  Just use a newer kernel that has this feature
> available for
> all processors.  You could also copy the couple of lines of
> code from a
> newer kernel into your 2.4.4 if you insist.
>
I looked at 2.4.14 kernel. It only has BDI2000 support in file
/arch/ppc/kernel/head_8xx.S
8260 uses different file. I searched that for traces of Abatron or BDI2000
without success.
I also downloaded ppc patch for 2.4.14. Same: no trace of "abatron" or
BDI2000 there.

Which lines do I have to add?

Thanks,
Rudolf

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread
* RE: BDI2000 PTEs
@ 2001-11-29  0:35 Rudolf Ladyzhenskii
  0 siblings, 0 replies; 5+ messages in thread
From: Rudolf Ladyzhenskii @ 2001-11-29  0:35 UTC (permalink / raw)
  To: 'Dan Malek ', Rudolf Ladyzhenskii
  Cc: ''linuxppc-embedded@lists.linuxppc.org' '


 Thanks a lot, Dan,

It is working now.

The only thing you omitted is allocation of abatro_pteptrs variable.
In same file following has to be added as well:

After lines
cmd_line:
    .space 512

Add following:

/* Room for two PTE table poiners, usually the kernel and current user
 * pointer to their respective root page table (pgdir).
 */
abatron_pteptrs:
        .space  8


Rudolf

-----Original Message-----
From: Dan Malek
To: Rudolf Ladyzhenskii
Cc: 'linuxppc-embedded@lists.linuxppc.org'
Sent: 11/28/01 5:19 PM
Subject: Re: BDI2000 PTEs


Rudolf Ladyzhenskii wrote:


> All I need for kernel debugging is BAT only translation. I cleared it
> according to BDI2000 manual.

Ummm....I think you need more than that for debugging loadable modules.
The BAT translation won't work for loadable modules, you have to find
all of their code and data through page tables.

> I looked at 2.4.14 kernel. It only has BDI2000 support in file
> /arch/ppc/kernel/head_8xx.S

Well hell....I wonder why they were never updated in 2.4.14.  Take
a look at the PowerPC development kernels, then.

> Which lines do I have to add?

Add this right after the 'bl load_up_mmu':


        /* Add helper information for the Abatron bdiGDB debugger.
         * We do this here because we know the mmu is disabled, and
         * will be enabled for real in just a few instructions.
         */
        lis     r5, abatron_pteptrs@h
        ori     r5, r5, abatron_pteptrs@l
        stw     r5, 0xf0(r0)    /* This much match your Abatron config
*/
        lis     r6, swapper_pg_dir@h
        ori     r6, r6, swapper_pg_dir@l
        tophys(r5, r5)
        stw     r6, 0(r5)


Good Luck.


	-- Dan


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread
* BDI2000 PTEs
@ 2001-11-28  3:49 Rudolf Ladyzhenskii
  2001-11-28  4:28 ` Dan Malek
  0 siblings, 1 reply; 5+ messages in thread
From: Rudolf Ladyzhenskii @ 2001-11-28  3:49 UTC (permalink / raw)
  To: 'linuxppc-embedded@lists.linuxppc.org'


Hi, all

I am trying to do module debugging. Module is loaded atvirtual address
0xC500004C. At the moment I have memory translation enabled in BDI2000.
PTBASE is set to 0xf0 and this entry is cleared. This works for kernel
debugging, but memory translation fails when I try to do dynamically loaded
module debugging.
I guess I have to set PTE pointers for BDI2000.

First I put value 0xC00000F4 into physical address 0xF0 (BDI2000 PTBASE).

>From Linux Jernel Book, I understood that PTE pointer is at variable called
"swapper_pg_dir". I tried to write its address into BDI2000 PTE kernel
pointer (physical address 0xF4).

Does not work.
I think that PTEs have to updated dynamically, but I have no ideas where to
get them from.

Can anyone explain how to get the values for the PTE kernel and user
pointers?

I am using kernel 2.4.4. I looked at the later kernels that have BDI2000
support. Unfortunately, support is only 8xx CPUs, not 8260. (I looked into
files /arch/ppc/head.S. and /arch/ppc/head_8xx.S). It is difficult for me to
update corresponding 8260 code mainly because I am not sure what this code
does and I am not very familiar with PPC assembly.

Any help is appreciated,
Thanks.

Rudolf


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-11-29  0:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-28  4:51 BDI2000 PTEs Rudolf Ladyzhenskii
2001-11-28  6:19 ` Dan Malek
  -- strict thread matches above, loose matches on Subject: below --
2001-11-29  0:35 Rudolf Ladyzhenskii
2001-11-28  3:49 Rudolf Ladyzhenskii
2001-11-28  4:28 ` Dan Malek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).