aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/processor.c
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2019-02-08 18:28:13 +0100
committerHelge Deller <deller@gmx.de>2019-02-21 20:37:13 +0100
commit8207d4ee44d3f525bf9aa57807ac9db5d0d90c1a (patch)
tree13c14cc3d981f137402301355c92cf4f58abb351 /arch/parisc/kernel/processor.c
parentparisc: Add constants for PDC_RELOCATE PDC call (diff)
downloadlinux-dev-8207d4ee44d3f525bf9aa57807ac9db5d0d90c1a.tar.xz
linux-dev-8207d4ee44d3f525bf9aa57807ac9db5d0d90c1a.zip
parisc: Show machine product number during boot
Ask PDC firmware during boot for the original and current product number as well as the serial number and show it (if available). Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to '')
-rw-r--r--arch/parisc/kernel/processor.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c
index 82bd0d0927ce..7f4d042856b5 100644
--- a/arch/parisc/kernel/processor.c
+++ b/arch/parisc/kernel/processor.c
@@ -242,6 +242,7 @@ static int __init processor_probe(struct parisc_device *dev)
void __init collect_boot_cpu_data(void)
{
unsigned long cr16_seed;
+ char orig_prod_num[64], current_prod_num[64], serial_no[64];
memset(&boot_cpu_data, 0, sizeof(boot_cpu_data));
@@ -301,6 +302,14 @@ void __init collect_boot_cpu_data(void)
_parisc_requires_coherency = (boot_cpu_data.cpu_type == mako) ||
(boot_cpu_data.cpu_type == mako2);
#endif
+
+ if (pdc_model_platform_info(orig_prod_num, current_prod_num, serial_no) == PDC_OK) {
+ printk(KERN_INFO "product %s, original product %s, S/N: %s\n",
+ current_prod_num, orig_prod_num, serial_no);
+ add_device_randomness(orig_prod_num, strlen(orig_prod_num));
+ add_device_randomness(current_prod_num, strlen(current_prod_num));
+ add_device_randomness(serial_no, strlen(serial_no));
+ }
}