mirror of
				https://gitlab.com/qemu-project/openbios.git
				synced 2024-02-13 08:34:06 +08:00 
			
		
		
		
	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>
This commit is contained in:
		| @ -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() ); | ||||
|  | ||||
| @ -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"); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Mark Cave-Ayland
					Mark Cave-Ayland