Remove:
authorPatrick Georgi <patrick.georgi@coresystems.de>
Sat, 3 Oct 2009 16:24:58 +0000 (16:24 +0000)
committerPatrick Georgi <patrick.georgi@coresystems.de>
Sat, 3 Oct 2009 16:24:58 +0000 (16:24 +0000)
- CONFIG_CBFS
- anything that's conditional on CONFIG_CBFS == 0
- files that were only included for CONFIG_CBFS == 0
In particular:
- elfboot
- stream boot code
- mini-filo and filesystems (depends on stream boot code)

After this commit, there is no way to build an image that is not using
CBFS anymore.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4712 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

150 files changed:
src/Kconfig
src/arch/i386/Config.lb
src/arch/i386/init/crt0.S.lb
src/arch/i386/init/ldscript.lb [deleted file]
src/arch/i386/init/ldscript_fallback.lb [deleted file]
src/arch/i386/lib/Config.lb
src/arch/i386/lib/copy_and_run.c [deleted file]
src/arch/ppc/Config.lb
src/boot/Config.lb
src/boot/elfboot.c [deleted file]
src/boot/filo.c [deleted file]
src/boot/hardwaremain.c
src/config/Config.lb
src/config/Options.lb
src/config/failovercalculation.lb
src/config/nofailovercalculation.lb
src/cpu/amd/car/copy_and_run.c
src/cpu/amd/model_lx/cache_as_ram.inc
src/cpu/x86/car/copy_and_run.c
src/devices/pci_rom.c
src/lib/Config.lb
src/mainboard/a-trend/atc-6220/Options.lb
src/mainboard/a-trend/atc-6240/Options.lb
src/mainboard/abit/be6-ii_v2_0/Options.lb
src/mainboard/advantech/pcm-5820/Options.lb
src/mainboard/amd/db800/Options.lb
src/mainboard/amd/dbm690t/Options.lb
src/mainboard/amd/norwich/Options.lb
src/mainboard/amd/pistachio/Options.lb
src/mainboard/amd/rumba/Options.lb
src/mainboard/amd/serengeti_cheetah/Options.lb
src/mainboard/amd/serengeti_cheetah_fam10/Options.lb
src/mainboard/arima/hdama/Options.lb
src/mainboard/artecgroup/dbe61/Options.lb
src/mainboard/asi/mb_5blgp/Options.lb
src/mainboard/asi/mb_5blmp/Options.lb
src/mainboard/asus/a8n_e/Options.lb
src/mainboard/asus/a8v-e_se/Options.lb
src/mainboard/asus/m2v-mx_se/Options.lb
src/mainboard/asus/mew-am/Options.lb
src/mainboard/asus/mew-vm/Options.lb
src/mainboard/asus/p2b-d/Options.lb
src/mainboard/asus/p2b-ds/Options.lb
src/mainboard/asus/p2b-f/Options.lb
src/mainboard/asus/p2b/Options.lb
src/mainboard/asus/p3b-f/Options.lb
src/mainboard/axus/tc320/Options.lb
src/mainboard/azza/pt-6ibd/Options.lb
src/mainboard/bcom/winnet100/Options.lb
src/mainboard/bcom/winnetp680/Options.lb
src/mainboard/biostar/m6tba/Options.lb
src/mainboard/broadcom/blast/Options.lb
src/mainboard/compaq/deskpro_en_sff_p600/Options.lb
src/mainboard/dell/s1850/Options.lb
src/mainboard/digitallogic/adl855pc/Options.lb
src/mainboard/digitallogic/msm586seg/Options.lb
src/mainboard/digitallogic/msm586seg/mainboard.c
src/mainboard/digitallogic/msm800sev/Options.lb
src/mainboard/eaglelion/5bcm/Options.lb
src/mainboard/emulation/qemu-x86/Options.lb
src/mainboard/gigabyte/ga-6bxc/Options.lb
src/mainboard/gigabyte/ga_2761gxdk/Options.lb
src/mainboard/gigabyte/m57sli/Options.lb
src/mainboard/hp/dl145_g3/Options.lb
src/mainboard/ibm/e325/Options.lb
src/mainboard/ibm/e326/Options.lb
src/mainboard/iei/juki-511p/Options.lb
src/mainboard/iei/nova4899r/Options.lb
src/mainboard/iei/pcisa-lx-800-r10/Options.lb
src/mainboard/intel/eagleheights/Options.lb
src/mainboard/intel/jarrell/Options.lb
src/mainboard/intel/mtarvon/Options.lb
src/mainboard/intel/truxton/Options.lb
src/mainboard/intel/xe7501devkit/Options.lb
src/mainboard/iwill/dk8_htx/Options.lb
src/mainboard/iwill/dk8s2/Options.lb
src/mainboard/iwill/dk8x/Options.lb
src/mainboard/jetway/j7f24/Options.lb
src/mainboard/kontron/986lcd-m/Options.lb
src/mainboard/lippert/frontrunner/Options.lb
src/mainboard/lippert/roadrunner-lx/Options.lb
src/mainboard/lippert/spacerunner-lx/Options.lb
src/mainboard/mitac/6513wu/Options.lb
src/mainboard/msi/ms6119/Options.lb
src/mainboard/msi/ms6147/Options.lb
src/mainboard/msi/ms6178/Options.lb
src/mainboard/msi/ms7135/Options.lb
src/mainboard/msi/ms7260/Options.lb
src/mainboard/msi/ms9185/Options.lb
src/mainboard/msi/ms9282/Options.lb
src/mainboard/nec/powermate2000/Options.lb
src/mainboard/newisys/khepri/Options.lb
src/mainboard/nvidia/l1_2pvv/Options.lb
src/mainboard/olpc/btest/Options.lb
src/mainboard/olpc/rev_a/Options.lb
src/mainboard/pcengines/alix1c/Options.lb
src/mainboard/rca/rm4100/Options.lb
src/mainboard/soyo/sy-6ba-plus-iii/Options.lb
src/mainboard/sunw/ultra40/Options.lb
src/mainboard/supermicro/h8dme/Options.lb
src/mainboard/supermicro/h8dmr/Options.lb
src/mainboard/supermicro/h8dmr_fam10/Options.lb
src/mainboard/supermicro/x6dai_g/Options.lb
src/mainboard/supermicro/x6dhe_g/Options.lb
src/mainboard/supermicro/x6dhe_g2/Options.lb
src/mainboard/supermicro/x6dhr_ig/Options.lb
src/mainboard/supermicro/x6dhr_ig2/Options.lb
src/mainboard/technexion/tim8690/Options.lb
src/mainboard/technologic/ts5300/Options.lb
src/mainboard/technologic/ts5300/mainboard.c
src/mainboard/televideo/tc7020/Options.lb
src/mainboard/thomson/ip1000/Options.lb
src/mainboard/tyan/s1846/Options.lb
src/mainboard/tyan/s2735/Options.lb
src/mainboard/tyan/s2850/Options.lb
src/mainboard/tyan/s2875/Options.lb
src/mainboard/tyan/s2880/Options.lb
src/mainboard/tyan/s2881/Options.lb
src/mainboard/tyan/s2882/Options.lb
src/mainboard/tyan/s2885/Options.lb
src/mainboard/tyan/s2891/Options.lb
src/mainboard/tyan/s2892/Options.lb
src/mainboard/tyan/s2895/Options.lb
src/mainboard/tyan/s2912/Options.lb
src/mainboard/tyan/s2912_fam10/Options.lb
src/mainboard/tyan/s4880/Options.lb
src/mainboard/tyan/s4882/Options.lb
src/mainboard/via/epia-cn/Options.lb
src/mainboard/via/epia-m/Options.lb
src/mainboard/via/epia-m700/Options.lb
src/mainboard/via/epia-n/Options.lb
src/mainboard/via/epia/Options.lb
src/mainboard/via/pc2500e/Options.lb
src/mainboard/via/vt8454c/Options.lb
src/stream/Config.lb [deleted file]
src/stream/fs/Config.lb [deleted file]
src/stream/fs/blockdev.c [deleted file]
src/stream/fs/ext2fs.c [deleted file]
src/stream/fs/fat.c [deleted file]
src/stream/fs/iso9660.c [deleted file]
src/stream/fs/vfs.c [deleted file]
src/stream/fs_stream.c [deleted file]
src/stream/ide_stream.c [deleted file]
src/stream/rom_stream.c [deleted file]
src/stream/serial_stream.c [deleted file]
targets/kontron/986lcd-m/Config.lb
targets/lippert/roadrunner-lx/Config.lb
targets/lippert/spacerunner-lx/Config.lb
util/abuild/abuild
util/newconfig/config.g

index 06d710851c56fed81608a16c6aa7bce082cf8fed..67b56890988a79be4a85823810e4d706ed5324b8 100644 (file)
@@ -36,10 +36,6 @@ source src/southbridge/Kconfig
 source src/superio/Kconfig
 source src/cpu/Kconfig
 
-config CBFS
-       bool
-       default y
-
 config PCI_BUS_SEGN_BITS
        int
        default 0
index 380d05ba4db71481e94a34aef78e894586d747bc..e5e587c8f797290df9f031af30392be030286ba1 100644 (file)
@@ -1,45 +1,29 @@
-uses CONFIG_CBFS
 uses CONFIG_SMP
 uses CONFIG_PRECOMPRESSED_PAYLOAD
 uses CONFIG_USE_INIT
 uses CONFIG_HAVE_FAILOVER_BOOT
 uses CONFIG_USE_FAILOVER_IMAGE
 uses CONFIG_USE_FALLBACK_IMAGE
-uses CONFIG_CBFS
 
 init init/crt0.S.lb
 
-if CONFIG_CBFS
-       if CONFIG_USE_FAILOVER_IMAGE
-       else
-               initobject /src/lib/cbfs.o
-               initobject /src/lib/lzma.o
-       end
+if CONFIG_USE_FAILOVER_IMAGE
+else
+       initobject /src/lib/cbfs.o
+       initobject /src/lib/lzma.o
 end
 
 if CONFIG_HAVE_FAILOVER_BOOT
        if CONFIG_USE_FAILOVER_IMAGE
                ldscript init/ldscript_failover.lb
        else
-               if CONFIG_CBFS
                        ldscript init/ldscript_cbfs.lb
-               else
-                       ldscript init/ldscript.lb
-               end
        end
 else
-       if CONFIG_CBFS
-               if CONFIG_USE_FALLBACK_IMAGE
-                       ldscript init/ldscript_fallback_cbfs.lb
-               else
-                       ldscript init/ldscript_cbfs.lb
-               end
+       if CONFIG_USE_FALLBACK_IMAGE
+               ldscript init/ldscript_fallback_cbfs.lb
        else
-               if CONFIG_USE_FALLBACK_IMAGE
-                       ldscript init/ldscript_fallback.lb
-               else
-                       ldscript init/ldscript.lb
-               end
+               ldscript init/ldscript_cbfs.lb
        end
 end
 
@@ -82,13 +66,6 @@ end
 # catch the case where there is no compression
 makedefine PAYLOAD-1:=payload
 
-if CONFIG_CBFS
-else
-# match the case where a compression type is specified.
-makedefine PAYLOAD-$(CONFIG_COMPRESSED_PAYLOAD_NRV2B):=payload.nrv2b
-makedefine PAYLOAD-$(CONFIG_COMPRESSED_PAYLOAD_LZMA):=payload.lzma
-end
-
 # catch the case where there is precompression. Yes, this bites. 
 if CONFIG_PRECOMPRESSED_PAYLOAD 
        makedefine PAYLOAD-1:=payload
@@ -105,8 +82,8 @@ if CONFIG_USE_FAILOVER_IMAGE
 else
        makerule coreboot.rom 
                depends "coreboot.strip buildrom $(PAYLOAD-1)"
-               action "PAYLOAD=$(PAYLOAD-1); if [ $(CONFIG_CBFS) -eq 1 ]; then PAYLOAD=/dev/null; touch cbfs-support; fi; ./buildrom $< $@ $$PAYLOAD $(CONFIG_ROM_IMAGE_SIZE) $(CONFIG_ROM_SECTION_SIZE)"
-               action "if [ $(CONFIG_COMPRESSED_PAYLOAD_LZMA) -eq 1 -a $(CONFIG_CBFS) -eq 1 ]; then echo l > cbfs-support; fi"
+               action "touch cbfs-support; ./buildrom $< $@ /dev/null $(CONFIG_ROM_IMAGE_SIZE) $(CONFIG_ROM_SECTION_SIZE)"
+               action "if [ $(CONFIG_COMPRESSED_PAYLOAD_LZMA) -eq 1 ]; then echo l > cbfs-support; fi"
        end
 end
 
index 9e8968510d36d4df28f759da3ea3cb57e778e15f..95764ae5963c7755112d4a6429620c4e7b2b0d30 100644 (file)
@@ -74,19 +74,8 @@ __main:
        movl    $0x4000000, %esp
        movl    %esp, %ebp
        pushl %esi
-#if CONFIG_CBFS == 1
        pushl $str_coreboot_ram_name
        call cbfs_and_run_core
-#else
-       movl    $_liseg, %esi
-       movl    $_iseg,  %edi
-       movl    $_eiseg, %ecx
-       subl    %edi, %ecx
-       pushl %ecx
-       pushl %edi
-       pushl %esi
-       call copy_and_run_core
-#endif
 
 .Lhlt: 
        intel_chip_post_macro(0xee)     /* post fe */
@@ -148,12 +137,10 @@ str_pre_main:        .string "Jumping to coreboot.\r\n"
 
 #endif /* ASM_CONSOLE_LOGLEVEL > BIOS_DEBUG */
 
-#if CONFIG_CBFS == 1
-# if CONFIG_USE_FALLBACK_IMAGE == 1
+#if CONFIG_USE_FALLBACK_IMAGE == 1
 str_coreboot_ram_name: .string "fallback/coreboot_ram"
-# else
+#else
 str_coreboot_ram_name: .string "normal/coreboot_ram"
-# endif
 #endif
 
 #endif /* CONFIG_USE_DCACHE_RAM */
diff --git a/src/arch/i386/init/ldscript.lb b/src/arch/i386/init/ldscript.lb
deleted file mode 100644 (file)
index 0ed5c47..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *     Memory map:
- *
- *     CONFIG_RAMBASE          
- *                             : data segment
- *                             : bss segment
- *                             : heap
- *                             : stack
- *     CONFIG_ROMBASE
- *                             : coreboot text 
- *                             : readonly text
- */
-/*
- * Bootstrap code for the STPC Consumer
- * Copyright (c) 1999 by Net Insight AB. All Rights Reserved.
- *
- */
-
-/*
- *     Written by Johan Rydberg, based on work by Daniel Kahlin.
- *      Rewritten by Eric Biederman
- */
-/*
- *     We use ELF as output format. So that we can
- *     debug the code in some form. 
- */
-OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
-OUTPUT_ARCH(i386)
-
-/*
-ENTRY(_start)
-*/
-
-TARGET(binary)
-INPUT(coreboot_ram.rom)
-SECTIONS
-{
-       . = CONFIG_ROMBASE;
-
-       .ram . : {
-               _ram = . ;
-               coreboot_ram.rom(*)
-               _eram = . ;
-       }
-
-       /* This section might be better named .setup */
-       .rom . : {
-               _rom = .;
-               *(.rom.text);
-               *(.rom.data);
-               *(.rodata.*);
-               *(.rom.data.*);
-               . = ALIGN(16);
-               _erom = .;
-       }
-
-       _lrom = LOADADDR(.rom);
-       _elrom = LOADADDR(.rom) + SIZEOF(.rom);
-       _iseg = CONFIG_RAMBASE;
-       _eiseg = _iseg + SIZEOF(.ram);
-       _liseg = _ram;
-       _eliseg = _eram;
-
-       /DISCARD/ : {
-               *(.comment)
-               *(.comment.*)
-               *(.note)
-               *(.note.*)
-       }
-}
diff --git a/src/arch/i386/init/ldscript_fallback.lb b/src/arch/i386/init/ldscript_fallback.lb
deleted file mode 100644 (file)
index 6d41cbd..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- *     Memory map:
- *
- *     CONFIG_RAMBASE          
- *                             : data segment
- *                             : bss segment
- *                             : heap
- *                             : stack
- *     CONFIG_ROMBASE
- *                             : coreboot text 
- *                             : readonly text
- */
-/*
- * Bootstrap code for the STPC Consumer
- * Copyright (c) 1999 by Net Insight AB. All Rights Reserved.
- *
- */
-
-/*
- *     Written by Johan Rydberg, based on work by Daniel Kahlin.
- *      Rewritten by Eric Biederman
- */
-/*
- *     We use ELF as output format. So that we can
- *     debug the code in some form. 
- */
-OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
-OUTPUT_ARCH(i386)
-
-/*
-ENTRY(_start)
-*/
-
-TARGET(binary)
-INPUT(coreboot_ram.rom)
-SECTIONS
-{
-       . = CONFIG_ROMBASE;
-
-       .ram . : {
-               _ram = . ;
-               coreboot_ram.rom(*)
-               _eram = . ;
-       }
-
-       /* cut _start into last 64k*/
-       _x = .;
-       . = (_x < (CONFIG_ROMBASE - 0x10000 +  CONFIG_ROM_IMAGE_SIZE)) ? (CONFIG_ROMBASE - 0x10000 +  CONFIG_ROM_IMAGE_SIZE) : _x;
-
-       /* This section might be better named .setup */
-       .rom . : {
-               _rom = .;
-               *(.rom.text);
-               *(.rom.data);
-               *(.init.rodata.*);
-               *(.rodata.*);
-               *(.rom.data.*);
-               . = ALIGN(16);
-               _erom = .;
-       }
-
-       _lrom = LOADADDR(.rom);
-       _elrom = LOADADDR(.rom) + SIZEOF(.rom);
-       _iseg = CONFIG_RAMBASE;
-       _eiseg = _iseg + SIZEOF(.ram);
-       _liseg = _ram;
-       _eliseg = _eram;
-
-       /DISCARD/ : {
-               *(.comment)
-               *(.note)
-               *(.comment.*)
-               *(.note.*)
-       }
-}
index 0a07e3b9bee54869030d87c1d1cade0dcf4c8ead..1d434e24a4c7909d02686b83c7d862052d798c0f 100644 (file)
@@ -1,7 +1,6 @@
 uses CONFIG_USE_INIT
 uses CONFIG_USE_PRINTK_IN_CAR
 uses CONFIG_USE_FAILOVER_IMAGE
-uses CONFIG_CBFS
 
 object c_start.S
 object cpu.c
@@ -15,9 +14,5 @@ initobject printk_init.o
 
 if CONFIG_USE_FAILOVER_IMAGE
 else
-       if CONFIG_CBFS
-               initobject cbfs_and_run.o
-       else
-               initobject copy_and_run.o
-       end
+       initobject cbfs_and_run.o
 end
diff --git a/src/arch/i386/lib/copy_and_run.c b/src/arch/i386/lib/copy_and_run.c
deleted file mode 100644 (file)
index 9cec90a..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/* by yhlu 6.2005
-       moved from nrv2v.c and some lines from crt0.S
-   2006/05/02 - stepan: move nrv2b to an extra file.
-*/
-
-#include <console/console.h>
-#include <stdint.h>
-#include <string.h>
-
-#if CONFIG_COMPRESS
-#define ENDIAN   0
-#define BITSIZE 32
-#include "../lib/nrv2b.c"
-#endif
-
-void copy_and_run_core(u8 *src, u8 *dst, unsigned long ilen, unsigned ebp)
-{
-        unsigned long olen;
-
-#if CONFIG_USE_INIT
-       printk_spew("src=%08x\r\n",src);
-       printk_spew("dst=%08x\r\n",dst);
-#else
-        print_spew("src="); print_spew_hex32((uint32_t)src); print_spew("\r\n");
-        print_spew("dst="); print_spew_hex32((uint32_t)dst); print_spew("\r\n");
-#endif
-
-#if !CONFIG_COMPRESS
-       print_debug("Copying image to RAM.\r\n");
-       memcpy(src, dst, ilen);
-       olen = ilen;
-#else
-       print_debug("Uncompressing image to RAM.\r\n");
-//     dump_mem(src, src+0x100);
-       olen = unrv2b(src, dst, &ilen);
-#endif
-
-//     dump_mem(dst, dst+0x100);
-#if CONFIG_USE_INIT
-       printk_spew("image length = %08x\r\n", olen);
-#else
-       print_spew("image length = "); print_spew_hex32(olen); print_spew("\r\n");
-#endif
-       print_debug("Jumping to image.\r\n");
-
-       __asm__ volatile (
-               "movl %%eax, %%ebp\n\t"
-               "cli\n\t"
-               "jmp     *%%edi\n\t"
-               :: "a"(ebp), "D"(dst)
-       );
-
-}
index aba64c1f985fccd847671296b3bd55a36ea5db97..0b06eef37e5f9164c7fecd91f31ef467e9d57779 100644 (file)
@@ -1,4 +1,3 @@
-uses CONFIG_CBFS
 ldscript init/ldscript.lb
 
 makerule coreboot.strip 
@@ -11,10 +10,8 @@ makerule coreboot.rom
        action "cp $< $@"
 end
 
-if CONFIG_CBFS
-       initobject /src/lib/cbfs.o
-       initobject /src/lib/lzma.o
-end
+initobject /src/lib/cbfs.o
+initobject /src/lib/lzma.o
 
 dir init
 dir lib
index 700f19d9178ed4ed9c03e8089194019b76360d59..8afe637e51c87a4ce3169bb5db93b1cf4554d76d 100644 (file)
@@ -1,9 +1,2 @@
 object hardwaremain.o
-if CONFIG_CBFS
-       object selfboot.o
-else
-       object elfboot.o
-end
-if CONFIG_FS_PAYLOAD
-       object filo.o
-end
+object selfboot.o
diff --git a/src/boot/elfboot.c b/src/boot/elfboot.c
deleted file mode 100644 (file)
index 958112d..0000000
+++ /dev/null
@@ -1,687 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2003 Eric W. Biederman <ebiederm@xmission.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
- */
-
-#include <console/console.h>
-#include <part/fallback_boot.h>
-#include <boot/elf.h>
-#include <boot/elf_boot.h>
-#include <boot/coreboot_tables.h>
-#include <ip_checksum.h>
-#include <stream/read_bytes.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-
-/* Maximum physical address we can use for the coreboot bounce buffer.
- */
-#ifndef MAX_ADDR
-#define MAX_ADDR -1UL
-#endif
-
-extern unsigned char _ram_seg;
-extern unsigned char _eram_seg;
-
-struct segment {
-       struct segment *next;
-       struct segment *prev;
-       struct segment *phdr_next;
-       struct segment *phdr_prev;
-       unsigned long s_addr;
-       unsigned long s_memsz;
-       unsigned long s_offset;
-       unsigned long s_filesz;
-};
-
-struct verify_callback {
-       struct verify_callback *next;
-       int (*callback)(struct verify_callback *vcb, 
-               Elf_ehdr *ehdr, Elf_phdr *phdr, struct segment *head);
-       unsigned long desc_offset;
-       unsigned long desc_addr;
-};
-
-struct ip_checksum_vcb {
-       struct verify_callback data;
-       unsigned short ip_checksum;
-};
-
-int verify_ip_checksum(
-       struct verify_callback *vcb, 
-       Elf_ehdr *ehdr, Elf_phdr *phdr, struct segment *head)
-{
-       struct ip_checksum_vcb *cb;
-       struct segment *ptr;
-       unsigned long bytes;
-       unsigned long checksum;
-       unsigned char buff[2], *n_desc;
-       cb = (struct ip_checksum_vcb *)vcb;
-       /* zero the checksum so it's value won't
-        * get in the way of verifying the checksum.
-        */
-       n_desc = 0;
-       if (vcb->desc_addr) {
-               n_desc = (unsigned char *)(vcb->desc_addr);
-               memcpy(buff, n_desc, 2);
-               memset(n_desc, 0, 2);
-       }
-       bytes = 0;
-       checksum = compute_ip_checksum(ehdr, sizeof(*ehdr));
-       bytes += sizeof(*ehdr);
-       checksum = add_ip_checksums(bytes, checksum, 
-               compute_ip_checksum(phdr, ehdr->e_phnum*sizeof(*phdr)));
-       bytes += ehdr->e_phnum*sizeof(*phdr);
-       for(ptr = head->phdr_next; ptr != head; ptr = ptr->phdr_next) {
-               checksum = add_ip_checksums(bytes, checksum,
-                       compute_ip_checksum((void *)ptr->s_addr, ptr->s_memsz));
-               bytes += ptr->s_memsz;
-       }
-       if (n_desc != 0) {
-               memcpy(n_desc, buff, 2);
-       }
-       if (checksum != cb->ip_checksum) {
-               printk_err("Image checksum: %04x != computed checksum: %04lx\n",
-                       cb->ip_checksum, checksum);
-       }
-       return checksum == cb->ip_checksum;
-}
-
-/* The problem:  
- * Static executables all want to share the same addresses
- * in memory because only a few addresses are reliably present on
- * a machine, and implementing general relocation is hard.
- *
- * The solution:
- * - Allocate a buffer the size of the coreboot image plus additional
- *   required space.
- * - Anything that would overwrite coreboot copy into the lower part of
- *   the buffer. 
- * - After loading an ELF image copy coreboot to the top of the buffer.
- * - Then jump to the loaded image.
- * 
- * Benefits:
- * - Nearly arbitrary standalone executables can be loaded.
- * - Coreboot is preserved, so it can be returned to.
- * - The implementation is still relatively simple,
- *   and much simpler then the general case implemented in kexec.
- * 
- */
-
-static unsigned long bounce_size;
-
-static unsigned long get_bounce_buffer(struct lb_memory *mem)
-{
-       unsigned long lb_size;
-       unsigned long mem_entries;
-       unsigned long buffer;
-       int i;
-       lb_size = (unsigned long)(&_eram_seg - &_ram_seg);
-       /* Double coreboot size so I have somewhere to place a copy to return to */
-       bounce_size = lb_size;
-       lb_size = bounce_size + lb_size;
-       mem_entries = (mem->size - sizeof(*mem))/sizeof(mem->map[0]);
-       buffer = 0;
-       for(i = 0; i < mem_entries; i++) {
-               unsigned long mstart, mend;
-               unsigned long msize;
-               unsigned long tbuffer;
-               if (mem->map[i].type != LB_MEM_RAM)
-                       continue;
-               if (unpack_lb64(mem->map[i].start) > MAX_ADDR)
-                       continue;
-               if (unpack_lb64(mem->map[i].size) < lb_size)
-                       continue;
-               mstart = unpack_lb64(mem->map[i].start);
-               msize = MAX_ADDR - mstart +1;
-               if (msize > unpack_lb64(mem->map[i].size))
-                       msize = unpack_lb64(mem->map[i].size);
-               mend = mstart + msize;
-               tbuffer = mend - lb_size;
-               if (tbuffer < buffer) 
-                       continue;
-               buffer = tbuffer;
-       }
-       return buffer;
-}
-
-
-static struct verify_callback *process_elf_notes(
-       unsigned char *header, 
-       unsigned long offset, unsigned long length)
-{
-       struct verify_callback *cb_chain;
-       unsigned char *note, *end;
-       unsigned char *program, *version;
-
-       cb_chain = 0;
-       note = header + offset;
-       end = note + length;
-       program = version = 0;
-       while(note < end) {
-               Elf_Nhdr *hdr;
-               unsigned char *n_name, *n_desc, *next;
-               hdr = (Elf_Nhdr *)note;
-               n_name = note + sizeof(*hdr);
-               n_desc = n_name + ((hdr->n_namesz + 3) & ~3);
-               next = n_desc + ((hdr->n_descsz + 3) & ~3);
-               if (next > end) {
-                       break;
-               }
-               if ((hdr->n_namesz == sizeof(ELF_NOTE_BOOT)) && 
-                       (memcmp(n_name, ELF_NOTE_BOOT, sizeof(ELF_NOTE_BOOT)) == 0)) {
-                       switch(hdr->n_type) {
-                       case EIN_PROGRAM_NAME:
-                               if (n_desc[hdr->n_descsz -1] == 0) {
-                                       program = n_desc;
-                               }
-                               break;
-                       case EIN_PROGRAM_VERSION:
-                               if (n_desc[hdr->n_descsz -1] == 0) {
-                                       version = n_desc;
-                               }
-                               break;
-                       case EIN_PROGRAM_CHECKSUM:
-                       {
-                               struct ip_checksum_vcb *cb;
-                               cb = malloc(sizeof(*cb));
-                               cb->ip_checksum = *((uint16_t *)n_desc);
-                               cb->data.callback = verify_ip_checksum;
-                               cb->data.next = cb_chain;
-                               cb->data.desc_offset = n_desc - header;
-                               cb_chain = &cb->data;
-                               break;
-                       }
-                       }
-               }
-               printk_spew("n_type: %08x n_name(%d): %-*.*s n_desc(%d): %-*.*s\n", 
-                       hdr->n_type,
-                       hdr->n_namesz, hdr->n_namesz, hdr->n_namesz, n_name,
-                       hdr->n_descsz,hdr->n_descsz, hdr->n_descsz, n_desc);
-               note = next;
-       }
-       if (program && version) {
-               printk_info("Loading %s version: %s\n",
-                       program, version);
-       }
-       return cb_chain;
-}
-
-static int valid_area(struct lb_memory *mem, unsigned long buffer,
-       unsigned long start, unsigned long len)
-{
-       /* Check through all of the memory segments and ensure
-        * the segment that was passed in is completely contained
-        * in RAM.
-        */
-       int i;
-       unsigned long end = start + len;
-       unsigned long mem_entries = (mem->size - sizeof(*mem))/sizeof(mem->map[0]);
-
-       /* See if I conflict with the bounce buffer */
-       if (end >= buffer) {
-               return 0;
-       }
-
-       /* Walk through the table of valid memory ranges and see if I
-        * have a match.
-        */
-       for(i = 0; i < mem_entries; i++) {
-               uint64_t mstart, mend;
-               uint32_t mtype;
-               mtype = mem->map[i].type;
-               mstart = unpack_lb64(mem->map[i].start);
-               mend = mstart + unpack_lb64(mem->map[i].size);
-               if ((mtype == LB_MEM_RAM) && (start < mend) && (end > mstart)) {
-                       break;
-               }
-               if ((mtype == LB_MEM_TABLE) && (start < mend) && (end > mstart)) {
-                       printk_err("Payload is overwriting Coreboot tables.\n");
-                       break;
-               }
-       }
-       if (i == mem_entries) {
-               printk_err("No matching ram area found for range:\n");
-               printk_err("  [0x%016lx, 0x%016lx)\n", start, end);
-               printk_err("Ram areas\n");
-               for(i = 0; i < mem_entries; i++) {
-                       uint64_t mstart, mend;
-                       uint32_t mtype;
-                       mtype = mem->map[i].type;
-                       mstart = unpack_lb64(mem->map[i].start);
-                       mend = mstart + unpack_lb64(mem->map[i].size);
-                       printk_err("  [0x%016lx, 0x%016lx) %s\n",
-                               (unsigned long)mstart, 
-                               (unsigned long)mend, 
-                               (mtype == LB_MEM_RAM)?"RAM":"Reserved");
-                       
-               }
-               return 0;
-       }
-       return 1;
-}
-
-static void relocate_segment(unsigned long buffer, struct segment *seg)
-{
-       /* Modify all segments that want to load onto coreboot
-        * to load onto the bounce buffer instead.
-        */
-       unsigned long lb_start = (unsigned long)&_ram_seg;
-       unsigned long lb_end = (unsigned long)&_eram_seg;
-       unsigned long start, middle, end;
-
-       printk_spew("lb: [0x%016lx, 0x%016lx)\n", 
-               lb_start, lb_end);
-
-       start = seg->s_addr;
-       middle = start + seg->s_filesz;
-       end = start + seg->s_memsz;
-       /* I don't conflict with coreboot so get out of here */
-       if ((end <= lb_start) || (start >= lb_end))
-               return;
-
-       printk_spew("segment: [0x%016lx, 0x%016lx, 0x%016lx)\n", 
-               start, middle, end);
-
-       /* Slice off a piece at the beginning
-        * that doesn't conflict with coreboot.
-        */
-       if (start < lb_start) {
-               struct segment *new;
-               unsigned long len = lb_start - start;
-               new = malloc(sizeof(*new));
-               *new = *seg;
-               new->s_memsz = len;
-               seg->s_memsz -= len;
-               seg->s_addr += len;
-               seg->s_offset += len;
-               if (seg->s_filesz > len) {
-                       new->s_filesz = len;
-                       seg->s_filesz -= len;
-               } else {
-                       seg->s_filesz = 0;
-               }
-
-               /* Order by stream offset */
-               new->next = seg;
-               new->prev = seg->prev;
-               seg->prev->next = new;
-               seg->prev = new;
-               /* Order by original program header order */
-               new->phdr_next = seg;
-               new->phdr_prev = seg->phdr_prev;
-               seg->phdr_prev->phdr_next = new;
-               seg->phdr_prev = new;
-
-               /* compute the new value of start */
-               start = seg->s_addr;
-               
-               printk_spew("   early: [0x%016lx, 0x%016lx, 0x%016lx)\n", 
-                       new->s_addr, 
-                       new->s_addr + new->s_filesz,
-                       new->s_addr + new->s_memsz);
-       }
-       
-       /* Slice off a piece at the end 
-        * that doesn't conflict with coreboot 
-        */
-       if (end > lb_end) {
-               unsigned long len = lb_end - start;
-               struct segment *new;
-               new = malloc(sizeof(*new));
-               *new = *seg;
-               seg->s_memsz = len;
-               new->s_memsz -= len;
-               new->s_addr += len;
-               new->s_offset += len;
-               if (seg->s_filesz > len) {
-                       seg->s_filesz = len;
-                       new->s_filesz -= len;
-               } else {
-                       new->s_filesz = 0;
-               }
-               /* Order by stream offset */
-               new->next = seg->next;
-               new->prev = seg;
-               seg->next->prev = new;
-               seg->next = new;
-               /* Order by original program header order */
-               new->phdr_next = seg->phdr_next;
-               new->phdr_prev = seg;
-               seg->phdr_next->phdr_prev = new;
-               seg->phdr_next = new;
-
-               printk_spew("   late: [0x%016lx, 0x%016lx, 0x%016lx)\n", 
-                       new->s_addr, 
-                       new->s_addr + new->s_filesz,
-                       new->s_addr + new->s_memsz);
-               
-       }
-       /* Now retarget this segment onto the bounce buffer */
-       seg->s_addr = buffer + (seg->s_addr - lb_start);
-
-       printk_spew(" bounce: [0x%016lx, 0x%016lx, 0x%016lx)\n", 
-               seg->s_addr, 
-               seg->s_addr + seg->s_filesz, 
-               seg->s_addr + seg->s_memsz);
-}
-
-
-static int build_elf_segment_list(
-       struct segment *head, 
-       unsigned long bounce_buffer, struct lb_memory *mem,
-       Elf_phdr *phdr, int headers)
-{
-       struct segment *ptr;
-       int i;
-       memset(head, 0, sizeof(*head));
-       head->phdr_next = head->phdr_prev = head;
-       head->next = head->prev = head;
-       for(i = 0; i < headers; i++) {
-               struct segment *new;
-               /* Ignore data that I don't need to handle */
-               if (phdr[i].p_type != PT_LOAD) {
-                       printk_debug("Dropping non PT_LOAD segment\n");
-                       continue;
-               }
-               if (phdr[i].p_memsz == 0) {
-                       printk_debug("Dropping empty segment\n");
-                       continue;
-               }
-               new = malloc(sizeof(*new));
-               new->s_addr = phdr[i].p_paddr;
-               new->s_memsz = phdr[i].p_memsz;
-               new->s_offset = phdr[i].p_offset;
-               new->s_filesz = phdr[i].p_filesz;
-               printk_debug("New segment addr 0x%lx size 0x%lx offset 0x%lx filesize 0x%lx\n",
-                       new->s_addr, new->s_memsz, new->s_offset, new->s_filesz);
-               /* Clean up the values */
-               if (new->s_filesz > new->s_memsz)  {
-                       new->s_filesz = new->s_memsz;
-               }
-               printk_debug("(cleaned up) New segment addr 0x%lx size 0x%lx offset 0x%lx filesize 0x%lx\n",
-                       new->s_addr, new->s_memsz, new->s_offset, new->s_filesz);
-               for(ptr = head->next; ptr != head; ptr = ptr->next) {
-                       if (new->s_offset < ptr->s_offset)
-                               break;
-               }
-               /* Order by stream offset */
-               new->next = ptr;
-               new->prev = ptr->prev;
-               ptr->prev->next = new;
-               ptr->prev = new;
-               /* Order by original program header order */
-               new->phdr_next = head;
-               new->phdr_prev = head->phdr_prev;
-               head->phdr_prev->phdr_next  = new;
-               head->phdr_prev = new;
-
-               /* Verify the memory addresses in the segment are valid */
-               if (!valid_area(mem, bounce_buffer, new->s_addr, new->s_memsz)) 
-                       goto out;
-
-               /* Modify the segment to load onto the bounce_buffer if necessary.
-                */
-               relocate_segment(bounce_buffer, new);
-       }
-       return 1;
- out:
-       return 0;
-}
-
-static int load_elf_segments(
-       struct segment *head, unsigned char *header, unsigned long header_size)
-{
-       unsigned long offset;
-       struct segment *ptr;
-       
-       offset = 0;
-       for(ptr = head->next; ptr != head; ptr = ptr->next) {
-               unsigned long start_offset;
-               unsigned long skip_bytes, read_bytes;
-               unsigned char *dest, *middle, *end;
-               byte_offset_t result;
-               printk_debug("Loading Segment: addr: 0x%016lx memsz: 0x%016lx filesz: 0x%016lx\n",
-                       ptr->s_addr, ptr->s_memsz, ptr->s_filesz);
-               
-               /* Compute the boundaries of the segment */
-               dest = (unsigned char *)(ptr->s_addr);
-               end = dest + ptr->s_memsz;
-               middle = dest + ptr->s_filesz;
-               start_offset = ptr->s_offset;
-               /* Ignore s_offset if I have a pure bss segment */
-               if (ptr->s_filesz == 0) {
-                       start_offset = offset;
-               }
-               
-               printk_spew("[ 0x%016lx, %016lx, 0x%016lx) <- %016lx\n",
-                       (unsigned long)dest,
-                       (unsigned long)middle,
-                       (unsigned long)end,
-                       (unsigned long)start_offset);
-               
-               /* Skip intial buffer unused bytes */
-               if (offset < header_size) {
-                       if (start_offset < header_size) {
-                               offset = start_offset;
-                       } else {
-                               offset = header_size;
-                       }
-               }
-               
-               /* Skip the unused bytes */
-               skip_bytes = start_offset - offset;
-               if (skip_bytes && 
-                       ((result = stream_skip(skip_bytes)) != skip_bytes)) {
-                       printk_err("ERROR: Skip of %ld bytes skipped %ld bytes\n",
-                               skip_bytes, result);
-                       goto out;
-               }
-               offset = start_offset;
-               
-               /* Copy data from the initial buffer */
-               if (offset < header_size) {
-                       size_t len;
-                       if ((ptr->s_filesz + start_offset) > header_size) {
-                               len = header_size - start_offset;
-                       }
-                       else {
-                               len = ptr->s_filesz;
-                       }
-                       memcpy(dest, &header[start_offset], len);
-                       dest += len;
-               }
-               
-               /* Read the segment into memory */
-               read_bytes = middle - dest;
-               if (read_bytes && 
-                       ((result = stream_read(dest, read_bytes)) != read_bytes)) {
-                       printk_err("ERROR: Read of %ld bytes read %ld bytes...\n",
-                               read_bytes, result);
-                       goto out;
-               }
-               offset += ptr->s_filesz;
-               
-               /* Zero the extra bytes between middle & end */
-               if (middle < end) {
-                       printk_debug("Clearing Segment: addr: 0x%016lx memsz: 0x%016lx\n",
-                               (unsigned long)middle, (unsigned long)(end - middle));
-                       
-                       /* Zero the extra bytes */
-                       memset(middle, 0, end - middle);
-               }
-       }
-       return 1;
- out:
-       return 0;
-}
-
-static int verify_loaded_image(
-       struct verify_callback *vcb,
-       Elf_ehdr *ehdr, Elf_phdr *phdr,
-       struct segment *head
-       )
-{
-       struct segment *ptr;
-       int ok;
-       ok = 1;
-       for(; ok && vcb ; vcb = vcb->next) {
-               /* Find where the note is loaded */
-               /* The whole note must be loaded intact
-                * so an address of 0 for the descriptor is impossible
-                */
-               vcb->desc_addr = 0; 
-               for(ptr = head->next; ptr != head; ptr = ptr->next) {
-                       unsigned long desc_addr;
-                       desc_addr = ptr->s_addr + vcb->desc_offset - ptr->s_offset;
-                       if ((desc_addr >= ptr->s_addr) &&
-                               (desc_addr < (ptr->s_addr + ptr->s_filesz))) {
-                               vcb->desc_addr = desc_addr;
-                       }
-               }
-               ok = vcb->callback(vcb, ehdr, phdr, head);
-       }
-       return ok;
-}
-
-int elfload(struct lb_memory *mem,
-       unsigned char *header, unsigned long header_size)
-{
-       Elf_ehdr *ehdr;
-       Elf_phdr *phdr;
-       void *entry;
-       struct segment head;
-       struct verify_callback *cb_chain;
-       unsigned long bounce_buffer;
-
-       /* Find a bounce buffer so I can load to coreboot's current location */
-       bounce_buffer = get_bounce_buffer(mem);
-       if (!bounce_buffer) {
-               printk_err("Could not find a bounce buffer...\n");
-               goto out;
-       }
-
-       ehdr = (Elf_ehdr *)header;
-       entry = (void *)(ehdr->e_entry);
-       phdr = (Elf_phdr *)(&header[ehdr->e_phoff]);
-
-       /* Digest elf note information... */
-       cb_chain = 0;
-       if ((phdr[0].p_type == PT_NOTE) && 
-               ((phdr[0].p_offset + phdr[0].p_filesz) < header_size)) {
-               cb_chain = process_elf_notes(header,
-                       phdr[0].p_offset, phdr[0].p_filesz);
-       }
-
-       /* Preprocess the elf segments */
-       if (!build_elf_segment_list(&head, 
-               bounce_buffer, mem, phdr, ehdr->e_phnum))
-               goto out;
-
-       /* Load the segments */
-       if (!load_elf_segments(&head, header, header_size))
-               goto out;
-
-       printk_spew("Loaded segments\n");
-       /* Verify the loaded image */
-       if (!verify_loaded_image(cb_chain, ehdr, phdr, &head)) 
-               goto out;
-
-       printk_spew("verified segments\n");
-       /* Shutdown the stream device */
-       stream_fini();
-       
-       printk_spew("closed down stream\n");
-       /* Reset to booting from this image as late as possible */
-       boot_successful();
-
-       printk_debug("Jumping to boot code at %p\n", entry);
-       post_code(0xfe);
-
-       /* Jump to kernel */
-       jmp_to_elf_entry(entry, bounce_buffer, bounce_size);
-       return 1;
-
- out:
-       return 0;
-}
-
-int elfboot(struct lb_memory *mem)
-{
-       Elf_ehdr *ehdr;
-       static unsigned char header[ELF_HEAD_SIZE];
-       int header_offset;
-       int i, result;
-
-       result = 0;
-       printk_debug("\nelfboot: Attempting to load payload.\n");
-       post_code(0xf8);
-
-       if (stream_init() < 0) {
-               printk_err("Could not initialize driver...\n");
-               goto out;
-       }
-
-       /* Read in the initial ELF_HEAD_SIZE bytes */
-       if (stream_read(header, ELF_HEAD_SIZE) != ELF_HEAD_SIZE) {
-               printk_err("Read failed...\n");
-               goto out;
-       }
-       /* Scan for an elf header */
-       header_offset = -1;
-       for(i = 0; i < ELF_HEAD_SIZE - (sizeof(Elf_ehdr) + sizeof(Elf_phdr)); i+=16) {
-               ehdr = (Elf_ehdr *)(&header[i]);
-               if (memcmp(ehdr->e_ident, ELFMAG, 4) != 0) {
-                       printk_debug("No header at %d\n", i);
-                       continue;
-               }
-               printk_debug("Found ELF candidate at offset %d\n", i);
-               /* Sanity check the elf header */
-               if ((ehdr->e_type == ET_EXEC) &&
-                       elf_check_arch(ehdr) &&
-                       (ehdr->e_ident[EI_VERSION] == EV_CURRENT) &&
-                       (ehdr->e_version == EV_CURRENT) &&
-                       (ehdr->e_ehsize == sizeof(Elf_ehdr)) &&
-                       (ehdr->e_phentsize = sizeof(Elf_phdr)) &&
-                       (ehdr->e_phoff < (ELF_HEAD_SIZE - i)) &&
-                       ((ehdr->e_phoff + (ehdr->e_phentsize * ehdr->e_phnum)) <= 
-                               (ELF_HEAD_SIZE - i))) {
-                       header_offset = i;
-                       break;
-               }
-               ehdr = 0;
-       }
-       printk_debug("header_offset is %d\n", header_offset);
-       if (header_offset == -1) {
-               goto out;
-       }
-
-       printk_debug("Try to load at offset 0x%x\n", header_offset);
-       result = elfload(mem, 
-               header + header_offset , ELF_HEAD_SIZE - header_offset);
- out:
-       if (!result) {
-               /* Shutdown the stream device */
-               stream_fini();
-
-               printk_err("Can not load ELF Image.\n");
-
-               post_code(0xff);
-       }
-       return 0;
-
-}
diff --git a/src/boot/filo.c b/src/boot/filo.c
deleted file mode 100644 (file)
index d6ee930..0000000
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Copyright (C) 2003 by SONE Takeshi <ts1@tsn.or.jp> and others.
- * This program is licensed under the terms of GNU General Public License.
- *
- * Modified for coreboot by Greg Watson <gwatson@lanl.gov>
- */
-
-#include <console/console.h>
-#include <delay.h>
-#include <string.h>
-#include <boot/tables.h>
-#include <boot/elf.h>
-
-#define ENTER '\r'
-#define ESCAPE '\x1b'
-
-#ifndef CONFIG_AUTOBOOT_CMDLINE
-#define autoboot(mem)
-#endif
-
-#if !CONFIG_AUTOBOOT_DELAY
-#define autoboot_delay() 0 /* success */
-#endif
-
-#define havechar() console_tst_byte()
-#define putchar(c) console_tx_byte(c)
-#define getchar(c) console_rx_byte(c)
-
-extern char *boot_file;
-
-int getline(char *buf, int max)
-{
-    int cur, ch, nonspace_seen;
-
-    cur = 0;
-    while (buf[cur]) {
-       putchar(buf[cur]);
-       cur++;
-    }
-    for (;;) {
-       ch = getchar();
-       switch (ch) {
-       /* end of line */
-       case '\r':
-       case '\n':
-           putchar('\n');
-           goto out;
-       /* backspace */
-       case '\b':
-       case '\x7f':
-           if (cur > 0) {
-               cur--;
-               putchar('\b');
-               putchar(' ');
-               putchar('\b');
-           }
-           break;
-       /* word erase */
-       case 'W' & 0x1f: /* ^W */
-           nonspace_seen = 0;
-           while (cur) {
-               if (buf[cur-1] != ' ')
-                   nonspace_seen = 1;
-               putchar('\b');
-               putchar(' ');
-               putchar('\b');
-               cur--;
-               if (nonspace_seen && cur < max-1 && cur > 0 && buf[cur-1]==' ')
-                   break;
-           }
-           break;
-       /* line erase */
-       case 'U' & 0x1f: /* ^U */
-           while (cur) {
-               putchar('\b');
-               putchar(' ');
-               putchar('\b');
-               cur--;
-           }
-           cur = 0;
-           break;
-       default:
-           if (ch < 0x20)
-               break; /* ignore control char */
-           if (ch >= 0x7f)
-               break;
-           if (cur + 1 < max) {
-               putchar(ch); /* echo back */
-               buf[cur] = ch;
-               cur++;
-           }
-       }
-    }
-out:
-    if (cur >= max)
-       cur = max - 1;
-    buf[cur] = '\0';
-    return cur;
-}
-
-static void boot(struct lb_memory *mem, const char *line)
-{
-    char *param;
-
-    /* Split filename and parameter */
-    boot_file = strdup(line);
-    param = strchr(boot_file, ' ');
-    if (param) {
-       *param = '\0';
-       param++;
-    }
-
-    if (!elfboot(mem))
-       printk_info("Unsupported image format\n");
-    free(boot_file);
-}
-
-#ifdef CONFIG_AUTOBOOT_CMDLINE
-#if CONFIG_AUTOBOOT_DELAY
-static inline int autoboot_delay(void)
-{
-    unsigned int timeout;
-    int sec, tmp;
-    char key;
-    
-    key = 0;
-
-    printk_info("Press <Enter> for default boot, or <Esc> for boot prompt... ");
-    for (sec = CONFIG_AUTOBOOT_DELAY; sec>0 && key==0; sec--) {
-       printk_info("%d", sec);
-       timeout = 10;
-       while (timeout-- > 0) {
-           if (havechar()) {
-               key = getchar();
-               if (key==ENTER || key==ESCAPE)
-                   break;
-           }
-           mdelay(100);
-       }
-       for (tmp = sec; tmp; tmp /= 10)
-           printk_info("\b \b");
-    }
-    if (key == 0) {
-       printk_info("timed out\n");
-       return 0; /* success */
-    } else {
-       putchar('\n');
-       if (key == ESCAPE)
-           return -1; /* canceled */
-       else
-           return 0; /* default accepted */
-    }
-}
-#endif /* CONFIG_AUTOBOOT_DELAY */
-
-static void autoboot(struct lb_memory *mem)
-{
-    /* If Escape key is pressed already, skip autoboot */
-    if (havechar() && getchar()==ESCAPE)
-       return;
-
-    if (autoboot_delay()==0) {
-       printk_info("boot: %s\n", CONFIG_AUTOBOOT_CMDLINE);
-       boot(mem, CONFIG_AUTOBOOT_CMDLINE);
-    }
-}
-#endif /* CONFIG_AUTOBOOT_CMDLINE */
-
-/* The main routine */
-int filo(struct lb_memory *mem)
-{
-    char line[256];
-
-    printk_info("FILO version 0.4.1\n");
-
-    /* Try default image */
-    autoboot(mem);
-
-    /* The above didn't work, ask user */
-    while (havechar())
-       getchar();
-#ifdef CONFIG_AUTOBOOT_CMDLINE
-    strncpy(line, CONFIG_AUTOBOOT_CMDLINE, sizeof(line)-1);
-    line[sizeof(line)-1] = '\0';
-#else
-    line[0] = '\0';
-#endif
-    for (;;) {
-       printk_info("boot: ");
-       getline(line, sizeof line);
-       if (line[0])
-           boot(mem, line);
-    }
-}
index a0543401ed8dfaab84b58a20261696e0c108a243..5ab14fb09a7661b86ca9e3e2cd2d953ae7c50ba4 100644 (file)
@@ -96,21 +96,10 @@ void hardwaremain(int boot_complete)
         * write our configuration tables.
         */
        lb_mem = write_tables();
-#if CONFIG_CBFS == 1
-# if CONFIG_USE_FALLBACK_IMAGE == 1
+#if CONFIG_USE_FALLBACK_IMAGE == 1
        cbfs_load_payload(lb_mem, "fallback/payload");
-# else
-       cbfs_load_payload(lb_mem, "normal/payload");
-# endif
-#else
-
-#if CONFIG_FS_PAYLOAD == 1
-#warning "CONFIG_FS_PAYLOAD is deprecated."
-       filo(lb_mem);
 #else
-#warning "elfboot will soon be deprecated."
-       elfboot(lb_mem);
-#endif
+       cbfs_load_payload(lb_mem, "normal/payload");
 #endif
        printk(BIOS_ERR, "Boot failed.\n");
 }
index 061c0b21a8583f006f3c6231f4997e893272da79..8c954d20bb67837df439d970c189cc7881be495d 100644 (file)
@@ -215,7 +215,6 @@ end
 # for now, this is just 'lib', but it may be more later. 
 dir /lib
 dir /console
-dir /stream
 dir /devices
 dir /pc80
 dir /boot
index db1a20fa91b73bfc7b6bbbddd6bbe2d3eed0f951..071362a5969e10a1b196c939c696167a78329ff6 100644 (file)
@@ -641,11 +641,6 @@ define CONFIG_MULTIBOOT
        export always
        comment "Use Multiboot (rather than ELF boot notes) to boot the payload"
 end
-define CONFIG_IDE_PAYLOAD
-       default 0
-       export always
-       comment "Boot from IDE device"
-end
 define CONFIG_ROM_PAYLOAD
        default 0
        export always
@@ -672,47 +667,6 @@ define CONFIG_PRECOMPRESSED_PAYLOAD
        export always
        comment "boot image is already compressed" 
 end
-define CONFIG_SERIAL_PAYLOAD
-       default 0
-       export always
-       comment "Download boot image from serial port"
-end
-define CONFIG_FS_PAYLOAD
-       default 0
-       export always
-       comment "Boot from a filesystem"
-end
-define CONFIG_FS_EXT2
-       default 0
-       export always
-       comment "Enable ext2 filesystem support"
-end
-define CONFIG_FS_ISO9660
-       default 0
-       export always
-       comment "Enable ISO9660 filesystem support"
-end
-define CONFIG_FS_FAT
-       default 0
-       export always
-       comment "Enable FAT filesystem support"
-end
-define CONFIG_CBFS
-       default 1
-       export always
-       comment "The new CBFS file system"
-end
-define CONFIG_AUTOBOOT_DELAY
-       default 2
-       export always
-       comment "Delay (in seconds) before autobooting"
-end
-define CONFIG_AUTOBOOT_CMDLINE
-       default "hdc1:/vmlinuz root=/dev/hdc3 console=tty0 console=ttyS0,115200"
-       export always
-       format "\"%s\""
-       comment "Default command line when autobooting"
-end
 
 define CONFIG_USE_WATCHDOG_ON_BOOT
        default 0
index 7626289e2d63cd14433ec6705670fe2aa574cf37..e5ec7e19cef4f13160d6beffa9c59a15537762a7 100644 (file)
@@ -10,13 +10,8 @@ else
        default CONFIG_ROM_SECTION_SIZE   = CONFIG_FALLBACK_SIZE
        default CONFIG_ROM_SECTION_OFFSET = ( CONFIG_ROM_SIZE - CONFIG_FALLBACK_SIZE - CONFIG_FAILOVER_SIZE )
     else
-       if CONFIG_CBFS
-               default CONFIG_ROM_SECTION_SIZE   = CONFIG_FALLBACK_SIZE
-               default CONFIG_ROM_SECTION_OFFSET = ( CONFIG_ROM_SIZE - CONFIG_FALLBACK_SIZE - CONFIG_FALLBACK_SIZE - CONFIG_FAILOVER_SIZE )
-       else
-               default CONFIG_ROM_SECTION_SIZE   = ( CONFIG_ROM_SIZE - CONFIG_FALLBACK_SIZE - CONFIG_FAILOVER_SIZE )
-               default CONFIG_ROM_SECTION_OFFSET = 0
-       end
+       default CONFIG_ROM_SECTION_SIZE   = CONFIG_FALLBACK_SIZE
+       default CONFIG_ROM_SECTION_OFFSET = ( CONFIG_ROM_SIZE - CONFIG_FALLBACK_SIZE - CONFIG_FALLBACK_SIZE - CONFIG_FAILOVER_SIZE )
     end
 end
 
index 82132f4acb362f1494608e66e0441ee801b81a09..f5f8708b657c3529f9ac62b3e72d8b385aa63961 100644 (file)
@@ -6,13 +6,8 @@ if CONFIG_USE_FALLBACK_IMAGE
        default CONFIG_ROM_SECTION_SIZE   = CONFIG_FALLBACK_SIZE
        default CONFIG_ROM_SECTION_OFFSET = ( CONFIG_ROM_SIZE - CONFIG_FALLBACK_SIZE )
 else
-       if CONFIG_CBFS
-               default CONFIG_ROM_SECTION_SIZE   = CONFIG_FALLBACK_SIZE
-               default CONFIG_ROM_SECTION_OFFSET = ( CONFIG_ROM_SIZE - CONFIG_FALLBACK_SIZE - CONFIG_FALLBACK_SIZE )
-       else
-               default CONFIG_ROM_SECTION_SIZE   = ( CONFIG_ROM_SIZE - CONFIG_FALLBACK_SIZE )
-               default CONFIG_ROM_SECTION_OFFSET = 0
-       end
+       default CONFIG_ROM_SECTION_SIZE   = CONFIG_FALLBACK_SIZE
+       default CONFIG_ROM_SECTION_OFFSET = ( CONFIG_ROM_SIZE - CONFIG_FALLBACK_SIZE - CONFIG_FALLBACK_SIZE )
 end
 
 ##
index 79cae6bc832fbabc378f2ed81cad2eae97267fd9..a391ec59b4e13a03098545a176dff76ab8c0ed1f 100644 (file)
@@ -3,16 +3,15 @@
    2006/05/02 - stepan: move nrv2b to an extra file.
 */
 
-#if CONFIG_CBFS == 1
 void cbfs_and_run_core(const char*, unsigned ebp);
 
 static void copy_and_run(void)
 {
-# if CONFIG_USE_FALLBACK_IMAGE == 1
+#if CONFIG_USE_FALLBACK_IMAGE == 1
        cbfs_and_run_core("fallback/coreboot_ram", 0);
-# else
+#else
        cbfs_and_run_core("normal/coreboot_ram", 0);
-# endif
+#endif
 }
 
 #if CONFIG_AP_CODE_IN_CAR == 1
@@ -26,38 +25,3 @@ static void copy_and_run_ap_code_in_car(unsigned ret_addr)
 # endif
 }
 #endif
-
-#else
-void copy_and_run_core(u8 *src, u8 *dst, unsigned long ilen, unsigned ebp);
-
-extern u8 _liseg, _iseg, _eiseg;
-
-static void copy_and_run(void)
-{
-       uint8_t *src, *dst; 
-        unsigned long ilen;
-
-       src = &_liseg;
-       dst = &_iseg;
-       ilen = &_eiseg - dst;
-
-       copy_and_run_core(src, dst, ilen, 0);
-}
-
-#if CONFIG_AP_CODE_IN_CAR == 1
-
-extern u8 _liseg_apc, _iseg_apc, _eiseg_apc;
-
-static void copy_and_run_ap_code_in_car(unsigned ret_addr)
-{
-        uint8_t *src, *dst;
-        unsigned long ilen;
-
-       src = &_liseg_apc;
-       dst = &_iseg_apc;
-       ilen = &_eiseg_apc - dst;
-
-       copy_and_run_core(src, dst, ilen, ret_addr);
-}
-#endif
-#endif
index fcd7bdc04c0871f283a52741bc31099b77906a28..ee4902a269305e4e09d1f2ccb98bac388c59407c 100644 (file)
@@ -222,19 +222,8 @@ __main:
        movl    $0x4000000, %esp
        movl    %esp, %ebp
        pushl   %esi
-#if CONFIG_CBFS == 1
        pushl $str_coreboot_ram_name
        call cbfs_and_run_core
-#else
-       movl    $_liseg, %esi
-       movl    $_iseg,  %edi
-       movl    $_eiseg, %ecx
-       subl    %edi, %ecx
-       pushl   %ecx
-       pushl   %edi
-       pushl   %esi
-       call copy_and_run_core
-#endif
 
 .Lhlt:
        intel_chip_post_macro(0xee)     /* post fail ee */
@@ -295,10 +284,8 @@ str_pre_main:        .string "Jumping to coreboot.\r\n"
 .previous
 
 #endif /* ASM_CONSOLE_LOGLEVEL > BIOS_DEBUG */
-#if CONFIG_CBFS == 1
-# if CONFIG_USE_FALLBACK_IMAGE == 1
+#if CONFIG_USE_FALLBACK_IMAGE == 1
 str_coreboot_ram_name: .string "fallback/coreboot_ram"
-# else
+#else
 str_coreboot_ram_name: .string "normal/coreboot_ram"
-# endif
 #endif
index 7ff63c5e0c2e65d847f76af42a94dc0de2b321c8..7257c4f6bcbd5ce52a46f705c989064eab84abef 100644 (file)
@@ -2,7 +2,6 @@
    (Written by Patrick Georgi <patrick.georgi@coresystems.de> for coresystems GmbH
 */
 
-#if CONFIG_CBFS == 1
 void cbfs_and_run_core(char*, unsigned ebp);
 
 static void copy_and_run(unsigned cpu_reset)
@@ -10,32 +9,9 @@ static void copy_and_run(unsigned cpu_reset)
        if (cpu_reset == 1) cpu_reset = -1;
        else cpu_reset = 0;
 
-# if CONFIG_USE_FALLBACK_IMAGE == 1
+#if CONFIG_USE_FALLBACK_IMAGE == 1
        cbfs_and_run_core("fallback/coreboot_ram", cpu_reset);
-# else
-       cbfs_and_run_core("normal/coreboot_ram", cpu_reset);
-# endif
-}
-
 #else
-void copy_and_run_core(u8 *src, u8 *dst, unsigned long ilen, unsigned ebp);
-
-extern u8 _liseg, _iseg, _eiseg;
-
-static void copy_and_run(unsigned cpu_reset)
-{
-       uint8_t *src, *dst; 
-        unsigned long ilen;
-
-
-       src = &_liseg;
-       dst = &_iseg;
-       ilen = &_eiseg - dst;
-
-       if (cpu_reset == 1) cpu_reset = -1;
-       else cpu_reset = 0;
-
-       copy_and_run_core(src, dst, ilen, cpu_reset);
-}
+       cbfs_and_run_core("normal/coreboot_ram", cpu_reset);
 #endif
-
+}
index f188bc7d1e64d28cc5d23cdb2d705f5c3abcad74..f64a9e8c5521d8c7252d2d118449a0405e651d8d 100644 (file)
@@ -35,22 +35,17 @@ struct rom_header * pci_rom_probe(struct device *dev)
        struct rom_header *rom_header;
        struct pci_data *rom_data;
 
