summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2011-07-19 16:37:47 +0800
committerSimon Glass <sjg@chromium.org>2011-08-29 10:59:03 -0700
commit6c2ebfc71c7bd7246146acbaefb1aa266bf1b863 (patch)
tree20f617c984a9a463d1e3b943256190e8f44827bb /board
parentbce870b71d2af4ee8a7989db7b0fe2b5e4cdd550 (diff)
CHROMIUM: Fix RW firmware memory layout (FMAP) for updating
- Sections should not have duplicated names. "SHARED_SPARE" is removed. It's OK to have unallocated space in memory map. - After checking with the firmware memory map spec, DEV_CFG is exactly the one designed for "SHARED_ENV" -- to hold settings for developer mode firmware and modifiable by user. - VBLOCK should be in start of RW_SECTION, and aligned for 4k for updating BUG=chromium-os:17646,chromium-os:17857 TEST=./build_packages; dump_fmap /build/tegra2_aebl/u-boot/image.bin # verified the layout is as expected. Change-Id: I694003074eb90d2cd68a586ed41d6a303a84cced Reviewed-on: http://gerrit.chromium.org/gerrit/4298 Reviewed-by: Che-Liang Chiou <clchiou@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/nvidia/seaboard/flashmap-twostop-2mb.dtsi77
-rw-r--r--board/nvidia/seaboard/flashmap-twostop-4mb.dtsi89
2 files changed, 94 insertions, 72 deletions
diff --git a/board/nvidia/seaboard/flashmap-twostop-2mb.dtsi b/board/nvidia/seaboard/flashmap-twostop-2mb.dtsi
index 6ce20fd38a..dbdf14c48a 100644
--- a/board/nvidia/seaboard/flashmap-twostop-2mb.dtsi
+++ b/board/nvidia/seaboard/flashmap-twostop-2mb.dtsi
@@ -26,17 +26,15 @@
/* ---- Section: Rewritable slot A ---- */
rw-a@100000 {
label = "rw-section-a";
+ /* Alignment: 4k (for updating) */
reg = <0x00100000 0x00078000>;
block-lba = <0x00000022>;
};
- rw-a-boot@100000 {
- label = "fw-main-a";
- reg = <0x00100000 0x00076000>;
- type = "blob boot";
- };
- rw-a-vblock@176000 {
+ rw-a-vblock@100000 {
label = "vblock-a";
- reg = <0x00176000 0x00001f00>;
+ /* Alignment: 4k (for updating) and must be in start of
+ * each RW_SECTION. */
+ reg = <0x00100000 0x00002000>;
type = "keyblock boot";
keyblock = "dev_firmware.keyblock";
signprivate = "dev_firmware_data_key.vbprivk";
@@ -44,7 +42,14 @@
kernelkey = "kernel_subkey.vbpubk";
preamble-flags = <1>;
};
+ rw-a-boot@102000 {
+ /* Alignment: no requirement (yet). */
+ label = "fw-main-a";
+ reg = <0x00102000 0x00075000>;
+ type = "blob boot";
+ };
rw-a-firmware-id@177f00 {
+ /* Alignment: no requirement. */
label = "rw-fwid-a";
reg = <0x00177f00 0x00000100>;
read-only;
@@ -54,17 +59,15 @@
/* ---- Section: Rewritable slot B ---- */
rw-b@178000 {
label = "rw-section-b";
+ /* Alignment: 4k (for updating) */
reg = <0x00178000 0x00078000>;
block-lba = <0x00000422>;
};
- rw-b-boot@178000 {
- label = "fw-main-b";
- reg = <0x00178000 0x00076000>;
- type = "blob boot";
- };
- rw-b-vblock@1ee000 {
+ rw-b-vblock@178000 {
label = "vblock-b";
- reg = <0x001ee000 0x00001f00>;
+ /* Alignment: 4k (for updating) and must be in start of
+ * each RW_SECTION. */
+ reg = <0x00178000 0x00002000>;
type = "keyblock boot";
keyblock = "firmware.keyblock";
signprivate = "firmware_data_key.vbprivk";
@@ -72,8 +75,15 @@
kernelkey = "kernel_subkey.vbpubk";
preamble-flags = <1>;
};
+ rw-b-boot@17a000 {
+ label = "fw-main-b";
+ /* Alignment: no requirement (yet). */
+ reg = <0x0017a000 0x00075000>;
+ type = "blob boot";
+ };
rw-b-firmware-id@1eff00 {
- label = "rw-fwid-a";
+ label = "rw-fwid-b";
+ /* Alignment: no requirement. */
reg = <0x001eff00 0x00000100>;
read-only;
type = "blobstring fwid";
@@ -82,37 +92,44 @@
/* ---- Section: Rewritable VPD 32 KB ---- */
rw-vpd@1f0000 {
label = "rw-vpd";
+ /* Alignment: 4k (for updating) */
reg = <0x001f0000 0x00008000>;
type = "wiped";
wipe-value = [ff];
};
- /* ---- Section: Rewritable shared 32 KB---- */
+ /* ---- Section: Rewritable shared 16 KB---- */
shared-section@1f8000 {
+ /* Alignment: 4k (for updating).
+ * Anything in this range may be updated in recovery. */
label = "rw-shared";
- reg = <0x001f8000 0x00006000>;
- };
- shared-dev-cfg@1f8000 {
- label = "dev-cfg";
- reg = <0x001f8000 0x00000000>;
- type = "wiped";
- wipe-value = [00];
+ reg = <0x001f8000 0x00004000>;
};
shared-data@1f8000 {
label = "shared-data";
- reg = <0x001f8000 0x00006000>;
+ /* Alignment: 4k (for random read/write).
+ * RW firmware can put calibration data here. */
+ reg = <0x001f8000 0x00004000>;
type = "wiped";
wipe-value = [00];
};
- shared-env@1fe000 {
- label = "shared-env";
+ /* ---- Section: Rewritable private 16 KB---- */
+ private-section@1fc000 {
+ /* Anything in this range will never be updated */
+ label = "rw-private";
+ reg = <0x001fc000 0x00004000>;
+ };
+ dev-cfg@1fe000 {
+ label = "dev-cfg";
+ /* Alignment: 4k, and must occupy bottom of U-Boot
+ * firmware -- check CONFIG_ENV_OFFSET */
reg = <0x001fe000 0x00002000>;
/*
- * We could put the dev environment here, but U-Boot
- * has a default built in. Devs can 'saveenv' to set
- * this up.
- */
+ * We could put the dev environment here, but U-Boot has
+ * a default built in. Devs can 'saveenv' to set this
+ * up.
+ */
type = "wiped";
wipe-value = [00];
};
diff --git a/board/nvidia/seaboard/flashmap-twostop-4mb.dtsi b/board/nvidia/seaboard/flashmap-twostop-4mb.dtsi
index ab7c95a940..9ff6ae42cd 100644
--- a/board/nvidia/seaboard/flashmap-twostop-4mb.dtsi
+++ b/board/nvidia/seaboard/flashmap-twostop-4mb.dtsi
@@ -39,25 +39,17 @@
"chromeos,flashmap";
reg = <0x00000000 0x00400000>;
- /* ---- Section: Spare. unused 1MB---- */
- ro-spare@100000 {
- label = "shared-spare";
- reg = <0x00100000 0x00100000>;
- };
-
/* ---- Section: Rewritable slot A ---- */
rw-a@200000 {
label = "rw-section-a";
+ /* Alignment: 4k (for updating) */
reg = <0x00200000 0x00078000>;
};
- rw-a-boot@200000 {
- label = "fw-main-a";
- reg = <0x00200000 0x00076000>;
- type = "blob boot";
- };
- rw-a-vblock@276000 {
+ rw-a-vblock@200000 {
label = "vblock-a";
- reg = <0x00276000 0x00001f00>;
+ /* Alignment: 4k (for updating) and must be in start of
+ * each RW_SECTION. */
+ reg = <0x00200000 0x00002000>;
type = "keyblock boot";
keyblock = "dev_firmware.keyblock";
signprivate = "dev_firmware_data_key.vbprivk";
@@ -65,7 +57,14 @@
kernelkey = "kernel_subkey.vbpubk";
preamble-flags = <1>;
};
+ rw-a-boot@202000 {
+ /* Alignment: no requirement (yet). */
+ label = "fw-main-a";
+ reg = <0x00202000 0x00075000>;
+ type = "blob boot";
+ };
rw-a-firmware-id@277f00 {
+ /* Alignment: no requirement. */
label = "rw-fwid-a";
reg = <0x00277f00 0x00000100>;
read-only;
@@ -75,16 +74,14 @@
/* ---- Section: Rewritable slot B ---- */
rw-b@278000 {
label = "rw-section-b";
+ /* Alignment: 4k (for updating) */
reg = <0x00278000 0x00078000>;
};
- rw-b-boot@278000 {
- label = "fw-main-b";
- reg = <0x00278000 0x00076000>;
- type = "blob boot";
- };
- rw-b-vblock@2ee000 {
+ rw-b-vblock@278000 {
label = "vblock-b";
- reg = <0x002ee000 0x00001f00>;
+ /* Alignment: 4k (for updating) and must be in start of
+ * each RW_SECTION. */
+ reg = <0x00278000 0x00002000>;
type = "keyblock boot";
keyblock = "firmware.keyblock";
signprivate = "firmware_data_key.vbprivk";
@@ -92,8 +89,15 @@
kernelkey = "kernel_subkey.vbpubk";
preamble-flags = <1>;
};
+ rw-b-boot@27a000 {
+ label = "fw-main-b";
+ /* Alignment: no requirement (yet). */
+ reg = <0x0027a000 0x00075000>;
+ type = "blob boot";
+ };
rw-b-firmware-id@2eff00 {
- label = "rw-fwid-a";
+ label = "rw-fwid-b";
+ /* Alignment: no requirement. */
reg = <0x002eff00 0x00000100>;
read-only;
type = "blobstring fwid";
@@ -102,45 +106,46 @@
/* ---- Section: Rewritable VPD 32 KB ---- */
rw-vpd@2f0000 {
label = "rw-vpd";
+ /* Alignment: 4k (for updating) */
reg = <0x002f0000 0x00008000>;
type = "wiped";
wipe-value = [ff];
};
- /* ---- Section: Rewritable shared 32 KB---- */
+ /* ---- Section: Rewritable shared 16 KB---- */
shared-section@2f8000 {
+ /* Alignment: 4k (for updating).
+ * Anything in this range may be updated in recovery. */
label = "rw-shared";
- reg = <0x002f8000 0x00006000>;
- };
- shared-dev-cfg@2f8000 {
- label = "dev-cfg";
- reg = <0x002f8000 0x00000000>;
- type = "wiped";
- wipe-value = [00];
+ reg = <0x002f8000 0x00004000>;
};
shared-data@2f8000 {
label = "shared-data";
- reg = <0x002f8000 0x00006000>;
+ /* Alignment: 4k (for random read/write).
+ * RW firmware can put calibration data here. */
+ reg = <0x002f8000 0x00004000>;
type = "wiped";
wipe-value = [00];
};
- shared-env@2fe000 {
- label = "shared-env";
+ /* ---- Section: Rewritable private 16 KB---- */
+ private-section@2fc000 {
+ /* Anything in this range will never be updated */
+ label = "rw-private";
+ reg = <0x002fc000 0x00004000>;
+ };
+ dev-cfg@2fe000 {
+ label = "dev-cfg";
+ /* Alignment: 4k, and must occupy bottom of U-Boot
+ * firmware -- check CONFIG_ENV_OFFSET */
reg = <0x002fe000 0x00002000>;
/*
- * We could put the dev environment here, but U-Boot
- * has a default built in. Devs can 'saveenv' to set
- * this up.
- */
+ * We could put the dev environment here, but U-Boot has
+ * a default built in. Devs can 'saveenv' to set this
+ * up.
+ */
type = "wiped";
wipe-value = [00];
};
-
- /* ---- Section: Spare. unused 1MB---- */
- shared-spare@300000 {
- label = "shared-spare";
- reg = <0x00300000 0x00100000>;
- };
};
};