Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/arch/vax/boot/xxboot/bootxx.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/arch/vax/boot/xxboot/bootxx.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.20.2.3 retrieving revision 1.21 diff -u -p -r1.20.2.3 -r1.21 --- src/sys/arch/vax/boot/xxboot/bootxx.c 2007/09/03 14:30:46 1.20.2.3 +++ src/sys/arch/vax/boot/xxboot/bootxx.c 2005/12/11 12:19:34 1.21 @@ -1,4 +1,4 @@ -/* $NetBSD: bootxx.c,v 1.20.2.3 2007/09/03 14:30:46 yamt Exp $ */ +/* $NetBSD: bootxx.c,v 1.21 2005/12/11 12:19:34 christos Exp $ */ /*- * Copyright (c) 1982, 1986 The Regents of the University of California. @@ -131,7 +131,7 @@ Xmain() if (io < 0) io = open("/boot", 0); if (io < 0) - __asm("halt"); + asm("halt"); read(io, (void *)&hdr.aout, sizeof(hdr.aout)); if (N_GETMAGIC(hdr.aout) == OMAGIC && N_GETMID(hdr.aout) == MID_VAX) { @@ -146,7 +146,7 @@ Xmain() Elf32_Phdr ph; size_t off = sizeof(hdr.elf); vax_load_failure += 2; - read(io, (char *)&hdr.elf + sizeof(hdr.aout), + read(io, (caddr_t)(&hdr.elf) + sizeof(hdr.aout), sizeof(hdr.elf) - sizeof(hdr.aout)); if (hdr.elf.e_machine != EM_VAX || hdr.elf.e_type != ET_EXEC || hdr.elf.e_phnum != 1) @@ -166,15 +166,15 @@ Xmain() read(io, &tmp, sizeof(tmp)); off += sizeof(tmp); } - read(io, (void *) hdr.elf.e_entry, ph.p_filesz); - memset((void *) (hdr.elf.e_entry + ph.p_filesz), 0, + read(io, (void *) ph.p_paddr, ph.p_filesz); + memset((void *) (ph.p_paddr + ph.p_filesz), 0, ph.p_memsz - ph.p_filesz); } else { goto die; } hoppabort(entry); die: - __asm("halt"); + asm("halt"); } /* @@ -278,9 +278,6 @@ romstrategy(sc, func, dblk, size, buf, r { int block = dblk; int nsize = size; - char *cbuf; - - cbuf = (char *)buf; if (romlabel.d_magic == DISKMAGIC && romlabel.d_magic2 == DISKMAGIC) { if (romlabel.d_npartitions > 1) { @@ -292,16 +289,16 @@ romstrategy(sc, func, dblk, size, buf, r } if (from == FROMMV) { - romread_uvax(block, size, cbuf, rpb); + romread_uvax(block, size, buf, rpb); } else /* if (from == FROM750) */ { while (size > 0) { if (rpb->devtyp == BDEV_HP) hpread(block); else - read750(block, (int *)bootregs); - bcopy(0, cbuf, 512); + read750(block, bootregs); + bcopy(0, buf, 512); size -= 512; - cbuf += 512; + (char *)buf += 512; block++; } } @@ -346,7 +343,7 @@ hpread(int bn) /* * Avoid four subroutine calls by using hardware division. */ - __asm("clrl %%r1;" + asm("clrl %%r1;" "movl %3,%%r0;" "ediv %4,%%r0,%0,%1;" "movl %1,%%r0;" @@ -374,7 +371,7 @@ static char *top = (char*)end; void * alloc(size) - size_t size; + unsigned size; { void *ut = top; top += size; @@ -382,9 +379,9 @@ alloc(size) } void -dealloc(ptr, size) +free(ptr, size) void *ptr; - size_t size; + unsigned size; { }