This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: redboot peek and poke commands for prodding I/O ports
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Ian Campbell <icampbell at arcom dot com>
- Cc: eCos Patches <ecos-patches at sources dot redhat dot com>
- Date: Tue, 9 Nov 2004 12:07:37 +0100
- Subject: Re: redboot peek and poke commands for prodding I/O ports
- References: <1099059365.24918.1722.camel@icampbell-debian>
On Fri, Oct 29, 2004 at 03:16:06PM +0100, Ian Campbell wrote:
> Hi,
>
> The patch adds command peek and poke to RedBoot which can be used to
> access I/O mapped regions in the same way mfill and dump can be used on
> memory mapped regions. By default they are only enabled on i386
> platforms since it is the only one I know of that has a separate I/O
> bus.
I don't like the naming of these commands. From the Jargon File:
peek
n.,vt.
(and {poke}) The commands in most microcomputer BASICs for directly
accessing memory contents at an absolute address; often extended to
mean the corresponding constructs in any {HLL} (peek reads memory,
poke modifies it). Much hacking on small, non-MMU micros used to
consist of peeking around memory, more or less at random, to find the
location where the system keeps interesting stuff. Long (and variably
accurate) lists of such addresses for various computers circulated.
The results of pokes at these addresses may be highly useful, mildly
amusing, useless but neat, or (most likely) total {lossage} (see
{killer poke}).
The definition is that it access memory locations, not IO
locations. So i would prefer different names. iopeek and iopoke might
be possible, or "in" and "out" as you said in the cdl file.
> packages/redboot/current/ChangeLog:
>
> 2004-10-29 Ian Campbell <icampbell@arcom.com>
>
> * cdl/redboot.cdl, doc/redboot_cmds.sgml, src/iomem.c:
> Add support for PEEK and POKE commands to bit-bash
> the I/O regions.
Please could you include this as part of the patch itself. The less
work i have to do, the more likely a patch will get accepted quickly.
Also the HAL_READ_ and HAL_WRITE_ macros should exist on all
platforms, so i don't see a need to make these commands conditional on
x86. It should not really make a difference if the IO is memory mapped
into the normal memory address space or in a different address
space. The commands are still valid.
Thanks
Andrew