diff options
author | fr41279 <none@none> | 2008-05-06 06:40:38 -0700 |
---|---|---|
committer | fr41279 <none@none> | 2008-05-06 06:40:38 -0700 |
commit | b60f2a0b921611326383e4789e0874e9e8a2e708 (patch) | |
tree | 8818dcfe5f30313e6c73cfbc280d4218ab9f4034 /usr/src/uts/intel/bignum | |
parent | 3c1bce15918aed7fd25ce57449e5ca2c718cbc1e (diff) | |
download | illumos-joyent-b60f2a0b921611326383e4789e0874e9e8a2e708.tar.gz |
6494306 need single source for bignum code
--HG--
rename : usr/src/uts/sun4u/rsa/Makefile => deleted_files/usr/src/uts/sun4u/rsa/Makefile
rename : usr/src/uts/sun4u/rsa/mont_mulf.s => usr/src/common/bignum/sun4u/mont_mulf_kernel_v9.s
rename : usr/src/uts/intel/rsa/Makefile.32 => usr/src/uts/intel/bignum/Makefile.32
rename : usr/src/uts/intel/rsa/Makefile.64 => usr/src/uts/intel/bignum/Makefile.64
Diffstat (limited to 'usr/src/uts/intel/bignum')
-rw-r--r-- | usr/src/uts/intel/bignum/Makefile | 96 | ||||
-rw-r--r-- | usr/src/uts/intel/bignum/Makefile.32 | 64 | ||||
-rw-r--r-- | usr/src/uts/intel/bignum/Makefile.64 | 67 |
3 files changed, 227 insertions, 0 deletions
diff --git a/usr/src/uts/intel/bignum/Makefile b/usr/src/uts/intel/bignum/Makefile new file mode 100644 index 0000000000..71a396f2fe --- /dev/null +++ b/usr/src/uts/intel/bignum/Makefile @@ -0,0 +1,96 @@ +# +# 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 drives the production of the RSA KEF provider. +# +# intel implementation architecture dependent +# + +# +# Path to the base of the uts directory tree (usually /usr/src/uts). +# +UTSBASE = ../.. +BIGNUMDIR = $(COMMONBASE)/bignum + +# +# Define the module and object file sets. +# +MODULE = bignum +OBJECTS = $(BIGNUM_OBJS:%=$(OBJS_DIR)/%) +LINTS = $(BIGNUM_OBJS:%.o=$(LINTS_DIR)/%.ln) +ROOTMODULE = $(ROOT_MISC_DIR)/$(MODULE) + +BIGNUM_OBJS_32 = bignum_i386.o bignum_i386_asm.o +BIGNUM_OBJS_64 = bignum_amd64.o bignum_amd64_asm.o +BIGNUM_PSR_OBJS = $(BIGNUM_OBJS_$(CLASS)) + +# +# Include common rules. +# +include $(UTSBASE)/intel/Makefile.intel + +# +# Define targets +# +ALL_TARGET = $(BINARY) +LINT_TARGET = $(MODULE).lint +INSTALL_TARGET = $(BINARY) $(ROOTMODULE) + +# +# Linkage dependencies +# +LDFLAGS += -dy + +CPPFLAGS += -I$(BIGNUMDIR) + +# +# Default build targets. +# +.KEEP_STATE: + +def: $(DEF_DEPS) + +all: $(ALL_DEPS) + +clean: $(CLEAN_DEPS) + +clobber: $(CLOBBER_DEPS) + +lint: $(LINT_DEPS) + +modlintlib: $(MODLINTLIB_DEPS) + +clean.lint: $(CLEAN_LINT_DEPS) + +install: $(INSTALL_DEPS) + +# +# Include common targets. +# +include $(UTSBASE)/intel/Makefile.targ + + +include Makefile.$(CLASS) diff --git a/usr/src/uts/intel/bignum/Makefile.32 b/usr/src/uts/intel/bignum/Makefile.32 new file mode 100644 index 0000000000..ae8df68350 --- /dev/null +++ b/usr/src/uts/intel/bignum/Makefile.32 @@ -0,0 +1,64 @@ +# +# 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" +# +# Configuration and targets for bignum module +# specific to Intel 32-bit architecture, i386. +# +# Bignum configuration (BIGNUM_CFG): +# PSR_MUL: +# There is a processor-specific implementation bignum multiply functions +# HWCAP: +# There are multiple implementations of bignum functions, and the +# appropriate one must be chosen at run time, based on testing +# hardware capabilites. +# MMX_MANAGE: +# Multimedia registers must be saved and restored. +# Normally MMX_MANAGE iff _KERNEL, but for testing purposes, +# MMX_MANAGE can be defined in userland. + +BIGNUM_CFG = -DPSR_MUL -DHWCAP -DMMX_MANAGE + +LDFLAGS += -M $(BIGNUMDIR)/i386/cap_mapfile + +$(OBJS_DIR)/bignumimpl.o $(LINTS_DIR)/bignumimpl.ln := \ + CPPFLAGS += $(BIGNUM_CFG) +$(OBJS_DIR)/bignum_i386.o $(LINTS_DIR)/bignum_i386.ln := \ + CPPFLAGS += $(BIGNUM_CFG) + +$(OBJS_DIR)/bignum_i386.o: $(BIGNUMDIR)/i386/bignum_i386.c + $(COMPILE.c) -o $@ $(BIGNUMDIR)/i386/bignum_i386.c + $(CTFCONVERT_O) + $(POST_PROCESS_O) + +$(OBJS_DIR)/bignum_i386_asm.o: $(BIGNUMDIR)/i386/bignum_i386_asm.s + $(COMPILE.s) -P -o $@ $(BIGNUM_CFG) $(BIGNUMDIR)/i386/bignum_i386_asm.s + $(POST_PROCESS_O) + +$(LINTS_DIR)/bignum_i386.ln: $(BIGNUMDIR)/i386/bignum_i386.c + @($(LHEAD) $(LINT.c) $(BIGNUMDIR)/i386/bignum_i386.c $(LTAIL)) + +$(LINTS_DIR)/bignum_i386_asm.ln: $(BIGNUMDIR)/i386/bignum_i386_asm.s + @($(LHEAD) $(LINT.s) $(BIGNUMDIR)/i386/bignum_i386_asm.s $(LTAIL)) diff --git a/usr/src/uts/intel/bignum/Makefile.64 b/usr/src/uts/intel/bignum/Makefile.64 new file mode 100644 index 0000000000..56a4b1768e --- /dev/null +++ b/usr/src/uts/intel/bignum/Makefile.64 @@ -0,0 +1,67 @@ +# +# 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" +# +# Configuration and targets for bignum module +# specific to AMD 64-bit architecture, amd64. +# +# Bignum configuration (BIGNUM_CFG): +# PSR_MUL: +# There is a processor-specific implementation bignum multiply functions +# HWCAP: +# There are multiple implementations of bignum functions, and the +# appropriate one must be chosen at run time, based on testing +# hardware capabilites. +# +# -DPSR_MUL: +# For AMD64, there is a processor-specific implementation of +# the bignum multiply functions, which takes advantage of the +# 64x64->128 bit multiply instruction. +# +# -UHWCAP: +# There is only one implementation, because the 128 bit multiply using +# general-purpose registers is faster than any MMX or SSE2 implementation. + +BIGNUM_CFG = -DPSR_MUL + +$(OBJS_DIR)/bignumimpl.o $(LINTS_DIR)/bignumimpl.ln := \ + CPPFLAGS += $(BIGNUM_CFG) +$(OBJS_DIR)/bignum_amd64.o $(LINTS_DIR)/bignum_amd64.ln := \ + CPPFLAGS += $(BIGNUM_CFG) + +$(OBJS_DIR)/bignum_amd64.o: $(BIGNUMDIR)/amd64/bignum_amd64.c + $(COMPILE.c) -o $@ $(BIGNUMDIR)/amd64/bignum_amd64.c + $(CTFCONVERT_O) + $(POST_PROCESS_O) + +$(OBJS_DIR)/bignum_amd64_asm.o: $(BIGNUMDIR)/amd64/bignum_amd64_asm.s + $(COMPILE.s) -P -o $@ $(BIGNUM_CFG) $(BIGNUMDIR)/amd64/bignum_amd64_asm.s + $(POST_PROCESS_O) + +$(LINTS_DIR)/bignum_amd64.ln: $(BIGNUMDIR)/amd64/bignum_amd64.c + @($(LHEAD) $(LINT.c) $(BIGNUMDIR)/amd64/bignum_amd64.c $(LTAIL)) + +$(LINTS_DIR)/bignum_amd64_asm.ln: $(BIGNUMDIR)/amd64/bignum_amd64_asm.s + @($(LHEAD) $(LINT.s) $(BIGNUMDIR)/amd64/bignum_amd64_asm.s $(LTAIL)) |