aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2010-03-20 11:00:45 -0400
committerKevin O'Connor <kevin@koconnor.net>2010-03-20 11:00:45 -0400
commitd9c936181db3f64f592dd234ad76c5a85741a06d (patch)
treee1627f3afc055e7c3f5e31dc8e7948177c812056 /src
parentc35e1e50c389c6d63227e7f8d922cbcf4dea68aa (diff)
downloadseabios-hppa-d9c936181db3f64f592dd234ad76c5a85741a06d.zip
seabios-hppa-d9c936181db3f64f592dd234ad76c5a85741a06d.tar.gz
seabios-hppa-d9c936181db3f64f592dd234ad76c5a85741a06d.tar.bz2
Default CONFIG_COREBOOT_FLASH on; make depend on CONFIG_COREBOOT.
Coreboot users will almost certainly want CBFS support, and non-coreboot users have no use for it. So, make that the default behaviour.
Diffstat (limited to 'src')
-rw-r--r--src/boot.c4
-rw-r--r--src/config.h2
-rw-r--r--src/coreboot.c10
-rw-r--r--src/ramdisk.c4
4 files changed, 10 insertions, 10 deletions
diff --git a/src/boot.c b/src/boot.c
index 6e9000e..19e16f3 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -48,7 +48,7 @@ boot_setup(void)
ie++;
}
- if (CONFIG_COREBOOT_FLASH) {
+ if (CONFIG_COREBOOT && CONFIG_COREBOOT_FLASH) {
ie->type = IPL_TYPE_CBFS;
ie->description = "CBFS";
ie++;
@@ -414,7 +414,7 @@ boot_cdrom(struct ipl_entry_s *ie)
static void
boot_cbfs(struct ipl_entry_s *ie)
{
- if (! CONFIG_COREBOOT_FLASH)
+ if (!CONFIG_COREBOOT || !CONFIG_COREBOOT_FLASH)
return;
int count = ie->subchoice;
struct cbfs_file *file = NULL;
diff --git a/src/config.h b/src/config.h
index 5316f22..e762435 100644
--- a/src/config.h
+++ b/src/config.h
@@ -87,7 +87,7 @@
#define CONFIG_PCI_ROOT1 0x00
#define CONFIG_PCI_ROOT2 0x00
// Support searching coreboot flash format.
-#define CONFIG_COREBOOT_FLASH 0
+#define CONFIG_COREBOOT_FLASH 1
// Support floppy images in the coreboot flash.
#define CONFIG_FLASH_FLOPPY 1
// Support the lzma decompression algorighm.
diff --git a/src/coreboot.c b/src/coreboot.c
index 9887752..883834c 100644
--- a/src/coreboot.c
+++ b/src/coreboot.c
@@ -370,7 +370,7 @@ static struct cbfs_header *CBHDR;
static void
cbfs_setup(void)
{
- if (! CONFIG_COREBOOT_FLASH)
+ if (!CONFIG_COREBOOT || !CONFIG_COREBOOT_FLASH)
return;
CBHDR = *(void **)CBFS_HEADPTR_ADDR;
@@ -442,7 +442,7 @@ cbfs_findfile(const char *fname)
struct cbfs_file *
cbfs_findprefix(const char *prefix, struct cbfs_file *last)
{
- if (! CONFIG_COREBOOT_FLASH)
+ if (!CONFIG_COREBOOT || !CONFIG_COREBOOT_FLASH)
return NULL;
dprintf(3, "Searching CBFS for prefix %s\n", prefix);
@@ -503,7 +503,7 @@ cbfs_datasize(struct cbfs_file *file)
int
cbfs_copyfile(struct cbfs_file *file, void *dst, u32 maxlen)
{
- if (! CONFIG_COREBOOT_FLASH || !file)
+ if (!CONFIG_COREBOOT || !CONFIG_COREBOOT_FLASH || !file)
return -1;
u32 size = ntohl(file->len);
@@ -535,7 +535,7 @@ cbfs_copyfile(struct cbfs_file *file, void *dst, u32 maxlen)
int
cbfs_copy_optionrom(void *dst, u32 maxlen, u32 vendev)
{
- if (! CONFIG_COREBOOT_FLASH)
+ if (!CONFIG_COREBOOT || !CONFIG_COREBOOT_FLASH)
return -1;
char fname[17];
@@ -566,7 +566,7 @@ struct cbfs_payload {
void
cbfs_run_payload(struct cbfs_file *file)
{
- if (!CONFIG_COREBOOT_FLASH || !file)
+ if (!CONFIG_COREBOOT || !CONFIG_COREBOOT_FLASH || !file)
return;
dprintf(1, "Run %s\n", file->filename);
struct cbfs_payload *pay = (void*)file + ntohl(file->offset);
diff --git a/src/ramdisk.c b/src/ramdisk.c
index 0164840..be1de56 100644
--- a/src/ramdisk.c
+++ b/src/ramdisk.c
@@ -13,7 +13,7 @@
void
ramdisk_setup(void)
{
- if (!CONFIG_COREBOOT_FLASH || !CONFIG_FLASH_FLOPPY)
+ if (!CONFIG_COREBOOT || !CONFIG_COREBOOT_FLASH || !CONFIG_FLASH_FLOPPY)
return;
// Find image.
@@ -81,7 +81,7 @@ ramdisk_copy(struct disk_op_s *op, int iswrite)
int
process_ramdisk_op(struct disk_op_s *op)
{
- if (!CONFIG_COREBOOT_FLASH || !CONFIG_FLASH_FLOPPY)
+ if (!CONFIG_COREBOOT || !CONFIG_COREBOOT_FLASH || !CONFIG_FLASH_FLOPPY)
return 0;
switch (op->command) {