-       if (CONFIG_CBFS) {
-               void *v;
-               /* if it's in FLASH, then it's as if dev->on_mainboard was true */
-               v = cbfs_load_optionrom(dev->vendor, dev->device, NULL);
-               printk_debug("In cbfs, rom address for %s = %p\n", 
-                               dev_path(dev), v);
-               if (v) {
-                       dev->rom_address = (u32)v;
-                       dev->on_mainboard = 1;
-               }
-       } 
+       void *v;
+       /* if it's in FLASH, then it's as if dev->on_mainboard was true */
+       v = cbfs_load_optionrom(dev->vendor, dev->device, NULL);
+       printk_debug("In cbfs, rom address for %s = %p\n", 
+                       dev_path(dev), v);
+       if (v) {
+               dev->rom_address = (u32)v;
+               dev->on_mainboard = 1;
+       }
 
        if (dev->on_mainboard) {
-               /* this is here as a legacy path. We hope it goes away soon. Users should not have to 
-                * compute the ROM address at build time!
-                */
                 // in case some device PCI_ROM_ADDRESS can not be set or readonly 
                rom_address = dev->rom_address;
                printk_debug("On mainboard, rom address for %s = %lx\n", 
index 7569d856f056a9517a208469a92912247c85fc22..7f9a5b5e5e51e7bac5cedba919998a0f886ec2b7 100644 (file)
@@ -27,11 +27,5 @@ initobject memset.o
 initobject memcpy.o
 initobject memcmp.o
 
-if CONFIG_CBFS
-       object cbfs.o
-       object lzma.o
-end
-
-if CONFIG_COMPRESSED_PAYLOAD_LZMA
-       object lzma.o
-end
+object cbfs.o
+object lzma.o
index 713d3bc04465138a0c51f5c338a14ad9975e847c..ac9d17f48e1993ae3016fadee38071d01a816a20 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -97,9 +96,4 @@ default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
 default CONFIG_CONSOLE_VGA = 1
 default CONFIG_PCI_ROM_RUN = 1
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 82d2d44347a8ad33e70548895444da9fa4ff3d43..89aa4ba02158bf2cb4ec0f2af8bc6b5b9bb72604 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -97,9 +96,4 @@ default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
 default CONFIG_CONSOLE_VGA = 1
 default CONFIG_PCI_ROM_RUN = 1
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 9e9c5ffe7a0f258995fc5f65573bd236fab14627..53dad2776e211044f017018e0cba22af4284ee4b 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -98,9 +97,4 @@ default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9   # Override this in targets/*/Config.
 default CONFIG_CONSOLE_VGA = 1         # Override this in targets/*/Config.lb.
 default CONFIG_PCI_ROM_RUN = 1         # Override this in targets/*/Config.lb.
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index ac761751009620fb102dabac6086d14a686a4a1f..98601c1bacd5e6dd1a58cd67dfd9ed177036cdba 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -103,9 +102,4 @@ default CONFIG_TTYS0_LCS = 0x3              # 8n1
 default CONFIG_DEFAULT_CONSOLE_LOGLEVEL = 9
 default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 1be68938dca28f08cee04ada77ad7fc9e036a354..303f6d27f3ff0258311b694320f559f08f0a9caa 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -180,10 +179,4 @@ default  CONFIG_DEFAULT_CONSOLE_LOGLEVEL=8
 ## At a maximum only compile in this level of debugging
 default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 707ed6c455972553e742b212b6ae6962f27a147d..c94590adcb6e378ca226b13c42c4609074124604 100644 (file)
@@ -20,7 +20,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_HAVE_ACPI_TABLES
 uses CONFIG_HAVE_ACPI_RESUME
@@ -301,9 +300,4 @@ default CONFIG_GFXUMA=1
 default CONFIG_HAVE_MAINBOARD_RESOURCES=1
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 1c6da2c37a133f81682c386714082b47532358a8..9315d45cd9573cadf4b03f8020bafb769361d151 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -180,10 +179,4 @@ default  CONFIG_DEFAULT_CONSOLE_LOGLEVEL=8
 ## At a maximum only compile in this level of debugging
 default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 88205e0c995e6ad23089fb578acde591c090e966..6ac38aa35eefdc7a5614bb5052270aefd2978b8c 100644 (file)
@@ -20,7 +20,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_HAVE_ACPI_TABLES
 uses CONFIG_HAVE_ACPI_RESUME
@@ -299,9 +298,4 @@ default CONFIG_GFXUMA=1
 default CONFIG_HAVE_MAINBOARD_RESOURCES=1
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index e8a6e106e65f1137504e71cce6117aea51770baf..d2eb28e36231c0f2265966afa8883b920fc2a6e7 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -159,10 +158,4 @@ default  CONFIG_DEFAULT_CONSOLE_LOGLEVEL=8
 ## At a maximum only compile in this level of debugging
 default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 6b53360c4eaf523b3b379f1ae6b0e9af6d875bc8..fcab077f661d666c50dcde54492f4d7db8838e7f 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_HAVE_ACPI_TABLES
 uses CONFIG_HAVE_ACPI_RESUME
@@ -325,9 +324,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index f8079a5cd4dd56394da46bef215d8bae1e3d9329..977e67e1293768c9163d63f43a177a4e595ab658 100644 (file)
@@ -18,7 +18,6 @@
 #
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_HAVE_ACPI_TABLES
 uses CONFIG_HAVE_ACPI_RESUME
@@ -362,9 +361,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 1e8b436b155505dfc6794510d1e8d0472cf80d53..ce19152745ddfedc3ca0641d029401dd3a51925a 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -242,9 +241,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 94fa6b6277bc60c19bc82d30bb0d2dbe7ce0aa5a..51916fb40520ebdb93b05b20022516ce41144f1f 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -180,10 +179,4 @@ default  CONFIG_DEFAULT_CONSOLE_LOGLEVEL=8
 ## At a maximum only compile in this level of debugging
 default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 20785e8c1952039256d82b46d3839f2b8d3e276d..f9a7bccaf381e17fc8b5eb1c0323ea4a9427695c 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -103,9 +102,4 @@ default CONFIG_TTYS0_LCS = 0x3              # 8n1
 default CONFIG_DEFAULT_CONSOLE_LOGLEVEL = 9
 default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index a3aa6585652264f67b129917795c519907760b80..7e5a96e645820a046015997b6ae9abda3a8ea188 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_PIRQ_TABLE
-uses CONFIG_CBFS
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
 uses CONFIG_HAVE_HARD_RESET
@@ -161,10 +160,4 @@ default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=9
 # default CONFIG_PCI_ROM_RUN=1
 default CONFIG_VIDEO_MB = 0
 
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index d83e938603412e47b21788a713830287590a527d..dc8ca112e1ab0e97e6e9148e79d2b8fc00ccb2ff 100644 (file)
@@ -20,7 +20,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_USE_FAILOVER_IMAGE
@@ -167,9 +166,4 @@ default CONFIG_DEFAULT_CONSOLE_LOGLEVEL = 8
 default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL = "MAINBOARD_POWER_ON"
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 15648cba2ada2b457f3c6179c8bcd53d3ef7cea3..6b48beccb4d99181f6f5820890ca3a478323e294 100644 (file)
@@ -18,7 +18,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -167,9 +166,4 @@ default CONFIG_TTYS0_LCS = 0x3              # 8n1
 default CONFIG_DEFAULT_CONSOLE_LOGLEVEL = 8
 default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL = "MAINBOARD_POWER_ON"
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 1a9fa17cec38761cd7ffdbbb20ff4fd9b17b9eeb..bf65a41694283fa99e8127350e390fe99865793e 100644 (file)
@@ -18,7 +18,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -176,9 +175,4 @@ default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL = "MAINBOARD_POWER_ON"
 
 default CONFIG_FALLBACK_SIZE = CONFIG_ROM_IMAGE_SIZE
 default CONFIG_ROM_IMAGE_SIZE = 64 * 1024
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 6ccdc4c805c1457263113f114bf41e932a9c9675..0799ee6491887f158295508da71c6ce9dee1f600 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -97,9 +96,4 @@ default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9   # Override this in targets/*/Config.
 default CONFIG_CONSOLE_VGA = 1         # Override this in targets/*/Config.lb.
 default CONFIG_PCI_ROM_RUN = 1         # Override this in targets/*/Config.lb.
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 0883ce344d64a83360dc37a0310580c92f434f7c..7879a2e09de3ffa15f4ad585a483ea8df4ea5f19 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -158,9 +157,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=9
 
 default CONFIG_UDELAY_TSC=1
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 25891facc6ae4f0680018c9dde881b8f8bc038cf..fa06475de4695c761ae19738e617dcb0277fc940 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -103,5 +102,4 @@ default CONFIG_DEFAULT_CONSOLE_LOGLEVEL = 9
 default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
 default CONFIG_CONSOLE_VGA = 1
 default CONFIG_PCI_ROM_RUN = 1
-default CONFIG_CBFS=1
 end
index a48b3a490a521857416ef83ea8bb5fff8511b3c8..07f4c29767b684d757dcd1b6f11434a0c89e1882 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -104,9 +103,4 @@ default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
 default CONFIG_CONSOLE_VGA = 1
 default CONFIG_PCI_ROM_RUN = 1
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 713d3bc04465138a0c51f5c338a14ad9975e847c..ac9d17f48e1993ae3016fadee38071d01a816a20 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -97,9 +96,4 @@ default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
 default CONFIG_CONSOLE_VGA = 1
 default CONFIG_PCI_ROM_RUN = 1
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index aecae916ccbdc8330f8361e394a23c1317c23a70..afee671296ee47df5269130c8f08c9de64b93d26 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -98,9 +97,4 @@ default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
 default CONFIG_CONSOLE_VGA = 1
 default CONFIG_PCI_ROM_RUN = 1
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 713d3bc04465138a0c51f5c338a14ad9975e847c..ac9d17f48e1993ae3016fadee38071d01a816a20 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -97,9 +96,4 @@ default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
 default CONFIG_CONSOLE_VGA = 1
 default CONFIG_PCI_ROM_RUN = 1
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index b8e1a0f89c276a4bcfb90c485e9c3c75a431ef23..53902938070a7ae5de6def30e6cd19c169164579 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -103,9 +102,4 @@ default CONFIG_TTYS0_LCS = 0x3              # 8n1
 default CONFIG_DEFAULT_CONSOLE_LOGLEVEL = 6
 default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 6
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 713d3bc04465138a0c51f5c338a14ad9975e847c..ac9d17f48e1993ae3016fadee38071d01a816a20 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -97,9 +96,4 @@ default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
 default CONFIG_CONSOLE_VGA = 1
 default CONFIG_PCI_ROM_RUN = 1
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 853e4c084028883c6b0dd94985c1d6fda6e522b8..b5ef1c742cf4211388f61f455c68f1e570a8c586 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -103,9 +102,4 @@ default CONFIG_TTYS0_LCS = 0x3              # 8n1
 default CONFIG_DEFAULT_CONSOLE_LOGLEVEL = 6
 default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 6
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 212c18ffdc5417be6e492f64a06f1b4251573c70..4d058e21f102057a683e3a4ad718ed43326dd248 100644 (file)
@@ -20,7 +20,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -103,10 +102,4 @@ default HOSTCC = "gcc"
 ##
 default CONFIG_MAX_PCI_BUSES = 3
 
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 713d3bc04465138a0c51f5c338a14ad9975e847c..ac9d17f48e1993ae3016fadee38071d01a816a20 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -97,9 +96,4 @@ default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
 default CONFIG_CONSOLE_VGA = 1
 default CONFIG_PCI_ROM_RUN = 1
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index ca6738d991f775da90c04c458ad717f70f310edb..4ae8176b3ed958531345064961727dac410918c5 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_HAVE_ACPI_TABLES
 uses CONFIG_HAVE_ACPI_RESUME
@@ -260,9 +259,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 713d3bc04465138a0c51f5c338a14ad9975e847c..ac9d17f48e1993ae3016fadee38071d01a816a20 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -97,9 +96,4 @@ default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
 default CONFIG_CONSOLE_VGA = 1
 default CONFIG_PCI_ROM_RUN = 1
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 49009410d80dbcda35fbab332671176b47b1abaa..1e930265b897a3d73176769124f22b6d639ad03b 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -228,9 +227,4 @@ default  CONFIG_CONSOLE_BTEXT=0
 
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 0ece7ebef765c5be9b48dd90c266bc03fa366221..7fc51bcafc5d75cb0c6559628ea415f75c691f35 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -113,11 +112,4 @@ default CONFIG_ROM_PAYLOAD     = 1
 default CC="$(CONFIG_CROSS_COMPILE)gcc -m32"
 default HOSTCC="gcc"
 
-
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 5f85c3a917fc5c299275acf1e1b90c696a75b54a..fe1ed83e944ea96673703849f8649cd8eb753ab3 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -121,11 +120,4 @@ default CONFIG_ROM_PAYLOAD     = 1
 default CC="$(CONFIG_CROSS_COMPILE)gcc -m32"
 default HOSTCC="gcc"
 
-
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 7bd8ac09104d7c702fe5a2a15d1228b9eaaaa724..d9d3b14dff9d00eacd015c6228275102e7d7a23a 100644 (file)
@@ -35,9 +35,6 @@ static void irqdump()
    - set ADDDECTL (now done in raminit.c in cpu/amd/sc520
 */
 static void enable_dev(struct device *dev) {
-#if !CONFIG_CBFS
-       extern unsigned char *rom_start, *rom_end;
-#endif
        volatile struct mmcrpic *pic = MMCRPIC;
        volatile struct mmcr *mmcr = MMCRDEFAULT;
 
@@ -135,15 +132,6 @@ static void enable_dev(struct device *dev) {
         */
        /* follow fuctory here */
        mmcr->dmacontrol.extchanmapa = 0x3210;
-
-#if !CONFIG_CBFS
-       /* hack for IDIOTIC need to fix rom_start */
-       printk_err("Patching rom_start due to sc520 limits\n");
-       rom_start = 0x2000000 + 0x40000;
-       rom_end = rom_start + CONFIG_PAYLOAD_SIZE - 1;
-#endif
-
-       
 }
 struct chip_operations mainboard_ops = {
        CHIP_NAME("DIGITAL-LOGIC MSM586SEG Mainboard")
index 3d9f0c706a8638421bc47a9d9616fb2e91c288d8..35f60c65af20d674b38d8055fdcb0025f21d2e56 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -180,10 +179,4 @@ default  CONFIG_DEFAULT_CONSOLE_LOGLEVEL=8
 ## At a maximum only compile in this level of debugging
 default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index f867e9d4d73e316899419c21ea921977588dc532..f42634fa9c55653d39735171f1f1de10fee61bf4 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -164,10 +163,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 
 default CONFIG_VIDEO_MB = 0
 
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index bf416a23913286df9233967605d0d95805753e63..5200c08c2be29db834460c1f9b6cb075f014ccb4 100644 (file)
@@ -48,13 +48,11 @@ uses CONFIG_USE_PRINTK_IN_CAR
 
 uses CONFIG_DEFAULT_CONSOLE_LOGLEVEL
 uses CONFIG_MAXIMUM_CONSOLE_LOGLEVEL
-uses CONFIG_CBFS
 
 
 default CONFIG_CONSOLE_SERIAL8250=1
 default CONFIG_DEFAULT_CONSOLE_LOGLEVEL=8
 default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
-default CONFIG_CBFS=1
 
 ## CONFIG_ROM_SIZE is the size of boot ROM that this board will use.
 default CONFIG_ROM_SIZE  = 256*1024
index 713d3bc04465138a0c51f5c338a14ad9975e847c..ac9d17f48e1993ae3016fadee38071d01a816a20 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -97,9 +96,4 @@ default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
 default CONFIG_CONSOLE_VGA = 1
 default CONFIG_PCI_ROM_RUN = 1
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index ed45cf60cc3129bab655c4e1f3db3ef834daee4e..6c6554de4618b1559eb8b545505801ec10e04f75 100644 (file)
@@ -22,7 +22,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_HAVE_ACPI_TABLES
 uses CONFIG_HAVE_ACPI_RESUME
@@ -351,9 +350,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index f0088bb3a34625bf08b66a250de63c8214d0710a..4df7ff45da5369178093e0c04539e1290c28e46b 100644 (file)
@@ -20,7 +20,6 @@
 ## 
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_HAVE_ACPI_TABLES
 uses CONFIG_HAVE_ACPI_RESUME
@@ -359,10 +358,5 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 ## Select power on after power fail setting
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 ### End Options.lb
 end
index 8f5222db86e5d65ef789608f93d8d0c474d77f6e..f754012bc073567aa37fd8f240090a01ceef7fcc 100644 (file)
@@ -84,7 +84,6 @@ uses CONFIG_PCI_ROM_RUN
 uses CONFIG_HW_MEM_HOLE_SIZEK
 uses CONFIG_HW_MEM_HOLE_SIZE_AUTO_INC
 uses CONFIG_K8_HT_FREQ_1G_SUPPORT
-uses CONFIG_CBFS
 
 uses CONFIG_HT_CHAIN_UNITID_BASE
 uses CONFIG_HT_CHAIN_END_UNITID_BASE
@@ -327,9 +326,5 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 ## Select power on after power fail setting
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
-##
-## CBFS
-default CONFIG_CBFS=1
-
 ### End Options.lb
 end
index 57cd89707c2503b854e714292c8e9abea5b86138..30e452f54c67cc9164b1f7a212ab4f8949fdb3c6 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -221,9 +220,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index b232a10dd48541b58b9e1a37682d6d2cde40e365..7a2bcd98aa301fac49ea917beb43f79aa91b17fa 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -227,9 +226,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 564f66acc0d8ecaacfa66057c27a3af97c9d8bf4..0538d5f47a06267bf10bc0bdc4a10c67ba0a73bd 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -145,10 +144,4 @@ default HOSTCC="gcc"
 
 default CONFIG_VIDEO_MB = 0
 
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 00eaba4893e5978a4d6bf72eaff7981f34107b8c..88c67e024f10e2f18752ff00fa15458a85760d33 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -172,10 +171,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 
 default CONFIG_VIDEO_MB = 0
 
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 051ffd56ea185110825a721d4a3de3221e58741b..c6ca4155df90d4db76e075bd076183dd77dca74d 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -106,10 +105,4 @@ default CONFIG_TTYS0_LCS = 0x3
 default CONFIG_DEFAULT_CONSOLE_LOGLEVEL=8
 default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index a37095c2f53465edc0f647bfc4a2f2eb028cef9b..1032c61d801db7674e7952ec8ad0f64e9895ec18 100644 (file)
@@ -70,7 +70,6 @@ uses CONFIG_HAVE_SMI_HANDLER
 uses CONFIG_PCIE_CONFIGSPACE_HOLE
 uses CONFIG_MMCONF_SUPPORT
 uses CONFIG_MMCONF_BASE_ADDRESS
-uses CONFIG_CBFS
 #
 uses CONFIG_MAINBOARD
 uses CONFIG_MAINBOARD_PART_NUMBER
@@ -322,10 +321,5 @@ default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=9
 ## Select power on after power fail setting
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
-#
-# CBFS
-#
-default CONFIG_CBFS=1
-
 ### End Options.lb
 end
index aac7a38d0a8a96234327a77288b98c39ed786928..fd46975c07772e3c9acc91d4984030c87d8fe03f 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -242,9 +241,4 @@ default  CONFIG_CONSOLE_BTEXT=0
 
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index c5f2782fd95ce4fe5d171929634d0da0d20f8ee7..2d1cca10fa45662d02ca2d9154b59e60ca18e2b9 100644 (file)
@@ -18,7 +18,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -225,9 +224,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=5
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 2dd7db55fa7ace2783fd60b96065c8de4b88f1a7..dd320dcf863891ff259cfe4b58536173c26db76b 100644 (file)
@@ -18,7 +18,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -236,10 +235,4 @@ default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
 
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 325edba261b49925f5ab13679a2228694b33ed65..aba952b1a104dbe61ba81851fb84cfc6878b01e1 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_ACPI_TABLES
 uses CONFIG_HAVE_ACPI_RESUME
 uses CONFIG_HAVE_PIRQ_TABLE
@@ -240,9 +239,4 @@ default CONFIG_DEBUG=1
 # default CONFIG_CPU_OPT="-g"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index d216b435d8a9509241f548d6bf46310069d376d2..1973e607b66a4fcc109c500af18b0652e04ab390 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_HAVE_ACPI_TABLES
 uses CONFIG_HAVE_ACPI_RESUME
@@ -326,9 +325,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 248b69449c71c34f9d7fe05930637d1e95ee4c03..f3560fff55af3ea55e83edbd3830fb18712da37b 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -228,9 +227,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 23fdc89ef420cc8f4b2161013826f4ed32a45e3d..2a1275d278f78e78462f02c1cd18b18f89606fe1 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -227,9 +226,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 296ca32c253e17bb93d2a3ac11a21bc6bd455789..3a73d237344772c63ce1ba11e01f3dc5278bdee7 100644 (file)
@@ -20,7 +20,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -104,10 +103,4 @@ default HOSTCC = "gcc"
 ##
 default CONFIG_MAX_PCI_BUSES = 3
 
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 25f160c9064b15a902e0457f4d89d47af97c5fcd..5d75737c16122b398e4d33be3eeeb2b3801074b3 100644 (file)
@@ -71,7 +71,6 @@ uses CONFIG_PCIE_CONFIGSPACE_HOLE
 uses CONFIG_MMCONF_SUPPORT
 uses CONFIG_MMCONF_BASE_ADDRESS
 uses CONFIG_GFXUMA
-uses CONFIG_CBFS
 
 #
 uses CONFIG_MAINBOARD
@@ -327,10 +326,5 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=9
 ## Select power on after power fail setting
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
-#
-# CBFS
-# 
-default CONFIG_CBFS=1
-
 ### End Options.lb
 end
index e8a6e106e65f1137504e71cce6117aea51770baf..d2eb28e36231c0f2265966afa8883b920fc2a6e7 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -159,10 +158,4 @@ default  CONFIG_DEFAULT_CONSOLE_LOGLEVEL=8
 ## At a maximum only compile in this level of debugging
 default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index f5f99a24fac15a89de9869aba1942c44eb650d0f..f0158c52b83bde3117024214d51f434088a7300c 100644 (file)
@@ -21,7 +21,6 @@
 ## Based on Options.lb from AMD's DB800 mainboard.
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -29,11 +28,6 @@ uses CONFIG_HAVE_HARD_RESET
 uses CONFIG_HAVE_OPTION_TABLE
 uses CONFIG_USE_OPTION_TABLE
 uses CONFIG_ROM_PAYLOAD
-uses CONFIG_IDE
-uses CONFIG_FS_PAYLOAD
-uses CONFIG_FS_EXT2
-uses CONFIG_AUTOBOOT_DELAY
-uses CONFIG_AUTOBOOT_CMDLINE
 uses CONFIG_IRQ_SLOT_COUNT
 uses CONFIG_MAINBOARD
 uses CONFIG_MAINBOARD_VENDOR
@@ -211,9 +205,4 @@ default  CONFIG_DEFAULT_CONSOLE_LOGLEVEL = 8
 ## At a maximum only compile in this level of debugging
 default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 8
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index f1d25a270a6fb3a4d3dca4173eeda977624fc1f6..50c979e16446f2434b29dd58c2699b5a73a11f9b 100644 (file)
@@ -21,7 +21,6 @@
 ## Based on Options.lb from AMD's DB800 mainboard.
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -29,11 +28,6 @@ uses CONFIG_HAVE_HARD_RESET
 uses CONFIG_HAVE_OPTION_TABLE
 uses CONFIG_USE_OPTION_TABLE
 uses CONFIG_ROM_PAYLOAD
-uses CONFIG_IDE
-uses CONFIG_FS_PAYLOAD
-uses CONFIG_FS_EXT2
-uses CONFIG_AUTOBOOT_DELAY
-uses CONFIG_AUTOBOOT_CMDLINE
 uses CONFIG_IRQ_SLOT_COUNT
 uses CONFIG_MAINBOARD
 uses CONFIG_MAINBOARD_VENDOR
@@ -211,9 +205,4 @@ default  CONFIG_DEFAULT_CONSOLE_LOGLEVEL = 8
 ## At a maximum only compile in this level of debugging
 default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 8
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 9a6ee4b52c73524393d583731669528ff17d8fd7..8f97a2e3fbf7eef3d63e3b7dd86fb73a58c7dc80 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CC
-uses CONFIG_CBFS
 uses CONFIG_COMPRESSED_PAYLOAD_LZMA
 uses CONFIG_CONSOLE_SERIAL8250
 uses CONFIG_CONSOLE_VGA
@@ -78,7 +77,6 @@ default CONFIG_ROM_IMAGE_SIZE = 128 * 1024
 default CONFIG_FALLBACK_SIZE = CONFIG_ROM_IMAGE_SIZE
 default CONFIG_HAVE_FALLBACK_BOOT = 1
 default CONFIG_ROM_PAYLOAD = 1
-default CONFIG_CBFS=1
 
 # RAM layout
 default CONFIG_RAMBASE = 0x00004000
index 82d2d44347a8ad33e70548895444da9fa4ff3d43..89aa4ba02158bf2cb4ec0f2af8bc6b5b9bb72604 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -97,9 +96,4 @@ default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
 default CONFIG_CONSOLE_VGA = 1
 default CONFIG_PCI_ROM_RUN = 1
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 76f88467e6fb98f9efb11a2b7d34a01de9cc2407..1260545e8e23bd3b01800009b58c8a4d39283e70 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -97,9 +96,4 @@ default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
 default CONFIG_CONSOLE_VGA = 1
 default CONFIG_PCI_ROM_RUN = 1
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index f07733b73ff07ced639a697ba85d6b9e9eb372fc..3876018d5d2bcf89218b2b7ffa9ff861bbb558e6 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -97,7 +96,6 @@ default CONFIG_UDELAY_TSC = 1
 default CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2 = 1
 default CONFIG_CONSOLE_VGA = 1
 default CONFIG_PCI_ROM_RUN = 1
-default CONFIG_CBFS = 1
 default CONFIG_HAVE_HIGH_TABLES = 1
 default CONFIG_VIDEO_MB = 1
 end
index 8731625cc992106041f3901af92b00220909e349..9bd1b0a2b457d06ca9b48743d6b2be6e09276eae 100644 (file)
@@ -21,7 +21,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_USE_FAILOVER_IMAGE
@@ -320,9 +319,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 0dd1e2bf728e32ba1e60c891beea564e4361a489..0b762503fa37da7ef10862ab525fcce50dec4a0a 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_USE_FAILOVER_IMAGE
@@ -186,9 +185,4 @@ default CONFIG_DEFAULT_CONSOLE_LOGLEVEL = 9
 default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL = "MAINBOARD_POWER_ON"
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 03c4d3ef9dd51b2201f5528214323f05fc39dc1c..5e2b387ac4c2469317de046653ac3cdf469b2c3a 100644 (file)
@@ -23,7 +23,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_HAVE_ACPI_TABLES
 uses CONFIG_HAVE_ACPI_RESUME
@@ -327,9 +326,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index d22644f35e299f7c003b8b2e48096140c34ae1c4..055361cecaa1e05b4e5b882ca5f6c044d76f091f 100644 (file)
@@ -23,7 +23,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -307,9 +306,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 77562a1f9313286591f48c1445b97f054ef59e33..efe7ea4edc0f48497fd853dd7513410a866a2f5e 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -96,9 +95,4 @@ default CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2 = 1
 default CONFIG_CONSOLE_VGA = 1
 default CONFIG_PCI_ROM_RUN = 1
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index b7bbeff208eed19a17286f3dbd99d0f85f86debe..6e7ee7617ad160b6d5e7eb91881f9dd199f0b723 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -243,9 +242,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index d9867827d0c79ef6c7c01f2d0acb127ff46f1800..950126d0a3e066cb8c0b4a6a173d5f34d05022f9 100644 (file)
@@ -20,7 +20,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_HAVE_ACPI_TABLES
 uses CONFIG_HAVE_ACPI_RESUME
@@ -349,9 +348,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 1e7335d2b16f696a80a3f3af993a2da7701638f5..23468bd5c629c44d8f7766ea1087c1bec2cc126a 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -160,10 +159,4 @@ default  CONFIG_DEFAULT_CONSOLE_LOGLEVEL=8
 ## At a maximum only compile in this level of debugging
 default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 1e7335d2b16f696a80a3f3af993a2da7701638f5..23468bd5c629c44d8f7766ea1087c1bec2cc126a 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -160,10 +159,4 @@ default  CONFIG_DEFAULT_CONSOLE_LOGLEVEL=8
 ## At a maximum only compile in this level of debugging
 default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 85350a4b323dea9a7ff90b68301b81ecd8d1ec81..4f5e997e7767fd2aecc24c442b601e558949fdf2 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -198,10 +197,4 @@ default  CONFIG_DEFAULT_CONSOLE_LOGLEVEL=8
 ## At a maximum only compile in this level of debugging
 default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index e3c84d5f50c1e10bbcb98d675c7e6f5843602a44..f6ac50dd49c697cf5df5520087ef1da52178c3ee 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CC
-uses CONFIG_CBFS
 uses CONFIG_CONSOLE_SERIAL8250
 uses CONFIG_CONSOLE_VGA
 uses CONFIG_COMPRESSED_PAYLOAD_LZMA
@@ -96,9 +95,4 @@ default CONFIG_DEFAULT_CONSOLE_LOGLEVEL = 9
 default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
 default CONFIG_MAINBOARD_VENDOR = "RCA"
 default CONFIG_MAINBOARD_PART_NUMBER = "RM4100"
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 269d7aed982ce84b805ea57e7b0c5a1a4bb4c491..2e62bef4327d3573ce30210b6c8647916d45734b 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -96,5 +95,4 @@ default CONFIG_DEFAULT_CONSOLE_LOGLEVEL = 9
 default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
 default CONFIG_CONSOLE_VGA = 1
 default CONFIG_PCI_ROM_RUN = 1
-default CONFIG_CBFS=1
 end
index fc73ee0237ae63227abfcb3c11f664ed8eb52805..9acee56b75f34de7585f98c869e98ec5e62dbdfe 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -276,9 +275,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index afb735047a0f5ec13c78cd41fb6803f57b29af5e..42280cf7df0d1e411f2c92d3fb58b851e2e1b584 100644 (file)
@@ -20,7 +20,6 @@
 ## 
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_HAVE_ACPI_TABLES
 uses CONFIG_HAVE_ACPI_RESUME
@@ -351,9 +350,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=9
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index f862dbda9641b73d2c003ae27ac48d3ee2f2b255..c93393a871eb528c65d1ea3fc8a6c7197028151f 100644 (file)
@@ -20,7 +20,6 @@
 ## 
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_HAVE_ACPI_TABLES
 uses CONFIG_HAVE_ACPI_RESUME
@@ -348,11 +347,5 @@ default CONFIG_USE_FAILOVER_IMAGE=0
 default CONFIG_USE_FALLBACK_IMAGE=0
 default CONFIG_XIP_ROM_SIZE=CONFIG_FAILOVER_SIZE
 
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
-
 ### End Options.lb
 end
index 7fc17b7e52fcfe903b062c013db2571eaab5c642..5556cd3da48f79b0627ba6baba87bcb78cb5e987 100644 (file)
@@ -20,7 +20,6 @@
 ## 
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_HAVE_ACPI_TABLES
 uses CONFIG_HAVE_ACPI_RESUME
@@ -360,12 +359,5 @@ default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 default CONFIG_USE_FAILOVER_IMAGE=0
 default CONFIG_USE_FALLBACK_IMAGE=0
 default CONFIG_XIP_ROM_SIZE=CONFIG_FAILOVER_SIZE
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
-
 ### End Options.lb
 end
index 2ad1692ea5a0f86c4ed99c9ab953c135ba9ad308..35843e6e629230cc458ee271ea3fb5326377766f 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -228,10 +227,4 @@ default  CONFIG_CONSOLE_BTEXT=0
 
 
 ### End Options.lb
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index c9ca49507d7176ae90bd80409c70e2a92553ae27..8734f0e9df72b62bba28eddfa8585a5986060fa7 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -228,10 +227,4 @@ default  CONFIG_CONSOLE_BTEXT=0
 
 
 ### End Options.lb
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index c9ca49507d7176ae90bd80409c70e2a92553ae27..8734f0e9df72b62bba28eddfa8585a5986060fa7 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -228,10 +227,4 @@ default  CONFIG_CONSOLE_BTEXT=0
 
 
 ### End Options.lb
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 717f9df150671a6654ccc559dbe835d9a2b34c68..240b8c5bea1fa3662f7056b6638f003f57649ec6 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -228,9 +227,4 @@ default  CONFIG_CONSOLE_BTEXT=0
 
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 717f9df150671a6654ccc559dbe835d9a2b34c68..240b8c5bea1fa3662f7056b6638f003f57649ec6 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -228,9 +227,4 @@ default  CONFIG_CONSOLE_BTEXT=0
 
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index fef8a9f1b7e9c421568cc21c7f75a6c06a57afff..c496ad121cc19f604cdd60435ab5d8698aced6a2 100644 (file)
@@ -20,7 +20,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_HAVE_ACPI_TABLES
 uses CONFIG_HAVE_ACPI_RESUME
index c3f0c6e445d6d930bd084cc2f0fb5f61b6243761..d55ea949f5576b9019e049c2971e130aeaf7c431 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -135,10 +134,4 @@ default CONFIG_ROM_PAYLOAD     = 1
 ##
 default CC="$(CONFIG_CROSS_COMPILE)gcc -m32"
 default HOSTCC="gcc"
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 551c3e0a840e675cc78c7f204338b5fd3fb26fad..29a08f57846e0f759ce08201c117d762d4fa8d22 100644 (file)
@@ -35,9 +35,6 @@ static void irqdump()
    - set ADDDECTL (now done in raminit.c in cpu/amd/sc520
 */
 static void enable_dev(struct device *dev) {
-#if !CONFIG_CBFS
-       extern unsigned char *rom_start, *rom_end;
-#endif
        volatile struct mmcrpic *pic = MMCRPIC;
        volatile struct mmcr *mmcr = MMCRDEFAULT;
 
@@ -141,15 +138,7 @@ static void enable_dev(struct device *dev) {
        mmcr->dmacontrol.extchanmapa = 0xf210;
        mmcr->dmacontrol.extchanmapb = 0xffff;
 
-#if !CONFIG_CBFS
-       /* hack for IDIOTIC need to fix rom_start */
-       printk_err("Patching rom_start due to sc520 limits\n");
-       rom_start = 0x09400000 + 0xe0000;
-       rom_end = rom_start + CONFIG_PAYLOAD_SIZE - 1;
-#endif
-
        printk_err("TS5300 EXIT %s\n", __func__);
-       
 }
 
 struct chip_operations mainboard_ops = {
index 3c38d53e60cb98cd75bc56cdca947a4e170d7a0d..988f247d960eec7ff280d9a0808eb776cb2f0f98 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -103,10 +102,4 @@ default CONFIG_TTYS0_BASE = 0x3f8
 default CONFIG_TTYS0_LCS = 0x3         # 8n1
 default CONFIG_DEFAULT_CONSOLE_LOGLEVEL = 6
 default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 6
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 96ab879fdfc036ebb3dfe0a90edaf092af8b2181..349c7b5e827d66e73856cb91a7c4418a1348383f 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CC
-uses CONFIG_CBFS
 uses CONFIG_CONSOLE_SERIAL8250
 uses CONFIG_CONSOLE_VGA
 uses CONFIG_COMPRESSED_PAYLOAD_LZMA
@@ -96,9 +95,4 @@ default CONFIG_DEFAULT_CONSOLE_LOGLEVEL = 9
 default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
 default CONFIG_MAINBOARD_VENDOR = "THOMSON"
 default CONFIG_MAINBOARD_PART_NUMBER = "IP1000"
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 3e1990e6a624344a28bcd267775c7923b795a926..31ae0040fc718e20237fa54fb0d6d862d30cc475 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -97,10 +96,4 @@ default CONFIG_DEFAULT_CONSOLE_LOGLEVEL = 9
 default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
 default CONFIG_CONSOLE_VGA = 1
 default CONFIG_PCI_ROM_RUN = 1
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 609f266b8157c114b9b08d16f8b90175d1895a39..144a37223c4b6bb3e6eb1ef424fd77485b287bb0 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -256,9 +255,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index bd4433f7d38c75f19168299023fea7b145196a0a..9372378e21c487b46e4bac9b7daf2e9fcb2d24ac 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -244,9 +243,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 8d0357aadb1262fa49dc4ecaa930a255cd2cd33f..3d56bff67e07f8897a3a4cb03e4e7f684dd75973 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -245,9 +244,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 9006a447c23b978c037066b4052c0d114d8f135d..02596bf677ff426bcd1f0f8691727659d1eabfcc 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -244,9 +243,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 417e0075bc7ced9b9499c6ccf715578e9a3576b3..52b5d1693946afeb2397d0e6c03ee2e72617c071 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -261,9 +260,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 21bbf00b15b37e591032eabd71a8d149fdcd5c22..70193e1eba69de2ae3b2232d39b4b7d5315d7d98 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -244,9 +243,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 0b4d9a0980b4beffd2df8b36b7bb6975f47996ef..2e14f74fd08c1f99aebf2ee83a1446ecd3c47db1 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -271,9 +270,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 4b6c22672784b019a82a0f66b520c8c45a88076a..4be3ce14f8f4df8c5251b784964c510096a4e7b6 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -300,9 +299,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index c80e772e9d8569ae83802e2188058731361c0ce9..26f512eae1c74b54003eb42d5f893fa379e5f4f8 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -288,9 +287,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 7e4da22fa65a61a142ed37032f6d9973bcdc2c63..4c23fee1db3710209663b66a67813e4dcd8b834b 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -307,9 +306,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 640f147296d60ee55b26a92a8e0edbdb9675a1b6..cf9c88af5e6a10802a5f9d387d027c611827801c 100644 (file)
@@ -20,7 +20,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_HAVE_ACPI_TABLES
 uses CONFIG_HAVE_ACPI_RESUME
@@ -351,9 +350,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 62b6af985a0e231fc9c8f2e1e57d674d4d4321b5..2efb02af0117ed13f563c4d02b544fd54592e9f7 100644 (file)
@@ -20,7 +20,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_HAVE_ACPI_TABLES
 uses CONFIG_HAVE_ACPI_RESUME
@@ -360,9 +359,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index c9fa096385d4181cc853e6bff423e515b43767fe..22d462e9d9b375a1975333bb8fd18358acbaf798 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -253,9 +252,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index d76d2ec2089ffd3f42282402eed837330f064a74..c41b2e7ecfa336bc1b88354bd11bdf9736ca3433 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -252,9 +251,4 @@ default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL="MAINBOARD_POWER_ON"
 
 ### End Options.lb
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 1f2b70a90876d2970f9c03833b799a9e5c8b34b9..9e6fa4f3ccd63968fa0fdda9addeddb208b23a7b 100644 (file)
@@ -20,7 +20,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -103,11 +102,4 @@ default HOSTCC = "gcc"
 ## time when it can't find a device.
 ##
 default CONFIG_MAX_PCI_BUSES = 3
-
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index c019b22b0e690e0af764e9c8393284100f1cf8f8..1f6af3f5e7e8cd4adb0bdb7b8fe1ad368d018199 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -142,11 +141,4 @@ default CONFIG_MAX_PCI_BUSES = 5
 default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=8
 default  CONFIG_DEFAULT_CONSOLE_LOGLEVEL=8
 default  CONFIG_CONSOLE_SERIAL8250=1
-
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 7f0477f0fc7147c4d22037f7b33e6a7dfa05fbed..aeebe2a4016e075fcf57caa57822e07e6c6e791b 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_HAVE_MP_TABLE
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
 uses CONFIG_HAVE_FALLBACK_BOOT
@@ -137,7 +136,6 @@ default CC = "$(CONFIG_CROSS_COMPILE)gcc -m32"
 default HOSTCC = "gcc"
 default CONFIG_DEFAULT_CONSOLE_LOGLEVEL = 9
 default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
-default CONFIG_CBFS=1
 
 ##
 ## Set this to the max PCI bus number you would ever use for PCI config I/O.
index 21b751811e8aa8ea4605dc748425bf0b7818832e..de6e6f9f60ad91f34fea9ec812200696d9fa775c 100644 (file)
@@ -19,7 +19,6 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
-uses CONFIG_CBFS
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_HAVE_FAILOVER_BOOT
 uses CONFIG_USE_FAILOVER_IMAGE
@@ -120,11 +119,4 @@ default CONFIG_HAVE_MAINBOARD_RESOURCES = 1
 ## time when it can't find a device.
 ##
 default CONFIG_MAX_PCI_BUSES = 3
-
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 0d20674affb9c47eb7227eac9abea434bfde1d55..a0b60055a0582001c966963a5a559394c3822507 100644 (file)
@@ -1,5 +1,4 @@
 uses CONFIG_MAXIMUM_CONSOLE_LOGLEVEL
-uses CONFIG_CBFS
 uses CONFIG_DEFAULT_CONSOLE_LOGLEVEL
 uses CONFIG_CONSOLE_SERIAL8250
 uses CONFIG_TTYS0_BAUD
@@ -139,12 +138,4 @@ default CONFIG_ROM_PAYLOAD     = 1
 default CONFIG_CROSS_COMPILE=""
 default CC="$(CONFIG_CROSS_COMPILE)gcc -m32"
 default HOSTCC="gcc"
-
-
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index ce03e723be4ec99a3897fa6bb7288b44b8ab5c13..d870030dfeac800cff73e4355d698d9d1c02ab1d 100644 (file)
@@ -19,7 +19,6 @@
 ##
 
 uses CONFIG_SMP
-uses CONFIG_CBFS
 uses CONFIG_HAVE_MP_TABLE
 uses CONFIG_HAVE_PIRQ_TABLE
 uses CONFIG_USE_FALLBACK_IMAGE
@@ -111,11 +110,4 @@ default CONFIG_TTYS0_BASE = 0x3f8
 default CONFIG_TTYS0_LCS = 0x3
 default CONFIG_MAXIMUM_CONSOLE_LOGLEVEL = 9
 default CONFIG_DEFAULT_CONSOLE_LOGLEVEL = 9
-
-
-#
-# CBFS
-#
-#
-default CONFIG_CBFS=1
 end
index 8f6dbed15ee06eae0ad43c99555de69ea8c2b37a..d72f419a1c4755bcd2fc02c2e621dd6cf04ce5ba 100644 (file)
@@ -55,7 +55,6 @@ uses CONFIG_ROMBASE
 uses CONFIG_RAMBASE
 uses CONFIG_XIP_ROM_SIZE
 uses CONFIG_XIP_ROM_BASE
-uses CONFIG_CBFS
 
 # compiler specifics
 uses CONFIG_CROSS_COMPILE
@@ -242,11 +241,5 @@ default CONFIG_TTYS0_LCS=0x3
 default  CONFIG_DEFAULT_CONSOLE_LOGLEVEL=5
 ## At a maximum only compile in this level of debugging
 default  CONFIG_MAXIMUM_CONSOLE_LOGLEVEL=5
-
-#
-# CBFS
-# 
-default CONFIG_CBFS=1
-
 end
 
diff --git a/src/stream/Config.lb b/src/stream/Config.lb
deleted file mode 100644 (file)
index 89f8404..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-uses CONFIG_ROM_PAYLOAD
-uses CONFIG_IDE_PAYLOAD
-uses CONFIG_FS_PAYLOAD
-uses CONFIG_IDE
-uses CONFIG_SERIAL_PAYLOAD
-uses CONFIG_CBFS
-
-if CONFIG_CBFS
-else
-if CONFIG_ROM_PAYLOAD
-  object rom_stream.o
-end
-
-if CONFIG_IDE_PAYLOAD
-  default CONFIG_IDE=1
-  object ide_stream.o
-end
-
-if CONFIG_FS_PAYLOAD
-  object fs_stream.o
-  dir fs
-end
-
-if CONFIG_SERIAL_PAYLOAD
-  object serial_stream.o
-end
-end
diff --git a/src/stream/fs/Config.lb b/src/stream/fs/Config.lb
deleted file mode 100644 (file)
index 86d81f0..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-uses CONFIG_FS_EXT2
-uses CONFIG_FS_ISO9660
-uses CONFIG_FS_FAT
-
-object blockdev.o
-object vfs.o
-
-if CONFIG_FS_EXT2
-       object ext2fs.o
-end
-
-if CONFIG_FS_ISO9660
-       object iso9660.o
-end
-
-if CONFIG_FS_FAT
-       object fat.o
-end
diff --git a/src/stream/fs/blockdev.c b/src/stream/fs/blockdev.c
deleted file mode 100644 (file)
index aa818dd..0000000
+++ /dev/null
@@ -1,411 +0,0 @@
-#include <console/console.h>
-#include <fs/fs.h>
-#include <arch/io.h>
-#include <string.h>
-#include <delay.h>
-#include <pc80/ide.h>
-#include <arch/byteorder.h>
-
-#define NUM_CACHE 64
-static unsigned char buf_cache[NUM_CACHE][512];
-static unsigned long cache_sect[NUM_CACHE];
-
-static char dev_name[256];
-
-int dev_type = -1;
-int dev_drive = -1;
-unsigned long part_start;
-unsigned long part_length;
-int using_devsize;
-
-unsigned long long simple_strtoull(const char *cp,char **endp,unsigned int base)
-{
-       unsigned long long result = 0,value;
-
-       if (!base) {
-               base = 10;
-               if (*cp == '0') {
-                       base = 8;
-                       cp++;
-                       if ((*cp == 'x') && isxdigit(cp[1])) {
-                               cp++;
-                               base = 16;
-                       }
-               }
-       }
-       while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp)
-               ? toupper(*cp) : *cp)-'A'+10) < base) {
-               result = result*base + value;
-               cp++;
-       }
-       if (endp)
-               *endp = (char *)cp;
-       return result;
-}
-
-unsigned long long strtoull_with_suffix(const char *cp,char **endp,unsigned int base)
-{
-       unsigned long long result;
-
-       if (!endp) {
-               return 0;
-       }
-       result = simple_strtoull(cp, endp, base);
-       switch (toupper(**endp)) {
-       case 'K':
-               result <<= 10;
-               ++*endp;
-               break;
-       case 'M':
-               result <<= 20;
-               ++*endp;
-               break;
-       case 'G':
-               result <<= 30;
-               ++*endp;
-               break;
-       }
-       return result;
-}
-
-unsigned int get_le32(const unsigned char *p)
-{
-    return ((unsigned int) p[0] << 0)
-        | ((unsigned int) p[1] << 8)
-        | ((unsigned int) p[2] << 16)
-        | ((unsigned int) p[3] << 24);
-}
-
-static inline int has_pc_part_magic(unsigned char *sect)
-{
-    return sect[510]==0x55 && sect[511]==0xAA;
-}
-
-static inline int is_pc_extended_part(unsigned char type)
-{
-    return type==5 || type==0xf || type==0x85;
-}
-
-/* IBM-PC/MS-DOS style partitioning scheme */
-static int open_pc_partition(int part, unsigned long *start_p,
-       unsigned long *length_p)
-{
-    /* Layout of PC partition table */
-    struct pc_partition {
-       unsigned char boot;
-       unsigned char head;
-       unsigned char sector;
-       unsigned char cyl;
-       unsigned char type;
-       unsigned char e_head;
-       unsigned char e_sector;
-       unsigned char e_cyl;
-       unsigned char start_sect[4]; /* unaligned little endian */
-       unsigned char nr_sects[4]; /* ditto */
-    } *p;
-    unsigned char buf[512];
-
-    /* PC partition probe */
-    if (!devread(0, 0, sizeof buf, buf)) {
-       printk_debug("device read failed\n");
-       return 0;
-    }
-    if (!has_pc_part_magic(buf)) {
-       printk_debug("pc partition magic number not found\n");
-       //printk_debug_hexdump(buf, 512);
-       return PARTITION_UNKNOWN;
-    }
-    p = (struct pc_partition *) (buf + 0x1be);
-    if (part < 4) {
-       /* Primary partition */
-       p += part;
-       if (p->type==0 || is_pc_extended_part(p->type)) {
-           printk_info("Partition %d does not exist\n", part+1);
-           return 0;
-       }
-       *start_p = get_le32(p->start_sect);
-       *length_p = get_le32(p->nr_sects);
-       return 1;
-    } else {
-       /* Extended partition */
-       int i;
-       int cur_part;
-       unsigned long ext_start, cur_table;
-       /* Search for the extended partition
-        * which contains logical partitions */
-       for (i = 0; i < 4; i++) {
-           if (is_pc_extended_part(p[i].type))
-               break;
-       }
-       if (i >= 4) {
-           printk_info("Extended partition not found\n");
-           return 0;
-       }
-       printk_debug("Extended partition at %d\n", i+1);
-       /* Visit each logical partition labels */
-       ext_start = get_le32(p[i].start_sect);
-       cur_table = ext_start;
-       cur_part = 4;
-       for (;;) {
-           printk_debug("cur_part=%d at %lu\n", cur_part, cur_table);
-           if (!devread(cur_table, 0, sizeof buf, buf))
-               return 0;
-           if (!has_pc_part_magic(buf)) {
-               printk_debug("no magic\n");
-               break;
-           }
-
-           p = (struct pc_partition *) (buf + 0x1be);
-           /* First entry is the logical partition */
-           if (cur_part == part) {
-               if (p->type==0) {
-                   printk_info("Partition %d is empty\n", part+1);
-                   return 0;
-               }
-               *start_p = cur_table + get_le32(p->start_sect);
-               *length_p = get_le32(p->nr_sects);
-               return 1;
-           }
-           /* Second entry is link to next partition */
-           if (!is_pc_extended_part(p[1].type)) {
-               printk_debug("no link\n");
-               break;
-           }
-           cur_table = ext_start + get_le32(p[1].start_sect);
-
-           cur_part++;
-       }
-       printk_info("Logical partition %d not exist\n", part+1);
-       return 0;
-    }
-}
-
-static void flush_cache(void)
-{
-    int i;
-    for (i = 0; i < NUM_CACHE; i++)
-       cache_sect[i] = (unsigned long) -1;
-}
-
-static int parse_device_name(const char *name, int *type, int *drive,
-       int *part, uint64_t *offset, uint64_t *length)
-{
-    *offset = *length = 0;
-
-    if (memcmp(name, "hd", 2) == 0) {
-       *type = DISK_IDE;
-       name += 2;
-       if (*name < 'a' || *name > 'z') {
-           printk_info("Invalid drive\n");
-           return 0;
-       }
-       *drive = *name - 'a';
-       name++;
-    } else if (memcmp(name, "mem", 3) == 0) {
-       *type = DISK_MEM;
-       name += 3;
-       *drive = 0;
-    } else {
-       printk_info("Unknown device type\n");
-       return 0;
-    }
-
-    *part = (int) simple_strtoull(name, (char **)&name, 0);
-
-    if (*name == '@') {
-       name++;
-       *offset = strtoull_with_suffix(name, (char **)&name, 0);
-       if (*name == ',')
-           *length = strtoull_with_suffix(name+1, (char **)&name, 0);
-       printk_debug("offset=%#Lx length=%#Lx\n", *offset, *length);
-    }
-
-    if (*name != '\0') {
-       printk_info("Can't parse device name\n");
-       return 0;
-    }
-
-    return 1;
-}
-
-int devopen(const char *name, int *reopen)
-{
-    int type, drive, part, i;
-    uint64_t offset, length;
-    uint32_t disk_size = 0;
-
-    /* Don't re-open the device that's already open */
-    if (strcmp(name, dev_name) == 0) {
-       printk_debug("already open\n");
-       *reopen = 1;
-       return 1;
-    }
-    *reopen = 0;
-
-    if (!parse_device_name(name, &type, &drive, &part, &offset, &length)) {
-       printk_debug("failed to parse device name: %s\n", name);
-       return 0;
-    }
-
-    /* Do simple sanity check first */
-    if (offset & 0x1ff) {
-       printk_info("Device offset must be multiple of 512\n");
-       return 0;
-    }
-    if (length & 0x1ff) {
-       printk_info("WARNING: length is rounded up to multiple of 512\n");
-       length = (length + 0x1ff) & ~0x1ff;
-    }
-
-    switch (type) {
-    case DISK_IDE:
-       printk_debug ("Trying polled ide\n");
-       printk_debug ("Waiting for ide disks to spin up\n");
-       printk_notice ("This is a hard coded delay and longer than necessary.\n");
-       for (i = 0; i < 2; i++) {
-               printk_notice (".");
-               delay(1);
-       }
-       printk_info ("\n");
-
-       if (ide_probe(drive) != 0) {
-           printk_debug("failed to open ide\n");
-           return 0;
-       }
-       disk_size = (uint32_t) -1; /* FIXME */
-       break;
-    case DISK_MEM:
-       disk_size = 1 << (32 - 9); /* 4GB/512-byte */
-       break;
-    default:
-       printk_info("Unknown device type %d\n", type);
-       return 0;
-    }
-
-    if (dev_type != type || dev_drive != drive)
-       flush_cache();
-
-    /* start with whole disk */
-    dev_type = type;
-    dev_drive = drive;
-    part_start = 0;
-    part_length = disk_size;
-    using_devsize = 1;
-
-    if (part != 0) {
-       /* partition is specified */
-       int ret;
-       ret = open_pc_partition(part - 1, &part_start, &part_length);
-       if (ret == PARTITION_UNKNOWN) {
-           ret = open_eltorito_image(part - 1, &part_start, &part_length);
-           if (ret == PARTITION_UNKNOWN) {
-               printk_info("Unrecognized partitioning scheme\n");
-               return 0;
-           }
-       }
-       if (ret == 0) {
-           printk_debug("can't open partition %d\n", part);
-           return 0;
-       }
-
-       printk_debug("Partition %d start %lu length %lu\n", part,
-               part_start, part_length);
-    }
-
-    if (offset) {
-       if (offset >= (uint64_t) part_length << 9) {
-           printk_info("Device offset is too high\n");
-           return 0;
-       }
-       part_start += offset >> 9;
-       part_length -= offset >> 9;
-       printk_debug("after offset: start %lu, length %lu\n", part_start, part_length);
-    }
-
-    if (length) {
-       if (length > (uint64_t) part_length << 9) {
-           printk_info("Specified length exceeds the size of device\n");
-           return 0;
-       }
-       part_length = length >> 9;
-       printk_debug("after length: length %lu\n", part_length);
-       using_devsize = 0;
-    }
-
-    strncpy(dev_name, name, sizeof dev_name-1);
-
-    return 1;
-}
-
-/* Read a sector from opened device with simple/stupid buffer cache */
-static void *read_sector(unsigned long sector)
-{
-    unsigned int hash;
-    void *buf;
-
-    /* If reading memory, just return the memory as the buffer */
-    if (dev_type == DISK_MEM) {
-       unsigned long phys = sector << 9;
-       //printk_debug("mem: %#lx\n", phys);
-       return (void *)phys;
-    }
-
-    /* Search in the cache */
-    hash = sector % NUM_CACHE;
-    buf = buf_cache[hash];
-    if (cache_sect[hash] != sector) {
-       cache_sect[hash] = (unsigned long) -1;
-       switch (dev_type) {
-       case DISK_IDE:
-           if (ide_read(dev_drive, sector, buf) != 0)
-               goto readerr;
-           break;
-       default:
-           printk_info("read_sector: device not open\n");
-           return 0;
-       }
-       cache_sect[hash] = sector;
-    }
-    return buf;
-
-readerr:
-    printk_info("Disk read error dev=%d drive=%d sector=%lu\n",
-           dev_type, dev_drive, sector);
-    dev_name[0] = '\0'; /* force re-open the device next time */
-    return 0;
-}
-
-int devread(unsigned long sector, unsigned long byte_offset,
-       unsigned long byte_len, void *buf)
-{
-    char *sector_buffer;
-    char *dest = buf;
-    unsigned long len;
-
-    sector += byte_offset >> 9;
-    byte_offset &= 0x1ff;
-
-    if (sector + ((byte_len + 0x1ff) >> 9) > part_length) {
-       printk_info("Attempt to read out of device/partition\n");
-       printk_debug("sector=%lu part_length=%lu byte_len=%lu\n",
-               sector, part_length, byte_len);
-       return 0;
-    }
-
-    while (byte_len > 0) {
-       sector_buffer = read_sector(part_start + sector);
-       if (!sector_buffer) {
-           printk_debug("read sector failed\n");
-           return 0;
-       }
-       len = 512 - byte_offset;
-       if (len > byte_len)
-           len = byte_len;
-       memcpy(dest, sector_buffer + byte_offset, len);
-       sector++;
-       byte_offset = 0;
-       byte_len -= len;
-       dest += len;
-    }
-    return 1;
-}
diff --git a/src/stream/fs/ext2fs.c b/src/stream/fs/ext2fs.c
deleted file mode 100644 (file)
index 9cf0bc6..0000000
+++ /dev/null
@@ -1,793 +0,0 @@
-/*
- *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 1999, 2001  Free Software Foundation, Inc.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <console/console.h>
-#include <fs/fs.h>
-#include <string.h>
-#include <arch/byteorder.h>
-
-static int mapblock1, mapblock2;
-
-/* sizes are always in bytes, BLOCK values are always in DEV_BSIZE (sectors) */
-#define DEV_BSIZE 512
-
-/* include/linux/fs.h */
-#define BLOCK_SIZE 1024                /* initial block size for superblock read */
-/* made up, defaults to 1 but can be passed via mount_opts */
-#define WHICH_SUPER 1
-/* kind of from fs/ext2/super.c */
-#define SBLOCK (WHICH_SUPER * BLOCK_SIZE / DEV_BSIZE)  /* = 2 */
-
-/* include/asm-i386/types.h */
-typedef __signed__ char __s8;
-typedef unsigned char __u8;
-typedef __signed__ short __s16;
-typedef unsigned short __u16;
-typedef __signed__ int __s32;
-typedef unsigned int __u32;
-
-/*
- * Constants relative to the data blocks, from ext2_fs.h
- */
-#define EXT2_NDIR_BLOCKS                12
-#define EXT2_IND_BLOCK                  EXT2_NDIR_BLOCKS
-#define EXT2_DIND_BLOCK                 (EXT2_IND_BLOCK + 1)
-#define EXT2_TIND_BLOCK                 (EXT2_DIND_BLOCK + 1)
-#define EXT2_N_BLOCKS                   (EXT2_TIND_BLOCK + 1)
-
-/* include/linux/ext2_fs.h */
-struct ext2_super_block
-  {
-    __u32 s_inodes_count;      /* Inodes count */
-    __u32 s_blocks_count;      /* Blocks count */
-    __u32 s_r_blocks_count;    /* Reserved blocks count */
-    __u32 s_free_blocks_count; /* Free blocks count */
-    __u32 s_free_inodes_count; /* Free inodes count */
-    __u32 s_first_data_block;  /* First Data Block */
-    __u32 s_log_block_size;    /* Block size */
-    __s32 s_log_frag_size;     /* Fragment size */
-    __u32 s_blocks_per_group;  /* # Blocks per group */
-    __u32 s_frags_per_group;   /* # Fragments per group */
-    __u32 s_inodes_per_group;  /* # Inodes per group */
-    __u32 s_mtime;             /* Mount time */
-    __u32 s_wtime;             /* Write time */
-    __u16 s_mnt_count;         /* Mount count */
-    __s16 s_max_mnt_count;     /* Maximal mount count */
-    __u16 s_magic;             /* Magic signature */
-    __u16 s_state;             /* File system state */
-    __u16 s_errors;            /* Behaviour when detecting errors */
-    __u16 s_pad;
-    __u32 s_lastcheck;         /* time of last check */
-    __u32 s_checkinterval;     /* max. time between checks */
-    __u32 s_creator_os;                /* OS */
-    __u32 s_rev_level;         /* Revision level */
-    __u16 s_def_resuid;                /* Default uid for reserved blocks */
-    __u16 s_def_resgid;                /* Default gid for reserved blocks */
-    __u32 s_reserved[235];     /* Padding to the end of the block */
-  };
-
-struct ext2_group_desc
-  {
-    __u32 bg_block_bitmap;     /* Blocks bitmap block */
-    __u32 bg_inode_bitmap;     /* Inodes bitmap block */
-    __u32 bg_inode_table;      /* Inodes table block */
-    __u16 bg_free_blocks_count;        /* Free blocks count */
-    __u16 bg_free_inodes_count;        /* Free inodes count */
-    __u16 bg_used_dirs_count;  /* Directories count */
-    __u16 bg_pad;
-    __u32 bg_reserved[3];
-  };
-
-struct ext2_inode
-  {
-    __u16 i_mode;              /* File mode */
-    __u16 i_uid;               /* Owner Uid */
-    __u32 i_size;              /* 4: Size in bytes */
-    __u32 i_atime;             /* Access time */
-    __u32 i_ctime;             /* 12: Creation time */
-    __u32 i_mtime;             /* Modification time */
-    __u32 i_dtime;             /* 20: Deletion Time */
-    __u16 i_gid;               /* Group Id */
-    __u16 i_links_count;       /* 24: Links count */
-    __u32 i_blocks;            /* Blocks count */
-    __u32 i_flags;             /* 32: File flags */
-    union
-      {
-       struct
-         {
-           __u32 l_i_reserved1;
-         }
-       linux1;
-       struct
-         {
-           __u32 h_i_translator;
-         }
-       hurd1;
-       struct
-         {
-           __u32 m_i_reserved1;
-         }
-       masix1;
-      }
-    osd1;                      /* OS dependent 1 */
-    __u32 i_block[EXT2_N_BLOCKS];      /* 40: Pointers to blocks */
-    __u32 i_version;           /* File version (for NFS) */
-    __u32 i_file_acl;          /* File ACL */
-    __u32 i_dir_acl;           /* Directory ACL */
-    __u32 i_faddr;             /* Fragment address */
-    union
-      {
-       struct
-         {
-           __u8 l_i_frag;      /* Fragment number */
-           __u8 l_i_fsize;     /* Fragment size */
-           __u16 i_pad1;
-           __u32 l_i_reserved2[2];
-         }
-       linux2;
-       struct
-         {
-           __u8 h_i_frag;      /* Fragment number */
-           __u8 h_i_fsize;     /* Fragment size */
-           __u16 h_i_mode_high;
-           __u16 h_i_uid_high;
-           __u16 h_i_gid_high;
-           __u32 h_i_author;
-         }
-       hurd2;
-       struct
-         {
-           __u8 m_i_frag;      /* Fragment number */
-           __u8 m_i_fsize;     /* Fragment size */
-           __u16 m_pad1;
-           __u32 m_i_reserved2[2];
-         }
-       masix2;
-      }
-    osd2;                      /* OS dependent 2 */
-  };
-
-/* linux/limits.h */
-#define NAME_MAX         255   /* # chars in a file name */
-
-/* linux/posix_type.h */
-typedef long linux_off_t;
-
-/* linux/ext2fs.h */
-#define EXT2_NAME_LEN 255
-struct ext2_dir_entry
-  {
-    __u32 inode;               /* Inode number */
-    __u16 rec_len;             /* Directory entry length */
-    __u8 name_len;             /* Name length */
-    __u8 file_type;
-    char name[EXT2_NAME_LEN];  /* File name */
-  };
-
-/* linux/ext2fs.h */
-/*
- * EXT2_DIR_PAD defines the directory entries boundaries
- *
- * NOTE: It must be a multiple of 4
- */
-#define EXT2_DIR_PAD                    4
-#define EXT2_DIR_ROUND                  (EXT2_DIR_PAD - 1)
-#define EXT2_DIR_REC_LEN(name_len)      (((name_len) + 8 + EXT2_DIR_ROUND) & \
-                                         ~EXT2_DIR_ROUND)
-
-
-/* ext2/super.c */
-#define log2(n) ffz(~(n))
-
-#define EXT2_SUPER_MAGIC      0xEF53   /* include/linux/ext2_fs.h */
-#define EXT2_ROOT_INO              2   /* include/linux/ext2_fs.h */
-#define PATH_MAX                1024   /* include/linux/limits.h */
-#define MAX_LINK_COUNT             5   /* number of symbolic links to follow */
-
-/* made up, these are pointers into FSYS_BUF */
-/* read once, always stays there: */
-#define SUPERBLOCK \
-    ((struct ext2_super_block *)(FSYS_BUF))
-#define GROUP_DESC \
-    ((struct ext2_group_desc *) \
-     ((int)SUPERBLOCK + sizeof(struct ext2_super_block)))
-#define INODE \
-    ((struct ext2_inode *)((int)GROUP_DESC + EXT2_BLOCK_SIZE(SUPERBLOCK)))
-#define DATABLOCK1 \
-    ((int)((int)INODE + sizeof(struct ext2_inode)))
-#define DATABLOCK2 \
-    ((int)((int)DATABLOCK1 + EXT2_BLOCK_SIZE(SUPERBLOCK)))
-
-/* linux/ext2_fs.h */
-#define EXT2_ADDR_PER_BLOCK(s)          (EXT2_BLOCK_SIZE(s) / sizeof (__u32))
-#define EXT2_ADDR_PER_BLOCK_BITS(s)            (log2(EXT2_ADDR_PER_BLOCK(s)))
-
-/* linux/ext2_fs.h */
-#define EXT2_BLOCK_SIZE_BITS(s)        (le32_to_cpu((s)->s_log_block_size) + 10)
-/* kind of from ext2/super.c */
-#define EXT2_BLOCK_SIZE(s)     (1 << EXT2_BLOCK_SIZE_BITS(s))
-/* linux/ext2fs.h */
-#define EXT2_DESC_PER_BLOCK(s) \
-     (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_group_desc))
-/* linux/stat.h */
-#define S_IFMT  00170000
-#define S_IFLNK  0120000
-#define S_IFREG  0100000
-#define S_IFDIR  0040000
-#define S_ISLNK(m)     (((m) & S_IFMT) == S_IFLNK)
-#define S_ISREG(m)      (((m) & S_IFMT) == S_IFREG)
-#define S_ISDIR(m)      (((m) & S_IFMT) == S_IFDIR)
-
-/* include/asm-i386/bitops.h */
-/*
- * ffz = Find First Zero in word. Undefined if no zero exists,
- * so code should check against ~0UL first..
- */
-#ifdef __i386
-static __inline__ unsigned long
-ffz (unsigned long word)
-{
-  __asm__ ("bsfl %1,%0"
-:         "=r" (word)
-:         "r" (~word));
-  return word;
-}
-#else /* !PPC */
-static __inline__ unsigned long
- __ilog2(unsigned long x)
-{
-        unsigned long lz;
-        asm ("cntlzw %0,%1" : "=r" (lz) : "r" (x));
-        return 31 - lz;
-}
-static __inline__ unsigned long 
-ffz(unsigned long x)
-{
-        if ((x = ~x) == 0)
-                return 32;
-        return __ilog2(x & -x);
-}
-#endif
-
-/* check filesystem types and read superblock into memory buffer */
-int
-ext2fs_mount (void)
-{
-  int retval = 1;
-
-  if ((((current_drive & 0x80) || (current_slice != 0))
-       && (current_slice != PC_SLICE_TYPE_EXT2FS)
-       && (current_slice != PC_SLICE_TYPE_LINUX_RAID)
-       && (! IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_EXT2FS))
-       && (! IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_OTHER)))
-      || part_length < (SBLOCK + (sizeof (struct ext2_super_block) / DEV_BSIZE))
-      || !devread (SBLOCK, 0, sizeof (struct ext2_super_block),
-                  (char *) SUPERBLOCK)
-      || le16_to_cpu(SUPERBLOCK->s_magic) != EXT2_SUPER_MAGIC)
-      retval = 0;
-
-  return retval;
-}
-
-/* Takes a file system block number and reads it into BUFFER. */
-static int
-ext2_rdfsb (int fsblock, int buffer)
-{
-#ifdef E2DEBUG
-  printk_debug ("fsblock %d buffer %d\n", fsblock, buffer);
-#endif /* E2DEBUG */
-  return devread (fsblock * (EXT2_BLOCK_SIZE (SUPERBLOCK) / DEV_BSIZE), 0,
-                 EXT2_BLOCK_SIZE (SUPERBLOCK), (char *) buffer);
-}
-
-/* from
-  ext2/inode.c:ext2_bmap()
-*/
-/* Maps LOGICAL_BLOCK (the file offset divided by the blocksize) into
-   a physical block (the location in the file system) via an inode. */
-static int
-ext2fs_block_map (int logical_block)
-{
-
-#ifdef E2DEBUG
-  unsigned char *i;
-  for (i = (unsigned char *) INODE;
-       i < ((unsigned char *) INODE + sizeof (struct ext2_inode));
-       i++)
-    {
-      printk_debug ("%c", "0123456789abcdef"[*i >> 4]);
-      printk_debug ("%c", "0123456789abcdef"[*i % 16]);
-      if (!((i + 1 - (unsigned char *) INODE) % 16))
-       {
-         printk_debug ("\n");
-       }
-      else
-       {
-         printk_debug (" ");
-       }
-    }
-  printk_debug ("logical block %d\n", logical_block);
-#endif /* E2DEBUG */
-
-  /* if it is directly pointed to by the inode, return that physical addr */
-  if (logical_block < EXT2_NDIR_BLOCKS)
-    {
-#ifdef E2DEBUG
-      printk_debug ("returning %d\n", (unsigned char *) (le32_to_cpu(INODE->i_block[logical_block])));
-      printk_debug ("returning %d\n", le32_to_cpu(INODE->i_block[logical_block]));
-#endif /* E2DEBUG */
-      return le32_to_cpu(INODE->i_block[logical_block]);
-    }
-  /* else */
-  logical_block -= EXT2_NDIR_BLOCKS;
-  /* try the indirect block */
-  if (logical_block < EXT2_ADDR_PER_BLOCK (SUPERBLOCK))
-    {
-      if (mapblock1 != 1
-         && !ext2_rdfsb (le32_to_cpu(INODE->i_block[EXT2_IND_BLOCK]), DATABLOCK1))
-       {
-         errnum = ERR_FSYS_CORRUPT;
-         return -1;
-       }
-      mapblock1 = 1;
-      return le32_to_cpu(((__u32 *) DATABLOCK1)[logical_block]);
-    }
-  /* else */
-  logical_block -= EXT2_ADDR_PER_BLOCK (SUPERBLOCK);
-  /* now try the double indirect block */
-  if (logical_block < (1 << (EXT2_ADDR_PER_BLOCK_BITS (SUPERBLOCK) * 2)))
-    {
-      int bnum;
-      if (mapblock1 != 2
-         && !ext2_rdfsb (le32_to_cpu(INODE->i_block[EXT2_DIND_BLOCK]), DATABLOCK1))
-       {
-         errnum = ERR_FSYS_CORRUPT;
-         return -1;
-       }
-      mapblock1 = 2;
-      if ((bnum = le32_to_cpu(((__u32 *) DATABLOCK1)
-                  [logical_block >> EXT2_ADDR_PER_BLOCK_BITS (SUPERBLOCK)]))
-         != mapblock2
-         && !ext2_rdfsb (bnum, DATABLOCK2))
-       {
-         errnum = ERR_FSYS_CORRUPT;
-         return -1;
-       }
-      mapblock2 = bnum;
-      return le32_to_cpu(((__u32 *) DATABLOCK2)
-       [logical_block & (EXT2_ADDR_PER_BLOCK (SUPERBLOCK) - 1)]);
-    }
-  /* else */
-  mapblock2 = -1;
-  logical_block -= (1 << (EXT2_ADDR_PER_BLOCK_BITS (SUPERBLOCK) * 2));
-  if (mapblock1 != 3
-      && !ext2_rdfsb (le32_to_cpu(INODE->i_block[EXT2_TIND_BLOCK]), DATABLOCK1))
-    {
-      errnum = ERR_FSYS_CORRUPT;
-      return -1;
-    }
-  mapblock1 = 3;
-  if (!ext2_rdfsb (le32_to_cpu(((__u32 *) DATABLOCK1)
-                  [logical_block >> (EXT2_ADDR_PER_BLOCK_BITS (SUPERBLOCK)
-                                     * 2)]),
-                  DATABLOCK2))
-    {
-      errnum = ERR_FSYS_CORRUPT;
-      return -1;
-    }
-  if (!ext2_rdfsb (le32_to_cpu(((__u32 *) DATABLOCK2)
-                  [(logical_block >> EXT2_ADDR_PER_BLOCK_BITS (SUPERBLOCK))
-                   & (EXT2_ADDR_PER_BLOCK (SUPERBLOCK) - 1)]),
-                  DATABLOCK2))
-    {
-      errnum = ERR_FSYS_CORRUPT;
-      return -1;
-    }
-  return le32_to_cpu(((__u32 *) DATABLOCK2)
-    [logical_block & (EXT2_ADDR_PER_BLOCK (SUPERBLOCK) - 1)]);
-}
-
-/* preconditions: all preconds of ext2fs_block_map */
-int
-ext2fs_read (char *buf, int len)
-{
-  int logical_block;
-  int offset;
-  int map;
-  int ret = 0;
-  int size = 0;
-
-#ifdef E2DEBUG
-  static char hexdigit[] = "0123456789abcdef";
-  unsigned char *i;
-  for (i = (unsigned char *) INODE;
-       i < ((unsigned char *) INODE + sizeof (struct ext2_inode));
-       i++)
-    {
-      printk_debug ("%c", hexdigit[*i >> 4]);
-      printk_debug ("%c", hexdigit[*i % 16]);
-      if (!((i + 1 - (unsigned char *) INODE) % 16))
-       {
-         printk_debug ("\n");
-       }
-      else
-       {
-         printk_debug (" ");
-       }
-    }
-#endif /* E2DEBUG */
-  while (len > 0)
-    {
-      /* find the (logical) block component of our location */
-      logical_block = filepos >> EXT2_BLOCK_SIZE_BITS (SUPERBLOCK);
-      offset = filepos & (EXT2_BLOCK_SIZE (SUPERBLOCK) - 1);
-      map = ext2fs_block_map (logical_block);
-#ifdef E2DEBUG
-      printk_debug ("map=%d\n", map);
-#endif /* E2DEBUG */
-      if (map < 0)
-       break;
-
-      size = EXT2_BLOCK_SIZE (SUPERBLOCK);
-      size -= offset;
-      if (size > len)
-       size = len;
-
-      disk_read_func = disk_read_hook;
-
-      devread (map * (EXT2_BLOCK_SIZE (SUPERBLOCK) / DEV_BSIZE),
-              offset, size, buf);
-
-      disk_read_func = 0;
-
-      buf += size;
-      len -= size;
-      filepos += size;
-      ret += size;
-    }
-
-  if (errnum)
-    ret = 0;
-
-  return ret;
-}
-
-
-/* Based on:
-   def_blk_fops points to
-   blkdev_open, which calls (I think):
-   sys_open()
-   do_open()
-   open_namei()
-   dir_namei() which accesses current->fs->root
-     fs->root was set during original mount:
-     (something)... which calls (I think):
-     ext2_read_super()
-     iget()
-     __iget()
-     read_inode()
-     ext2_read_inode()
-       uses desc_per_block_bits, which is set in ext2_read_super()
-       also uses group descriptors loaded during ext2_read_super()
-   lookup()
-   ext2_lookup()
-   ext2_find_entry()
-   ext2_getblk()
-
-*/
-
-/* preconditions: ext2fs_mount already executed, therefore supblk in buffer
- *   known as SUPERBLOCK
- * returns: 0 if error, nonzero iff we were able to find the file successfully
- * postconditions: on a nonzero return, buffer known as INODE contains the
- *   inode of the file we were trying to look up
- * side effects: messes up GROUP_DESC buffer area
- */
-int
-ext2fs_dir (char *dirname)
-{
-  int current_ino = EXT2_ROOT_INO;     /* start at the root */
-  int updir_ino = current_ino; /* the parent of the current directory */
-  int group_id;                        /* which group the inode is in */
-  int group_desc;              /* fs pointer to that group */
-  int desc;                    /* index within that group */
-  int ino_blk;                 /* fs pointer of the inode's information */
-  int str_chk = 0;             /* used to hold the results of a string compare */
-  struct ext2_group_desc *gdp;
-  struct ext2_inode *raw_inode;        /* inode info corresponding to current_ino */
-
-  char linkbuf[PATH_MAX];      /* buffer for following symbolic links */
-  int link_count = 0;
-
-  char *rest;
-  char ch;                     /* temp char holder */
-
-  int off;                     /* offset within block of directory entry (off mod blocksize) */
-  int loc;                     /* location within a directory */
-  int blk;                     /* which data blk within dir entry (off div blocksize) */
-  long map;                    /* fs pointer of a particular block from dir entry */
-  struct ext2_dir_entry *dp;   /* pointer to directory entry */
-#ifdef E2DEBUG
-  unsigned char *i;
-#endif /* E2DEBUG */
-
-  /* loop invariants:
-     current_ino = inode to lookup
-     dirname = pointer to filename component we are cur looking up within
-     the directory known pointed to by current_ino (if any)
-   */
-
-  while (1)
-    {
-#ifdef E2DEBUG
-      printk_debug ("inode %d\n", current_ino);
-      printk_debug ("dirname=%s\n", dirname);
-#endif /* E2DEBUG */
-
-      /* look up an inode */
-      group_id = (current_ino - 1) / le32_to_cpu(SUPERBLOCK->s_inodes_per_group);
-      group_desc = group_id >> log2 (EXT2_DESC_PER_BLOCK (SUPERBLOCK));
-      desc = group_id & (EXT2_DESC_PER_BLOCK (SUPERBLOCK) - 1);
-#ifdef E2DEBUG
-      printk_debug ("ipg=%d, dpb=%d\n", le32_to_cpu(SUPERBLOCK->s_inodes_per_group),
-             EXT2_DESC_PER_BLOCK (SUPERBLOCK));
-      printk_debug ("group_id=%d group_desc=%d desc=%d\n", group_id, group_desc, desc);
-#endif /* E2DEBUG */
-      if (!ext2_rdfsb (
-                       (WHICH_SUPER + group_desc + le32_to_cpu(SUPERBLOCK->s_first_data_block)),
-                       (int) GROUP_DESC))
-       {
-         return 0;
-       }
-      gdp = GROUP_DESC;
-      ino_blk = le32_to_cpu(gdp[desc].bg_inode_table) +
-       (((current_ino - 1) % le32_to_cpu(SUPERBLOCK->s_inodes_per_group))
-        >> log2 (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode)));
-#ifdef E2DEBUG
-      printk_debug ("inode table fsblock=%d\n", ino_blk);
-#endif /* E2DEBUG */
-      if (!ext2_rdfsb (ino_blk, (int) INODE))
-       {
-         return 0;
-       }
-
-      /* reset indirect blocks! */
-      mapblock2 = mapblock1 = -1;
-
-      raw_inode = INODE +
-       ((current_ino - 1)
-        & (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode) - 1));
-#ifdef E2DEBUG
-      printk_debug ("ipb=%d, sizeof(inode)=%d\n",
-             (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode)),
-             sizeof (struct ext2_inode));
-      printk_debug ("inode=%x, raw_inode=%x\n", INODE, raw_inode);
-      printk_debug ("offset into inode table block=%d\n", (int) raw_inode - (int) INODE);
-      for (i = (unsigned char *) INODE; i <= (unsigned char *) raw_inode;
-          i++)
-       {
-         printk_debug ("%c", "0123456789abcdef"[*i >> 4]);
-         printk_debug ("%c", "0123456789abcdef"[*i % 16]);
-         if (!((i + 1 - (unsigned char *) INODE) % 16))
-           {
-             printk_debug ("\n");
-           }
-         else
-           {
-             printk_debug (" ");
-           }
-       }
-      printk_debug ("first word=%x\n", *((int *) raw_inode));
-#endif /* E2DEBUG */
-
-      /* copy inode to fixed location */
-      memmove ((void *) INODE, (void *) raw_inode, sizeof (struct ext2_inode));
-
-#ifdef E2DEBUG
-      printk_debug ("first word=%x\n", *((int *) INODE));
-#endif /* E2DEBUG */
-
-      /* If we've got a symbolic link, then chase it. */
-      if (S_ISLNK (le16_to_cpu(INODE->i_mode)))
-       {
-         int len;
-         if (++link_count > MAX_LINK_COUNT)
-           {
-             errnum = ERR_SYMLINK_LOOP;
-             return 0;
-           }
-
-         /* Find out how long our remaining name is. */
-         len = 0;
-         while (dirname[len] && !isspace (dirname[len]))
-           len++;
-
-         /* Get the symlink size. */
-         filemax = le32_to_cpu(INODE->i_size);
-         if (filemax + len > sizeof (linkbuf) - 2)
-           {
-             errnum = ERR_FILELENGTH;
-             return 0;
-           }
-
-         if (len)
-           {
-             /* Copy the remaining name to the end of the symlink data.
-                Note that DIRNAME and LINKBUF may overlap! */
-             memmove (linkbuf + filemax, dirname, len);
-           }
-         linkbuf[filemax + len] = '\0';
-
-         /* Read the symlink data. */
-         if (le32_to_cpu(INODE->i_blocks))
-           {
-             /* Read the necessary blocks, and reset the file pointer. */
-             len = file_read (linkbuf, filemax);
-             filepos = 0;
-             if (!len)
-               return 0;
-           }
-         else
-           {
-             /* Copy the data directly from the inode. */
-             len = filemax;
-             memmove (linkbuf, (char *) INODE->i_block, len);
-           }
-
-#ifdef E2DEBUG
-         printk_debug ("symlink=%s\n", linkbuf);
-#endif
-
-         dirname = linkbuf;
-         if (*dirname == '/')
-           {
-             /* It's an absolute link, so look it up in root. */
-             current_ino = EXT2_ROOT_INO;
-             updir_ino = current_ino;
-           }
-         else
-           {
-             /* Relative, so look it up in our parent directory. */
-             current_ino = updir_ino;
-           }
-
-         /* Try again using the new name. */
-         continue;
-       }
-
-      /* if end of filename, INODE points to the file's inode */
-      if (!*dirname || isspace (*dirname))
-       {
-         if (!S_ISREG (le16_to_cpu(INODE->i_mode)))
-           {
-             errnum = ERR_BAD_FILETYPE;
-             return 0;
-           }
-
-         filemax = le32_to_cpu(INODE->i_size);
-         return 1;
-       }
-
-      /* else we have to traverse a directory */
-      updir_ino = current_ino;
-
-      /* skip over slashes */
-      while (*dirname == '/')
-       dirname++;
-
-      /* if this isn't a directory of sufficient size to hold our file, abort */
-      if (!(le32_to_cpu(INODE->i_size)) || !S_ISDIR (le16_to_cpu(INODE->i_mode)))
-       {
-         errnum = ERR_BAD_FILETYPE;
-         return 0;
-       }
-
-      /* skip to next slash or end of filename (space) */
-      for (rest = dirname; (ch = *rest) && !isspace (ch) && ch != '/';
-          rest++);
-
-      /* look through this directory and find the next filename component */
-      /* invariant: rest points to slash after the next filename component */
-      *rest = 0;
-      loc = 0;
-
-      do
-       {
-
-#ifdef E2DEBUG
-         printk_debug ("dirname=%s, rest=%s, loc=%d\n", dirname, rest, loc);
-#endif /* E2DEBUG */
-
-         /* if our location/byte offset into the directory exceeds the size,
-            give up */
-         if (loc >= le32_to_cpu(INODE->i_size))
-           {
-             if (print_possibilities < 0)
-               {
-# if 0
-                 putchar ('\n');
-# endif
-               }
-             else
-               {
-                 errnum = ERR_FILE_NOT_FOUND;
-                 *rest = ch;
-               }
-             return (print_possibilities < 0);
-           }
-
-         /* else, find the (logical) block component of our location */
-         blk = loc >> EXT2_BLOCK_SIZE_BITS (SUPERBLOCK);
-
-         /* we know which logical block of the directory entry we are looking
-            for, now we have to translate that to the physical (fs) block on
-            the disk */
-         map = ext2fs_block_map (blk);
-#ifdef E2DEBUG
-         printk_debug ("fs block=%d\n", map);
-#endif /* E2DEBUG */
-         mapblock2 = -1;
-         if ((map < 0) || !ext2_rdfsb (map, DATABLOCK2))
-           {
-             errnum = ERR_FSYS_CORRUPT;
-             *rest = ch;
-             return 0;
-           }
-         off = loc & (EXT2_BLOCK_SIZE (SUPERBLOCK) - 1);
-         dp = (struct ext2_dir_entry *) (DATABLOCK2 + off);
-         /* advance loc prematurely to next on-disk directory entry  */
-         loc += le16_to_cpu(dp->rec_len);
-
-         /* NOTE: ext2fs filenames are NOT null-terminated */
-
-#ifdef E2DEBUG
-         printk_debug ("directory entry ino=%d\n", le32_to_cpu(dp->inode));
-         if (le32_to_cpu(dp->inode))
-           printk_debug ("entry=%s\n", dp->name);
-#endif /* E2DEBUG */
-
-         if (le32_to_cpu(dp->inode))
-           {
-             int saved_c = dp->name[dp->name_len];
-
-             dp->name[dp->name_len] = 0;
-             str_chk = substring (dirname, dp->name);
-
-# ifndef STAGE1_5
-             if (print_possibilities && ch != '/'
-                 && (!*dirname || str_chk <= 0))
-               {
-                 if (print_possibilities > 0)
-                   print_possibilities = -print_possibilities;
-                 print_a_completion (dp->name);
-               }
-# endif
-
-             dp->name[dp->name_len] = saved_c;
-           }
-
-       }
-      while (!le32_to_cpu(dp->inode) || (str_chk || (print_possibilities && ch != '/')));
-
-      current_ino = le32_to_cpu(dp->inode);
-      *(dirname = rest) = ch;
-    }
-  /* never get here */
-}
diff --git a/src/stream/fs/fat.c b/src/stream/fs/fat.c
deleted file mode 100644 (file)
index 01e4e03..0000000
+++ /dev/null
@@ -1,516 +0,0 @@
-/*
- *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2000, 2001   Free Software Foundation, Inc.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <console/console.h>
-#include <string.h>
-#include <fs/fs.h>
-#include <fs/fat.h>
-#include <arch/byteorder.h>
-
-struct fat_superblock 
-{
-  int fat_offset;
-  int fat_length;
-  int fat_size;
-  int root_offset;
-  int root_max;
-  int data_offset;
-  
-  int num_sectors;
-  int num_clust;
-  int clust_eof_marker;
-  int sects_per_clust;
-  int sectsize_bits;
-  int clustsize_bits;
-  int root_cluster;
-  
-  int cached_fat;
-  int file_cluster;
-  int current_cluster_num;
-  int current_cluster;
-};
-
-/* pointer(s) into filesystem info buffer for DOS stuff */
-#define FAT_SUPER ( (struct fat_superblock *) \
-                   ( FSYS_BUF + 32256) )/* 512 bytes long */
-#define FAT_BUF   ( FSYS_BUF + 30208 ) /* 4 sector FAT buffer */
-#define NAME_BUF  ( FSYS_BUF + 29184 ) /* Filename buffer (833 bytes) */
-
-#define FAT_CACHE_SIZE 2048
-
-#ifdef __i386
-static __inline__ unsigned long
-log2 (unsigned long word)
-{
-  __asm__ ("bsfl %1,%0"
-          : "=r" (word)
-          : "r" (word));
-  return word;
-}
-#else /* !PPC */
-static __inline__ unsigned long
-__ilog2(unsigned long x) 
-{
-        unsigned long lz;
-
-        asm ("cntlzw %0,%1" : "=r" (lz) : "r" (x));
-        return 31 - lz;
-}
-static __inline__ unsigned long
-log2(unsigned long x)
-{
-        return __ilog2(x & -x);
-}
-#endif
-
-int
-fat_mount (void)
-{
-  struct fat_bpb bpb;
-  __u32 magic, first_fat;
-  
-  /* Check partition type for harddisk */
-  if (((current_drive & 0x80) || (current_slice != 0))
-      && ! IS_PC_SLICE_TYPE_FAT (current_slice)
-      && (! IS_PC_SLICE_TYPE_BSD_WITH_FS (current_slice, FS_MSDOS)))
-    return 0;
-  
-  /* Read bpb */
-  if (! devread (0, 0, sizeof (bpb), (char *) &bpb))
-    return 0;
-
-  /* Check if the number of sectors per cluster is zero here, to avoid
-     zero division.  */
-  if (bpb.sects_per_clust == 0)
-    return 0;
-
-  FAT_SUPER->sectsize_bits = log2(FAT_CVT_U16(bpb.bytes_per_sect));
-  FAT_SUPER->clustsize_bits
-    = FAT_SUPER->sectsize_bits + log2(bpb.sects_per_clust);
-
-printk_debug("BytsPerSec = %d\n", FAT_CVT_U16(bpb.bytes_per_sect));
-printk_debug("SecPerClus = %d\n", bpb.sects_per_clust);
-  
-  /* Fill in info about super block */
-  FAT_SUPER->num_sectors = FAT_CVT_U16(bpb.short_sectors)
-    ? FAT_CVT_U16(bpb.short_sectors) : FAT_CVT_U32(bpb.long_sectors);
-
-printk_debug("TotSec16 = %d\n", FAT_CVT_U16(bpb.short_sectors));
-printk_debug("TotSec32 = %d\n", FAT_CVT_U32(bpb.long_sectors));
-  
-  /* FAT offset and length */
-  FAT_SUPER->fat_offset = FAT_CVT_U16(bpb.reserved_sects);
-  FAT_SUPER->fat_length = FAT_CVT_U16(bpb.fat_length) 
-    ? FAT_CVT_U16(bpb.fat_length) : FAT_CVT_U32(bpb.fat32_length);
-
-printk_debug("RsvdSecCnt = %d\n", FAT_CVT_U16(bpb.reserved_sects));
-printk_debug("FATSx16 = %d\n", FAT_CVT_U16(bpb.fat_length));
-printk_debug("FATSx32 = %d\n", FAT_CVT_U32(bpb.fat32_length));
-  
-  /* Rootdir offset and length for FAT12/16 */
-  FAT_SUPER->root_offset = 
-    FAT_SUPER->fat_offset + bpb.num_fats * FAT_SUPER->fat_length;
-  FAT_SUPER->root_max = FAT_DIRENTRY_LENGTH * FAT_CVT_U16(bpb.dir_entries);
-
-printk_debug("RootEntCnt = %d\n", FAT_CVT_U16(bpb.dir_entries));
-  
-  /* Data offset and number of clusters */
-  FAT_SUPER->data_offset = 
-    FAT_SUPER->root_offset
-    + ((FAT_SUPER->root_max - 1) >> FAT_SUPER->sectsize_bits) + 1;
-  FAT_SUPER->num_clust = 
-    2 + ((FAT_SUPER->num_sectors - FAT_SUPER->data_offset) 
-        / bpb.sects_per_clust);
-  FAT_SUPER->sects_per_clust = bpb.sects_per_clust;
-
-  if (!bpb.fat_length)
-    {
-      /* This is a FAT32 */
-      if (FAT_CVT_U16(bpb.dir_entries))
-       return 0;
-      
-printk_debug("We seem to be FAT32\n");
-printk_debug("ExtFlags = 0x%x\n", FAT_CVT_U16(bpb.flags));
-printk_debug("RootClus = %d\n", FAT_CVT_U32(bpb.root_cluster));
-      if (FAT_CVT_U16(bpb.flags) & 0x0080)
-       {
-         /* FAT mirroring is disabled, get active FAT */
-         int active_fat = FAT_CVT_U16(bpb.flags) & 0x000f;
-         if (active_fat >= bpb.num_fats)
-           return 0;
-         FAT_SUPER->fat_offset += active_fat * FAT_SUPER->fat_length;
-       }
-      
-      FAT_SUPER->fat_size = 8;
-      FAT_SUPER->root_cluster = FAT_CVT_U32(bpb.root_cluster);
-
-      /* Yes the following is correct.  FAT32 should be called FAT28 :) */
-      FAT_SUPER->clust_eof_marker = 0xffffff8;
-    } 
-  else 
-    {
-      if (!FAT_SUPER->root_max)
-       return 0;
-      
-printk_debug("We seem to be FAT12/16\n");
-      FAT_SUPER->root_cluster = -1;
-      if (FAT_SUPER->num_clust > FAT_MAX_12BIT_CLUST) 
-       {
-         FAT_SUPER->fat_size = 4;
-         FAT_SUPER->clust_eof_marker = 0xfff8;
-       } 
-      else
-       {
-         FAT_SUPER->fat_size = 3;
-         FAT_SUPER->clust_eof_marker = 0xff8;
-       }
-    }
-  
-  /* Now do some sanity checks */
-  
-  if (FAT_CVT_U16(bpb.bytes_per_sect) != (1 << FAT_SUPER->sectsize_bits)
-      || FAT_CVT_U16(bpb.bytes_per_sect) != SECTOR_SIZE
-      || bpb.sects_per_clust != (1 << (FAT_SUPER->clustsize_bits
-                                      - FAT_SUPER->sectsize_bits))
-      || FAT_SUPER->num_clust <= 2
-      || (FAT_SUPER->fat_size * FAT_SUPER->num_clust / (2 * SECTOR_SIZE)
-         > FAT_SUPER->fat_length))
-    return 0;
-  
-  /* kbs: Media check on first FAT entry [ported from PUPA] */
-
-  if (!devread(FAT_SUPER->fat_offset, 0,
-               sizeof(first_fat), (char *)&first_fat))
-    return 0;
-
-printk_debug("Media = 0x%x\n", bpb.media);
-
-  if (FAT_SUPER->fat_size == 8)
-    {
-      first_fat = le32_to_cpu(first_fat) & 0x0fffffff;
-      magic = 0x0fffff00;
-    }
-  else if (FAT_SUPER->fat_size == 4)
-    {
-      first_fat = le32_to_cpu(first_fat) & 0x0000ffff;
-      magic = 0xff00;
-    }
-  else
-    {
-      first_fat = le32_to_cpu(first_fat) & 0x00000fff;
-      magic = 0x0f00;
-    }
-
-  if (first_fat != (magic | bpb.media))
-    return 0;
-
-  FAT_SUPER->cached_fat = - 2 * FAT_CACHE_SIZE;
-  return 1;
-}
-
-int
-fat_read (char *buf, int len)
-{
-  int logical_clust;
-  int offset;
-  int ret = 0;
-  int size;
-  
-  if (FAT_SUPER->file_cluster < 0)
-    {
-      /* root directory for fat16 */
-      size = FAT_SUPER->root_max - filepos;
-      if (size > len)
-       size = len;
-      if (!devread(FAT_SUPER->root_offset, filepos, size, buf))
-       return 0;
-      filepos += size;
-      return size;
-    }
-  
-  logical_clust = filepos >> FAT_SUPER->clustsize_bits;
-  offset = (filepos & ((1 << FAT_SUPER->clustsize_bits) - 1));
-  if (logical_clust < FAT_SUPER->current_cluster_num)
-    {
-      FAT_SUPER->current_cluster_num = 0;
-      FAT_SUPER->current_cluster = FAT_SUPER->file_cluster;
-    }
-  
-  while (len > 0)
-    {
-      int sector;
-      while (logical_clust > FAT_SUPER->current_cluster_num)
-       {
-         /* calculate next cluster */
-         int fat_entry = 
-           FAT_SUPER->current_cluster * FAT_SUPER->fat_size;
-         int next_cluster;
-         int cached_pos = (fat_entry - FAT_SUPER->cached_fat);
-         
-         if (cached_pos < 0 || 
-             (cached_pos + FAT_SUPER->fat_size) > 2*FAT_CACHE_SIZE)
-           {
-             FAT_SUPER->cached_fat = (fat_entry & ~(2*SECTOR_SIZE - 1));
-             cached_pos = (fat_entry - FAT_SUPER->cached_fat);
-             sector = FAT_SUPER->fat_offset
-               + FAT_SUPER->cached_fat / (2*SECTOR_SIZE);
-             if (!devread (sector, 0, FAT_CACHE_SIZE, (char*) FAT_BUF))
-               return 0;
-           }
-         next_cluster = FAT_CVT_U32(FAT_BUF + (cached_pos >> 1));
-         if (FAT_SUPER->fat_size == 3)
-           {
-             if (cached_pos & 1)
-               next_cluster >>= 4;
-             next_cluster &= 0xFFF;
-           }
-         else if (FAT_SUPER->fat_size == 4)
-           next_cluster &= 0xFFFF;
-         
-         if (next_cluster >= FAT_SUPER->clust_eof_marker)
-           return ret;
-         if (next_cluster < 2 || next_cluster >= FAT_SUPER->num_clust)
-           {
-             errnum = ERR_FSYS_CORRUPT;
-             return 0;
-           }
-         
-         FAT_SUPER->current_cluster = next_cluster;
-         FAT_SUPER->current_cluster_num++;
-       }
-      
-      sector = FAT_SUPER->data_offset +
-       ((FAT_SUPER->current_cluster - 2) << (FAT_SUPER->clustsize_bits
-                                             - FAT_SUPER->sectsize_bits));
-      size = (1 << FAT_SUPER->clustsize_bits) - offset;
-      if (size > len)
-       size = len;
-      
-      disk_read_func = disk_read_hook;
-      
-      devread(sector, offset, size, buf);
-      
-      disk_read_func = 0;
-      
-      len -= size;
-      buf += size;
-      ret += size;
-      filepos += size;
-      logical_clust++;
-      offset = 0;
-    }
-  return errnum ? 0 : ret;
-}
-
-int
-fat_dir (char *dirname)
-{
-  char *rest, ch, dir_buf[FAT_DIRENTRY_LENGTH];
-  char *filename = (char *) NAME_BUF;
-  int attrib = FAT_ATTRIB_DIR;
-#ifndef STAGE1_5
-  int do_possibilities = 0;
-#endif
-  
-  /* XXX I18N:
-   * the positions 2,4,6 etc are high bytes of a 16 bit unicode char 
-   */
-  static unsigned char longdir_pos[] = 
-  { 1, 3, 5, 7, 9, 14, 16, 18, 20, 22, 24, 28, 30 };
-  int slot = -2;
-  int alias_checksum = -1;
-
-  FAT_SUPER->file_cluster = FAT_SUPER->root_cluster;
-  filepos = 0;
-  FAT_SUPER->current_cluster_num = MAXINT;
-  
-  /* main loop to find desired directory entry */
- loop:
-  
-  /* if we have a real file (and we're not just printing possibilities),
-     then this is where we want to exit */
-  
-  if (!*dirname || isspace (*dirname))
-    {
-      if (attrib & FAT_ATTRIB_DIR)
-       {
-         errnum = ERR_BAD_FILETYPE;
-         return 0;
-       }
-      
-      return 1;
-    }
-  
-  /* continue with the file/directory name interpretation */
-  
-  while (*dirname == '/')
-    dirname++;
-  
-  if (!(attrib & FAT_ATTRIB_DIR))
-    {
-      errnum = ERR_BAD_FILETYPE;
-      return 0;
-    }
-  /* Directories don't have a file size */
-  filemax = MAXINT;
-  
-  for (rest = dirname; (ch = *rest) && !isspace (ch) && ch != '/'; rest++);
-  
-  *rest = 0;
-  
-# ifndef STAGE1_5
-  if (print_possibilities && ch != '/')
-    do_possibilities = 1;
-# endif
-  
-  while (1)
-    {
-      if (fat_read (dir_buf, FAT_DIRENTRY_LENGTH) != FAT_DIRENTRY_LENGTH
-         || dir_buf[0] == 0)
-       {
-         if (!errnum)
-           {
-# ifndef STAGE1_5
-             if (print_possibilities < 0)
-               {
-#if 0
-                 putchar ('\n');
-#endif
-                 return 1;
-               }
-# endif /* STAGE1_5 */
-             
-             errnum = ERR_FILE_NOT_FOUND;
-             *rest = ch;
-           }
-         
-         return 0;
-       }
-      
-      if (FAT_DIRENTRY_ATTRIB (dir_buf) == FAT_ATTRIB_LONGNAME)
-       {
-         /* This is a long filename.  The filename is build from back
-          * to front and may span multiple entries.  To bind these
-          * entries together they all contain the same checksum over
-          * the short alias.
-          *
-          * The id field tells if this is the first entry (the last
-          * part) of the long filename, and also at which offset this
-          * belongs.
-          *
-          * We just write the part of the long filename this entry
-          * describes and continue with the next dir entry.
-          */
-         int i, offset;
-         unsigned char id = FAT_LONGDIR_ID(dir_buf);
-         
-         if ((id & 0x40)) 
-           {
-             id &= 0x3f;
-             slot = id;
-             filename[slot * 13] = 0;
-             alias_checksum = FAT_LONGDIR_ALIASCHECKSUM(dir_buf);
-           } 
-         
-         if (id != slot || slot == 0
-             || alias_checksum != FAT_LONGDIR_ALIASCHECKSUM(dir_buf))
-           {
-             alias_checksum = -1;
-             continue;
-           }
-         
-         slot--;
-         offset = slot * 13;
-         
-         for (i=0; i < 13; i++)
-           filename[offset+i] = dir_buf[longdir_pos[i]];
-         continue;
-       }
-      
-      if (!FAT_DIRENTRY_VALID (dir_buf))
-       continue;
-      
-      if (alias_checksum != -1 && slot == 0)
-       {
-         int i;
-         unsigned char sum;
-         
-         slot = -2;
-         for (sum = 0, i = 0; i< 11; i++)
-           sum = ((sum >> 1) | (sum << 7)) + dir_buf[i];
-         
-         if (sum == alias_checksum)
-           {
-# ifndef STAGE1_5
-             if (do_possibilities)
-               goto print_filename;
-# endif /* STAGE1_5 */
-             
-             if (substring (dirname, filename) == 0)
-               break;
-           }
-       }
-      
-      /* XXX convert to 8.3 filename format here */
-      {
-       int i, j, c;
-       
-       for (i = 0; i < 8 && (c = filename[i] = tolower (dir_buf[i]))
-              && !isspace (c); i++);
-       
-       filename[i++] = '.';
-       
-       for (j = 0; j < 3 && (c = filename[i + j] = tolower (dir_buf[8 + j]))
-              && !isspace (c); j++);
-       
-       if (j == 0)
-         i--;
-       
-       filename[i + j] = 0;
-      }
-      
-# ifndef STAGE1_5
-      if (do_possibilities)
-       {
-       print_filename:
-         if (substring (dirname, filename) <= 0)
-           {
-             if (print_possibilities > 0)
-               print_possibilities = -print_possibilities;
-             print_a_completion (filename);
-           }
-         continue;
-       }
-# endif /* STAGE1_5 */
-      
-      if (substring (dirname, filename) == 0)
-       break;
-    }
-  
-  *(dirname = rest) = ch;
-  
-  attrib = FAT_DIRENTRY_ATTRIB (dir_buf);
-  filemax = FAT_DIRENTRY_FILELENGTH (dir_buf);
-  filepos = 0;
-  FAT_SUPER->file_cluster = FAT_DIRENTRY_FIRST_CLUSTER (dir_buf);
-  FAT_SUPER->current_cluster_num = MAXINT;
-  
-  /* go back to main loop at top of function */
-  goto loop;
-}
diff --git a/src/stream/fs/iso9660.c b/src/stream/fs/iso9660.c
deleted file mode 100644 (file)
index 9d36a5c..0000000
+++ /dev/null
@@ -1,338 +0,0 @@
-/*
- *  ISO 9660 filesystem backend for GRUB (GRand Unified Bootloader)
- *  including Rock Ridge Extensions support
- *
- *  Copyright (C) 1998, 1999  Kousuke Takai  <tak@kmc.kyoto-u.ac.jp>
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-/*
- *  References:
- *     linux/fs/isofs/rock.[ch]
- *     mkisofs-1.11.1/diag/isoinfo.c
- *     mkisofs-1.11.1/iso9660.h
- *             (all are written by Eric Youngdale)
- *
- *  Modifications by:
- *     Leonid Lisovskiy   <lly@pisem.net>      2003
- */
-
-/*
- * Modified to make it work with FILO
- * 2003-10 by SONE Takeshi
- */
-
-#include <console/console.h>
-#include <fs/fs.h>
-#include <fs/iso9660.h>
-#include <string.h>
-
-struct iso_superblock {
-    unsigned long vol_sector;
-
-    unsigned long file_start;
-};
-
-#define ISO_SUPER      ((struct iso_superblock *)(FSYS_BUF))
-#define PRIMDESC        ((struct iso_primary_descriptor *)(FSYS_BUF + 2048))
-#define DIRREC          ((struct iso_directory_record *)(FSYS_BUF + 4096))
-#define RRCONT_BUF      ((unsigned char *)(FSYS_BUF + 6144))
-#define NAME_BUF        ((unsigned char *)(FSYS_BUF + 8192))
-
-static int
-iso9660_devread (int sector, int byte_offset, int byte_len, char *buf)
-{
-  /* FILO uses 512-byte "soft" sector, and ISO-9660 uses 2048-byte
-   * CD-ROM sector */
-  return devread(sector<<2, byte_offset, byte_len, buf);
-}
-
-int
-iso9660_mount (void)
-{
-  unsigned int sector;
-
-  /*
-   *  Because there is no defined slice type ID for ISO-9660 filesystem,
-   *  this test will pass only either (1) if entire disk is used, or
-   *  (2) if current partition is BSD style sub-partition whose ID is
-   *  ISO-9660.
-   */
-  /*if ((current_partition != 0xFFFFFF)
-      && !IS_PC_SLICE_TYPE_BSD_WITH_FS(current_slice, FS_ISO9660))
-    return 0;*/
-
-  /*
-   *  Currently, only FIRST session of MultiSession disks are supported !!!
-   */
-  for (sector = 16 ; sector < 32 ; sector++)
-    {
-      if (!iso9660_devread(sector, 0, sizeof(*PRIMDESC), (char *)PRIMDESC)) 
-       break;
-      /* check ISO_VD_PRIMARY and ISO_STANDARD_ID */
-      if (isonum_711(PRIMDESC->type) == ISO_VD_PRIMARY &&
-               !__builtin_memcmp(PRIMDESC->id, "CD001", 5))
-       {
-         ISO_SUPER->vol_sector = sector;
-         ISO_SUPER->file_start = 0;
-         fsmax = isonum_733(PRIMDESC->volume_space_size);
-         return 1;
-       }
-    }
-
-  return 0;
-}
-
-int
-iso9660_dir (char *dirname)
-{
-  struct iso_directory_record *idr;
-  RR_ptr_t rr_ptr;
-  struct rock_ridge *ce_ptr;
-  unsigned int pathlen;
-  int size;
-  unsigned int extent;
-  unsigned int rr_len;
-  unsigned char file_type;
-  unsigned char rr_flag;
-
-  idr = (struct iso_directory_record *)&PRIMDESC->root_directory_record;
-  ISO_SUPER->file_start = 0;
-
-  do
-  {
-      while (*dirname == '/')  /* skip leading slashes */
-         dirname++;
-      /* pathlen = strcspn(dirname, "/\n\t "); */
-      for (pathlen = 0 ;
-         dirname[pathlen]
-            && !isspace(dirname[pathlen]) && dirname[pathlen] != '/' ;
-         pathlen++)
-       ;
-
-      size = isonum_733(idr->size);
-      extent = isonum_733(idr->extent);
-
-      while (size > 0)
-      {
-         if (!iso9660_devread(extent, 0, ISO_SECTOR_SIZE, (char *)DIRREC))
-         {
-             errnum = ERR_FSYS_CORRUPT;
-             return 0;
-         }
-         extent++;
-
-         idr = (struct iso_directory_record *)DIRREC;
-         for (; isonum_711(idr->length) > 0;
-                idr = (struct iso_directory_record *)((char *)idr + isonum_711(idr->length)) )
-         {
-             const char *name = idr->name;
-             unsigned int name_len = isonum_711(idr->name_len);
-
-             file_type = (isonum_711(idr->flags) & 2) ? ISO_DIRECTORY : ISO_REGULAR;
-             if (name_len == 1)
-             {
-                 if ((name[0] == 0) || /* self */
-                     (name[0] == 1))   /* parent */
-                   continue;
-             }
-             if (name_len > 2 && 
-                       name[name_len - 2] == ';' &&
-                       name[name_len - 1] == '1')
-             {
-                 name_len -= 2;        /* truncate trailing file version */
-                 if (name_len > 1 && name[name_len - 1] == '.')
-                   name_len--;         /* truncate trailing dot */
-             }
-
-             /*
-              *  Parse Rock-Ridge extension
-              */
-             rr_len = (isonum_711(idr->length) - isonum_711(idr->name_len)
-                       - sizeof(struct iso_directory_record)
-                       + sizeof(idr->name));
-             rr_ptr.ptr = ((unsigned char *)idr + isonum_711(idr->name_len)
-                           + sizeof(struct iso_directory_record)
-                           - sizeof(idr->name));
-             if (rr_ptr.i & 1)
-               rr_ptr.i++, rr_len--;
-             ce_ptr = 0;
-             rr_flag = RR_FLAG_NM | RR_FLAG_PX;
-
-             while (rr_len >= 4)
-             {
-                 if (rr_ptr.rr->version != 1)
-                 {
-#ifndef STAGE1_5
-                   if (debug)
-                     printk_debug(
-                           "Non-supported version (%d) RockRidge chunk "
-                           "`%c%c'\n", rr_ptr.rr->version,
-                           rr_ptr.rr->signature[0],
-                           rr_ptr.rr->signature[1]);
-#endif
-                   break;
-                 }
-                 else if (rr_ptr.rr->signature[0] == 'R'
-                          && rr_ptr.rr->signature[1] == 'R'
-                          && rr_ptr.rr->len >= 5)
-                   rr_flag &= isonum_711(rr_ptr.rr->u.RR.flags);
-                 else if (rr_ptr.rr->signature[0] == 'N'
-                          && rr_ptr.rr->signature[1] == 'M')
-                 {
-                     name = rr_ptr.rr->u.NM.name;
-                     name_len = rr_ptr.rr->len - 5;
-                     rr_flag &= ~RR_FLAG_NM;
-                 }
-                 else if (rr_ptr.rr->signature[0] == 'P'
-                          && rr_ptr.rr->signature[1] == 'X'
-                          && rr_ptr.rr->len >= 36)
-                 {
-                     unsigned int mode = isonum_733(rr_ptr.rr->u.PX.mode);
-                     file_type = ((mode & POSIX_S_IFMT)
-                                  == POSIX_S_IFREG
-                                  ? ISO_REGULAR
-                                  : ((mode & POSIX_S_IFMT)
-                                     == POSIX_S_IFDIR
-                                     ? ISO_DIRECTORY : ISO_OTHER));
-                     rr_flag &= ~RR_FLAG_PX;
-                 }
-                 else if (rr_ptr.rr->signature[0] == 'C'
-                          && rr_ptr.rr->signature[1] == 'E'
-                          && rr_ptr.rr->len >= 28)
-                   ce_ptr = rr_ptr.rr;
-                 if (!rr_flag)
-                   /*
-                    * There is no more extension we expects...
-                    */
-                   break;
-                 rr_len -= rr_ptr.rr->len;
-                 rr_ptr.ptr += rr_ptr.rr->len;
-                 if (rr_len < 4 && ce_ptr != 0)
-                 {
-                     /* preserve name before loading new extent. */
-                     if( RRCONT_BUF <= (unsigned char *)name
-                         && (unsigned char *)name < RRCONT_BUF + ISO_SECTOR_SIZE )
-                     {
-                         memcpy(NAME_BUF, name, name_len);
-                         name = NAME_BUF;
-                     }
-                     rr_ptr.ptr = RRCONT_BUF + isonum_733(ce_ptr->u.CE.offset);
-                     rr_len = isonum_733(ce_ptr->u.CE.size);
-                     if (!iso9660_devread(isonum_733(ce_ptr->u.CE.extent), 0, ISO_SECTOR_SIZE, RRCONT_BUF))
-                     {
-                         errnum = 0;   /* this is not fatal. */
-                         break;
-                     }
-                     ce_ptr = 0;
-                  }
-             } /* rr_len >= 4 */
-
-             filemax = MAXINT;
-             if (name_len >= pathlen
-                 && !__builtin_memcmp(name, dirname, pathlen))
-             {
-                if (dirname[pathlen] == '/' || !print_possibilities)
-               {
-                 /*
-                  *  DIRNAME is directory component of pathname,
-                  *  or we are to open a file.
-                  */
-                 if (pathlen == name_len)
-                 {
-                     if (dirname[pathlen] == '/')
-                     {
-                         if (file_type != ISO_DIRECTORY)
-                         {
-                             errnum = ERR_BAD_FILETYPE;
-                             return 0;
-                         }
-                          goto next_dir_level;
-                     }
-                     if (file_type != ISO_REGULAR)
-                     {
-                         errnum = ERR_BAD_FILETYPE;
-                         return 0;
-                     }
-                     ISO_SUPER->file_start = isonum_733(idr->extent);
-                     filepos = 0;
-                     filemax = isonum_733(idr->size);
-                     return 1;
-                 }
-               }
-               else    /* Completion */
-               {
-#ifndef STAGE1_5
-                 if (print_possibilities > 0)
-                     print_possibilities = -print_possibilities;
-                 memcpy(NAME_BUF, name, name_len);
-                 NAME_BUF[name_len] = '\0';
-                 print_a_completion (NAME_BUF);
-#endif
-               }
-             }
-         } /* for */
-
-         size -= ISO_SECTOR_SIZE;
-      } /* size>0 */
-
-      if (dirname[pathlen] == '/' || print_possibilities >= 0)
-      {
-         errnum = ERR_FILE_NOT_FOUND;
-         return 0;
-      }
-
-next_dir_level:
-      dirname += pathlen;
-
-  } while (*dirname == '/');
-
-  return 1;
-}
-
-int
-iso9660_read (char *buf, int len)
-{
-  int sector, blkoffset, size, ret;
-
-  if (ISO_SUPER->file_start == 0)
-    return 0;
-
-  ret = 0;
-  blkoffset = filepos & (ISO_SECTOR_SIZE - 1);
-  sector = filepos >> ISO_SECTOR_BITS;
-  while (len > 0)
-  {
-    size = ISO_SECTOR_SIZE - blkoffset;
-    if (size > len)
-        size = len;
-
-    disk_read_func = disk_read_hook;
-
-    if (!iso9660_devread(ISO_SUPER->file_start + sector, blkoffset, size, buf))
-       return 0;
-
-    disk_read_func = 0;
-
-    len -= size;
-    buf += size;
-    ret += size;
-    filepos += size;
-    sector++;
-    blkoffset = 0;
-  }
-
-  return ret;
-}
diff --git a/src/stream/fs/vfs.c b/src/stream/fs/vfs.c
deleted file mode 100644 (file)
index 4a298ce..0000000
+++ /dev/null
@@ -1,176 +0,0 @@
-/* Interface between GRUB's fs drivers and application code */
-
-#include <console/console.h>
-#include <fs/fs.h>
-#include <string.h>
-#include <stdlib.h>
-
-int filepos;
-int filemax;
-fs_error_t errnum;
-void (*disk_read_hook) (int, int, int);
-void (*disk_read_func) (int, int, int);
-char FSYS_BUF[FSYS_BUFLEN];
-int fsmax;
-
-struct fsys_entry {
-    char *name;
-    int (*mount_func) (void);
-    int (*read_func) (char *buf, int len);
-    int (*dir_func) (char *dirname);
-    void (*close_func) (void);
-    int (*embed_func) (int *start_sector, int needed_sectors);
-};
-
-struct fsys_entry fsys_table[] = {
-# if CONFIG_FS_FAT == 1
-    {"fat", fat_mount, fat_read, fat_dir, 0, 0},
-# endif
-# if CONFIG_FS_EXT2 == 1
-    {"ext2fs", ext2fs_mount, ext2fs_read, ext2fs_dir, 0, 0},
-# endif
-# if CONFIG_FS_ISO9660 == 1
-    {"iso9660", iso9660_mount, iso9660_read, iso9660_dir, 0, 0},
-# endif
-};
-
-/* NULLFS is used to read images from raw device */
-static int nullfs_dir(char *name)
-{
-    uint64_t dev_size;
-
-    if (name) {
-       printk_debug("can't have a named file\n");
-       return 0;
-    }
-
-    dev_size = (uint64_t) part_length << 9;
-    /* GRUB code doesn't like 2GB or bigger files */
-    if (dev_size > 0x7fffffff)
-       dev_size = 0x7fffffff;
-    filemax = dev_size;
-    return 1;
-}
-
-static int nullfs_read(char *buf, int len)
-{
-    if (devread(filepos>>9, filepos&0x1ff, len, buf)) {
-       filepos += len;
-       return len;
-    } else
-       return 0;
-}
-
-static struct fsys_entry nullfs =
-    {"nullfs", 0, nullfs_read, nullfs_dir, 0, 0};
-
-static struct fsys_entry *fsys;
-
-int mount_fs(void)
-{
-    int i;
-
-    for (i = 0; i < ARRAY_SIZE(fsys_table); i++) {
-       if (fsys_table[i].mount_func()) {
-           fsys = &fsys_table[i];
-           printk_info("Mounted %s\n", fsys->name);
-           return 1;
-       }
-    }
-    fsys = 0;
-    printk_info("Unknown filesystem type\n");
-    return 0;
-}
-
-int file_open(const char *filename)
-{
-    char *dev = 0;
-    const char *path;
-    int len;
-    int retval = 0;
-    int reopen;
-
-    path = strchr(filename, ':');
-    if (path) {
-       len = path - filename;
-       path++;
-       dev = malloc(len + 1);
-       memcpy(dev, filename, len);
-       dev[len] = '\0';
-    } else {
-       /* No colon is given. Is this device or filename? */
-       if (filename[0] == '/') {
-           /* Anything starts with '/' must be a filename */
-           dev = 0;
-           path = filename;
-       } else {
-           dev = strdup(filename);
-           path = 0;
-       }
-    }
-
-    if (dev && dev[0]) {
-       if (!devopen(dev, &reopen)) {
-           fsys = 0;
-           goto out;
-       }
-       if (!reopen)
-           fsys = 0;
-    }
-
-    if (path) {
-       if (!fsys || fsys==&nullfs) {
-           if (!mount_fs())
-               goto out;
-       }
-       using_devsize = 0;
-       if (!path[0]) {
-           printk_info("No filename is given\n");
-           goto out;
-       }
-    } else
-       fsys = &nullfs;
-
-    filepos = 0;
-    errnum = 0;
-    if (!fsys->dir_func((char *) path)) {
-       printk_info("File not found\n");
-       goto out;
-    }
-    retval = 1;
-out:
-    if (dev)
-       free(dev);
-    return retval;
-}
-
-int file_read(void *buf, unsigned long len)
-{
-    if (filepos < 0 || filepos > filemax)
-       filepos = filemax;
-    if (len < 0 || len > filemax-filepos)
-       len = filemax - filepos;
-    errnum = 0;
-    return fsys->read_func(buf, len);
-}
-
-int file_seek(unsigned long offset)
-{
-    filepos = offset;
-    return filepos;
-}
-
-unsigned long file_pos(void)
-{
-    return filepos;
-}
-
-unsigned long file_size(void)
-{
-    return filemax;
-}
-
-void file_close(void)
-{
-}
-
diff --git a/src/stream/fs_stream.c b/src/stream/fs_stream.c
deleted file mode 100644 (file)
index 7d911e6..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <console/console.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <stream/read_bytes.h>
-#include <string.h>
-#include <fs/fs.h>
-
-char *boot_file;
-
-int stream_init(void)
-{
-       return file_open(boot_file);
-}
-
-
-void stream_fini(void)
-{
-       return;
-}
-
-byte_offset_t stream_skip(byte_offset_t count)
-{
-       unsigned long pos = file_pos();
-       if (file_seek(count+pos) != count+pos)
-               return 0;
-       return count;
-}
-
-byte_offset_t stream_read(void *vdest, byte_offset_t count)
-{
-       return file_read(vdest, count);
-}
diff --git a/src/stream/ide_stream.c b/src/stream/ide_stream.c
deleted file mode 100644 (file)
index 8cf5192..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-#include <console/console.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <stream/read_bytes.h>
-#include <delay.h>
-#include <string.h>
-#include <pc80/ide.h>
-
-#ifndef CONFIG_IDE_BOOT_DRIVE
-#define CONFIG_IDE_BOOT_DRIVE 0
-#endif
-
-static unsigned long offset;
-
-int stream_init(void)
-{
-       int i,res;
-
-        printk_debug ("Trying polled ide\n");
-        printk_debug ("Waiting for ide disks to spin up\n");
-        printk_notice ("This is a hard coded delay and longer than necessary.\n");
-       for (i = 0; i < 2; i++) {
-               printk_notice (".");
-               delay(1);
-       }
-       printk_info ("\n");
-
-#ifdef ONE_TRACK
-       offset = (ONE_TRACK*512);
-#elif defined(CONFIG_IDE_OFFSET)
-       offset = CONFIG_IDE_OFFSET;
-#else
-       offset = 0x7e00;
-#endif
-       res = ide_probe(CONFIG_IDE_BOOT_DRIVE);
-       delay(1);
-       return res;
-}
-
-void stream_fini(void)
-{
-       return;
-}
-
-static unsigned char buffer[512];
-static unsigned int block_num = 0;
-static unsigned int first_fill = 1;
-
-static byte_offset_t stream_ide_read(void *vdest, byte_offset_t offs, byte_offset_t count)
-{
-       byte_offset_t bytes = 0;
-       unsigned char *dest = vdest;
-
-       //printk_debug("stream_ide_read count = %x\n", count);
-       while (bytes < count) {
-               unsigned int byte_offset, len;
-
-               /* The block is not cached in memory or frist time called */
-               if (block_num != offs / 512 || first_fill) {
-                       block_num  = offs / 512;
-                       printk_notice (".");
-                       ide_read(CONFIG_IDE_BOOT_DRIVE, block_num, buffer);
-                       first_fill = 0;
-               }
-
-               byte_offset = offs % 512;
-               len = 512 - byte_offset;
-               if (len > (count - bytes)) {
-                       len = (count - bytes);
-               }
-
-               memcpy(dest, buffer + byte_offset, len);
-
-               offs += len;
-               bytes += len;
-               dest += len;
-
-       }
-       return bytes;
-}
-
-byte_offset_t stream_read(void *vdest, byte_offset_t count)
-{
-       byte_offset_t len;
-
-       len = stream_ide_read(vdest, offset, count);
-       if (len > 0) {
-               offset += len;
-       }
-
-       return len;
-}
-
-byte_offset_t stream_skip(byte_offset_t count)
-{
-       offset += count;
-       return count;
-}
diff --git a/src/stream/rom_stream.c b/src/stream/rom_stream.c
deleted file mode 100644 (file)
index 2c8699d..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-#include <console/console.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <stream/read_bytes.h>
-#include <string.h>
-
-/* if they set the precompressed rom stream, they better have set a type */
-#if CONFIG_PRECOMPRESSED_PAYLOAD && ((!CONFIG_COMPRESSED_PAYLOAD_NRV2B) && (!CONFIG_COMPRESSED_PAYLOAD_LZMA))
-#error "You set CONFIG_PRECOMPRESSED_PAYLOAD but need to set CONFIG_COMPRESSED_PAYLOAD_NRV2B or CONFIG_COMPRESSED_PAYLOAD_LZMA"
-#endif
-
-/* If they set ANY of these, then we're compressed */
-#if ((CONFIG_COMPRESSED_PAYLOAD_NRV2B) || (CONFIG_COMPRESSED_PAYLOAD_LZMA))
-#define UNCOMPRESSER 1
-extern unsigned char _heap, _eheap;
-#endif
-
-#if (CONFIG_COMPRESSED_PAYLOAD_NRV2B) 
-#define HAVE_UNCOMPRESSER 1
-#include "../lib/nrv2b.c"
-#endif
-
-#if (CONFIG_COMPRESSED_PAYLOAD_LZMA)
-#ifdef HAVE_UNCOMPRESSER
-#error "You're defining more than one compression type, which is not allowed."
-#endif
-#define HAVE_UNCOMPRESSER 1
-unsigned long ulzma(unsigned char *src, unsigned char *dst);
-#endif
-
-#ifndef CONFIG_ROM_PAYLOAD_START
-#define CONFIG_ROM_PAYLOAD_START 0xffff0000UL
-#endif
-
-/* well, this is a mess, and it will get fixed, but not right away.
- * until we stop using 'ld' for building the rom image, that is.
- * problem is, that on the sc520, ROM_PAYLOAD_START has to be at 0x2000000.
- * but if you set CONFIG_ROM_PAYLOAD_START to that, then ld will try to
- * build a giant image: 0x0-0x2000000, i.e. almost 4 GB.
- * so make this non-static, non-const for now.
- */
-
-/*XXXXXXXXXXXXXX */
-unsigned char *rom_start = (unsigned char *)CONFIG_ROM_PAYLOAD_START;
-unsigned char *rom_end   = (unsigned char *)(CONFIG_ROM_PAYLOAD_START + CONFIG_PAYLOAD_SIZE - 1);
-/*XXXXXXXXXXXXXX */
-
-static const unsigned char *rom;
-
-#ifdef UNCOMPRESSER
-unsigned long 
-uncompress(uint8_t * start_addr, uint8_t *dest_addr)
-{
-#if (CONFIG_COMPRESSED_PAYLOAD_NRV2B) 
-       unsigned long ilen; // used compressed stream length
-       return unrv2b(start_addr, dest_addr, &ilen);
-#endif
-#if (CONFIG_COMPRESSED_PAYLOAD_LZMA)
-       return ulzma(start_addr, dest_addr);
-#endif
-}
-#endif
-
-int stream_init(void)
-{
-#ifdef UNCOMPRESSER
-        unsigned char *dest;
-        unsigned long olen;
-#endif
-
-       printk_debug("rom_stream: 0x%08lx - 0x%08lx\n",
-               (unsigned long)rom_start,
-               (unsigned long)rom_end);
-
-#ifdef UNCOMPRESSER
-
-        dest = &_eheap; /* need a good address on RAM */
-
-#if CONFIG_RAMBASE<0x00100000
-       olen = *(unsigned int *)dest;
-#if (CONFIG_CONSOLE_VGA==1) || (CONFIG_PCI_ROM_RUN == 1)
-       if((dest < (unsigned char *)0xa0000) && ((dest+olen)>(unsigned char *)0xa0000)) {
-               dest = (unsigned char *)(CONFIG_LB_MEM_TOPK<<10);
-       }
-#endif
-        if((dest < (unsigned char *) 0xf0000) && ((dest+olen)> (unsigned char *)0xf0000)) { // coreboot tables etc
-         dest = (unsigned char *) (CONFIG_LB_MEM_TOPK<<10);
-        }
-#endif
-
-       /* ALL of those settings are too smart and also unsafe. Set the dest to 16 MB: 
-        * known to be safe for LB for now, and mostly safe for all elf images we have tried. 
-        * long term, this has got to be fixed. 
-        */
-       dest  = (unsigned char *) (16 * 1024 * 1024);
-        printk_debug("Uncompressing to RAM %p ", dest);
-        olen = uncompress((uint8_t *) rom_start, (uint8_t *)dest );
-       printk_debug(" olen = 0x%08lx done.\n", olen);
-       if (olen != 0) {
-               rom_end = dest + olen - 1;
-               rom = dest;
-       } else {
-               /* Decompression failed, assume payload is uncompressed */
-               printk_debug("Decompression failed. Assuming payload is uncompressed...\n");
-               rom = rom_start;
-       }
-#else
-        rom = rom_start;
-#endif
-
-       return 0;
-}
-
-
-void stream_fini(void)
-{
-       return;
-}
-
-byte_offset_t stream_skip(byte_offset_t count)
-{
-       byte_offset_t bytes;
-       bytes = count;
-       if ((rom + bytes - 1) > rom_end) {
-               printk_warning("%6d:%s() - overflowed source buffer\n",
-                       __LINE__, __func__);
-               bytes = 0;
-               if (rom <= rom_end) {
-                       bytes = (rom_end - rom) + 1;
-               }
-       }
-       rom += bytes;
-       return bytes;
-}
-
-byte_offset_t stream_read(void *vdest, byte_offset_t count)
-{
-       unsigned char *dest = vdest;
-       const unsigned char *src = rom;
-       byte_offset_t bytes;
-
-       bytes = stream_skip(count);
-       memcpy(dest, src, bytes);
-       return bytes;
-}
diff --git a/src/stream/serial_stream.c b/src/stream/serial_stream.c
deleted file mode 100644 (file)
index 078727b..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-#include <console/console.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <stream/read_bytes.h>
-#include <string.h>
-
-/* if they set the precompressed rom stream, they better have set a type */
-#if CONFIG_PRECOMPRESSED_PAYLOAD && ((!CONFIG_COMPRESSED_PAYLOAD_NRV2B) && (!CONFIG_COMPRESSED_PAYLOAD_LZMA))
-#error "You set CONFIG_PRECOMPRESSED_PAYLOAD but need to set CONFIG_COMPRESSED_PAYLOAD_NRV2B or CONFIG_COMPRESSED_PAYLOAD_LZMA"
-#endif
-
-#if (CONFIG_COMPRESSED_PAYLOAD_NRV2B) 
-#define HAVE_UNCOMPRESSER 1
-#include "../lib/nrv2b.c"
-#endif
-
-#if (CONFIG_COMPRESSED_PAYLOAD_LZMA)
-#if HAVE_UNCOMPRESSER
-#error "You're defining more than one compression type, which is not allowed (of course)"
-#endif
-#define HAVE_UNCOMPRESSER 1
-unsigned long ulzma(unsigned char *src, unsigned char *dst);
-#endif
-
-#include "../lib/xmodem.c"
-
-/* Blocks of RAM for storing stream data */
-static unsigned char *stream_start = (unsigned char *) 0x02000000;
-static unsigned char *stream_end;
-static unsigned char *temp_start = (unsigned char *) 0x03000000;
-static int stream_max_bytes = 0x00800000;
-
-#if HAVE_UNCOMPRESSER
-static unsigned long uncompress(uint8_t *src, uint8_t *dest)
-{
-#if (CONFIG_COMPRESSED_PAYLOAD_NRV2B) 
-       unsigned long ilen;
-       return unrv2b(src, dest, &ilen);
-#endif
-#if (CONFIG_COMPRESSED_PAYLOAD_LZMA)
-       return ulzma(src, dest);
-#endif
-}
-#endif
-
-int stream_init(void)
-{
-       int len;
-
-       printk_debug("serial_stream: downloading to 0x%08lx; start XMODEM transfer now!\n", temp_start);
-       if ((len = xmodemReceive(temp_start, stream_max_bytes)) <= 0) {
-               printk_debug("\nserial_stream: XMODEM transfer failed\n");
-               return -1;
-       }
-       printk_debug("\nserial_stream: XMODEM transfer complete; %d bytes received\n", len);
-#if HAVE_UNCOMPRESSER
-       printk_debug("serial_stream: uncompressing to 0x%08lx\n", stream_start);
-       len = uncompress((uint8_t *) temp_start, (uint8_t *) stream_start);
-       printk_debug("serial_stream: %d bytes uncompressed\n", len);
-#else
-       printk_debug("serial_stream: copying to 0x%08lx\n", stream_start);
-       memcpy(stream_start, temp_start, len);
-#endif
-       stream_end = stream_start + len - 1;
-       return 0;
-}
-
-void stream_fini(void)
-{
-}
-
-byte_offset_t stream_skip(byte_offset_t count)
-{
-       if ((stream_start + count) > stream_end) {
-               printk_warning("%6d:%s() - overflowed source buffer\n",
-                       __LINE__, __func__);
-               count = 0;
-               if (stream_start <= stream_end) {
-                       count = (stream_end - stream_start) + 1;
-               }
-       }
-       stream_start += count;
-       return count;
-}
-
-byte_offset_t stream_read(void *vdest, byte_offset_t count)
-{
-       unsigned char *old_start = stream_start;
-       count = stream_skip(count);
-       memcpy(vdest, old_start, count);
-       return count;
-}
index 8cb6b98b4c94892e75081b193f4b5b724c11e0bc..5a4fd4735007f494b47910a2c06120203222b22d 100644 (file)
@@ -5,7 +5,6 @@ mainboard kontron/986lcd-m
 ## (normal AND fallback images and payloads).
 option CONFIG_ROM_SIZE = 1024 * 1024
 
