public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Gortmaker <p_gortmaker@yahoo.com>
To: linux-kernel list <linux-kernel@vger.kernel.org>
Subject: [PATCH] nvram driver and extended HDD data
Date: Sat, 03 Mar 2001 04:36:14 -0500	[thread overview]
Message-ID: <3AA0BB0E.2912AF23@yahoo.com> (raw)

The NVRAM driver tries to print the user specified (non BIOS ROM table) hard
disk geometry for type 47 (or higher) configurable hard disk entries.

Problem is that there is no standard as to how these values are encoded
into the CMOS RAM, and so each BIOS manufacturer does it as they see fit.
(read as 'does it differently').  So the output (via /proc) prints random 
garbage for anything other than AMI BIOS at the moment.

Thus IMHO, interpretation of this data belongs in user space, and not in
the kernel and so I killed the lines printing user specified hard disk
geometry parameters from the driver.  Patch is against 2.4.2.

Paul.

--- drivers/char/nvram.c~	Wed Feb 14 02:40:29 2001
+++ drivers/char/nvram.c	Wed Feb 28 23:16:33 2001
@@ -25,12 +25,18 @@
  * the kernel and is not a module. Since the functions are used by some Atari
  * drivers, this is the case on the Atari.
  *
+ * 02/2001: I've coded some user space hacks for PC that use the NVRAM driver
+ * to set/show hard disk type(s), floppy disk type(s) and display type. These
+ * can be found in bios-cmos-X.Y.tar.gz (X.Y = version #).	Paul G.
+ *
  *
  * 	1.1	Cesar Barros: SMP locking fixes
  * 		added changelog
+ *	1.2	Paul Gortmaker: remove display of type 48/49 hard disk data
+		from /proc as it is not standardized & depends on BIOS mfr.
  */
 
-#define NVRAM_VERSION		"1.1"
+#define NVRAM_VERSION		"1.2"
 
 #include <linux/module.h>
 #include <linux/config.h>
@@ -532,17 +538,6 @@
 		PRINT_PROC( "%02x\n", type == 0x0f ? nvram[12] : type );
 	else
 		PRINT_PROC( "none\n" );
-
-	PRINT_PROC( "HD type 48 data: %d/%d/%d C/H/S, precomp %d, lz %d\n",
-				nvram[18] | (nvram[19] << 8),
-				nvram[20], nvram[25],
-				nvram[21] | (nvram[22] << 8),
-				nvram[23] | (nvram[24] << 8) );
-	PRINT_PROC( "HD type 49 data: %d/%d/%d C/H/S, precomp %d, lz %d\n",
-				nvram[39] | (nvram[40] << 8),
-				nvram[41], nvram[46],
-				nvram[42] | (nvram[43] << 8),
-				nvram[44] | (nvram[45] << 8) );
 
 	PRINT_PROC( "DOS base memory: %d kB\n", nvram[7] | (nvram[8] << 8) );
 	PRINT_PROC( "Extended memory: %d kB (configured), %d kB (tested)\n",



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


                 reply	other threads:[~2001-03-03 10:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3AA0BB0E.2912AF23@yahoo.com \
    --to=p_gortmaker@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox