mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* EDD bug find: wrong #define is used to declare edd[] area.
@ 2003-01-21  0:44 Kevin Lawton
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Lawton @ 2003-01-21  0:44 UTC (permalink / raw)
  To: linux-kernel

It appears to me that the wrong #define is being used to declare the
size of the EDD (BIOS Enhanced Disk Drive Services) area of the setup
parameter page.  The following lines use 'EDDNR', but I believe they
meant to use 'EDDMAXNR':  (src @ 2.5.59)

  include/asm-i386/edd.h:line 168:

    extern struct edd_info edd[EDDNR];

  arch/i386/kernel/setup.c:line 477:

    struct edd_info edd[EDDNR];


For reference:

  include/asm-i386/edd.h:
  #define EDDNR 0x1e9           /* addr of number of edd_info structs at EDDBUF
  #define EDDMAXNR 6            /* number of edd_info structs starting at
EDDBUF  */

EDDNR is the offset in the parameter page, not the number of entries.
EDDMAXNR seems to be the literal to use.  I haven't tried this fix,
because I don't use it.  Just noticed it while digging through the source.

-Kevin Lawton

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: EDD bug find: wrong #define is used to declare edd[] area.
       [not found] <20030121004610.45288.qmail@web80311.mail.yahoo.com>
@ 2003-01-24  6:20 ` Matt Domsch
  0 siblings, 0 replies; 2+ messages in thread
From: Matt Domsch @ 2003-01-24  6:20 UTC (permalink / raw)
  To: alan, linux-kernel; +Cc: Kevin Lawton

> It appears to me that the wrong #define is being used to declare the
> size of the EDD (BIOS Enhanced Disk Drive Services) area of the setup
> parameter page.  The following lines use 'EDDNR', but I believe they
> meant to use 'EDDMAXNR':  (src @ 2.5.59)

Kevin, thanks for finding this, you're absolutely right.

Alan, please apply the patch below to your 2.4.x-ac tree.  I'll submit the 
corresponding patch for 2.5.x as well.

Thanks,
Matt

-- 
Matt Domsch
Sr. Software Engineer, Lead Engineer, Architect
Dell Linux Solutions www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com

===== arch/i386/kernel/edd.c 1.2 vs edited =====
--- 1.2/arch/i386/kernel/edd.c	Mon Jan  6 15:22:36 2003
+++ edited/arch/i386/kernel/edd.c	Wed Jan 22 21:35:52 2003
@@ -11,7 +11,7 @@
  * fn41 - Check Extensions Present and
  * fn48 - Get Device Parametes with EDD extensions
  * made in setup.S, copied to safe structures in setup.c,
- * and presents it in driverfs.
+ * and presents it in /proc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License v2.0 as published by
@@ -26,7 +26,6 @@
 
 /*
  * TODO:
- * - Convert to using /proc instead of driverfs
  * - move edd.[ch] to better locations if/when one is decided
  * - keep current with 2.5 EDD code changes
  */
@@ -47,7 +46,7 @@
 MODULE_DESCRIPTION("proc interface to BIOS EDD information");
 MODULE_LICENSE("GPL");
 
-#define EDD_VERSION "0.08 2003-Jan-05"
+#define EDD_VERSION "0.09 2003-Jan-22"
 #define EDD_DEVICE_NAME_SIZE 16
 #define REPORT_URL "http://domsch.com/linux/edd30/results.html"
 
@@ -601,7 +600,7 @@
 }
 
 /**
- * edd_init() - creates driverfs tree of EDD data
+ * edd_init() - creates /proc tree of EDD data
  *
  * This assumes that eddnr and edd were
  * assigned in setup.c already.
===== arch/i386/kernel/setup.c 1.59 vs edited =====
--- 1.59/arch/i386/kernel/setup.c	Tue Jan 14 09:39:13 2003
+++ edited/arch/i386/kernel/setup.c	Wed Jan 22 21:32:29 2003
@@ -705,7 +705,7 @@
 
 #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
 unsigned char eddnr;
-struct edd_info edd[EDDNR];
+struct edd_info edd[EDDMAXNR];
 /**
  * copy_edd() - Copy the BIOS EDD information
  *              from empty_zero_page into a safe place.
===== include/asm-i386/edd.h 1.1 vs edited =====
--- 1.1/include/asm-i386/edd.h	Thu Oct 24 15:44:10 2002
+++ edited/include/asm-i386/edd.h	Wed Jan 22 21:32:51 2003
@@ -165,7 +165,7 @@
 	struct edd_device_params params;
 } __attribute__ ((packed));
 
-extern struct edd_info edd[EDDNR];
+extern struct edd_info edd[EDDMAXNR];
 extern unsigned char eddnr;
 #endif				/*!__ASSEMBLY__ */
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-01-24  6:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-21  0:44 EDD bug find: wrong #define is used to declare edd[] area Kevin Lawton
     [not found] <20030121004610.45288.qmail@web80311.mail.yahoo.com>
2003-01-24  6:20 ` Matt Domsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®