Do not hard-code the ROM chip size, but rather let the user choose
it via Kconfig (select box with some common values). The default is 256 KB. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@196 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
689a938ca6
commit
d4266c0bd3
2 changed files with 42 additions and 4 deletions
41
Kconfig
41
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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue