]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
km-powerpc: define CONFIG_PRAM to protect PHRAM and PNVRAM
authorValentin Longchamp <valentin.longchamp@keymile.com>
Wed, 13 Aug 2014 08:24:04 +0000 (10:24 +0200)
committerYork Sun <yorksun@freescale.com>
Wed, 20 Aug 2014 17:44:16 +0000 (10:44 -0700)
When u-boot initializes the RAM (early in boot) it looks for the "pram"
env variable to know which is area it cannot use. If the "pram" env variable
is not found, the default CONFIG_PRAM value is used.

This value used to be 0 (no protection at all). This patch sets it to a
value that covers PHRAM and PNVRAM that must be protected in our case.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
include/configs/km/km-powerpc.h

index 763c5bad82c40d095470c34ec85db5be1a9a46a4..eb85a7491910b1038f941839ea2099974b0a9e9f 100644 (file)
@@ -59,8 +59,9 @@
 #define CONFIG_KM_PHRAM                0x100000
 /* resereved pram area at the end of memroy [hex] */
 #define CONFIG_KM_RESERVED_PRAM        0x0
-/* enable protected RAM */
-#define CONFIG_PRAM            0
+/* set the default PRAM value to at least PNVRAM + PHRAM when pram env variable
+ * is not valid yet, which is the case for when u-boot copies itself to RAM */
+#define CONFIG_PRAM            ((CONFIG_KM_PNVRAM + CONFIG_KM_PHRAM)>>10)
 
 #define CONFIG_KM_CRAMFS_ADDR  0x800000
 #define CONFIG_KM_KERNEL_ADDR  0x400000        /* 3968Kbytes */