-option CONFIG_CBFS=1
 option HAVE_HIGH_TABLES=1
 option MAXIMUM_CONSOLE_LOGLEVEL=9
 option DEFAULT_CONSOLE_LOGLEVEL=9
index 92b825c4075fd6c54e6626d127db15458aa9bcc1..1fb1bbb3ff32f8f3399978dd95f44ed271b9c8a5 100644 (file)
@@ -30,14 +30,6 @@ option CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2 = 1
 option CONFIG_COMPRESSED_PAYLOAD_NRV2B = 0
 option CONFIG_COMPRESSED_PAYLOAD_LZMA = 0
 
-## Load payload (e.g. Linux) from IDE.
-#option CONFIG_ROM_PAYLOAD = 0
-#option CONFIG_IDE = 1
-#option CONFIG_FS_PAYLOAD = 1
-#option CONFIG_FS_EXT2 = 1
-#option CONFIG_AUTOBOOT_DELAY = 0
-#option CONFIG_AUTOBOOT_CMDLINE = "hda1:/payload.elf"
-
 # Leave 36k for VSA. Usually board is equipped with a 512 KB FWH (LPC) flash,
 # however it can be replaced with a 1 MB chip.
 option CONFIG_ROM_SIZE = (512 * 1024) - (36 * 1024)
