Tools: Auto-allocation PID starts from max fixed PID + 1

Usually manifests are listed in ascending order by PID.
This patch starts auto-allocation PID from the maximum fixed PIDs
so that the generated pid.h can have a ascending order with PIDs
as well.

This is sometimes helpful in debugging to know which type of Partition
a certain PID is, for example a test Partition or not.
Because Partition list is usually sorted by types as well.

Change-Id: Ie3b5a5af093140cddfb34337b34bacf96a5aae0b
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/tools/tfm_parse_manifest_list.py b/tools/tfm_parse_manifest_list.py
index 3fd8f5c..6142165 100644
--- a/tools/tfm_parse_manifest_list.py
+++ b/tools/tfm_parse_manifest_list.py
@@ -207,10 +207,9 @@
                                'loadinfo_file': load_info_file})
 
     # Automatically assign PIDs for partitions without 'pid' attribute
-    pid = 256
+    pid = max(pid_list, default = 256 - 1)
     for idx in no_pid_manifest_idx:
-        while pid in pid_list:
-            pid += 1
+        pid += 1
         all_manifests[idx]['pid'] = pid
         pid_list.append(pid)