Updated to the latest svn ver. 1596 (post-release snapshot for 0.9.6.1)

Signed-off-by: Fedora Build <lemenkov@gmail.com>
This commit is contained in:
Fedora Build 2012-09-08 18:14:28 +04:00
parent 2d0ec4ae55
commit 59771508d2
12 changed files with 179 additions and 273 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ flashrom-0.9.2.tar.bz2
/flashrom-0.9.3.tar.bz2
/flashrom-0.9.4.tar.bz2
/flashrom-0.9.5.2.tar.bz2
/flashrom-0.9.6.1.tar.bz2

View File

@ -1,24 +1,24 @@
From a417d56da1bf45e020d002625ab9464b66dda0a1 Mon Sep 17 00:00:00 2001
From 73db870f2453eeccb39a489c28ba2b985bb238e8 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Fri, 17 Sep 2010 18:58:28 +0400
Subject: [PATCH 1/9] Initial commit of autotools-related files
Subject: [PATCH 1/8] Initial commit of autotools-related files
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
Makefile.am | 225 +++++++++++++++++++++++++++++++++++++
bootstrap.sh | 4 +
configure.ac | 353 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 582 insertions(+)
Makefile.am | 219 +++++++++++++++++++++++++++++++++++++
bootstrap.sh | 4 +
configure.ac | 349 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 572 insertions(+)
create mode 100644 Makefile.am
create mode 100755 bootstrap.sh
create mode 100644 configure.ac
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..a539f12
index 0000000..5c4ee86
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,225 @@
@@ -0,0 +1,219 @@
+sbin_PROGRAMS = flashrom
+
+man_MANS = flashrom.8
@ -26,12 +26,6 @@ index 0000000..a539f12
+# FIXME use "config.h" in the future
+DEFS += -DFLASHROM_VERSION=\"@VERSION@\"
+
+if HAVE_SYS_UTSNAME
+if HAVE_UNAME
+DEFS += -DHAVE_UTSNAME=1
+endif
+endif
+
+if HAVE_DMIDECODE
+DEFS += -DDMIDECODE_PATH=\"@DMIDECODE@\"
+else
@ -256,11 +250,11 @@ index 0000000..0213288
+automake --add-missing --copy --force-missing
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..6bbeac0
index 0000000..a823d5b
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,353 @@
+AC_INIT([flashrom], [0.9.5.2-r1530], [flashrom@flashrom.org], [flashrom], [http://www.flashrom.org/])
@@ -0,0 +1,349 @@
+AC_INIT([flashrom], [0.9.6.1-r1596], [flashrom@flashrom.org], [flashrom], [http://www.flashrom.org/])
+
+AC_PREREQ(2.59)
+
@ -569,10 +563,6 @@ index 0000000..6bbeac0
+AM_CONDITIONAL(HAVE_PCI, test "$pci" = "yes")
+AM_CONDITIONAL(HAVE_PRINT_WIKI, test "$print_wiki" = "yes")
+
+# FIXME remove in the future
+AM_CONDITIONAL(HAVE_SYS_UTSNAME, test "$ac_cv_header_sys_utsname_h" = "yes")
+AM_CONDITIONAL(HAVE_UNAME, test "$ac_cv_func_uname" = "yes")
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+
@ -614,5 +604,5 @@ index 0000000..6bbeac0
+------------------------------------------------------------------------
+])
--
1.7.10.4
1.7.11.5

View File

@ -1,18 +1,18 @@
From cded4a9b60e8c7cd06d76f77a60626b600951b61 Mon Sep 17 00:00:00 2001
From 54947415cb70643953622f6d1df87d8b651175b8 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sat, 12 Jun 2010 22:13:53 +0400
Subject: [PATCH 2/9] Use dmidecode path defined at configure stage
Subject: [PATCH 2/8] Use dmidecode path defined at configure stage
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
dmi.c | 2 +-
dmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dmi.c b/dmi.c
index 2c2551d..6f62fc0 100644
index dfc78e9..ddcfda8 100644
--- a/dmi.c
+++ b/dmi.c
@@ -86,7 +86,7 @@ static const struct {
@@ -87,7 +87,7 @@ static const struct {
};
#define DMI_COMMAND_LEN_MAX 260
@ -22,5 +22,5 @@ index 2c2551d..6f62fc0 100644
static char *dmistrings[ARRAY_SIZE(dmidecode_names)];
--
1.7.10.4
1.7.11.5

View File

@ -1,49 +1,15 @@
From a71a0e40017c72d863fb88832ff984d02d8e7714 Mon Sep 17 00:00:00 2001
From 61aa13e34a9717fca744fe2cd8f54e7cb9add1d0 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sat, 18 Sep 2010 09:05:43 +0400
Subject: [PATCH 3/9] Use macros from configure stage instead of HAVE_UTSNAME
Subject: [PATCH 3/8] Use macros from configure stage instead of HAVE_UTSNAME
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
Makefile.am | 6 ------
configure.ac | 4 ----
flashrom.c | 5 +++--
3 files changed, 3 insertions(+), 12 deletions(-)
flashrom.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index a539f12..5c4ee86 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,12 +5,6 @@ man_MANS = flashrom.8
# FIXME use "config.h" in the future
DEFS += -DFLASHROM_VERSION=\"@VERSION@\"
-if HAVE_SYS_UTSNAME
-if HAVE_UNAME
-DEFS += -DHAVE_UTSNAME=1
-endif
-endif
-
if HAVE_DMIDECODE
DEFS += -DDMIDECODE_PATH=\"@DMIDECODE@\"
else
diff --git a/configure.ac b/configure.ac
index 6bbeac0..be5503a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -307,10 +307,6 @@ AM_CONDITIONAL(HAVE_SERIAL, test "$serial" = "yes")
AM_CONDITIONAL(HAVE_PCI, test "$pci" = "yes")
AM_CONDITIONAL(HAVE_PRINT_WIKI, test "$print_wiki" = "yes")
-# FIXME remove in the future
-AM_CONDITIONAL(HAVE_SYS_UTSNAME, test "$ac_cv_header_sys_utsname_h" = "yes")
-AM_CONDITIONAL(HAVE_UNAME, test "$ac_cv_func_uname" = "yes")
-
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
diff --git a/flashrom.c b/flashrom.c
index 0fdcd5f..b0df817 100644
index fdc5412..3564bcb 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -31,7 +31,8 @@
@ -56,15 +22,15 @@ index 0fdcd5f..b0df817 100644
#include <sys/utsname.h>
#endif
#include "flash.h"
@@ -1485,7 +1486,7 @@ void list_programmers_linebreak(int startcol, int cols, int paren)
void print_sysinfo(void)
{
-#if HAVE_UTSNAME == 1
+#if HAVE_UNAME == 1
@@ -1519,7 +1520,7 @@ void print_sysinfo(void)
msg_ginfo(" (unknown arch)");
break;
}
-#elif HAVE_UTSNAME == 1
+#elif HAVE_UNAME == 1
struct utsname osinfo;
uname(&osinfo);
uname(&osinfo);
--
1.7.10.4
1.7.11.5

View File

@ -1,29 +1,29 @@
From 7282844fb51db3806c66735f63ce51b2576775cf Mon Sep 17 00:00:00 2001
From ae19710387fed14ee2c55b2d0ffe78f6c68661a4 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sat, 18 Sep 2010 09:40:01 +0400
Subject: [PATCH 4/9] Kill some x86-related ifdefs in code - this is now
Subject: [PATCH 4/8] Kill some x86-related ifdefs in code - this is now
controlled via autotools
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
atahpt.c | 6 ------
ich_descriptors.c | 3 ---
ich_descriptors.h | 2 --
ichspi.c | 4 ----
it85spi.c | 4 ----
it87spi.c | 4 ----
mcp6x_spi.c | 4 ----
nic3com.c | 6 ------
nicnatsemi.c | 6 ------
nicrealtek.c | 6 ------
rayer_spi.c | 5 -----
satamv.c | 5 -----
sb600spi.c | 4 ----
wbsio_spi.c | 4 ----
atahpt.c | 6 ------
ich_descriptors.c | 3 ---
ich_descriptors.h | 2 --
ichspi.c | 4 ----
it85spi.c | 4 ----
it87spi.c | 4 ----
mcp6x_spi.c | 4 ----
nic3com.c | 6 ------
nicnatsemi.c | 6 ------
nicrealtek.c | 6 ------
rayer_spi.c | 5 -----
satamv.c | 5 -----
sb600spi.c | 4 ----
wbsio_spi.c | 4 ----
14 files changed, 63 deletions(-)
diff --git a/atahpt.c b/atahpt.c
index 4234f6d..27b106d 100644
index 8ec0f3f..a6efa48 100644
--- a/atahpt.c
+++ b/atahpt.c
@@ -18,8 +18,6 @@
@ -35,7 +35,7 @@ index 4234f6d..27b106d 100644
#include <stdlib.h>
#include <string.h>
#include "flash.h"
@@ -97,7 +95,3 @@ static uint8_t atahpt_chip_readb(const struct flashctx *flash,
@@ -98,7 +96,3 @@ static uint8_t atahpt_chip_readb(const struct flashctx *flash,
OUTL((uint32_t)addr, io_base_addr + BIOS_ROM_ADDR);
return INB(io_base_addr + BIOS_ROM_DATA);
}
@ -44,7 +44,7 @@ index 4234f6d..27b106d 100644
-#error PCI port I/O access is not supported on this architecture yet.
-#endif
diff --git a/ich_descriptors.c b/ich_descriptors.c
index b55625e..79b9c20 100644
index c9ae6cd..58d5fb3 100644
--- a/ich_descriptors.c
+++ b/ich_descriptors.c
@@ -19,8 +19,6 @@
@ -56,13 +56,13 @@ index b55625e..79b9c20 100644
#include "ich_descriptors.h"
#ifdef ICH_DESCRIPTORS_FROM_DUMP
@@ -840,4 +838,3 @@ int read_ich_descriptors_via_fdo(void *spibar, struct ich_descriptors *desc)
@@ -821,4 +819,3 @@ int read_ich_descriptors_via_fdo(void *spibar, struct ich_descriptors *desc)
return ICH_RET_OK;
}
#endif /* ICH_DESCRIPTORS_FROM_DUMP */
-#endif /* defined(__i386__) || defined(__x86_64__) */
diff --git a/ich_descriptors.h b/ich_descriptors.h
index 34bcc6a..690ba6a 100644
index 3a44740..3af4fe7 100644
--- a/ich_descriptors.h
+++ b/ich_descriptors.h
@@ -19,7 +19,6 @@
@ -79,7 +79,7 @@ index 34bcc6a..690ba6a 100644
#endif /* __ICH_DESCRIPTORS_H__ */
-#endif /* defined(__i386__) || defined(__x86_64__) */
diff --git a/ichspi.c b/ichspi.c
index 29c507a..67dda58 100644
index ce9c553..968c258 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -23,8 +23,6 @@
@ -91,14 +91,14 @@ index 29c507a..67dda58 100644
#include <string.h>
#include <stdlib.h>
#include "flash.h"
@@ -1892,5 +1890,3 @@ int via_init_spi(struct pci_dev *dev)
@@ -1891,5 +1889,3 @@ int via_init_spi(struct pci_dev *dev, uint32_t mmio_base)
return 0;
}
-
-#endif
diff --git a/it85spi.c b/it85spi.c
index a5d5c2e..8bf9f5c 100644
index 0b074eb..ec893da 100644
--- a/it85spi.c
+++ b/it85spi.c
@@ -24,8 +24,6 @@
@ -110,14 +110,14 @@ index a5d5c2e..8bf9f5c 100644
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
@@ -369,5 +367,3 @@ static int it85xx_spi_send_command(struct flashctx *flash,
@@ -370,5 +368,3 @@ static int it85xx_spi_send_command(struct flashctx *flash,
return 0;
}
-
-#endif
diff --git a/it87spi.c b/it87spi.c
index c02f77b..92ecf5c 100644
index a35ddc0..24542c2 100644
--- a/it87spi.c
+++ b/it87spi.c
@@ -23,8 +23,6 @@
@ -129,14 +129,14 @@ index c02f77b..92ecf5c 100644
#include <string.h>
#include <stdlib.h>
#include "flash.h"
@@ -405,5 +403,3 @@ static int it8716f_spi_chip_write_256(struct flashctx *flash, uint8_t *buf,
@@ -406,5 +404,3 @@ static int it8716f_spi_chip_write_256(struct flashctx *flash, uint8_t *buf,
return 0;
}
-
-#endif
diff --git a/mcp6x_spi.c b/mcp6x_spi.c
index 23f39a5..34be29e 100644
index ac40557..b40c3e8 100644
--- a/mcp6x_spi.c
+++ b/mcp6x_spi.c
@@ -23,8 +23,6 @@
@ -148,14 +148,14 @@ index 23f39a5..34be29e 100644
#include <stdlib.h>
#include <ctype.h>
#include "flash.h"
@@ -168,5 +166,3 @@ int mcp6x_spi_init(int want_spi)
@@ -169,5 +167,3 @@ int mcp6x_spi_init(int want_spi)
return 0;
}
-
-#endif
diff --git a/nic3com.c b/nic3com.c
index 473c7b1..338da53 100644
index c7fc800..3a7476b 100644
--- a/nic3com.c
+++ b/nic3com.c
@@ -18,8 +18,6 @@
@ -167,7 +167,7 @@ index 473c7b1..338da53 100644
#include <stdlib.h>
#include "flash.h"
#include "programmer.h"
@@ -133,7 +131,3 @@ static uint8_t nic3com_chip_readb(const struct flashctx *flash,
@@ -134,7 +132,3 @@ static uint8_t nic3com_chip_readb(const struct flashctx *flash,
OUTL((uint32_t)addr, io_base_addr + BIOS_ROM_ADDR);
return INB(io_base_addr + BIOS_ROM_DATA);
}
@ -176,7 +176,7 @@ index 473c7b1..338da53 100644
-#error PCI port I/O access is not supported on this architecture yet.
-#endif
diff --git a/nicnatsemi.c b/nicnatsemi.c
index eb2a7f8..1bf412c 100644
index fcfc613..b393999 100644
--- a/nicnatsemi.c
+++ b/nicnatsemi.c
@@ -18,8 +18,6 @@
@ -188,7 +188,7 @@ index eb2a7f8..1bf412c 100644
#include <stdlib.h>
#include "flash.h"
#include "programmer.h"
@@ -107,7 +105,3 @@ static uint8_t nicnatsemi_chip_readb(const struct flashctx *flash,
@@ -109,7 +107,3 @@ static uint8_t nicnatsemi_chip_readb(const struct flashctx *flash,
*/
return INB(io_base_addr + BOOT_ROM_DATA);
}
@ -197,7 +197,7 @@ index eb2a7f8..1bf412c 100644
-#error PCI port I/O access is not supported on this architecture yet.
-#endif
diff --git a/nicrealtek.c b/nicrealtek.c
index 32aa434..4a50ec5 100644
index 779d023..1752ec2 100644
--- a/nicrealtek.c
+++ b/nicrealtek.c
@@ -18,8 +18,6 @@
@ -209,7 +209,7 @@ index 32aa434..4a50ec5 100644
#include <stdlib.h>
#include "flash.h"
#include "programmer.h"
@@ -112,7 +110,3 @@ static uint8_t nicrealtek_chip_readb(const struct flashctx *flash,
@@ -124,7 +122,3 @@ static uint8_t nicrealtek_chip_readb(const struct flashctx *flash, const chipadd
return val;
}
@ -218,7 +218,7 @@ index 32aa434..4a50ec5 100644
-#error PCI port I/O access is not supported on this architecture yet.
-#endif
diff --git a/rayer_spi.c b/rayer_spi.c
index 0011bc0..c88360d 100644
index b312610..08dff07 100644
--- a/rayer_spi.c
+++ b/rayer_spi.c
@@ -28,7 +28,6 @@
@ -228,8 +228,8 @@ index 0011bc0..c88360d 100644
-#if defined(__i386__) || defined(__x86_64__)
#include <stdlib.h>
#include <string.h>
@@ -177,7 +176,3 @@ int rayer_spi_init(void)
#include <strings.h>
@@ -180,7 +179,3 @@ int rayer_spi_init(void)
return 0;
}
@ -238,7 +238,7 @@ index 0011bc0..c88360d 100644
-#error PCI port I/O access is not supported on this architecture yet.
-#endif
diff --git a/satamv.c b/satamv.c
index e39385b..45a62f7 100644
index 27ad699..19b540d 100644
--- a/satamv.c
+++ b/satamv.c
@@ -19,7 +19,6 @@
@ -258,7 +258,7 @@ index e39385b..45a62f7 100644
-#error PCI port I/O access is not supported on this architecture yet.
-#endif
diff --git a/sb600spi.c b/sb600spi.c
index e36ac96..a8d46f4 100644
index fe60aa9..d691cb6 100644
--- a/sb600spi.c
+++ b/sb600spi.c
@@ -21,8 +21,6 @@
@ -269,15 +269,15 @@ index e36ac96..a8d46f4 100644
-
#include "flash.h"
#include "programmer.h"
#include "spi.h"
@@ -322,5 +320,3 @@ int sb600_probe_spi(struct pci_dev *dev)
#include "hwaccess.h"
@@ -323,5 +321,3 @@ int sb600_probe_spi(struct pci_dev *dev)
register_spi_programmer(&spi_programmer_sb600);
return 0;
}
-
-#endif
diff --git a/wbsio_spi.c b/wbsio_spi.c
index 38ac2d8..2247f0c 100644
index 7d4bb2a..6e6eec1 100644
--- a/wbsio_spi.c
+++ b/wbsio_spi.c
@@ -18,8 +18,6 @@
@ -289,12 +289,12 @@ index 38ac2d8..2247f0c 100644
#include "flash.h"
#include "chipdrivers.h"
#include "programmer.h"
@@ -206,5 +204,3 @@ static int wbsio_spi_read(struct flashctx *flash, uint8_t *buf,
@@ -207,5 +205,3 @@ static int wbsio_spi_read(struct flashctx *flash, uint8_t *buf,
mmio_readn((void *)(flash->virtual_memory + start), buf, len);
return 0;
}
-
-#endif
--
1.7.10.4
1.7.11.5

View File

@ -1,7 +1,7 @@
From 1b05252b5ee27b9cb94e35bb7181a0ef4a15f4df Mon Sep 17 00:00:00 2001
From b56e8220a39695c4f84368552c26d95a30921aa6 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Tue, 21 Sep 2010 17:51:08 +0400
Subject: [PATCH 5/9] Simplify hwaccess.c
Subject: [PATCH 5/8] Simplify hwaccess.c
This file is saturated with superfluous ifdefs arranged into
several nested levels. This in turn adds additional complexity
@ -12,18 +12,20 @@ definitions. Also I added define(__amd64) to the list of x86-arches.
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
hwaccess.c | 92 +++++++++++++++---------------------------------------------
hwaccess.h | 18 +-----------
2 files changed, 24 insertions(+), 86 deletions(-)
hwaccess.c | 87 +++++++++++++++++++-------------------------------------------
hwaccess.h | 18 +------------
2 files changed, 27 insertions(+), 78 deletions(-)
diff --git a/hwaccess.c b/hwaccess.c
index 571edd7..62065de 100644
index e1195de..5242e5f 100644
--- a/hwaccess.c
+++ b/hwaccess.c
@@ -32,29 +32,39 @@
@@ -32,46 +32,59 @@
#include "flash.h"
#include "hwaccess.h"
#if defined(__i386__) || defined(__x86_64__)
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__amd64)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+int io_fd;
+#endif
@ -51,13 +53,34 @@ index 571edd7..62065de 100644
#endif
+}
void get_io_perms(void)
int release_io_perms(void *p)
{
+/* PCI port I/O is not yet implemented on PowerPC or MIPS. */
+#if defined(__i386__) || defined(__x86_64__) || defined(__amd64)
#if defined(__DJGPP__) || defined(__LIBPAYLOAD__)
#else
-#if defined (__sun) && (defined(__i386) || defined(__amd64))
+#if defined (__sun)
sysi86(SI86V86, V86SC_IOPL, 0);
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined (__DragonFly__)
close(io_fd);
-#else
+#else
iopl(0);
#endif
#endif
+#endif
return 0;
}
/* Get I/O permissions with automatic permission release on shutdown. */
int rget_io_perms(void)
{
+/* PCI port I/O is not yet implemented on PowerPC or MIPS. */
+#if defined(__i386__) || defined(__x86_64__) || defined(__amd64)
#if defined(__DJGPP__) || defined(__LIBPAYLOAD__)
/* We have full permissions by default. */
return;
return 0;
#else
-#if defined (__sun) && (defined(__i386) || defined(__amd64))
+#if defined (__sun)
@ -69,19 +92,9 @@ index 571edd7..62065de 100644
if (iopl(3) != 0) {
#endif
msg_perr("ERROR: Could not get I/O privileges (%s).\n"
@@ -67,74 +77,18 @@ void get_io_perms(void)
exit(1);
@@ -87,56 +100,8 @@ int rget_io_perms(void)
}
#endif
+#endif
}
void release_io_perms(void)
{
+/* PCI port I/O is not yet implemented on PowerPC or MIPS. */
+#if defined(__i386__) || defined(__x86_64__) || defined(__amd64)
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
close(io_fd);
return 0;
#endif
-}
-
@ -93,17 +106,13 @@ index 571edd7..62065de 100644
- * Such reordering and/or merging would break device accesses which
- * depend on the exact access order.
- */
- asm("eieio" : : : "memory");
- ___asm___ volatile ("eieio" : : : "memory");
-}
-
-/* PCI port I/O is not yet implemented on PowerPC. */
-void get_io_perms(void)
-{
-}
-
-/* PCI port I/O is not yet implemented on PowerPC. */
-void release_io_perms(void)
-int rget_io_perms(void)
-{
- return 0;
-}
-
-#elif defined (__mips) || defined (__mips__) || defined (_mips) || defined (mips)
@ -116,13 +125,9 @@ index 571edd7..62065de 100644
-}
-
-/* PCI port I/O is not yet implemented on MIPS. */
-void get_io_perms(void)
-{
-}
-
-/* PCI port I/O is not yet implemented on MIPS. */
-void release_io_perms(void)
-int rget_io_perms(void)
-{
- return 0;
-}
-
-#elif defined (__arm__)
@ -131,12 +136,9 @@ index 571edd7..62065de 100644
-{
-}
-
-void get_io_perms(void)
-{
-}
-
-void release_io_perms(void)
-int rget_io_perms(void)
-{
- return 0;
-}
-
-#else
@ -149,10 +151,10 @@ index 571edd7..62065de 100644
void mmio_writeb(uint8_t val, void *addr)
{
diff --git a/hwaccess.h b/hwaccess.h
index 1e276ec..be3af34 100644
index dc52118..3cf90be 100644
--- a/hwaccess.h
+++ b/hwaccess.h
@@ -209,7 +209,7 @@ cpu_to_be(64)
@@ -204,7 +204,7 @@ cpu_to_be(64)
#define off64_t off_t
#define lseek64 lseek
#endif
@ -161,7 +163,7 @@ index 1e276ec..be3af34 100644
/* Note different order for outb */
#define OUTB(x,y) outb(y, x)
#define OUTW(x,y) outw(y, x)
@@ -329,22 +329,6 @@ int libpayload_wrmsr(int addr, msr_t msr);
@@ -324,22 +324,6 @@ int libpayload_wrmsr(int addr, msr_t msr);
#define wrmsr libpayload_wrmsr
#endif
@ -185,5 +187,5 @@ index 1e276ec..be3af34 100644
#endif
--
1.7.10.4
1.7.11.5

View File

@ -1,15 +1,15 @@
From bcdcbb8e1755ddc2d5a911ff7379b48f020542c9 Mon Sep 17 00:00:00 2001
From bfca9c414154314de02800dda8948b76df3d18a1 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sun, 26 Sep 2010 18:25:31 +0400
Subject: [PATCH 6/9] Use endiannes determined at the configure stage
Subject: [PATCH 6/8] Use endiannes determined at the configure stage
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
hwaccess.h | 60 ++----------------------------------------------------------
hwaccess.h | 60 ++----------------------------------------------------------
1 file changed, 2 insertions(+), 58 deletions(-)
diff --git a/hwaccess.h b/hwaccess.h
index be3af34..7d9b108 100644
index 3cf90be..7548192 100644
--- a/hwaccess.h
+++ b/hwaccess.h
@@ -41,58 +41,6 @@
@ -94,5 +94,5 @@ index be3af34..7d9b108 100644
#define be_to_cpu8 cpu_to_be8
#define be_to_cpu16 cpu_to_be16
--
1.7.10.4
1.7.11.5

View File

@ -1,15 +1,15 @@
From 6fddd082c4c13864d45f77d696e4308223f7e3eb Mon Sep 17 00:00:00 2001
From 3f1467843fcd71147bacfbbbe913b14dd6e7be41 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Sun, 26 Sep 2010 21:05:50 +0400
Subject: [PATCH 7/9] Use HAVE_*_H macro for detecting includes
Subject: [PATCH 7/8] Use HAVE_*_H macro for detecting includes
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
hwaccess.h | 77 ++++++++++++++++++++++++++++++++++++++++++------------------
1 file changed, 54 insertions(+), 23 deletions(-)
hwaccess.h | 76 +++++++++++++++++++++++++++++++++++++++++++++-----------------
1 file changed, 56 insertions(+), 20 deletions(-)
diff --git a/hwaccess.h b/hwaccess.h
index 7d9b108..96eee0e 100644
index 7548192..0fb09f9 100644
--- a/hwaccess.h
+++ b/hwaccess.h
@@ -24,11 +24,9 @@
@ -80,7 +80,7 @@ index 7d9b108..96eee0e 100644
#define ___constant_swab8(x) ((uint8_t) ( \
(((uint8_t)(x) & (uint8_t)0xffU))))
@@ -112,18 +156,13 @@ cpu_to_be(64)
@@ -112,15 +156,15 @@ cpu_to_be(64)
#define le_to_cpu64 cpu_to_le64
#if NEED_PCI == 1
@ -93,16 +93,15 @@ index 7d9b108..96eee0e 100644
-/* for iopl and outb under Solaris */
-#if defined (__sun) && (defined(__i386) || defined(__amd64))
-#include <strings.h>
-#include <sys/sysi86.h>
-#include <sys/psw.h>
-#include <asm/sunddi.h>
-#endif
-
#if (defined(__MACH__) && defined(__APPLE__))
#define __DARWIN__
+#if (defined(__MACH__) && defined(__APPLE__))
+#define __DARWIN__
#endif
@@ -133,11 +172,6 @@ cpu_to_be(64)
/* Clarification about OUTB/OUTW/OUTL argument order:
@@ -128,11 +172,6 @@ cpu_to_be(64)
*/
#if defined(__FreeBSD__) || defined(__DragonFly__)
@ -114,7 +113,7 @@ index 7d9b108..96eee0e 100644
#define off64_t off_t
#define lseek64 lseek
#define OUTB(x, y) do { u_int outb_tmp = (y); outb(outb_tmp, (x)); } while (0)
@@ -165,8 +199,6 @@ cpu_to_be(64)
@@ -160,8 +199,6 @@ cpu_to_be(64)
#ifdef __DJGPP__
@ -123,7 +122,7 @@ index 7d9b108..96eee0e 100644
#define OUTB(x,y) outportb(y, x)
#define OUTW(x,y) outportw(y, x)
#define OUTL(x,y) outportl(y, x)
@@ -193,8 +225,6 @@ cpu_to_be(64)
@@ -188,8 +225,6 @@ cpu_to_be(64)
#define off64_t off_t
#define lseek64 lseek
#if defined(__i386__) || defined(__x86_64__)
@ -132,7 +131,7 @@ index 7d9b108..96eee0e 100644
#if defined(__NetBSD__)
#if defined(__i386__)
#define iopl i386_iopl
@@ -251,7 +281,7 @@ static inline uint32_t inl(uint16_t port)
@@ -246,7 +281,7 @@ static inline uint32_t inl(uint16_t port)
typedef struct { uint32_t hi, lo; } msr_t;
msr_t rdmsr(int addr);
int wrmsr(int addr, msr_t msr);
@ -141,7 +140,7 @@ index 7d9b108..96eee0e 100644
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
/* FreeBSD already has conflicting definitions for wrmsr/rdmsr. */
#undef rdmsr
@@ -261,7 +291,8 @@ int wrmsr(int addr, msr_t msr);
@@ -256,7 +291,8 @@ int wrmsr(int addr, msr_t msr);
typedef struct { uint32_t hi, lo; } msr_t;
msr_t freebsd_rdmsr(int addr);
int freebsd_wrmsr(int addr, msr_t msr);
@ -152,5 +151,5 @@ index 7d9b108..96eee0e 100644
#include <arch/io.h>
#include <arch/msr.h>
--
1.7.10.4
1.7.11.5

View File

@ -1,18 +1,18 @@
From e264ec74ba11b7e1b8dca5079a8b4df87b405d7c Mon Sep 17 00:00:00 2001
From a0dfa6ac54b17df25a18f32f0dc8554b975eeb30 Mon Sep 17 00:00:00 2001
From: Mattias Mattsson <vitplister@gmail.com>
Date: Wed, 27 Jul 2011 21:02:50 +0400
Subject: [PATCH 8/9] ppc hack
Subject: [PATCH 8/8] ppc hack
---
internal.c | 2 ++
processor_enable.c | 2 +-
internal.c | 2 ++
processor_enable.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/internal.c b/internal.c
index 5b24577..e5dde1f 100644
index 7b6cff2..85e6c85 100644
--- a/internal.c
+++ b/internal.c
@@ -336,6 +336,8 @@ int internal_init(void)
@@ -357,6 +357,8 @@ int internal_init(void)
"Aborting.\n");
return 1;
#endif
@ -22,18 +22,18 @@ index 5b24577..e5dde1f 100644
/* FIXME: Remove this unconditional abort once all PCI drivers are
* converted to use little-endian accesses for memory BARs.
diff --git a/processor_enable.c b/processor_enable.c
index d680f97..014e019 100644
index 1361dd5..49d4006 100644
--- a/processor_enable.c
+++ b/processor_enable.c
@@ -24,7 +24,7 @@
#include "flash.h"
#include "programmer.h"
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__powerpc__)
int processor_flash_enable(void)
{
@@ -77,7 +77,7 @@ int processor_flash_enable(void)
flashbase = 0x1fc00000;
ret = 0;
}
-#elif defined(__i386__) || defined(__x86_64__)
+#elif defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__powerpc__)
/* On x86, flash access is not processor specific except on
* AMD Elan SC520, AMD Geode and maybe other SoC-style CPUs.
* FIXME: Move enable_flash_cs5536 and get_flashbase_sc520 here.
--
1.7.10.4
1.7.11.5

View File

@ -1,62 +0,0 @@
From fd1fe86bcffcf1ac3571d2c98e4d5e91321a40cf Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Thu, 28 Jul 2011 12:56:17 +0400
Subject: [PATCH 9/9] Simplify processor.h
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
processor_enable.c | 26 +++++++++-----------------
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git a/processor_enable.c b/processor_enable.c
index 014e019..bf69330 100644
--- a/processor_enable.c
+++ b/processor_enable.c
@@ -24,19 +24,6 @@
#include "flash.h"
#include "programmer.h"
-#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__powerpc__)
-
-int processor_flash_enable(void)
-{
- /* On x86, flash access is not processor specific except on
- * AMD Elan SC520, AMD Geode and maybe other SoC-style CPUs.
- * FIXME: Move enable_flash_cs5536 and get_flashbase_sc520 here.
- */
- return 0;
-}
-
-#else
-
#if defined (__MIPSEL__) && defined (__linux)
#include <stdio.h>
#include <string.h>
@@ -83,15 +70,20 @@ static int is_loongson(void)
int processor_flash_enable(void)
{
+ int ret = 1;
/* FIXME: detect loongson on FreeBSD and OpenBSD as well. */
#if defined (__MIPSEL__) && defined (__linux)
if (is_loongson()) {
flashbase = 0x1fc00000;
- return 0;
+ ret = 0;
}
+#elif defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__powerpc__)
+ /* On x86, flash access is not processor specific except on
+ * AMD Elan SC520, AMD Geode and maybe other SoC-style CPUs.
+ * FIXME: Move enable_flash_cs5536 and get_flashbase_sc520 here.
+ */
+ ret = 0;
#endif
/* Not implemented yet. Oh well. */
- return 1;
+ return ret;
}
-
-#endif
--
1.7.10.4

