genassym.cf revision 1.11
11.11Snonaka#	$NetBSD: genassym.cf,v 1.11 2015/01/26 04:47:53 nonaka Exp $
21.2Smatt
31.2Smatt#-
41.2Smatt# Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
51.2Smatt# All rights reserved.
61.2Smatt#
71.2Smatt# This code is derived from software contributed to The NetBSD Foundation
81.2Smatt# by Raytheon BBN Technologies Corp and Defense Advanced Research Projects
91.2Smatt# Agency and which was developed by Matt Thomas of 3am Software Foundry.
101.2Smatt#
111.2Smatt# This material is based upon work supported by the Defense Advanced Research
121.2Smatt# Projects Agency and Space and Naval Warfare Systems Center, Pacific, under
131.2Smatt# Contract No. N66001-09-C-2073.
141.2Smatt# Approved for Public Release, Distribution Unlimited
151.2Smatt#
161.2Smatt# Copyright (c) 2010 The NetBSD Foundation, Inc.
171.2Smatt# All rights reserved.
181.2Smatt#
191.2Smatt# This code is derived from software contributed to The NetBSD Foundation
201.2Smatt# by Matt Thomas of 3am Software Foundry.
211.2Smatt#
221.2Smatt# Redistribution and use in source and binary forms, with or without
231.2Smatt# modification, are permitted provided that the following conditions
241.2Smatt# are met:
251.2Smatt# 1. Redistributions of source code must retain the above copyright
261.2Smatt#    notice, this list of conditions and the following disclaimer.
271.2Smatt# 2. Redistributions in binary form must reproduce the above copyright
281.2Smatt#    notice, this list of conditions and the following disclaimer in the
291.2Smatt#    documentation and/or other materials provided with the distribution.
301.2Smatt#
311.2Smatt# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
321.2Smatt# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
331.2Smatt# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
341.2Smatt# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
351.2Smatt# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
361.2Smatt# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
371.2Smatt# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
381.2Smatt# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
391.2Smatt# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
401.2Smatt# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
411.2Smatt# POSSIBILITY OF SUCH DAMAGE.
421.2Smatt#+
431.2Smatt
441.8Smattinclude "opt_multiprocessor.h"
451.8Smatt
461.2Smattinclude <sys/param.h>
471.2Smattinclude <sys/bitops.h>
481.2Smatt
491.2Smattinclude <uvm/uvm_extern.h>
501.2Smatt
511.2Smattinclude <machine/frame.h>
521.6Smattinclude <machine/psl.h>
531.2Smattinclude <machine/pmap.h>
541.2Smatt
551.2Smattinclude <powerpc/booke/trap.h>
561.2Smattinclude <powerpc/booke/pte.h>
571.2Smatt
581.2Smattdefine	FRAME_DEAR	offsetof(struct ktrapframe, ktf_tf.tf_dear)
591.2Smattdefine	FRAME_ESR	offsetof(struct ktrapframe, ktf_tf.tf_esr)
601.2Smattdefine	FRAME_MCSR	offsetof(struct ktrapframe, ktf_tf.tf_mcsr)
611.2Smattdefine	FRAME_MCAR	offsetof(struct ktrapframe, ktf_tf.tf_mcar)
621.2Smattdefine	FRAME_SPRG1	offsetof(struct ktrapframe, ktf_tf.tf_sprg1)
631.2Smattdefine	FRAME_SPEFSCR	offsetof(struct ktrapframe, ktf_tf.tf_spefscr)
641.9Smattdefine	FRAME_CFRAME_LR	offsetof(struct ktrapframe, ktf_cframe_lr)
651.2Smatt
661.7Smattdefine	CI_SAVELIFO	offsetof(struct cpu_info, ci_savearea[0])
671.2Smattdefine	CI_PMAP_SEGTAB	offsetof(struct cpu_info, ci_pmap_segtabs[0])
681.2Smattdefine	CI_EV_TLBMISS_SOFT offsetof(struct cpu_info, ci_ev_tlbmiss_soft.ev_count)
691.2Smatt
701.2Smattdefine	PAGE_SIZE	PAGE_SIZE
711.2Smattdefine	PAGE_MASK	PAGE_MASK
721.2Smattdefine	PAGE_SHIFT	PAGE_SHIFT
731.2Smattdefine	KERNEL_PID	KERNEL_PID
741.2Smattdefine	USPACE		USPACE
751.2Smatt
761.2Smattdefine	T_CRITIAL_INPUT		T_CRITIAL_INPUT
771.2Smattdefine	T_MACHINE_CHECK		T_MACHINE_CHECK
781.2Smattdefine	T_DSI			T_DSI
791.2Smattdefine	T_ISI			T_ISI
801.2Smattdefine	T_EXTERNAL_INPUT	T_EXTERNAL_INPUT
811.2Smattdefine	T_ALIGNMENT		T_ALIGNMENT
821.2Smattdefine	T_PROGRAM		T_PROGRAM
831.2Smattdefine	T_FP_UNAVAILABLE	T_FP_UNAVAILABLE
841.2Smattdefine	T_SYSTEM_CALL		T_SYSTEM_CALL
851.2Smattdefine	T_AP_UNAVAILABLE	T_AP_UNAVAILABLE
861.2Smattdefine	T_DECREMENTER		T_DECREMENTER
871.2Smattdefine	T_FIXED_INTERVAL	T_FIXED_INTERVAL
881.2Smattdefine	T_WATCHDOG		T_WATCHDOG
891.2Smattdefine	T_DATA_TLB_ERROR	T_DATA_TLB_ERROR
901.2Smattdefine	T_INSTRUCTION_TLB_ERROR	T_INSTRUCTION_TLB_ERROR
911.2Smattdefine	T_DEBUG			T_DEBUG
921.2Smattdefine	T_SPE_UNAVAILABLE	T_SPE_UNAVAILABLE
931.2Smattdefine	T_EMBEDDED_FP_DATA	T_EMBEDDED_FP_DATA
941.2Smattdefine	T_EMBEDDED_FP_ROUND	T_EMBEDDED_FP_ROUND
951.2Smattdefine	T_EMBEDDED_PERF_MONITOR	T_EMBEDDED_PERF_MONITOR
961.2Smattdefine	T_AST			T_AST
971.2Smatt
981.2Smattdefine	PTE_SCALESHIFT	ilog2(sizeof(pt_entry_t))
991.2Smattdefine	PTR_SCALESHIFT	ilog2(sizeof(void *))
1001.5Smattdefine	NSEGPG_SCALESHIFT	PAGE_SHIFT - ilog2(sizeof(void *))
1011.5Smattdefine	NPTEPG_SCALESHIFT	PAGE_SHIFT - ilog2(sizeof(pt_entry_t))
1021.5Smatt
1031.2Smattdefine	MSR_DS		31 - ilog2(PSL_DS)
1041.2Smattdefine	MSR_IS		31 - ilog2(PSL_IS)
1051.8Smatt
1061.8Smattifdef MULTIPROCESSOR
1071.8Smattdefine	HATCH_CI		offsetof(struct cpu_hatch_data, hatch_ci)
1081.8Smattdefine	HATCH_HID0		offsetof(struct cpu_hatch_data, hatch_hid0)
1091.8Smattdefine	HATCH_RUNNING		offsetof(struct cpu_hatch_data, hatch_running)
1101.8Smattdefine	HATCH_SP		offsetof(struct cpu_hatch_data, hatch_sp)
1111.8Smattdefine	HATCH_TBU		offsetof(struct cpu_hatch_data, hatch_tbu)
1121.8Smattdefine	HATCH_TBL		offsetof(struct cpu_hatch_data, hatch_tbl)
1131.10Smattdefine	HATCH_TLBIDX		offsetof(struct cpu_hatch_data, hatch_tlbidx)
1141.11Snonaka
1151.11Snonakadefine	__SIMPLELOCK_LOCKED	__SIMPLELOCK_LOCKED
1161.11Snonakadefine	__SIMPLELOCK_UNLOCKED	__SIMPLELOCK_UNLOCKED
1171.8Smattendif
118