Everhart, Glenn
From:	ultrajoe@my-dejanews.com
Sent:	Monday, August 10, 1998 8:50 PM
To:	gezelter@rlgsc.com; Info-VAX@Mvb.Saic.Com
Subject:	Re: Moving device driver to 7.1
Thanks to all who helped here.  I found my mistake.


> Here's the code to do the remapping:
>
> PHY_TO_SVAPTE::
>         .JSB_ENTRY PRESERVE=<R5,R9,R16,R17,R18,R19> ; note 1
>         EVAX_LDQ R16, UCB_L_PHYADDR(R5)             ; note 2
>         EVAX_SRL R16,G^MMG$GL_VPN_TO_VA,R16
>         EVAX_SLL R16,#PTE$V_PFN,R16                 ; note 3
>         EVAX_OR R16,#<PTE$M_ASM ! -
>                         PTE$M_KRE ! -
>                         PTE$M_KWE ! -
>                         PTE$M_ERE ! -
>                         PTE$M_EWE ! -
>                         PTE$M_VALID>, R16
>         EVAX_STQ R16, @UCB_L_SVPNSVAPTE(R5)         ; note 4
>         MOVAQ UCB$L_SVAPTE(R5), R16                 ; note 5
>         TBI_SINGLE R16,ENVIRON=THIS_CPU_ONLY        ; note 6
>         RSB

The code at note 5 was the flub.  UCB$L_SVAPTE(R5) was a *pointer* to the
buffer.  As written, the TBI_SINGLE invalidated the UCB, *not* the buffer
which had just been remapped.

Changing the line at note 5 to
        MOVAQ @UCB$L_SVAPTE(R5), R16

did the trick.

What's bad is I was the goofball who did that (after discovering TBI_SINGLE
wanted the address to be invalidated in a register).

Thanks again!
--
Joe "Software Engine" Sewell

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum