45,46c45,48
< : System(p), sysTick(0),funcRomPort(p->name + "-fport")
<
---
> : System(p), sysTick(0),funcRomPort(p->name + "-fromport"),
> funcNvramPort(p->name + "-fnvramport"),
> funcHypDescPort(p->name + "-fhypdescport"),
> funcPartDescPort(p->name + "-fpartdescport")
50a53,55
> nvramSymtab = new SymbolTable;
> hypervisorDescSymtab = new SymbolTable;
> partitionDescSymtab = new SymbolTable;
56a62,73
> rom_port = params()->nvram->getPort("functional");
> funcNvramPort.setPeer(rom_port);
> rom_port->setPeer(&funcNvramPort);
>
> rom_port = params()->hypervisor_desc->getPort("functional");
> funcHypDescPort.setPeer(rom_port);
> rom_port->setPeer(&funcHypDescPort);
>
> rom_port = params()->partition_desc->getPort("functional");
> funcPartDescPort.setPeer(rom_port);
> rom_port->setPeer(&funcPartDescPort);
>
74a92,95
> // Read the nvram image
> nvram = createObjectFile(params()->nvram_bin, true);
> if (nvram == NULL)
> fatal("Could not load nvram image %s", params()->nvram_bin);
75a97,109
> // Read the hypervisor description image
> hypervisor_desc = createObjectFile(params()->hypervisor_desc_bin, true);
> if (hypervisor_desc == NULL)
> fatal("Could not load hypervisor description image %s",
> params()->hypervisor_desc_bin);
>
> // Read the partition description image
> partition_desc = createObjectFile(params()->partition_desc_bin, true);
> if (partition_desc == NULL)
> fatal("Could not load partition description image %s",
> params()->partition_desc_bin);
>
>
84a119,127
> // Load the nvram image
> nvram->setTextBase(params()->nvram_addr);
> nvram->loadSections(&funcNvramPort);
> // Load the hypervisor description image
> hypervisor_desc->setTextBase(params()->hypervisor_desc_addr);
> hypervisor_desc->loadSections(&funcHypDescPort);
> // Load the partition description image
> partition_desc->setTextBase(params()->partition_desc_addr);
> partition_desc->loadSections(&funcPartDescPort);
95a139,147
> if (!nvram->loadLocalSymbols(nvramSymtab))
> panic("could not load nvram symbols\n");
>
> if (!hypervisor_desc->loadLocalSymbols(hypervisorDescSymtab))
> panic("could not load hypervisor description symbols\n");
>
> if (!partition_desc->loadLocalSymbols(partitionDescSymtab))
> panic("could not load partition description symbols\n");
>
105a158,159
> if (!nvram->loadGlobalSymbols(debugSymbolTable))
> panic("could not load reset symbols\n");
106a161,167
> if (!hypervisor_desc->loadGlobalSymbols(debugSymbolTable))
> panic("could not load hypervisor description symbols\n");
>
> if (!partition_desc->loadLocalSymbols(debugSymbolTable))
> panic("could not load partition description symbols\n");
>
>
116a178,180
> delete nvramSymtab;
> delete hypervisorDescSymtab;
> delete partitionDescSymtab;
119a184,186
> delete nvram;
> delete hypervisor_desc;
> delete partition_desc;
134a202,204
> nvramSymtab->serialize("nvram_symtab", os);
> hypervisorDescSymtab->serialize("hypervisor_desc_symtab", os);
> partitionDescSymtab->serialize("partition_desc_symtab", os);
144a215,217
> nvramSymtab->unserialize("nvram_symtab", cp, section);
> hypervisorDescSymtab->unserialize("hypervisor_desc_symtab", cp, section);
> partitionDescSymtab->unserialize("partition_desc_symtab", cp, section);
151a225,227
> SimObjectParam<PhysicalMemory *> nvram;
> SimObjectParam<PhysicalMemory *> hypervisor_desc;
> SimObjectParam<PhysicalMemory *> partition_desc;
156a233,235
> Param<Addr> nvram_addr;
> Param<Addr> hypervisor_desc_addr;
> Param<Addr> partition_desc_addr;
161a241,243
> Param<std::string> nvram_bin;
> Param<std::string> hypervisor_desc_bin;
> Param<std::string> partition_desc_bin;
173a256,258
> INIT_PARAM(nvram, "Non-volatile RAM for the nvram"),
> INIT_PARAM(hypervisor_desc, "ROM for the hypervisor description"),
> INIT_PARAM(partition_desc, "ROM for the partition description"),
179a265,269
> INIT_PARAM(nvram_addr, "Address that nvram should be loaded at"),
> INIT_PARAM(hypervisor_desc_addr,
> "Address that hypervisor description should be loaded at"),
> INIT_PARAM(partition_desc_addr,
> "Address that partition description should be loaded at"),
184a275,279
> INIT_PARAM(nvram_bin, "file that contains the nvram image"),
> INIT_PARAM(hypervisor_desc_bin,
> "file that contains the hypervisor description image"),
> INIT_PARAM(partition_desc_bin,
> "file that contains the partition description image"),
199a295,297
> p->nvram = nvram;
> p->hypervisor_desc = hypervisor_desc;
> p->partition_desc = partition_desc;
204a303,305
> p->nvram_addr = nvram_addr;
> p->hypervisor_desc_addr = hypervisor_desc_addr;
> p->partition_desc_addr = partition_desc_addr;
207a309,311
> p->nvram_bin = nvram_bin;
> p->hypervisor_desc_bin = hypervisor_desc_bin;
> p->partition_desc_bin = partition_desc_bin;