platform.h revision 255417
189857Sobrien/*-
2218822Sdim * Copyright (C) 1996 Wolfgang Solfrank.
3218822Sdim * Copyright (C) 1996 TooLs GmbH.
485815Sobrien * All rights reserved.
585815Sobrien *
685815Sobrien * Redistribution and use in source and binary forms, with or without
785815Sobrien * modification, are permitted provided that the following conditions
885815Sobrien * are met:
985815Sobrien * 1. Redistributions of source code must retain the above copyright
1085815Sobrien *    notice, this list of conditions and the following disclaimer.
1185815Sobrien * 2. Redistributions in binary form must reproduce the above copyright
1285815Sobrien *    notice, this list of conditions and the following disclaimer in the
1385815Sobrien *    documentation and/or other materials provided with the distribution.
1485815Sobrien * 3. All advertising materials mentioning features or use of this software
1585815Sobrien *    must display the following acknowledgement:
1685815Sobrien *	This product includes software developed by TooLs GmbH.
1785815Sobrien * 4. The name of TooLs GmbH may not be used to endorse or promote products
1885815Sobrien *    derived from this software without specific prior written permission.
19218822Sdim *
2085815Sobrien * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
2189857Sobrien * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
2285815Sobrien * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2385815Sobrien * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2485815Sobrien * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
2585815Sobrien * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
2685815Sobrien * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
2785815Sobrien * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
2885815Sobrien * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
2985815Sobrien * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3085815Sobrien *
3185815Sobrien *	$NetBSD: powerpc.h,v 1.3 2000/06/01 00:49:59 matt Exp $
3285815Sobrien * $FreeBSD: head/sys/powerpc/include/platform.h 255417 2013-09-09 12:49:19Z nwhitehorn $
3385815Sobrien */
3489857Sobrien
3585815Sobrien#ifndef	_MACHINE_PLATFORM_H_
3689857Sobrien#define	_MACHINE_PLATFORM_H_
3785815Sobrien
3885815Sobrien#include <machine/smp.h>
3985815Sobrien#include <machine/pcpu.h>
4085815Sobrien
4185815Sobrienstruct mem_region {
4285815Sobrien	vm_offset_t	mr_start;
4385815Sobrien	vm_size_t	mr_size;
4485815Sobrien};
4585815Sobrien
4685815Sobrienvoid	mem_regions(struct mem_region **, int *, struct mem_region **, int *);
4785815Sobrienvm_offset_t platform_real_maxaddr(void);
4885815Sobrien
4985815Sobrienu_long	platform_timebase_freq(struct cpuref *);
5085815Sobrien
5185815Sobrienint	platform_smp_first_cpu(struct cpuref *);
5285815Sobrienint	platform_smp_next_cpu(struct cpuref *);
5385815Sobrienint	platform_smp_get_bsp(struct cpuref *);
5485815Sobrienint	platform_smp_start_cpu(struct pcpu *);
5585815Sobrienvoid	platform_smp_ap_init(void);
5685815Sobrien
5785815Sobrienconst char *installed_platform(void);
5889857Sobrienvoid platform_probe_and_attach(void);
5985815Sobrien
6085815Sobrien#endif	/* _MACHINE_PLATFORM_H_ */
6185815Sobrien