View File

@ -1,14 +1,14 @@
Summary: Simple program for reading/writing BIOS chips content
Name: flashrom
Version: 0.9.5.2
Release: 5.svn1547%{?dist}
Version: 0.9.6.1
Release: 1.svn1596%{?dist}
License: GPLv2
Group: Applications/System
URL: http://flashrom.org
#Source0: http://qa.coreboot.org/releases/%{name}-%{version}.tar.bz2
#Source1: http://qa.coreboot.org/releases/%{name}-%{version}.tar.bz2.asc
## svn -r 1547 export svn://coreboot.org/flashrom/trunk flashrom-0.9.5.2
## tar -cjvf flashrom-0.9.5.2.tar.bz2 flashrom-0.9.5.2
## svn -r 1596 export svn://coreboot.org/flashrom/trunk flashrom-0.9.6.1
## tar -cjvf flashrom-0.9.6.1.tar.bz2 flashrom-0.9.6.1
Source0: %{name}-%{version}.tar.bz2
Patch1: flashrom-0001-Initial-commit-of-autotools-related-files.patch
Patch2: flashrom-0002-Use-dmidecode-path-defined-at-configure-stage.patch
@ -18,7 +18,6 @@ Patch5: flashrom-0005-Simplify-hwaccess.c.patch
Patch6: flashrom-0006-Use-endiannes-determined-at-the-configure-stage.patch
Patch7: flashrom-0007-Use-HAVE_-_H-macro-for-detecting-includes.patch
Patch8: flashrom-0008-ppc-hack.patch
Patch9: flashrom-0009-Simplify-processor.h.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: pciutils-devel
@ -32,7 +31,7 @@ Requires: udev
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# see rhbz #450273, #495226
ExclusiveArch: %{ix86} x86_64 ppc ppc64 %{arm}
ExclusiveArch: %{ix86} x86_64 ppc %{power64} %{arm}
%description
@ -50,7 +49,6 @@ and write new contents on the chips ("flash the chip").
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%build
@ -76,6 +74,7 @@ install -D -p -m 0644 util/z60_flashrom.rules %{buildroot}/lib/udev/rules.d/z60_
%clean
rm -rf %{buildroot}
%files
%doc COPYING README
%{_sbindir}/%{name}
@ -88,6 +87,17 @@ rm -rf %{buildroot}
%changelog
* Sat Sep 08 2012 Peter Lemenkov <lemenkov@gmail.com> - 0.9.6.1-1.svn1596
- Updated to the latest svn ver. 1596 (post-release snapshot for 0.9.6.1)
- (Untested) board enable for ASUS P5LD2-VM m/b
- Support for Eon EN25F64 flashchip
- Support for AJAWe added to pony_spi
- Support for Realtek RTL8169 NIC
- (Untested) board enable for DFI AD77 m/b
- Support for Via VX800/VX820, VX855/VX875, and VX900 chipsets
- Support for Atmel AT49(H)F010, AT49F080 and AT49F080T flashchips
- Support (board enable) for Biostar M7VIQ m/b
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5.2-5.svn1547
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

View File

@ -1 +1 @@
bebbdbb728ed830d38e0998c7556f37b flashrom-0.9.5.2.tar.bz2
ed96b618efc128041e55cb6133b35b76 flashrom-0.9.6.1.tar.bz2