Skip to content

Commit 079b90d

Browse files
ChangSeokBaebp3tk0v
authored andcommitted
x86/microcode/intel: Define staging state struct
Define a staging_state struct to simplify function prototypes by consolidating relevant data, instead of passing multiple local variables. Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Tony Luck <tony.luck@intel.com> Tested-by: Anselm Busse <abusse@amazon.de> Link: https://lore.kernel.org/20250320234104.8288-1-chang.seok.bae@intel.com
1 parent 740144b commit 079b90d

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

  • arch/x86/kernel/cpu/microcode

arch/x86/kernel/cpu/microcode/intel.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,23 @@ struct extended_sigtable {
5454
struct extended_signature sigs[];
5555
};
5656

57+
/**
58+
* struct staging_state - Track the current staging process state
59+
*
60+
* @mmio_base: MMIO base address for staging
61+
* @ucode_len: Total size of the microcode image
62+
* @chunk_size: Size of each data piece
63+
* @bytes_sent: Total bytes transmitted so far
64+
* @offset: Current offset in the microcode image
65+
*/
66+
struct staging_state {
67+
void __iomem *mmio_base;
68+
unsigned int ucode_len;
69+
unsigned int chunk_size;
70+
unsigned int bytes_sent;
71+
unsigned int offset;
72+
};
73+
5774
#define DEFAULT_UCODE_TOTALSIZE (DEFAULT_UCODE_DATASIZE + MC_HEADER_SIZE)
5875
#define EXT_HEADER_SIZE (sizeof(struct extended_sigtable))
5976
#define EXT_SIGNATURE_SIZE (sizeof(struct extended_signature))

0 commit comments

Comments
 (0)