xref: /openbmc/qemu/page-vary-target.c (revision 8c7907a1)
1*8c7907a1SPhilippe Mathieu-Daudé /*
2*8c7907a1SPhilippe Mathieu-Daudé  * Variable page size handling -- target specific part.
3*8c7907a1SPhilippe Mathieu-Daudé  *
4*8c7907a1SPhilippe Mathieu-Daudé  *  Copyright (c) 2003 Fabrice Bellard
5*8c7907a1SPhilippe Mathieu-Daudé  *
6*8c7907a1SPhilippe Mathieu-Daudé  * This library is free software; you can redistribute it and/or
7*8c7907a1SPhilippe Mathieu-Daudé  * modify it under the terms of the GNU Lesser General Public
8*8c7907a1SPhilippe Mathieu-Daudé  * License as published by the Free Software Foundation; either
9*8c7907a1SPhilippe Mathieu-Daudé  * version 2.1 of the License, or (at your option) any later version.
10*8c7907a1SPhilippe Mathieu-Daudé  *
11*8c7907a1SPhilippe Mathieu-Daudé  * This library is distributed in the hope that it will be useful,
12*8c7907a1SPhilippe Mathieu-Daudé  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13*8c7907a1SPhilippe Mathieu-Daudé  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14*8c7907a1SPhilippe Mathieu-Daudé  * Lesser General Public License for more details.
15*8c7907a1SPhilippe Mathieu-Daudé  *
16*8c7907a1SPhilippe Mathieu-Daudé  * You should have received a copy of the GNU Lesser General Public
17*8c7907a1SPhilippe Mathieu-Daudé  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
18*8c7907a1SPhilippe Mathieu-Daudé  */
19*8c7907a1SPhilippe Mathieu-Daudé 
20*8c7907a1SPhilippe Mathieu-Daudé #define IN_PAGE_VARY 1
21*8c7907a1SPhilippe Mathieu-Daudé 
22*8c7907a1SPhilippe Mathieu-Daudé #include "qemu/osdep.h"
23*8c7907a1SPhilippe Mathieu-Daudé #include "exec/page-vary.h"
24*8c7907a1SPhilippe Mathieu-Daudé #include "exec/exec-all.h"
25*8c7907a1SPhilippe Mathieu-Daudé 
set_preferred_target_page_bits(int bits)26*8c7907a1SPhilippe Mathieu-Daudé bool set_preferred_target_page_bits(int bits)
27*8c7907a1SPhilippe Mathieu-Daudé {
28*8c7907a1SPhilippe Mathieu-Daudé #ifdef TARGET_PAGE_BITS_VARY
29*8c7907a1SPhilippe Mathieu-Daudé     assert(bits >= TARGET_PAGE_BITS_MIN);
30*8c7907a1SPhilippe Mathieu-Daudé     return set_preferred_target_page_bits_common(bits);
31*8c7907a1SPhilippe Mathieu-Daudé #else
32*8c7907a1SPhilippe Mathieu-Daudé     return true;
33*8c7907a1SPhilippe Mathieu-Daudé #endif
34*8c7907a1SPhilippe Mathieu-Daudé }
35*8c7907a1SPhilippe Mathieu-Daudé 
finalize_target_page_bits(void)36*8c7907a1SPhilippe Mathieu-Daudé void finalize_target_page_bits(void)
37*8c7907a1SPhilippe Mathieu-Daudé {
38*8c7907a1SPhilippe Mathieu-Daudé #ifdef TARGET_PAGE_BITS_VARY
39*8c7907a1SPhilippe Mathieu-Daudé     finalize_target_page_bits_common(TARGET_PAGE_BITS_MIN);
40*8c7907a1SPhilippe Mathieu-Daudé #endif
41*8c7907a1SPhilippe Mathieu-Daudé }
42