Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
87abe30b
Commit
87abe30b
authored
Mar 07, 2014
by
Sandrine Bailleux
Browse files
juno: Expose NIC-400 constants in the platform header file
It is easier to have all platform constants in the same place.
parent
5d4c8643
Changes
2
Hide whitespace changes
Inline
Side-by-side
plat/juno/bl1_plat_setup.c
View file @
87abe30b
...
...
@@ -103,10 +103,14 @@ void bl1_early_platform_setup(void)
}
/*
* Address of slave 'n' security setting in the NIC-400 address region
* control
* TODO: Ideally this macro should be moved in a "nic-400.h" header file but
* it would be the only thing in there so it's not worth it at the moment.
*/
#define NIC400_ADDR_CTRL_SECURITY_REG(n) (0x8 + (n) * 4)
#define SOC_NIC400_S5_BIT_UART1 (1u << 12)
static
void
init_nic400
(
void
)
{
/*
...
...
@@ -119,20 +123,30 @@ static void init_nic400(void)
/*
* Allow non-secure access to some SOC regions, excluding UART1, which
* remains secure. Note: This is a NIC-400 device on the SOC
* remains secure.
* Note: This is the NIC-400 device on the SOC
*/
mmio_write_32
(
SOC_NIC400_BASE
+
NIC400_ADDR_CTRL_SECURITY_REG
(
0
),
~
0
);
// USB_EHCI
mmio_write_32
(
SOC_NIC400_BASE
+
NIC400_ADDR_CTRL_SECURITY_REG
(
1
),
~
0
);
// TLX_MASTER
mmio_write_32
(
SOC_NIC400_BASE
+
NIC400_ADDR_CTRL_SECURITY_REG
(
2
),
~
0
);
// USB_OHCI
mmio_write_32
(
SOC_NIC400_BASE
+
NIC400_ADDR_CTRL_SECURITY_REG
(
3
),
~
0
);
mmio_write_32
(
SOC_NIC400_BASE
+
NIC400_ADDR_CTRL_SECURITY_REG
(
4
),
~
0
);
// PCIe
mmio_write_32
(
SOC_NIC400_BASE
+
NIC400_ADDR_CTRL_SECURITY_REG
(
5
),
~
SOC_NIC400_S5_BIT_UART1
);
mmio_write_32
(
SOC_NIC400_BASE
+
NIC400_ADDR_CTRL_SECURITY_REG
(
SOC_NIC400_USB_EHCI
),
~
0
);
mmio_write_32
(
SOC_NIC400_BASE
+
NIC400_ADDR_CTRL_SECURITY_REG
(
SOC_NIC400_TLX_MASTER
),
~
0
);
mmio_write_32
(
SOC_NIC400_BASE
+
NIC400_ADDR_CTRL_SECURITY_REG
(
SOC_NIC400_USB_OHCI
),
~
0
);
mmio_write_32
(
SOC_NIC400_BASE
+
NIC400_ADDR_CTRL_SECURITY_REG
(
SOC_NIC400_PL354_SMC
),
~
0
);
mmio_write_32
(
SOC_NIC400_BASE
+
NIC400_ADDR_CTRL_SECURITY_REG
(
SOC_NIC400_APB4_BRIDGE
),
~
0
);
mmio_write_32
(
SOC_NIC400_BASE
+
NIC400_ADDR_CTRL_SECURITY_REG
(
SOC_NIC400_BOOTSEC_BRIDGE
),
~
SOC_NIC400_BOOTSEC_BRIDGE_UART1
);
/*
* Allow non-secure access to some CSS regions.
* Note: This is
a
NIC-400 device on the CSS
* Note: This is
the
NIC-400 device on the CSS
*/
mmio_write_32
(
CSS_NIC400_BASE
+
NIC400_ADDR_CTRL_SECURITY_REG
(
8
),
~
0
);
mmio_write_32
(
CSS_NIC400_BASE
+
NIC400_ADDR_CTRL_SECURITY_REG
(
CSS_NIC400_SLAVE_BOOTSECURE
),
~
0
);
}
...
...
plat/juno/platform.h
View file @
87abe30b
...
...
@@ -117,7 +117,6 @@
/* Following covers Columbus Peripherals excluding NSROM and NSRAM */
#define DEVICE0_BASE 0x20000000
#define DEVICE0_SIZE 0x0e000000
#define CSS_NIC400_BASE 0x2a000000
#define TZC400_BASE 0x2a4a0000
#define MHU_BASE 0x2b1f0000
...
...
@@ -127,7 +126,6 @@
/* Following covers Juno Peripherals and PCIe expansion area */
#define DEVICE1_BASE 0x40000000
#define DEVICE1_SIZE 0x40000000
#define SOC_NIC400_BASE 0x7fd00000
#define PCIE_CONTROL_BASE 0x7ff20000
#define DRAM_BASE 0x80000000
...
...
@@ -239,6 +237,36 @@
#define PL011_UART3_BASE 0x1c0c0000
#define PL011_BASE PL011_UART0_BASE
/*******************************************************************************
* NIC-400 related constants
******************************************************************************/
/* CSS NIC-400 Global Programmers View (GPV) */
#define CSS_NIC400_BASE 0x2a000000
/* The slave_bootsecure controls access to GPU, DMC and CS. */
#define CSS_NIC400_SLAVE_BOOTSECURE 8
/* SoC NIC-400 Global Programmers View (GPV) */
#define SOC_NIC400_BASE 0x7fd00000
#define SOC_NIC400_USB_EHCI 0
#define SOC_NIC400_TLX_MASTER 1
#define SOC_NIC400_USB_OHCI 2
#define SOC_NIC400_PL354_SMC 3
/*
* The apb4_bridge controls access to:
* - the PCIe configuration registers
* - the MMU units for USB, HDLCD and DMA
*/
#define SOC_NIC400_APB4_BRIDGE 4
/*
* The bootsec_bridge controls access to a bunch of peripherals, e.g. the UARTs.
*/
#define SOC_NIC400_BOOTSEC_BRIDGE 5
#define SOC_NIC400_BOOTSEC_BRIDGE_UART1 (1 << 12)
/*******************************************************************************
* Declarations and constants to access the mailboxes safely. Each mailbox is
* aligned on the biggest cache line size in the platform. This is known only
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment