allow the use of old console code and update elf_object not to rely on EM_ALPHA value.
base/loader/elf_object.cc: EM_ALPHA value isn't official, so perhaps we shouldn't use it dev/alpha_console.cc: dev/alpha_console.hh: this change allows the use of old console code --HG-- extra : convert_revision : cfacd64ae7fd2595158ca1a83ebcdb66ee7e119b
This commit is contained in:
parent
4cd030de9f
commit
c75eadc2b2
3 changed files with 8 additions and 2 deletions
|
@ -74,7 +74,8 @@ ElfObject::tryFile(const string &fname, int fd, size_t len, uint8_t *data)
|
||||||
else {
|
else {
|
||||||
if (ehdr.e_ident[EI_CLASS] == ELFCLASS32)
|
if (ehdr.e_ident[EI_CLASS] == ELFCLASS32)
|
||||||
panic("32 bit ELF Binary, Not Supported");
|
panic("32 bit ELF Binary, Not Supported");
|
||||||
printf("emachine = %x\n", ehdr.e_machine);
|
/* @todo this emachine value isn't offical yet.
|
||||||
|
* so we probably shouldn't check it. */
|
||||||
// if (ehdr.e_machine != EM_ALPHA)
|
// if (ehdr.e_machine != EM_ALPHA)
|
||||||
// panic("Non Alpha Binary, Not Supported");
|
// panic("Non Alpha Binary, Not Supported");
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,9 @@ AlphaConsole::read(MemReqPtr &req, uint8_t *data)
|
||||||
*(uint32_t*)data = alphaAccess->intrClockFrequency;
|
*(uint32_t*)data = alphaAccess->intrClockFrequency;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
panic("Unknown 32bit access, %#x\n", daddr);
|
// Old console code read in everyting as a 32bit int
|
||||||
|
*(uint32_t*)data = *(uint32_t*)(consoleData + daddr);
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case sizeof(uint64_t):
|
case sizeof(uint64_t):
|
||||||
|
|
|
@ -73,7 +73,10 @@ class SimpleDisk;
|
||||||
class AlphaConsole : public PioDevice
|
class AlphaConsole : public PioDevice
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
union {
|
||||||
AlphaAccess *alphaAccess;
|
AlphaAccess *alphaAccess;
|
||||||
|
uint8_t *consoleData;
|
||||||
|
};
|
||||||
|
|
||||||
/** the disk must be accessed from the console */
|
/** the disk must be accessed from the console */
|
||||||
SimpleDisk *disk;
|
SimpleDisk *disk;
|
||||||
|
|
Loading…
Reference in a new issue