Shaunak Saha (shaunak.saha(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15325
-gerrit
commit 77a1a7a8e6cfd469917a8f530d0b9d83d71d43e4
Author: Shaunak Saha <shaunak.saha(a)intel.com>
Date: Fri Jun 10 19:36:49 2016 -0700
intel/amenia: GPE routing for amenia
This patch sets the devicetree for gpe0_dw configuration
and also confgigures the GPIO lines for SCI.EC_SCI_GPI
is configured to proper value and the gpio_tier1_sci_en bit in acpi
register is set by adding a dummy method in GPE scope.
BUG = chrome-os-partner:53438
TEST = Toggle pch_sci_l from ec console using gpioset command
and see that the sci counter increases in /sys/firmware/acpi/interrupt
and also 9 in /proc/interrupt
Change-Id: I3ae9ef7c6a3c8688bcb6cb4c73f5618e7cde342c
Signed-off-by: Shaunak Saha <shaunak.saha(a)intel.com>
---
src/mainboard/intel/amenia/acpi/mainboard.asl | 6 ++++++
src/mainboard/intel/amenia/devicetree.cb | 9 +++++++++
src/mainboard/intel/amenia/ec.h | 5 ++---
src/mainboard/intel/amenia/gpio.h | 2 +-
4 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/mainboard/intel/amenia/acpi/mainboard.asl b/src/mainboard/intel/amenia/acpi/mainboard.asl
index a679471..535360a 100644
--- a/src/mainboard/intel/amenia/acpi/mainboard.asl
+++ b/src/mainboard/intel/amenia/acpi/mainboard.asl
@@ -117,3 +117,9 @@ Scope (\_SB.PCI0.LPCB)
#include <drivers/pc80/tpm/acpi/tpm.asl>
#include "ec.asl"
}
+
+Scope(\_GPE)
+{
+ /* Dummy method for the Tier 1 GPIO SCI enable bit */
+ Method(_L0F, 0) {}
+}
diff --git a/src/mainboard/intel/amenia/devicetree.cb b/src/mainboard/intel/amenia/devicetree.cb
index 2080d6f..711b96d 100644
--- a/src/mainboard/intel/amenia/devicetree.cb
+++ b/src/mainboard/intel/amenia/devicetree.cb
@@ -15,6 +15,15 @@ chip soc/intel/apollolake
# 0x1A[6:0] stands for 26*125 = 3250 pSec delay for SDR104/HS200
register "emmc_tx_data_cntl1" = "0x1A1A" # HS400 required
+ # GPE configuration
+ # Note that GPE events called out in ASL code rely on this
+ # route, i.e., If this route changes then the affected GPE
+ # offset bits also needs to be changed. This sets the PMC register
+ # GPE_CFG fields.
+ register "gpe0_dw1" = "PMC_GPE_N_31_0"
+ register "gpe0_dw2" = "PMC_GPE_N_63_32"
+ register "gpe0_dw3" = "PMC_GPE_SW_31_0"
+
device domain 0 on
device pci 00.0 on end # - Host Bridge
device pci 00.1 on end # - DPTF
diff --git a/src/mainboard/intel/amenia/ec.h b/src/mainboard/intel/amenia/ec.h
index 91890fd..bfb7b13 100644
--- a/src/mainboard/intel/amenia/ec.h
+++ b/src/mainboard/intel/amenia/ec.h
@@ -20,9 +20,8 @@
#include <ec/google/chromeec/ec_commands.h>
-/* This is the GPE status bit.
- TODO: Fix this to proper bit matching GPE routing table */
-#define EC_SCI_GPI 15
+/* 32 from GPE0a which is reserved + GPIO_11 for SCI */
+#define EC_SCI_GPI GPE0_DW1_11
#define MAINBOARD_EC_SCI_EVENTS \
(EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED) |\
diff --git a/src/mainboard/intel/amenia/gpio.h b/src/mainboard/intel/amenia/gpio.h
index 87d6190..48bc144 100644
--- a/src/mainboard/intel/amenia/gpio.h
+++ b/src/mainboard/intel/amenia/gpio.h
@@ -239,7 +239,7 @@ static const struct pad_config gpio_table[] = {
PAD_CFG_NF(GPIO_8, NATIVE, DEEP, NF1),
PAD_CFG_GPI(GPIO_9, UP_20K, DEEP), /* SPI_TPM_IRQ_N */
PAD_NC(GPIO_10, DN_20K), /* RSVD for MIPI (unused) */
- PAD_CFG_GPI_SCI(GPIO_11, UP_20K, DEEP, LEVEL, NONE),
+ PAD_CFG_GPI_SCI(GPIO_11, UP_20K, DEEP, EDGE_SINGLE, NONE),
/* SOC_WAKE_SCI_N */
PAD_NC(GPIO_12, DN_20K),
PAD_NC(GPIO_13, DN_20K),
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15555
-gerrit
commit b3946a2465d108bee82279ff2f82bf6b05661205
Author: Martin Roth <martinroth(a)google.com>
Date: Wed Jul 6 15:05:19 2016 -0600
payloads/iPXE: Fix PXE Kconfig question
As reported by Andrew Engelbrecht on the coreboot mailing list, there
was an issue when selecting the pxe rom file:
When using "make menuconfig", if "add pxe rom" is selected, then
the field below to set to the path of the pxe rom, the "add pxe rom"
option gets disabled.
This problem seems to be due to the use of the 'optional' Kconfig
keyword, so this section of the Kconfig is rewitten here to remove that
keyword and fix the issue.
Change-Id: I51680cb746160cb853c8679ac64e2d37989cb574
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
payloads/external/iPXE/Kconfig | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/payloads/external/iPXE/Kconfig b/payloads/external/iPXE/Kconfig
index d425d51..aa8d92d 100644
--- a/payloads/external/iPXE/Kconfig
+++ b/payloads/external/iPXE/Kconfig
@@ -11,11 +11,17 @@
## GNU General Public License for more details.
##
-choice
+config PXE
prompt "Add a PXE ROM"
- default PXE_ROM
+ def_bool n
depends on ARCH_X86
- optional
+
+if PXE
+menu "PXE Options"
+
+choice
+ prompt "PXE ROM to use"
+ default PXE_ROM
config PXE_ROM
bool "Add an existing PXE ROM image"
@@ -59,7 +65,6 @@ config PXE_ROM_FILE
config PXE_ROM_ID
string "network card PCI IDs"
- depends on PXE_ROM || BUILD_IPXE
default "10ec,8168"
help
The comma-separated PCI vendor and device ID that would associate
@@ -72,3 +77,6 @@ config PXE_ROM_ID
network card (also in hex, without "0x" prefix).
Under GNU/Linux you can run `lspci -nn` to list the IDs of your PCI devices.
+
+endmenu
+endif
the following patch was just integrated into master:
commit 2566f9173d478b25275a1afbbd792634902a52c4
Author: Werner Zeh <werner.zeh(a)siemens.com>
Date: Wed Jul 6 06:44:42 2016 +0200
siemens/mc_bdx1: Add usage of Siemens NC FPGA driver
Enable NC FPGA driver for this mainboard.
Change-Id: I87b6b10038f3d161a25b2008b7ea44b5627cca43
Signed-off-by: Werner Zeh <werner.zeh(a)siemens.com>
Reviewed-on: https://review.coreboot.org/15545
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
See https://review.coreboot.org/15545 for details.
-gerrit
the following patch was just integrated into master:
commit 6c571462e54f702b17737a344dcd3af0be21a294
Author: Werner Zeh <werner.zeh(a)siemens.com>
Date: Tue Jul 5 07:16:34 2016 +0200
siemens/nc_fpga: Add driver for Siemens NC FPGA
Add driver code to initialize Siemens NC FPGA as PCI device.
Beside some glue logic it contains a FAN controller and
temperature monitor.
Change-Id: I2cb722a60081028ee5a8251f51125f12ed38d824
Signed-off-by: Werner Zeh <werner.zeh(a)siemens.com>
Reviewed-on: https://review.coreboot.org/15543
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
See https://review.coreboot.org/15543 for details.
-gerrit
Jonathan Neuschäfer (j.neuschaefer(a)gmx.net) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15553
-gerrit
commit 192628c42c7c1098dcaf75f030a7869e16c922fd
Author: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
Date: Wed Jul 6 22:08:46 2016 +0200
northbridge/amd/amdmct: Fix array indexing
CH_D_BC_RCVRDLY is an array with dimensions [2][4]. The intention of the
patched line was probably to point just behind the CH_D_BC_RCVRDLY field
in struct DCTStatStruc, but this is achieved by using index [1][4] or
[2][0].
Change-Id: Ia5da83cc369ca85ffc507a56a535698cbfa6bc39
Reported-By: GCC 6.1.0
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
---
src/northbridge/amd/amdmct/mct/mct_d.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/northbridge/amd/amdmct/mct/mct_d.c b/src/northbridge/amd/amdmct/mct/mct_d.c
index 0e59e1d..c3b4589 100644
--- a/src/northbridge/amd/amdmct/mct/mct_d.c
+++ b/src/northbridge/amd/amdmct/mct/mct_d.c
@@ -3633,7 +3633,7 @@ static void mct_ResetDataStruct_D(struct MCTStatStruc *pMCTstat,
p[i] = 0;
}
- start = (u32)(&((struct DCTStatStruc *)0)->CH_D_BC_RCVRDLY[2][4]);
+ start = (u32)(&((struct DCTStatStruc *)0)->CH_D_BC_RCVRDLY[1][4]);
stop = sizeof(struct DCTStatStruc);
for (i = start; i < stop; i++) {
p[i] = 0;
the following patch was just integrated into master:
commit 9007ffd3d1b7c079c791e90ec52243eac385979f
Author: Werner Zeh <werner.zeh(a)siemens.com>
Date: Wed Jul 6 08:47:56 2016 +0200
PCI: Use PCI_DEVFN macro instead of DEV_FUNC
There are several different macros available to convert a PCI device and
function to a single 8 bit value. One is PCI_DEVFN and is defined in
device/pci_def.h. The other is DEV_FUNC and is defined in several intel
fsp based chipset implementations. In fsp_broadwell_de DEV_FUNC is even
used without being defined at all. This patch unifies the situation so
that only PCI_DEVFN is used.
Change-Id: Ia1c6d7f3683badc66d15053846936d88aa836632
Signed-off-by: Werner Zeh <werner.zeh(a)siemens.com>
Reviewed-on: https://review.coreboot.org/15546
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See https://review.coreboot.org/15546 for details.
-gerrit
hakim giydan (hgiydan(a)marvell.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15335
-gerrit
commit 7e20679732616cf0f1fd153b29f72cedf83ed4a2
Author: Hakim Giydan <hgiydan(a)marvell.com>
Date: Wed Jul 6 12:51:30 2016 -0700
arch: Add ARMv7-R configuration
This change adds armv7-r configuration for romstage and verstage,
and any other files needed to initialize an amrv7-r processor.
ARMv7-R is an ARM processor based on the Cortex-R series.
Currently, there is already support for the Cortex-M series,
so the same files had been renamed and reused for Cortex-R series
as well.
Change-Id: If94415d07fd6bd96c43d087374f609a2211f1885
Signed-off-by: Hakim Giydan <hgiydan(a)marvell.com>
---
src/arch/arm/armv7/Kconfig | 8 +++
src/arch/arm/armv7/Makefile.inc | 33 +++++++++--
src/arch/arm/armv7/bootblock_m.S | 50 ----------------
src/arch/arm/armv7/bootblock_mr.S | 50 ++++++++++++++++
src/arch/arm/armv7/cache_m.c | 79 --------------------------
src/arch/arm/armv7/cache_mr.c | 79 ++++++++++++++++++++++++++
src/arch/arm/armv7/cpu_r.S | 116 ++++++++++++++++++++++++++++++++++++++
src/arch/arm/armv7/exception_m.c | 36 ------------
src/arch/arm/armv7/exception_mr.c | 36 ++++++++++++
util/xcompile/xcompile | 3 +-
10 files changed, 320 insertions(+), 170 deletions(-)
diff --git a/src/arch/arm/armv7/Kconfig b/src/arch/arm/armv7/Kconfig
index 0ab3542..4fe3fd7 100644
--- a/src/arch/arm/armv7/Kconfig
+++ b/src/arch/arm/armv7/Kconfig
@@ -19,3 +19,11 @@ config ARCH_BOOTBLOCK_ARMV7_M
config ARCH_VERSTAGE_ARMV7_M
def_bool n
select ARCH_VERSTAGE_ARM
+
+config ARCH_VERSTAGE_ARMV7_R
+ def_bool n
+ select ARCH_VERSTAGE_ARM
+
+config ARCH_ROMSTAGE_ARMV7_R
+ def_bool n
+ select ARCH_ROMSTAGE_ARM
diff --git a/src/arch/arm/armv7/Makefile.inc b/src/arch/arm/armv7/Makefile.inc
index 2e9c49c..4cf5368 100644
--- a/src/arch/arm/armv7/Makefile.inc
+++ b/src/arch/arm/armv7/Makefile.inc
@@ -3,6 +3,7 @@
## This file is part of the coreboot project.
##
## Copyright (C) 2013 The ChromiumOS Authors
+## Copyright (C) 2016 Marvell Inc.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -18,9 +19,10 @@
armv7_flags = -mthumb -I$(src)/arch/arm/include/armv7/ -D__COREBOOT_ARM_ARCH__=7
armv7-a_flags = -march=armv7-a $(armv7_flags)
armv7-m_flags = -march=armv7-m $(armv7_flags)
+armv7-r_flags = -march=armv7-r $(armv7_flags)
armv7_asm_flags = -Wa,-mthumb -Wa,-mimplicit-it=always -Wa,-mno-warn-deprecated
-
+armv7-r_asm_flags = $(armv7-r_flags) $(armv7_asm_flags)
###############################################################################
# bootblock
###############################################################################
@@ -44,10 +46,10 @@ bootblock-generic-ccopts += $(armv7-m_flags)
bootblock-S-ccopts += $(armv7_asm_flags)
ifneq ($(CONFIG_BOOTBLOCK_CUSTOM),y)
-bootblock-y += bootblock_m.S
+bootblock-y += bootblock_mr.S
endif
-bootblock-y += exception_m.c
-bootblock-y += cache_m.c
+bootblock-y += exception_mr.c
+bootblock-y += cache_mr.c
endif # CONFIG_ARCH_BOOTBLOCK_ARMV7
@@ -73,6 +75,17 @@ libverstage-S-ccopts += $(armv7_asm_flags)
verstage-generic-ccopts += $(armv7-m_flags)
verstage-S-ccopts += $(armv7_asm_flags)
+else ifeq ($(CONFIG_ARCH_VERSTAGE_ARMV7_R),y)
+libverstage-generic-ccopts += $(armv7-r_flags)
+libverstage-S-ccopts += $(armv7-r_asm_flags)
+verstage-generic-ccopts += $(armv7-r_flags)
+verstage-S-ccopts += $(armv7-r_asm_flags)
+
+verstage-y += cache_mr.c
+verstage-y += cpu_r.S
+verstage-y += exception_mr.c
+verstage-y += mmu.c
+
endif # CONFIG_ARCH_VERSTAGE_ARMV7_M
################################################################################
@@ -91,6 +104,18 @@ romstage-S-ccopts += $(armv7_asm_flags)
rmodules_arm-generic-ccopts += $(armv7-a_flags)
rmodules_arm-S-ccopts += $(armv7_asm_flags)
+else ifeq ($(CONFIG_ARCH_ROMSTAGE_ARMV7_R),y)
+romstage-y += cache_mr.c
+romstage-y += cpu_r.S
+romstage-y += exception_mr.c
+romstage-y += mmu.c
+
+romstage-generic-ccopts += $(armv7-r_flags)
+romstage-S-ccopts += $(armv7-r_asm_flags)
+
+rmodules_arm-generic-ccopts += $(armv7-r_flags)
+rmodules_arm-S-ccopts += $(armv7-r_asm_flags)
+
endif # CONFIG_ARCH_ROMSTAGE_ARMV7
###############################################################################
diff --git a/src/arch/arm/armv7/bootblock_m.S b/src/arch/arm/armv7/bootblock_m.S
deleted file mode 100644
index 2e46ca0..0000000
--- a/src/arch/arm/armv7/bootblock_m.S
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- */
-
-#include <arch/asm.h>
-
-ENTRY(_start)
- /*
- * Initialize the stack to a known value. This is used to check for
- * stack overflow later in the boot process.
- */
- ldr r0, =_stack
- ldr r1, =_estack
- ldr r2, =0xdeadbeef
-init_stack_loop:
- str r2, [r0]
- add r0, #4
- cmp r0, r1
- bne init_stack_loop
-
-call_bootblock:
- ldr sp, =_estack /* Set up stack pointer */
- bl main
-ENDPROC(_start)
diff --git a/src/arch/arm/armv7/bootblock_mr.S b/src/arch/arm/armv7/bootblock_mr.S
new file mode 100644
index 0000000..2e46ca0
--- /dev/null
+++ b/src/arch/arm/armv7/bootblock_mr.S
@@ -0,0 +1,50 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2014 Google Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+#include <arch/asm.h>
+
+ENTRY(_start)
+ /*
+ * Initialize the stack to a known value. This is used to check for
+ * stack overflow later in the boot process.
+ */
+ ldr r0, =_stack
+ ldr r1, =_estack
+ ldr r2, =0xdeadbeef
+init_stack_loop:
+ str r2, [r0]
+ add r0, #4
+ cmp r0, r1
+ bne init_stack_loop
+
+call_bootblock:
+ ldr sp, =_estack /* Set up stack pointer */
+ bl main
+ENDPROC(_start)
diff --git a/src/arch/arm/armv7/cache_m.c b/src/arch/arm/armv7/cache_m.c
deleted file mode 100644
index ec8a970..0000000
--- a/src/arch/arm/armv7/cache_m.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2014 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * cache.c: Cache maintenance routines for ARMv7-M
- */
-
-#include <stdint.h>
-
-#include <arch/cache.h>
-
-void tlb_invalidate_all(void)
-{
-}
-
-void dcache_clean_all(void)
-{
-}
-
-void dcache_clean_invalidate_all(void)
-{
-}
-
-void dcache_invalidate_all(void)
-{
-}
-
-unsigned int dcache_line_bytes(void)
-{
- return 0;
-}
-
-void dcache_clean_by_mva(void const *addr, size_t len)
-{
-}
-
-void dcache_clean_invalidate_by_mva(void const *addr, size_t len)
-{
-}
-
-void dcache_invalidate_by_mva(void const *addr, size_t len)
-{
-}
-
-void dcache_mmu_disable(void)
-{
-}
-
-void dcache_mmu_enable(void)
-{
-}
-
-void cache_sync_instructions(void)
-{
-}
diff --git a/src/arch/arm/armv7/cache_mr.c b/src/arch/arm/armv7/cache_mr.c
new file mode 100644
index 0000000..d584465
--- /dev/null
+++ b/src/arch/arm/armv7/cache_mr.c
@@ -0,0 +1,79 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2014 Google Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * cache.c: Cache maintenance routines for ARMv7-M & ARMv7-R
+ */
+
+#include <stdint.h>
+
+#include <arch/cache.h>
+
+void tlb_invalidate_all(void)
+{
+}
+
+void dcache_clean_all(void)
+{
+}
+
+void dcache_clean_invalidate_all(void)
+{
+}
+
+void dcache_invalidate_all(void)
+{
+}
+
+unsigned int dcache_line_bytes(void)
+{
+ return 0;
+}
+
+void dcache_clean_by_mva(void const *addr, size_t len)
+{
+}
+
+void dcache_clean_invalidate_by_mva(void const *addr, size_t len)
+{
+}
+
+void dcache_invalidate_by_mva(void const *addr, size_t len)
+{
+}
+
+void dcache_mmu_disable(void)
+{
+}
+
+void dcache_mmu_enable(void)
+{
+}
+
+void cache_sync_instructions(void)
+{
+}
diff --git a/src/arch/arm/armv7/cpu_r.S b/src/arch/arm/armv7/cpu_r.S
new file mode 100644
index 0000000..5c53def
--- /dev/null
+++ b/src/arch/arm/armv7/cpu_r.S
@@ -0,0 +1,116 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2016 Marvell, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <arch/asm.h>
+
+ENTRY(cpu_disable_dcache)
+
+ /* Read System Control Register configuration dat */
+ mrc p15, 0, R0, c1, c0, 0
+
+ bic R0, R0, #0x1 <<2
+ dsb
+
+ /* disable data cache */
+ mcr p15, 0, R0, c1, c0, 0
+
+ bx lr
+
+ENDPROC(cpu_disable_dcache)
+
+ENTRY(cpu_enable_dcache)
+
+ /* Read System Control Register configuration data */
+ mcr p15, 0, R1, c1, c0, 0
+
+ orr R1, R1, #0x1 <<2
+ mov R0, #0
+ dsb
+
+ /* Invalidate entire data cache */
+ mcr p15, 0, r0, c15, c5, 0
+
+ /* enabled data cache */
+ mcr p15, 0, R1, c1, c0, 0
+
+ bx lr
+
+ENDPROC(cpu_enable_dcache)
+
+ENTRY(cpu_disable_icache)
+
+ /* Read System Control Register configuration data */
+ mcr p15, 0, R0, c1, c0, 0
+
+ /* enable instruction cache */
+ bic R0, R0, #0x1 <<12
+
+ /* disable instruction cache */
+ mcr p15, 0, R0, c1, c0, 0
+
+ isb
+
+ bx lr
+
+ENDPROC(cpu_disable_icache)
+
+ENTRY(cpu_enable_icache)
+
+ /* Read System Control Register configuration data */
+ mrc p15, 0, R1, c1, c0, 0
+
+ /* enable instruction cache */
+ orr R1, R1, #0x1 <<12
+
+ mov R0, #0
+
+ /* Invalidate entire instruction cache */
+ mcr p15, 0, r0, c7, c5, 0
+
+ /* enable instruction cache */
+ mcr p15, 0, R1, c1, c0, 0
+
+ isb
+
+ bx lr
+
+ENDPROC(cpu_enable_icache)
+
+ENTRY(cpu_init)
+
+ mrc p15,0,r0,c9,c14,0
+ mov r0, $1
+ mcr p15,0,r0,c9,c14,0
+
+ /* read performance monitor control register into R0 */
+ mrc p15, 0, r0, c9, c12, 0
+
+ /* set the enable-bit for the performance counters and cycle counter */
+ orr r0, r0, #1
+
+ /* write the perfomance monitor control register back */
+ mcr p15, 0, r0, c9, c12, 0
+
+ /* load the bit-mask into r0 */
+ mov r0, #0x80000000
+
+ /* write the bit-mask to the enable set register
+ * and enable cycle counter bit
+ */
+ mcr p15, 0, r0, c9, c12, 1
+
+ bx lr
+
+ENDPROC(cpu_init)
diff --git a/src/arch/arm/armv7/exception_m.c b/src/arch/arm/armv7/exception_m.c
deleted file mode 100644
index d76cc6a..0000000
--- a/src/arch/arm/armv7/exception_m.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * This file is part of the libpayload project.
- *
- * Copyright 2013 Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <arch/exception.h>
-#include <console/console.h>
-
-void exception_init(void)
-{
- printk(BIOS_DEBUG, "Exception handlers not installed.\n");
-}
diff --git a/src/arch/arm/armv7/exception_mr.c b/src/arch/arm/armv7/exception_mr.c
new file mode 100644
index 0000000..d76cc6a
--- /dev/null
+++ b/src/arch/arm/armv7/exception_mr.c
@@ -0,0 +1,36 @@
+/*
+ * This file is part of the libpayload project.
+ *
+ * Copyright 2013 Google Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <arch/exception.h>
+#include <console/console.h>
+
+void exception_init(void)
+{
+ printk(BIOS_DEBUG, "Exception handlers not installed.\n");
+}
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index 13a0e8f..c030545 100755
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -5,6 +5,7 @@
# Copyright (C) 2007-2010 coresystems GmbH
# Copyright (C) 2012 Google Inc
# Copyright (C) 2016 Raptor Engineering, LLC
+# Copyright (C) 2016 Marvell Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -316,7 +317,7 @@ arch_config_arm() {
TBFDARCHS="littlearm"
TCLIST="armv7-a armv7a arm"
TWIDTH="32"
- TSUPP="arm armv4 armv7 armv7_m"
+ TSUPP="arm armv4 armv7 armv7_m armv7_r"
TABI="eabi"
}