18c7907a1SPhilippe Mathieu-Daudé /* 28c7907a1SPhilippe Mathieu-Daudé * Variable page size handling -- target specific part. 38c7907a1SPhilippe Mathieu-Daudé * 48c7907a1SPhilippe Mathieu-Daudé * Copyright (c) 2003 Fabrice Bellard 58c7907a1SPhilippe Mathieu-Daudé * 68c7907a1SPhilippe Mathieu-Daudé * This library is free software; you can redistribute it and/or 78c7907a1SPhilippe Mathieu-Daudé * modify it under the terms of the GNU Lesser General Public 88c7907a1SPhilippe Mathieu-Daudé * License as published by the Free Software Foundation; either 98c7907a1SPhilippe Mathieu-Daudé * version 2.1 of the License, or (at your option) any later version. 108c7907a1SPhilippe Mathieu-Daudé * 118c7907a1SPhilippe Mathieu-Daudé * This library is distributed in the hope that it will be useful, 128c7907a1SPhilippe Mathieu-Daudé * but WITHOUT ANY WARRANTY; without even the implied warranty of 138c7907a1SPhilippe Mathieu-Daudé * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 148c7907a1SPhilippe Mathieu-Daudé * Lesser General Public License for more details. 158c7907a1SPhilippe Mathieu-Daudé * 168c7907a1SPhilippe Mathieu-Daudé * You should have received a copy of the GNU Lesser General Public 178c7907a1SPhilippe Mathieu-Daudé * License along with this library; if not, see <http://www.gnu.org/licenses/>. 188c7907a1SPhilippe Mathieu-Daudé */ 198c7907a1SPhilippe Mathieu-Daudé 208c7907a1SPhilippe Mathieu-Daudé #define IN_PAGE_VARY 1 218c7907a1SPhilippe Mathieu-Daudé 228c7907a1SPhilippe Mathieu-Daudé #include "qemu/osdep.h" 238c7907a1SPhilippe Mathieu-Daudé #include "exec/page-vary.h" 248c7907a1SPhilippe Mathieu-Daudé #include "exec/exec-all.h" 258c7907a1SPhilippe Mathieu-Daudé set_preferred_target_page_bits(int bits)268c7907a1SPhilippe Mathieu-Daudébool set_preferred_target_page_bits(int bits) 278c7907a1SPhilippe Mathieu-Daudé { 288c7907a1SPhilippe Mathieu-Daudé #ifdef TARGET_PAGE_BITS_VARY 298c7907a1SPhilippe Mathieu-Daudé assert(bits >= TARGET_PAGE_BITS_MIN); 308c7907a1SPhilippe Mathieu-Daudé return set_preferred_target_page_bits_common(bits); 318c7907a1SPhilippe Mathieu-Daudé #else 328c7907a1SPhilippe Mathieu-Daudé return true; 338c7907a1SPhilippe Mathieu-Daudé #endif 348c7907a1SPhilippe Mathieu-Daudé } 358c7907a1SPhilippe Mathieu-Daudé finalize_target_page_bits(void)368c7907a1SPhilippe Mathieu-Daudévoid finalize_target_page_bits(void) 378c7907a1SPhilippe Mathieu-Daudé { 388c7907a1SPhilippe Mathieu-Daudé #ifdef TARGET_PAGE_BITS_VARY 398c7907a1SPhilippe Mathieu-Daudé finalize_target_page_bits_common(TARGET_PAGE_BITS_MIN); 408c7907a1SPhilippe Mathieu-Daudé #endif 418c7907a1SPhilippe Mathieu-Daudé } 42