这是我感到最有用的一个东西, 我们可以在OK状态下启动一个诊断程序(OBDiag),用这个诊断程序可以详细地诊断出各种设备的情况,下面是详细介绍.
The OpenBoot diagnostic (OBDiag) is a menu-driven diagnostic tool that verifies:
n Internal I/O system
n Ethernet
n Keyboard
n Mouse
n Diskette drive (floppy)
n Parallel port
n Serial ports
n NVRAM
n Audio
n EIDE
n Video
OBDiag performs root-cause failure analysis on the referenced devices by testing internal registers, confirming subsystem integrity, and verifying device functionality.
Starting the OBDiag Menu
ok% setenv mfg-mode on
mfg-mode = on
At the ok prompt, type:
ok% setenv diag-switch? true
diag-switch? = true
At the ok prompt, type:
ok% setenv auto-boot? false
auto-boot? = false
At the ok prompt, type:
ok% reset-all
下面是具体经过这样设置后的具体显示内容:
ok setenv mfg-mode on
mfg-mode = on
ok setenv diag-switch? true
diag-switch? = true
ok setenv auto-boot? false
auto-boot? = false
ok reset-all(经过这几步设置,后重新启动就能进入OBDiag程序)
Resetting...
Software Power ON(这是系统启动的详细显示情况.平时是看不见的,因为我们设置了几个OK变量,所以有此显示)
@(#) Sun Ultra 5/10 UPA/PCI 3.11 Version 9 created 1998/03/06
10:31
Clearing E$ Tags Done
Clearing I/D TLBs Done
Probing Memory Done
MEM BASE = 0000.0000.2000.0000
MEM SIZE = 0000.0000.1000.0000
11-Column Mode Enabled
MMUs ON
Copy Done
PC = 0000.01ff.f000.1ffc
PC = 0000.0000.0000.2040
Decompressing into Memory Done
Size = 0000.0000.0006.e160
ttya initialized
Reset Control: BXIR:0 BPOR:0 SXIR:0 SPOR:1 POR:0
UltraSPARC-IIi 2-2 module
Probing Memory Bank #0 256 + 256: 512 Megabytes
Probing Memory Bank #2 0 + 0: 0 Megabytes
Probing UPA Slot at 1e,0 SUNW,ffb
Probing /pci@1f,0/pci@1,1 at Device 1 pci108e,1000 network
Probing /pci@1f,0/pci@1,1 at Device 2 SUNW,m64B
Probing /pci@1f,0/pci@1,1 at Device 3 ide disk cdrom
Probing /pci@1f,0/pci@1 at Device 1 pci
Probing /pci@1f,0/pci@1/pci@1 at Device 0 pci108e,1000 SUNW,hme
Probing /pci@1f,0/pci@1/pci@1 at Device 1 Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device 2 Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device 3 Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device 4 SUNW,isptwo sd st
Probing /pci@1f,0/pci@1/pci@1 at Device 5 Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device 6 Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device 7 Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device 8 Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device 9 Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device a Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device b Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device c Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device d Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device e Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device f Nothing there
Probing /pci@1f,0/pci@1 at Device 2 Nothing there
Probing /pci@1f,0/pci@1 at Device 3 Nothing there
Probing /pci@1f,0/pci@1 at Device 4 Nothing there
Reset Control: BXIR:0 BPOR:0 SXIR:0 SPOR:1 POR:0
UltraSPARC-IIi 2-2 module
Probing Memory Bank #0 256 + 256: 512 Megabytes
Probing Memory Bank #2 0 + 0: 0 Megabytes
Probing UPA Slot at 1e,0 SUNW,ffb
Probing /pci@1f,0/pci@1,1 at Device 1 pci108e,1000 network
Probing /pci@1f,0/pci@1,1 at Device 2 SUNW,m64B
Probing /pci@1f,0/pci@1,1 at Device 3 ide disk cdrom
Probing /pci@1f,0/pci@1 at Device 1 pci
Probing /pci@1f,0/pci@1/pci@1 at Device 0 pci108e,1000 SUNW,hme
Probing /pci@1f,0/pci@1/pci@1 at Device 1 Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device 2 Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device 3 Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device 4 SUNW,isptwo sd st
Probing /pci@1f,0/pci@1/pci@1 at Device 5 Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device 6 Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device 7 Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device 8 Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device 9 Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device a Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device b Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device c Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device d Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device e Nothing there
Probing /pci@1f,0/pci@1/pci@1 at Device f Nothing there
Probing /pci@1f,0/pci@1 at Device 2 Nothing there
Probing /pci@1f,0/pci@1 at Device 3 Nothing there
Probing /pci@1f,0/pci@1 at Device 4 Nothing there
Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 300MHz), No Keyboard
OpenBoot 3.11, 512 MB memory installed, Serial #9337777.
Ethernet address 8:0:20:8e:7b:b1, Host ID: 808e7bb1.
ok
6. At the ok prompt, type obdiag. Verify that the OBDiag menu is displayed, as shown in CODE EXAMPLE 4-7.
7. At the OBDiag menu prompt, type 16 to enable script-debug messages.
8. At the OBDiag menu prompt, type 18 to disable external loopback tests.
ok obdiag(重点,启动obdiag程序)
stdin: fffe2008
stdout: fffe2010
loading code into: /pci@1f,0/pci@1,1/ebus@1
loading code into: /pci@1f,0/pci@1,1/ebus@1/eeprom@14,0
loading code into: /pci@1f,0/pci@1,1/ebus@1/ecpp@14,3043bc
loading code into: /pci@1f,0/pci@1,1/ebus@1/su@14,3062f8
loading code into: /pci@1f,0/pci@1,1/ebus@1/se@14,400000
loading code into: /pci@1f,0/pci@1,1/network@1,1
loading code into: /pci@1f,0/pci@1,1/ebus@1/fdthree@14,3023f0
loading code into: /pci@1f,0/pci@1,1/ebus@1/
SUNW,CS4231@14,200000
loading code into: /pci@1f,0/pci@1,1/ide@3
loading code into: /pci@1f,0/pci@1,1/ide@3/disk
loading code into: /pci@1f,0/pci@1,1/ide@3/cdrom
loading code into: /pci@1f,0/pci@1,1/SUNW,m64B@2
Debugging enabled
OBDiag Menu(最后显示一个菜单)
0..... PCI/Cheerio
1..... EBUS DMA/TCR Registers
2..... Ethernet
3..... Keyboard
4..... Mouse
5..... Floppy
6..... Parallel Port
7..... Serial Port A
8..... Serial Port B
9..... NVRAM
10..... Audio
11..... EIDE
12..... Video
13..... All Above
14..... Quit
15..... Display this Menu
16..... Toggle script-debug
17..... Enable External Loopback Tests
18..... Disable External Loopback Tests
Enter (0-13 tests, 14 -Quit, 15 -Menu) ===>
(我们可以根据上在的菜单进行选择你所要诊断的硬件设备,其中13是诊断所有设备,14是退出该程序.诊断完还要记得恢复刚才所修改的变量值)
下面是几个诊断情况输出显示:
Enter (0-12 tests, 13 -Quit, 14 -Menu) ===>0 TEST='all_pci/PCIO_test'
SUBTEST='vendor_id_test'
SUBTEST='device_id_test'
SUBTEST='mixmode_read'
SUBTEST='e2_class_test'
SUBTEST='status_reg_walk1'
SUBTEST='line_size_walk1'
SUBTEST='latency_walk1'
SUBTEST='line_walk1'
SUBTEST='pin_test'
Enter (0-12 tests, 13 -Quit, 14 -Menu) ===>
Enter (0-12 tests, 13 -Quit, 14 -Menu) ===> 1
TEST='all_dma/ebus_test'
SUBTEST='dma_reg_test'
SUBTEST='dma_func_test'
Enter (0-12 tests, 13 -Quit, 14 -Menu) ===>
Enter (0-13 tests, 14 -Quit, 15 -Menu) ===> 2
TEST=’ethernet_test’
Using Onboard Transceiver - Link Up.
SUBTEST=’my_channel_reset’
SUBTEST=’hme_reg_test’
SUBTEST=’global_reg1_test’
SUBTEST=’global_reg2_test’
SUBTEST=’bmac_xif_reg_test’
SUBTEST=’bmac_tx_reg_test’
SUBTEST=’mif_reg_test’
SUBTEST=’mac_internal_loopback_test’
SUBTEST=’10mb_xcvr_loopback_test’
SUBTEST=’100mb_phy_loopback_test’
SUBTEST=’100mb_twister_loopback_test’
Enter (0-13 tests, 14 -Quit, 15 -Menu) ===>
setenv Enter (0-13 tests, 14 -Quit, 15 -Menu) ===> 3
TEST=’keyboard_test’
SUBTEST=’internal_loopback’
Enter (0-13 tests, 14 -Quit, 15 -Menu) ===>
pipi_z 回复于:2003-09-20 18:00:21 |
好,我喜欢!!! |
cynosurelu 回复于:2003-09-21 12:55:21 |
thanks |
xugg 回复于:2003-09-22 10:42:25 |
good |
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/