7 comments:
File src/commonlib/include/commonlib/coreboot_tables.h:
bytes
Done
uint32_t num_blocks; /* Number of writeable blocks in SMM */
uint32_t block_size; /* Size of a block in byte. Default: 64 KiB */
uint32_t mmap_addr; /* MMIO address of the store for read only access */
uint32_t com_buffer; /* Physical address of the communication buffer */
uint32_t com_buffer_size; /* Size of the communication buffer in byte */
uint8_t apm_cmd; /* The command byte to write to the APM I/O port */
uint8_t unused[3]; /* Set to zero */
nit: line up the comments
Done
File src/drivers/smmstore/ramstage.c:
could use APM_CNT here but you'd have to pass another register like edx.
Done
File src/drivers/smmstore/ramstage.c:
Patch Set #16, Line 62: $0xb2
APM_CNT ?
Done
File src/drivers/smmstore/store.c:
/* Better safe than sorry */
if (!store_initialized) {
printk(BIOS_ERR, "smm store: No com buffer installed yet\n");
return -1;
}
if (lookup_store(&store) < 0) {
printk(BIOS_ERR, "smm store: lookup failed\n");
return -1;
}
if ((block_id * SMM_BLOCK_SIZE) >= region_device_sz(&store)) {
printk(BIOS_ERR, "smm store: block ID out of range\n");
return -1;
}
this is repeated 3 times, consider refactoring
Done
Patch Set #14, Line 39: SMMSTORE of at least 256KiB of size
maybe add a compile time check of CONFIG_SMMSTORE_SIZE if CONFIG_SMMSTOREV2 is enabled.
This requirement only applies when using SMMSTOREv2 with EDK2 FaultTolerantWrite. See comment on PS1.
Turned most of the comment into documentation, and clarified this part.
* Version 2 of the SMM requires as SMMSTORE of at least 256KiB of size, that
* has to be aligned to 64KiB.
* This allows the payload to store raw data in the SMMSTORE flash region.
* This can be used by a FaultTolerantWrite implementation, that uses at least
* two regions in an A/B update scheme.
There are usually 3 regions used by EDK. […]
Thank you for the explanation. I've turned the ever-growing comment into documentation.
To view, visit change 40520. To unsubscribe, or for help writing mail filters, visit settings.