Re: svn rev 197392 hangs during boot

From: Xin LI <delphij_at_delphij.net>
Date: Mon, 21 Sep 2009 18:17:42 -0700
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Xin LI wrote:
> Hi,
> 
> Joel Dahl wrote:
>> Fresh FreeBSD 9-CURRENT (svn 197392) hangs at:
> 
>> atkbd: the current kbd controller command byte 0047
>> atkbd: keyboard ID 0x41ab (2)
>> kbdc: RESET_KBD return code:00fa
>> kbdc: RESET_KBD status:00aa
> 
> Will reverting revision 197384 help?

Forgot the attachment.

Cheers,
- --
Xin LI <delphij_at_delphij.net>	http://www.delphij.net/
FreeBSD - The Power to Serve!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (FreeBSD)

iEYEARECAAYFAkq4JbYACgkQi+vbBBjt66CPcQCgkT5NhuvHM58YdGUmO3Ik4C98
ZkkAnimYMDjawA/4/ptfNfdK86yOlhiO
=aLKm
-----END PGP SIGNATURE-----

Index: sys/conf/files
===================================================================
--- sys/conf/files	(revision 197384)
+++ sys/conf/files	(revision 197383)
_at__at_ -2828,8 +2828,8 _at__at_
 dev/xen/xenpci/xenpci.c		optional xenpci
 dev/xen/xenpci/evtchn.c         optional xenpci
 dev/xen/xenpci/machine_reboot.c optional xenpci
-dev/x86bios/x86bios.c		optional x86bios | atkbd | dpms | vesa
-dev/x86bios/x86bios_alloc.c	optional x86bios | atkbd | dpms | vesa
-contrib/x86emu/x86emu.c		optional x86bios | atkbd | dpms | vesa
-contrib/x86emu/x86emu_util.c	optional x86bios | atkbd | dpms | vesa
+dev/x86bios/x86bios.c		optional x86bios | dpms | vesa
+dev/x86bios/x86bios_alloc.c	optional x86bios | dpms | vesa
+contrib/x86emu/x86emu.c		optional x86bios | dpms | vesa
+contrib/x86emu/x86emu_util.c	optional x86bios | dpms | vesa
 
Index: sys/dev/atkbdc/atkbd.c
===================================================================
--- sys/dev/atkbdc/atkbd.c	(revision 197384)
+++ sys/dev/atkbdc/atkbd.c	(revision 197383)
_at__at_ -44,10 +44,10 _at__at_
 #include <machine/bus.h>
 #include <machine/resource.h>
 
-#if defined(__i386__) || defined(__amd64__)
+#ifdef __i386__
 #include <machine/md_var.h>
 #include <machine/psl.h>
-#include <dev/x86bios/x86bios.h>
+#include <machine/vm86.h>
 #include <machine/pc/bios.h>
 
 #include <vm/vm.h>
_at__at_ -55,7 +55,7 _at__at_
 #include <vm/vm_param.h>
 
 #include <isa/isareg.h>
-#endif /* __i386__ || __amd64__ */
+#endif /* __i386__ */
 
 #include <sys/kbio.h>
 #include <dev/kbd/kbdreg.h>
_at__at_ -1089,33 +1089,34 _at__at_
 static int
 get_typematic(keyboard_t *kbd)
 {
-#if defined(__i386__) || defined(__amd64__)
+#ifdef __i386__
 	/*
 	 * Only some systems allow us to retrieve the keyboard repeat 
 	 * rate previously set via the BIOS...
 	 */
-	x86regs_t regs;
-	vm_offset_t p;
+	struct vm86frame vmf;
+	u_int32_t p;
 
-	regs.R_AX = 0xc000;
-	x86biosCall(&regs, 0x15);
-	if ((regs.R_EFLG & PSL_C) || regs.R_AH)
+	bzero(&vmf, sizeof(vmf));
+	vmf.vmf_ax = 0xc000;
+	vm86_intcall(0x15, &vmf);
+	if ((vmf.vmf_eflags & PSL_C) || vmf.vmf_ah)
 		return ENODEV;
-        p = BIOS_PADDRTOVADDR((regs.R_ES << 4) + regs.R_BX);
+        p = BIOS_PADDRTOVADDR(((u_int32_t)vmf.vmf_es << 4) + vmf.vmf_bx);
 	if ((readb(p + 6) & 0x40) == 0)	/* int 16, function 0x09 supported? */
 		return ENODEV;
-	regs.R_AX = 0x0900;
-	x86biosCall(&regs, 0x16);
-	if ((regs.R_AL & 0x08) == 0)	/* int 16, function 0x0306 supported? */
+	vmf.vmf_ax = 0x0900;
+	vm86_intcall(0x16, &vmf);
+	if ((vmf.vmf_al & 0x08) == 0)	/* int 16, function 0x0306 supported? */
 		return ENODEV;
-	regs.R_AX = 0x0306;
-	x86biosCall(&regs, 0x16);
-	kbd->kb_delay1 = typematic_delay(regs.R_BH << 5);
-	kbd->kb_delay2 = typematic_rate(regs.R_BL);
+	vmf.vmf_ax = 0x0306;
+	vm86_intcall(0x16, &vmf);
+	kbd->kb_delay1 = typematic_delay(vmf.vmf_bh << 5);
+	kbd->kb_delay2 = typematic_rate(vmf.vmf_bl);
 	return 0;
 #else
 	return ENODEV;
-#endif /* __i386__ || __amd64__ */
+#endif /* __i386__ */
 }
 
 static int
Received on Mon Sep 21 2009 - 23:17:56 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:55 UTC