David Hendricks (dhendrix@chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2701
-gerrit
commit cb0b051b445e1056d8d6a776c03e0a3005a9a3ee Author: David Hendricks dhendrix@chromium.org Date: Tue Mar 12 22:00:43 2013 -0700
exynos5250/snow: enable branch prediction
This enables branch prediction. We can probably find a better place to do this, but for now we'll do it in snow's romstage main().
Change-Id: I86c7b6bc9e897a7a432c490fb96a126e81b8ce72 Signed-off-by: David Hendricks dhendrix@chromium.org --- src/cpu/samsung/exynos5250/bootblock.c | 16 ---------------- src/mainboard/google/snow/romstage.c | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/src/cpu/samsung/exynos5250/bootblock.c b/src/cpu/samsung/exynos5250/bootblock.c index e2f05ef..a5eac6e 100644 --- a/src/cpu/samsung/exynos5250/bootblock.c +++ b/src/cpu/samsung/exynos5250/bootblock.c @@ -17,22 +17,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
-#if 0 -/* - * Set/clear program flow prediction and return the previous state. - */ -static int config_branch_prediction(int set_cr_z) -{ - unsigned int cr; - - /* System Control Register: 11th bit Z Branch prediction enable */ - cr = get_cr(); - set_cr(set_cr_z ? cr | CR_Z : cr & ~CR_Z); - - return cr & CR_Z; -} -#endif - void bootblock_cpu_init(void); void bootblock_cpu_init(void) { diff --git a/src/mainboard/google/snow/romstage.c b/src/mainboard/google/snow/romstage.c index 83d5105..26247b7 100644 --- a/src/mainboard/google/snow/romstage.c +++ b/src/mainboard/google/snow/romstage.c @@ -51,6 +51,20 @@ static int board_wakeup_permitted(void) } #endif
+/* + * Set/clear program flow prediction and return the previous state. + */ +static int config_branch_prediction(int set_cr_z) +{ + unsigned int cr; + + /* System Control Register: 11th bit Z Branch prediction enable */ + cr = get_cr(); + set_cr(set_cr_z ? cr | CR_Z : cr & ~CR_Z); + + return cr & CR_Z; +} + static void initialize_s5p_mshc(void) { /* MMC0: Fixed, 8 bit mode, connected with GPIO. */ @@ -80,6 +94,10 @@ void main(void) int ret; void *entry;
+ /* FIXME: if we boot from USB, we need to disable branch prediction + * before copying from USB into RAM */ + config_branch_prediction(1); + clock_set_rate(PERIPH_ID_SPI1, 50000000); /* set spi clock to 50Mhz */
/* Clock must be initialized before console_init, otherwise you may need