console: Add an SoC-specific post-code call
Add a post-code call that SoCs can hook to output or save in any way that is specific to that SoC. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I0369e4362840d7506d301105d8e1e2fd865919f4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68545 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
		@@ -5,6 +5,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/* Write POST information */
 | 
					/* Write POST information */
 | 
				
			||||||
void __weak arch_post_code(uint8_t value) { }
 | 
					void __weak arch_post_code(uint8_t value) { }
 | 
				
			||||||
 | 
					void __weak soc_post_code(uint8_t value) { }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Some mainboards have very nice features beyond just a simple display.
 | 
					/* Some mainboards have very nice features beyond just a simple display.
 | 
				
			||||||
 * They can override this function.
 | 
					 * They can override this function.
 | 
				
			||||||
@@ -18,6 +19,8 @@ void post_code(uint8_t value)
 | 
				
			|||||||
		   for displaying POST so keep it first. */
 | 
							   for displaying POST so keep it first. */
 | 
				
			||||||
		arch_post_code(value);
 | 
							arch_post_code(value);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							soc_post_code(value);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (CONFIG(CONSOLE_POST))
 | 
							if (CONFIG(CONSOLE_POST))
 | 
				
			||||||
			printk(BIOS_INFO, "POST: 0x%02x\n", value);
 | 
								printk(BIOS_INFO, "POST: 0x%02x\n", value);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,6 +16,7 @@
 | 
				
			|||||||
void post_code(u8 value);
 | 
					void post_code(u8 value);
 | 
				
			||||||
void mainboard_post(u8 value);
 | 
					void mainboard_post(u8 value);
 | 
				
			||||||
void arch_post_code(u8 value);
 | 
					void arch_post_code(u8 value);
 | 
				
			||||||
 | 
					void soc_post_code(uint8_t value);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void __noreturn die(const char *fmt, ...);
 | 
					void __noreturn die(const char *fmt, ...);
 | 
				
			||||||
#define die_with_post_code(value, fmt, ...) \
 | 
					#define die_with_post_code(value, fmt, ...) \
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user