index 6719c212f09164220cee402735df41965938e7e1..9fa4b5a44e9ba21a27b1133c44b629e843548bf5 100644 (file)
@@ -31,14 +31,6 @@ option CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2 = 1
 option CONFIG_COMPRESSED_PAYLOAD_NRV2B = 0
 option CONFIG_COMPRESSED_PAYLOAD_LZMA = 0
 
-## Load payload (e.g. Linux) from IDE.
-#option CONFIG_ROM_PAYLOAD = 0
-#option CONFIG_IDE = 1
-#option CONFIG_FS_PAYLOAD = 1
-#option CONFIG_FS_EXT2 = 1
-#option CONFIG_AUTOBOOT_DELAY = 0
-#option CONFIG_AUTOBOOT_CMDLINE = "hda1:/payload.elf"
-
 # Leave 36k for VSA. Board is equipped with a 1 MB SPI flash, however, due to
 # limitations of the IT8712F Super I/O, only the top 512 KB are directly mapped.
 option CONFIG_ROM_SIZE = (512 * 1024) - (36 * 1024)
index 9a90f6f534a32af39fbd050970d2eebbb8292fda..00329be6e91c211af1bfd82fedef22826eaddf23 100755 (executable)
@@ -176,20 +176,12 @@ EOF
                        cat <<EOF
 romimage "normal"
        option CONFIG_USE_FALLBACK_IMAGE=0
