Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde!uunet!aplcen!samsung!cs.utexas.edu!bcm!shell!jody From: jody@shell.com (Jody Winston) Newsgroups: comp.sys.m68k Subject: using shared memory to talk to physical memory on a Motorala 147 Message-ID: Date: 5 Dec 89 18:12:54 GMT Sender: usenet@shell.com Distribution: comp.sys.m68k Organization: Shell Development Company, Bellaire Research Center, Houston, TX Lines: 45 I'm having trouble talking to physical shared memory on a Motorola 147 V/68 system. I get the id with: if ((id = shmget(key, 0x0c, (IPC_CREAT | IPC_PHYS | IPC_NOCLEAR | IPC_CI), (int)(0xff00 | 0xffff00) )) == -1) { perror ("shmget"); exit (-1); } And then set the permissions: buf.shm_perm.mode = 0666; if (shmctl(id, IPC_SET, &buf) == -1) { perror ("shmctl"); exit (-1); } And then map for read and write: if ((addr = shmat(id, (char *)0, (0) )) == (char *)-1) { perror ("shmctl"); exit (-1); } The address is different, than 0xff00, but I expected this due to virtual to phsyical translation. When I try to read or write to this address I get a bus error: printf("Address = 0X%X\t Data = 0X%X\n", addr, *addr); -- Jody Winston jody@shell.uucp ...!{sun,psuvax1,bcm,rice,decwrl,cs.utexas.edu}!shell!jody Shell Development Company, Bellaire Research Center P.O. Box 481, Room 2202, Houston, TX 77001 (Voice: 713 663-2993)