示例#1
0
文件: tables.c 项目: bonzini/qboot
void extract_acpi(void)
{
	int id = fw_cfg_file_id("etc/table-loader");
	int n = fw_cfg_file_size(id);
	struct loader_cmd script[n / sizeof(struct loader_cmd)];
	int i;

	if (!n)
		return;

	fw_cfg_read_file(id, script, n);

	for (i = 0; i < ARRAY_SIZE(script); i++) {
		struct loader_cmd *s = &script[i];
		switch(script[i].cmd) {
		case CMD_ALLOC:
			do_alloc(s->alloc.file, s->alloc.align, s->alloc.zone);
			break;
		case CMD_PTR:
			do_ptr(s->ptr.dest, s->ptr.src, s->ptr.offset, s->ptr.size);
			break;
		case CMD_CHECKSUM:
			do_checksum(s->checksum.file, s->checksum.offset,
				    s->checksum.start, s->checksum.len);
			break;
		case CMD_QUIT:
			return;
		default:
			panic();
		}
	}
}
示例#2
0
文件: dump.cpp 项目: ericbbcc/hotspot
 void do_ptr(HeapWord** p) { do_ptr((void **) p); }