Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 299809 Details for
Bug 438471
SMI: RedHat need SMI free solution for kernel
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Kernel: IBM RTL driver
patch-rtl-rh-v2 (text/plain), 7.15 KB, created by
IBM Bug Proxy
on 2008-04-01 02:40:46 UTC
(
hide
)
Description:
Kernel: IBM RTL driver
Filename:
MIME Type:
Creator:
IBM Bug Proxy
Created:
2008-04-01 02:40:46 UTC
Size:
7.15 KB
patch
obsolete
>diff -urN kernel-2.6.24.3-work.orig/configs/kernel-2.6.24.3-x86_64-rt.config linux-2.6.24.3.x86_64/configs/kernel-2.6.24.3-x86_64-rt.config >--- kernel-2.6.24.3-work.orig/configs/kernel-2.6.24.3-x86_64-rt.config 2008-03-15 15:59:10.000000000 -0700 >+++ linux-2.6.24.3.x86_64/configs/kernel-2.6.24.3-x86_64-rt.config 2008-03-15 12:46:32.000000000 -0700 >@@ -1031,6 +1031,7 @@ > # CONFIG_CDROM_PKTCDVD_WCACHE is not set > CONFIG_ATA_OVER_ETH=m > CONFIG_MISC_DEVICES=y >+CONFIG_IBM_RTL=m > # CONFIG_IBM_ASM is not set > CONFIG_PHANTOM=m > CONFIG_EEPROM_93CX6=m >diff -urN kernel-2.6.24.3-work.orig/drivers/misc/ibmrtl/ibm_rtl.c linux-2.6.24.3.x86_64/drivers/misc/ibmrtl/ibm_rtl.c >--- kernel-2.6.24.3-work.orig/drivers/misc/ibmrtl/ibm_rtl.c 1969-12-31 16:00:00.000000000 -0800 >+++ linux-2.6.24.3.x86_64/drivers/misc/ibmrtl/ibm_rtl.c 2008-03-31 08:33:25.000000000 -0700 >@@ -0,0 +1,181 @@ >+#include <linux/kernel.h> >+#include <linux/delay.h> >+#include <linux/module.h> >+#include <linux/io.h> >+#include <linux/sysdev.h> >+ >+#include "rtl.h" >+static unsigned int table_addr; >+ >+int ibm_rtl_write(u8 value) >+{ >+ int ret = 0; >+ void __iomem *rtl; >+ >+ /* only valid value is 0 and 1 */ >+ if (value > 1) { >+ ret = -EINVAL; >+ goto err_out; >+ } >+ >+ rtl = ioremap(table_addr,RTL_TABLE_SIZE); >+ >+ if (!rtl) { >+ printk ("could not map table\n"); >+ ret = -ENOMEM; >+ goto err_out; >+ } >+ >+ if (readb(rtl+RTL_STATE) != value) { >+ if (value == 1) >+ writeb(1,(rtl+RTL_CMD)); >+ else >+ writeb(2,(rtl+RTL_CMD)); >+ >+ /*write special command*/ >+ outb(bios_to_value(rtl, RTL_CMD_PORT_VALUE), >+ bios_to_value(rtl, RTL_CMD_PORT_ADDR)); >+ >+ while (readb(rtl+RTL_CMD)) { >+ msleep(10); >+ } >+ >+ if (readb(rtl+RTL_CMD_STATUS)) >+ ret = -EIO; >+ } >+ >+ iounmap(rtl); >+err_out: >+ return ret; >+} >+ >+static ssize_t rtl_show_version (struct sysdev_class * dev, char * buf) >+{ >+ int ret; >+ void __iomem *rtl; >+ >+ rtl = ioremap(table_addr,RTL_TABLE_SIZE); >+ >+ if (!rtl) { >+ ret = -ENOMEM; >+ goto err_out; >+ } >+ ret = sprintf(buf, "%d\n",(int)readb(rtl+RTL_VERSION)); >+ >+ iounmap(rtl); >+err_out: >+ return ret; >+} >+ >+static ssize_t rtl_show_state (struct sysdev_class * dev, char * buf) >+{ >+ int ret; >+ void __iomem *rtl; >+ >+ rtl = ioremap(table_addr,RTL_TABLE_SIZE); >+ >+ if (!rtl) { >+ printk ("could not map table\n"); >+ ret = -ENOMEM; >+ goto err_out; >+ } >+ ret = sprintf(buf, "%d\n",readb(rtl+RTL_STATE)); >+ >+ iounmap(rtl); >+err_out: >+ return ret; >+} >+ >+static ssize_t rtl_set_state(struct sysdev_class * dev, const char * buf, size_t size) >+{ >+ ssize_t ret; >+ switch (buf[0]) { >+ case '0': >+ ret = ibm_rtl_write(0); >+ break; >+ case '1': >+ ret = ibm_rtl_write(1); >+ break; >+ default: >+ ret = -EINVAL; >+ } >+ if (ret >= 0) >+ ret = size; >+ >+ return ret; >+} >+ >+static struct sysdev_class class_rtl = { >+ set_kset_name("ibm_rtl"), >+}; >+ >+static SYSDEV_CLASS_ATTR(version, S_IRUGO, rtl_show_version, NULL); >+static SYSDEV_CLASS_ATTR(state, 0600, rtl_show_state, rtl_set_state); >+ >+static struct sysdev_class_attribute *rtl_attributes[] = { >+ &attr_version, >+ &attr_state, >+ NULL >+}; >+ >+ >+static int rtl_setup_sysfs(void) { >+ int ret,i; >+ ret = sysdev_class_register(&class_rtl); >+ >+ if (!ret) { >+ for (i = 0; rtl_attributes[i]; i ++) >+ sysdev_class_create_file(&class_rtl, rtl_attributes[i]); >+ } >+ return ret; >+} >+ >+static void rtl_teardown_sysfs(void) { >+ int i; >+ for (i = 0; rtl_attributes[i]; i ++) >+ sysdev_class_remove_file(&class_rtl, rtl_attributes[i]); >+ sysdev_class_unregister(&class_rtl); >+ return;; >+} >+ >+/* only allow the modules to load if the _RTL_ table can be found*/ >+int init_module(void) { >+ unsigned long ebda_addr,ebda_size; >+ void __iomem *data, *d; >+ int ret,i; >+ >+ /*get the address for the RTL table from the EBDA */ >+ ebda_addr = *(unsigned short *)phys_to_virt(0x40E); >+ ebda_addr <<= 4; >+ ebda_size = 64*1024; >+ >+ data = ioremap(ebda_addr,ebda_size); >+ d = data; >+ if (!data) { >+ ret = -ENOMEM; >+ goto exit; >+ } >+ >+ for (i = 0 ; i < ebda_size/4; i ++) { >+ unsigned int *tmp = (unsigned int *) data++; >+ if (*tmp == RTL_MAGIC_IDENT) { >+ table_addr = ebda_addr + i; >+ ret = rtl_setup_sysfs(); >+ goto exit; >+ } >+ } >+ >+ ret = -ENODEV; >+ >+exit: >+ iounmap(d); >+ return ret; >+} >+ >+void cleanup_module(void) >+{ >+ rtl_teardown_sysfs(); >+} >+ >+MODULE_LICENSE("GPL"); >+ >diff -urN kernel-2.6.24.3-work.orig/drivers/misc/ibmrtl/Makefile linux-2.6.24.3.x86_64/drivers/misc/ibmrtl/Makefile >--- kernel-2.6.24.3-work.orig/drivers/misc/ibmrtl/Makefile 1969-12-31 16:00:00.000000000 -0800 >+++ linux-2.6.24.3.x86_64/drivers/misc/ibmrtl/Makefile 2008-03-15 12:46:32.000000000 -0700 >@@ -0,0 +1 @@ >+obj-$(CONFIG_IBM_RTL) := ibm_rtl.o >diff -urN kernel-2.6.24.3-work.orig/drivers/misc/ibmrtl/rtl.h linux-2.6.24.3.x86_64/drivers/misc/ibmrtl/rtl.h >--- kernel-2.6.24.3-work.orig/drivers/misc/ibmrtl/rtl.h 1969-12-31 16:00:00.000000000 -0800 >+++ linux-2.6.24.3.x86_64/drivers/misc/ibmrtl/rtl.h 2008-03-31 08:33:40.000000000 -0700 >@@ -0,0 +1,26 @@ >+#include <linux/io.h> >+ >+/* The RTL table looks something like >+ u8 signature[5]; >+ u8 version; >+ u8 RT_Status; >+ u8 Command; >+ u8 CommandStatus; >+ u8 CMDAddressType; >+ u8 CmdGranularity; >+ u8 CmdOffset; >+ u16 Reserve1; >+ u8 CmdPortAddress[4]; >+ u8 CmdPortValue[4]; >+*/ >+#define RTL_TABLE_SIZE 0x16 >+#define RTL_MAGIC_IDENT (('L'<<24)|('T'<<16)|('R'<<8)|'_') >+#define RTL_VERSION 0x5 >+#define RTL_STATE 0x6 >+#define RTL_CMD 0x7 >+#define RTL_CMD_STATUS 0x8 >+#define RTL_CMD_PORT_ADDR 0xE >+#define RTL_CMD_PORT_VALUE 0x12 >+ >+/*needed to decode CmdPortAddress and CmdPortValue*/ >+#define bios_to_value(rtl, offset) (u32)((readb(rtl+(offset+1)) << 8) + readb(rtl+offset)) >diff -urN kernel-2.6.24.3-work.orig/drivers/misc/Kconfig linux-2.6.24.3.x86_64/drivers/misc/Kconfig >--- kernel-2.6.24.3-work.orig/drivers/misc/Kconfig 2008-03-15 15:54:00.000000000 -0700 >+++ linux-2.6.24.3.x86_64/drivers/misc/Kconfig 2008-03-15 12:46:32.000000000 -0700 >@@ -13,6 +13,23 @@ > > if MISC_DEVICES > >+config IBM_RTL >+ tristate "Device driver to enable PRTL support" >+ depends on X86 && PCI >+ ---help--- >+ Enable support for IBM Preimium Real Time Mode (PRTM). >+ This module will allow you the enter and exit PRTM in the BIOS via >+ sysfs on platforms that support this feature. System in PRTM will >+ not recive cpu generated SMIs for recoverable errors. Use of this >+ feature without proper support may void your hardware warrenty. >+ >+ If the proper bios support is found the driver will load and create >+ /sys/devices/system/ibm_rtl/. The "state" varable will indicate >+ weather or not the BIOS is in PRTM. >+ state = 0 (BIOS SMI's on) >+ state = 1 (BIOS SMI's off) >+ >+ > config IBM_ASM > tristate "Device driver for IBM RSA service processor" > depends on X86 && PCI && INPUT && EXPERIMENTAL >diff -urN kernel-2.6.24.3-work.orig/drivers/misc/Makefile linux-2.6.24.3.x86_64/drivers/misc/Makefile >--- kernel-2.6.24.3-work.orig/drivers/misc/Makefile 2008-03-15 15:54:00.000000000 -0700 >+++ linux-2.6.24.3.x86_64/drivers/misc/Makefile 2008-03-15 12:46:32.000000000 -0700 >@@ -4,6 +4,7 @@ > obj- := misc.o # Dummy rule to force built-in.o to be made > > obj-$(CONFIG_IBM_ASM) += ibmasm/ >+obj-$(CONFIG_IBM_RTL) += ibmrtl/ > obj-$(CONFIG_HDPU_FEATURES) += hdpuftrs/ > obj-$(CONFIG_MSI_LAPTOP) += msi-laptop.o > obj-$(CONFIG_ASUS_LAPTOP) += asus-laptop.o
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 438471
:
299808
| 299809 |
299810
|
299811
|
299812