[parisc-linux] mem_pdc_call: how using it exactly.
Matthew Wilcox
willy@debian.org
Fri, 5 Jul 2002 12:45:38 +0100
On Fri, Jul 05, 2002 at 12:53:31PM +0200, Bruno Vidal wrote:
> static unsigned long pdc_result[32] __attribute__ ((aligned (8)));
> static unsigned long pdc_result2[32] __attribute__ ((aligned (8)));
>
> /* Get spa for this module */
> hpa=dump_parms->hpa;
> index=0;
> iodc_data_size=32;
>
> ret = mem_pdc_call(PDC_IODC, PDC_IODC_READ, __pa(pdc_result), hpa, index, __pa(pdc_result2), iodc_data_size);
> convert_to_wide(pdc_result);
> bytecnt = pdc_result[0];
> memcpy(dump_iodc_data, pdc_result2, iodc_data_size);
>
> The result is always "ret = -3" -> cannot complete call without error.
> Do I forget anything (probably). Do I have to prevent interruption ? Do I have to modify PSW ?
more prosaically, i think iodc_data_size should be 32 * sizeof(long),
ie size in bytes, not number of longs.
but why code this up yourself rather than use pdc_iodc_read?
--
Revolutions do not require corporate support.