Skip to contentSkip to conversation

sep: Introduce sep driver

PATCH In review Mark Allyn 3 participants 7 messages Nov 17, 2010 – Nov 21, 2010 Staging

lore
Share & tools
lore

Mark Allyn

author
#0 lore raw

PATCH 1/1 sep: Introduce sep driver

This driver is for the Security Processor, a dedicated encryption and decryption driver that is used on the Intel mobile platform.

This has been checked with checkpatch and there are four warnings for lines over 80 charactors.

There is one compile warning. This is for a function that is only used if the rar register driver is needed. There is an ifdef in a header file that stubs out the rar register driver if the rar register is not configured.

This patch is referenced off of next-20101117.

This driver does add a configuration, which is CONFIG_DX_SEP.

---
 drivers/staging/Kconfig                  |    2 +
 drivers/staging/Makefile                 |    1 +
 drivers/staging/sep/Kconfig              |   11 +
 drivers/staging/sep/Makefile             |    2 +
 drivers/staging/sep/TODO                 |   12 +
 drivers/staging/sep/sep_dev.h            |  156 ++
 drivers/staging/sep/sep_driver.c         | 4152 ++++++++++++++++++++++++++++++
 drivers/staging/sep/sep_driver_api.h     |  309 +++
 drivers/staging/sep/sep_driver_config.h  |  428 +++
 drivers/staging/sep/sep_driver_hw_defs.h |  234 ++
 10 files changed, 5307 insertions(+), 0 deletions(-)
 create mode 100644 drivers/staging/sep/Kconfig
 create mode 100644 drivers/staging/sep/Makefile
 create mode 100644 drivers/staging/sep/TODO
 create mode 100644 drivers/staging/sep/sep_dev.h
 create mode 100644 drivers/staging/sep/sep_driver.c
 create mode 100644 drivers/staging/sep/sep_driver_api.h
 create mode 100644 drivers/staging/sep/sep_driver_config.h
 create mode 100644 drivers/staging/sep/sep_driver_hw_defs.h
drivers/staging/Kconfig +2 -0
index 6f2afb3..cd02672 100644
@@ -129,6 +129,8 @@ source "drivers/staging/vme/Kconfig"
 
 source "drivers/staging/memrar/Kconfig"
 
+source "drivers/staging/sep/Kconfig"
+
 source "drivers/staging/iio/Kconfig"
 
 source "drivers/staging/zram/Kconfig"
drivers/staging/Makefile +1 -0
index 20c5641..75c0c1f 100644
@@ -42,6 +42,7 @@ obj-$(CONFIG_FB_UDL)		+= udlfb/
 obj-$(CONFIG_HYPERV)		+= hv/
 obj-$(CONFIG_VME_BUS)		+= vme/
 obj-$(CONFIG_MRST_RAR_HANDLER)	+= memrar/
+obj-$(CONFIG_DX_SEP)            += sep/
 obj-$(CONFIG_IIO)		+= iio/
 obj-$(CONFIG_ZRAM)		+= zram/
 obj-$(CONFIG_WLAGS49_H2)	+= wlags49_h2/
drivers/staging/sep/Kconfig new file +11 -0
new file mode 100644
index 0000000..34f3ef5
@@ -0,0 +1,11 @@
+config DX_SEP
+	tristate "Discretix SEP driver"
+	depends on PCI
+	default y
+	help
+	  Discretix SEP driver; used for the security processor subsystem
+	  on bard the Intel Mobile Internet Device.
+
+	  The driver's name is sep_driver.
+
+	  If unsure, select N.
drivers/staging/sep/Makefile new file +2 -0
new file mode 100644
index 0000000..628d5f9
@@ -0,0 +1,2 @@
+obj-$(CONFIG_DX_SEP) := sep_driver.o
+
drivers/staging/sep/TODO new file +12 -0
new file mode 100644
index 0000000..371ee27
@@ -0,0 +1,12 @@
+Todo's so far (from Alan Cox)
+- Fix firmware loading - Done 09/10 M. Allyn
+- Get firmware into firmware git tree - Firmware is non open source
+- Review and tidy each algorithm function - Done 09/10 M. Allyn
+- Check whether it can be plugged into any of the kernel crypto API
+  interfaces - Crypto API 'glue' is still not ready to submit
+- Do something about the magic shared memory interface and replace it
+  with something saner (in Linux terms) - Done 09/10 M. Allyn
+- Clean up unused ioctls - Needs vendor help
+- Clean up unused fields in ioctl structures - Needs vendor help
+- 64 bit size to be used for all user space addresses passed
+  to ioctl - Done 10/10 M. Allyn
drivers/staging/sep/sep_dev.h new file +156 -0

156 lines not on this page · raw message

drivers/staging/sep/sep_driver.c new file +4152 -0

2,804 lines not on this page · raw message

drivers/staging/sep/sep_driver_api.h new file +309 -0

309 lines not on this page · raw message

drivers/staging/sep/sep_driver_config.h new file +428 -0

428 lines not on this page · raw message

drivers/staging/sep/sep_driver_hw_defs.h new file +234 -0

234 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.6.3.3

Part of the diff is not shown here. View the raw message.

#1 lore raw
Quoted 6 lines · Mark Allyn

This driver is for the Security Processor, a dedicated encryption and decryption driver that is used on the Intel mobile platform.

This has been checked with checkpatch and there are four warnings for lines over 80 charactors.

Quoted 7 lines

There is one compile warning. This is for a function that is only used if the rar register driver is needed. There is an ifdef in a header file that stubs out the rar register driver if the rar register is not configured.

This patch is referenced off of next-20101117.

Minor comment:

Quoted 5 lines
drivers/staging/sep/TODO new file +2 -0
@@ -0,0 +1,12 @@
+Todo's so far (from Alan Cox)
+- Fix firmware loading - Done 09/10 M. Allyn

drivers/staging/sep/TODO line 12

Quoted 10 lines
drivers/staging/sep/TODO new file +10 -0
+- Get firmware into firmware git tree - Firmware is non open source
+- Review and tidy each algorithm function - Done 09/10 M. Allyn
+- Check whether it can be plugged into any of the kernel crypto API
+  interfaces - Crypto API 'glue' is still not ready to submit
+- Do something about the magic shared memory interface and replace it
+  with something saner (in Linux terms) - Done 09/10 M. Allyn
+- Clean up unused ioctls - Needs vendor help
+- Clean up unused fields in ioctl structures - Needs vendor help
+- 64 bit size to be used for all user space addresses passed
+  to ioctl - Done 10/10 M. Allyn

Remove entries in the TODO file that you have finished, only list what needs to be done.

Also, please put your email address in the file for who to send patches to for this driver, like the other TODO files in the drivers/staging/*/TODO files have.

Care to send a follow-on patch for these minor changes?

thanks,

greg k-h

#2 lore raw

Re: [PATCH 1/1] Staging: sep: Introduce sep driver

In reply to Mark Allyn
Quoted 6 lines · Mark Allyn

This driver is for the Security Processor, a dedicated encryption and decryption driver that is used on the Intel mobile platform.

This has been checked with checkpatch and there are four warnings for lines over 80 charactors.

Quoted 6 lines

There is one compile warning. This is for a function that is only used if the rar register driver is needed. There is an ifdef in a header file that stubs out the rar register driver if the rar register is not configured.

This driver does add a configuration, which is CONFIG_DX_SEP.

Also, this driver spits out a _lot_ of compiler warnings on x86-64. Please fix that now before someone else starts yelling at you...

thanks,

greg k-h

#3 lore raw
In reply to Mark Allyn

drivers/staging/sep/sep_driver_config.h line 236

Quoted 6 lines
drivers/staging/sep/sep_driver_config.h new file +4 -0
+/* rar handler */
+#ifndef CONFIG_MRST_RAR_HANDLER
+
+/* This stub header is for non Moorestown driver only */

What happened to the patches I sent you a while back that cleaned this one up ?

#4 lore raw
Quoted 9 lines · Alan Cox

drivers/staging/sep/sep_driver_config.h line 236

Quoted 6 lines
drivers/staging/sep/sep_driver_config.h new file +4 -0
+/* rar handler */
+#ifndef CONFIG_MRST_RAR_HANDLER
+
+/* This stub header is for non Moorestown driver only */

What happened to the patches I sent you a while back that cleaned this one up ?

Wait, this isn't the cleaned up version? Ick, should I just drop it and wait for a working one instead? Or Mark, are you going to fix this one up for real this time?

thanks,

greg k-h

#5 lore raw
Quoted 11 lines · On Sat, 20 Nov 2010 08:27:26 -0800 Greg KH <[email protected]> wrote:
Quoted 9 lines · Alan Cox

drivers/staging/sep/sep_driver_config.h line 236

Quoted 6 lines
drivers/staging/sep/sep_driver_config.h new file +4 -0
+/* rar handler */
+#ifndef CONFIG_MRST_RAR_HANDLER
+
+/* This stub header is for non Moorestown driver only */

What happened to the patches I sent you a while back that cleaned this one up ?

Quoted 3 lines

Wait, this isn't the cleaned up version? Ick, should I just drop it and wait for a working one instead? Or Mark, are you going to fix this one up for real this time?

I sent Mark a set of follow on patches. Dunno if they got lost in part or not. No big deal as they applied on top of his previous set so can just be applied as a follow up to the merge.

So I'd rather you carried on merging them and we'll figure out which of the other bits need dropping on top.

Alan

#6 lore raw
Quoted 18 lines · Alan Cox
Quoted 11 lines · On Sat, 20 Nov 2010 08:27:26 -0800 Greg KH <[email protected]> wrote:
Quoted 9 lines · Alan Cox

drivers/staging/sep/sep_driver_config.h line 236

Quoted 6 lines
drivers/staging/sep/sep_driver_config.h new file +4 -0
+/* rar handler */
+#ifndef CONFIG_MRST_RAR_HANDLER
+
+/* This stub header is for non Moorestown driver only */

What happened to the patches I sent you a while back that cleaned this one up ?

Quoted 3 lines

Wait, this isn't the cleaned up version? Ick, should I just drop it and wait for a working one instead? Or Mark, are you going to fix this one up for real this time?

Quoted 6 lines

I sent Mark a set of follow on patches. Dunno if they got lost in part or not. No big deal as they applied on top of his previous set so can just be applied as a follow up to the merge.

So I'd rather you carried on merging them and we'll figure out which of the other bits need dropping on top.

Ok, it's in the tree now, but again, it has a ton of build warnings that should be fixed before I start to get angry emails from Randy about it :)

thanks,

greg k-h