[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qemu-devel
Subject:    Re: [PATCH 2/3] target/hppa: mask offset bits in gva
From:       Helge Deller <deller () gmx ! de>
Date:       2024-04-02 22:18:18
Message-ID: 757a3716-67ac-4305-b268-a5b053edecdb () gmx ! de
[Download RAW message or body]

On 4/2/24 08:29, Sven Schnelle wrote:
> Richard Henderson <richard.henderson@linaro.org> writes:
>
>> On 4/1/24 20:01, Sven Schnelle wrote:
>>> Implement dr2 and the mfdiag/mtdiag instructions. dr2 contains a bit
>>> which enables/disables space id hashing. Seabios would then set
>>> this bit when booting. Linux would disable it again during boot (this
>>> would be the same like on real hardware), while HP-UX would leave it
>>> enabled.

This is how it works on real physical hardware, and since qemu should mimi=
c
real hardware as best as it can, IMHO we should implement it exactly like =
this.

Helge

>> Pointer to documentation?
>
> There's no documentation about that in the public. There's this code sin=
ce the
> beginning of linux on hppa in the linux kernel (arch/parisc/kernel/pacac=
he.S):
>
> /* Disable Space Register Hashing for PCXL */
>
> .word         0x141c0600      /* mfdiag %dr0, %r28 */
> depwi           0,28,2, %r28  /* Clear DHASH_EN & IHASH_EN */
> .word         0x141c0240      /* mtdiag %r28, %dr0 */
> b,n           srdis_done
>
> srdis_pa20:
>
> /* Disable Space Register Hashing for PCXU,PCXU+,PCXW,PCXW+,PCXW2 */
>
> .word         0x144008bc            /* mfdiag %dr2, %r28 */
> depdi         0, 54,1, %r28         /* clear DIAG_SPHASH_ENAB (bit 54) *=
/
> .word         0x145c1840            /* mtdiag %r28, %dr2 */
>
> So PCXL (32 bit) uses dr0, while 64 bit uses dr2. This still is the same
> on my C8000 - i see firmware still contains code reading dr2 to figure
> out whether space id hashing is enabled. The mfdiag/mtdiag instructions
> are described in the PCXL/PCXL2 ERS.
>
> https://parisc.wiki.kernel.org/index.php/File:PCXL_ers.pdf
> https://parisc.wiki.kernel.org/index.php/File:Pcxl2_ers.pdf
>
> There was a discussion mentioning disabling Space ID hashing in Linux:
>
> https://yhbt.net/lore/linux-parisc/199912161642.IAA11478@lucy.cup.hp.com=
/
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic