occurs segmentation fault, when I make a file system(ext3 or reiserfs)

Munjun Kang malas at pinetron.com
Fri Nov 22 21:24:01 CET 2002


Dear linuxbios.

Hello.

I've worked for development of Embedded linux project in my corp.
Following is decription of my projcet.
CPU : VIA C3 800Mhz (EBGA)
Reference Board : VT6015
Northbridge : VT8606 (include S3 twister video core)
Southbridge : VT8231 (include VIA rhine II LAN core)
Bootbios : Linuxbios
OS : linux 2.4.19 ( ramdisk include glibc 2.3.1, busybox 0.60.5 and tinylogin 1.2 )

Now, It works well except hard disk.
I try to boot the kernel in two way.
First, it loads compressed kernel and ramdisk image via network using tftp protocol.
Second, it loads elfImage, generated by 'mkelfImage' via network.
All of them work great. (It means that I can see the prompt '\ '.)

But, when I try to make a file system the harddisk, 'segmentation fault' occurs.
mke2fs and mkreiserfs have same problem.

For find out the cause, I try to make a file system in various method.

1. Buildin Bios + Redhat 8.0 installed harddisk + test harddisk
2. Linuxbios + Redhat 8.0 installed harddisk + test harddisk
3. Linuxbios + Kernel(newly compiled), own ramdisk + test harddisk

After boot, I try to make a file system on test harddisk.

In case 1, It works well. Of course, it must be.
In case 2 and 3, I meet the segmentation fault.
So, I think that this problem caused in Linuxbios.

Maybe, this problem caused by harddisk initialization in linuxbios.
But, there are no harddisk initialization code in linuxbios.

Cound you help me?

Thanks for reading.
Regards,
malas

PS. In addition, memtest86 v3.0 works well without error.

Follwing is boot messages.
--------------------------------------------------------------------------
PDVR_Hx> tftp 01000000 linux.img   ==> my own boot bios prompt like PPCboot
PCI: Enabling bus mastering for device 00:90
rhine.c v1.0.0 2000-01-07
IO address 1400 Ethernet Address: 00:02:f1:80:21:00
Analyzing Media type,this will take several seconds........OK
MII Addr. : 0x01
PHYID1 : 0x0101, PHYID2 : 0x8f25
Control : 0x3100, Status : 0x786d
Auto-Nego. Adv. : 0x05e1, Link Partner Adv. : 0x41e1
Linespeed : 100Mbs, Full-duplex
# ServerIP = 192.168.0.41
# ServerMAC = 00:50:fc:3a:46:cd
# TFTP Ready : blocksize/dot = 1432 bytes
# Loading ................................................................
          ................................................................
          ................................................................
          ................................................................
          ................................................................
          ................................................................
          ................................................................
          ................................................................
          ................................................................
          ................................................................
          ................................................................
          ................................................................
          .....
# TFTP Complete : 0x0010e0b0 bytes at address 0x01000000.
PDVR_Hx> tftp 02000000 ramdisk.img
# ServerIP = 192.168.0.41
# ServerMAC = 00:50:fc:3a:46:cd
# TFTP Ready : blocksize/dot = 1432 bytes
# Loading ................................................................
          ................................................................
          ................................................................
          ................................................................
          ................................................................
          ................................................................
          ................................................................
          ................................................................
          ................................................................
          ................................................................
          ................................................................
          ................................................................
          ........
# TFTP Complete : 0x0010f196 bytes at address 0x02000000.
PDVR_Hx> boot 01000000 02000000
# Checking Image at 0x01000000.
# Image Name:   PDVR-H8 Kernel Image
  Image Type:   Intel x86 Linux Kernel Image (gzip compressed)
  Data Size:    1106032 Bytes = 1080 kB = 1 MB
  Load Address: 00100000
  Entry Point:  00100000
# Verifying Checksum ... OK
# Uncompressing kernel image...
# Checking Image at 0x02000000.
# Image Name:   PDVR Ramdisk Image
  Image Type:   Intel x86 Linux RAMDisk Image (gzip compressed)
  Data Size:    1110358 Bytes = 1084 kB = 1 MB
  Load Address: 01000000
  Entry Point:  01000000
# Verifying Checksum ... OK
# command line - [root=/dev/ram console=ttyS0,115200n8 reboot=b]
# boot kernel
rhine disable    ==> turn off the network device to do not receive packet during boot kernel
Linux version 2.4.19-linuxbios_4 (malas@******) (gcc version 3.2) #62 Fri Nov 22 11:34:28 KST 2002

BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 00000000000a0000 (usable)
 BIOS-e820: 00000000000a0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 0000000007800000 (usable)
 BIOS-e820: 00000000fffc0000 - 0000000100000000 (reserved)
120MB LOWMEM available.
On node 0 totalpages: 30720
zone(0): 4096 pages.
zone(1): 26624 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/ram console=ttyS0,115200n8 reboot=b
Initializing CPU#0
Detected 800.047 MHz processor.
Calibrating delay loop... 1595.80 BogoMIPS
Memory: 117456k/122880k available (1244k kernel code, 5040k reserved, 839k data, 224k init, 0k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
kdb version 2.3 by Scott Lurndal, Keith Owens. Copyright SGI, All Rights Reserved
Dentry cache hash table entries: 16384 (order: 5, 131072 bytes)
Inode cache hash table entries: 8192 (order: 4, 65536 bytes)
Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 32768 (order: 5, 131072 bytes)
CPU: L1 I Cache: 64K (32 bytes/line), D cache 64K (32 bytes/line)
CPU: L2 Cache: 64K (32 bytes/line)
CPU: Centaur VIA Ezra stepping 08
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
mtrr: v1.40 (20010327) Richard Gooch (rgooch at atnf.csiro.au)
mtrr: detected mtrr type: Intel
PCI: Using configuration type 1
PCI: Probing PCI hardware
Unknown bridge resource 0: assuming transparent
PCI: Using IRQ router VIA [1106/8231] at 00:11.0
PCI: Found IRQ 6 for device 00:12.0
PCI: Found IRQ 7 for device 01:00.0
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Journalled Block Device driver loaded
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
Real Time Clock Driver v1.10e
Non-volatile memory driver v1.1
Uniform Multi-Platform E-IDE driver Revision: 6.31
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller on PCI bus 00 dev 89
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: VIA vt8231 (rev 10) IDE UDMA100 controller on pci00:11.1
    ide0: BM-DMA at 0x1820-0x1827, BIOS settings: hda:pio, hdb:pio
    ide1: BM-DMA at 0x1828-0x182f, BIOS settings: hdc:pio, hdd:pio
hda: ST380020A, ATA DISK drive
hdb: IBM-DTLA-305040, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hda: 156301488 sectors (80026 MB) w/2048KiB Cache, CHS=155061/16/63, UDMA(100)
hdb: 80418240 sectors (41174 MB) w/380KiB Cache, CHS=79780/16/63, UDMA(100)
Partition check:
 hda: hda1
 hdb: hdb1
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
loop: loaded (max 8 devices)
VIA Rhine Farmily Fast Ethernet Adapter Driver Ver. 4.11
Copyright (c) 2002 VIA Technologies, Inc.
PCI: Found IRQ 6 for device 00:12.0
eth0: VIA VT6102 Rhine II Fast Ethernet Adapter                   
eth0: MAC=00:02:F1:80:21:00 IO=0x1400 Mem=0xc8000000  IRQ=6 
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 8192 bind 16384)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 1084k freed
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 224k freed
init started:  BusyBox v0.60.5 (2002.11.14-08:59+0000) multi-call binary
------------------------------------------------------------------------
Mounting local file systems: ok
Starting system log daemon: ok
setup network
setting loop back interface
setting network interface
eth0: Link autonegation speed 100M bps full duplex

pdvr_802100 login: root


