aboutsummaryrefslogtreecommitdiff
path: root/include/platform.h
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2015-02-12 12:57:53 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-02-17 09:20:52 +1100
commita8513d3f3e8db11d6efcd73dbbc384168688ddd0 (patch)
treed5aac9bcee05eb8a29c7955653616d09a9a1e71c /include/platform.h
parent4a4efc42a87da445333da85ce7f13db2f6095d03 (diff)
downloadskiboot-a8513d3f3e8db11d6efcd73dbbc384168688ddd0.zip
skiboot-a8513d3f3e8db11d6efcd73dbbc384168688ddd0.tar.gz
skiboot-a8513d3f3e8db11d6efcd73dbbc384168688ddd0.tar.bz2
core: Add subid to load_resource()
This adds a subid to load_resource() so that sub-partitions can be accessed inside a PNOR partition. These sub-partitions follow the format used by the hostboot SBE image. The subid will match on the EC field of the SBE table of contents. If it's found, only that sub-partition is returned to the caller. Current partitions (kernel and ramfs) don't support sub-partitions. If caller tries to access a sub-partition within these, we fail the call. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/platform.h')
-rw-r--r--include/platform.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/platform.h b/include/platform.h
index ec5cbc6..690772e 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -26,6 +26,8 @@ enum resource_id {
RESOURCE_ID_KERNEL,
RESOURCE_ID_INITRAMFS,
};
+#define RESOURCE_SUBID_NONE 0
+#define RESOURCE_SUBID_SUPPORTED 1
/*
* Each platform can provide a set of hooks
@@ -129,7 +131,7 @@ struct platform {
* Load an external resource (eg, kernel payload) into a preallocated
* buffer. Returns true on success.
*/
- bool (*load_resource)(enum resource_id id,
+ bool (*load_resource)(enum resource_id id, uint32_t idx,
void *buf, size_t *len);
/*
@@ -148,7 +150,7 @@ static const struct platform __used __section(".platforms") name ##_platform
extern void probe_platform(void);
-extern bool load_resource(enum resource_id id,
+extern bool load_resource(enum resource_id id, uint32_t subid,
void *buf, size_t *len);
#endif /* __PLATFORM_H */