diff options
author | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2012-08-20 00:24:22 +0000 |
---|---|---|
committer | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2012-08-20 00:24:22 +0000 |
commit | b4e06bde9b2a91d05c31b709d633464fca1c8815 (patch) | |
tree | 481c52c32309f394131ea7bb6e2792eb91e8faf4 /programmer.h | |
parent | a16a892ca462b6034fd513bb92245ad827b2945f (diff) | |
download | flashrom-b4e06bde9b2a91d05c31b709d633464fca1c8815.tar.gz flashrom-b4e06bde9b2a91d05c31b709d633464fca1c8815.tar.bz2 flashrom-b4e06bde9b2a91d05c31b709d633464fca1c8815.zip |
Refactor the -p internal:mainboard handling
This patch gets rid of some global variables and makes lots of bits along
the code path that control the board enable execution more generic and
clearer. From now on flashrom aborts on a few more occasions that should be
safer for the user. For example it aborts if the enable function for the
specified mainboard (enable) can not be found.
Parts of the board_match_cbname refactoring were done by Carl-Daniel.
Corresponding to flashrom svn r1577.
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'programmer.h')
-rw-r--r-- | programmer.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/programmer.h b/programmer.h index 7d06be3d9..a32cd793e 100644 --- a/programmer.h +++ b/programmer.h @@ -246,6 +246,7 @@ void print_supported_pcidevs(const struct pcidev_status *devs); #if CONFIG_INTERNAL == 1 /* board_enable.c */ +int board_parse_parameter(const char *boardstring, const char **vendor, const char **model); void w836xx_ext_enter(uint16_t port); void w836xx_ext_leave(uint16_t port); void probe_superio_winbond(void); @@ -255,7 +256,7 @@ void sio_write(uint16_t port, uint8_t reg, uint8_t data); void sio_mask(uint16_t port, uint8_t reg, uint8_t data, uint8_t mask); void board_handle_before_superio(void); void board_handle_before_laptop(void); -int board_flash_enable(const char *vendor, const char *part); +int board_flash_enable(const char *vendor, const char *model); /* chipset_enable.c */ int chipset_flash_enable(void); @@ -273,11 +274,8 @@ int setup_cpu_msr(int cpu); void cleanup_cpu_msr(void); /* cbtable.c */ -void lb_vendor_dev_from_string(const char *boardstring); -int show_id(uint8_t *bios, int size); -int coreboot_init(void); -extern char *lb_part, *lb_vendor; -extern int partvendor_from_cbtable; +int cb_parse_table(const char **vendor, const char **model); +int cb_check_image(uint8_t *bios, int size); /* dmi.c */ extern int has_dmi_support; |