[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] Booting uClinux



Hi John,
I'm still using uclinux-auto (it's definatly the way to go...)
Ok, here's what I did. Commented out all the cache related lins in the microblaze in the MHS.

XPS: make clean all
XPS: make init_bram.

This should have updated my autoconfig.in (I checked the date stamp on it and it was right).

Then ran:
make distclean  (might as well be sure...)
make menuconfig:
where I selected:
    Vendor/Produce selection -> Xilinx, uclinux-auto
    Kernel/library/defaults  -> customise kernel settings

make asks the questions:
CFI Flash device mapped on Microblaze/ML401 (uClinux) (CONFIG_MTD_ML401) [N/y/m/?] (NEW)
    I select default of N

Conexant flash MTD support hack (CONFIG_MTD_MTDCNXT) [N/y/m/?] (NEW)
    Again, I select default of N

(I do not have a flash device!)

In the menu, I select:
processor/type/features -> UNselect ethernet driver (dont have ethernet!)
general setup -> UNselect Networking support (see above!)

everything else left as defualt

run make dep

Attached is the autoconf.h and .config file, and the modifed init/main.c (plenty of printk's!!)

And after all that, here is my terminal output.

-> download bitsream with impact:

Terminal:
-- Entering main() --
Starting MemoryTest for SDRAM_8Mx32:
  Running 32-bit test...PASSED!
  Running 16-bit test...PASSED!
  Running 8-bit test...PASSED!
-- Exiting main() --

XMD:
connect mb mdm;
stop;
force;
dow images/image.elf
con
->    section, .text: 0x81800000-0x81894ce8
        section, .intv: 0x81894ce8-0x81894d20
        section, .init: 0x8189f000-0x818a7000
        section, .sdata2: 0x81894d20-0x81895e48
        section, .data: 0x81895e48-0x8189e020
        section, .bss: 0x818a7000-0x818c58fc
        section, .romfs: 0x818a7000-0x81958c00
Downloaded Program images/image.elf
Setting PC with program start addr = 0x81800000


Terminal:
Linux version 2.4.29-uc0 (jmcgrath@xcklinux3) (gcc version 2.95.3-4 Xilinx EDK 6
.3 Build EDK_Gmm.12.2) #1 Thu Apr 14 12:40:38 IST 2005
On node 0 totalpages: 2048
zone(0): 2048 pages.
zone(1): 0 pages.
zone(2): 0 pages.
CPU: MICROBLAZE
Console: xmbserial on UARTLite
Kernel command line: °
Calibrating delay loop... 1.93 BogoMIPS
Memory: 8MB = 8MB total
Memory: 7304KB available (595K code, 195K data, 32K init)
Dentry cache hash table entries: 1024 (order: 1, 8192 bytes)
Inode cache hash table entries: 512 (order: 0, 4096 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 2048 (order: 1, 8192 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Microblaze UARTlite serial driver version 1.00
ttyS0 at 0xa0000000 (irq = 1) is a Microblaze UARTlite
Starting kswapd
xgpio #0 at 0x81020000 mapped to 0x81020000
Xilinx GPIO registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
MBVanilla flash probe(0xff000000,8388608,4): 800000 at ff000000
CFI: Found no Flash device at location zero
Search for id:(00 00) interleave(2) type(2)
Search for id:(00 00) interleave(2) type(2)
Search for id:(00 00) interleave(2) type(2)
Search for id:(00 00) interleave(2) type(1)
Search for id:(00 00) interleave(2) type(1)
Search for id:(00 00) interleave(2) type(1)
Search for id:(00 00) interleave(4) type(2)
Search for id:(00 00) interleave(4) type(2)
Search for id:(00 00) interleave(4) type(2)
Search for id:(00 00) interleave(4) type(1)
Search for id:(00 00) interleave(4) type(1)
Search for id:(00 00) interleave(4) type(1)
JEDEC: Found no Flash device at location zero
MBVanilla ram probe(0x818c58fc,729088,4): b2000 at 818c58fc
Creating 1 MTD partitions on "RAM":
0x00000000-0x000b2000 : "Romfs"
VFS: Mounted root (romfs filesystem) readonly.
jFreeing init memory: 32K
j0j1j2j3j4j5j6j7j8<0>Kernel panic: No init found.  Try passing init= option to k
ernel.



Try agian with image.bin
re-downlaod bitsream

Terminal:
-- Entering main() --
Starting MemoryTest for SDRAM_8Mx32:
  Running 32-bit test...PASSED!
  Running 16-bit test...PASSED!
  Running 8-bit test...PASSED!
-- Exiting main() --

XMD:
connect mb mdm;
stop;
force;
dow -data images/image.bin 0x81800000
con 0x81800000

Terminal:
Linux version 2.4.29-uc0 (jmcgrath@xcklinux3) (gcc version 2.95.3-4 Xilinx EDK 6
.3 Build EDK_Gmm.12.2) #1 Thu Apr 14 12:40:38 IST 2005
On node 0 totalpages: 2048
zone(0): 2048 pages.
zone(1): 0 pages.
zone(2): 0 pages.
CPU: MICROBLAZE
Console: xmbserial on UARTLite
Kernel command line: °
Calibrating delay loop... 1.93 BogoMIPS
Memory: 8MB = 8MB total
Memory: 6592KB available (595K code, 905K data, 32K init)
Dentry cache hash table entries: 1024 (order: 1, 8192 bytes)
Inode cache hash table entries: 512 (order: 0, 4096 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 2048 (order: 1, 8192 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Microblaze UARTlite serial driver version 1.00
ttyS0 at 0xa0000000 (irq = 1) is a Microblaze UARTlite
Starting kswapd
xgpio #0 at 0x81020000 mapped to 0x81020000
Xilinx GPIO registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
MBVanilla flash probe(0xff000000,8388608,4): 800000 at ff000000
CFI: Found no Flash device at location zero
Search for id:(00 00) interleave(2) type(2)
Search for id:(00 00) interleave(2) type(2)
Search for id:(00 00) interleave(2) type(2)
Search for id:(00 00) interleave(2) type(1)
Search for id:(00 00) interleave(2) type(1)
Search for id:(00 00) interleave(2) type(1)
Search for id:(00 00) interleave(4) type(2)
Search for id:(00 00) interleave(4) type(2)
Search for id:(00 00) interleave(4) type(2)
Search for id:(00 00) interleave(4) type(1)
Search for id:(00 00) interleave(4) type(1)
Search for id:(00 00) interleave(4) type(1)
JEDEC: Found no Flash device at location zero
MBVanilla ram probe(0x818c58fc,729088,4): b2000 at 818c58fc
Creating 1 MTD partitions on "RAM":
0x00000000-0x000b2000 : "Romfs"
VFS: Mounted root (romfs filesystem) readonly.
jFreeing init memory: 32K
j0j1j2j3j4


As we can see, the image.bin has more success. Howver, according to the ptin it gets stalled right before it tries to execute a file off of the romfs.

This is as far as I have gotten. totally stumped!
Cheers,
John

John Williams wrote:
Hi John,

John McGrath wrote:

They are attached.

Hmm, there is at least one inconsistency I see:

From your bootlog:

> Calibrating delay loop... 1.93 BogoMIPS

Yet from your MHS file:

>  PARAMETER C_USE_ICACHE = 1
>  PARAMETER C_USE_DCACHE = 1

At 50MHz, there's no way you should be getting only 1.9 bogomips with I and Dcaches enabled.

This suggests to me that your kernel config (as defined by auto-config.in) and your hardware config (as defined my MHS/MSS) are still mismatched.

Although looking further, I see this:

 PARAMETER C_USE_ICACHE = 1
 PARAMETER C_ICACHE_BASEADDR = 0x10000000
 PARAMETER C_ICACHE_HIGHADDR = 0x13FFFFFF
 PARAMETER C_CACHE_BYTE_SIZE = 16384
 PARAMETER C_ADDR_TAG_BITS = 11
 PARAMETER C_USE_DCACHE = 1
 PARAMETER C_DCACHE_BASEADDR = 0x10000000
 PARAMETER C_DCACHE_HIGHADDR = 0x13FFFFFF
 PARAMETER C_DCACHE_BYTE_SIZE = 16384
 PARAMETER C_DCACHE_ADDR_TAG = 11

Your icache and dcache ranges are totally mismatched from where your physical memory resides in the address map (0x81800000).  I'm not certain this is actually broken, but it's definitely unusual and probably not intended.    I've never tried a uclinux system where the cacheable raneg is disjoint from the main memory range, so no guarantees there.  If you don't want caches yet, best to just turn them off.

Are you still using the "uclinux-auto" platform or did you create your own as per the instructions in my "adding platforms HOWTO" in linux-2.4.x/Documentation/microblaze?  There are a couple of subtle steps in those instructions that must eb followed to the letter, else you will get inconsistencies like you are seeing here.

To double check, you should examine the file linux-2.4.x/include/linux/autoconf.h - this is the resulting header file produced after the auto-config.in file is parsed by the kernel config tools.  It too should be consistent with your MHS, MSS and auto-config.in file.

This is the purpose of running the make oldconfig, after auto-config.in is updated by libgen.  My experience is that this (make oldconfig) is enough to collect the changes, although at least one person on the list has asserted that you need to do a full "make distclean" then start again...  I'm pretty sure this is not the case, but am ready to be proven wrong with enough evidence :)

Post your file linux-2.4.x/.config, that should also reflect the settings for your platform.

Ive done the steps youve asked.
I think the real problem is that the romfs seems to want to map to memory space 0x00000000-0x000b2000, when my ram is located at 0x81800000. perhaps it cannot find any files in my fs , and that is why it hangs?

It may be related to the romfs, but the 0-0xb2000 is not the problem. Those addresses are relative to the MTD partition in which the romfs is located

Is there a way to test the romfs readability, some code I can enter into the inti sequence perhaps??

In linux-2.4.x/init/main.c, around like 650, is the very tail end of the kernel boot process, and where it tries to load the "init" application, which kickstarts the userspace.

You could throw some printk()'s in there to get some visibility, or even better just use mb-gdb and xmd to debug the kernel like any microblaze program - there are some notes on how to do this on the website, under Documentation.

Regards,

John


___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/



#
# Automatically generated by make menuconfig: don't edit
#
CONFIG_UCLINUX=y
CONFIG_UID16=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
# CONFIG_ISA is not set
# CONFIG_ISAPNP is not set
# CONFIG_EISA is not set
# CONFIG_MCA is not set

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y

#
# Loadable module support
#
CONFIG_MODULES=y
# CONFIG_MODVERSIONS is not set
# CONFIG_KMOD is not set
CONFIG_MICROBLAZE=y

#
# Processor type and features
#
CONFIG_UCLINUX_AUTO=y
# CONFIG_MBVANILLA is not set
# CONFIG_EGRET01 is not set
# CONFIG_SUZAKU is not set
HZ=100
CONFIG_XILINX_ERAM_START=0x81800000
CONFIG_XILINX_ERAM_SIZE=0x00800000
CONFIG_XILINX_LMB_START=0x00000000
CONFIG_XILINX_LMB_SIZE=0x00008000
CONFIG_XILINX_CPU_CLOCK_FREQ=50000000
CONFIG_XILINX_MICROBLAZE0_INSTANCE="microblaze_0"
CONFIG_XILINX_MICROBLAZE0_FAMILY="virtex2p"
CONFIG_XILINX_MICROBLAZE0_INSTANCE="microblaze_0"
CONFIG_XILINX_MICROBLAZE0_D_OPB=1
CONFIG_XILINX_MICROBLAZE0_D_LMB=1
CONFIG_XILINX_MICROBLAZE0_I_OPB=1
CONFIG_XILINX_MICROBLAZE0_I_LMB=1
CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1
CONFIG_XILINX_MICROBLAZE0_USE_DIV=1
CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1
CONFIG_XILINX_MICROBLAZE0_UNALIGNED_EXCEPTIONS=0
CONFIG_XILINX_MICROBLAZE0_ILL_OPCODE_EXCEPTION=0
CONFIG_XILINX_MICROBLAZE0_IOPB_BUS_EXCEPTION=0
CONFIG_XILINX_MICROBLAZE0_DOPB_BUS_EXCEPTION=0
CONFIG_XILINX_MICROBLAZE0_DIV_ZERO_EXCEPTION=0
CONFIG_XILINX_MICROBLAZE0_DEBUG_ENABLED=1
CONFIG_XILINX_MICROBLAZE0_NUMBER_OF_PBRK=2
CONFIG_XILINX_MICROBLAZE0_NUMBER_OF_RD_ADDR_BRK=1
CONFIG_XILINX_MICROBLAZE0_NUMBER_OF_WR_ADDR_BRK=1
CONFIG_XILINX_MICROBLAZE0_INTERRUPT_IS_EDGE=0
CONFIG_XILINX_MICROBLAZE0_EDGE_IS_POSITIVE=1
CONFIG_XILINX_MICROBLAZE0_FSL_LINKS=1
CONFIG_XILINX_MICROBLAZE0_FSL_DATA_SIZE=32
CONFIG_XILINX_MICROBLAZE0_ICACHE_BASEADDR=0x00000000
CONFIG_XILINX_MICROBLAZE0_ICACHE_HIGHADDR=0x3FFFFFFF
CONFIG_XILINX_MICROBLAZE0_USE_ICACHE=0
CONFIG_XILINX_MICROBLAZE0_ALLOW_ICACHE_WR=1
CONFIG_XILINX_MICROBLAZE0_ADDR_TAG_BITS=17
CONFIG_XILINX_MICROBLAZE0_CACHE_BYTE_SIZE=8192
CONFIG_XILINX_MICROBLAZE0_ICACHE_USE_FSL=0
CONFIG_XILINX_MICROBLAZE0_DCACHE_BASEADDR=0x00000000
CONFIG_XILINX_MICROBLAZE0_DCACHE_HIGHADDR=0x3FFFFFFF
CONFIG_XILINX_MICROBLAZE0_USE_DCACHE=0
CONFIG_XILINX_MICROBLAZE0_ALLOW_DCACHE_WR=1
CONFIG_XILINX_MICROBLAZE0_DCACHE_ADDR_TAG=17
CONFIG_XILINX_MICROBLAZE0_DCACHE_BYTE_SIZE=8192
CONFIG_XILINX_MICROBLAZE0_DCACHE_USE_FSL=0
CONFIG_XILINX_MICROBLAZE0_INSTANCE="microblaze_0"
CONFIG_XILINX_MICROBLAZE0_HW_VER="3.00.a"
CONFIG_XILINX_LMB_BRAM_IF_CNTLR_0_INSTANCE="lmb_bram_if_cntlr_0"
CONFIG_XILINX_LMB_BRAM_IF_CNTLR_0_BASEADDR=0x00000000
CONFIG_XILINX_LMB_BRAM_IF_CNTLR_0_HIGHADDR=0x00007FFF
CONFIG_XILINX_LMB_BRAM_IF_CNTLR_0_MASK=0x21000000
CONFIG_XILINX_LMB_BRAM_IF_CNTLR_0_LMB_AWIDTH=32
CONFIG_XILINX_LMB_BRAM_IF_CNTLR_0_LMB_DWIDTH=32
CONFIG_XILINX_LMB_BRAM_IF_CNTLR_0_INSTANCE="lmb_bram_if_cntlr_0"
CONFIG_XILINX_LMB_BRAM_IF_CNTLR_0_HW_VER="1.00.b"
CONFIG_XILINX_LMB_BRAM_IF_CNTLR_1_INSTANCE="lmb_bram_if_cntlr_1"
CONFIG_XILINX_LMB_BRAM_IF_CNTLR_1_BASEADDR=0x00000000
CONFIG_XILINX_LMB_BRAM_IF_CNTLR_1_HIGHADDR=0x00007FFF
CONFIG_XILINX_LMB_BRAM_IF_CNTLR_1_MASK=0x21000000
CONFIG_XILINX_LMB_BRAM_IF_CNTLR_1_LMB_AWIDTH=32
CONFIG_XILINX_LMB_BRAM_IF_CNTLR_1_LMB_DWIDTH=32
CONFIG_XILINX_LMB_BRAM_IF_CNTLR_1_INSTANCE="lmb_bram_if_cntlr_1"
CONFIG_XILINX_LMB_BRAM_IF_CNTLR_1_HW_VER="1.00.b"
CONFIG_XILINX_MDM_0_INSTANCE="opb_mdm_0"
CONFIG_XILINX_MDM_0_BASEADDR=0xFFFE8000
CONFIG_XILINX_MDM_0_HIGHADDR=0xFFFE80FF
CONFIG_XILINX_MDM_0_OPB_DWIDTH=32
CONFIG_XILINX_MDM_0_OPB_AWIDTH=32
CONFIG_XILINX_MDM_0_FAMILY="virtex2p"
CONFIG_XILINX_MDM_0_MB_DBG_PORTS=1
CONFIG_XILINX_MDM_0_USE_UART=1
CONFIG_XILINX_MDM_0_UART_WIDTH=8
CONFIG_XILINX_MDM_0_WRITE_FSL_PORTS=1
CONFIG_XILINX_MDM_0_INSTANCE="opb_mdm_0"
CONFIG_XILINX_MDM_0_HW_VER="2.01.a"
CONFIG_XILINX_MDM_0_IRQ=2
CONFIG_XILINX_UARTLITE_0_INSTANCE="console_uart"
CONFIG_XILINX_UARTLITE_0_BASEADDR=0xA0000000
CONFIG_XILINX_UARTLITE_0_HIGHADDR=0xA0001FFF
CONFIG_XILINX_UARTLITE_0_OPB_DWIDTH=32
CONFIG_XILINX_UARTLITE_0_OPB_AWIDTH=32
CONFIG_XILINX_UARTLITE_0_DATA_BITS=8
CONFIG_XILINX_UARTLITE_0_CLK_FREQ=50000000
CONFIG_XILINX_UARTLITE_0_BAUDRATE=115200
CONFIG_XILINX_UARTLITE_0_USE_PARITY=0
CONFIG_XILINX_UARTLITE_0_ODD_PARITY=0
CONFIG_XILINX_UARTLITE_0_INSTANCE="console_uart"
CONFIG_XILINX_UARTLITE_0_HW_VER="1.00.b"
CONFIG_XILINX_UARTLITE_0_IRQ=1
CONFIG_XILINX_GPIO_0_INSTANCE="LEDs_8Bit"
CONFIG_XILINX_GPIO_0_BASEADDR=0x81020000
CONFIG_XILINX_GPIO_0_HIGHADDR=0x8102FFFF
CONFIG_XILINX_GPIO_0_USER_ID_CODE=3
CONFIG_XILINX_GPIO_0_OPB_AWIDTH=32
CONFIG_XILINX_GPIO_0_OPB_DWIDTH=32
CONFIG_XILINX_GPIO_0_FAMILY="virtex2p"
CONFIG_XILINX_GPIO_0_GPIO_WIDTH=8
CONFIG_XILINX_GPIO_0_ALL_INPUTS=0
CONFIG_XILINX_GPIO_0_INTERRUPT_PRESENT=0
CONFIG_XILINX_GPIO_0_IS_BIDIR=0
CONFIG_XILINX_GPIO_0_DOUT_DEFAULT=0x00000000
CONFIG_XILINX_GPIO_0_TRI_DEFAULT=0xFFFFFFFF
CONFIG_XILINX_GPIO_0_IS_DUAL=0
CONFIG_XILINX_GPIO_0_ALL_INPUTS_2=0
CONFIG_XILINX_GPIO_0_IS_BIDIR_2=1
CONFIG_XILINX_GPIO_0_DOUT_DEFAULT_2=0x00000000
CONFIG_XILINX_GPIO_0_TRI_DEFAULT_2=0xFFFFFFFF
CONFIG_XILINX_GPIO_0_INSTANCE="LEDs_8Bit"
CONFIG_XILINX_GPIO_0_HW_VER="3.01.a"
CONFIG_XILINX_SDRAM_0_INSTANCE="SDRAM_8Mx32"
CONFIG_XILINX_SDRAM_0_INCLUDE_BURST_SUPPORT=1
CONFIG_XILINX_SDRAM_0_INCLUDE_HIGHSPEED_PIPE=1
CONFIG_XILINX_SDRAM_0_USE_POSEDGE_OUTREGS=0
CONFIG_XILINX_SDRAM_0_FAMILY="virtex2p"
CONFIG_XILINX_SDRAM_0_SDRAM_TMRD=2
CONFIG_XILINX_SDRAM_0_SDRAM_TWR=15000
CONFIG_XILINX_SDRAM_0_SDRAM_TCCD=1
CONFIG_XILINX_SDRAM_0_SDRAM_TRAS=50000
CONFIG_XILINX_SDRAM_0_SDRAM_TRC=100000
CONFIG_XILINX_SDRAM_0_SDRAM_TRFC=100000
CONFIG_XILINX_SDRAM_0_SDRAM_TRCD=20000
CONFIG_XILINX_SDRAM_0_SDRAM_TRRD=20000
CONFIG_XILINX_SDRAM_0_SDRAM_TRP=20000
CONFIG_XILINX_SDRAM_0_SDRAM_TREF=64
CONFIG_XILINX_SDRAM_0_SDRAM_REFRESH_NUMROWS=8192
CONFIG_XILINX_SDRAM_0_SDRAM_CAS_LAT=2
CONFIG_XILINX_SDRAM_0_SDRAM_DWIDTH=32
CONFIG_XILINX_SDRAM_0_SDRAM_AWIDTH=11
CONFIG_XILINX_SDRAM_0_SDRAM_COL_AWIDTH=8
CONFIG_XILINX_SDRAM_0_SDRAM_BANK_AWIDTH=2
CONFIG_XILINX_SDRAM_0_SDRAM_TREFI=7812500
CONFIG_XILINX_SDRAM_0_BASEADDR=0x81800000
CONFIG_XILINX_SDRAM_0_HIGHADDR=0x81FFFFFF
CONFIG_XILINX_SDRAM_0_OPB_DWIDTH=32
CONFIG_XILINX_SDRAM_0_OPB_AWIDTH=32
CONFIG_XILINX_SDRAM_0_OPB_CLK_PERIOD_PS=20000
CONFIG_XILINX_SDRAM_0_SIM_INIT_TIME_PS=100000000
CONFIG_XILINX_SDRAM_0_INSTANCE="SDRAM_8Mx32"
CONFIG_XILINX_SDRAM_0_HW_VER="1.00.e"
CONFIG_XILINX_INTC_0_INSTANCE="opb_intc_0"
CONFIG_XILINX_INTC_0_FAMILY="virtex2p"
CONFIG_XILINX_INTC_0_Y=0
CONFIG_XILINX_INTC_0_X=0
CONFIG_XILINX_INTC_0_U_SET="intc"
CONFIG_XILINX_INTC_0_OPB_AWIDTH=32
CONFIG_XILINX_INTC_0_OPB_DWIDTH=32
CONFIG_XILINX_INTC_0_BASEADDR=0xD1000FC0
CONFIG_XILINX_INTC_0_HIGHADDR=0xD1000FDF
CONFIG_XILINX_INTC_0_NUM_INTR_INPUTS=3
CONFIG_XILINX_INTC_0_KIND_OF_INTR=0x00000006
CONFIG_XILINX_INTC_0_KIND_OF_EDGE=0x00000006
CONFIG_XILINX_INTC_0_KIND_OF_LVL=0x00000001
CONFIG_XILINX_INTC_0_HAS_IPR=1
CONFIG_XILINX_INTC_0_HAS_SIE=1
CONFIG_XILINX_INTC_0_HAS_CIE=1
CONFIG_XILINX_INTC_0_HAS_IVR=1
CONFIG_XILINX_INTC_0_IRQ_IS_LEVEL=1
CONFIG_XILINX_INTC_0_IRQ_ACTIVE=1
CONFIG_XILINX_INTC_0_INSTANCE="opb_intc_0"
CONFIG_XILINX_INTC_0_HW_VER="1.00.c"
CONFIG_XILINX_TIMER_0_INSTANCE="opb_timer_0"
CONFIG_XILINX_TIMER_0_FAMILY="virtex2p"
CONFIG_XILINX_TIMER_0_COUNT_WIDTH=32
CONFIG_XILINX_TIMER_0_ONE_TIMER_ONLY=0
CONFIG_XILINX_TIMER_0_TRIG0_ASSERT=1
CONFIG_XILINX_TIMER_0_TRIG1_ASSERT=1
CONFIG_XILINX_TIMER_0_GEN0_ASSERT=1
CONFIG_XILINX_TIMER_0_GEN1_ASSERT=1
CONFIG_XILINX_TIMER_0_OPB_AWIDTH=32
CONFIG_XILINX_TIMER_0_OPB_DWIDTH=32
CONFIG_XILINX_TIMER_0_BASEADDR=0xA2000000
CONFIG_XILINX_TIMER_0_HIGHADDR=0xA20000FF
CONFIG_XILINX_TIMER_0_INSTANCE="opb_timer_0"
CONFIG_XILINX_TIMER_0_HW_VER="1.00.b"
CONFIG_XILINX_TIMER_0_IRQ=0
CONFIG_XILINX_LMB_BRAM_IF_CNTLR_NUM_INSTANCES=2
CONFIG_XILINX_TIMER_NUM_INSTANCES=1
CONFIG_XILINX_INTC_NUM_INSTANCES=1
CONFIG_XILINX_UARTLITE_NUM_INSTANCES=1
CONFIG_XILINX_MDM_NUM_INSTANCES=1
CONFIG_XILINX_SDRAM_NUM_INSTANCES=1
CONFIG_XILINX_GPIO_NUM_INSTANCES=1
CONFIG_XILINX_GPIO=y
# CONFIG_XILINX_ENET is not set
# CONFIG_XILINX_SYSACE is not set
CONFIG_MBVANILLA_CMDLINE=y
CONFIG_ZERO_BSS=y
CONFIG_MICROBLAZE_DEBUGGING=y

#
# General setup
#
# CONFIG_NET is not set
# CONFIG_DISK is not set
# CONFIG_HOTPLUG is not set
# CONFIG_PCMCIA is not set
# CONFIG_SYSVIPC is not set
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_SYSCTL is not set
CONFIG_KCORE_ELF=y
# CONFIG_KCORE_AOUT is not set
CONFIG_BINFMT_FLAT=y
CONFIG_BINFMT_ZFLAT=y
# CONFIG_CONTIGUOUS_PAGE_ALLOC is not set
# CONFIG_MEM_MAP is not set
# CONFIG_NO_MMU_LARGE_ALLOCS is not set

#
# Memory Technology Devices (MTD)
#
CONFIG_MTD=y
# CONFIG_MTD_DEBUG is not set
CONFIG_MTD_PARTITIONS=y
# CONFIG_MTD_CONCAT is not set
# CONFIG_MTD_REDBOOT_PARTS is not set
# CONFIG_MTD_CMDLINE_PARTS is not set
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
# CONFIG_FTL is not set
# CONFIG_NFTL is not set
# CONFIG_INFTL is not set

#
# RAM/ROM/Flash chip drivers
#
CONFIG_MTD_CFI=y
CONFIG_MTD_JEDECPROBE=y
CONFIG_MTD_GEN_PROBE=y
# CONFIG_MTD_CFI_ADV_OPTIONS is not set
# CONFIG_MTD_CFI_INTELEXT is not set
CONFIG_MTD_CFI_AMDSTD=y
# CONFIG_MTD_CFI_STAA is not set
CONFIG_MTD_RAM=y
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_ABSENT is not set
# CONFIG_MTD_OBSOLETE_CHIPS is not set
# CONFIG_MTD_AMDSTD is not set
# CONFIG_MTD_SHARP is not set
# CONFIG_MTD_JEDEC is not set
# CONFIG_MTD_PSD4256G is not set

#
# Mapping drivers for chip access
#
# CONFIG_MTD_PHYSMAP is not set
# CONFIG_MTD_DRAGONIX is not set
# CONFIG_MTD_NETtel is not set
# CONFIG_MTD_SNAPGEODE is not set
# CONFIG_MTD_NETteluC is not set
CONFIG_MTD_MBVANILLA=y
# CONFIG_FLASHAUTO is not set
# CONFIG_FLASH128KB is not set
# CONFIG_FLASH1MB is not set
# CONFIG_FLASH2MB is not set
# CONFIG_FLASH4MB is not set
# CONFIG_FLASH6MB is not set
CONFIG_FLASH8MB=y
# CONFIG_MTD_ML401 is not set
# CONFIG_MTD_SUZAKU is not set
# CONFIG_MTD_KeyTechnology is not set
# CONFIG_MTD_SED_SIOSIII is not set
# CONFIG_MTD_UCLINUX is not set
# CONFIG_MTD_PCI is not set
# CONFIG_MTD_PCMCIA is not set

#
# Self-contained MTD device drivers
#
# CONFIG_MTD_PMC551 is not set
# CONFIG_MTD_SLRAM is not set
# CONFIG_MTD_MTDRAM is not set
# CONFIG_MTD_MTDCNXT is not set
# CONFIG_MTD_BLKMTD is not set
# CONFIG_MTD_DOC1000 is not set
# CONFIG_MTD_DOC2000 is not set
# CONFIG_MTD_DOC2001 is not set
# CONFIG_MTD_DOC2001PLUS is not set
# CONFIG_MTD_DOCPROBE is not set

#
# NAND Flash Device Drivers
#
# CONFIG_MTD_NAND is not set

#
# Parallel port support
#
# CONFIG_PARPORT is not set

#
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_DEV_XD is not set
# CONFIG_PARIDE is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_CISS_SCSI_TAPE is not set
# CONFIG_CISS_MONITOR_THREAD is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
# CONFIG_BLK_DEV_SX8 is not set
# CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_NBD is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=4096
# CONFIG_BLK_DEV_INITRD is not set
# CONFIG_BLK_DEV_RAMDISK_DATA is not set
# CONFIG_BLK_DEV_BLKMEM is not set
# CONFIG_BLK_STATS is not set

#
# Character devices
#
# CONFIG_LEDMAN is not set
# CONFIG_SNAPDOG is not set
# CONFIG_DS1302 is not set
# CONFIG_M41T11M6 is not set
# CONFIG_VT is not set
# CONFIG_SERIAL is not set
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set

#
# Serial drivers
#
# CONFIG_SERIAL_8250 is not set
# CONFIG_SERIAL_8250_CONSOLE is not set
# CONFIG_SERIAL_8250_EXTENDED is not set
# CONFIG_SERIAL_8250_MANY_PORTS is not set
# CONFIG_SERIAL_8250_SHARE_IRQ is not set
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
# CONFIG_SERIAL_8250_MULTIPORT is not set
# CONFIG_SERIAL_8250_HUB6 is not set
# CONFIG_UNIX98_PTYS is not set

#
# I2C support
#
# CONFIG_I2C is not set

#
# Mice
#
# CONFIG_BUSMOUSE is not set
# CONFIG_MOUSE is not set
# CONFIG_EDB7312_TS is not set

#
# Joysticks
#
# CONFIG_INPUT_GAMEPORT is not set
# CONFIG_INPUT_NS558 is not set
# CONFIG_INPUT_LIGHTNING is not set
# CONFIG_INPUT_PCIGAME is not set
# CONFIG_INPUT_CS461X is not set
# CONFIG_INPUT_EMU10K1 is not set
# CONFIG_INPUT_SERIO is not set
# CONFIG_INPUT_SERPORT is not set
# CONFIG_INPUT_ANALOG is not set
# CONFIG_INPUT_A3D is not set
# CONFIG_INPUT_ADI is not set
# CONFIG_INPUT_COBRA is not set
# CONFIG_INPUT_GF2K is not set
# CONFIG_INPUT_GRIP is not set
# CONFIG_INPUT_INTERACT is not set
# CONFIG_INPUT_TMDC is not set
# CONFIG_INPUT_SIDEWINDER is not set
# CONFIG_INPUT_IFORCE_USB is not set
# CONFIG_INPUT_IFORCE_232 is not set
# CONFIG_INPUT_WARRIOR is not set
# CONFIG_INPUT_MAGELLAN is not set
# CONFIG_INPUT_SPACEORB is not set
# CONFIG_INPUT_SPACEBALL is not set
# CONFIG_INPUT_STINGER is not set
# CONFIG_INPUT_DB9 is not set
# CONFIG_INPUT_GAMECON is not set
# CONFIG_INPUT_TURBOGRAFX is not set
# CONFIG_QIC02_TAPE is not set
# CONFIG_IPMI_HANDLER is not set
# CONFIG_IPMI_PANIC_EVENT is not set
# CONFIG_IPMI_DEVICE_INTERFACE is not set
# CONFIG_IPMI_KCS is not set
# CONFIG_IPMI_WATCHDOG is not set

#
# Controller Area Network Cards/Chips
#
# CONFIG_CAN4LINUX is not set

#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_SCx200 is not set
# CONFIG_SCx200_GPIO is not set
# CONFIG_AMD_PM768 is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set

#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
# CONFIG_AGP is not set

#
# Direct Rendering Manager (XFree86 DRI support)
#
# CONFIG_DRM is not set

#
# Misc devices
#
# CONFIG_MICROBLAZE_FSLFIFO is not set

#
# File systems
#
# CONFIG_QUOTA is not set
# CONFIG_QFMT_V2 is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_FS is not set
# CONFIG_REISERFS_FS is not set
# CONFIG_REISERFS_CHECK is not set
# CONFIG_REISERFS_PROC_INFO is not set
# CONFIG_ADFS_FS is not set
# CONFIG_ADFS_FS_RW is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BEFS_DEBUG is not set
# CONFIG_BFS_FS is not set
# CONFIG_EXT3_FS is not set
# CONFIG_JBD is not set
# CONFIG_JBD_DEBUG is not set
# CONFIG_FAT_FS is not set
# CONFIG_MSDOS_FS is not set
# CONFIG_UMSDOS_FS is not set
# CONFIG_VFAT_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_JFFS_FS is not set
# CONFIG_JFFS2_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_TMPFS is not set
CONFIG_RAMFS=y
# CONFIG_ISO9660_FS is not set
# CONFIG_JOLIET is not set
# CONFIG_ZISOFS is not set
# CONFIG_JFS_FS is not set
# CONFIG_JFS_DEBUG is not set
# CONFIG_JFS_STATISTICS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_NTFS_RW is not set
# CONFIG_HPFS_FS is not set
CONFIG_PROC_FS=y
# CONFIG_DEVFS_FS is not set
# CONFIG_DEVFS_MOUNT is not set
# CONFIG_DEVFS_DEBUG is not set
# CONFIG_DEVPTS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_QNX4FS_RW is not set
CONFIG_ROMFS_FS=y
CONFIG_EXT2_FS=y
# CONFIG_SYSV_FS is not set
# CONFIG_UDF_FS is not set
# CONFIG_UDF_RW is not set
# CONFIG_UFS_FS is not set
# CONFIG_UFS_FS_WRITE is not set
# CONFIG_XFS_FS is not set
# CONFIG_XFS_QUOTA is not set
# CONFIG_XFS_RT is not set
# CONFIG_XFS_TRACE is not set
# CONFIG_XFS_DEBUG is not set
# CONFIG_NCPFS_NLS is not set
# CONFIG_SMB_FS is not set
# CONFIG_ZISOFS_FS is not set
# CONFIG_COREDUMP_PRINTK is not set

#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
# CONFIG_SMB_NLS is not set
# CONFIG_NLS is not set

#
# Sound
#
# CONFIG_SOUND is not set

#
# USB support
#
# CONFIG_USB is not set

#
# Support for USB gadgets
#
# CONFIG_USB_GADGET is not set

#
# Kernel hacking
#
CONFIG_FULLDEBUG=y
# CONFIG_MAGIC_SYSRQ is not set
# CONFIG_PROFILE is not set
# CONFIG_NO_KERNEL_MSG is not set

#
# Cryptographic options
#
# CONFIG_CRYPTO is not set

#
# Library routines
#
# CONFIG_CRC32 is not set
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
/*
 * Automatically generated by make menuconfig: don't edit
 */
#define AUTOCONF_INCLUDED
#define CONFIG_UCLINUX 1
#define CONFIG_UID16 1
#define CONFIG_RWSEM_GENERIC_SPINLOCK 1
#undef  CONFIG_RWSEM_XCHGADD_ALGORITHM
#undef  CONFIG_ISA
#undef  CONFIG_ISAPNP
#undef  CONFIG_EISA
#undef  CONFIG_MCA

/*
 * Code maturity level options
 */
#define CONFIG_EXPERIMENTAL 1

/*
 * Loadable module support
 */
#define CONFIG_MODULES 1
#undef  CONFIG_MODVERSIONS
#undef  CONFIG_KMOD
#define CONFIG_MICROBLAZE 1

/*
 * Processor type and features
 */
#define CONFIG_UCLINUX_AUTO 1
#undef  CONFIG_MBVANILLA
#undef  CONFIG_EGRET01
#undef  CONFIG_SUZAKU
#define HZ (100)
#define CONFIG_XILINX_ERAM_START 0x81800000
#define CONFIG_XILINX_ERAM_SIZE 0x00800000
#define CONFIG_XILINX_LMB_START 0x00000000
#define CONFIG_XILINX_LMB_SIZE 0x00008000
#define CONFIG_XILINX_CPU_CLOCK_FREQ (50000000)
#define CONFIG_XILINX_MICROBLAZE0_INSTANCE "microblaze_0"
#define CONFIG_XILINX_MICROBLAZE0_FAMILY "virtex2p"
#define CONFIG_XILINX_MICROBLAZE0_INSTANCE "microblaze_0"
#define CONFIG_XILINX_MICROBLAZE0_D_OPB (1)
#define CONFIG_XILINX_MICROBLAZE0_D_LMB (1)
#define CONFIG_XILINX_MICROBLAZE0_I_OPB (1)
#define CONFIG_XILINX_MICROBLAZE0_I_LMB (1)
#define CONFIG_XILINX_MICROBLAZE0_USE_BARREL (1)
#define CONFIG_XILINX_MICROBLAZE0_USE_DIV (1)
#define CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR (1)
#define CONFIG_XILINX_MICROBLAZE0_UNALIGNED_EXCEPTIONS (0)
#define CONFIG_XILINX_MICROBLAZE0_ILL_OPCODE_EXCEPTION (0)
#define CONFIG_XILINX_MICROBLAZE0_IOPB_BUS_EXCEPTION (0)
#define CONFIG_XILINX_MICROBLAZE0_DOPB_BUS_EXCEPTION (0)
#define CONFIG_XILINX_MICROBLAZE0_DIV_ZERO_EXCEPTION (0)
#define CONFIG_XILINX_MICROBLAZE0_DEBUG_ENABLED (1)
#define CONFIG_XILINX_MICROBLAZE0_NUMBER_OF_PBRK (2)
#define CONFIG_XILINX_MICROBLAZE0_NUMBER_OF_RD_ADDR_BRK (1)
#define CONFIG_XILINX_MICROBLAZE0_NUMBER_OF_WR_ADDR_BRK (1)
#define CONFIG_XILINX_MICROBLAZE0_INTERRUPT_IS_EDGE (0)
#define CONFIG_XILINX_MICROBLAZE0_EDGE_IS_POSITIVE (1)
#define CONFIG_XILINX_MICROBLAZE0_FSL_LINKS (1)
#define CONFIG_XILINX_MICROBLAZE0_FSL_DATA_SIZE (32)
#define CONFIG_XILINX_MICROBLAZE0_ICACHE_BASEADDR 0x00000000
#define CONFIG_XILINX_MICROBLAZE0_ICACHE_HIGHADDR 0x3FFFFFFF
#define CONFIG_XILINX_MICROBLAZE0_USE_ICACHE (0)
#define CONFIG_XILINX_MICROBLAZE0_ALLOW_ICACHE_WR (1)
#define CONFIG_XILINX_MICROBLAZE0_ADDR_TAG_BITS (17)
#define CONFIG_XILINX_MICROBLAZE0_CACHE_BYTE_SIZE (8192)
#define CONFIG_XILINX_MICROBLAZE0_ICACHE_USE_FSL (0)
#define CONFIG_XILINX_MICROBLAZE0_DCACHE_BASEADDR 0x00000000
#define CONFIG_XILINX_MICROBLAZE0_DCACHE_HIGHADDR 0x3FFFFFFF
#define CONFIG_XILINX_MICROBLAZE0_USE_DCACHE (0)
#define CONFIG_XILINX_MICROBLAZE0_ALLOW_DCACHE_WR (1)
#define CONFIG_XILINX_MICROBLAZE0_DCACHE_ADDR_TAG (17)
#define CONFIG_XILINX_MICROBLAZE0_DCACHE_BYTE_SIZE (8192)
#define CONFIG_XILINX_MICROBLAZE0_DCACHE_USE_FSL (0)
#define CONFIG_XILINX_MICROBLAZE0_INSTANCE "microblaze_0"
#define CONFIG_XILINX_MICROBLAZE0_HW_VER "3.00.a"
#define CONFIG_XILINX_LMB_BRAM_IF_CNTLR_0_INSTANCE "lmb_bram_if_cntlr_0"
#define CONFIG_XILINX_LMB_BRAM_IF_CNTLR_0_BASEADDR 0x00000000
#define CONFIG_XILINX_LMB_BRAM_IF_CNTLR_0_HIGHADDR 0x00007FFF
#define CONFIG_XILINX_LMB_BRAM_IF_CNTLR_0_MASK 0x21000000
#define CONFIG_XILINX_LMB_BRAM_IF_CNTLR_0_LMB_AWIDTH (32)
#define CONFIG_XILINX_LMB_BRAM_IF_CNTLR_0_LMB_DWIDTH (32)
#define CONFIG_XILINX_LMB_BRAM_IF_CNTLR_0_INSTANCE "lmb_bram_if_cntlr_0"
#define CONFIG_XILINX_LMB_BRAM_IF_CNTLR_0_HW_VER "1.00.b"
#define CONFIG_XILINX_LMB_BRAM_IF_CNTLR_1_INSTANCE "lmb_bram_if_cntlr_1"
#define CONFIG_XILINX_LMB_BRAM_IF_CNTLR_1_BASEADDR 0x00000000
#define CONFIG_XILINX_LMB_BRAM_IF_CNTLR_1_HIGHADDR 0x00007FFF
#define CONFIG_XILINX_LMB_BRAM_IF_CNTLR_1_MASK 0x21000000
#define CONFIG_XILINX_LMB_BRAM_IF_CNTLR_1_LMB_AWIDTH (32)
#define CONFIG_XILINX_LMB_BRAM_IF_CNTLR_1_LMB_DWIDTH (32)
#define CONFIG_XILINX_LMB_BRAM_IF_CNTLR_1_INSTANCE "lmb_bram_if_cntlr_1"
#define CONFIG_XILINX_LMB_BRAM_IF_CNTLR_1_HW_VER "1.00.b"
#define CONFIG_XILINX_MDM_0_INSTANCE "opb_mdm_0"
#define CONFIG_XILINX_MDM_0_BASEADDR 0xFFFE8000
#define CONFIG_XILINX_MDM_0_HIGHADDR 0xFFFE80FF
#define CONFIG_XILINX_MDM_0_OPB_DWIDTH (32)
#define CONFIG_XILINX_MDM_0_OPB_AWIDTH (32)
#define CONFIG_XILINX_MDM_0_FAMILY "virtex2p"
#define CONFIG_XILINX_MDM_0_MB_DBG_PORTS (1)
#define CONFIG_XILINX_MDM_0_USE_UART (1)
#define CONFIG_XILINX_MDM_0_UART_WIDTH (8)
#define CONFIG_XILINX_MDM_0_WRITE_FSL_PORTS (1)
#define CONFIG_XILINX_MDM_0_INSTANCE "opb_mdm_0"
#define CONFIG_XILINX_MDM_0_HW_VER "2.01.a"
#define CONFIG_XILINX_MDM_0_IRQ (2)
#define CONFIG_XILINX_UARTLITE_0_INSTANCE "console_uart"
#define CONFIG_XILINX_UARTLITE_0_BASEADDR 0xA0000000
#define CONFIG_XILINX_UARTLITE_0_HIGHADDR 0xA0001FFF
#define CONFIG_XILINX_UARTLITE_0_OPB_DWIDTH (32)
#define CONFIG_XILINX_UARTLITE_0_OPB_AWIDTH (32)
#define CONFIG_XILINX_UARTLITE_0_DATA_BITS (8)
#define CONFIG_XILINX_UARTLITE_0_CLK_FREQ (50000000)
#define CONFIG_XILINX_UARTLITE_0_BAUDRATE (115200)
#define CONFIG_XILINX_UARTLITE_0_USE_PARITY (0)
#define CONFIG_XILINX_UARTLITE_0_ODD_PARITY (0)
#define CONFIG_XILINX_UARTLITE_0_INSTANCE "console_uart"
#define CONFIG_XILINX_UARTLITE_0_HW_VER "1.00.b"
#define CONFIG_XILINX_UARTLITE_0_IRQ (1)
#define CONFIG_XILINX_GPIO_0_INSTANCE "LEDs_8Bit"
#define CONFIG_XILINX_GPIO_0_BASEADDR 0x81020000
#define CONFIG_XILINX_GPIO_0_HIGHADDR 0x8102FFFF
#define CONFIG_XILINX_GPIO_0_USER_ID_CODE (3)
#define CONFIG_XILINX_GPIO_0_OPB_AWIDTH (32)
#define CONFIG_XILINX_GPIO_0_OPB_DWIDTH (32)
#define CONFIG_XILINX_GPIO_0_FAMILY "virtex2p"
#define CONFIG_XILINX_GPIO_0_GPIO_WIDTH (8)
#define CONFIG_XILINX_GPIO_0_ALL_INPUTS (0)
#define CONFIG_XILINX_GPIO_0_INTERRUPT_PRESENT (0)
#define CONFIG_XILINX_GPIO_0_IS_BIDIR (0)
#define CONFIG_XILINX_GPIO_0_DOUT_DEFAULT 0x00000000
#define CONFIG_XILINX_GPIO_0_TRI_DEFAULT 0xFFFFFFFF
#define CONFIG_XILINX_GPIO_0_IS_DUAL (0)
#define CONFIG_XILINX_GPIO_0_ALL_INPUTS_2 (0)
#define CONFIG_XILINX_GPIO_0_IS_BIDIR_2 (1)
#define CONFIG_XILINX_GPIO_0_DOUT_DEFAULT_2 0x00000000
#define CONFIG_XILINX_GPIO_0_TRI_DEFAULT_2 0xFFFFFFFF
#define CONFIG_XILINX_GPIO_0_INSTANCE "LEDs_8Bit"
#define CONFIG_XILINX_GPIO_0_HW_VER "3.01.a"
#define CONFIG_XILINX_SDRAM_0_INSTANCE "SDRAM_8Mx32"
#define CONFIG_XILINX_SDRAM_0_INCLUDE_BURST_SUPPORT (1)
#define CONFIG_XILINX_SDRAM_0_INCLUDE_HIGHSPEED_PIPE (1)
#define CONFIG_XILINX_SDRAM_0_USE_POSEDGE_OUTREGS (0)
#define CONFIG_XILINX_SDRAM_0_FAMILY "virtex2p"
#define CONFIG_XILINX_SDRAM_0_SDRAM_TMRD (2)
#define CONFIG_XILINX_SDRAM_0_SDRAM_TWR (15000)
#define CONFIG_XILINX_SDRAM_0_SDRAM_TCCD (1)
#define CONFIG_XILINX_SDRAM_0_SDRAM_TRAS (50000)
#define CONFIG_XILINX_SDRAM_0_SDRAM_TRC (100000)
#define CONFIG_XILINX_SDRAM_0_SDRAM_TRFC (100000)
#define CONFIG_XILINX_SDRAM_0_SDRAM_TRCD (20000)
#define CONFIG_XILINX_SDRAM_0_SDRAM_TRRD (20000)
#define CONFIG_XILINX_SDRAM_0_SDRAM_TRP (20000)
#define CONFIG_XILINX_SDRAM_0_SDRAM_TREF (64)
#define CONFIG_XILINX_SDRAM_0_SDRAM_REFRESH_NUMROWS (8192)
#define CONFIG_XILINX_SDRAM_0_SDRAM_CAS_LAT (2)
#define CONFIG_XILINX_SDRAM_0_SDRAM_DWIDTH (32)
#define CONFIG_XILINX_SDRAM_0_SDRAM_AWIDTH (11)
#define CONFIG_XILINX_SDRAM_0_SDRAM_COL_AWIDTH (8)
#define CONFIG_XILINX_SDRAM_0_SDRAM_BANK_AWIDTH (2)
#define CONFIG_XILINX_SDRAM_0_SDRAM_TREFI (7812500)
#define CONFIG_XILINX_SDRAM_0_BASEADDR 0x81800000
#define CONFIG_XILINX_SDRAM_0_HIGHADDR 0x81FFFFFF
#define CONFIG_XILINX_SDRAM_0_OPB_DWIDTH (32)
#define CONFIG_XILINX_SDRAM_0_OPB_AWIDTH (32)
#define CONFIG_XILINX_SDRAM_0_OPB_CLK_PERIOD_PS (20000)
#define CONFIG_XILINX_SDRAM_0_SIM_INIT_TIME_PS (100000000)
#define CONFIG_XILINX_SDRAM_0_INSTANCE "SDRAM_8Mx32"
#define CONFIG_XILINX_SDRAM_0_HW_VER "1.00.e"
#define CONFIG_XILINX_INTC_0_INSTANCE "opb_intc_0"
#define CONFIG_XILINX_INTC_0_FAMILY "virtex2p"
#define CONFIG_XILINX_INTC_0_Y (0)
#define CONFIG_XILINX_INTC_0_X (0)
#define CONFIG_XILINX_INTC_0_U_SET "intc"
#define CONFIG_XILINX_INTC_0_OPB_AWIDTH (32)
#define CONFIG_XILINX_INTC_0_OPB_DWIDTH (32)
#define CONFIG_XILINX_INTC_0_BASEADDR 0xD1000FC0
#define CONFIG_XILINX_INTC_0_HIGHADDR 0xD1000FDF
#define CONFIG_XILINX_INTC_0_NUM_INTR_INPUTS (3)
#define CONFIG_XILINX_INTC_0_KIND_OF_INTR 0x00000006
#define CONFIG_XILINX_INTC_0_KIND_OF_EDGE 0x00000006
#define CONFIG_XILINX_INTC_0_KIND_OF_LVL 0x00000001
#define CONFIG_XILINX_INTC_0_HAS_IPR (1)
#define CONFIG_XILINX_INTC_0_HAS_SIE (1)
#define CONFIG_XILINX_INTC_0_HAS_CIE (1)
#define CONFIG_XILINX_INTC_0_HAS_IVR (1)
#define CONFIG_XILINX_INTC_0_IRQ_IS_LEVEL (1)
#define CONFIG_XILINX_INTC_0_IRQ_ACTIVE (1)
#define CONFIG_XILINX_INTC_0_INSTANCE "opb_intc_0"
#define CONFIG_XILINX_INTC_0_HW_VER "1.00.c"
#define CONFIG_XILINX_TIMER_0_INSTANCE "opb_timer_0"
#define CONFIG_XILINX_TIMER_0_FAMILY "virtex2p"
#define CONFIG_XILINX_TIMER_0_COUNT_WIDTH (32)
#define CONFIG_XILINX_TIMER_0_ONE_TIMER_ONLY (0)
#define CONFIG_XILINX_TIMER_0_TRIG0_ASSERT (1)
#define CONFIG_XILINX_TIMER_0_TRIG1_ASSERT (1)
#define CONFIG_XILINX_TIMER_0_GEN0_ASSERT (1)
#define CONFIG_XILINX_TIMER_0_GEN1_ASSERT (1)
#define CONFIG_XILINX_TIMER_0_OPB_AWIDTH (32)
#define CONFIG_XILINX_TIMER_0_OPB_DWIDTH (32)
#define CONFIG_XILINX_TIMER_0_BASEADDR 0xA2000000
#define CONFIG_XILINX_TIMER_0_HIGHADDR 0xA20000FF
#define CONFIG_XILINX_TIMER_0_INSTANCE "opb_timer_0"
#define CONFIG_XILINX_TIMER_0_HW_VER "1.00.b"
#define CONFIG_XILINX_TIMER_0_IRQ (0)
#define CONFIG_XILINX_LMB_BRAM_IF_CNTLR_NUM_INSTANCES (2)
#define CONFIG_XILINX_TIMER_NUM_INSTANCES (1)
#define CONFIG_XILINX_INTC_NUM_INSTANCES (1)
#define CONFIG_XILINX_UARTLITE_NUM_INSTANCES (1)
#define CONFIG_XILINX_MDM_NUM_INSTANCES (1)
#define CONFIG_XILINX_SDRAM_NUM_INSTANCES (1)
#define CONFIG_XILINX_GPIO_NUM_INSTANCES (1)
#define CONFIG_XILINX_GPIO 1
#undef  CONFIG_XILINX_ENET
#undef  CONFIG_XILINX_SYSACE
#define CONFIG_MBVANILLA_CMDLINE 1
#define CONFIG_ZERO_BSS 1
#define CONFIG_MICROBLAZE_DEBUGGING 1

/*
 * General setup
 */
#undef  CONFIG_NET
#undef  CONFIG_DISK
#undef  CONFIG_HOTPLUG
#undef  CONFIG_PCMCIA
#undef  CONFIG_SYSVIPC
#undef  CONFIG_BSD_PROCESS_ACCT
#undef  CONFIG_SYSCTL
#define CONFIG_KCORE_ELF 1
#undef  CONFIG_KCORE_AOUT
#define CONFIG_BINFMT_FLAT 1
#define CONFIG_BINFMT_ZFLAT 1
#undef  CONFIG_CONTIGUOUS_PAGE_ALLOC
#undef  CONFIG_MEM_MAP
#undef  CONFIG_NO_MMU_LARGE_ALLOCS

/*
 * Memory Technology Devices (MTD)
 */
#define CONFIG_MTD 1
#undef  CONFIG_MTD_DEBUG
#define CONFIG_MTD_PARTITIONS 1
#undef  CONFIG_MTD_CONCAT
#undef  CONFIG_MTD_REDBOOT_PARTS
#undef  CONFIG_MTD_CMDLINE_PARTS
#define CONFIG_MTD_CHAR 1
#define CONFIG_MTD_BLOCK 1
#undef  CONFIG_FTL
#undef  CONFIG_NFTL
#undef  CONFIG_INFTL

/*
 * RAM/ROM/Flash chip drivers
 */
#define CONFIG_MTD_CFI 1
#define CONFIG_MTD_JEDECPROBE 1
#define CONFIG_MTD_GEN_PROBE 1
#undef  CONFIG_MTD_CFI_ADV_OPTIONS
#undef  CONFIG_MTD_CFI_INTELEXT
#define CONFIG_MTD_CFI_AMDSTD 1
#undef  CONFIG_MTD_CFI_STAA
#define CONFIG_MTD_RAM 1
#undef  CONFIG_MTD_ROM
#undef  CONFIG_MTD_ABSENT
#undef  CONFIG_MTD_OBSOLETE_CHIPS
#undef  CONFIG_MTD_AMDSTD
#undef  CONFIG_MTD_SHARP
#undef  CONFIG_MTD_JEDEC
#undef  CONFIG_MTD_PSD4256G

/*
 * Mapping drivers for chip access
 */
#undef  CONFIG_MTD_PHYSMAP
#undef  CONFIG_MTD_DRAGONIX
#undef  CONFIG_MTD_NETtel
#undef  CONFIG_MTD_SNAPGEODE
#undef  CONFIG_MTD_NETteluC
#define CONFIG_MTD_MBVANILLA 1
#undef  CONFIG_FLASHAUTO
#undef  CONFIG_FLASH128KB
#undef  CONFIG_FLASH1MB
#undef  CONFIG_FLASH2MB
#undef  CONFIG_FLASH4MB
#undef  CONFIG_FLASH6MB
#define CONFIG_FLASH8MB 1
#undef  CONFIG_MTD_ML401
#undef  CONFIG_MTD_SUZAKU
#undef  CONFIG_MTD_KeyTechnology
#undef  CONFIG_MTD_SED_SIOSIII
#undef  CONFIG_MTD_UCLINUX
#undef  CONFIG_MTD_PCI
#undef  CONFIG_MTD_PCMCIA

/*
 * Self-contained MTD device drivers
 */
#undef  CONFIG_MTD_PMC551
#undef  CONFIG_MTD_SLRAM
#undef  CONFIG_MTD_MTDRAM
#undef  CONFIG_MTD_MTDCNXT
#undef  CONFIG_MTD_BLKMTD
#undef  CONFIG_MTD_DOC1000
#undef  CONFIG_MTD_DOC2000
#undef  CONFIG_MTD_DOC2001
#undef  CONFIG_MTD_DOC2001PLUS
#undef  CONFIG_MTD_DOCPROBE

/*
 * NAND Flash Device Drivers
 */
#undef  CONFIG_MTD_NAND

/*
 * Parallel port support
 */
#undef  CONFIG_PARPORT

/*
 * Block devices
 */
#undef  CONFIG_BLK_DEV_FD
#undef  CONFIG_BLK_DEV_XD
#undef  CONFIG_PARIDE
#undef  CONFIG_BLK_CPQ_DA
#undef  CONFIG_BLK_CPQ_CISS_DA
#undef  CONFIG_CISS_SCSI_TAPE
#undef  CONFIG_CISS_MONITOR_THREAD
#undef  CONFIG_BLK_DEV_DAC960
#undef  CONFIG_BLK_DEV_UMEM
#undef  CONFIG_BLK_DEV_SX8
#undef  CONFIG_BLK_DEV_LOOP
#undef  CONFIG_BLK_DEV_NBD
#define CONFIG_BLK_DEV_RAM 1
#define CONFIG_BLK_DEV_RAM_SIZE (4096)
#undef  CONFIG_BLK_DEV_INITRD
#undef  CONFIG_BLK_DEV_RAMDISK_DATA
#undef  CONFIG_BLK_DEV_BLKMEM
#undef  CONFIG_BLK_STATS

/*
 * Character devices
 */
#undef  CONFIG_LEDMAN
#undef  CONFIG_SNAPDOG
#undef  CONFIG_DS1302
#undef  CONFIG_M41T11M6
#undef  CONFIG_VT
#undef  CONFIG_SERIAL
#undef  CONFIG_SERIAL_EXTENDED
#undef  CONFIG_SERIAL_NONSTANDARD

/*
 * Serial drivers
 */
#undef  CONFIG_SERIAL_8250
#undef  CONFIG_SERIAL_8250_CONSOLE
#undef  CONFIG_SERIAL_8250_EXTENDED
#undef  CONFIG_SERIAL_8250_MANY_PORTS
#undef  CONFIG_SERIAL_8250_SHARE_IRQ
#undef  CONFIG_SERIAL_8250_DETECT_IRQ
#undef  CONFIG_SERIAL_8250_MULTIPORT
#undef  CONFIG_SERIAL_8250_HUB6
#undef  CONFIG_UNIX98_PTYS

/*
 * I2C support
 */
#undef  CONFIG_I2C

/*
 * Mice
 */
#undef  CONFIG_BUSMOUSE
#undef  CONFIG_MOUSE
#undef  CONFIG_EDB7312_TS

/*
 * Joysticks
 */
#undef  CONFIG_INPUT_GAMEPORT
#undef  CONFIG_INPUT_NS558
#undef  CONFIG_INPUT_LIGHTNING
#undef  CONFIG_INPUT_PCIGAME
#undef  CONFIG_INPUT_CS461X
#undef  CONFIG_INPUT_EMU10K1
#undef  CONFIG_INPUT_SERIO
#undef  CONFIG_INPUT_SERPORT
#undef  CONFIG_INPUT_ANALOG
#undef  CONFIG_INPUT_A3D
#undef  CONFIG_INPUT_ADI
#undef  CONFIG_INPUT_COBRA
#undef  CONFIG_INPUT_GF2K
#undef  CONFIG_INPUT_GRIP
#undef  CONFIG_INPUT_INTERACT
#undef  CONFIG_INPUT_TMDC
#undef  CONFIG_INPUT_SIDEWINDER
#undef  CONFIG_INPUT_IFORCE_USB
#undef  CONFIG_INPUT_IFORCE_232
#undef  CONFIG_INPUT_WARRIOR
#undef  CONFIG_INPUT_MAGELLAN
#undef  CONFIG_INPUT_SPACEORB
#undef  CONFIG_INPUT_SPACEBALL
#undef  CONFIG_INPUT_STINGER
#undef  CONFIG_INPUT_DB9
#undef  CONFIG_INPUT_GAMECON
#undef  CONFIG_INPUT_TURBOGRAFX
#undef  CONFIG_QIC02_TAPE
#undef  CONFIG_IPMI_HANDLER
#undef  CONFIG_IPMI_PANIC_EVENT
#undef  CONFIG_IPMI_DEVICE_INTERFACE
#undef  CONFIG_IPMI_KCS
#undef  CONFIG_IPMI_WATCHDOG

/*
 * Controller Area Network Cards/Chips
 */
#undef  CONFIG_CAN4LINUX

/*
 * Watchdog Cards
 */
#undef  CONFIG_WATCHDOG
#undef  CONFIG_SCx200
#undef  CONFIG_SCx200_GPIO
#undef  CONFIG_AMD_PM768
#undef  CONFIG_NVRAM
#undef  CONFIG_RTC
#undef  CONFIG_DTLK
#undef  CONFIG_R3964
#undef  CONFIG_APPLICOM

/*
 * Ftape, the floppy tape device driver
 */
#undef  CONFIG_FTAPE
#undef  CONFIG_AGP

/*
 * Direct Rendering Manager (XFree86 DRI support)
 */
#undef  CONFIG_DRM

/*
 * Misc devices
 */
#undef  CONFIG_MICROBLAZE_FSLFIFO

/*
 * File systems
 */
#undef  CONFIG_QUOTA
#undef  CONFIG_QFMT_V2
#undef  CONFIG_AUTOFS_FS
#undef  CONFIG_AUTOFS4_FS
#undef  CONFIG_REISERFS_FS
#undef  CONFIG_REISERFS_CHECK
#undef  CONFIG_REISERFS_PROC_INFO
#undef  CONFIG_ADFS_FS
#undef  CONFIG_ADFS_FS_RW
#undef  CONFIG_AFFS_FS
#undef  CONFIG_HFS_FS
#undef  CONFIG_HFSPLUS_FS
#undef  CONFIG_BEFS_FS
#undef  CONFIG_BEFS_DEBUG
#undef  CONFIG_BFS_FS
#undef  CONFIG_EXT3_FS
#undef  CONFIG_JBD
#undef  CONFIG_JBD_DEBUG
#undef  CONFIG_FAT_FS
#undef  CONFIG_MSDOS_FS
#undef  CONFIG_UMSDOS_FS
#undef  CONFIG_VFAT_FS
#undef  CONFIG_EFS_FS
#undef  CONFIG_JFFS_FS
#undef  CONFIG_JFFS2_FS
#undef  CONFIG_CRAMFS
#undef  CONFIG_TMPFS
#define CONFIG_RAMFS 1
#undef  CONFIG_ISO9660_FS
#undef  CONFIG_JOLIET
#undef  CONFIG_ZISOFS
#undef  CONFIG_JFS_FS
#undef  CONFIG_JFS_DEBUG
#undef  CONFIG_JFS_STATISTICS
#undef  CONFIG_MINIX_FS
#undef  CONFIG_VXFS_FS
#undef  CONFIG_NTFS_FS
#undef  CONFIG_NTFS_RW
#undef  CONFIG_HPFS_FS
#define CONFIG_PROC_FS 1
#undef  CONFIG_DEVFS_FS
#undef  CONFIG_DEVFS_MOUNT
#undef  CONFIG_DEVFS_DEBUG
#undef  CONFIG_DEVPTS_FS
#undef  CONFIG_QNX4FS_FS
#undef  CONFIG_QNX4FS_RW
#define CONFIG_ROMFS_FS 1
#define CONFIG_EXT2_FS 1
#undef  CONFIG_SYSV_FS
#undef  CONFIG_UDF_FS
#undef  CONFIG_UDF_RW
#undef  CONFIG_UFS_FS
#undef  CONFIG_UFS_FS_WRITE
#undef  CONFIG_XFS_FS
#undef  CONFIG_XFS_QUOTA
#undef  CONFIG_XFS_RT
#undef  CONFIG_XFS_TRACE
#undef  CONFIG_XFS_DEBUG
#undef  CONFIG_NCPFS_NLS
#undef  CONFIG_SMB_FS
#undef  CONFIG_ZISOFS_FS
#undef  CONFIG_COREDUMP_PRINTK

/*
 * Partition Types
 */
#undef  CONFIG_PARTITION_ADVANCED
#undef  CONFIG_SMB_NLS
#undef  CONFIG_NLS

/*
 * Sound
 */
#undef  CONFIG_SOUND

/*
 * USB support
 */
#undef  CONFIG_USB

/*
 * Support for USB gadgets
 */
#undef  CONFIG_USB_GADGET

/*
 * Kernel hacking
 */
#define CONFIG_FULLDEBUG 1
#undef  CONFIG_MAGIC_SYSRQ
#undef  CONFIG_PROFILE
#undef  CONFIG_NO_KERNEL_MSG

/*
 * Cryptographic options
 */
#undef  CONFIG_CRYPTO

/*
 * Library routines
 */
#undef  CONFIG_CRC32
#define CONFIG_ZLIB_INFLATE 1
#define CONFIG_ZLIB_DEFLATE 1
/*
 *  linux/init/main.c
 *
 *  Copyright (C) 1991, 1992  Linus Torvalds
 *
 *  GK 2/5/95  -  Changed to support mounting root fs via NFS
 *  Added initrd & change_root: Werner Almesberger & Hans Lermen, Feb '96
 *  Moan early if gcc is old, avoiding bogus kernels - Paul Gortmaker, May '96
 *  Simplified starting of init:  Michael A. Griffith <grif@acm.org> 
 */

#define __KERNEL_SYSCALLS__

#include <linux/config.h>
#include <linux/proc_fs.h>
#include <linux/devfs_fs_kernel.h>
#include <linux/unistd.h>
#include <linux/string.h>
#include <linux/ctype.h>
#include <linux/delay.h>
#include <linux/utsname.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/smp_lock.h>
#include <linux/blk.h>
#include <linux/hdreg.h>
#include <linux/iobuf.h>
#include <linux/bootmem.h>
#include <linux/file.h>
#include <linux/tty.h>

#include <asm/io.h>
#include <asm/bugs.h>

#if defined(CONFIG_ARCH_S390)
#include <asm/s390mach.h>
#include <asm/ccwcache.h>
#endif

#ifdef CONFIG_ACPI
#include <linux/acpi.h>
#endif

#ifdef CONFIG_PCI
#include <linux/pci.h>
#endif

#ifdef CONFIG_DIO
#include <linux/dio.h>
#endif

#ifdef CONFIG_ZORRO
#include <linux/zorro.h>
#endif

#ifdef CONFIG_MTRR
#  include <asm/mtrr.h>
#endif

#ifdef CONFIG_NUBUS
#include <linux/nubus.h>
#endif

#ifdef CONFIG_ISAPNP
#include <linux/isapnp.h>
#endif

#ifdef CONFIG_IRDA
extern int irda_proto_init(void);
extern int irda_device_init(void);
#endif

#ifdef CONFIG_X86_LOCAL_APIC
#include <asm/smp.h>
#endif

/*
 * Versions of gcc older than that listed below may actually compile
 * and link okay, but the end product can have subtle run time bugs.
 * To avoid associated bogus bug reports, we flatly refuse to compile
 * with a gcc that is known to be too old from the very beginning.
 */
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 91)
#if !defined(CONFIG_V850E) && !defined(CONFIG_NIOS)
#error Sorry, your GCC is too old. It builds incorrect kernels.
#else
#warning Sorry, your GCC is too old. It builds incorrect kernels.
#endif
#endif

extern char _stext, _etext;
extern char *linux_banner;

static int init(void *);

extern void init_IRQ(void);
extern void init_modules(void);
extern void sock_init(void);
extern void fork_init(unsigned long);
extern void mca_init(void);
extern void sbus_init(void);
extern void ppc_init(void);
extern void sysctl_init(void);
extern void signals_init(void);
extern int init_pcmcia_ds(void);

extern void free_initmem(void);
#ifdef  CONFIG_ACPI_BUS
extern void acpi_early_init(void);
#else
static inline void acpi_early_init(void) { }
#endif

#ifdef CONFIG_TC
extern void tc_init(void);
#endif

extern void ecard_init(void);

#if defined(CONFIG_SYSVIPC)
extern void ipc_init(void);
#endif

/*
 * Boot command-line arguments
 */
#define MAX_INIT_ARGS 8
#define MAX_INIT_ENVS 8

extern void time_init(void);
extern void softirq_init(void);

int rows, cols;

char *execute_command;

static char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };

static int __init profile_setup(char *str)
{
    int par;
    if (get_option(&str,&par)) prof_shift = par;
	return 1;
}

__setup("profile=", profile_setup);

static int __init checksetup(char *line)
{
	struct kernel_param *p;

	p = &__setup_start;
	do {
		int n = strlen(p->str);
		if (!strncmp(line,p->str,n)) {
			if (p->setup_func(line+n))
				return 1;
		}
		p++;
	} while (p < &__setup_end);
	return 0;
}

/* this should be approx 2 Bo*oMips to start (note initial shift), and will
   still work even if initially too large, it will just take slightly longer */
unsigned long loops_per_jiffy = (1<<12);

/* This is the number of bits of precision for the loops_per_jiffy.  Each
   bit takes on average 1.5/HZ seconds.  This (like the original) is a little
   better than 1% */
#define LPS_PREC 8

void __init calibrate_delay(void)
{
	unsigned long ticks, loopbit;
	int lps_precision = LPS_PREC;

#ifdef FIXED_BOGOMIPS
	int bogus;

/* FIXED_BOGOMIPS converted to __delay units.  */
#define FIXED_LOOPS_PER_JIFFY	(unsigned long)(FIXED_BOGOMIPS * (500000 / HZ))

/* The maximum error in FIXED_LOOPS_PER_JIFFY that we will tolerate.  */
#define FIXED_LPJ_TOLERANCE	(unsigned long)(FIXED_LOOPS_PER_JIFFY * 0.10)

	/* Make sure fixed delay - T% is zero ticks.  */
	ticks = jiffies;
	while (ticks == jiffies) /* Synchronize with start of tick */
		/* nothing */;
	ticks = jiffies;
	__delay(FIXED_LOOPS_PER_JIFFY - FIXED_LPJ_TOLERANCE);
	bogus = (jiffies != ticks);

	if (! bogus) {
		/* Make sure fixed delay + T% is one tick.  The delay here
		   is very short because we're actually continuing timing from
		   the tick synchronization above (we don't resynchronize).  */
		__delay(2 * FIXED_LPJ_TOLERANCE);
		bogus = (jiffies != ticks + 1);
	}
	
	if (! bogus) {
		/* Use the precomputed value.  */
		loops_per_jiffy = FIXED_LOOPS_PER_JIFFY;
		printk("Delay loop constant: %lu.%02lu BogoMIPS (precomputed)\n",
		       (unsigned long)FIXED_BOGOMIPS,
		       ((unsigned long)(FIXED_BOGOMIPS * 100)) % 100);
		return;
	} else {
		printk("Precomputed BogoMIPS value (%lu.%02lu) inaccurate!\n",
		       (unsigned long)FIXED_BOGOMIPS,
		       ((unsigned long)(FIXED_BOGOMIPS * 100)) % 100);
		/* ... and fall through to normal bogomips calculation.  */
	}
#endif /* FIXED_BOGOMIPS */

	loops_per_jiffy = (1<<12);

	printk("Calibrating delay loop... ");
	while (loops_per_jiffy <<= 1) {
		/* wait for "start of" clock tick */
		ticks = jiffies;
		while (ticks == jiffies)
			/* nothing */;
		/* Go .. */
		ticks = jiffies;
		__delay(loops_per_jiffy);
		ticks = jiffies - ticks;
		if (ticks)
			break;
	}

/* Do a binary approximation to get loops_per_jiffy set to equal one clock
   (up to lps_precision bits) */
	loops_per_jiffy >>= 1;
	loopbit = loops_per_jiffy;
	while ( lps_precision-- && (loopbit >>= 1) ) {
		loops_per_jiffy |= loopbit;
		ticks = jiffies;
		while (ticks == jiffies);
		ticks = jiffies;
		__delay(loops_per_jiffy);
		if (jiffies != ticks)	/* longer than 1 tick */
			loops_per_jiffy &= ~loopbit;
	}

/* Round the value and print it */	
	printk("%lu.%02lu BogoMIPS\n",
		loops_per_jiffy/(500000/HZ),
		(loops_per_jiffy/(5000/HZ)) % 100);
}

static int __init debug_kernel(char *str)
{
	if (*str)
		return 0;
	console_loglevel = 10;
	return 1;
}

static int __init quiet_kernel(char *str)
{
	if (*str)
		return 0;
	console_loglevel = 4;
	return 1;
}

__setup("debug", debug_kernel);
__setup("quiet", quiet_kernel);

/*
 * This is a simple kernel command line parsing function: it parses
 * the command line, and fills in the arguments/environment to init
 * as appropriate. Any cmd-line option is taken to be an environment
 * variable if it contains the character '='.
 *
 * This routine also checks for options meant for the kernel.
 * These options are not given to init - they are for internal kernel use only.
 */
static void __init parse_options(char *line)
{
	char *next,*quote;
	int args, envs;

	if (!*line)
		return;
	args = 0;
	envs = 1;	/* TERM is set to 'linux' by default */
	next = line;
	while ((line = next) != NULL) {
                quote = strchr(line,'"');
                next = strchr(line, ' ');
                while (next != NULL && quote != NULL && quote < next) {
                        /* we found a left quote before the next blank
                         * now we have to find the matching right quote
                         */
                        next = strchr(quote+1, '"');
                        if (next != NULL) {
                                quote = strchr(next+1, '"');
                                next = strchr(next+1, ' ');
                        }
                }
                if (next != NULL)
                        *next++ = 0;
		if (!strncmp(line,"init=",5)) {
			line += 5;
			execute_command = line;
			/* In case LILO is going to boot us with default command line,
			 * it prepends "auto" before the whole cmdline which makes
			 * the shell think it should execute a script with such name.
			 * So we ignore all arguments entered _before_ init=... [MJ]
			 */
			args = 0;
			continue;
		}
		if (checksetup(line))
			continue;
		
		/*
		 * Then check if it's an environment variable or
		 * an option.
		 */
		if (strchr(line,'=')) {
			if (envs >= MAX_INIT_ENVS)
				break;
			envp_init[++envs] = line;
		} else {
			if (args >= MAX_INIT_ARGS)
				break;
			if (*line)
				argv_init[++args] = line;
		}
	}
	argv_init[args+1] = NULL;
	envp_init[envs+1] = NULL;
}


extern void setup_arch(char **);
extern void cpu_idle(void);

unsigned long wait_init_idle;

#ifndef CONFIG_SMP

#ifdef CONFIG_X86_LOCAL_APIC
static void __init smp_init(void)
{
	APIC_init_uniprocessor();
}
#else
#define smp_init()	do { } while (0)
#endif

#else


/* Called by boot processor to activate the rest. */
static void __init smp_init(void)
{
	/* Get other processors into their bootup holding patterns. */
	smp_boot_cpus();
	wait_init_idle = cpu_online_map;
	clear_bit(current->processor, &wait_init_idle); /* Don't wait on me! */

	smp_threads_ready=1;
	smp_commence();

	/* Wait for the other cpus to set up their idle processes */
	printk("Waiting on wait_init_idle (map = 0x%lx)\n", wait_init_idle);
	while (wait_init_idle) {
		cpu_relax();
		barrier();
	}
	printk("All processors have done init_idle\n");
}

#endif

/*
 * We need to finalize in a non-__init function or else race conditions
 * between the root thread and the init thread may cause start_kernel to
 * be reaped by free_initmem before the root thread has proceeded to
 * cpu_idle.
 */

static void rest_init(void)
{
	kernel_thread(init, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGNAL);
	unlock_kernel();
	current->need_resched = 1;
 	cpu_idle();
} 

/*
 *	Activate the first processor.
 */

asmlinkage void __init start_kernel(void)
{
	char * command_line;
	extern char saved_command_line[];

/*
 * Interrupts are still disabled. Do necessary setups, then
 * enable them
 */
	lock_kernel();
	printk(linux_banner);
	setup_arch(&command_line);
	printk("Kernel command line: %s\n", saved_command_line);
	parse_options(command_line);
	trap_init();
	init_IRQ();
	sched_init();
	softirq_init();
	time_init();

	/*
	 * HACK ALERT! This is early. We're enabling the console before
	 * we've done PCI setups etc, and console_init() must be aware of
	 * this. But we do want output early, in case something goes wrong.
	 */
	console_init();
#ifdef CONFIG_MODULES
	init_modules();
#endif
	if (prof_shift) {
		unsigned int size;
		/* only text is profiled */
		prof_len = (unsigned long) &_etext - (unsigned long) &_stext;
		prof_len >>= prof_shift;
		
		size = prof_len * sizeof(unsigned int) + PAGE_SIZE-1;
		prof_buffer = (unsigned int *) alloc_bootmem(size);
	}

	kmem_cache_init();
	sti();
	calibrate_delay();
#ifdef CONFIG_BLK_DEV_INITRD
	if (initrd_start && !initrd_below_start_ok &&
			initrd_start < min_low_pfn << PAGE_SHIFT) {
		printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - "
		    "disabling it.\n",initrd_start,min_low_pfn << PAGE_SHIFT);
		initrd_start = 0;
	}
#endif
	mem_init();
	kmem_cache_sizes_init();
	pgtable_cache_init();

	/*
	 * For architectures that have highmem, num_mappedpages represents
	 * the amount of memory the kernel can use.  For other architectures
	 * it's the same as the total pages.  We need both numbers because
	 * some subsystems need to initialize based on how much memory the
	 * kernel can use.
	 */
	if (num_mappedpages == 0)
		num_mappedpages = num_physpages;
  
	fork_init(num_mappedpages);
	proc_caches_init();
	vfs_caches_init(num_physpages);
	buffer_init(num_physpages);
	page_cache_init(num_physpages);
#if defined(CONFIG_ARCH_S390)
	ccwcache_init();
#endif
	signals_init();
#ifdef CONFIG_PROC_FS
	proc_root_init();
#endif
	check_bugs();
	acpi_early_init(); /* before LAPIC and SMP init */
	printk("POSIX conformance testing by UNIFIX\n");

	/* 
	 *	We count on the initial thread going ok 
	 *	Like idlers init is an unlocked kernel thread, which will
	 *	make syscalls (and thus be locked).
	 */
	smp_init();
#if defined(CONFIG_SYSVIPC)
	ipc_init();
#endif
	rest_init();
}

struct task_struct *child_reaper = &init_task;

static void __init do_initcalls(void)
{
	initcall_t *call;

	call = &__initcall_start;
	do {
		(*call)();
		call++;
	} while (call < &__initcall_end);

	/* Make sure there is no pending stuff from the initcall sequence */
	flush_scheduled_tasks();
}

/*
 * Ok, the machine is now initialized. None of the devices
 * have been touched yet, but the CPU subsystem is up and
 * running, and memory and process management works.
 *
 * Now we can finally start doing some real work..
 */
static void __init do_basic_setup(void)
{

	/*
	 * Tell the world that we're going to be the grim
	 * reaper of innocent orphaned children.
	 *
	 * We don't want people to have to make incorrect
	 * assumptions about where in the task array this
	 * can be found.
	 */
	child_reaper = current;

#if defined(CONFIG_MTRR)	/* Do this after SMP initialization */
/*
 * We should probably create some architecture-dependent "fixup after
 * everything is up" style function where this would belong better
 * than in init/main.c..
 */
	mtrr_init();
#endif

#ifdef CONFIG_SYSCTL
	sysctl_init();
#endif

	/*
	 * Ok, at this point all CPU's should be initialized, so
	 * we can start looking into devices..
	 */
#if defined(CONFIG_ARCH_S390)
	s390_init_machine_check();
#endif
#ifdef CONFIG_ACPI_INTERPRETER
	acpi_init();
#endif
#ifdef CONFIG_PCI
	pci_init();
#endif
#ifdef CONFIG_SBUS
	sbus_init();
#endif
#if defined(CONFIG_PPC)
	ppc_init();
#endif
#ifdef CONFIG_MCA
	mca_init();
#endif
#ifdef CONFIG_ARCH_ACORN
	ecard_init();
#endif
#ifdef CONFIG_ZORRO
	zorro_init();
#endif
#ifdef CONFIG_DIO
	dio_init();
#endif
#ifdef CONFIG_NUBUS
	nubus_init();
#endif
#ifdef CONFIG_ISAPNP
	isapnp_init();
#endif
#ifdef CONFIG_TC
	tc_init();
#endif

	/* Networking initialization needs a process context */ 
	sock_init();

	start_context_thread();
	do_initcalls();

#ifdef CONFIG_IRDA
	irda_proto_init();
	irda_device_init(); /* Must be done after protocol initialization */
#endif
#ifdef CONFIG_PCMCIA
	init_pcmcia_ds();		/* Do this last */
#endif
}

static void run_init_process(char *init_filename)
{
	argv_init[0] = init_filename;
	execve(init_filename, argv_init, envp_init);
}

extern void prepare_namespace(void);

static int init(void * unused)
{
	struct files_struct *files;
	lock_kernel();
	do_basic_setup();

	prepare_namespace();

	/*
	 * Ok, we have completed the initial bootup, and
	 * we're essentially up and running. Get rid of the
	 * initmem segments and start the user-mode stuff..
	 */
	printk("j");

	free_initmem();
	printk("j0");
	unlock_kernel();
	printk("j1");

	/*
	 * Right now we are a thread sharing with a ton of kernel
	 * stuff. We don't want to end up in user space in that state
	 */
	 
	files = current->files;
	if(unshare_files())
		panic("unshare");
	put_files_struct(files);
	
	if (open("/dev/console", O_RDWR, 0) < 0)
		printk("Warning: unable to open an initial console.\n");
	
	printk("j2");

	(void) dup(0);
	(void) dup(0);
	printk("j3");

	/*
	 * We try each of these until one succeeds.
	 *
	 * The Bourne shell can be used instead of init if we are 
	 * trying to recover a really broken machine.
	 */

	if (execute_command)
		run_init_process(execute_command);

	printk("j4");

	run_init_process("/sbin/init");
		printk("j5");

	run_init_process("/etc/init");
		printk("j6");

	run_init_process("/bin/init");
		printk("j7");

	run_init_process("/bin/sh");

		printk("j8");

	panic("No init found.  Try passing init= option to kernel.");
}