[coreboot-gerrit] Change in coreboot[master]: x86/acpigen: Fix acpigen_write_field

Duncan Laurie (Code Review) gerrit at coreboot.org
Thu Apr 27 16:57:38 CEST 2017


Duncan Laurie has posted comments on this change. ( https://review.coreboot.org/19435 )

Change subject: x86/acpigen: Fix acpigen_write_field
......................................................................


Patch Set 1:

(1 comment)

https://review.coreboot.org/#/c/19435/1/src/arch/x86/acpigen.c
File src/arch/x86/acpigen.c:

PS1, Line 420: 	uint8_t i, j;
             : 	uint8_t emit[4];
             : 
             : 	i = 1;
             : 	if (size < 0x40) {
             : 		emit[0] = size & 0x3F;
             : 	} else {
             : 		emit[0] = size & 0xF;
             : 		size >>= 4;
             : 		while (size) {
             : 			emit[i] = size & 0xFF;
             : 			i++;
             : 			size >>= 8;
             : 		}
             : 	}
             : 	/* Update bit 7:6 : Number of bytes followed by emit[0] */
             : 	emit[0] |= (i - 1) << 6;
This looks like the same code from the above acpigen_write_field_offset(), could it be extracted and re-used by both functions?


-- 
To view, visit https://review.coreboot.org/19435
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iac3600f184e6bd36a2bcb85753110692fbcbe4b6
Gerrit-PatchSet: 1
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Patrick Rudolph <siro at das-labor.org>
Gerrit-Reviewer: Duncan Laurie <dlaurie at chromium.org>
Gerrit-Reviewer: build bot (Jenkins)
Gerrit-HasComments: Yes



More information about the coreboot-gerrit mailing list