summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--base/loader/elf_object.cc2
-rw-r--r--kern/linux/linux_system.cc14
2 files changed, 15 insertions, 1 deletions
diff --git a/base/loader/elf_object.cc b/base/loader/elf_object.cc
index 9889b9d4c..98e3198a6 100644
--- a/base/loader/elf_object.cc
+++ b/base/loader/elf_object.cc
@@ -225,7 +225,7 @@ ElfObject::loadSomeSymbols(SymbolTable *symtab, int binding)
// loop through all the symbols, only loading global ones
for (ii = 0; ii < count; ++ii) {
gelf_getsym(data, ii, &sym);
- if (GELF_ST_BIND(sym.st_info) & binding) {
+ if (GELF_ST_BIND(sym.st_info) == binding) {
symtab->insert(sym.st_value,
elf_strptr(elf, shdr.sh_link, sym.st_name));
}
diff --git a/kern/linux/linux_system.cc b/kern/linux/linux_system.cc
index 798577ba5..718e54ad2 100644
--- a/kern/linux/linux_system.cc
+++ b/kern/linux/linux_system.cc
@@ -77,6 +77,9 @@ LinuxSystem::LinuxSystem(const string _name, const uint64_t _init_param,
panic("could not load kernel symbols\n");
debugSymbolTable = kernelSymtab;
+ if (!kernel->loadLocalSymbols(kernelSymtab))
+ panic("could not load kernel local symbols\n");
+
if (!console->loadGlobalSymbols(consoleSymtab))
panic("could not load console symbols\n");
@@ -271,6 +274,7 @@ LinuxSystem::LinuxSystem(const string _name, const uint64_t _init_param,
#endif //FS_MEASURE
Addr addr = 0;
+
if (kernelSymtab->findAddress("est_cycle_freq", addr)) {
Addr paddr = vtophys(physmem, addr);
uint8_t *est_cycle_frequency =
@@ -280,6 +284,16 @@ LinuxSystem::LinuxSystem(const string _name, const uint64_t _init_param,
*(uint64_t *)est_cycle_frequency = ticksPerSecond;
}
+ if (kernelSymtab->findAddress("aic7xxx_no_reset", addr)) {
+ Addr paddr = vtophys(physmem, addr);
+ uint8_t *aic7xxx_no_reset =
+ physmem->dma_addr(paddr, sizeof(uint32_t));
+
+ if (aic7xxx_no_reset) {
+ *(uint32_t *)aic7xxx_no_reset = 1;
+ }
+ }
+
if (consoleSymtab->findAddress("env_booted_osflags", addr)) {
Addr paddr = vtophys(physmem, addr);
char *osflags = (char *)physmem->dma_addr(paddr, sizeof(uint32_t));