1*0a6a1f1dSLionel Sambuc /* $NetBSD: machdep.h,v 1.7 2014/06/12 19:02:35 riastradh Exp $ */ 21cd76c75SBen Gras /* 31cd76c75SBen Gras * Copyright (c) 2000, 2007 The NetBSD Foundation, Inc. 41cd76c75SBen Gras * All rights reserved. 51cd76c75SBen Gras * 61cd76c75SBen Gras * Redistribution and use in source and binary forms, with or without 71cd76c75SBen Gras * modification, are permitted provided that the following conditions 81cd76c75SBen Gras * are met: 91cd76c75SBen Gras * 1. Redistributions of source code must retain the above copyright 101cd76c75SBen Gras * notice, this list of conditions and the following disclaimer. 111cd76c75SBen Gras * 2. Redistributions in binary form must reproduce the above copyright 121cd76c75SBen Gras * notice, this list of conditions and the following disclaimer in the 131cd76c75SBen Gras * documentation and/or other materials provided with the distribution. 141cd76c75SBen Gras * 151cd76c75SBen Gras * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 161cd76c75SBen Gras * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 171cd76c75SBen Gras * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 181cd76c75SBen Gras * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 191cd76c75SBen Gras * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 201cd76c75SBen Gras * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 211cd76c75SBen Gras * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 221cd76c75SBen Gras * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 231cd76c75SBen Gras * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 241cd76c75SBen Gras * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 251cd76c75SBen Gras * POSSIBILITY OF SUCH DAMAGE. 261cd76c75SBen Gras */ 271cd76c75SBen Gras 281cd76c75SBen Gras #ifndef _X86_MACHDEP_H_ 291cd76c75SBen Gras #define _X86_MACHDEP_H_ 301cd76c75SBen Gras 31*0a6a1f1dSLionel Sambuc #include <sys/kcore.h> 32*0a6a1f1dSLionel Sambuc 331cd76c75SBen Gras extern phys_ram_seg_t mem_clusters[]; 341cd76c75SBen Gras extern int mem_cluster_cnt; 351cd76c75SBen Gras 361cd76c75SBen Gras struct btinfo_memmap; 371cd76c75SBen Gras struct extent; 3884d9c625SLionel Sambuc struct sysctllog; 391cd76c75SBen Gras 401cd76c75SBen Gras void x86_cpu_idle_init(void); 411cd76c75SBen Gras void x86_cpu_idle_get(void (**)(void), char *, size_t); 421cd76c75SBen Gras void x86_cpu_idle_set(void (*)(void), const char *, bool); 431cd76c75SBen Gras 441cd76c75SBen Gras int initx86_parse_memmap(struct btinfo_memmap *, struct extent *); 451cd76c75SBen Gras int initx86_fake_memmap(struct extent *); 461cd76c75SBen Gras int initx86_load_memmap(paddr_t first_avail); 47*0a6a1f1dSLionel Sambuc int x86_select_freelist(uint64_t); 481cd76c75SBen Gras 491cd76c75SBen Gras void x86_startup(void); 5084d9c625SLionel Sambuc void x86_sysctl_machdep_setup(struct sysctllog **); 511cd76c75SBen Gras 521cd76c75SBen Gras #endif /* _X86_MACHDEP_H_ */ 53