aboutsummaryrefslogtreecommitdiff
path: root/platforms
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2016-11-08 15:25:46 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-11-08 16:51:27 +1100
commit5611389876a748e19b7593d4eb426ced7a6ed31f (patch)
tree53c6669911a5326db0616a7f31abf48184262e97 /platforms
parent566150620014c5ee941dd84480fb8b6223abbb33 (diff)
downloadskiboot-5611389876a748e19b7593d4eb426ced7a6ed31f.zip
skiboot-5611389876a748e19b7593d4eb426ced7a6ed31f.tar.gz
skiboot-5611389876a748e19b7593d4eb426ced7a6ed31f.tar.bz2
Add BMC platform to enable correct OEM IPMI commands
An out of tree platform (p8dtu) uses a different IPMI OEM command for IPMI_PARTIAL_ADD_ESEL. This exposed some assumptions about the BMC implementation in our core code. Now, with platform.bmc, each platform can dictate (or detect) the BMC that is present. We allow it to be set at runtime rather than purely statically in struct platform as it's possible to have differing BMC implementations on the one machine (e.g. AMI BMC or OpenBMC). Acked-by: Jeremy Kerr <jk@ozlabs.org> [stewart@linux.vnet.ibm.com: remove enum, update (C) years] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'platforms')
-rw-r--r--platforms/astbmc/astbmc.h4
-rw-r--r--platforms/astbmc/common.c8
-rw-r--r--platforms/astbmc/firestone.c3
-rw-r--r--platforms/astbmc/garrison.c3
-rw-r--r--platforms/astbmc/habanero.c3
-rw-r--r--platforms/astbmc/palmetto.c3
6 files changed, 18 insertions, 6 deletions
diff --git a/platforms/astbmc/astbmc.h b/platforms/astbmc/astbmc.h
index 322282e..3ef8dbf 100644
--- a/platforms/astbmc/astbmc.h
+++ b/platforms/astbmc/astbmc.h
@@ -1,4 +1,4 @@
-/* Copyright 2013-2014 IBM Corp.
+/* Copyright 2013-2016 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,6 +41,8 @@ struct slot_table_entry {
const struct slot_table_entry *children;
};
+extern const struct bmc_platform astbmc_ami;
+
extern void astbmc_early_init(void);
extern int64_t astbmc_ipmi_reboot(void);
extern int64_t astbmc_ipmi_power_down(uint64_t request);
diff --git a/platforms/astbmc/common.c b/platforms/astbmc/common.c
index e1a8a4d..6e678a1 100644
--- a/platforms/astbmc/common.c
+++ b/platforms/astbmc/common.c
@@ -1,4 +1,4 @@
-/* Copyright 2013-2014 IBM Corp.
+/* Copyright 2013-2016 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -357,3 +357,9 @@ void astbmc_early_init(void)
prd_init();
}
+
+const struct bmc_platform astbmc_ami = {
+ .name = "AMI",
+ .ipmi_oem_partial_add_esel = IPMI_CODE(0x32, 0xf0),
+ .ipmi_oem_pnor_access_status = IPMI_CODE(0x3a, 0x07),
+};
diff --git a/platforms/astbmc/firestone.c b/platforms/astbmc/firestone.c
index c4e6b2a..d2c4d14 100644
--- a/platforms/astbmc/firestone.c
+++ b/platforms/astbmc/firestone.c
@@ -1,4 +1,4 @@
-/* Copyright 2013-2014 IBM Corp.
+/* Copyright 2013-2016 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -146,6 +146,7 @@ static bool firestone_probe(void)
DECLARE_PLATFORM(firestone) = {
.name = "Firestone",
+ .bmc = &astbmc_ami,
.probe = firestone_probe,
.init = astbmc_init,
.pci_get_slot_info = slot_table_get_slot_info,
diff --git a/platforms/astbmc/garrison.c b/platforms/astbmc/garrison.c
index f400a51..ed504ac 100644
--- a/platforms/astbmc/garrison.c
+++ b/platforms/astbmc/garrison.c
@@ -1,4 +1,4 @@
-/* Copyright 2013-2014 IBM Corp.
+/* Copyright 2013-2016 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -293,6 +293,7 @@ static bool garrison_probe(void)
DECLARE_PLATFORM(garrison) = {
.name = "Garrison",
+ .bmc = &astbmc_ami,
.probe = garrison_probe,
.init = astbmc_init,
.pci_get_slot_info = slot_table_get_slot_info,
diff --git a/platforms/astbmc/habanero.c b/platforms/astbmc/habanero.c
index 738aa63..86e49bf 100644
--- a/platforms/astbmc/habanero.c
+++ b/platforms/astbmc/habanero.c
@@ -1,4 +1,4 @@
-/* Copyright 2013-2014 IBM Corp.
+/* Copyright 2013-2016 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -141,6 +141,7 @@ static bool habanero_probe(void)
DECLARE_PLATFORM(habanero) = {
.name = "Habanero",
+ .bmc = &astbmc_ami,
.probe = habanero_probe,
.init = astbmc_init,
.pci_get_slot_info = slot_table_get_slot_info,
diff --git a/platforms/astbmc/palmetto.c b/platforms/astbmc/palmetto.c
index 033f103..0c7feff 100644
--- a/platforms/astbmc/palmetto.c
+++ b/platforms/astbmc/palmetto.c
@@ -1,4 +1,4 @@
-/* Copyright 2013-2014 IBM Corp.
+/* Copyright 2013-2016 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -46,6 +46,7 @@ static bool palmetto_probe(void)
DECLARE_PLATFORM(palmetto) = {
.name = "Palmetto",
.probe = palmetto_probe,
+ .bmc = &astbmc_ami,
.init = astbmc_init,
.external_irq = astbmc_ext_irq_serirq_cpld,
.cec_power_down = astbmc_ipmi_power_down,