diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2019-08-18 21:16:50 +0100 |
---|---|---|
committer | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2019-08-18 21:16:50 +0100 |
commit | f4d68d907ae46cc1e4a508359310ce73710deab3 (patch) | |
tree | a8b65f16010ab04571f931708559bf2e6280ff02 | |
parent | 29c8d2c3399220156d9a8ab1e442f3b52d8d8326 (diff) | |
download | qemu-openbios-f4d68d907ae46cc1e4a508359310ce73710deab3.tar.gz |
nvram: ensure that NVRAM configuration is separate from NVRAM node creation
As part of this separation we can also move "update-nvram" directly to the
NVRAM node bindings.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-rw-r--r-- | drivers/macio.c | 1 | ||||
-rw-r--r-- | packages/nvram.c | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/macio.c b/drivers/macio.c index 5a94252c..33f29f18 100644 --- a/drivers/macio.c +++ b/drivers/macio.c @@ -91,6 +91,7 @@ void macio_nvram_init(const char *path, phys_addr_t addr) nvram_size = macio_nvram_size(); nvram = (char*)addr + nvram_offset; + nvconf_init(); snprintf(buf, sizeof(buf), "%s", path); dnode = nvram_init(buf); set_int_property(dnode, "#bytes", arch_nvram_size() ); diff --git a/packages/nvram.c b/packages/nvram.c index 6fd39b15..a402f003 100644 --- a/packages/nvram.c +++ b/packages/nvram.c @@ -186,8 +186,6 @@ nvconf_init( void ) nvram.data = malloc( nvram.size ); arch_nvram_get( nvram.data ); - bind_func( "update-nvram", update_nvram ); - for( ;; ) { nvpart_t *p = NULL; int err; @@ -309,6 +307,7 @@ NODE_METHODS( nvram ) = { { "read", (void*)nvram_read }, { "write", (void*)nvram_write }, { "seek", (void*)nvram_seek }, + { "update-nvram", (void*)update_nvram }, }; @@ -322,8 +321,6 @@ nvram_init( const char *path ) fword("new-device"); - nvconf_init(); - ph = get_cur_dev(); push_str("nvram"); |