diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-05-27 12:20:56 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-05-27 12:20:56 +1000 |
commit | 32253c5110db72715b8e144165d79bb327571dc4 (patch) | |
tree | 60f25396049ecaf70e2e5ef5c3b9d58d7d031db0 /platforms/mambo | |
parent | 63686ab585b990121672f3249ee12197e014952f (diff) | |
download | skiboot-32253c5110db72715b8e144165d79bb327571dc4.zip skiboot-32253c5110db72715b8e144165d79bb327571dc4.tar.gz skiboot-32253c5110db72715b8e144165d79bb327571dc4.tar.bz2 |
Add fake nvram for Mambo platform
Increases boot-code-coverage (for Mambo):
Lines: 2043 to 2168 (8.3% to 8.8%)
Functions: 283 to 298 (14.7% to 15.4%)
Branches: 792 to 816 (6.4% to 6.5%)
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'platforms/mambo')
-rw-r--r-- | platforms/mambo/mambo.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/platforms/mambo/mambo.c b/platforms/mambo/mambo.c index 7d77aff..ecce2ad 100644 --- a/platforms/mambo/mambo.c +++ b/platforms/mambo/mambo.c @@ -73,9 +73,26 @@ static int64_t mambo_cec_power_down(uint64_t request __unused) return OPAL_UNSUPPORTED; } +static int mambo_nvram_info(uint32_t *total_size) +{ + *total_size = 0x100000; + return OPAL_SUCCESS; +} + +static int mambo_nvram_start_read(void *dst, uint32_t src, uint32_t len) +{ + memset(dst+src, 0, len); + + nvram_read_complete(true); + + return OPAL_SUCCESS; +} + DECLARE_PLATFORM(mambo) = { .name = "Mambo", .probe = mambo_probe, .init = mambo_platform_init, .cec_power_down = mambo_cec_power_down, + .nvram_info = mambo_nvram_info, + .nvram_start_read = mambo_nvram_start_read, }; |