[parisc-linux] mem_pdc_call: how using it exactly.

Bruno Vidal bruno_vidal@hpfrcu03.france.hp.com
Fri, 05 Jul 2002 12:53:31 +0200


This is a multi-part message in MIME format.
--------------D65508782C25C4AEBFAFAF66
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

	Hi
I'm fighting with pdc calls since two weeks now. And I think I've nearly succeded to understand how it works. But now I have a problem. I've retrieve the modules hpa, so before using it, I need to
retrieve the spa and io_entry code in order to use it. For doing it I've wrote this, it is nearly the same thing than the function pdc_iodc_read():


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 ?

	thanks.
 
-- 
	Vidal Bruno, (770-4271)
        SSD-HA Team, HP-UX & LINUX Support
	bruno_vidal@admin.france.hp.com
--------------D65508782C25C4AEBFAFAF66
Content-Type: text/x-vcard; charset=iso-8859-1;
 name="bruno_vidal.vcf"
Content-Transfer-Encoding: base64
Content-Description: Card for Bruno Vidal
Content-Disposition: attachment;
 filename="bruno_vidal.vcf"

YmVnaW46dmNhcmQgCm46QnJ1bm87VklEQUwKdGVsO2ZheDowMS02OS04Mi02MC0xNAp0ZWw7
d29yazowMS02OS0yOS00Mi03MQp4LW1vemlsbGEtaHRtbDpUUlVFCnVybDp3d3cuZnJhbmNl
LmhwLmNvbQpvcmc6U29sdXRpb24gQ2VudGVyCnZlcnNpb246Mi4xCmVtYWlsO2ludGVybmV0
OmJydW5vX3ZpZGFsQGhwLmNvbQp0aXRsZTpFeHBlcnQgTG9naWNpZWwgRW52aXJvbm5lbWVu
dCBIYXV0ZSBEaXNwb25pYmlsaXTpCmFkcjtxdW90ZWQtcHJpbnRhYmxlOjs7SFAgRnJhbmNl
PTBEPTBBO1ouQSBkZSBDb3VydGFib2V1ZjsxIEF2LiBkdSBDYW5hZGE7OTE5NDcgTGVzIFVs
aXMgY2VkZXg7RnJhbmNlCngtbW96aWxsYS1jcHQ6OzI2MjA4CmZuOlZJREFMIEJydW5vCmVu
ZDp2Y2FyZAo=
--------------D65508782C25C4AEBFAFAF66--