Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7]: src/sys/arch/evbarm/stand/boot2440 Pull up following revision...



details:   https://anonhg.NetBSD.org/src/rev/0acdc6af4329
branches:  netbsd-7
changeset: 798768:0acdc6af4329
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Jan 02 20:29:08 2015 +0000

description:
Pull up following revision(s) (requested by skrll in ticket #366):
        sys/arch/evbarm/stand/boot2440/main.c: revision 1.5
Make this work with earm kernels. Not sure the test is realy worth it.
Partially from Greg Willatt

diffstat:

 sys/arch/evbarm/stand/boot2440/main.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r e9799a504163 -r 0acdc6af4329 sys/arch/evbarm/stand/boot2440/main.c
--- a/sys/arch/evbarm/stand/boot2440/main.c     Fri Jan 02 20:24:14 2015 +0000
+++ b/sys/arch/evbarm/stand/boot2440/main.c     Fri Jan 02 20:29:08 2015 +0000
@@ -112,7 +112,7 @@
        int fclk, hclk;
        int fd;
        unsigned long marks[MARK_MAX];
-       unsigned char hdr[0x26];
+       unsigned char hdr[0x28];
        void (*entry)(void*);
        unsigned elfpriv;
        char *bootfile;
@@ -236,16 +236,17 @@
 #endif
        /*
         * ARM ELF header has a distinctive value in "private flags"
-        * field of offset [0x24:25];
-        * - NetBSD 02 06
+        * field of offset [0x24-x027];
+        * - NetBSD 02 06 (oarm)
         * - Linux  02 00 (2.4) or 02 02 (2.6)
+        * - NetBSD 02 00 00 05 (earm)
         */
        lseek(fd, (off_t)0, SEEK_SET);
        read(fd, &hdr, sizeof(hdr));
        memcpy(&elfpriv, &hdr[0x24], sizeof(elfpriv));
 
        entry = (void *)marks[MARK_ENTRY];
-       if (elfpriv == 0x0602) {
+       if (elfpriv == 0x0602 || elfpriv == 0x5000002) {
                struct btinfo_symtab bi_syms;
 
                bi_syms.nsym = marks[MARK_NSYM];



Home | Main Index | Thread Index | Old Index