BusyBox v0.60.5 (2002.11.21-06:43+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

Welcome to **********
/ # sfdisk -l

Disk /dev/hda: 155061 cylinders, 16 heads, 63 sectors/track
Units = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/hda1          0+ 155060  155061-  78150743+  83  Linux
/dev/hda2          0       -       0          0    0  Empty
/dev/hda3          0       -       0          0    0  Empty
/dev/hda4          0       -       0          0    0  Empty

Disk /dev/hdb: 79780 cylinders, 16 heads, 63 sectors/track
Units = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/hdb1          0+  79779   79780-  40209119+  83  Linux
/dev/hdb2          0       -       0          0    0  Empty
/dev/hdb3          0       -       0          0    0  Empty
/dev/hdb4          0       -       0          0    0  Empty
/ # mkfs.ext3 /dev/hda1
mke2fs 1.32 (09-Nov-2002)
ext2fs_check_if_mount: No such file or directory while determining whether /dev/hda1 is mounted.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
9781248 inodes, 19537685 blocks
976884 blocks (5.00%) reserved for the super user
First data block=0
597 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks: 
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
4096000, 7962624, 11239424

Writing inode tables:   0/597  1/597  2/597  3/597  4/597  5/597  6/597  7/597  8/597Unable to handle kernel paging request at virtual address c58bc028

 printing eip:
c012c196
*pde = 00017063
*pte = 02a08f00
Oops: 0002
CPU:    0
EIP:    0010:[<c012c196>]    Not tainted
EFLAGS: 00010202
eax: c58bc0e0   ebx: 000000e0   ecx: 01000000   edx: c58bc020
esi: 00000020   edi: c125fdd4   ebp: c58bc000   esp: c6ff1e3c
ds: 0018   es: 0018   ss: 0018
Process mkfs.ext3 (pid: 128, stackpage=c6ff1000)
Stack: 00000001 000000f0 c125fddc c125fdd4 00000246 000000f0 c012c9a2 c125fdd4 
       000000f0 00000000 00000c00 00000400 00000001 c012c2ff c125fdd4 000000f0 
       c0135f44 c125fdd4 000000f0 c013601d 00000001 00000301 c12040a4 00001000 
Call Trace:    [<c012c9a2>] [<c012c2ff>] [<c0135f44>] [<c013601d>] [<c0136247>]
  [<c01367da>] [<c0135c3f>] [<c0136ea1>] [<c0139810>] [<c01398e9>] [<c0139810>]
  [<c012923f>] [<c01295bf>] [<c01340d5>] [<c0108ce3>]

Code: 89 5a 08 c7 42 10 00 00 00 00 89 42 0c 89 d6 85 f6 0f 84 b0 
 
Entering kdb (current=0xc6ff0000, pid 128) Oops: Oops
due to oops @ 0xc012c196
eax = 0xc58bc0e0 ebx = 0x000000e0 ecx = 0x01000000 edx = 0xc58bc020 
esi = 0x00000020 edi = 0xc125fdd4 esp = 0xc6ff1e3c eip = 0xc012c196 
ebp = 0xc58bc000 xss = 0x00000018 xcs = 0x00000010 eflags = 0x00010202 
xds = 0x00000018 xes = 0x00000018 origeax = 0xffffffff &regs = 0xc6ff1e08
kdb> go
Segmentation fault
/ # 
/ # mkreiserfs /dev/hdb1

<-------------mkreiserfs, 2002------------->
reiserfsprogs 3.6.4

mkreiserfs: Guessing about desired format.. 
mkreiserfs: Kernel 2.4.19-linuxbios_4 is running.
Format 3.6 with standard journal
Count of blocks on the device: 10052279
Number of blocks consumed by mkreiserfs formatting process: 8518
Blocksize: 4096
Hash function used to sort names: "r5"
Journal Size 8193 blocks (first block 18)
Journal Max transaction length 1024
inode generation number: 0
UUID: b6da3cd8-4519-46dc-a339-054a10774b88
ATTENTION: YOU SHOULD REBOOT AFTER FDISK!
ALL DATA WILL BE LOST ON '/dev/hdb1'!
Continue (y/n):y
Initializing journal - 0%....20%....40%....Unable to handle kernel paging request at virtual address c58bc000
 printing eip:
c0234ea4
*pde = 00017063
*pte = 02828f00
Oops: 0002
CPU:    0
EIP:    0010:[<c0234ea4>]    Not tainted
EFLAGS: 00010246
eax: 00000000   ebx: c58bc000   ecx: 00001000   edx: 00000000
esi: 0806ed38   edi: c58bc000   ebp: c10152c8   esp: c6ff1f34
ds: 0018   es: 0018   ss: 0018
Process mkreiserfs (pid: 127, stackpage=c6ff1000)
Stack: 00000000 00001000 00001000 c1204078 00000000 00001000 00000000 00000000 
       012e4000 00000000 c1015220 00000000 00000001 0806ed38 c101528c c1015220 
       c1285aa0 c01295bf c1285aa0 0806ed38 00001000 c1285ac0 0806ed38 c1285aa0 
Call Trace:    [<c01295bf>] [<c01340d5>] [<c0108ce3>]

Code: f3 aa 58 59 e9 c0 43 ef ff b8 f2 ff ff ff 30 d2 e9 c8 78 ef 
 
Entering kdb (current=0xc6ff0000, pid 127) Oops: Oops
due to oops @ 0xc0234ea4
eax = 0x00000000 ebx = 0xc58bc000 ecx = 0x00001000 edx = 0x00000000 
esi = 0x0806ed38 edi = 0xc58bc000 esp = 0xc6ff1f34 eip = 0xc0234ea4 
ebp = 0xc10152c8 xss = 0x00000018 xcs = 0x00000010 eflags = 0x00010246 
xds = 0x00000018 xes = 0x00000018 origeax = 0xffffffff &regs = 0xc6ff1f00
kdb> go
Segmentation fault
/ # 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20021122/0b3d5271/attachment.html>


More information about the coreboot mailing list