mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-25 05:39:20 +00:00
6c8b7e0fed
Honour the NS bit in ARM page tables: * when adding entries to the TLB, include the Secure/NonSecure transaction attribute * set the NS bit in the PAR when doing ATS operations Note that we don't yet correctly use the NSTable bit to cause the page table walk itself to use the right attributes. Backports commit 8bf5b6a9c1911d2c8473385fc0cebfaaeef42dbc from qem
43 lines
1.4 KiB
C
43 lines
1.4 KiB
C
/*
|
|
* Memory transaction attributes
|
|
*
|
|
* Copyright (c) 2015 Linaro Limited.
|
|
*
|
|
* Authors:
|
|
* Peter Maydell <peter.maydell@linaro.org>
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
* See the COPYING file in the top-level directory.
|
|
*
|
|
*/
|
|
|
|
#ifndef MEMATTRS_H
|
|
#define MEMATTRS_H
|
|
|
|
/* Every memory transaction has associated with it a set of
|
|
* attributes. Some of these are generic (such as the ID of
|
|
* the bus master); some are specific to a particular kind of
|
|
* bus (such as the ARM Secure/NonSecure bit). We define them
|
|
* all as non-overlapping bitfields in a single struct to avoid
|
|
* confusion if different parts of QEMU used the same bit for
|
|
* different semantics.
|
|
*/
|
|
typedef struct MemTxAttrs {
|
|
/* Bus masters which don't specify any attributes will get this
|
|
* (via the MEMTXATTRS_UNSPECIFIED constant), so that we can
|
|
* distinguish "all attributes deliberately clear" from
|
|
* "didn't specify" if necessary.
|
|
*/
|
|
unsigned int unspecified:1;
|
|
/* ARM/AMBA TrustZone Secure access */
|
|
unsigned int secure:1;
|
|
} MemTxAttrs;
|
|
|
|
/* Bus masters which don't specify any attributes will get this,
|
|
* which has all attribute bits clear except the topmost one
|
|
* (so that we can distinguish "all attributes deliberately clear"
|
|
* from "didn't specify" if necessary).
|
|
*/
|
|
#define MEMTXATTRS_UNSPECIFIED ((MemTxAttrs) { .unspecified = 1 })
|
|
|
|
#endif
|