This is a discussion on setting up shared memory associated with a physical address in a C program. First, the space in memory must be reserved when the kernel boots up. This is accomplished by reserving the space in the kernel configuration file /etc/conf/pack.d/mm. The last few lines look like this: struct res_sect res_sects[] = { /* r_start, r_len, r_flags */ { 0, 0, 0 } /* This must be the last line, DO NOT change it. */ }; Insert a line before the { 0, 0, 0 } line and instead of the first two zeros, put the starting physical address and the size of the memory segment. For example, to reserve space starting at address 0x01000000 for a size of 0x8000, add a line so that the res_sect structure looks like this: struct res_sect res_sects[] = { /* r_start, r_len, rflags */ { 0x01000000, 0x8000, 0}, { 0, 0, 0 } }; To reserve space for two devices of size 0x8000 then just double the size; there's no need to add a second line with 0x01008000 as a starting address. The line would then look like: { 0x01000000, 0x16000, 0}, Once this is in /etc/conf/packd./mm, rebuild the operating system and reboot the new OS. Run /etc/conf/bin/idbuild -B to rebuild, and init 6 to reboot the new OS. Next, configure the shared memory for that physical address with shmconfig. There should already be a file in /etc/rc2.d called S38shmconfig. There is an example line that appears there: # /usr/sbin/shmconfig -p 0xf00000 -s 0x10000 -u root -g sys -m 0666 Copy that line and make the following changes: - Remove the # comment - Change the physical address which is the argument to the -p option to the one that matches the starting address you put in the res_sect structure. For our example, you would change 0xf00000 to 0x01000000. - Change the size which is the argument to the -s option to the one that matches the size in the res_sect structure. Following our example, you would change 0x10000 to 0x8000, assuming you only want one shared memory segment. If, however, you want a second shared memory segment for a second board, you'd need two lines, and continuing with the values from our example, the shmconfig lines would look like this: /usr/sbin/shmconfig -p 0x01000000 -s 0x8000 -u root -g sys -m 0666 /usr/sbin/shmconfig -p 0x01080000 -s 0x8000 -u root -g sys -m 0666 - Lastly, you need to change to a special name that the programs using the shared memory will refer to. Normally, it's the device name for the device being used. For example, if you were using an HSDE board, you would have /dev/hsde0 (and /dev/hsde1 if you had two boards). Then, you'd change to /dev/hsde0 in the first line (and if you needed a shared memory segment for another board, the second key would be changed to /dev/hsde1). That's it for reserving the space and configuring the shared memory. From then on, you would use shmget with the device name converted to a key by using ftok(): key = ftok("/dev/hsde0", 0); shmid = shmget(key, 0x8000, SHM_R|SHM_W); shmaddr = shmat(shmid, 0, 0); Now you have the virtual address of the shared memory region in shmaddr. Any programs which share this space must use the same key to create the shared memory, and read and write to the shmaddr address. The hsde is only used as an example. The size and locations of whatever board you are using is probably different. Please refer to the shmget(2), shmat(2), and shmop(2) man pages for more details on the usage of those system calls.