view gsm-fw/cfgmagic/feature.pirhack-ffs @ 923:10b4bed10192

gsm-fw/L1: fix for the DSP patch corruption bug The L1 code we got from the LoCosto fw contains a feature for DSP CPU load measurement. This feature is a LoCosto-ism, i.e., not applicable to earlier DBB chips (Calypso) with their respective earlier DSP ROMs. Most of the code dealing with that feature is conditionalized as #if (DSP >= 38), but one spot was missed, and the MCU code was writing into an API word dealing with this feature. In TCS211 this DSP API word happens to be used by the DSP code patch, hence that write was corrupting the patched DSP code.
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Mon, 19 Oct 2015 17:13:56 +0000
parents 6e7410f7975c
children 042c178ebac5
line wrap: on
line source

# Concerning the FFS, there is one fundamental difference between the gtamodem
# and pirelli targets: whereas the content of Openmoko's modem FFS is directly
# fit for reuse by our fw (resulting from the phylogenetic proximity of the two
# firmwares), Pirelli's original FFS has the same format, but its content is so
# different that trying to reuse it would be more trouble than it is worth.
# (And Pirelli's FFS contains no IMEI or RF calibration data to boot!)
#
# Therefore, I (FC developer Space Falcon) have decided that when targeting the
# Pirelli, it would be better for us to start from our own blank FFS than to
# deal with the original.  However, because there is no single correct answer
# as to which region of the flash chip we should use (other than needing to be
# in the flash2 bank so we can use the more efficient multibank flash driver),
# this feature pirhack-ffs takes two required arguments: the number of the
# first flash2 sector to be used for the FFS and the total number of sectors
# to be used.  For example, this setting:
#
# feature pirhack-ffs 24 7
#
# will configure our GSM fw to put its FFS in the last 7 256 KiB sectors of the
# 2nd flash chip select, which coincidentally form an independent read/write
# bank, and are part of the flash2 region which appears to be "unused" by the
# original firmware.  Or you can use all of this "unused" area like this:
#
# feature pirhack-ffs 18 13
#
# The sum of the two numbers must not exceed 31, i.e., the end of our FFS must
# be at or before the end of the "large sectors" main part of flash2.
# Specifying feature pirhack-ffs 0 18 will make our FFS use the same sectors
# as the original, but attempting to reuse the original FFS without reformatting
# is NOT recommended or supported.

if [ $TARGET != pirelli ]
then
	echo \
	"Error: feature pirhack-ffs is applicable only to target pirelli" 1>&2
	exit 1
fi

if [ $# != 3 ]
then
	echo "feature pirhack-ffs: two arguments required" 1>&2
	exit 1
fi

FFS_IN_RAM=0
CONFIG_PIRHACK_FFS=1
CONFIG_PIRHACK_FFS_START=$2
CONFIG_PIRHACK_FFS_NBLOCKS=$3
CONFIG_FLASH_WRITE=1
export_to_c	CONFIG_PIRHACK_FFS
export_to_c	CONFIG_PIRHACK_FFS_START
export_to_c	CONFIG_PIRHACK_FFS_NBLOCKS
export_to_c	CONFIG_FLASH_WRITE