diff --git a/Kconfig b/Kconfig index 8c70e9ac6a..79c5212925 100644 --- a/Kconfig +++ b/Kconfig @@ -30,6 +30,47 @@ config LOCALVERSION help Append an extra string to the end of the LinuxBIOS version. +choice + prompt "ROM chip size" + default LINUXBIOS_ROMSIZE_KB_256 + +config LINUXBIOS_ROMSIZE_KB_128 + bool "128 KB" + help + Choose this option if you have a 128 KB ROM chip. + +config LINUXBIOS_ROMSIZE_KB_256 + bool "256 KB" + help + Choose this option if you have a 256 KB ROM chip. + +config LINUXBIOS_ROMSIZE_KB_512 + bool "512 KB" + help + Choose this option if you have a 512 KB ROM chip. + +config LINUXBIOS_ROMSIZE_KB_1024 + bool "1024 KB (1 MB)" + help + Choose this option if you have a 1 MB (1024 KB) ROM chip. + +config LINUXBIOS_ROMSIZE_KB_2048 + bool "2048 KB (2 MB)" + help + Choose this option if you have a 2 MB (2048 KB) ROM chip. + +endchoice + +config LINUXBIOS_ROMSIZE_KB + int + default 128 if LINUXBIOS_ROMSIZE_KB_128 + default 256 if LINUXBIOS_ROMSIZE_KB_256 + default 512 if LINUXBIOS_ROMSIZE_KB_512 + default 1024 if LINUXBIOS_ROMSIZE_KB_1024 + default 2048 if LINUXBIOS_ROMSIZE_KB_2048 + help + Map the config names to an integer. + endmenu source mainboard/Kconfig diff --git a/arch/x86/cachemain.c b/arch/x86/cachemain.c index 2bbbb3f66f..b1115deeb2 100644 --- a/arch/x86/cachemain.c +++ b/arch/x86/cachemain.c @@ -30,9 +30,6 @@ void console_init(void); void die(const char *msg); int find_file(struct mem_file *archive, char *filename, struct mem_file *result); -// FIXME: This should go somewhere else (.config?) -#define LINUXBIOS_ROMSIZE_KB 256 - // Is this value correct? #define DCACHE_RAM_SIZE 0x8000 @@ -109,7 +106,7 @@ void stage1_main(u32 bist) // FIXME this should be defined in the VPD area // but NOT IN THE CODE. - archive.len=LINUXBIOS_ROMSIZE_KB*1024; + archive.len=CONFIG_LINUXBIOS_ROMSIZE_KB*1024; archive.start=(void *)(0UL-archive.len); /* This won't work; the for loop in lib/lar.c will always * fail as adding len to start will be 0.