Skip to contentSkip to conversation

yet another ssm/rsm/rfi question [Was: [parisc-linux] head.S: a small typo]

DISCUSSION Joel Soete 3 participants 3 messages May 3, 2005 1 message not in the archive

lore
Share & tools
lore

Joel Soete

author
#1 lore raw
In reply to a message not in the archive

Hello all,

yet another strange notice between head.S and real2.S:

the following:
/* rfi_virt2real() and rfi_real2virt() could perhaps be adapted for
* more general-purpose use by the several places which need RFIs */

        .text
        .align 128

rfi_virt2real:
/* switch to real mode... */
pcxt_ssm_bug

rsm PSW_SM_Q+PSW_SM_I,%r0 /* prep to load iia queue
*/

        mtctl           %r0, %cr17      /* Clear IIASQ tail */
        mtctl           %r0, %cr17      /* Clear IIASQ head */
        load32          PA(rfi_v2r_1), %r1
        mtctl           %r1, %cr18      /* IIAOQ head */
        ldo             4(%r1), %r1
        mtctl           %r1, %cr18      /* IIAOQ tail */
        load32          REAL_MODE_PSW, %r1
        mtctl           %r1, %cr22

rfi

nop
nop
nop
nop
nop
nop
nop
nop
rfi_v2r_1:

        tophys_r1 %r2
        bv      0(%r2)
        nop

looks very like to me to:

        .text
        .align  128

        .export flush_tlb_all_local,code

flush_tlb_all_local:
.proc
.callinfo NO_CALLS
.entry

/*
* The pitlbe and pdtlbe instructions should only be used to
* flush the entire tlb. Also, there needs to be no intervening
* tlb operations, e.g. tlb misses, so the operation needs
* to happen in real mode with all interruptions disabled. */

pcxt_ssm_bug

/* relied upon translation! PA 2.0 Arch. F-4 and F-5 */
rsm PSW_SM_Q+PSW_SM_I, %r0 /* prep to load iia queue=

*/

        mtctl           %r0, %cr17              /* Clear IIASQ tail */
        mtctl           %r0, %cr17              /* Clear IIASQ head */
        ldil            L%PA(1f), %r1
        ldo             R%PA(1f)(%r1), %r1
        mtctl           %r1, %cr18              /* IIAOQ head */
        ldo             4(%r1), %r1
        mtctl           %r1, %cr18              /* IIAOQ tail */
        load32          REAL_MODE_PSW, %r1
        mtctl           %r1, %cr22

rfi
nop

1: ldil L%PA(cache_info), %r1

        ldo             R%PA(cache_info)(%r1), %r1

        /* Flush Instruction Tlb */

[snip]

(well we could easly re-label 1 by e.g. flush_tlb_all_local_1 and use "lo= ad32
PA(flush_tlb_all_local_1), %r1")
but I am surprised to not find the 8 nops between rfi and label.

Any recommendation about this?

Thanks again,
Joel

_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

#2 lore raw

On Tue, May 03, 2005 at 04:56:10PM +0000, Joel Soete wrote:
...

Quoted 1 line

pcxt_ssm_bug

...

Quoted 2 lines

(well we could easly re-label 1 by e.g. flush_tlb_all_local_1 and use "load32 PA(flush_tlb_all_local_1), %r1")

Sure. We could. Why?

Quoted 1 line

but I am surprised to not find the 8 nops between rfi and label.

AFAICT, the NOPs are pointless. The RFI better not return or we have more serious problems (e.g. HW failure).

I will unify (i.e. define macros) uses of ssm/rsm/rfi once this current patch is in CVS and people are happy with it.

There are currently 8 uses of RFI:

grundler <501>fgrep pcxt_ssm_bug *S

entry.S:        pcxt_ssm_bug
head.S: pcxt_ssm_bug
pacache.S:      pcxt_ssm_bug
pacache.S:      pcxt_ssm_bug
pacache.S:      pcxt_ssm_bug
pacache.S:      pcxt_ssm_bug
real2.S:        pcxt_ssm_bug
real2.S:        pcxt_ssm_bug

All but one are easily replaced with a macro that takes 2 parameters. But one step at a time...

grant
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

#3 lore raw

Re: yet another ssm/rsm/rfi question [Was: [parisc-linux] head.S: a

Quoted 4 lines
Quoted 1 line

but I am surprised to not find the 8 nops between rfi and label.

AFAICT, the NOPs are pointless. The RFI better not return or we have more serious problems (e.g. HW failure).

Same here. On the otherhand, the might have been added to avoid problems with the instruction pipeline when executing an rfi.

Dave

Signature · 6 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux