mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
target/ppc: introduce mmu-books.h
Intrudoce a header common to all BookS MMUs, that can hold code that is common to hash32 and book3s-v3 MMUs. Suggested-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br> Message-Id: <20210706150316.21005-2-bruno.larsen@eldorado.org.br> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
03695a9870
commit
a97c4d3c1e
2 changed files with 31 additions and 13 deletions
30
target/ppc/mmu-books.h
Normal file
30
target/ppc/mmu-books.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* PowerPC BookS emulation generic mmu definitions for qemu.
|
||||
*
|
||||
* Copyright (c) 2021 Instituto de Pesquisas Eldorado (eldorado.org.br)
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PPC_MMU_BOOKS_H
|
||||
#define PPC_MMU_BOOKS_H
|
||||
|
||||
/*
|
||||
* These correspond to the mmu_idx values computed in
|
||||
* hreg_compute_hflags_value. See the tables therein
|
||||
*/
|
||||
static inline bool mmuidx_pr(int idx) { return !(idx & 1); }
|
||||
static inline bool mmuidx_real(int idx) { return idx & 2; }
|
||||
static inline bool mmuidx_hv(int idx) { return idx & 4; }
|
||||
#endif /* PPC_MMU_BOOKS_H */
|
Loading…
Add table
Add a link
Reference in a new issue