aboutsummaryrefslogtreecommitdiff
path: root/include/capp.h
diff options
context:
space:
mode:
authorChristophe Lombard <clombard@linux.vnet.ibm.com>2017-06-13 14:21:21 +0200
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-06-19 14:49:29 +1000
commite50764d4f2b11fc9e9fe0b2fd0a4617b32593bfa (patch)
treef4e524e82083ea0693312b768a966b1115ecabe1 /include/capp.h
parent37ea3cfdc8523cb5fbbde6e364eaed3c1c67f8bb (diff)
downloadskiboot-e50764d4f2b11fc9e9fe0b2fd0a4617b32593bfa.zip
skiboot-e50764d4f2b11fc9e9fe0b2fd0a4617b32593bfa.tar.gz
skiboot-e50764d4f2b11fc9e9fe0b2fd0a4617b32593bfa.tar.bz2
capi: Load capp microcode
CAPP microcode flash download and CAPP upload for PHB4. A new file 'capp.c' is created to receive common capp code for PHB3 and PHB4. Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com> Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/capp.h')
-rw-r--r--include/capp.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/include/capp.h b/include/capp.h
index d0c28c9..587cc3a 100644
--- a/include/capp.h
+++ b/include/capp.h
@@ -17,8 +17,12 @@
#ifndef __CAPP_H
#define __CAPP_H
+/*
+ * eyecatcher PHB3: 'CAPPLIDH' in ASCII
+ * eyecatcher PHB4: 'CAPPPSLL' in ASCII
+ */
struct capp_lid_hdr {
- be64 eyecatcher; /* 'CAPPLIDH' in ASCII */
+ be64 eyecatcher;
be64 version;
be64 lid_no;
be64 pad;
@@ -27,7 +31,7 @@ struct capp_lid_hdr {
};
struct capp_ucode_data_hdr {
- be64 eyecatcher; /* 'CAPPUCOD' in ASCII */
+ be64 eyecatcher; /* 'CAPPUCOD' in ASCII */
u8 version;
u8 reg;
u8 reserved[2];
@@ -47,7 +51,6 @@ struct capp_ucode_lid {
struct capp_ucode_data data; /* This repeats */
};
-
enum capp_reg {
apc_master_cresp = 0x1,
apc_master_uop_table = 0x2,
@@ -62,4 +65,16 @@ enum capp_reg {
apc_master_powerbus_ctrl = 0xB
};
+struct proc_chip;
+extern struct lock capi_lock;
+extern bool capp_ucode_loaded(struct proc_chip *chip, unsigned int index);
+
+extern int64_t capp_load_ucode(unsigned int chip_id, uint32_t opal_id,
+ unsigned int index, u64 lid_eyecatcher,
+ uint32_t reg_offset,
+ uint64_t apc_master_addr,
+ uint64_t apc_master_write,
+ uint64_t snp_array_addr,
+ uint64_t snp_array_write);
+
#endif /* __CAPP_H */