Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Em2Ha-0003dr-EK for mharc-grub-devel@gnu.org; Tue, 13 Dec 2005 00:00:59 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Em2HX-0003cY-Cv for grub-devel@gnu.org; Tue, 13 Dec 2005 00:00:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Em2HT-0003Yr-AY for grub-devel@gnu.org; Tue, 13 Dec 2005 00:00:54 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Em2HT-0003YX-0S for grub-devel@gnu.org; Tue, 13 Dec 2005 00:00:51 -0500 Received: from [209.86.89.61] (helo=smtpauth01.mail.atl.earthlink.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Em2JI-0001VC-Dp for grub-devel@gnu.org; Tue, 13 Dec 2005 00:02:45 -0500 Received: from [63.246.184.80] (helo=[192.168.0.100]) by smtpauth01.mail.atl.earthlink.net with asmtp (Exim 4.34) id 1Em2Gr-0001Ga-UK for grub-devel@gnu.org; Tue, 13 Dec 2005 00:00:15 -0500 Mime-Version: 1.0 (Apple Message framework v623) To: The development of GRUB 2 Message-Id: <247878a1a3ba32e60a89ff5f7a9272ab@penguinppc.org> Content-Type: multipart/mixed; boundary=Apple-Mail-4--623491173 From: Hollis Blanchard Date: Mon, 12 Dec 2005 23:00:15 -0600 X-Mailer: Apple Mail (2.623) X-ELNK-Trace: 77a46389d001b1f223bcf3e39c2f8b5f1aa676d7e74259b7b3291a7d08dfec79435d312c965e5c73a25b0d07630082df350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 63.246.184.80 Subject: [patch] memory commands X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2005 05:00:55 -0000 --Apple-Mail-4--623491173 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed This patch adds a "memory" module, which currently contains two commands: Usage: memdump [address [len]] Dump the contents of memory. Usage: memset address (value [len] | trap) Write a 32-bit quantity to memory. Future commands could include "memload" (load a file into memory) and "memsearch" (search for a given value or string in a specified area of memory. I haven't needed those yet. The one tricky thing is that I added a "trap" shortcut. On PowerPC, and I assume on Sparc, when the processor hits a trap instruction while the firmware still owns the exception handlers, the firmware will provide helpful debug facilities (such as dumping the register state at the time of the trap). Inserting trap instructions has been very helpful to me for GRUB debugging (for example the OS X loader I've been working on). However, it may not make sense to have something like that on architectures like i386, which is why I made it depend on the HAVE_CPU_INSERT_TRAP define. Comments? -Hollis 2005-12-12 Hollis Blanchard * commands/memory.c: New file. * kern/powerpc/misc.c: Likewise. * include/grub/powerpc/misc.h: Likewise. * include/grub/i386/misc.h: Likewise. * include/grub/sparc64/misc.h: Likewise. * conf/common.rmk (pkgdata_MODULES): Add memory.mod. (memory_mod_SOURCES): New variable. (memory_mod_CFLAGS): Likewise. (memory_mod_LDFLAGS): Likewise. * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add kern/powerpc/misc.c. (grubof_SOURCES): Likewise. (grubof_HEADERS): Add cache.h and cpu/misc.h. * conf/i386-pc.rmk (kernel_img_HEADERS): Likewise. * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Likewise. * include/grub/misc.h (grub_hexdump): New prototype. --Apple-Mail-4--623491173 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; x-unix-mode=0644; name="hexdump.txt" Content-Disposition: attachment; filename=hexdump.txt ? .vimrc ? build ? tmp.diff Index: ChangeLog =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/grub/grub2/ChangeLog,v retrieving revision 1.210 diff -u -p -r1.210 ChangeLog --- ChangeLog 10 Dec 2005 05:24:58 -0000 1.210 +++ ChangeLog 13 Dec 2005 04:59:20 -0000 @@ -1,3 +1,22 @@ +2005-12-12 Hollis Blanchard + + * commands/memory.c: New file. + * kern/powerpc/misc.c: Likewise. + * include/grub/powerpc/misc.h: Likewise. + * include/grub/i386/misc.h: Likewise. + * include/grub/sparc64/misc.h: Likewise. + * conf/common.rmk (pkgdata_MODULES): Add memory.mod. + (memory_mod_SOURCES): New variable. + (memory_mod_CFLAGS): Likewise. + (memory_mod_LDFLAGS): Likewise. + * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add + kern/powerpc/misc.c. + (grubof_SOURCES): Likewise. + (grubof_HEADERS): Add cache.h and cpu/misc.h. + * conf/i386-pc.rmk (kernel_img_HEADERS): Likewise. + * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Likewise. + * include/grub/misc.h (grub_hexdump): New prototype. + 2005-12-09 Hollis Blanchard =20 * configure.ac: Accept `powerpc64' as host_cpu. Index: commands/memory.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: commands/memory.c diff -N commands/memory.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ commands/memory.c 13 Dec 2005 04:59:20 -0000 @@ -0,0 +1,116 @@ +/* memory.c - commands to manipulate the contents of memory */ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2003,2005 Free Software Foundation, Inc. + * + * GRUB is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published = by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GRUB; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +static grub_err_t +grub_cmd_memdump (struct grub_arg_list *state __attribute__ ((unused)), + int argc, char **args) + +{ + static unsigned long address =3D 0; + static unsigned long bytes =3D 64; + + if (argc > 2) + return grub_error (GRUB_ERR_BAD_ARGUMENT, "too many arguments"); + + if (argc > 0) + address =3D grub_strtoul (args[0], 0, 0); + + if (argc > 1) + bytes =3D grub_strtoul (args[1], 0, 0); + + grub_hexdump ((void *) address, bytes); + + address +=3D bytes; /* Remember position for next memdump. */ + + return 0; +} + +static grub_err_t +grub_cmd_memset (struct grub_arg_list *state __attribute__ ((unused)), + int argc, char **args) + +{ + grub_uint32_t *ptr; + grub_uint32_t value; + int repeat =3D 1; + int i; + + if (argc < 2) + return grub_error (GRUB_ERR_BAD_ARGUMENT, "too few arguments"); + + if (argc > 3) + return grub_error (GRUB_ERR_BAD_ARGUMENT, "too many arguments"); + + ptr =3D (grub_uint32_t *) grub_strtoul (args[0], 0, 0); + +#ifdef HAVE_CPU_INSERT_TRAP + if (0 =3D=3D grub_strcmp ("trap", args[1])) + return grub_cpu_insert_trap (ptr); +#endif /* HAVE_CPU_INSERT_TRAP */ + + value =3D grub_strtoul (args[1], 0, 0); + + if (argc > 2) + { + int bytes =3D grub_strtoul (args[2], 0, 0); + repeat =3D bytes / sizeof (grub_uint32_t); + } + + for (i =3D 0; i < repeat; i++) + { + *ptr =3D value; + ptr++; + } + grub_arch_sync_caches (ptr, repeat * sizeof (grub_uint32_t)); + + return 0; +} + +=0C +GRUB_MOD_INIT(memory) +{ + (void) mod; + grub_register_command ("memdump", grub_cmd_memdump, = GRUB_COMMAND_FLAG_BOTH, + "memdump [address [len]]", + "Dump the contents of memory.", 0); +#ifdef HAVE_CPU_INSERT_TRAP + grub_register_command ("memset", grub_cmd_memset, = GRUB_COMMAND_FLAG_BOTH, + "memset address (value [len] | trap)", + "Write a 32-bit quantity to memory.", 0); +#else /* HAVE_CPU_INSERT_TRAP */ + grub_register_command ("memset", grub_cmd_memset, = GRUB_COMMAND_FLAG_BOTH, + "memset address value [len]", + "Write a 32-bit quantity to memory.", 0); +#endif /* HAVE_CPU_INSERT_TRAP */ +} + +GRUB_MOD_FINI(memory) +{ + grub_unregister_command ("memdump"); + grub_unregister_command ("memset"); +} Index: conf/common.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/grub/grub2/conf/common.mk,v retrieving revision 1.4 diff -u -p -r1.4 common.mk --- conf/common.mk 3 Dec 2005 17:54:55 -0000 1.4 +++ conf/common.mk 13 Dec 2005 04:59:20 -0000 @@ -893,10 +893,23 @@ gpt_mod_LDFLAGS =3D $(COMMON_LDFLAGS) =20 =20 # Commands. -pkgdata_MODULES +=3D hello.mod boot.mod terminal.mod ls.mod \ - cmp.mod cat.mod help.mod font.mod search.mod \ - loopback.mod default.mod timeout.mod configfile.mod \ - terminfo.mod test.mod +pkgdata_MODULES +=3D \ + boot.mod \ + cat.mod \ + cmp.mod \ + configfile.mod \ + default.mod \ + font.mod \ + hello.mod \ + help.mod \ + ls.mod \ + loopback.mod \ + memory.mod \ + timeout.mod \ + search.mod \ + terminal.mod \ + terminfo.mod \ + test.mod =20 # For hello.mod. hello_mod_SOURCES =3D hello/hello.c @@ -1682,6 +1695,57 @@ fs-terminfo_mod-term_tparm.lst: term/tpa terminfo_mod_CFLAGS =3D $(COMMON_CFLAGS) terminfo_mod_LDFLAGS =3D $(COMMON_LDFLAGS) =20 +# For memory.mod. +memory_mod_SOURCES =3D commands/memory.c +CLEANFILES +=3D memory.mod mod-memory.o mod-memory.c pre-memory.o = memory_mod-commands_memory.o def-memory.lst und-memory.lst +MOSTLYCLEANFILES +=3D memory_mod-commands_memory.d +DEFSYMFILES +=3D def-memory.lst +UNDSYMFILES +=3D und-memory.lst + +memory.mod: pre-memory.o mod-memory.o + -rm -f $@ + $(LD) $(memory_mod_LDFLAGS) $(LDFLAGS) -r -d -o $@ $^ + $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R = .note -R .comment $@ + +pre-memory.o: memory_mod-commands_memory.o + -rm -f $@ + $(LD) $(memory_mod_LDFLAGS) -r -d -o $@ $^ + +mod-memory.o: mod-memory.c + $(CC) $(CPPFLAGS) $(CFLAGS) $(memory_mod_CFLAGS) -c -o $@ $< + +mod-memory.c: moddep.lst genmodsrc.sh + sh $(srcdir)/genmodsrc.sh 'memory' $< > $@ || (rm -f $@; exit 1) + +def-memory.lst: pre-memory.o + $(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 = memory/' > $@ + +und-memory.lst: pre-memory.o + echo 'memory' > $@ + $(NM) -u -P -p $< | cut -f1 -d' ' >> $@ + +memory_mod-commands_memory.o: commands/memory.c + $(CC) -Icommands -I$(srcdir)/commands $(CPPFLAGS) $(CFLAGS) = $(memory_mod_CFLAGS) -c -o $@ $< + +memory_mod-commands_memory.d: commands/memory.c + set -e; $(CC) -Icommands -I$(srcdir)/commands = $(CPPFLAGS) $(CFLAGS) $(memory_mod_CFLAGS) -M $< | sed = 's,memory\.o[ :]*,memory_mod-commands_memory.o $@ : ,g' > $@; [ -s = $@ ] || rm -f $@ + +-include memory_mod-commands_memory.d + +CLEANFILES +=3D cmd-memory_mod-commands_memory.lst = fs-memory_mod-commands_memory.lst +COMMANDFILES +=3D cmd-memory_mod-commands_memory.lst +FSFILES +=3D fs-memory_mod-commands_memory.lst + +cmd-memory_mod-commands_memory.lst: commands/memory.c gencmdlist.sh + set -e; $(CC) -Icommands -I$(srcdir)/commands = $(CPPFLAGS) $(CFLAGS) $(memory_mod_CFLAGS) -E $< | sh = $(srcdir)/gencmdlist.sh memory > $@ || (rm -f $@; exit 1) + +fs-memory_mod-commands_memory.lst: commands/memory.c genfslist.sh + set -e; $(CC) -Icommands -I$(srcdir)/commands = $(CPPFLAGS) $(CFLAGS) $(memory_mod_CFLAGS) -E $< | sh = $(srcdir)/genfslist.sh memory > $@ || (rm -f $@; exit 1) + + +memory_mod_CFLAGS =3D $(COMMON_CFLAGS) +memory_mod_LDFLAGS =3D $(COMMON_LDFLAGS) + =20 # Misc. pkgdata_MODULES +=3D gzio.mod=20 Index: conf/common.rmk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/grub/grub2/conf/common.rmk,v retrieving revision 1.3 diff -u -p -r1.3 common.rmk --- conf/common.rmk 3 Dec 2005 17:54:55 -0000 1.3 +++ conf/common.rmk 13 Dec 2005 04:59:20 -0000 @@ -111,10 +111,23 @@ gpt_mod_LDFLAGS =3D $(COMMON_LDFLAGS) =20 =20 # Commands. -pkgdata_MODULES +=3D hello.mod boot.mod terminal.mod ls.mod \ - cmp.mod cat.mod help.mod font.mod search.mod \ - loopback.mod default.mod timeout.mod configfile.mod \ - terminfo.mod test.mod +pkgdata_MODULES +=3D \ + boot.mod \ + cat.mod \ + cmp.mod \ + configfile.mod \ + default.mod \ + font.mod \ + hello.mod \ + help.mod \ + ls.mod \ + loopback.mod \ + memory.mod \ + timeout.mod \ + search.mod \ + terminal.mod \ + terminfo.mod \ + test.mod =20 # For hello.mod. hello_mod_SOURCES =3D hello/hello.c @@ -191,6 +204,11 @@ terminfo_mod_SOURCES =3D term/terminfo.c t terminfo_mod_CFLAGS =3D $(COMMON_CFLAGS) terminfo_mod_LDFLAGS =3D $(COMMON_LDFLAGS) =20 +# For memory.mod. +memory_mod_SOURCES =3D commands/memory.c +memory_mod_CFLAGS =3D $(COMMON_CFLAGS) +memory_mod_LDFLAGS =3D $(COMMON_LDFLAGS) + =20 # Misc. pkgdata_MODULES +=3D gzio.mod=20 Index: conf/i386-pc.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/grub/grub2/conf/i386-pc.mk,v retrieving revision 1.60 diff -u -p -r1.60 i386-pc.mk --- conf/i386-pc.mk 3 Dec 2005 17:54:55 -0000 1.60 +++ conf/i386-pc.mk 13 Dec 2005 04:59:20 -0000 @@ -258,9 +258,10 @@ kernel_img-symlist.d: symlist.c =20 -include kernel_img-symlist.d =20 -kernel_img_HEADERS =3D arg.h boot.h device.h disk.h dl.h elf.h env.h = err.h \ - file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h = partition.h \ - pc_partition.h rescue.h symbol.h term.h types.h \ +kernel_img_HEADERS =3D arg.h boot.h cache.h device.h disk.h dl.h elf.h = env.h \ + err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \ + partition.h pc_partition.h rescue.h symbol.h term.h types.h \ + cpu/misc.h \ machine/biosdisk.h machine/boot.h machine/console.h = machine/init.h \ machine/memory.h machine/loader.h machine/time.h machine/vga.h \ machine/vbe.h Index: conf/i386-pc.rmk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/grub/grub2/conf/i386-pc.rmk,v retrieving revision 1.57 diff -u -p -r1.57 i386-pc.rmk --- conf/i386-pc.rmk 3 Dec 2005 17:54:55 -0000 1.57 +++ conf/i386-pc.rmk 13 Dec 2005 04:59:20 -0000 @@ -30,9 +30,10 @@ kernel_img_SOURCES =3D kern/i386/pc/startu kern/env.c disk/i386/pc/biosdisk.c \ term/i386/pc/console.c \ symlist.c -kernel_img_HEADERS =3D arg.h boot.h device.h disk.h dl.h elf.h env.h = err.h \ - file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h = partition.h \ - pc_partition.h rescue.h symbol.h term.h types.h \ +kernel_img_HEADERS =3D arg.h boot.h cache.h device.h disk.h dl.h elf.h = env.h \ + err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \ + partition.h pc_partition.h rescue.h symbol.h term.h types.h \ + cpu/misc.h \ machine/biosdisk.h machine/boot.h machine/console.h = machine/init.h \ machine/memory.h machine/loader.h machine/time.h machine/vga.h \ machine/vbe.h Index: conf/powerpc-ieee1275.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/grub/grub2/conf/powerpc-ieee1275.mk,v retrieving revision 1.53 diff -u -p -r1.53 powerpc-ieee1275.mk --- conf/powerpc-ieee1275.mk 23 Nov 2005 04:25:16 -0000 1.53 +++ conf/powerpc-ieee1275.mk 13 Dec 2005 04:59:20 -0000 @@ -9,11 +9,11 @@ COMMON_CFLAGS =3D -ffreestanding -msoft-fl MOSTLYCLEANFILES +=3D grubof_symlist.c kernel_syms.lst DEFSYMFILES +=3D kernel_syms.lst =20 -grubof_HEADERS =3D arg.h boot.h device.h disk.h dl.h elf.h env.h err.h = \ +grubof_HEADERS =3D arg.h boot.h cache.h device.h disk.h dl.h elf.h = env.h err.h \ file.h fs.h kernel.h misc.h mm.h net.h parser.h rescue.h = symbol.h \ term.h types.h powerpc/libgcc.h loader.h \ partition.h pc_partition.h ieee1275/ieee1275.h machine/time.h \ - machine/kernel.h + machine/kernel.h cpu/misc.h =20 grubof_symlist.c: $(addprefix include/grub/,$(grubof_HEADERS)) = gensymlist.sh sh $(srcdir)/gensymlist.sh $(filter %.h,$^) > $@ @@ -84,11 +84,12 @@ grub_emu_SOURCES =3D commands/boot.c comma partmap/acorn.c = \ util/console.c util/grub-emu.c util/misc.c = \ util/i386/pc/biosdisk.c util/i386/pc/getroot.c = \ - util/powerpc/ieee1275/misc.c grub_script.tab.c grub_emu_init.c -CLEANFILES +=3D grub-emu grub_emu-commands_boot.o = grub_emu-commands_cat.o grub_emu-commands_cmp.o = grub_emu-commands_configfile.o grub_emu-commands_default.o = grub_emu-commands_help.o grub_emu-commands_search.o = grub_emu-commands_terminal.o grub_emu-commands_test.o = grub_emu-commands_ls.o grub_emu-commands_timeout.o = grub_emu-commands_ieee1275_halt.o grub_emu-commands_ieee1275_reboot.o = grub_emu-disk_loopback.o grub_emu-fs_affs.o grub_emu-fs_ext2.o = grub_emu-fs_fat.o grub_emu-fs_fshelp.o grub_emu-fs_hfs.o = grub_emu-fs_iso9660.o grub_emu-fs_jfs.o grub_emu-fs_minix.o = grub_emu-fs_sfs.o grub_emu-fs_ufs.o grub_emu-fs_xfs.o grub_emu-io_gzio.o = grub_emu-kern_device.o grub_emu-kern_disk.o grub_emu-kern_dl.o = grub_emu-kern_env.o grub_emu-kern_err.o grub_emu-kern_file.o = grub_emu-kern_fs.o grub_emu-kern_loader.o grub_emu-kern_main.o = grub_emu-kern_misc.o grub_emu-kern_parser.o grub_emu-kern_partition.o = grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-normal_arg.o = grub_emu-normal_cmdline.o grub_emu-normal_command.o = grub_emu-normal_completion.o grub_emu-normal_context.o = grub_emu-normal_execute.o grub_emu-normal_function.o = grub_emu-normal_lexer.o grub_emu-normal_main.o grub_emu-normal_menu.o = grub_emu-normal_menu_entry.o grub_emu-normal_misc.o = grub_emu-normal_script.o grub_emu-partmap_amiga.o = grub_emu-partmap_apple.o grub_emu-partmap_pc.o grub_emu-partmap_sun.o = grub_emu-partmap_acorn.o grub_emu-util_console.o = grub_emu-util_grub_emu.o grub_emu-util_misc.o = grub_emu-util_i386_pc_biosdisk.o grub_emu-util_i386_pc_getroot.o = grub_emu-util_powerpc_ieee1275_misc.o grub_emu-grub_script_tab.o = grub_emu-grub_emu_init.o -MOSTLYCLEANFILES +=3D grub_emu-commands_boot.d grub_emu-commands_cat.d = grub_emu-commands_cmp.d grub_emu-commands_configfile.d = grub_emu-commands_default.d grub_emu-commands_help.d = grub_emu-commands_search.d grub_emu-commands_terminal.d = grub_emu-commands_test.d grub_emu-commands_ls.d = grub_emu-commands_timeout.d grub_emu-commands_ieee1275_halt.d = grub_emu-commands_ieee1275_reboot.d grub_emu-disk_loopback.d = grub_emu-fs_affs.d grub_emu-fs_ext2.d grub_emu-fs_fat.d = grub_emu-fs_fshelp.d grub_emu-fs_hfs.d grub_emu-fs_iso9660.d = grub_emu-fs_jfs.d grub_emu-fs_minix.d grub_emu-fs_sfs.d = grub_emu-fs_ufs.d grub_emu-fs_xfs.d grub_emu-io_gzio.d = grub_emu-kern_device.d grub_emu-kern_disk.d grub_emu-kern_dl.d = grub_emu-kern_env.d grub_emu-kern_err.d grub_emu-kern_file.d = grub_emu-kern_fs.d grub_emu-kern_loader.d grub_emu-kern_main.d = grub_emu-kern_misc.d grub_emu-kern_parser.d grub_emu-kern_partition.d = grub_emu-kern_rescue.d grub_emu-kern_term.d grub_emu-normal_arg.d = grub_emu-normal_cmdline.d grub_emu-normal_command.d = grub_emu-normal_completion.d grub_emu-normal_context.d = grub_emu-normal_execute.d grub_emu-normal_function.d = grub_emu-normal_lexer.d grub_emu-normal_main.d grub_emu-normal_menu.d = grub_emu-normal_menu_entry.d grub_emu-normal_misc.d = grub_emu-normal_script.d grub_emu-partmap_amiga.d = grub_emu-partmap_apple.d grub_emu-partmap_pc.d grub_emu-partmap_sun.d = grub_emu-partmap_acorn.d grub_emu-util_console.d = grub_emu-util_grub_emu.d grub_emu-util_misc.d = grub_emu-util_i386_pc_biosdisk.d grub_emu-util_i386_pc_getroot.d = grub_emu-util_powerpc_ieee1275_misc.d grub_emu-grub_script_tab.d = grub_emu-grub_emu_init.d + util/powerpc/ieee1275/misc.c grub_script.tab.c grub_emu_init.c = \ + kern/powerpc/misc.c +CLEANFILES +=3D grub-emu grub_emu-commands_boot.o = grub_emu-commands_cat.o grub_emu-commands_cmp.o = grub_emu-commands_configfile.o grub_emu-commands_default.o = grub_emu-commands_help.o grub_emu-commands_search.o = grub_emu-commands_terminal.o grub_emu-commands_test.o = grub_emu-commands_ls.o grub_emu-commands_timeout.o = grub_emu-commands_ieee1275_halt.o grub_emu-commands_ieee1275_reboot.o = grub_emu-disk_loopback.o grub_emu-fs_affs.o grub_emu-fs_ext2.o = grub_emu-fs_fat.o grub_emu-fs_fshelp.o grub_emu-fs_hfs.o = grub_emu-fs_iso9660.o grub_emu-fs_jfs.o grub_emu-fs_minix.o = grub_emu-fs_sfs.o grub_emu-fs_ufs.o grub_emu-fs_xfs.o grub_emu-io_gzio.o = grub_emu-kern_device.o grub_emu-kern_disk.o grub_emu-kern_dl.o = grub_emu-kern_env.o grub_emu-kern_err.o grub_emu-kern_file.o = grub_emu-kern_fs.o grub_emu-kern_loader.o grub_emu-kern_main.o = grub_emu-kern_misc.o grub_emu-kern_parser.o grub_emu-kern_partition.o = grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-normal_arg.o = grub_emu-normal_cmdline.o grub_emu-normal_command.o = grub_emu-normal_completion.o grub_emu-normal_context.o = grub_emu-normal_execute.o grub_emu-normal_function.o = grub_emu-normal_lexer.o grub_emu-normal_main.o grub_emu-normal_menu.o = grub_emu-normal_menu_entry.o grub_emu-normal_misc.o = grub_emu-normal_script.o grub_emu-partmap_amiga.o = grub_emu-partmap_apple.o grub_emu-partmap_pc.o grub_emu-partmap_sun.o = grub_emu-partmap_acorn.o grub_emu-util_console.o = grub_emu-util_grub_emu.o grub_emu-util_misc.o = grub_emu-util_i386_pc_biosdisk.o grub_emu-util_i386_pc_getroot.o = grub_emu-util_powerpc_ieee1275_misc.o grub_emu-grub_script_tab.o = grub_emu-grub_emu_init.o grub_emu-kern_powerpc_misc.o +MOSTLYCLEANFILES +=3D grub_emu-commands_boot.d grub_emu-commands_cat.d = grub_emu-commands_cmp.d grub_emu-commands_configfile.d = grub_emu-commands_default.d grub_emu-commands_help.d = grub_emu-commands_search.d grub_emu-commands_terminal.d = grub_emu-commands_test.d grub_emu-commands_ls.d = grub_emu-commands_timeout.d grub_emu-commands_ieee1275_halt.d = grub_emu-commands_ieee1275_reboot.d grub_emu-disk_loopback.d = grub_emu-fs_affs.d grub_emu-fs_ext2.d grub_emu-fs_fat.d = grub_emu-fs_fshelp.d grub_emu-fs_hfs.d grub_emu-fs_iso9660.d = grub_emu-fs_jfs.d grub_emu-fs_minix.d grub_emu-fs_sfs.d = grub_emu-fs_ufs.d grub_emu-fs_xfs.d grub_emu-io_gzio.d = grub_emu-kern_device.d grub_emu-kern_disk.d grub_emu-kern_dl.d = grub_emu-kern_env.d grub_emu-kern_err.d grub_emu-kern_file.d = grub_emu-kern_fs.d grub_emu-kern_loader.d grub_emu-kern_main.d = grub_emu-kern_misc.d grub_emu-kern_parser.d grub_emu-kern_partition.d = grub_emu-kern_rescue.d grub_emu-kern_term.d grub_emu-normal_arg.d = grub_emu-normal_cmdline.d grub_emu-normal_command.d = grub_emu-normal_completion.d grub_emu-normal_context.d = grub_emu-normal_execute.d grub_emu-normal_function.d = grub_emu-normal_lexer.d grub_emu-normal_main.d grub_emu-normal_menu.d = grub_emu-normal_menu_entry.d grub_emu-normal_misc.d = grub_emu-normal_script.d grub_emu-partmap_amiga.d = grub_emu-partmap_apple.d grub_emu-partmap_pc.d grub_emu-partmap_sun.d = grub_emu-partmap_acorn.d grub_emu-util_console.d = grub_emu-util_grub_emu.d grub_emu-util_misc.d = grub_emu-util_i386_pc_biosdisk.d grub_emu-util_i386_pc_getroot.d = grub_emu-util_powerpc_ieee1275_misc.d grub_emu-grub_script_tab.d = grub_emu-grub_emu_init.d grub_emu-kern_powerpc_misc.d =20 -grub-emu: grub_emu-commands_boot.o grub_emu-commands_cat.o = grub_emu-commands_cmp.o grub_emu-commands_configfile.o = grub_emu-commands_default.o grub_emu-commands_help.o = grub_emu-commands_search.o grub_emu-commands_terminal.o = grub_emu-commands_test.o grub_emu-commands_ls.o = grub_emu-commands_timeout.o grub_emu-commands_ieee1275_halt.o = grub_emu-commands_ieee1275_reboot.o grub_emu-disk_loopback.o = grub_emu-fs_affs.o grub_emu-fs_ext2.o grub_emu-fs_fat.o = grub_emu-fs_fshelp.o grub_emu-fs_hfs.o grub_emu-fs_iso9660.o = grub_emu-fs_jfs.o grub_emu-fs_minix.o grub_emu-fs_sfs.o = grub_emu-fs_ufs.o grub_emu-fs_xfs.o grub_emu-io_gzio.o = grub_emu-kern_device.o grub_emu-kern_disk.o grub_emu-kern_dl.o = grub_emu-kern_env.o grub_emu-kern_err.o grub_emu-kern_file.o = grub_emu-kern_fs.o grub_emu-kern_loader.o grub_emu-kern_main.o = grub_emu-kern_misc.o grub_emu-kern_parser.o grub_emu-kern_partition.o = grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-normal_arg.o = grub_emu-normal_cmdline.o grub_emu-normal_command.o = grub_emu-normal_completion.o grub_emu-normal_context.o = grub_emu-normal_execute.o grub_emu-normal_function.o = grub_emu-normal_lexer.o grub_emu-normal_main.o grub_emu-normal_menu.o = grub_emu-normal_menu_entry.o grub_emu-normal_misc.o = grub_emu-normal_script.o grub_emu-partmap_amiga.o = grub_emu-partmap_apple.o grub_emu-partmap_pc.o grub_emu-partmap_sun.o = grub_emu-partmap_acorn.o grub_emu-util_console.o = grub_emu-util_grub_emu.o grub_emu-util_misc.o = grub_emu-util_i386_pc_biosdisk.o grub_emu-util_i386_pc_getroot.o = grub_emu-util_powerpc_ieee1275_misc.o grub_emu-grub_script_tab.o = grub_emu-grub_emu_init.o +grub-emu: grub_emu-commands_boot.o grub_emu-commands_cat.o = grub_emu-commands_cmp.o grub_emu-commands_configfile.o = grub_emu-commands_default.o grub_emu-commands_help.o = grub_emu-commands_search.o grub_emu-commands_terminal.o = grub_emu-commands_test.o grub_emu-commands_ls.o = grub_emu-commands_timeout.o grub_emu-commands_ieee1275_halt.o = grub_emu-commands_ieee1275_reboot.o grub_emu-disk_loopback.o = grub_emu-fs_affs.o grub_emu-fs_ext2.o grub_emu-fs_fat.o = grub_emu-fs_fshelp.o grub_emu-fs_hfs.o grub_emu-fs_iso9660.o = grub_emu-fs_jfs.o grub_emu-fs_minix.o grub_emu-fs_sfs.o = grub_emu-fs_ufs.o grub_emu-fs_xfs.o grub_emu-io_gzio.o = grub_emu-kern_device.o grub_emu-kern_disk.o grub_emu-kern_dl.o = grub_emu-kern_env.o grub_emu-kern_err.o grub_emu-kern_file.o = grub_emu-kern_fs.o grub_emu-kern_loader.o grub_emu-kern_main.o = grub_emu-kern_misc.o grub_emu-kern_parser.o grub_emu-kern_partition.o = grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-normal_arg.o = grub_emu-normal_cmdline.o grub_emu-normal_command.o = grub_emu-normal_completion.o grub_emu-normal_context.o = grub_emu-normal_execute.o grub_emu-normal_function.o = grub_emu-normal_lexer.o grub_emu-normal_main.o grub_emu-normal_menu.o = grub_emu-normal_menu_entry.o grub_emu-normal_misc.o = grub_emu-normal_script.o grub_emu-partmap_amiga.o = grub_emu-partmap_apple.o grub_emu-partmap_pc.o grub_emu-partmap_sun.o = grub_emu-partmap_acorn.o grub_emu-util_console.o = grub_emu-util_grub_emu.o grub_emu-util_misc.o = grub_emu-util_i386_pc_biosdisk.o grub_emu-util_i386_pc_getroot.o = grub_emu-util_powerpc_ieee1275_misc.o grub_emu-grub_script_tab.o = grub_emu-grub_emu_init.o grub_emu-kern_powerpc_misc.o $(BUILD_CC) -o $@ $^ $(BUILD_LDFLAGS) $(grub_emu_LDFLAGS) =20 grub_emu-commands_boot.o: commands/boot.c @@ -619,6 +620,14 @@ grub_emu-grub_emu_init.d: grub_emu_init. =20 -include grub_emu-grub_emu_init.d =20 +grub_emu-kern_powerpc_misc.o: kern/powerpc/misc.c + $(BUILD_CC) -Ikern/powerpc -I$(srcdir)/kern/powerpc = $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=3D1 $(grub_emu_CFLAGS) -c = -o $@ $< + +grub_emu-kern_powerpc_misc.d: kern/powerpc/misc.c + set -e; $(BUILD_CC) -Ikern/powerpc = -I$(srcdir)/kern/powerpc $(BUILD_CPPFLAGS) $(BUILD_CFLAGS) -DGRUB_UTIL=3D1= $(grub_emu_CFLAGS) -M $< | sed 's,misc\.o[ = :]*,grub_emu-kern_powerpc_misc.o $@ : ,g' > $@; [ -s $@ ] || = rm -f $@ + +-include grub_emu-kern_powerpc_misc.d + =20 grub_emu_LDFLAGS =3D $(LIBCURSES) =20 @@ -629,11 +638,11 @@ grubof_SOURCES =3D kern/powerpc/ieee1275/c kern/powerpc/ieee1275/init.c term/ieee1275/ofconsole.c = \ kern/powerpc/ieee1275/openfw.c disk/ieee1275/ofdisk.c = \ kern/parser.c kern/partition.c kern/env.c kern/powerpc/dl.c = \ - grubof_symlist.c kern/powerpc/cache.S -CLEANFILES +=3D grubof grubof-kern_powerpc_ieee1275_crt0.o = grubof-kern_powerpc_ieee1275_cmain.o grubof-kern_ieee1275_ieee1275.o = grubof-kern_main.o grubof-kern_device.o grubof-kern_disk.o = grubof-kern_dl.o grubof-kern_file.o grubof-kern_fs.o grubof-kern_err.o = grubof-kern_misc.o grubof-kern_mm.o grubof-kern_loader.o = grubof-kern_rescue.o grubof-kern_term.o = grubof-kern_powerpc_ieee1275_init.o grubof-term_ieee1275_ofconsole.o = grubof-kern_powerpc_ieee1275_openfw.o grubof-disk_ieee1275_ofdisk.o = grubof-kern_parser.o grubof-kern_partition.o grubof-kern_env.o = grubof-kern_powerpc_dl.o grubof-grubof_symlist.o = grubof-kern_powerpc_cache.o -MOSTLYCLEANFILES +=3D grubof-kern_powerpc_ieee1275_crt0.d = grubof-kern_powerpc_ieee1275_cmain.d grubof-kern_ieee1275_ieee1275.d = grubof-kern_main.d grubof-kern_device.d grubof-kern_disk.d = grubof-kern_dl.d grubof-kern_file.d grubof-kern_fs.d grubof-kern_err.d = grubof-kern_misc.d grubof-kern_mm.d grubof-kern_loader.d = grubof-kern_rescue.d grubof-kern_term.d = grubof-kern_powerpc_ieee1275_init.d grubof-term_ieee1275_ofconsole.d = grubof-kern_powerpc_ieee1275_openfw.d grubof-disk_ieee1275_ofdisk.d = grubof-kern_parser.d grubof-kern_partition.d grubof-kern_env.d = grubof-kern_powerpc_dl.d grubof-grubof_symlist.d = grubof-kern_powerpc_cache.d + grubof_symlist.c kern/powerpc/cache.S kern/powerpc/misc.c +CLEANFILES +=3D grubof grubof-kern_powerpc_ieee1275_crt0.o = grubof-kern_powerpc_ieee1275_cmain.o grubof-kern_ieee1275_ieee1275.o = grubof-kern_main.o grubof-kern_device.o grubof-kern_disk.o = grubof-kern_dl.o grubof-kern_file.o grubof-kern_fs.o grubof-kern_err.o = grubof-kern_misc.o grubof-kern_mm.o grubof-kern_loader.o = grubof-kern_rescue.o grubof-kern_term.o = grubof-kern_powerpc_ieee1275_init.o grubof-term_ieee1275_ofconsole.o = grubof-kern_powerpc_ieee1275_openfw.o grubof-disk_ieee1275_ofdisk.o = grubof-kern_parser.o grubof-kern_partition.o grubof-kern_env.o = grubof-kern_powerpc_dl.o grubof-grubof_symlist.o = grubof-kern_powerpc_cache.o grubof-kern_powerpc_misc.o +MOSTLYCLEANFILES +=3D grubof-kern_powerpc_ieee1275_crt0.d = grubof-kern_powerpc_ieee1275_cmain.d grubof-kern_ieee1275_ieee1275.d = grubof-kern_main.d grubof-kern_device.d grubof-kern_disk.d = grubof-kern_dl.d grubof-kern_file.d grubof-kern_fs.d grubof-kern_err.d = grubof-kern_misc.d grubof-kern_mm.d grubof-kern_loader.d = grubof-kern_rescue.d grubof-kern_term.d = grubof-kern_powerpc_ieee1275_init.d grubof-term_ieee1275_ofconsole.d = grubof-kern_powerpc_ieee1275_openfw.d grubof-disk_ieee1275_ofdisk.d = grubof-kern_parser.d grubof-kern_partition.d grubof-kern_env.d = grubof-kern_powerpc_dl.d grubof-grubof_symlist.d = grubof-kern_powerpc_cache.d grubof-kern_powerpc_misc.d =20 -grubof: grubof-kern_powerpc_ieee1275_crt0.o = grubof-kern_powerpc_ieee1275_cmain.o grubof-kern_ieee1275_ieee1275.o = grubof-kern_main.o grubof-kern_device.o grubof-kern_disk.o = grubof-kern_dl.o grubof-kern_file.o grubof-kern_fs.o grubof-kern_err.o = grubof-kern_misc.o grubof-kern_mm.o grubof-kern_loader.o = grubof-kern_rescue.o grubof-kern_term.o = grubof-kern_powerpc_ieee1275_init.o grubof-term_ieee1275_ofconsole.o = grubof-kern_powerpc_ieee1275_openfw.o grubof-disk_ieee1275_ofdisk.o = grubof-kern_parser.o grubof-kern_partition.o grubof-kern_env.o = grubof-kern_powerpc_dl.o grubof-grubof_symlist.o = grubof-kern_powerpc_cache.o +grubof: grubof-kern_powerpc_ieee1275_crt0.o = grubof-kern_powerpc_ieee1275_cmain.o grubof-kern_ieee1275_ieee1275.o = grubof-kern_main.o grubof-kern_device.o grubof-kern_disk.o = grubof-kern_dl.o grubof-kern_file.o grubof-kern_fs.o grubof-kern_err.o = grubof-kern_misc.o grubof-kern_mm.o grubof-kern_loader.o = grubof-kern_rescue.o grubof-kern_term.o = grubof-kern_powerpc_ieee1275_init.o grubof-term_ieee1275_ofconsole.o = grubof-kern_powerpc_ieee1275_openfw.o grubof-disk_ieee1275_ofdisk.o = grubof-kern_parser.o grubof-kern_partition.o grubof-kern_env.o = grubof-kern_powerpc_dl.o grubof-grubof_symlist.o = grubof-kern_powerpc_cache.o grubof-kern_powerpc_misc.o $(CC) -o $@ $^ $(LDFLAGS) $(grubof_LDFLAGS) =20 grubof-kern_powerpc_ieee1275_crt0.o: kern/powerpc/ieee1275/crt0.S @@ -836,6 +845,14 @@ grubof-kern_powerpc_cache.d: kern/powerp =20 -include grubof-kern_powerpc_cache.d =20 +grubof-kern_powerpc_misc.o: kern/powerpc/misc.c + $(CC) -Ikern/powerpc -I$(srcdir)/kern/powerpc $(CPPFLAGS) = $(CFLAGS) $(grubof_CFLAGS) -c -o $@ $< + +grubof-kern_powerpc_misc.d: kern/powerpc/misc.c + set -e; $(CC) -Ikern/powerpc -I$(srcdir)/kern/powerpc = $(CPPFLAGS) $(CFLAGS) $(grubof_CFLAGS) -M $< | sed 's,misc\.o[ = :]*,grubof-kern_powerpc_misc.o $@ : ,g' > $@; [ -s $@ ] || rm -f $@ + +-include grubof-kern_powerpc_misc.d + grubof_HEADERS =3D grub/powerpc/ieee1275/ieee1275.h grubof_CFLAGS =3D $(COMMON_CFLAGS) grubof_ASFLAGS =3D $(COMMON_ASFLAGS) Index: conf/powerpc-ieee1275.rmk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/grub/grub2/conf/powerpc-ieee1275.rmk,v retrieving revision 1.51 diff -u -p -r1.51 powerpc-ieee1275.rmk --- conf/powerpc-ieee1275.rmk 23 Nov 2005 02:23:08 -0000 1.51 +++ conf/powerpc-ieee1275.rmk 13 Dec 2005 04:59:20 -0000 @@ -9,11 +9,11 @@ COMMON_CFLAGS =3D -ffreestanding -msoft-fl MOSTLYCLEANFILES +=3D grubof_symlist.c kernel_syms.lst DEFSYMFILES +=3D kernel_syms.lst =20 -grubof_HEADERS =3D arg.h boot.h device.h disk.h dl.h elf.h env.h err.h = \ +grubof_HEADERS =3D arg.h boot.h cache.h device.h disk.h dl.h elf.h = env.h err.h \ file.h fs.h kernel.h misc.h mm.h net.h parser.h rescue.h = symbol.h \ term.h types.h powerpc/libgcc.h loader.h \ partition.h pc_partition.h ieee1275/ieee1275.h machine/time.h \ - machine/kernel.h + machine/kernel.h cpu/misc.h =20 grubof_symlist.c: $(addprefix include/grub/,$(grubof_HEADERS)) = gensymlist.sh sh $(srcdir)/gensymlist.sh $(filter %.h,$^) > $@ @@ -54,7 +54,8 @@ grub_emu_SOURCES =3D commands/boot.c comma partmap/acorn.c = \ util/console.c util/grub-emu.c util/misc.c = \ util/i386/pc/biosdisk.c util/i386/pc/getroot.c = \ - util/powerpc/ieee1275/misc.c grub_script.tab.c grub_emu_init.c + util/powerpc/ieee1275/misc.c grub_script.tab.c grub_emu_init.c = \ + kern/powerpc/misc.c =20 grub_emu_LDFLAGS =3D $(LIBCURSES) =20 @@ -65,7 +66,7 @@ grubof_SOURCES =3D kern/powerpc/ieee1275/c kern/powerpc/ieee1275/init.c term/ieee1275/ofconsole.c = \ kern/powerpc/ieee1275/openfw.c disk/ieee1275/ofdisk.c = \ kern/parser.c kern/partition.c kern/env.c kern/powerpc/dl.c = \ - grubof_symlist.c kern/powerpc/cache.S + grubof_symlist.c kern/powerpc/cache.S kern/powerpc/misc.c grubof_HEADERS =3D grub/powerpc/ieee1275/ieee1275.h grubof_CFLAGS =3D $(COMMON_CFLAGS) grubof_ASFLAGS =3D $(COMMON_ASFLAGS) Index: conf/sparc64-ieee1275.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/grub/grub2/conf/sparc64-ieee1275.mk,v retrieving revision 1.8 diff -u -p -r1.8 sparc64-ieee1275.mk --- conf/sparc64-ieee1275.mk 18 Nov 2005 14:56:55 -0000 1.8 +++ conf/sparc64-ieee1275.mk 13 Dec 2005 04:59:20 -0000 @@ -10,11 +10,11 @@ COMMON_LDFLAGS =3D -melf64_sparc MOSTLYCLEANFILES +=3D grubof_symlist.c kernel_syms.lst DEFSYMFILES +=3D kernel_syms.lst =20 -grubof_HEADERS =3D arg.h boot.h device.h disk.h dl.h elf.h env.h err.h = \ +grubof_HEADERS =3D arg.h boot.h cache.h device.h disk.h dl.h elf.h = env.h err.h \ file.h fs.h kernel.h misc.h mm.h net.h parser.h rescue.h = symbol.h \ term.h types.h sparc64/libgcc.h loader.h \ partition.h pc_partition.h ieee1275/ieee1275.h machine/time.h \ - machine/kernel.h + machine/kernel.h cpu/misc.h =20 grubof_symlist.c: $(addprefix include/grub/,$(grubof_HEADERS)) = gensymlist.sh sh $(srcdir)/gensymlist.sh $(filter %.h,$^) > $@ Index: conf/sparc64-ieee1275.rmk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/grub/grub2/conf/sparc64-ieee1275.rmk,v retrieving revision 1.8 diff -u -p -r1.8 sparc64-ieee1275.rmk --- conf/sparc64-ieee1275.rmk 18 Nov 2005 10:51:00 -0000 1.8 +++ conf/sparc64-ieee1275.rmk 13 Dec 2005 04:59:20 -0000 @@ -10,11 +10,11 @@ COMMON_LDFLAGS =3D -melf64_sparc MOSTLYCLEANFILES +=3D grubof_symlist.c kernel_syms.lst DEFSYMFILES +=3D kernel_syms.lst =20 -grubof_HEADERS =3D arg.h boot.h device.h disk.h dl.h elf.h env.h err.h = \ +grubof_HEADERS =3D arg.h boot.h cache.h device.h disk.h dl.h elf.h = env.h err.h \ file.h fs.h kernel.h misc.h mm.h net.h parser.h rescue.h = symbol.h \ term.h types.h sparc64/libgcc.h loader.h \ partition.h pc_partition.h ieee1275/ieee1275.h machine/time.h \ - machine/kernel.h + machine/kernel.h cpu/misc.h =20 grubof_symlist.c: $(addprefix include/grub/,$(grubof_HEADERS)) = gensymlist.sh sh $(srcdir)/gensymlist.sh $(filter %.h,$^) > $@ Index: include/grub/misc.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/grub/grub2/include/grub/misc.h,v retrieving revision 1.17 diff -u -p -r1.17 misc.h --- include/grub/misc.h 24 Oct 2005 10:23:46 -0000 1.17 +++ include/grub/misc.h 13 Dec 2005 04:59:20 -0000 @@ -76,4 +76,6 @@ grub_ssize_t EXPORT_FUNC(grub_utf8_to_uc const grub_uint8_t *src, grub_size_t size); =20 +void EXPORT_FUNC(grub_hexdump) (const void *ptr, unsigned long bytes); + #endif /* ! GRUB_MISC_HEADER */ Index: include/grub/i386/misc.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: include/grub/i386/misc.h diff -N include/grub/i386/misc.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ include/grub/i386/misc.h 13 Dec 2005 04:59:20 -0000 @@ -0,0 +1,25 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2005 Free Software Foundation, Inc. + * + * GRUB is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published = by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GRUB; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef GRUB_MISC_CPU_HEADER +#define GRUB_MISC_CPU_HEADER 1 + +#undef HAVE_CPU_INSERT_TRAP + +#endif /* ! GRUB_MISC_CPU_HEADER */ Index: include/grub/powerpc/misc.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: include/grub/powerpc/misc.h diff -N include/grub/powerpc/misc.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ include/grub/powerpc/misc.h 13 Dec 2005 04:59:20 -0000 @@ -0,0 +1,26 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2005 Free Software Foundation, Inc. + * + * GRUB is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published = by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GRUB; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef GRUB_MISC_CPU_HEADER +#define GRUB_MISC_CPU_HEADER 1 + +#define HAVE_CPU_INSERT_TRAP +int EXPORT_FUNC(grub_cpu_insert_trap) (void *address); + +#endif /* ! GRUB_MISC_CPU_HEADER */ Index: include/grub/sparc64/misc.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: include/grub/sparc64/misc.h diff -N include/grub/sparc64/misc.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ include/grub/sparc64/misc.h 13 Dec 2005 04:59:20 -0000 @@ -0,0 +1,25 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2005 Free Software Foundation, Inc. + * + * GRUB is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published = by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GRUB; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef GRUB_MISC_CPU_HEADER +#define GRUB_MISC_CPU_HEADER 1 + +#undef HAVE_CPU_INSERT_TRAP + +#endif /* ! GRUB_MISC_CPU_HEADER */ Index: kern/misc.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/grub/grub2/kern/misc.c,v retrieving revision 1.25 diff -u -p -r1.25 misc.c --- kern/misc.c 28 Oct 2005 03:14:33 -0000 1.25 +++ kern/misc.c 13 Dec 2005 04:59:20 -0000 @@ -875,3 +875,29 @@ grub_utf8_to_ucs4 (grub_uint32_t *dest,=20 =20 return p - dest; } + +void +grub_hexdump (const void *ptr, unsigned long bytes) +{ + const char *chr; + unsigned long i; + unsigned long j; + const unsigned int stride =3D 4 * sizeof (grub_uint32_t); + + /* Word-align `ptr'. */ + chr =3D (char *) ((unsigned long) ptr & ~0x3); + + for (i =3D 0; i < bytes; i +=3D stride) + { + int *word =3D (int *) (chr + i); + grub_printf ("%08x: %08x %08x %08x %08x ", (grub_uint32_t) word, + word[0], word[1], word[2], word[3]); + + for (j =3D 0; j < stride; j++) + if (grub_isprint (chr[i+j])) + grub_putchar (chr[i+j]); + else + grub_putchar ('.'); + grub_putchar ('\n'); + } +} Index: kern/powerpc/misc.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: kern/powerpc/misc.c diff -N kern/powerpc/misc.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ kern/powerpc/misc.c 13 Dec 2005 04:59:20 -0000 @@ -0,0 +1,31 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2005 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or = modify + * it under the terms of the GNU General Public License as published = by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include + +int grub_cpu_insert_trap (void *address) +{ + grub_uint32_t *instruction =3D address; + + *instruction =3D 0x7fe00008; /* trap */ + grub_arch_sync_caches ((void *) address, sizeof (grub_uint32_t)); += --Apple-Mail-4--623491173--