bo-yang / plan9front

Automatically exported from code.google.com/p/plan9front
0 stars 0 forks source link

Machine reboot within 1 second upon entering /386/9pcf #105

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Machine:  Dell GX280 BIOS A04 with Intel P4 @2.80GHz (ID: 0F41)
Version:   9front-1296.72b184de2e4a.iso  (latest) (likely all)

Symptom
=======
9front reboots *very fast* after loading /386/9pcf bootloader.
-OR- 9front can boot with specific BIOS settings, but keyboard 
is non-operational.

Diagnosis (facts in following section)
======================================
My BIOS seems to be doing something strange with it's keyboard 
init.  This may be related to A20 as cinap (thanks!) mentioned 
in IRC.  After reading about it and having a brief look at the 
ASM and some stuff at OSDev.org, I learned that the original 
genius plan was to use a pin meant for the keyboard.  After 
playing around with my BIOS settings it was clear that some odd 
USB/Keyboard init in my BIOS is causing this.  Especially odd 
is the Keyboard Error report despite the fact that I use the 
keyboard to "Press F1 to Continue"  I should note that Linux 
boots fine on this machine using grub (legacy) boot loader.  
I have not attempted to chain-boot the 9front CD from grub but 
it may be possible that is a workaround (since it boots linux)
I have included my findings thus far in hopes it may help out 
anyone experiencing similar strange booting issues, and do not 
expect anyone to waste time on this, unless there is an obvious 
solution.  The problem is likely with my machine hardware, or 
a buggy BIOS so spend your dev hours on something else.

Facts
=====
1)  "bootfile=/386/9pcf" is last terminated line
2)  " " (a single space) is printed then reboot triggered
3)  BIOS Setting:  SATA Mode, Hyperthreading, disable-exe-bit, 
        "Fast Boot" (extended mem init), LPT, COM1, NIC, Audio, 
        PCI (disable), and power-mgmt do not effect this issue.
4)  BIOS Setting:  USB Controller --> "On"       == symptom
5)  BIOS Setting:  USB Controller --> "No Boot"  == symptom
6)  BIOS Setting:  USB Controller --> "Off"      == it boots!
7)  Machine lacks PS/2 ports.  Since I must use USB Keyboard, 
    I don't respond well to prompts with USB Controller off.
8)  BIOS Setting:  USB Controller  --> "On"     -AND- 
    BIOS Setting:  Keyboard Errors --> "Report" .............
    This now reports a keyboard error, and I press F1 which 
    continues, 9front boots, yet the keyboard doesn't work 
    at the first prompt again ....

Original issue reported on code.google.com by teu...@gmail.com on 19 Jan 2012 at 4:31

Attachments:

GoogleCodeExporter commented 9 years ago
excellent report.

i modified the A20 enable code to provide more diagnostics. the keyboard
A20 enable function now emulates the behaviour of syslinux wich does
a special null command after enabling A20 with a comment that this is
required by the UHCI (usb) spec.

try the following test iso: (or see attached files on this comment)

http://9hal.ath.cx/usr/cinap_lenrek/a20test.iso

Original comment by cinap_le...@felloff.net on 19 Jan 2012 at 7:41

Attachments:

GoogleCodeExporter commented 9 years ago

Thanks, we are getting somewhere:
* a20test.iso allows boot regardless of "USB Controller" or 
  "Keyboard Error Reporting" BIOS Settings.
* Keyboard Error is reported, and F1 is pressed on the 
  keyboard shown in dmesg, lshw, and *decode
* Keyboard works at initial ">" prompt; I type "boot"
* Keyboard non-operational upon 9front boot; stuck on prompt
* No messages are missing from the screenshots
* No cats were harmed in the making of the screenshot

Original comment by teu...@gmail.com on 19 Jan 2012 at 9:59

Attachments:

GoogleCodeExporter commented 9 years ago
Added various lspci queries upon request (see attached)

Original comment by teu...@gmail.com on 19 Jan 2012 at 10:54

Attachments:

GoogleCodeExporter commented 9 years ago
Boot kernel with apci=off and pci=noacpi

Original comment by teu...@gmail.com on 19 Jan 2012 at 11:27

Attachments:

GoogleCodeExporter commented 9 years ago

Summary
======
* With the a20fix, resets have never occured.
* The USB Controller is not recognized, some 9boot settings were tried with no 
success
* I was able to boot completely (but maybe not "properly") by:
  1) boot with a20fix iso
  2) assign console to COM1 (override plan9.ini settings console=0 at '>' prompt)
  3) at the "root from" prompt, switch CDs to a nightly iso.
  4) using another computer to connect to COM1, continue on to a beautiful while console window and blue background.

Comments
========
Note:  I have successfully interrupted the non-a20fix build and tried console=0 
(and various others), but after invoking "boot" the [space] [REBOOT!] issue 
occurs.  I mention this hoping it confirms my resets were A20-line issues as 
suspected.

Is it possible to make me a full iso with the a20patch incorporated?  
Otherwise, if you think it makes sense, just commit and sometime in the next 
couple days I will grab a nightly.  I suspect it will be much easier to debug 
once I have a properly installed system.  If it wont be, I don't mind the 
CD-Ninja-Switching routine when I get more time to solve this.

Original comment by teu...@gmail.com on 20 Jan 2012 at 4:47

GoogleCodeExporter commented 9 years ago
A20 change commited in: Ra3cf63647645

Original comment by cinap_le...@felloff.net on 21 Jan 2012 at 12:04

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
added SATA controller vid/did in revision: Raa44899d9d22

Original comment by cinap_le...@felloff.net on 21 Jan 2012 at 2:22

GoogleCodeExporter commented 9 years ago
a20 issue was fixed

Original comment by cinap_le...@felloff.net on 6 Mar 2012 at 11:57