-if CONFIG_CBFS
-else
-       option CONFIG_ROM_IMAGE_SIZE=0x17000
-end
        option COREBOOT_EXTRA_VERSION=".0-normal"
        payload __PAYLOAD__
 end
 
 romimage "fallback" 
        option CONFIG_USE_FALLBACK_IMAGE=1
-if CONFIG_CBFS
-else
-       option CONFIG_ROM_IMAGE_SIZE=0x17000
-end
        option COREBOOT_EXTRA_VERSION=".0-fallback"
        payload __PAYLOAD__
 end
index 2f5dddfc2dfb60f097f9b18f7269a06252108cba..2fba72be77d1e02969b5edb925aa8d05349c3cc2 100644 (file)
@@ -2247,7 +2247,7 @@ def writemakefile(path):
        file = safe_open(makefilepath, 'w+')
        writemakefileheader(file, makefilepath)
 
-       # Hack to get the necessary settings (CONFIG_CBFS):
+       # Hack to get the necessary settings (CONFIG_COMPRESSED_PAYLOAD_LZMA):
        file.write("include %s/Makefile.settings\n\n" % romimages.keys()[0])
 
        # main rule
@@ -2275,7 +2275,6 @@ def writemakefile(path):
        file.write("base-clean:\n")
        file.write("\trm -f romcc*\n\n")
 
