rpms/kernel/devel linux-2.6-x86-debug-edd.patch,1.1,1.2

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Mon Sep 17 19:10:19 UTC 2007


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19067

Modified Files:
	linux-2.6-x86-debug-edd.patch 
Log Message:
Better EDD debugging


linux-2.6-x86-debug-edd.patch:

Index: linux-2.6-x86-debug-edd.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-x86-debug-edd.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- linux-2.6-x86-debug-edd.patch	14 Sep 2007 16:23:47 -0000	1.1
+++ linux-2.6-x86-debug-edd.patch	17 Sep 2007 19:10:14 -0000	1.2
@@ -1,14 +1,62 @@
----
- arch/i386/boot/edd.c |    1 +
- 1 file changed, 1 insertion(+)
-
 --- linux-2.6.22.noarch.orig/arch/i386/boot/edd.c
 +++ linux-2.6.22.noarch/arch/i386/boot/edd.c
-@@ -151,6 +151,7 @@ void query_edd(void)
- 		 * Scan the BIOS-supported hard disks and query EDD
- 		 * information...
- 		 */
-+		putchar('0' + (devno - 0x80) % 10);
- 		get_edd_info(devno, &ei);
+@@ -26,6 +26,7 @@ static int read_mbr(u8 devno, void *buf)
+ {
+ 	u16 ax, bx, cx, dx;
  
- 		if (boot_params.eddbuf_entries < EDDMAXNR) {
++	printf("Calling Int 13 Fn 0x0201 with buffer @%x ...\n", buf);
+ 	ax = 0x0201;		/* Legacy Read, one sector */
+ 	cx = 0x0001;		/* Sector 0-0-1 */
+ 	dx = devno;
+@@ -33,6 +34,7 @@ static int read_mbr(u8 devno, void *buf)
+ 	asm volatile("pushfl; stc; int $0x13; setc %%al; popfl"
+ 		     : "+a" (ax), "+c" (cx), "+d" (dx), "+b" (bx)
+ 		     : : "esi", "edi", "memory");
++	printf(" result: ax=%x bx=%x cx=%x dx=%x\n", ax, bx, cx, dx);
+ 
+ 	return -(u8)ax;		/* 0 or -1 */
+ }
+@@ -75,12 +77,14 @@ static int get_edd_info(u8 devno, struct
+ 
+ 	/* Check Extensions Present */
+ 
++	printf("\nDevice %x: calling Int 13 Fn 0x4100 ...\n", dx);
+ 	ax = 0x4100;
+ 	bx = EDDMAGIC1;
+ 	dx = devno;
+ 	asm("pushfl; stc; int $0x13; setc %%al; popfl"
+ 	    : "+a" (ax), "+b" (bx), "=c" (cx), "+d" (dx)
+ 	    : : "esi", "edi");
++	printf(" result: ax=%x bx=%x cx=%x dx=%x\n", ax, bx, cx, dx);
+ 
+ 	if ((u8)ax)
+ 		return -1;	/* No extended information */
+@@ -94,6 +98,7 @@ static int get_edd_info(u8 devno, struct
+ 
+ 	/* Extended Get Device Parameters */
+ 
++	printf("Calling Int 13 Fn 0x4800 with buffer @%x ...\n", &ei->params);
+ 	ei->params.length = sizeof(ei->params);
+ 	ax = 0x4800;
+ 	dx = devno;
+@@ -101,10 +106,12 @@ static int get_edd_info(u8 devno, struct
+ 	    : "+a" (ax), "+d" (dx), "=m" (ei->params)
+ 	    : "S" (&ei->params)
+ 	    : "ebx", "ecx", "edi");
++	printf(" result: ax=%x dx=%x\n", ax, dx);
+ 
+ 	/* Get legacy CHS parameters */
+ 
+ 	/* Ralf Brown recommends setting ES:DI to 0:0 */
++	printf("Calling Int 13 Fn 0x0800 ...\n");
+ 	ax = 0x0800;
+ 	dx = devno;
+ 	di = 0;
+@@ -114,6 +121,7 @@ static int get_edd_info(u8 devno, struct
+ 	    "popw %%es"
+ 	    : "+a" (ax), "=b" (bx), "=c" (cx), "+d" (dx), "+D" (di)
+ 	    : : "esi");
++	printf(" result: ax=%x bx=%x cx=%x dx=%x di=%x\n", ax, bx, cx, dx, di);
+ 
+ 	if ((u8)ax == 0) {
+ 		ei->legacy_max_cylinder = (cx >> 8) + ((cx & 0xc0) << 2);




More information about the fedora-extras-commits mailing list