Maxim Polyakov uploaded patch set #6 to this change.

View Change

util/intelp2m: Abandon use of global macro struct instance

Using one globally instance of the macro structure is a bad and
non-functional solution. Every time need to make sure that all the
structure fields are updated before the process of creating a new macro
begins. At the same time, information about the previous macro is lost.
Get rid of the shared instance and move all the structures to dynamic
memory to make the code more functional and safer. If the structure is
no longer in use, then the garbage collector will take care of it.

Change the interface for decoding fields to make better use of chained
operations.

Tests:
- make test = PASS
- gpio.h for Apollo Lake before and after the patch is the same

Change-Id: I6390182ab00d9ebd787e8da6f341e3ef85572991
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
---
M util/intelp2m/fields/cb/cb.go
M util/intelp2m/fields/cb/cb_test.go
M util/intelp2m/fields/fields.go
M util/intelp2m/fields/fsp/fsp.go
M util/intelp2m/fields/fsp/fsp_test.go
M util/intelp2m/fields/raw/raw.go
M util/intelp2m/fields/raw/raw_test.go
M util/intelp2m/fields/test/suite.go
M util/intelp2m/platforms/apollo/apollo.go
M util/intelp2m/platforms/common/macros/macros.go
M util/intelp2m/platforms/sunrise/sunrise.go
11 files changed, 196 insertions(+), 150 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/71235/6

To view, visit change 71235. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I6390182ab00d9ebd787e8da6f341e3ef85572991
Gerrit-Change-Number: 71235
Gerrit-PatchSet: 6
Gerrit-Owner: Maxim Polyakov <max.senia.poliak@gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: newpatchset