Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1EtTtk-00028W-4m for mharc-grub-devel@gnu.org; Mon, 02 Jan 2006 12:55:08 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EtTti-00027D-F0 for grub-devel@gnu.org; Mon, 02 Jan 2006 12:55:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EtTtf-00026G-DW for grub-devel@gnu.org; Mon, 02 Jan 2006 12:55:05 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EtTtf-00026C-1d for grub-devel@gnu.org; Mon, 02 Jan 2006 12:55:03 -0500 Received: from [194.109.24.23] (helo=smtp-vbr3.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EtTuk-0001EW-5S for grub-devel@gnu.org; Mon, 02 Jan 2006 12:56:10 -0500 Received: from localhost.localdomain (mgerards.xs4all.nl [82.92.27.129]) by smtp-vbr3.xs4all.nl (8.13.3/8.13.3) with ESMTP id k02HrLq7095160 for ; Mon, 2 Jan 2006 18:53:22 +0100 (CET) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: <247878a1a3ba32e60a89ff5f7a9272ab@penguinppc.org> <87slst871q.fsf@xs4all.nl> <87mzie5zc0.fsf@xs4all.nl> <2a1f26550bcf5fa3c91fa4f9342b8267@penguinppc.org> From: Marco Gerards Date: Mon, 02 Jan 2006 18:53:19 +0100 In-Reply-To: <2a1f26550bcf5fa3c91fa4f9342b8267@penguinppc.org> (Hollis Blanchard's message of "Mon, 2 Jan 2006 11:31:29 -0600") Message-ID: <87bqyu5xf4.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: [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: Mon, 02 Jan 2006 17:55:06 -0000 Hollis Blanchard writes: > On Jan 2, 2006, at 11:11 AM, Marco Gerards wrote: >> >>> +2005-12-12 Hollis Blanchard >>> + >>> + * commands/memdebug.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. >> >> Why don't you use trap.[ch]? Calling it misc is a bit too generic I >> think, and I'm afraid everyone put everything in it. > > That was my intention. Our build system makes it too painful to > introduce (then move and rename and remove) new files, and this didn't > seem important enough to merit its own header anyways. It's the current practise already. The disadvantage of adding things to misc.c is that everything will go in it and it will become a mess. Can you please rename these files before committing? >>> + grub_register_command ("memset", grub_cmd_memset, >>> GRUB_COMMAND_FLAG_BOTH, >>> + "memset address (value [len] | trap)", >>> + "Write a 32-bit quantity to memory.", 0); >> >> This syntax is a bit unusual, I think (for a GNU program). Mainly >> because it has quite some conditional parameters. How about: >> >> memset --value=len >> >> or: >> >> memset --trap > > "memset --address=foo --value=bar --len=baz" and "memset --address=foo > --value=trap"? Far too much typing for a very simple operation. Can you come up with something better, but without conditional arguments? >> Can you please explain what this command does? To be honest I don't >> really understand it immediately from the sourcecode. ;-) > > It writes a value into a region of memory. *G* How about trap? I didn't understand that part. In that case you write the trap instruction to that address? Shouldn't you flush the instruction cache in that case? Have you considered adding a feature so instead of an address a symbol name can be used? :-) -- Marco