Commit bd649d40 authored by Michael Ellerman's avatar Michael Ellerman
Browse files

powerpc: Add PVR & CPU name to hardware description



Add the PVR and CPU name to the hardware description, which is printed
at boot and in case of an oops.

eg: Hardware name: ... POWER8E (raw) 0x4b0201

Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220930082709.55830-2-mpe@ellerman.id.au
parent 41dc0563
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
#include <linux/libfdt.h>
#include <linux/cpu.h>
#include <linux/pgtable.h>
#include <linux/seq_buf.h>

#include <asm/rtas.h>
#include <asm/page.h>
@@ -819,6 +820,9 @@ void __init early_init_devtree(void *params)

	dt_cpu_ftrs_scan();

	// We can now add the CPU name & PVR to the hardware description
	seq_buf_printf(&ppc_hw_desc, "%s 0x%04lx ", cur_cpu_spec->cpu_name, mfspr(SPRN_PVR));

	/* Retrieve CPU related informations from the flat tree
	 * (altivec support, boot CPU ID, ...)
	 */