-       file.write("ifeq \"$(CONFIG_CBFS)\" \"1\"\n\n")
        file.write("CBFS_COMPRESS_FLAG:=\n")
        file.write("CBFS_STAGE_COMPRESS_FLAG:=\n")
        file.write("ifeq \"$(CONFIG_COMPRESSED_PAYLOAD_LZMA)\" \"1\"\nCBFS_COMPRESS_FLAG:=l\nendif\n\n")
@@ -2309,19 +2308,6 @@ def writemakefile(path):
                        file.write("\tif [ -f %s/coreboot_apc ]; then ./cbfs/cbfstool %s add-stage %s/coreboot_apc %s/coreboot_apc $(CBFS_COMPRESS_FLAG); fi\n" % (j, i.name, j, j,))
                file.write("\t./cbfs/cbfstool %s print\n" % i.name)
                file.write("\n")
-       file.write("else\n\n")
-
-       for i in buildroms:
-               file.write("%s:" % i.name)
-               for j in i.roms:
-                       file.write(" %s/coreboot.rom " % j)
-               file.write("\n")
-               file.write("\t cat ")
-               for j in i.roms:
-                       file.write(" %s/coreboot.rom " % j)
-               file.write("> %s\n\n" %i.name)
-
-       file.write("endif\n\n")
 
        file.write(".PHONY: all clean cbfstool")
        for i in romimages.keys():