util/spd_tools: Add max ID check for auto-generated IDs to part_id_gen
commit780b04e639976eabc784ac40f802ee0fc9275056
authorReka Norman <rekanorman@google.com>
Thu, 16 Sep 2021 00:12:31 +0000 (16 10:12 +1000)
committerFurquan Shaikh <furquan@google.com>
Tue, 21 Sep 2021 17:21:23 +0000 (21 17:21 +0000)
treecd37c276dd26dc076d362112bb6996fed5135584
parentc9686d22b173ce10951097021c1a14f03ab9bb8a
util/spd_tools: Add max ID check for auto-generated IDs to part_id_gen

Currently, the maximum part ID of 15 is enforced only for manually
assigned IDs. Also enforce it for automatically assigned IDs.

BUG=b:191776301
TEST=part_id_gen fails when the number of part IDs which would be
assigned is greater than MaxMemoryId.

Signed-off-by: Reka Norman <rekanorman@google.com>
Change-Id: I802190a13b68439ccbcdb28300ccc5fd1b38a9c9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57691
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
util/spd_tools/src/part_id_gen/part_id_gen.go