Print this page
8956 Implement KPTI
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>


   4 # The contents of this file are subject to the terms of the
   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 #
  22 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 # Copyright 2012 Joyent, Inc.  All rights reserved.
  25 # Copyright 2017 Nexenta Systems, Inc.
  26 #
  27 
  28 #
  29 #       This Makefile defines all file modules and build rules for the
  30 # directory uts/intel and its children. These are the source files which
  31 # are specific to the intel processor.
  32 #
  33 #       The following two-level ordering must be maintained in this file.
  34 #         Lines are sorted first in order of decreasing specificity based on
  35 #         the first directory component.  That is, sun4u rules come before
  36 #         sparc rules come before common rules.
  37 #
  38 #         Lines whose initial directory components are equal are sorted
  39 #         alphabetically by the remaining components.
  40 
  41 #
  42 # Need a way to distinguish between the ia32 and amd64 subdirs.
  43 #
  44 SUBARCH_DIR_32 = ia32


 255 
 256 $(OBJS_DIR)/%.o:                $(UTSBASE)/intel/promif/%.c
 257         $(COMPILE.c) -o $@ $<
 258         $(CTFCONVERT_O)
 259 
 260 $(OBJS_DIR)/%.o:                $(UTSBASE)/intel/syscall/%.c
 261         $(COMPILE.c) -o $@ $<
 262         $(CTFCONVERT_O)
 263 
 264 $(OBJS_DIR)/%.o:                $(UTSBASE)/common/os/%.c
 265         $(COMPILE.c) -o $@ $<
 266         $(CTFCONVERT_O)
 267 
 268 $(OBJS_DIR)/%.o:                $(UTSBASE)/intel/kdi/%.c
 269         $(COMPILE.c) -o $@ $<
 270         $(CTFCONVERT_O)
 271 
 272 $(OBJS_DIR)/%.o:                $(UTSBASE)/intel/kdi/%.s
 273         $(COMPILE.s) -o $@ $<
 274 
 275 $(OBJS_DIR)/%.o:                $(UTSBASE)/intel/kdi/$(SUBARCH_DIR)/%.s
 276         $(COMPILE.s) -o $@ $<
 277 
 278 $(OBJS_DIR)/%.o:                $(UTSBASE)/intel/zfs/%.c
 279         $(COMPILE.c) -o $@ $<
 280         $(CTFCONVERT_O)
 281 
 282 #
 283 # krtld compiled into unix
 284 #
 285 
 286 KRTLD_INC_PATH  = -I$(UTSBASE)/common/krtld -I$(UTSBASE)/intel/sys
 287 KRTLD_INC_PATH  += -I$(UTSBASE)/intel/$(SUBARCH_DIR)/krtld
 288 
 289 KRTLD_CPPFLAGS_32       = -DELF_TARGET_386
 290 KRTLD_CPPFLAGS_64       = -DELF_TARGET_AMD64 -DMODDIR_SUFFIX=\"amd64\"
 291 KRTLD_CPPFLAGS          = $(KRTLD_CPPFLAGS_$(CLASS)) -D_KRTLD
 292 
 293 $(OBJS_DIR)/%.o:        $(UTSBASE)/common/krtld/%.c
 294         $(COMPILE.c) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) -o $@ $<
 295         $(CTFCONVERT_O)
 296 
 297 $(OBJS_DIR)/%.o:        $(UTSBASE)/intel/$(SUBARCH_DIR)/krtld/%.c


 472         @($(LHEAD) $(LINT.c) $< $(LTAIL))
 473 
 474 $(LINTS_DIR)/%.ln:              $(UTSBASE)/intel/pcbe/%.c
 475         @($(LHEAD) $(LINT.c) $< $(LTAIL))
 476 
 477 $(LINTS_DIR)/%.ln:              $(UTSBASE)/intel/promif/%.c
 478         @($(LHEAD) $(LINT.c) $< $(LTAIL))
 479 
 480 $(LINTS_DIR)/%.ln:              $(UTSBASE)/intel/syscall/%.c
 481         @($(LHEAD) $(LINT.c) $< $(LTAIL))
 482 
 483 $(LINTS_DIR)/%.ln:              $(UTSBASE)/common/os/%.c
 484         @($(LHEAD) $(LINT.c) $< $(LTAIL))
 485 
 486 $(LINTS_DIR)/%.ln:              $(UTSBASE)/intel/kdi/%.c
 487         @($(LHEAD) $(LINT.c) $< $(LTAIL))
 488 
 489 $(LINTS_DIR)/%.ln:              $(UTSBASE)/intel/kdi/%.s
 490         @($(LHEAD) $(LINT.s) $< $(LTAIL))
 491 
 492 $(LINTS_DIR)/%.ln:              $(UTSBASE)/intel/kdi/$(SUBARCH_DIR)/%.s
 493         @($(LHEAD) $(LINT.s) $< $(LTAIL))
 494 
 495 $(LINTS_DIR)/%.ln:              $(UTSBASE)/intel/nskern/%.s
 496         @($(LHEAD) $(LINT.s) $< $(LTAIL))
 497 
 498 #
 499 # krtld lints
 500 #
 501 $(LINTS_DIR)/%.ln:              $(UTSBASE)/common/krtld/%.c
 502         @($(LHEAD) $(LINT.c) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) $< $(LTAIL))
 503 
 504 $(LINTS_DIR)/%.ln:      $(UTSBASE)/intel/$(SUBARCH_DIR)/krtld/%.c
 505         @($(LHEAD) $(LINT.c) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) $< $(LTAIL))
 506 
 507 $(LINTS_DIR)/%.ln:      $(UTSBASE)/intel/$(SUBARCH_DIR)/krtld/%.s
 508         @($(LHEAD) $(LINT.s) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) $< $(LTAIL))
 509 
 510 $(LINTS_DIR)/%.ln:      $(SRC)/common/util/$(SUBARCH_DIR)/%.c
 511         @($(LHEAD) $(LINT.c) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) $< $(LTAIL))
 512 
 513 $(OBJS_DIR)/kobj.ln             := CPPFLAGS += -D_DBOOT


   4 # The contents of this file are subject to the terms of the
   5 # Common Development and Distribution License (the "License").
   6 # You may not use this file except in compliance with the License.
   7 #
   8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9 # or http://www.opensolaris.org/os/licensing.
  10 # See the License for the specific language governing permissions
  11 # and limitations under the License.
  12 #
  13 # When distributing Covered Code, include this CDDL HEADER in each
  14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15 # If applicable, add the following below this CDDL HEADER, with the
  16 # fields enclosed by brackets "[]" replaced with your own identifying
  17 # information: Portions Copyright [yyyy] [name of copyright owner]
  18 #
  19 # CDDL HEADER END
  20 #
  21 #
  22 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 # Copyright 2018 Joyent, Inc.  All rights reserved.
  25 # Copyright 2017 Nexenta Systems, Inc.
  26 #
  27 
  28 #
  29 #       This Makefile defines all file modules and build rules for the
  30 # directory uts/intel and its children. These are the source files which
  31 # are specific to the intel processor.
  32 #
  33 #       The following two-level ordering must be maintained in this file.
  34 #         Lines are sorted first in order of decreasing specificity based on
  35 #         the first directory component.  That is, sun4u rules come before
  36 #         sparc rules come before common rules.
  37 #
  38 #         Lines whose initial directory components are equal are sorted
  39 #         alphabetically by the remaining components.
  40 
  41 #
  42 # Need a way to distinguish between the ia32 and amd64 subdirs.
  43 #
  44 SUBARCH_DIR_32 = ia32


 255 
 256 $(OBJS_DIR)/%.o:                $(UTSBASE)/intel/promif/%.c
 257         $(COMPILE.c) -o $@ $<
 258         $(CTFCONVERT_O)
 259 
 260 $(OBJS_DIR)/%.o:                $(UTSBASE)/intel/syscall/%.c
 261         $(COMPILE.c) -o $@ $<
 262         $(CTFCONVERT_O)
 263 
 264 $(OBJS_DIR)/%.o:                $(UTSBASE)/common/os/%.c
 265         $(COMPILE.c) -o $@ $<
 266         $(CTFCONVERT_O)
 267 
 268 $(OBJS_DIR)/%.o:                $(UTSBASE)/intel/kdi/%.c
 269         $(COMPILE.c) -o $@ $<
 270         $(CTFCONVERT_O)
 271 
 272 $(OBJS_DIR)/%.o:                $(UTSBASE)/intel/kdi/%.s
 273         $(COMPILE.s) -o $@ $<
 274 



 275 $(OBJS_DIR)/%.o:                $(UTSBASE)/intel/zfs/%.c
 276         $(COMPILE.c) -o $@ $<
 277         $(CTFCONVERT_O)
 278 
 279 #
 280 # krtld compiled into unix
 281 #
 282 
 283 KRTLD_INC_PATH  = -I$(UTSBASE)/common/krtld -I$(UTSBASE)/intel/sys
 284 KRTLD_INC_PATH  += -I$(UTSBASE)/intel/$(SUBARCH_DIR)/krtld
 285 
 286 KRTLD_CPPFLAGS_32       = -DELF_TARGET_386
 287 KRTLD_CPPFLAGS_64       = -DELF_TARGET_AMD64 -DMODDIR_SUFFIX=\"amd64\"
 288 KRTLD_CPPFLAGS          = $(KRTLD_CPPFLAGS_$(CLASS)) -D_KRTLD
 289 
 290 $(OBJS_DIR)/%.o:        $(UTSBASE)/common/krtld/%.c
 291         $(COMPILE.c) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) -o $@ $<
 292         $(CTFCONVERT_O)
 293 
 294 $(OBJS_DIR)/%.o:        $(UTSBASE)/intel/$(SUBARCH_DIR)/krtld/%.c


 469         @($(LHEAD) $(LINT.c) $< $(LTAIL))
 470 
 471 $(LINTS_DIR)/%.ln:              $(UTSBASE)/intel/pcbe/%.c
 472         @($(LHEAD) $(LINT.c) $< $(LTAIL))
 473 
 474 $(LINTS_DIR)/%.ln:              $(UTSBASE)/intel/promif/%.c
 475         @($(LHEAD) $(LINT.c) $< $(LTAIL))
 476 
 477 $(LINTS_DIR)/%.ln:              $(UTSBASE)/intel/syscall/%.c
 478         @($(LHEAD) $(LINT.c) $< $(LTAIL))
 479 
 480 $(LINTS_DIR)/%.ln:              $(UTSBASE)/common/os/%.c
 481         @($(LHEAD) $(LINT.c) $< $(LTAIL))
 482 
 483 $(LINTS_DIR)/%.ln:              $(UTSBASE)/intel/kdi/%.c
 484         @($(LHEAD) $(LINT.c) $< $(LTAIL))
 485 
 486 $(LINTS_DIR)/%.ln:              $(UTSBASE)/intel/kdi/%.s
 487         @($(LHEAD) $(LINT.s) $< $(LTAIL))
 488 



 489 $(LINTS_DIR)/%.ln:              $(UTSBASE)/intel/nskern/%.s
 490         @($(LHEAD) $(LINT.s) $< $(LTAIL))
 491 
 492 #
 493 # krtld lints
 494 #
 495 $(LINTS_DIR)/%.ln:              $(UTSBASE)/common/krtld/%.c
 496         @($(LHEAD) $(LINT.c) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) $< $(LTAIL))
 497 
 498 $(LINTS_DIR)/%.ln:      $(UTSBASE)/intel/$(SUBARCH_DIR)/krtld/%.c
 499         @($(LHEAD) $(LINT.c) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) $< $(LTAIL))
 500 
 501 $(LINTS_DIR)/%.ln:      $(UTSBASE)/intel/$(SUBARCH_DIR)/krtld/%.s
 502         @($(LHEAD) $(LINT.s) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) $< $(LTAIL))
 503 
 504 $(LINTS_DIR)/%.ln:      $(SRC)/common/util/$(SUBARCH_DIR)/%.c
 505         @($(LHEAD) $(LINT.c) $(KRTLD_INC_PATH) $(KRTLD_CPPFLAGS) $< $(LTAIL))
 506 
 507 $(OBJS_DIR)/kobj.ln             := CPPFLAGS += -D_DBOOT