diff options
author | edp <none@none> | 2008-04-14 22:44:34 -0700 |
---|---|---|
committer | edp <none@none> | 2008-04-14 22:44:34 -0700 |
commit | eb0cc229f19c437a6b538d3ac0d0443268290b7e (patch) | |
tree | e4d394e7fb7dcf49c28308fb78ab8627e6a9a553 | |
parent | 6eb35ee750312cc65aa066dd0f625b9d54c6f86e (diff) | |
download | illumos-gate-onnv_88.tar.gz |
6683029 Install -G and i86hvm don't mix wellonnv_88
6683772 yacc yacks when confronted with libumem
--HG--
rename : usr/src/uts/i86pc/Makefile.hvm => usr/src/uts/i86pc/i86hvm/Makefile.i86hvm
rename : usr/src/uts/i86pc/hvm_bootstrap/Makefile => usr/src/uts/i86pc/i86hvm/hvm_bootstrap/Makefile
rename : usr/src/uts/common/xen/io/hvm_bootstrap.c => usr/src/uts/i86pc/i86hvm/io/hvm_bootstrap.c
rename : usr/src/uts/i86pc/io/pv_cmdk.c => usr/src/uts/i86pc/i86hvm/io/pv_cmdk.c
rename : usr/src/uts/i86pc/io/pv_rtls.c => usr/src/uts/i86pc/i86hvm/io/pv_rtls.c
rename : usr/src/uts/i86pc/io/xpv/evtchn.c => usr/src/uts/i86pc/i86hvm/io/xpv/evtchn.c
rename : usr/src/uts/i86pc/io/xpv/xpv.conf => usr/src/uts/i86pc/i86hvm/io/xpv/xpv.conf
rename : usr/src/uts/i86pc/io/xpv/xpv_support.c => usr/src/uts/i86pc/i86hvm/io/xpv/xpv_support.c
rename : usr/src/uts/i86pc/pv_cmdk/Makefile => usr/src/uts/i86pc/i86hvm/pv_cmdk/Makefile
rename : usr/src/uts/i86pc/pv_rtls/Makefile => usr/src/uts/i86pc/i86hvm/pv_rtls/Makefile
rename : usr/src/uts/i86pc/sys/xpv_support.h => usr/src/uts/i86pc/i86hvm/sys/xpv_support.h
rename : usr/src/uts/i86pc/xdf/Makefile => usr/src/uts/i86pc/i86hvm/xdf/Makefile
rename : usr/src/uts/i86pc/xnf/Makefile => usr/src/uts/i86pc/i86hvm/xnf/Makefile
rename : usr/src/uts/i86pc/xpv/Makefile => usr/src/uts/i86pc/i86hvm/xpv/Makefile
rename : usr/src/uts/i86pc/xpvd/Makefile => usr/src/uts/i86pc/i86hvm/xpvd/Makefile
-rw-r--r-- | usr/src/cmd/sgs/yacc/common/y2.c | 6 | ||||
-rw-r--r-- | usr/src/uts/i86pc/Makefile | 15 | ||||
-rw-r--r-- | usr/src/uts/i86pc/Makefile.files | 9 | ||||
-rw-r--r-- | usr/src/uts/i86pc/Makefile.i86pc.shared | 19 | ||||
-rw-r--r-- | usr/src/uts/i86pc/Makefile.rules | 33 | ||||
-rw-r--r-- | usr/src/uts/i86pc/i86hvm/Makefile | 108 | ||||
-rw-r--r-- | usr/src/uts/i86pc/i86hvm/Makefile.files | 49 | ||||
-rw-r--r-- | usr/src/uts/i86pc/i86hvm/Makefile.i86hvm (renamed from usr/src/uts/i86pc/Makefile.hvm) | 48 | ||||
-rw-r--r-- | usr/src/uts/i86pc/i86hvm/Makefile.rules | 73 | ||||
-rw-r--r-- | usr/src/uts/i86pc/i86hvm/Makefile.targ | 63 | ||||
-rw-r--r-- | usr/src/uts/i86pc/i86hvm/hvm_bootstrap/Makefile (renamed from usr/src/uts/i86pc/hvm_bootstrap/Makefile) | 7 | ||||
-rw-r--r-- | usr/src/uts/i86pc/i86hvm/io/hvm_bootstrap.c (renamed from usr/src/uts/common/xen/io/hvm_bootstrap.c) | 0 | ||||
-rw-r--r-- | usr/src/uts/i86pc/i86hvm/io/pv_cmdk.c (renamed from usr/src/uts/i86pc/io/pv_cmdk.c) | 0 | ||||
-rw-r--r-- | usr/src/uts/i86pc/i86hvm/io/pv_rtls.c (renamed from usr/src/uts/i86pc/io/pv_rtls.c) | 0 | ||||
-rw-r--r-- | usr/src/uts/i86pc/i86hvm/io/xpv/evtchn.c (renamed from usr/src/uts/i86pc/io/xpv/evtchn.c) | 0 | ||||
-rw-r--r-- | usr/src/uts/i86pc/i86hvm/io/xpv/xpv.conf (renamed from usr/src/uts/i86pc/io/xpv/xpv.conf) | 0 | ||||
-rw-r--r-- | usr/src/uts/i86pc/i86hvm/io/xpv/xpv_support.c (renamed from usr/src/uts/i86pc/io/xpv/xpv_support.c) | 0 | ||||
-rw-r--r-- | usr/src/uts/i86pc/i86hvm/pv_cmdk/Makefile (renamed from usr/src/uts/i86pc/pv_cmdk/Makefile) | 15 | ||||
-rw-r--r-- | usr/src/uts/i86pc/i86hvm/pv_rtls/Makefile (renamed from usr/src/uts/i86pc/pv_rtls/Makefile) | 7 | ||||
-rw-r--r-- | usr/src/uts/i86pc/i86hvm/sys/xpv_support.h (renamed from usr/src/uts/i86pc/sys/xpv_support.h) | 0 | ||||
-rw-r--r-- | usr/src/uts/i86pc/i86hvm/xdf/Makefile (renamed from usr/src/uts/i86pc/xdf/Makefile) | 10 | ||||
-rw-r--r-- | usr/src/uts/i86pc/i86hvm/xnf/Makefile (renamed from usr/src/uts/i86pc/xnf/Makefile) | 11 | ||||
-rw-r--r-- | usr/src/uts/i86pc/i86hvm/xpv/Makefile (renamed from usr/src/uts/i86pc/xpv/Makefile) | 13 | ||||
-rw-r--r-- | usr/src/uts/i86pc/i86hvm/xpvd/Makefile (renamed from usr/src/uts/i86pc/xpvd/Makefile) | 9 |
24 files changed, 365 insertions, 130 deletions
diff --git a/usr/src/cmd/sgs/yacc/common/y2.c b/usr/src/cmd/sgs/yacc/common/y2.c index c7ea63a22b..d8dfe019a1 100644 --- a/usr/src/cmd/sgs/yacc/common/y2.c +++ b/usr/src/cmd/sgs/yacc/common/y2.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -195,8 +195,8 @@ char *argv[]; prdptr = (int **)malloc(sizeof (int *) * (nprodsz+2)); levprd = (int *)malloc(sizeof (int) * (nprodsz+2)); had_act = (wchar_t *)calloc((nprodsz + 2), sizeof (wchar_t)); - lhstext = (wchar_t *)malloc(sizeof (wchar_t) * LHS_TEXT_LEN); - rhstext = (wchar_t *)malloc(sizeof (wchar_t) * RHS_TEXT_LEN); + lhstext = (wchar_t *)calloc(1, sizeof (wchar_t) * LHS_TEXT_LEN); + rhstext = (wchar_t *)calloc(1, sizeof (wchar_t) * RHS_TEXT_LEN); aryfil(toklev, ntoksz, 0); aryfil(levprd, nprodsz, 0); for (ii = 0; ii < ntoksz; ++ii) diff --git a/usr/src/uts/i86pc/Makefile b/usr/src/uts/i86pc/Makefile index 3b6e7b11a6..a2cc4f1b0a 100644 --- a/usr/src/uts/i86pc/Makefile +++ b/usr/src/uts/i86pc/Makefile @@ -75,13 +75,14 @@ INITIAL_TARGETS = \ cpu/scripts def all clean clobber clean.lint: setup genassym unix .WAIT \ - $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) + $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS) install: install_platforms setup genassym unix .WAIT \ - $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) + $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) $(IMPLEMENTATIONS) # list the modules under i86pc. -modlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) +modlist: unix $(KMODS) $(CLOSED_KMODS) $(XMODS) $(CLOSED_XMODS) \ + $(IMPLEMENTATIONS) # list the modules for Install -k i86pc. modlist.karch: modlist modlist.intel @@ -99,6 +100,9 @@ genassym unix $(KMODS): FRC setup: FRC @cd cpu/scripts; pwd; $(MAKE) $(TARGET) +$(IMPLEMENTATIONS): FRC + @cd $@; pwd; THISIMPL=$@ $(MAKE) $(NO_STATE) $(TARGET) + $(XMODS): FRC @if [ -f $@/Makefile ]; then \ cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET); \ @@ -117,7 +121,7 @@ $(CLOSED_XMODS): FRC true; \ fi -install_h check: FRC +install_h check: $(IMPLEMENTATIONS) FRC @cd sys; pwd; $(MAKE) $(TARGET) # @@ -148,7 +152,8 @@ globallint: @-$(ECHO) "\nFULL KERNEL: global crosschecks:" @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2) -lint: lintlib .WAIT modlintlib .WAIT $(INTEL_LINTS) $(LINT_DEPS) +lint: lintlib .WAIT modlintlib .WAIT $(INTEL_LINTS) $(LINT_DEPS) \ + $(IMPLEMENTATIONS) $(INTEL_LINTS): FRC @cd $(UTSBASE)/intel/$@; pwd; $(MAKE) modlintlib diff --git a/usr/src/uts/i86pc/Makefile.files b/usr/src/uts/i86pc/Makefile.files index 895e3362c8..8ec4d23a1e 100644 --- a/usr/src/uts/i86pc/Makefile.files +++ b/usr/src/uts/i86pc/Makefile.files @@ -186,15 +186,6 @@ ROOTNEX_OBJS += rootnex.o TZMON_OBJS += tzmon.o UPPC_OBJS += uppc.o psm_common.o XSVC_OBJS += xsvc.o -PV_CMDK_OBJS += pv_cmdk.o -PV_RTLS_OBJS += pv_rtls.o -HVM_BOOTSTRAP_OBJS += hvm_bootstrap.o -XDF_OBJS += xdf.o -XNF_OBJS += xnf.o -XPV_OBJS += xpv_support.o xvdi.o gnttab.o evtchn.o \ - xenbus_comms.o xenbus_client.o xenbus_probe.o xenbus_xs.o \ - hypercall.o hypersubr.o -XPVD_OBJS += xpvd.o # # Build up defines and paths. diff --git a/usr/src/uts/i86pc/Makefile.i86pc.shared b/usr/src/uts/i86pc/Makefile.i86pc.shared index 37da8ed6bb..18bc7610e2 100644 --- a/usr/src/uts/i86pc/Makefile.i86pc.shared +++ b/usr/src/uts/i86pc/Makefile.i86pc.shared @@ -42,6 +42,17 @@ PLATFORM = i86pc UNAME_M = $(PLATFORM) # +# Definitions for the platform-specific /platform directories. +# +# IMPLEMENTATIONS is used to designate i86pc machines which have +# platform specific modules. All code specific to a given implementation +# resides in the appropriately named subdirectory. This requires +# these platforms to have their own Makefiles to define ROOT_PLAT_DIRS, +# USR_PLAT_DIRS, etc. +# +IMPLEMENTATIONS = i86hvm + +# # Everybody needs to know how to build modstubs.o and to locate unix.o # UNIX_DIR = $(UTSBASE)/$(PLATFORM)/unix @@ -246,12 +257,6 @@ DRV_KMODS += xsvc DRV_KMODS += mc-amd DRV_KMODS += tzmon DRV_KMODS += battery -DRV_KMODS += pv_cmdk -DRV_KMODS += pv_rtls -DRV_KMODS += xdf -DRV_KMODS += xnf -DRV_KMODS += xpv -DRV_KMODS += xpvd DRV_KMODS += cpudrv @@ -299,7 +304,7 @@ SYS_KMODS += # # 'Misc' Modules (/kernel/misc): # -MISC_KMODS += gfx_private pcie hvm_bootstrap +MISC_KMODS += gfx_private pcie # # 'Dacf' modules (/kernel/dacf) diff --git a/usr/src/uts/i86pc/Makefile.rules b/usr/src/uts/i86pc/Makefile.rules index afd1209ebf..a411dd1ad5 100644 --- a/usr/src/uts/i86pc/Makefile.rules +++ b/usr/src/uts/i86pc/Makefile.rules @@ -20,7 +20,7 @@ # # -# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -32,8 +32,8 @@ # # The following two-level ordering must be maintained in this file. # Lines are sorted first in order of decreasing specificity based on -# the first directory component. That is, sun4u rules come before -# sparc rules come before common rules. +# the first directory component. That is, i86pc rules come before +# intel rules come before common rules. # # Lines whose initial directory components are equal are sorted # alphabetically by the remaining components. @@ -110,13 +110,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/tzmon/%.c $(COMPILE.c) -o $@ $< $(CTFCONVERT_O) -$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/xpv/%.c - $(COMPILE.c) -o $@ $< - $(CTFCONVERT_O) - -$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/xpv/%.s - $(COMPILE.s) -o $@ $< - $(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/ml/%.s $(COMPILE.s) -o $@ $< @@ -152,14 +145,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/gfx_private/%.c $(COMPILE.c) -o $@ $< $(CTFCONVERT_O) -$(OBJS_DIR)/%.o: $(UTSBASE)/common/xen/io/%.c - $(COMPILE.c) -o $@ $< - $(CTFCONVERT_O) - -$(OBJS_DIR)/%.o: $(UTSBASE)/common/xen/os/%.c - $(COMPILE.c) -o $@ $< - $(CTFCONVERT_O) - $(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/io/xsvc/%.c $(COMPILE.c) -o $@ $< $(CTFCONVERT_O) @@ -304,12 +289,6 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/psm/%.s $(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/tzmon/%.c @($(LHEAD) $(LINT.c) $< $(LTAIL)) -$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/xpv/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/xpv/%.s - @($(LHEAD) $(LINT.s) $< $(LTAIL)) - $(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/ml/%.s @($(LHEAD) $(LINT.s) $< $(LTAIL)) @@ -340,12 +319,6 @@ $(LINTS_DIR)/%.ln: $(SRC)/common/atomic/%.c $(LINTS_DIR)/%.ln: $(SRC)/common/mc/mc-amd/%.c @($(LHEAD) $(LINT.c) $< $(LTAIL)) -$(LINTS_DIR)/%.ln: $(UTSBASE)/common/xen/io/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - -$(LINTS_DIR)/%.ln: $(UTSBASE)/common/xen/os/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - $(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/gfx_private/%.c @($(LHEAD) $(LINT.c) $< $(LTAIL)) diff --git a/usr/src/uts/i86pc/i86hvm/Makefile b/usr/src/uts/i86pc/i86hvm/Makefile new file mode 100644 index 0000000000..07de533f70 --- /dev/null +++ b/usr/src/uts/i86pc/i86hvm/Makefile @@ -0,0 +1,108 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# uts/i86pc/i86hvm/Makefile +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" +# +# This makefile drives the production of the i86hvm platform modules. +# +# i86pc implementation architecture dependent +# + +# +# Path to the base of the uts directory tree (usually /usr/src/uts). +# +UTSBASE = ../.. + +# +# Include common rules. +# +include $(UTSBASE)/i86pc/i86hvm/Makefile.i86hvm + +def := TARGET= def +all := TARGET= all +install := TARGET= install +install_h := TARGET= install_h +clean := TARGET= clean +clobber := TARGET= clobber +lint := TARGET= lint +lintlib := TARGET= lintlib +modlintlib := TARGET= modlintlib +modlist := TARGET= modlist +modlist := NO_STATE= -K $$MODSTATE$$$$ +clean.lint := TARGET= clean.lint +check := TARGET= check + +# +# Default build targets. +# +.KEEP_STATE: + +.PARALLEL: $(HVM_KMODS) + +def all clean clobber clean.lint modlist modlintlib: $(HVM_KMODS) + +install: install_implementations .WAIT \ + $(HVM_KMODS) + +install_implementations: \ + $(ROOT_HVM_DIR) \ + $(ROOT_HVM_DRV_DIR) \ + $(ROOT_HVM_MISC_DIR) \ + $(USR_HVM_DIR) + +$(HVM_KMODS): FRC + @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET) + +install_h check: FRC + +lintlib lint: modlintlib .WAIT $(LINT_DEPS) + +# +# The 'lint.platmod' target lints the i86hvm platform modules against the i86pc +# kernel. This ends up doing all the kernel cross-checks. +# +LINT_TARGET = lint.platmod +INTEL_LIB_DIR = $(UTSBASE)/intel/lint-libs/$(OBJS_DIR) +INTEL_LINTS = genunix +LINT_LIBS = $(LINT_LIB) \ + -L$(HVM_LINT_LIB_DIR) \ + -L$(LINT_LIB_DIR) \ + $(GENUNIX_KMODS:%=-l%) \ + $(PARALLEL_KMODS:%=-l%) \ + $(CLOSED_KMODS:%=-l%) \ + -L$(INTEL_LIB_DIR) \ + $(INTEL_LINTS:%=-l%) + +# workaround for multiply defined errors +lint.platmod := LINTFLAGS += -erroff=E_NAME_MULTIPLY_DEF2 + +lint.platmod: modlintlib + @-$(ECHO) "\ni86hvm platform-dependent module: global crosschecks:" + @-$(LINT) $(LINTFLAGS) $(LINT_LIBS) 2>&1 | $(LGREP.2) + +# +# Include common targets. +# +include $(UTSBASE)/$(PLATFORM)/i86hvm/Makefile.targ diff --git a/usr/src/uts/i86pc/i86hvm/Makefile.files b/usr/src/uts/i86pc/i86hvm/Makefile.files new file mode 100644 index 0000000000..03ff880f7c --- /dev/null +++ b/usr/src/uts/i86pc/i86hvm/Makefile.files @@ -0,0 +1,49 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# +# This Makefile defines file modules in the directory uts/i86pc/i86hvm +# and its children. These are the source files which are i86pc/i86hvm +# "implementation architecture" dependent. +# + +# +# Define objects +# +PV_CMDK_OBJS += pv_cmdk.o +PV_RTLS_OBJS += pv_rtls.o +HVM_BOOTSTRAP_OBJS += hvm_bootstrap.o +XDF_OBJS += xdf.o +XNF_OBJS += xnf.o +XPV_OBJS += xpv_support.o xvdi.o gnttab.o evtchn.o \ + xenbus_comms.o xenbus_client.o xenbus_probe.o \ + xenbus_xs.o hypercall.o hypersubr.o +XPVD_OBJS += xpvd.o + +# +# Include i86hvm header files +# -I$(UTSBASE)/../common +INC_PATH += -I$(UTSBASE)/common/xen -I$(UTSBASE)/i86pc/i86hvm diff --git a/usr/src/uts/i86pc/Makefile.hvm b/usr/src/uts/i86pc/i86hvm/Makefile.i86hvm index 867c5f2897..0e414c5fb1 100644 --- a/usr/src/uts/i86pc/Makefile.hvm +++ b/usr/src/uts/i86pc/i86hvm/Makefile.i86hvm @@ -30,7 +30,7 @@ # in an HVM environment. # -ROOT_HVM_DIR = $(ROOT)/platform/i86hvm +ROOT_HVM_DIR = $(ROOT_PLAT_DIR)/i86hvm ROOT_HVM_MOD_DIR = $(ROOT_HVM_DIR)/kernel ROOT_HVM_DRV_DIR_32 = $(ROOT_HVM_MOD_DIR)/drv ROOT_HVM_DRV_DIR_64 = $(ROOT_HVM_MOD_DIR)/drv/$(MACH64) @@ -38,39 +38,29 @@ ROOT_HVM_DRV_DIR = $(ROOT_HVM_DRV_DIR_$(CLASS)) ROOT_HVM_MISC_DIR_32 = $(ROOT_HVM_MOD_DIR)/misc ROOT_HVM_MISC_DIR_64 = $(ROOT_HVM_MOD_DIR)/misc/$(MACH64) ROOT_HVM_MISC_DIR = $(ROOT_HVM_MISC_DIR_$(CLASS)) -USR_HVM_DIR = $(ROOT)/usr/platform/i86hvm +USR_HVM_DIR = $(USR_PLAT_DIR)/i86hvm + +HVM_LINT_LIB_DIR= $(UTSBASE)/$(PLATFORM)/i86hvm/lint-libs/$(OBJS_DIR) # -# Indicate that we are building for the i86hvm semi-platform +# Define modules. # -CPPFLAGS += -DXPV_HVM_DRIVER -ASFLAGS += -DXPV_HVM_DRIVER +HVM_DRV_KMODS = pv_cmdk pv_rtls xdf xnf xpv xpvd +HVM_MISC_KMODS = hvm_bootstrap +HVM_KMODS = $(HVM_DRV_KMODS) $(HVM_MISC_KMODS) +include $(UTSBASE)/i86pc/i86hvm/Makefile.files # -# Installation targets and rules: +# Include common rules. # -$(ROOT_HVM_DIR): - -$(INS.dir.root.sys) - -$(ROOT_HVM_MOD_DIR): $(ROOT_HVM_DIR) - -$(INS.dir.root.sys) - -$(ROOT_HVM_DRV_DIR): $(ROOT_MOD_DIR) - -$(INS.dir.root.sys) - -$(ROOT_HVM_MISC_DIR): $(ROOT_MOD_DIR) - -$(INS.dir.root.sys) - -$(ROOT_HVM_MOD_DIR)/%: $(OBJS_DIR)/% $(ROOT_HVM_MOD_DIR) FRC - $(INS.file) +include $(UTSBASE)/i86pc/Makefile.i86pc -$(ROOT_HVM_DRV_DIR)/%: $(OBJS_DIR)/% $(ROOT_HVM_DRV_DIR) FRC - $(INS.file) +LINTS_DIR = $(OBJS_DIR) +LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/lint-libs/$(OBJS_DIR) -$(ROOT_HVM_MISC_DIR)/%: $(OBJS_DIR)/% $(ROOT_HVM_MISC_DIR) FRC - $(INS.file) - -$(USR_HVM_DIR): - -$(INS.dir.root.sys) - -INSTALL_DEPS += $(ROOT_HVM_DIR) $(USR_HVM_DIR) +# +# Indicate that we are building for the i86hvm semi-platform. +# Also use Solaris specific code in xen public header files. +# +CPPFLAGS += -DXPV_HVM_DRIVER -D_SOLARIS +ASFLAGS += -DXPV_HVM_DRIVER diff --git a/usr/src/uts/i86pc/i86hvm/Makefile.rules b/usr/src/uts/i86pc/i86hvm/Makefile.rules new file mode 100644 index 0000000000..4a9c0edec8 --- /dev/null +++ b/usr/src/uts/i86pc/i86hvm/Makefile.rules @@ -0,0 +1,73 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" +# + +# +# This Makefile defines the build rules for the directory +# uts/i86pc/i86hvm. +# +# The following two-level ordering must be maintained in this file. +# Lines are sorted first in order of decreasing specificity based on +# the first directory component. That is, i86pc rules come before +# intel rules come before common rules. +# +# Lines whose initial directory components are equal are sorted +# alphabetically by the remaining components. + +# +# Section 1a: C object build rules +# + +$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/i86hvm/io/xpv/%.c + $(COMPILE.c) -o $@ $< + $(CTFCONVERT_O) + +$(OBJS_DIR)/%.o: $(UTSBASE)/i86pc/i86hvm/io/%.c + $(COMPILE.c) -o $@ $< + $(CTFCONVERT_O) + +$(OBJS_DIR)/%.o: $(UTSBASE)/common/xen/io/%.c + $(COMPILE.c) -o $@ $< + $(CTFCONVERT_O) + +$(OBJS_DIR)/%.o: $(UTSBASE)/common/xen/os/%.c + $(COMPILE.c) -o $@ $< + $(CTFCONVERT_O) + +# +# Section 1b: Lint `object' build rules +# + +$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/i86hvm/io/xpv/%.c + @($(LHEAD) $(LINT.c) $< $(LTAIL)) + +$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/i86hvm/io/%.c + @($(LHEAD) $(LINT.c) $< $(LTAIL)) + +$(LINTS_DIR)/%.ln: $(UTSBASE)/common/xen/io/%.c + @($(LHEAD) $(LINT.c) $< $(LTAIL)) + +$(LINTS_DIR)/%.ln: $(UTSBASE)/common/xen/os/%.c + @($(LHEAD) $(LINT.c) $< $(LTAIL)) diff --git a/usr/src/uts/i86pc/i86hvm/Makefile.targ b/usr/src/uts/i86pc/i86hvm/Makefile.targ new file mode 100644 index 0000000000..29493a64fb --- /dev/null +++ b/usr/src/uts/i86pc/i86hvm/Makefile.targ @@ -0,0 +1,63 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +#pragma ident "%Z%%M% %I% %E% SMI" +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# Common targets for i86hvm platform-implementation specific modules. +# + +.KEEP_STATE: + +# +# Rules for implementation subdirectories. +# +$(ROOT_HVM_DIR): + -$(INS.dir.root.sys) + +$(ROOT_HVM_MOD_DIR): $(ROOT_HVM_DIR) + -$(INS.dir.root.sys) + +$(ROOT_HVM_DRV_DIR): $(ROOT_MOD_DIR) + -$(INS.dir.root.sys) + +$(ROOT_HVM_MISC_DIR): $(ROOT_MOD_DIR) + -$(INS.dir.root.sys) + +$(ROOT_HVM_MOD_DIR)/%: $(OBJS_DIR)/% $(ROOT_HVM_MOD_DIR) FRC + $(INS.file) + +$(ROOT_HVM_DRV_DIR)/%: $(OBJS_DIR)/% $(ROOT_HVM_DRV_DIR) FRC + $(INS.file) + +$(ROOT_HVM_MISC_DIR)/%: $(OBJS_DIR)/% $(ROOT_HVM_MISC_DIR) FRC + $(INS.file) + +$(USR_HVM_DIR): + -$(INS.dir.root.sys) + +# +# Include common targets. +# +include $(UTSBASE)/$(PLATFORM)/i86hvm/Makefile.rules +include $(UTSBASE)/$(PLATFORM)/Makefile.targ diff --git a/usr/src/uts/i86pc/hvm_bootstrap/Makefile b/usr/src/uts/i86pc/i86hvm/hvm_bootstrap/Makefile index 4b983fd2da..ea250a88a7 100644 --- a/usr/src/uts/i86pc/hvm_bootstrap/Makefile +++ b/usr/src/uts/i86pc/i86hvm/hvm_bootstrap/Makefile @@ -31,7 +31,7 @@ # # Path to the base of the uts directory tree (usually /usr/src/uts). # -UTSBASE = ../.. +UTSBASE = ../../.. # # Define the module and object file sets. @@ -44,8 +44,7 @@ ROOTMODULE = $(ROOT_HVM_MISC_DIR)/$(MODULE) # # Include common rules. # -include $(UTSBASE)/i86pc/Makefile.i86pc -include $(UTSBASE)/i86pc/Makefile.hvm +include $(UTSBASE)/i86pc/i86hvm/Makefile.i86hvm # # Define targets @@ -81,4 +80,4 @@ install: $(INSTALL_DEPS) # # Include common targets. # -include $(UTSBASE)/i86pc/Makefile.targ +include $(UTSBASE)/i86pc/i86hvm/Makefile.targ diff --git a/usr/src/uts/common/xen/io/hvm_bootstrap.c b/usr/src/uts/i86pc/i86hvm/io/hvm_bootstrap.c index 95b9df1a82..95b9df1a82 100644 --- a/usr/src/uts/common/xen/io/hvm_bootstrap.c +++ b/usr/src/uts/i86pc/i86hvm/io/hvm_bootstrap.c diff --git a/usr/src/uts/i86pc/io/pv_cmdk.c b/usr/src/uts/i86pc/i86hvm/io/pv_cmdk.c index 4ad9b06aec..4ad9b06aec 100644 --- a/usr/src/uts/i86pc/io/pv_cmdk.c +++ b/usr/src/uts/i86pc/i86hvm/io/pv_cmdk.c diff --git a/usr/src/uts/i86pc/io/pv_rtls.c b/usr/src/uts/i86pc/i86hvm/io/pv_rtls.c index 40303870b4..40303870b4 100644 --- a/usr/src/uts/i86pc/io/pv_rtls.c +++ b/usr/src/uts/i86pc/i86hvm/io/pv_rtls.c diff --git a/usr/src/uts/i86pc/io/xpv/evtchn.c b/usr/src/uts/i86pc/i86hvm/io/xpv/evtchn.c index 14d5bcc4b9..14d5bcc4b9 100644 --- a/usr/src/uts/i86pc/io/xpv/evtchn.c +++ b/usr/src/uts/i86pc/i86hvm/io/xpv/evtchn.c diff --git a/usr/src/uts/i86pc/io/xpv/xpv.conf b/usr/src/uts/i86pc/i86hvm/io/xpv/xpv.conf index d599f6f3ff..d599f6f3ff 100644 --- a/usr/src/uts/i86pc/io/xpv/xpv.conf +++ b/usr/src/uts/i86pc/i86hvm/io/xpv/xpv.conf diff --git a/usr/src/uts/i86pc/io/xpv/xpv_support.c b/usr/src/uts/i86pc/i86hvm/io/xpv/xpv_support.c index f5de99a175..f5de99a175 100644 --- a/usr/src/uts/i86pc/io/xpv/xpv_support.c +++ b/usr/src/uts/i86pc/i86hvm/io/xpv/xpv_support.c diff --git a/usr/src/uts/i86pc/pv_cmdk/Makefile b/usr/src/uts/i86pc/i86hvm/pv_cmdk/Makefile index eedc08d972..5ae59dd0bb 100644 --- a/usr/src/uts/i86pc/pv_cmdk/Makefile +++ b/usr/src/uts/i86pc/i86hvm/pv_cmdk/Makefile @@ -34,7 +34,7 @@ # # Path to the base of the uts directory tree (usually /usr/src/uts). # -UTSBASE = ../.. +UTSBASE = ../../.. # # Define the module and object file sets. @@ -44,13 +44,10 @@ OBJECTS = $(PV_CMDK_OBJS:%=$(OBJS_DIR)/%) LINTS = $(PV_CMDK_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_HVM_DRV_DIR)/$(MODULE) -INC_PATH += -I$(UTSBASE)/common/xen -I$(UTSBASE)/../common - # # Include common rules. # -include $(UTSBASE)/i86pc/Makefile.i86pc -include $(UTSBASE)/i86pc/Makefile.hvm +include $(UTSBASE)/i86pc/i86hvm/Makefile.i86hvm # # When generating lint libraries, we want the name of the lint module @@ -66,12 +63,6 @@ ALL_TARGET = $(BINARY) LINT_TARGET = $(LINT_MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -# -# use Solaris specific code in xen public header files -# -CPPFLAGS += -D_SOLARIS -CPPFLAGS += -DXPV_HVM_DRIVER - LDFLAGS += -dy -Nmisc/strategy -Nmisc/cmlb LDFLAGS += -Ndrv/xpvd -Ndrv/xdf @@ -108,4 +99,4 @@ install: $(INSTALL_DEPS) # # Include common targets. # -include $(UTSBASE)/i86pc/Makefile.targ +include $(UTSBASE)/i86pc/i86hvm/Makefile.targ diff --git a/usr/src/uts/i86pc/pv_rtls/Makefile b/usr/src/uts/i86pc/i86hvm/pv_rtls/Makefile index a9f19fc182..a2cabdef52 100644 --- a/usr/src/uts/i86pc/pv_rtls/Makefile +++ b/usr/src/uts/i86pc/i86hvm/pv_rtls/Makefile @@ -32,7 +32,7 @@ # # Path to the base of the uts directory tree (usually /usr/src/uts). # -UTSBASE = ../.. +UTSBASE = ../../.. # # Define the module and object file sets. @@ -45,8 +45,7 @@ ROOTMODULE = $(ROOT_HVM_DRV_DIR)/$(MODULE) # # Include common rules. # -include $(UTSBASE)/i86pc/Makefile.i86pc -include $(UTSBASE)/i86pc/Makefile.hvm +include $(UTSBASE)/i86pc/i86hvm/Makefile.i86hvm # # When generating lint libraries, we want the name of the lint module @@ -88,4 +87,4 @@ install: $(INSTALL_DEPS) # # Include common targets. # -include $(UTSBASE)/i86pc/Makefile.targ +include $(UTSBASE)/i86pc/i86hvm/Makefile.targ diff --git a/usr/src/uts/i86pc/sys/xpv_support.h b/usr/src/uts/i86pc/i86hvm/sys/xpv_support.h index c42551b4f8..c42551b4f8 100644 --- a/usr/src/uts/i86pc/sys/xpv_support.h +++ b/usr/src/uts/i86pc/i86hvm/sys/xpv_support.h diff --git a/usr/src/uts/i86pc/xdf/Makefile b/usr/src/uts/i86pc/i86hvm/xdf/Makefile index 8f1f6513f9..4b7bbe75d8 100644 --- a/usr/src/uts/i86pc/xdf/Makefile +++ b/usr/src/uts/i86pc/i86hvm/xdf/Makefile @@ -32,8 +32,7 @@ # # Path to the base of the uts directory tree (usually /usr/src/uts). # -UTSBASE = ../.. -INC_PATH += -I$(UTSBASE)/common/xen +UTSBASE = ../../.. # # Define the module and object file sets. @@ -46,8 +45,7 @@ ROOTMODULE = $(ROOT_HVM_DRV_DIR)/$(MODULE) # # Include common rules. # -include $(UTSBASE)/i86pc/Makefile.i86pc -include $(UTSBASE)/i86pc/Makefile.hvm +include $(UTSBASE)/i86pc/i86hvm/Makefile.i86hvm # # Define targets @@ -57,7 +55,7 @@ LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # Overrides -CPPFLAGS += -DXPV_HVM_DRIVER -DHVMPV_XDF_VERS=1 +CPPFLAGS += -DHVMPV_XDF_VERS=1 LDFLAGS += -dy -Nmisc/cmlb -Ndrv/xpvd -Ndrv/xpv LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON @@ -88,4 +86,4 @@ install: $(INSTALL_DEPS) # # Include common targets. # -include $(UTSBASE)/i86pc/Makefile.targ +include $(UTSBASE)/i86pc/i86hvm/Makefile.targ diff --git a/usr/src/uts/i86pc/xnf/Makefile b/usr/src/uts/i86pc/i86hvm/xnf/Makefile index 614ba0649e..683572496f 100644 --- a/usr/src/uts/i86pc/xnf/Makefile +++ b/usr/src/uts/i86pc/i86hvm/xnf/Makefile @@ -36,7 +36,7 @@ # # Path to the base of the uts directory tree (usually /usr/src/uts). # -UTSBASE = ../.. +UTSBASE = ../../.. # # Define the module and object file sets. @@ -46,13 +46,10 @@ OBJECTS = $(XNF_OBJS:%=$(OBJS_DIR)/%) LINTS = $(XNF_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_HVM_DRV_DIR)/$(MODULE) -INC_PATH += -I$(UTSBASE)/common/xen - # # Include common rules. # -include $(UTSBASE)/i86pc/Makefile.i86pc -include $(UTSBASE)/i86pc/Makefile.hvm +include $(UTSBASE)/i86pc/i86hvm/Makefile.i86hvm # # Define targets @@ -64,9 +61,9 @@ INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # # Driver depends on MAC & IP # +CPPFLAGS += -DHVMPV_XNF_VERS=1 LDFLAGS += -dy -Nmisc/mac -Ndrv/ip -Ndrv/xpvd -Ndrv/xpv -CPPFLAGS += -D_SOLARIS -DHVMPV_XNF_VERS=1 LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN @@ -95,4 +92,4 @@ install: $(INSTALL_DEPS) # # Include common targets. # -include $(UTSBASE)/i86pc/Makefile.targ +include $(UTSBASE)/i86pc/i86hvm/Makefile.targ diff --git a/usr/src/uts/i86pc/xpv/Makefile b/usr/src/uts/i86pc/i86hvm/xpv/Makefile index 2d55ddd1b1..a1ff318e68 100644 --- a/usr/src/uts/i86pc/xpv/Makefile +++ b/usr/src/uts/i86pc/i86hvm/xpv/Makefile @@ -36,7 +36,7 @@ # # Path to the base of the uts directory tree (usually /usr/src/uts). # -UTSBASE = ../.. +UTSBASE = ../../.. # # Define the module and object file sets. @@ -45,15 +45,12 @@ MODULE = xpv OBJECTS = $(XPV_OBJS:%=$(OBJS_DIR)/%) LINTS = $(XPV_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_HVM_DRV_DIR)/$(MODULE) -CONF_SRCDIR = $(UTSBASE)/i86pc/io/xpv - -INC_PATH += -I$(UTSBASE)/common/xen -I$(UTSBASE)/../common +CONF_SRCDIR = $(UTSBASE)/i86pc/i86hvm/io/xpv # # Include common rules. # -include $(UTSBASE)/i86pc/Makefile.i86pc -include $(UTSBASE)/i86pc/Makefile.hvm +include $(UTSBASE)/i86pc/i86hvm/Makefile.i86hvm # # Define targets @@ -62,7 +59,7 @@ ALL_TARGET = $(BINARY) $(CONFMOD) LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) -CPPFLAGS += -D_SOLARIS -DHVMPV_XPV_VERS=1 +CPPFLAGS += -DHVMPV_XPV_VERS=1 LDFLAGS += -dy -N mach/pcplusmp # @@ -98,4 +95,4 @@ install: $(INSTALL_DEPS) # # Include common targets. # -include $(UTSBASE)/i86pc/Makefile.targ +include $(UTSBASE)/i86pc/i86hvm/Makefile.targ diff --git a/usr/src/uts/i86pc/xpvd/Makefile b/usr/src/uts/i86pc/i86hvm/xpvd/Makefile index b392f4819e..283bd34e5e 100644 --- a/usr/src/uts/i86pc/xpvd/Makefile +++ b/usr/src/uts/i86pc/i86hvm/xpvd/Makefile @@ -33,7 +33,7 @@ # # Path to the base of the uts directory tree (usually /usr/src/uts). # -UTSBASE = ../.. +UTSBASE = ../../.. # # Define the module and object file sets. @@ -47,8 +47,7 @@ CONF_SRCDIR = $(UTSBASE)/common/xen/io # # Include common rules. # -include $(UTSBASE)/i86pc/Makefile.i86pc -include $(UTSBASE)/i86pc/Makefile.hvm +include $(UTSBASE)/i86pc/i86hvm/Makefile.i86hvm # # Define targets @@ -57,8 +56,6 @@ ALL_TARGET = $(BINARY) $(CONFMOD) LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) -INC_PATH += -I$(UTSBASE)/common/xen -I$(UTSBASE)/../common - CPPFLAGS += -DHVMPV_XPVD_VERS=1 LDFLAGS += -dy -Ndrv/xpv @@ -90,4 +87,4 @@ install: $(INSTALL_DEPS) # # Include common targets. # -include $(UTSBASE)/i86pc/Makefile.targ +include $(UTSBASE)/i86pc/i86hvm/Makefile.targ |