Project

General

Profile

Actions

ExynosModemIsolation » History » Revision 3

« Previous | Revision 3/23 (diff) | Next »
Paul Kocialkowski, 03/15/2013 11:21 PM


S5PC110 Hardware Design

This explains the hardware design found in many S5PC110 phones.

Hardware design matrix

Chip Controlled by the CPU Controlled by the modem Connected to the modem
GPS Yes No No?
Audio CODEC Yes No Yes
NAND Yes No No
RAM Yes Yes (96Mib at least) Yes
WiFi/Bluetooth Yes No No
Sensors Yes No No
NFC Yes No No
Camera Yes No No

Modem isolation

The modem (XMM 6160) is separated from the SoC and communicates with it via serial over 16Mib of shared memory: this is bad since it means that RAM is compromised (at least 80Mib + 16Mib = 96Mib) and can be used to spy.
Regarding audio, the modem is connected to the CODEC but cannot control it (the SoC has to enable routing from/to the modem).
There is no evidence that the GPS is connected to the modem, but since we cannot check on the hardware, there is no proof it's not connected to it either. The SoC is able to control the GPS power though, so we can keep it off.
Since the SoC has to load the modem firmware over the (fake) serial, and following the datasheets, the modem is not connected to the NAND.

Shared RAM issue

The modem is able to spy on (at least) 96 Mib of the main memory. So far, we cannot tell:
  • if it can only spy 80Mib or the full memory
  • if it can be fixed or not

Kernel details

kernel-crespo/arch/arm/mach-s5pv210/dev-herring-phone.c:

static struct resource mdmctl_res[] = {
[...]
        [2] = {
                .name = "onedram",
                .start = (S5PV210_PA_SDRAM + 0x05000000),
                .end = (S5PV210_PA_SDRAM + 0x05000000 + SZ_16M - 1),
                .flags = IORESOURCE_MEM,
        },
};

  • S5PV210_PA_SDRAM is 0x30000000
  • 0x05000000 is 80Mib
  • mdmctl_res goes in a platform device struct which is passed to the modem driver:
static struct platform_device modemctl = {
        .name = "modemctl",
        .id = -1,
        .num_resources = ARRAY_SIZE(mdmctl_res),
        .resource = mdmctl_res,
        .dev = {
                .platform_data = &mdmctl_data,
        },
};

And in the board file (in kernel-crespo/arch/arm/mach-s5pv210/mach-herring.c) we have:

static void __init herring_fixup(struct machine_desc *desc,
                struct tag *tags, char **cmdline,
                struct meminfo *mi)
{
        mi->bank[0].start = 0x30000000;
        mi->bank[0].size = 80 * SZ_1M;
        mi->bank[0].node = 0;

So we can suppose that there is at least one ram chip that is shared between the modem and the main CPU. Avoiding the use of this memory bank would result in loosing 80Mib of memory.

Updated by Paul Kocialkowski about 11 years ago · 3 revisions

Also available in: PDF HTML TXT