Date: Wed, 28 May 2008 23:39:39 GMT From: Andrew Turner <andrew@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 142492 for review Message-ID: <200805282339.m4SNddv0044000@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=142492 Change 142492 by andrew@andrew_bender on 2008/05/28 23:38:49 Use the common fake_preload_metadata Affected files ... .. //depot/projects/arm/src/sys/arm/s3c2xx0/neo1973_machdep.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/arm/s3c2xx0/neo1973_machdep.c#2 (text+ko) ==== @@ -184,51 +184,14 @@ vm_offset_t freemempos; vm_offset_t afterkern; vm_offset_t lastaddr; -#ifdef DDB - vm_offset_t zstart = 0, zend = 0; -#endif int i; - uint32_t fake_preload[35]; uint32_t memsize = 128 * 1024 * 1024; i = 0; set_cpufuncs(); - fake_preload[i++] = MODINFO_NAME; - fake_preload[i++] = strlen("elf kernel") + 1; - strcpy((char*)&fake_preload[i++], "elf kernel"); - i += 2; - fake_preload[i++] = MODINFO_TYPE; - fake_preload[i++] = strlen("elf kernel") + 1; - strcpy((char*)&fake_preload[i++], "elf kernel"); - i += 2; - fake_preload[i++] = MODINFO_ADDR; - fake_preload[i++] = sizeof(vm_offset_t); - fake_preload[i++] = KERNBASE; - fake_preload[i++] = MODINFO_SIZE; - fake_preload[i++] = sizeof(uint32_t); - fake_preload[i++] = (uint32_t)&end - KERNBASE; -#ifdef DDB - if (*(uint32_t *)KERNVIRTADDR == MAGIC_TRAMP_NUMBER) { - fake_preload[i++] = MODINFO_METADATA|MODINFOMD_SSYM; - fake_preload[i++] = sizeof(vm_offset_t); - fake_preload[i++] = *(uint32_t *)(KERNVIRTADDR + 4); - fake_preload[i++] = MODINFO_METADATA|MODINFOMD_ESYM; - fake_preload[i++] = sizeof(vm_offset_t); - fake_preload[i++] = *(uint32_t *)(KERNVIRTADDR + 8); - lastaddr = *(uint32_t *)(KERNVIRTADDR + 8); - zend = lastaddr; - zstart = *(uint32_t *)(KERNVIRTADDR + 4); - ksym_start = zstart; - ksym_end = zend; - } else -#endif - lastaddr = (vm_offset_t)&end; - - fake_preload[i++] = 0; - fake_preload[i] = 0; - preload_metadata = (void *)fake_preload; + lastaddr = fake_preload_metadata(); pcpu_init(pcpup, 0, sizeof(struct pcpu)); PCPU_SET(curthread, &thread0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805282339.m4SNddv0044000>