Feed for discussion OSTech in project QNX Operating System. http://community.qnx.com/sf/discussion/do/listTopics/projects.core_os/discussion.newcode Posts for OSTech post102358: Re: Quiet version of the ipl-diskpc1 http://community.qnx.com/sf/go/post102358 Hi, generaly speaking your next question will be about ipl-diskpc2 ... because the only thing, that the ipl-diskpc1 asks is the partition to boot from: "Press F1-F4 to select drive or select partition" At the offset 0x153 of the ipl-diskpc1 you would see the "0xCD 0x10" - this is a BIOS call "Write Character in TTY Mode". Just patch with NOP, NOP ( 0x90,0x90) Or, you can just put a zero (0x00) at 0x166 in place of 0x50 ('P') So, the text string "Press F1-F4 to select drive or select partition\0" will be "\0ress F1-F4 to select drive or select partition\0". No output. Mission complete. The ipl-diskpc2 is a bit complicated. But also doable same way. Regards, -- Alexandre Mon, 17 Jun 2013 17:18:30 GMT http://community.qnx.com/sf/go/post102358 Alexandre REBEKO 2013-06-17T17:18:30Z post102337: Re: Quiet version of the ipl-diskpc1 http://community.qnx.com/sf/go/post102337 Up. Same question. Professors, help please. Sat, 15 Jun 2013 21:01:47 GMT http://community.qnx.com/sf/go/post102337 Ivan Timakov 2013-06-15T21:01:47Z post102167: Stepping by Instruction through child process http://community.qnx.com/sf/go/post102167 Hello, I'm wondering how you can go about stepping by instruction through a child process. I already have the child process being spawned with SPAWN_HOLD. Then I send the DCMD_PROC_STOP flag to the process using devctl() and finally I send a SIGCONT signal to the process to get rid of the SIGSTOP that results from the SPAWN_HOLD. After that I send DCMD_PROC_RUN flags to the process with the _DEBUG_RUN_STEP flag set. I'm checking error codes and looking at the procfs_status structs each step of the way and everything looks reasonable aside from the instruction pointer. The instruction pointer is always around 17 million. The problem arises after I tell the child process to step to the next instruction for the first time. The child process does not execute and instead just dies. I have tested this setup without the stepping flag, and the child process runs fine so that leads me to believe that I am incorrectly stepping through. Is there an initialization process with the stack or instruction pointer that I'm not aware of? Or have I been stepping through incorrectly the entire time? My setup for the run flags is this: procfs_run run; memset(&run, 0, sizeof(run)) run.flags = 0 | _DEBUG_RUN_STEP and then I'm calling the devctl function like this: while( (retVal = devctl( fd, DCMD_PROC_RUN, &run, sizeof(run), NULL )) == EOK ) ... Thanks, Eric Tue, 11 Jun 2013 17:16:00 GMT http://community.qnx.com/sf/go/post102167 Eric K 2013-06-11T17:16:00Z post102050: ntpd vs. ntp.conf http://community.qnx.com/sf/go/post102050 ntpd by default looks directly under /etc/ to find ntp.conf file. However ntp.conf file in QNX 6.5.0 distribution is located under /etc/ntp/ directory. Therefore, to be able to run ntpd succesfully I had to pass the conf file's location manually using -c switch. This needs to be fixed. Thu, 06 Jun 2013 14:22:08 GMT http://community.qnx.com/sf/go/post102050 Tamer Uz 2013-06-06T14:22:08Z post101715: RE: QDB server & database not found http://community.qnx.com/sf/go/post101715 It's looking for libsqlite3.so.1 in your LD_LIBRARY_PATH . On my QNX650 HOST for some reason it is not in the /usr/lib directory...but you can find it in QNX_TARGET. thor$ uname -a QNX thor 6.5.0 2010/07/09-14:44:03EDT x86pc x86 thor$ which qdb /usr/sbin/qdb thor$ objdump -x /usr/sbin/qdb | grep NEEDED NEEDED libsqlite3.so.1 NEEDED libz.so.2 NEEDED libc.so.3 thor$ which -sa libsqlite3.so.1 which: no libsqlite3.so.1 in :/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib:/usr/photon/lib:/usr/photon/dll:/usr/local/lib:/opt/X11R6/lib:/usr/X11R6/lib:/proc/boot :/lib:/usr/lib:/lib/dll:/opt/lib thor$ qdb ldd:FATAL: Could not load library libsqlite3.so.1 thor$ find /usr -name "libsql*" /usr/qnx650/target/qnx6/ppcbe-spe/usr/lib/libsqlite3.so /usr/qnx650/target/qnx6/ppcbe-spe/usr/lib/libsqlite3.so.1 /usr/qnx650/target/qnx6/ppcbe/usr/lib/libsqlite3.so /usr/qnx650/target/qnx6/ppcbe/usr/lib/libsqlite3.so.1 /usr/qnx650/target/qnx6/x86/usr/lib/libsqlite3.so /usr/qnx650/target/qnx6/x86/usr/lib/libsqlite3.so.1 /usr/qnx650/target/qnx6/armle-v7/usr/lib/libsqlite3.so /usr/qnx650/target/qnx6/armle-v7/usr/lib/libsqlite3.so.1 /usr/qnx650/target/qnx6/armle/usr/lib/libsqlite3.so /usr/qnx650/target/qnx6/armle/usr/lib/libsqlite3.so.1 /usr/qnx650/target/qnx6/shle/usr/lib/libsqlite3.so /usr/qnx650/target/qnx6/shle/usr/lib/libsqlite3.so.1 thor$ ls -l */usr/lib/libsqlite3.so* ls: No such file or directory (*/usr/lib/libsqlite3.so*) thor$ use -i /usr/qnx650/target/qnx6/x86/usr/lib/libsqlite3.so.1 NAME=libsqlite3.so DESCRIPTION=SQLite Library DATE=2010/07/09-13:23:07-EDT STATE=stable HOST=mainbuild USER=builder VERSION=6.5.0 TAGID=89 thor$ echo $QNX_TARGET /usr/qnx650/target/qnx6 thor$ echo $LD_LIBRARY_PATH :/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib:/usr/photon/lib:/usr/photon/dll:/usr/local/lib:/opt/X11R6/lib:/usr/X11R6/lib thor$ which -sa libsqlite3.so.1 which: no libsqlite3.so.1 in :/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib:/usr/photon/lib:/usr/photon/dll:/usr/local/l ib:/opt/X11R6/lib:/usr/X11R6/lib:/usr/qnx650/target/qnx6/usr/lib:/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib thor$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/qnx650/target/qnx6/x86/usr/lib thor$ which -sa libsqlite3.so.1 /usr/qnx650/target/qnx6/x86/usr/lib/libsqlite3.so.1 thor$ qdb qdb: must be superuser to start server -----Original Message----- From: Jian Rong Yong [mailto:community-noreply@qnx.com] Sent: May-26-13 9:49 PM To: ostech-core_os Subject: Re: QDB server & database not found Hi, i tried starting qdb following the instruction under the help section but it replies me with a "Idd:FATAL: Could not load library libsqlite3.so.1". Any advise on how to fix this error? Thanks, Jian Rong _______________________________________________ OSTech http://community.qnx.com/sf/go/post101698 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Mon, 27 May 2013 13:58:59 GMT http://community.qnx.com/sf/go/post101715 Chris Travis 2013-05-27T13:58:59Z post101698: Re: QDB server & database not found http://community.qnx.com/sf/go/post101698 Hi, i tried starting qdb following the instruction under the help section but it replies me with a "Idd:FATAL: Could not load library libsqlite3.so.1". Any advise on how to fix this error? Thanks, Jian Rong Mon, 27 May 2013 01:48:49 GMT http://community.qnx.com/sf/go/post101698 Jian Rong Yong 2013-05-27T01:48:49Z post101603: Re: QDB server & database not found http://community.qnx.com/sf/go/post101603 The reference example not real specific, but you need create file /db/customerdb.cfg as the text between dashes- ------- [customerdb] Filename=/db/customerdb Schema File=/db/customerdb.sql /db/customerdb.sql: CREATE TABLE customers( custoemrid INTEGER PRIMARY KEY AUTOINCREMENT, firstname TEXT, lastname TEXT ) ------- Then start qdb as... # qdb -c /db/qdb.cfg -vvvvvv -otempstore=/tmp -Rauto -A If it succeeds, you should see... QDB: created missing database customerdb and /dev/qdb/customerdb will exist. Wed, 22 May 2013 15:26:38 GMT http://community.qnx.com/sf/go/post101603 Dennis Kellly 2013-05-22T15:26:38Z post101602: Re: QDB server & database not found http://community.qnx.com/sf/go/post101602 Read through the "Starting QDB" section of the documentation here: http://www.qnx.com/developers/docs/6.5.0_sp1/topic/com.qnx.doc.qdb_en_dev_g uide/starting.html?cp=2_0_2 This will help you to start the qdb server. When this is running you will see your configured databases in /dev/qdb/ (use "ls /dev/qdb/" to see). If you do not see /dev/qdb/ please confirm that qdb started successfully; if you do not see your database name listed please confirm that it is properly configured (start qdb with "-vvvvv" and check "sloginfo" for an error messages). If qdb is running you can use the qdb_*() APIs in an application to interact with qdb; you can also use the command-line utility "qdbc". Qdbc is primarily used to run SQL statements on your database: http://www.qnx.com/developers/docs/6.5.0_sp1/topic/com.qnx.doc.qdb_en_dev_g uide/qdbc.html?cp=2_0_3 -- Ryan J. Allen QNX Software Systems On 13-05-19 9:08 PM, "Jian Rong Yong" <community-noreply@qnx.com> wrote: >Hi, >i have read about the qdb server under the help section and i have no >clue on how to interact with it. Also when i use qdb_connect() to connect >to the database, it replied with a "No such path or directory". >please advise. > >Thanks, >Jian Rong Wed, 22 May 2013 15:16:38 GMT http://community.qnx.com/sf/go/post101602 Ryan Allen 2013-05-22T15:16:38Z post101551: QDB server & database not found http://community.qnx.com/sf/go/post101551 Hi, i have read about the qdb server under the help section and i have no clue on how to interact with it. Also when i use qdb_connect() to connect to the database, it replied with a "No such path or directory". please advise. Thanks, Jian Rong Mon, 20 May 2013 01:08:53 GMT http://community.qnx.com/sf/go/post101551 Jian Rong Yong 2013-05-20T01:08:53Z post101541: Quiet version of the ipl-diskpc1 http://community.qnx.com/sf/go/post101541 Hi, I need version of the ipl-diskpc1 which doesn't print anything on the screen. Where can I find source code of this bootloader ? Regards, Jacek Fri, 17 May 2013 20:55:58 GMT http://community.qnx.com/sf/go/post101541 Jacek Rudnicki 2013-05-17T20:55:58Z post101537: Re: USB drive detection on startup http://community.qnx.com/sf/go/post101537 I could have also been a bit more clear in my mention of "shared access" - glad you got it sorted out though. Fri, 17 May 2013 17:08:44 GMT http://community.qnx.com/sf/go/post101537 Gervais Mulongoy 2013-05-17T17:08:44Z post101535: Re: USB drive detection on startup http://community.qnx.com/sf/go/post101535 Thanks - this is good to know as I usually just looped as the documentation described. Fri, 17 May 2013 17:07:56 GMT http://community.qnx.com/sf/go/post101535 Gervais Mulongoy 2013-05-17T17:07:56Z post101529: RE: USB drive detection on startup http://community.qnx.com/sf/go/post101529 Right, someone already attached to it, you just need readonly connection, By the way, a more efficiency approach is to do single one call for each bus extern int usbd_topology_ext(struct usbd_connection *connection, _Uint8t busno, usbd_bus_topology_t *tp); and exam the tp from devno 1 to 63. if upstream_devno is 0 or 0xff, then there is no device on that devno. -----Original Message----- From: Robert Murrell [mailto:community-noreply@qnx.com] Sent: Friday, May 17, 2013 11:48 AM To: ostech-core_os Subject: Re: USB drive detection on startup If you carefully read the documentation, you might just do the right thing I changed my code from this: parms.funcs = &funcs; to this: parms.funcs = NULL; and it is working. _______________________________________________ OSTech http://community.qnx.com/sf/go/post101528 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Fri, 17 May 2013 15:52:30 GMT http://community.qnx.com/sf/go/post101529 Lichun Zhu 2013-05-17T15:52:30Z post101528: Re: USB drive detection on startup http://community.qnx.com/sf/go/post101528 If you carefully read the documentation, you might just do the right thing I changed my code from this: parms.funcs = &funcs; to this: parms.funcs = NULL; and it is working. Fri, 17 May 2013 15:47:57 GMT http://community.qnx.com/sf/go/post101528 Robert Murrell 2013-05-17T15:47:57Z post101526: Re: USB drive detection on startup http://community.qnx.com/sf/go/post101526 Base on your suggestion and the example code in the docs, I wrote this test program: #include <stdlib.h> #include <stdio.h> #include <string.h> #include <errno.h> #include <sys/usbdi.h> int main(int argc, char *argv[]) { int rc; usbd_connect_parm_t parms; struct usbd_connection *connection; usbd_device_ident_t ident; usbd_funcs_t funcs; usbd_device_instance_t instance; struct usbd_device *device; usbd_device_descriptor_t *descriptor; struct usbd_desc_node *node; memset(&parms, 0, sizeof(parms)); memset(&funcs, 0, sizeof(funcs)); funcs.nentries = _USBDI_NFUNCS; ident.vendor = USBD_CONNECT_WILDCARD; ident.device = USBD_CONNECT_WILDCARD; ident.dclass = USBD_CONNECT_WILDCARD; ident.subclass = USBD_CONNECT_WILDCARD; ident.protocol = USBD_CONNECT_WILDCARD; parms.vusb = USB_VERSION; parms.vusbd = USBD_VERSION; parms.ident = &ident; parms.funcs = &funcs; parms.connect_wait = 2; if ((rc = usbd_connect(&parms, &connection)) == EOK) { //attach to USB0 int busno; int devno; for (busno = 0; busno < 10; ++busno) { for (devno = 0; devno < 64; ++devno) { memset(&instance, USBD_CONNECT_WILDCARD, sizeof(instance)); instance.path = busno; instance.devno = devno; if ((rc = usbd_attach(connection, &instance, 0, &device)) == EOK) { if ((descriptor = usbd_device_descriptor(device, &node)) != NULL) { printf("Found device\n"); } } else { printf("Bus %d device %d: %s\n", busno, devno, strerror(rc)); } } } rc = usbd_disconnect(connection); } return EXIT_SUCCESS; } All calls to usbd_attach return ENODEV, except the call for busno = 0 and devno = 1. That call returns EBUSY. I have a USB drive plugged in and the values corresponds to the report given by "usb". What am I doing wrong? > You could do a shared access scan for the device by connecting > (usbd_connect())to the USB server but not providing any callbacks and > setting the device ident to use wildcards. You then use usbd_attach() to > loop through all the devices (see usbd_attach() docs for notes on > "Looping") and check the instance of the attached device for a dclass of > 0x06, a subclass of 0x08 and maybe even a protocol of 0x50 (that's what > usb -vv showed for my umass device, your mileage will vary though). You > could then increment a counter to track how many umass devices are > plugged in at the time or just bail out at that point and return status > to your script etc. > Fri, 17 May 2013 15:32:59 GMT http://community.qnx.com/sf/go/post101526 Robert Murrell 2013-05-17T15:32:59Z post101520: Re: USB drive detection on startup http://community.qnx.com/sf/go/post101520 Thanks. I didn't know this interface existed. This might be just what I'm looking for. Fri, 17 May 2013 13:22:06 GMT http://community.qnx.com/sf/go/post101520 Robert Murrell 2013-05-17T13:22:06Z post101517: Re: USB drive detection on startup http://community.qnx.com/sf/go/post101517 You could do a shared access scan for the device by connecting (usbd_connect())to the USB server but not providing any callbacks and setting the device ident to use wildcards. You then use usbd_attach() to loop through all the devices (see usbd_attach() docs for notes on "Looping") and check the instance of the attached device for a dclass of 0x06, a subclass of 0x08 and maybe even a protocol of 0x50 (that's what usb -vv showed for my umass device, your mileage will vary though). You could then increment a counter to track how many umass devices are plugged in at the time or just bail out at that point and return status to your script etc. On 05/17/2013 08:31 AM, Robert Murrell wrote: > That last question should be is there any way to detect that there is no USB drive installed versus one that is installed but hasn't been mounted yet? > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post101515 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Fri, 17 May 2013 12:58:39 GMT http://community.qnx.com/sf/go/post101517 Gervais Mulongoy 2013-05-17T12:58:39Z post101516: Re: USB drive detection on startup http://community.qnx.com/sf/go/post101516 Can you call the "usb" utility and grep the output for the enumeration list? Linst hould contain your usb drive OR not. Fri, 17 May 2013 12:34:52 GMT http://community.qnx.com/sf/go/post101516 Dennis Kellly 2013-05-17T12:34:52Z post101515: Re: USB drive detection on startup http://community.qnx.com/sf/go/post101515 That last question should be is there any way to detect that there is no USB drive installed versus one that is installed but hasn't been mounted yet? Fri, 17 May 2013 12:31:10 GMT http://community.qnx.com/sf/go/post101515 Robert Murrell 2013-05-17T12:31:10Z post101514: USB drive detection on startup http://community.qnx.com/sf/go/post101514 We are using QNX 6.5.0 with a minimal configuration in an embedded system. Our application has the requirement that if it powers up with a USB drive plugged in, we look for a file with a specific signature, an if it exists, we execute it instead of the installed application. We use this feature for fault recovery and debugging. We execute the following in the image script before our application is executed: # USB port support io-usb -dehci -dohci -duhci & waitfor /dev/io-usb/io-usb devb-umass cam pnp blk noatime disk name=umass cdrom name=umasscd & # Start the automounter /usr/sbin/mcd -v /etc/mcd.conf Our startup program blindly waits two seconds before checking the USB drive for files. This is to give time for the automounter to detect and mount the drive. I found a USB drive that take just over two seconds for the automounter to detect, so they do not get detected in time. I can extend this wait time to accommodate it, but I do not like this dead time in our startup and would like to make it more intelligent. I can monitor in a timed loop to detect the presence of a USB drive earlier, but it would still wait the full timeout if no USB drive is inserted. What I need is a way to detect that there is no drive inserted and then skip the check. Is there any way to detect that there is no drive installed that hasn't been mounted yet? Fri, 17 May 2013 12:27:48 GMT http://community.qnx.com/sf/go/post101514 Robert Murrell 2013-05-17T12:27:48Z post101440: Re: cannot find -llibqdb.so http://community.qnx.com/sf/go/post101440 Try specifying the additional library as "qdb"--this should add "-l qdb" to the linker arguments. The linker will surround this with "libqdb.so" and search for that. If this fails, check to make sure that libqdb.so is in your $QNX_TARGET directory. -- Ryan J. Allen QNX Software Systems On 13-05-14 10:24 PM, "Jian Rong Yong" <community-noreply@qnx.com> wrote: >Hi i'm a student trying to work with a embedded database, i have added >the extra library(libqdb.so) under the project properties/Linker. >however, when i build the project, it still gives me the cannot find >-llibqdb.so error. Please advise. > >thanks, >Jian Rong Wed, 15 May 2013 12:47:56 GMT http://community.qnx.com/sf/go/post101440 Ryan Allen 2013-05-15T12:47:56Z post101425: cannot find -llibqdb.so http://community.qnx.com/sf/go/post101425 Hi i'm a student trying to work with a embedded database, i have added the extra library(libqdb.so) under the project properties/Linker. however, when i build the project, it still gives me the cannot find -llibqdb.so error. Please advise. thanks, Jian Rong Wed, 15 May 2013 02:24:22 GMT http://community.qnx.com/sf/go/post101425 Jian Rong Yong 2013-05-15T02:24:22Z post101168: Re: Sata on p1022, QorIq http://community.qnx.com/sf/go/post101168 It seems the latest release bring us a new driver : devb-fslSata . Does anyone use it ? Mon, 06 May 2013 12:44:19 GMT http://community.qnx.com/sf/go/post101168 Philippe ELSKENS 2013-05-06T12:44:19Z post101086: Re: Are abstract sockets supported by qnx? http://community.qnx.com/sf/go/post101086 Thanks very much for the fast reply. And answer. ! :-) (this thread may be closed now). Thu, 02 May 2013 14:35:18 GMT http://community.qnx.com/sf/go/post101086 Marck French 2013-05-02T14:35:18Z post101079: Re: Are abstract sockets supported by qnx? http://community.qnx.com/sf/go/post101079 They are in the next release. Ask your sales rep if you want a preview. -seanb From: Marck French Sent: Thursday, May 2, 2013 4:12 AM To: ostech-core_os Reply To: ostech-core_os@community.qnx.com Subject: Are abstract sockets supported by qnx? Greetings, we develop a few applications which are ported to various hardware-platforms. On one of these platforms Qnx is running. Our code uses "abstract sockets" and does not work under Qnx. When we try to "bind" an abstrackt socket we get an error (2 : path or file not found). We triple checked the code and libraries and tried a lot of things, but we just can't get an abstract socket to work. We could not find documentation stating that they are not supported (nor that they are) in qnx. So, the question is: are "abstract sockets" supported on qnx? grtz, Marck _______________________________________________ OSTech http://community.qnx.com/sf/go/post101075 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 02 May 2013 12:00:50 GMT http://community.qnx.com/sf/go/post101079 Sean Boudreau 2013-05-02T12:00:50Z post101075: Are abstract sockets supported by qnx? http://community.qnx.com/sf/go/post101075 Greetings, we develop a few applications which are ported to various hardware-platforms. On one of these platforms Qnx is running. Our code uses "abstract sockets" and does not work under Qnx. When we try to "bind" an abstrackt socket we get an error (2 : path or file not found). We triple checked the code and libraries and tried a lot of things, but we just can't get an abstract socket to work. We could not find documentation stating that they are not supported (nor that they are) in qnx. So, the question is: are "abstract sockets" supported on qnx? grtz, Marck Thu, 02 May 2013 08:11:54 GMT http://community.qnx.com/sf/go/post101075 Marck French 2013-05-02T08:11:54Z post100727: Sata on p1022, QorIq http://community.qnx.com/sf/go/post100727 Hello, Does anybody knows if QNX 6.5 support the integrated sata interface on QorIq family ? and in this case what's the driver to start (devb- ?) Thanks, Philippe. Thu, 18 Apr 2013 12:56:34 GMT http://community.qnx.com/sf/go/post100727 Philippe ELSKENS 2013-04-18T12:56:34Z post100670: QorIQ, e500 : Supervisor-Level Registers Access. http://community.qnx.com/sf/go/post100670 Hello folks, Does anyone know how to access this set of registers ? for instance how to program the wathdog register (enable and then refresh) on QorIq ? I guess mtspr or mfspr instructions throw exceptions in a user-level process don't they ? Philippe Wed, 17 Apr 2013 07:45:55 GMT http://community.qnx.com/sf/go/post100670 Philippe ELSKENS 2013-04-17T07:45:55Z post100433: Re: RE: Which dynamic libraries is actually loaded by process X http://community.qnx.com/sf/go/post100433 Thanx - that seems to do the trick. Wed, 10 Apr 2013 11:54:47 GMT http://community.qnx.com/sf/go/post100433 Per Kristoffersen 2013-04-10T11:54:47Z post100432: RE: Which dynamic libraries is actually loaded by process X http://community.qnx.com/sf/go/post100432 You could try "pidin mem" Andy -----Original Message----- From: Per Kristoffersen [mailto:community-noreply@qnx.com] Sent: Wednesday, April 10, 2013 7:46 AM To: ostech-core_os Subject: Which dynamic libraries is actually loaded by process X Is there any way of telling (listing) the libraries loaded by a process. objdump -x only lists the libraries linked to the process - but I'm looking for a tool that lists the dynamic libraries actually loaded be a running process. Any ideas / hints / tips? _______________________________________________ OSTech http://community.qnx.com/sf/go/post100431 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 10 Apr 2013 11:46:53 GMT http://community.qnx.com/sf/go/post100432 Andrew Sherk 2013-04-10T11:46:53Z post100431: Which dynamic libraries is actually loaded by process X http://community.qnx.com/sf/go/post100431 Is there any way of telling (listing) the libraries loaded by a process. objdump -x only lists the libraries linked to the process - but I'm looking for a tool that lists the dynamic libraries actually loaded be a running process. Any ideas / hints / tips? Wed, 10 Apr 2013 11:46:23 GMT http://community.qnx.com/sf/go/post100431 Per Kristoffersen 2013-04-10T11:46:23Z post100420: memory barrier on arm when Enable Irq http://community.qnx.com/sf/go/post100420 Hi all I still wonder about on Arm smp platform , Do QNX need a memory barrier ? On x86 platform, this is the code # define __inline_InterruptEnable() \ ((void)({ \ __asm__ __volatile__ ( \ "sti" \ : : : "memory"); \ })) but on Arm platform , seems no memory barrier static __inline__ void __attribute__((__unused__)) __inline_InterruptEnable(void) { if (__cpu_flags & __ARM_CPU_FLAG_V6) { __asm__ __volatile__("cpsie i"); } else { unsigned __tmp; __asm__ __volatile__( "mrs %0, cpsr;" "bic %0, %0, #0x80;" "msr cpsr, %0;" : "=r" (__tmp) ); } } only in this will have the dmb instruction static __inline__ void __attribute__((__unused__)) __inline_InterruptLock(struct intrspin *__spin) { __inline_InterruptDisable(); if (__cpu_flags & __ARM_CPU_FLAG_SMP) { volatile unsigned val; unsigned tmp; __asm__ __volatile__( "0: ldrex %0, [%3];" " teq %0, #0;" " wfene;" " strexeq %1, %2, [%3];" " teqeq %1, #0;" " bne 0b;" : "=&r" (val), "=&r"(tmp) : "r" (1), "r" (&__spin->value) ); if (__cpu_flags & __ARM_CPU_FLAG_V7) { __asm__ __volatile__("dmb"); } else { __asm__ __volatile__("mcr p15, 0, %0, c7, c10, 4" : : "r"(0)); } } } Is there any special reason for this ? And on Linux platform ,when enable irq ,always have a memory barrier http://lxr.linux.no/linux+v3.8.6/arch/arm/include/asm/irqflags.h Why QNX dont need this ? Thanks and regards Wed, 10 Apr 2013 05:04:21 GMT http://community.qnx.com/sf/go/post100420 Xiongwei Huang 2013-04-10T05:04:21Z post100215: AW: Re: AW: Re: RE: Problem with slinger crashing. http://community.qnx.com/sf/go/post100215 You can also set a breakpoint on exit(), to see if it terminates deliberately. If it does, take a bacltrace... - Thomas ----- Originalnachricht ----- Von: Todd Peterson [mailto:community-noreply@qnx.com] Gesendet: Wednesday, March 27, 2013 07:24 PM An: ostech-core_os <ostech-core_os@community.qnx.com> Betreff: Re: AW: Re: RE: Problem with slinger crashing. The newer version exits as well. No dump produced or diagnostics in syslog. Nothing gets printed to console window. Are there 'normal' exit conditions? If so, could these be instrumented to print a message of some sort? For now, I wrote a script that checks if slinger is running every 5 secs and restarts if it isn't. Ugly way to do it. > Thomas, > I think I had a version 6.4.0 of slinger running. md5sum did not match slinger > in my 6.4.1 development environment (28dac151ff397d6d8537d78634552798). It > was crashing after about 20 min, it has been running todat for well over an > hour. > Thanks for your help. > Todd > _______________________________________________ OSTech http://community.qnx.com/sf/go/post100212 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 28 Mar 2013 05:31:37 GMT http://community.qnx.com/sf/go/post100215 Thomas Haupt 2013-03-28T05:31:37Z post100213: Re: AW: Re: RE: Problem with slinger crashing. http://community.qnx.com/sf/go/post100213 Attach to it with gdb and let it run. gdb may print if it's being hit with a signal. Sent from my BlackBerry 10 smartphone. From: Todd Peterson Sent: Wednesday, March 27, 2013 7:24 PM To: ostech-core_os Reply To: ostech-core_os@community.qnx.com Subject: Re: AW: Re: RE: Problem with slinger crashing. The newer version exits as well. No dump produced or diagnostics in syslog. Nothing gets printed to console window. Are there 'normal' exit conditions? If so, could these be instrumented to print a message of some sort? For now, I wrote a script that checks if slinger is running every 5 secs and restarts if it isn't. Ugly way to do it. > Thomas, > I think I had a version 6.4.0 of slinger running. md5sum did not match slinger > in my 6.4.1 development environment (28dac151ff397d6d8537d78634552798). It > was crashing after about 20 min, it has been running todat for well over an > hour. > Thanks for your help. > Todd > _______________________________________________ OSTech http://community.qnx.com/sf/go/post100212 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 27 Mar 2013 23:29:59 GMT http://community.qnx.com/sf/go/post100213 Sean Boudreau 2013-03-27T23:29:59Z post100212: Re: AW: Re: RE: Problem with slinger crashing. http://community.qnx.com/sf/go/post100212 The newer version exits as well. No dump produced or diagnostics in syslog. Nothing gets printed to console window. Are there 'normal' exit conditions? If so, could these be instrumented to print a message of some sort? For now, I wrote a script that checks if slinger is running every 5 secs and restarts if it isn't. Ugly way to do it. > Thomas, > I think I had a version 6.4.0 of slinger running. md5sum did not match slinger > in my 6.4.1 development environment (28dac151ff397d6d8537d78634552798). It > was crashing after about 20 min, it has been running todat for well over an > hour. > Thanks for your help. > Todd > Wed, 27 Mar 2013 23:24:01 GMT http://community.qnx.com/sf/go/post100212 Todd Peterson 2013-03-27T23:24:01Z post100207: Re: AW: Re: RE: Problem with slinger crashing. http://community.qnx.com/sf/go/post100207 Try bozohttp. Builds from pkgsrc and is tiny. On Wed, Mar 27, 2013 at 01:35:00PM -0400, Todd Peterson wrote: > Thomas, > I think I had a version 6.4.0 of slinger running. md5sum did not match slinger in my 6.4.1 development environment (28dac151ff397d6d8537d78634552798). It was crashing after about 20 min, it has been running todat for well over an hour. > Thanks for your help. > Todd > P.S. Is there any plan for an https version of slinger? We have been developing one, but it is a pain in the butt starting from scratch. > > > Hi Todd, > > > > Please do so. I'm rather curious. > > > > Cheers, > > Thomas > > > > ----- Originalnachricht ----- > > Von: Todd Peterson [mailto:community-noreply@qnx.com] > > Gesendet: Wednesday, March 27, 2013 10:05 AM > > An: ostech-core_os <ostech-core_os@community.qnx.com> > > Betreff: Re: RE: Problem with slinger crashing. > > > > We are using 6.4.1. I see in release notes that your bug fixes should be there > > . Besides, I am sure that it is not the too long query string bug. I will try > > the dumper command to see what I get. > > Thanks, > > Todd > > > Hi Todd, > > > > > > unfortunately, we cannot provide source code any more. The fix I made back > > > then should long be in the product; I checked it in on Wed, Feb 11 2009, at > > 16 > > > :20:48. It it thus part of all releases at least since 6.5.0. > > > > > > What version of QNX Neutrino are you running? If it's < 6.5.0, I can probably build you an experimental binary with my patch applied, if it is >= 6.5.0, then you are > > > > > probably facing a different bug. In the latter case, I'd need a core file, > > or > > > an exact description for how to reproduce the issue, or both. > > > > > > Kind regards, > > > Thomas > > > > > > > > > > > > > > _______________________________________________ > > > > OSTech > > http://community.qnx.com/sf/go/post100201 > > To cancel your subscription to this discussion, please e-mail ostech-core_os- > > unsubscribe@community.qnx.com > > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post100206 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 27 Mar 2013 17:37:01 GMT http://community.qnx.com/sf/go/post100207 Sean Boudreau 2013-03-27T17:37:01Z post100206: Re: AW: Re: RE: Problem with slinger crashing. http://community.qnx.com/sf/go/post100206 Thomas, I think I had a version 6.4.0 of slinger running. md5sum did not match slinger in my 6.4.1 development environment (28dac151ff397d6d8537d78634552798). It was crashing after about 20 min, it has been running todat for well over an hour. Thanks for your help. Todd P.S. Is there any plan for an https version of slinger? We have been developing one, but it is a pain in the butt starting from scratch. > Hi Todd, > > Please do so. I'm rather curious. > > Cheers, > Thomas > > ----- Originalnachricht ----- > Von: Todd Peterson [mailto:community-noreply@qnx.com] > Gesendet: Wednesday, March 27, 2013 10:05 AM > An: ostech-core_os <ostech-core_os@community.qnx.com> > Betreff: Re: RE: Problem with slinger crashing. > > We are using 6.4.1. I see in release notes that your bug fixes should be there > . Besides, I am sure that it is not the too long query string bug. I will try > the dumper command to see what I get. > Thanks, > Todd > > Hi Todd, > > > > unfortunately, we cannot provide source code any more. The fix I made back > > then should long be in the product; I checked it in on Wed, Feb 11 2009, at > 16 > > :20:48. It it thus part of all releases at least since 6.5.0. > > > > What version of QNX Neutrino are you running? If it's < 6.5.0, I can probably build you an experimental binary with my patch applied, if it is >= 6.5.0, then you are > > > probably facing a different bug. In the latter case, I'd need a core file, > or > > an exact description for how to reproduce the issue, or both. > > > > Kind regards, > > Thomas > > > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post100201 > To cancel your subscription to this discussion, please e-mail ostech-core_os- > unsubscribe@community.qnx.com Wed, 27 Mar 2013 17:35:00 GMT http://community.qnx.com/sf/go/post100206 Todd Peterson 2013-03-27T17:35:00Z post100204: AW: Re: RE: Problem with slinger crashing. http://community.qnx.com/sf/go/post100204 Hi Todd, Please do so. I'm rather curious. Cheers, Thomas ----- Originalnachricht ----- Von: Todd Peterson [mailto:community-noreply@qnx.com] Gesendet: Wednesday, March 27, 2013 10:05 AM An: ostech-core_os <ostech-core_os@community.qnx.com> Betreff: Re: RE: Problem with slinger crashing. We are using 6.4.1. I see in release notes that your bug fixes should be there. Besides, I am sure that it is not the too long query string bug. I will try the dumper command to see what I get. Thanks, Todd > Hi Todd, > > unfortunately, we cannot provide source code any more. The fix I made back > then should long be in the product; I checked it in on Wed, Feb 11 2009, at 16 > :20:48. It it thus part of all releases at least since 6.5.0. > > What version of QNX Neutrino are you running? If it's < 6.5.0, I can probably build you an experimental binary with my patch applied, if it is >= 6.5.0, then you are > probably facing a different bug. In the latter case, I'd need a core file, or > an exact description for how to reproduce the issue, or both. > > Kind regards, > Thomas _______________________________________________ OSTech http://community.qnx.com/sf/go/post100201 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 27 Mar 2013 15:06:31 GMT http://community.qnx.com/sf/go/post100204 Thomas Haupt 2013-03-27T15:06:31Z post100203: rmat - file format http://community.qnx.com/sf/go/post100203 Hello, I was just wondering, if there is a complete description of the rmat - file format available. It is possible to reverse engineer parts of it, but it would be helpful for me to have a complete description. Any help apreciated. Kindest Regards, Franz Brandel Wed, 27 Mar 2013 14:44:56 GMT http://community.qnx.com/sf/go/post100203 Franz Brandel 2013-03-27T14:44:56Z post100201: Re: RE: Problem with slinger crashing. http://community.qnx.com/sf/go/post100201 We are using 6.4.1. I see in release notes that your bug fixes should be there. Besides, I am sure that it is not the too long query string bug. I will try the dumper command to see what I get. Thanks, Todd > Hi Todd, > > unfortunately, we cannot provide source code any more. The fix I made back > then should long be in the product; I checked it in on Wed, Feb 11 2009, at 16 > :20:48. It it thus part of all releases at least since 6.5.0. > > What version of QNX Neutrino are you running? If it's < 6.5.0, I can probably build you an experimental binary with my patch applied, if it is >= 6.5.0, then you are > probably facing a different bug. In the latter case, I'd need a core file, or > an exact description for how to reproduce the issue, or both. > > Kind regards, > Thomas Wed, 27 Mar 2013 14:05:26 GMT http://community.qnx.com/sf/go/post100201 Todd Peterson 2013-03-27T14:05:26Z post100197: Re: Problem with slinger crashing. http://community.qnx.com/sf/go/post100197 Hello Todd, You can always start dumper to point to another directory (option -d i believe), such as /tmp or /dev/shmem and collect the core file there. Gervais Wed, 27 Mar 2013 11:45:58 GMT http://community.qnx.com/sf/go/post100197 Gervais Mulongoy 2013-03-27T11:45:58Z post100192: Re: RE: Problem with slinger crashing. http://community.qnx.com/sf/go/post100192 Hi Todd, unfortunately, we cannot provide source code any more. The fix I made back then should long be in the product; I checked it in on Wed, Feb 11 2009, at 16:20:48. It it thus part of all releases at least since 6.5.0. What version of QNX Neutrino are you running? If it's < 6.5.0, I can probably build you an experimental binary with my patch applied, if it is >= 6.5.0, then you are probably facing a different bug. In the latter case, I'd need a core file, or an exact description for how to reproduce the issue, or both. Kind regards, Thomas Wed, 27 Mar 2013 06:15:42 GMT http://community.qnx.com/sf/go/post100192 Thomas Haupt 2013-03-27T06:15:42Z post100189: Re: RE: Problem with slinger crashing. http://community.qnx.com/sf/go/post100189 Thomas, We have a similar problem, but on the ARM platform. Could you provide the source code for your experimental version of slinger? Or the executable for ARM? We get no dump file, since our image does not have a /var/dumps directory. We do not get a syslog message either. No message in console window either. Thanks, Todd > Hi Greg, > > you're right - there is yet another, more serious problem. It is caused by an > HTTP GET request with a long query string - in your case, the query string by > itself is already 520 characters long. > > While this doesn't cause a buffer overflow, it invokes a code path in slinger > that's obviously supposed to prevent query strings longer than 256 characters > from being passed to the cgi script as a command line argument. Unfortunately, > this code path forgets to append a NULL to the argv[] vector that's later > used to run the script... > > Below you can see the URL that must have been referred to when the crash > occured; try to access it -- it should crash slinger right away, given I got > the IP, path and script name right. > > http://10.0.5.195/cgi-bin/TF2000cmd?COMMAND=EXPORT_SHMEM_XML&QUAD=0&rndval= > 1233936626477COMMAND=EXPORT_SHMEM_XML&QUAD=0&rndval=1233936631312COMMAND= > EXPORT_SHMEM_XML&QUAD=0&rndval=1233936633946COMMAND=EXPORT_SHMEM_XML&QUAD=0& > rndval=1233936635949COMMAND=EXPORT_SHMEM_XML&QUAD=0&rndval= > 1233936637949COMMAND=EXPORT_SHMEM_XML&QUAD=0&rndval=1233936640128COMMAND= > EXPORT_SHMEM_XML&QUAD=0&rndval=1233936642449COMMAND=EXPORT_SHMEM_XML&QUAD=0& > rndval=1233936644447COMMAND=EXPORT_SHMEM_XML&QUAD=0&rndval= > 1233936646450COMMAND=EXPORT_SHMEM_XML&QUAD=0&rndval=1233936648583 > > You might also try the experimental slinger attached (I hope!) to this post, > it's got the two bugs fixed that I found so far. > > Cheers, > - Thomas Tue, 26 Mar 2013 23:51:35 GMT http://community.qnx.com/sf/go/post100189 Todd Peterson 2013-03-26T23:51:35Z post100125: Re: RE: AHCI reenumeration http://community.qnx.com/sf/go/post100125 Sorry for my unclear definition of my problem. I would like to connect the sata disk directly to sata port of the CPU board. I don't want to use USB as a means of connection. In QNX4 the Fsys.ahci has some options like nports and pi. I haven't seen this options in devb-ahci. Would it be possible to start two instances of Fsys.ahci (or devb-ahci), where those two instances would have different non overlapping bitmap masks? Thanks, PKY > If it's a SATA to usb, the host only understand mass storage usb protocol, it > will up to the converter to do the rescan internally. > > > -----Original Message----- > From: Pavol Kycina [mailto:community-noreply@qnx.com] > Sent: Friday, March 22, 2013 8:04 AM > To: ostech-core_os > Subject: AHCI reenumeration > > Hello. > > Still trying to solve the way how to safely store data in a control system. > > I would like to use disk in "removable caddy" to get copy of the data from a > control system. I would prefer sata connection to usb (various reasons). > > Is there any way after inserting the disk to tell the system that it should > rescan SATA ports for new disk? > > Thanks, PKY > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post100091 > To cancel your subscription to this discussion, please e-mail ostech-core_os- > unsubscribe@community.qnx.com Mon, 25 Mar 2013 08:48:49 GMT http://community.qnx.com/sf/go/post100125 Pavol Kycina 2013-03-25T08:48:49Z post100098: RE: AHCI reenumeration http://community.qnx.com/sf/go/post100098 If it's a SATA to usb, the host only understand mass storage usb protocol, it will up to the converter to do the rescan internally. -----Original Message----- From: Pavol Kycina [mailto:community-noreply@qnx.com] Sent: Friday, March 22, 2013 8:04 AM To: ostech-core_os Subject: AHCI reenumeration Hello. Still trying to solve the way how to safely store data in a control system. I would like to use disk in "removable caddy" to get copy of the data from a control system. I would prefer sata connection to usb (various reasons). Is there any way after inserting the disk to tell the system that it should rescan SATA ports for new disk? Thanks, PKY _______________________________________________ OSTech http://community.qnx.com/sf/go/post100091 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Fri, 22 Mar 2013 14:30:07 GMT http://community.qnx.com/sf/go/post100098 Lichun Zhu 2013-03-22T14:30:07Z post100091: AHCI reenumeration http://community.qnx.com/sf/go/post100091 Hello. Still trying to solve the way how to safely store data in a control system. I would like to use disk in "removable caddy" to get copy of the data from a control system. I would prefer sata connection to usb (various reasons). Is there any way after inserting the disk to tell the system that it should rescan SATA ports for new disk? Thanks, PKY Fri, 22 Mar 2013 12:03:35 GMT http://community.qnx.com/sf/go/post100091 Pavol Kycina 2013-03-22T12:03:35Z post100090: TimerTimeout in driver http://community.qnx.com/sf/go/post100090 Hi all I found several driver use CLOCK_REALTIME in TimerTimeout() (etfs , sdma ,mx51espi ) but when a case of time adjusted system , this will cause signal lost ? when adjusted time from Year 1970 to Year 2013, this maybe a problem ? Shall we chage this to CLOCK_MONOTONIC ? Is this a bug ? regards Fri, 22 Mar 2013 09:43:44 GMT http://community.qnx.com/sf/go/post100090 Xiongwei Huang 2013-03-22T09:43:44Z post99746: Interesting server PPS question. http://community.qnx.com/sf/go/post99746 I got a PPS issue. Here is the steps I did: 1) I created/open a server pps for other services to use. And listen to it. 2) Client1 open it, send a message to my pps. Not close it. I got the message. 3) Client2 open it, send a message to my pps. Not close it. I got the message. 4) Client1 send a message to my pps again. I don't got this message this time, but I got a message saying Client2 close fd of my pps. 5) Client1 send last message again. Now I got previous message and this message. Question: Step4) This is wired that Client2 shouldn't have any knowledge of Client1. Why it can close its fd after Client1 sent a message? Is it possible that it open this pps with 'server' as well? Why can't I get the message from Client1? It goes to Client2? Step5) Why I can get previous message now? I am so confused, please give me some hints. Any idea/comment is welcome. Thank you. Shuo Fri, 08 Mar 2013 03:58:05 GMT http://community.qnx.com/sf/go/post99746 shuo yan 2013-03-08T03:58:05Z post99717: RE: posix_spawn and child file handles http://community.qnx.com/sf/go/post99717 As Mike says, probably your best bet is to narrow down the descriptor list to just those which you know are open. If iofdinfo() doesn't do the trick, fstat() definitely will. ________________________________________ From: Michael Kisel [community-noreply@qnx.com] Sent: March-06-13 3:01 PM To: ostech-core_os@community.qnx.com Subject: Re: posix_spawn and child file handles search on 'iofdinfo' at this link http://www.qnx.com/developers/docs/6.5.0_sp1/index.jsp I haven't tried it and the docs don't say so but I think you will get back EBADF (or some other error) on unopened fd's On 03/06/2013 02:17 PM, Jim Crites wrote: > I am using posix_spwan (as opposed to qnx spawn) to create child processes because I need to explicitly set the uid:gid of the child process. Additionally I need for the child to not inherit any open handles from the parent. This is where the problem arises. From the QNX documentation I can create (and init) a posix_spawn_file_actions_t struct and then call posix_spawn_file_actions_addclose() for each file handle I want to be closed. The rub is I don't know how many or which handles are open. After some research I found what appeared to be a solution. Get the size of the process's file descriptor table and then call posix_spawn_file_actions_addclose() for each slot in the table. Two functions are available to get the table size getdtablesize() and sysconf( _SC_OPEN_MAX). Both of those functions return the same value, 3000. If I try to call addclose() for 3000 handles I die from a memory fault. Anybody know what's up with this ? Any alternative way to accomplish this ? > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post99711 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com _______________________________________________ OSTech http://community.qnx.com/sf/go/post99712 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 06 Mar 2013 21:40:57 GMT http://community.qnx.com/sf/go/post99717 Neil Schellenberger 2013-03-06T21:40:57Z post99712: Re: posix_spawn and child file handles http://community.qnx.com/sf/go/post99712 search on 'iofdinfo' at this link http://www.qnx.com/developers/docs/6.5.0_sp1/index.jsp I haven't tried it and the docs don't say so but I think you will get back EBADF (or some other error) on unopened fd's On 03/06/2013 02:17 PM, Jim Crites wrote: > I am using posix_spwan (as opposed to qnx spawn) to create child processes because I need to explicitly set the uid:gid of the child process. Additionally I need for the child to not inherit any open handles from the parent. This is where the problem arises. From the QNX documentation I can create (and init) a posix_spawn_file_actions_t struct and then call posix_spawn_file_actions_addclose() for each file handle I want to be closed. The rub is I don't know how many or which handles are open. After some research I found what appeared to be a solution. Get the size of the process's file descriptor table and then call posix_spawn_file_actions_addclose() for each slot in the table. Two functions are available to get the table size getdtablesize() and sysconf( _SC_OPEN_MAX). Both of those functions return the same value, 3000. If I try to call addclose() for 3000 handles I die from a memory fault. Anybody know what's up with this ? Any alternative way to accomplish this ? > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post99711 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 06 Mar 2013 20:01:47 GMT http://community.qnx.com/sf/go/post99712 Michael Kisel 2013-03-06T20:01:47Z post99711: posix_spawn and child file handles http://community.qnx.com/sf/go/post99711 I am using posix_spwan (as opposed to qnx spawn) to create child processes because I need to explicitly set the uid:gid of the child process. Additionally I need for the child to not inherit any open handles from the parent. This is where the problem arises. From the QNX documentation I can create (and init) a posix_spawn_file_actions_t struct and then call posix_spawn_file_actions_addclose() for each file handle I want to be closed. The rub is I don't know how many or which handles are open. After some research I found what appeared to be a solution. Get the size of the process's file descriptor table and then call posix_spawn_file_actions_addclose() for each slot in the table. Two functions are available to get the table size getdtablesize() and sysconf( _SC_OPEN_MAX). Both of those functions return the same value, 3000. If I try to call addclose() for 3000 handles I die from a memory fault. Anybody know what's up with this ? Any alternative way to accomplish this ? Wed, 06 Mar 2013 19:17:58 GMT http://community.qnx.com/sf/go/post99711 Jim Crites 2013-03-06T19:17:58Z post99491: Re: RE: RE: posix_spawn() blocks indefinetely http://community.qnx.com/sf/go/post99491 Excellent idea. Thank you for your suggestions. --Eric Sat, 23 Feb 2013 20:45:39 GMT http://community.qnx.com/sf/go/post99491 Eric Shufro 2013-02-23T20:45:39Z post99484: RE: RE: posix_spawn() blocks indefinetely http://community.qnx.com/sf/go/post99484 The process container is created at the specified priority and, as you might expect, the loader code runs within that process container (with those privileges etc.) I'd have to check to see what other operating systems do, but that's what Neutrino does ;-) One standard trick that we use to arrange for a spawned process to be modified before it starts running, is to start it held. In your example, you'd spawn the process at your prio but held; then you'd lower its prio and release it. ________________________________________ From: Eric Shufro [community-noreply@qnx.com] Sent: February-22-13 9:16 AM To: ostech-core_os Subject: Re: RE: posix_spawn() blocks indefinetely Neil, Thank you for the reply. I find it interesting that the loading of the process image would occur at a lower priority since it seems as though this activity would occur from within the context of the caller. Of course, creating the 'container' and loading the process are still different than making the process/main thread ready and actually selecting it to run. My anticipation was that the process would be loaded, marked ready and simply not scheduled since its priority is less than a higher priority thread that is also ready. That's why I had expected the call to return with the PID without blocking. Do most modern operating systems *wait* for the process to load at the configured or inherited priority or is this specific to the QNX Neutrino implementation? Thanks, --Eric _______________________________________________ OSTech http://community.qnx.com/sf/go/post99458 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Fri, 22 Feb 2013 22:28:08 GMT http://community.qnx.com/sf/go/post99484 Neil Schellenberger 2013-02-22T22:28:08Z post99458: Re: RE: posix_spawn() blocks indefinetely http://community.qnx.com/sf/go/post99458 Neil, Thank you for the reply. I find it interesting that the loading of the process image would occur at a lower priority since it seems as though this activity would occur from within the context of the caller. Of course, creating the 'container' and loading the process are still different than making the process/main thread ready and actually selecting it to run. My anticipation was that the process would be loaded, marked ready and simply not scheduled since its priority is less than a higher priority thread that is also ready. That's why I had expected the call to return with the PID without blocking. Do most modern operating systems *wait* for the process to load at the configured or inherited priority or is this specific to the QNX Neutrino implementation? Thanks, --Eric Fri, 22 Feb 2013 14:16:55 GMT http://community.qnx.com/sf/go/post99458 Eric Shufro 2013-02-22T14:16:55Z post99442: RE: posix_spawn() blocks indefinetely http://community.qnx.com/sf/go/post99442 In this case, the system is working as intended. The higher priority thread has deliberately chosen to wait on a lower priority action: the loading of the lower priority process image file. Remember that POSIX requires that if posix_spawn() cannot " ... create a new process (child process) from the specified process image" that "... no child process shall be created, the value stored into the variable pointed to by a non-NULL pid is unspecified, and an error number shall be returned as the function return value to indicate the error." Fulfilling this condition requires more than just the creation of the process container (i.e. a pid) -- it must actually load the image. ________________________________________ From: Eric Shufro [community-noreply@qnx.com] Sent: February-21-13 4:44 PM To: ostech-core_os Subject: posix_spawn() blocks indefinetely Hello. Does anyone have any idea why posix_spawn() blocks my process indefinitely within MsgSendvnc()? The preconditions are as follows : (1) Process of priority 10 is deliberately placed in to an infinite loop without blocking; e.g. while (1) {}; (2) Process of priority 20 attempts to spawn a new process of priority 8 using posix_spawn() and becomes blocked. It appears that posix_spawn() is waiting for the pid() of the new process to become available, and in doing so, perhaps requires that the process be scheduled. This seems counter intuitive since the pid should be available at the time that the process is loaded into the process space and marked ready. Nonetheless, since lower priority process is readied and is unable to run due to the slightly higher priority process spinning, my highest priority process is unable to continue and remains blocked in what appears to be priority inversion. OS Version : Neutrino 6.5.0 Thoughts? Thank you in advance. --Eric _______________________________________________ OSTech http://community.qnx.com/sf/go/post99439 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 21 Feb 2013 22:02:22 GMT http://community.qnx.com/sf/go/post99442 Neil Schellenberger 2013-02-21T22:02:22Z post99439: posix_spawn() blocks indefinetely http://community.qnx.com/sf/go/post99439 Hello. Does anyone have any idea why posix_spawn() blocks my process indefinitely within MsgSendvnc()? The preconditions are as follows : (1) Process of priority 10 is deliberately placed in to an infinite loop without blocking; e.g. while (1) {}; (2) Process of priority 20 attempts to spawn a new process of priority 8 using posix_spawn() and becomes blocked. It appears that posix_spawn() is waiting for the pid() of the new process to become available, and in doing so, perhaps requires that the process be scheduled. This seems counter intuitive since the pid should be available at the time that the process is loaded into the process space and marked ready. Nonetheless, since lower priority process is readied and is unable to run due to the slightly higher priority process spinning, my highest priority process is unable to continue and remains blocked in what appears to be priority inversion. OS Version : Neutrino 6.5.0 Thoughts? Thank you in advance. --Eric Thu, 21 Feb 2013 21:44:11 GMT http://community.qnx.com/sf/go/post99439 Eric Shufro 2013-02-21T21:44:11Z post99222: SAS or RAID support http://community.qnx.com/sf/go/post99222 Is there any SAS board supported? I have checked supported HW database and haven't seen any SAS board support. In our previous system deliveries we used IDE/SATA SOHO RAID boxes, we tried several manufacturers, but we were several time disappointed with the results/reliability. It seems to me that there is a better choice of SAS RAID units, but to be able to use them SAS card would be needed in computer. Or any other idea how to deliver RAID functionality? Thanks, PKY Tue, 12 Feb 2013 14:12:18 GMT http://community.qnx.com/sf/go/post99222 Pavol Kycina 2013-02-12T14:12:18Z post98896: Re: Call to read() returns EINVAL when it should be returning EAGAIN http://community.qnx.com/sf/go/post98896 I tried this and it worked as expected - both on ser1 and and serusb1. read() returned -1 with errno as EAGAIN. Wed, 30 Jan 2013 14:12:50 GMT http://community.qnx.com/sf/go/post98896 Dennis Kellly 2013-01-30T14:12:50Z post98887: RE: Call to read() returns EINVAL when it should be returning EAGAIN http://community.qnx.com/sf/go/post98887 Hi Jim, This is likely not the best forum for this hardware related question; core OS is more like scheduling algorithms or IPC mechanisms. You would be more likely to get a relevant reply either via a hardware-related forum or, if you have one, via your formal support interface. -----Original Message----- From: Jim Douglas [mailto:community-noreply@qnx.com] Sent: Wednesday, January 30, 2013 5:58 PM To: ostech-core_os Subject: Call to read() returns EINVAL when it should be returning EAGAIN OS version 6.5.0 SP1 My application is reading from a serial port created using devc-serusb. The port is opened using the O_NONBLOCK flag. The port (m_in) is polled every 10 ms with a call like - uint8_t c = 0; int32_t ret = read( m_in, &c, 1 ); When there is nothing to read ret is set to -1 and errno is set to EINVAL, whereas according to the documentation it should be set to EAGAIN. When there is data available to be read, ret is set to 1 and c contains the received byte, which is correct. I cannot just ignore the errno because I need to detect a failure caused by the user unplugging the USB cable. Is this a bug, or am I missing something? _______________________________________________ OSTech http://community.qnx.com/sf/go/post98886 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 30 Jan 2013 09:02:38 GMT http://community.qnx.com/sf/go/post98887 Mate Szarvas 2013-01-30T09:02:38Z post98886: Call to read() returns EINVAL when it should be returning EAGAIN http://community.qnx.com/sf/go/post98886 OS version 6.5.0 SP1 My application is reading from a serial port created using devc-serusb. The port is opened using the O_NONBLOCK flag. The port (m_in) is polled every 10 ms with a call like - uint8_t c = 0; int32_t ret = read( m_in, &c, 1 ); When there is nothing to read ret is set to -1 and errno is set to EINVAL, whereas according to the documentation it should be set to EAGAIN. When there is data available to be read, ret is set to 1 and c contains the received byte, which is correct. I cannot just ignore the errno because I need to detect a failure caused by the user unplugging the USB cable. Is this a bug, or am I missing something? Wed, 30 Jan 2013 08:58:18 GMT http://community.qnx.com/sf/go/post98886 Jim Douglas 2013-01-30T08:58:18Z post98766: RE: mq_open(): Function not implemented http://community.qnx.com/sf/go/post98766 You must have the "mq" or "mqueue" resource manager started before you can use mq_open(). ________________________________________ From: Samual Peng [community-noreply@qnx.com] Sent: Thursday, January 24, 2013 11:41 AM To: ostech-core_os Subject: mq_open(): Function not implemented Hi, I have an app just after kernal booting up. I used traditional message queue in mt app. If mq_open() is called right away, it shows "mq_open(): Function not implemented". If I put sleep(1) before mq_open(), it works fine. As my understanding, mq_open(...,"my_mq_name",...) will create a path /dev/mqueue/my_mq_name; just like file open() to create file descriptor. Question: Is there any precondition or dependence for using mq_open(); Thanks! _______________________________________________ OSTech http://community.qnx.com/sf/go/post98765 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 24 Jan 2013 16:42:57 GMT http://community.qnx.com/sf/go/post98766 David Sarrazin 2013-01-24T16:42:57Z post98765: mq_open(): Function not implemented http://community.qnx.com/sf/go/post98765 Hi, I have an app just after kernal booting up. I used traditional message queue in mt app. If mq_open() is called right away, it shows "mq_open(): Function not implemented". If I put sleep(1) before mq_open(), it works fine. As my understanding, mq_open(...,"my_mq_name",...) will create a path /dev/mqueue/my_mq_name; just like file open() to create file descriptor. Question: Is there any precondition or dependence for using mq_open(); Thanks! Thu, 24 Jan 2013 16:41:00 GMT http://community.qnx.com/sf/go/post98765 Samual Peng 2013-01-24T16:41:00Z post98656: Re: support of shmget api http://community.qnx.com/sf/go/post98656 Script is #!/usr/bin/perl $file_shmem = "/home/Vishal_Home/bolts"; $size_shmem = 18640; open( F, "./ftok $file_shmem 1 |" ); $s1 = <F>; close F; chomp $s1; $ipckey = "0x$s1"; print "IPC-KEY of ($file_shmem) is $ipckey \n"; $idshm = shmget( $ipckey, $size_shmem, 0666 ) || die "\n Creation of shared memory failed $! \n"; print "IPC-SHMEM: id $idshm \n"; shmread( $idshm, $data_shmem, 0, $size_shmem ) || warn "\n\n Error reading shared-memory: $! \n"; Error is- $ ./myshm.pl IPC-KEY of (/home/Vishal_Home/bolts) is 0x System V IPC is not implemented on this machine at ./myshm.pl line 10. $ Fri, 18 Jan 2013 08:46:29 GMT http://community.qnx.com/sf/go/post98656 Ashwini Dubey 2013-01-18T08:46:29Z post98637: Re: support of shmget api http://community.qnx.com/sf/go/post98637 Do you have a sample perl script? Thu, 17 Jan 2013 14:51:54 GMT http://community.qnx.com/sf/go/post98637 Sean Boudreau 2013-01-17T14:51:54Z post98635: Re: support of shmget api http://community.qnx.com/sf/go/post98635 You can try running the s5ipc manager and linking perl against libs5ipc. It's in pkgsrc under sysutils/s5ipc. http://community.qnx.com/sf/projects/pkgsrc On Thu, Jan 17, 2013 at 07:31:03AM -0500, Ashwini Dubey wrote: > I am trying to access the shared memory created in qnx using scripting language(perl). > But it throwing some error i.e. perl is returning saying this machine do not support shmget. Is there any way of supporting it. > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post98631 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 17 Jan 2013 14:43:42 GMT http://community.qnx.com/sf/go/post98635 Sean Boudreau 2013-01-17T14:43:42Z post98631: support of shmget api http://community.qnx.com/sf/go/post98631 I am trying to access the shared memory created in qnx using scripting language(perl). But it throwing some error i.e. perl is returning saying this machine do not support shmget. Is there any way of supporting it. Thu, 17 Jan 2013 12:31:03 GMT http://community.qnx.com/sf/go/post98631 Ashwini Dubey 2013-01-17T12:31:03Z post98472: L2 cache sharing + procnto affinity http://community.qnx.com/sf/go/post98472 We're battling an issue where some of our time critical threads just "run slow". We have kernel traces where a group of threads run at one rate and then the next iteration, they run roughly twice as long (the threads are not being preempted, the run time is longer). Our thoughts turn to cache coherency. If some intervening threads run and cause a cache change, that would explain the longer run time if there are cache misses and system memory reads were required in the slow iterations. We're running on an x86 machine with the "Harpertown" CPU (E5440) that looks to be a dual-die dual-core part. Each core has a dedicated 32K L1 cache and two 6 MB L2 caches. Each L2 cache is shared by two of the cores but the question is which two? Unix has the cpuinfo command to show the cache sharing (see http://software.intel.com/en-us/forums/topic/291067). How can we determine the CPU number, from a QNX perspective, to L2 cache association in QNX? In Linux, core 0/1 do not share an L2 cache, the sharing is 0/2 and 1/3. Our goal is to do CPU affinity assignments that increases the likelihood of cache coherency in our time critical threads. Is there a way to limit which core the procnto threads, actually procnto-smp-instr, run on? When we see cache coherency issues, we see some of the higher number procnto threads (i.e. 14) running on cores that we'd like to reserve for our time critical use. Thanks. Thu, 10 Jan 2013 01:09:35 GMT http://community.qnx.com/sf/go/post98472 Mark Dowdy 2013-01-10T01:09:35Z post98207: RE: RE: format of .kev file http://community.qnx.com/sf/go/post98207 > -----Message d'origine----- > De : Veer Beede [mailto:community-noreply@qnx.com] > Envoyé : 18 décembre 2012 05:52 > À : ostech-core_os > Objet : Re: RE: format of .kev file > > In that case, you can rather use syslog in your application. How different it is > going to be with the way you plan to use trace events? Nanosecond precision, no context switch, each process has its record buffer greatly reducing resource contention (want to keep the 12 cores busy), no overhead for filtering unwanted event coming from other processes, portability. For now I want to convert our data into a kev file to make use of the system profiler, but down the road ( many months as our GUI group is totally swamp with work, phew good thing, a few years back, we choose not to used photon... I digress) we will have our own application to display the data. > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post98192 > To cancel your subscription to this discussion, please e-mail ostech-core_os- > unsubscribe@community.qnx.com Tue, 18 Dec 2012 14:51:51 GMT http://community.qnx.com/sf/go/post98207 Mario Charest 2012-12-18T14:51:51Z post98192: Re: RE: format of .kev file http://community.qnx.com/sf/go/post98192 In that case, you can rather use syslog in your application. How different it is going to be with the way you plan to use trace events? Tue, 18 Dec 2012 10:51:30 GMT http://community.qnx.com/sf/go/post98192 Veer Beede 2012-12-18T10:51:30Z post98185: RE: format of .kev file http://community.qnx.com/sf/go/post98185 I want to generate a file but not from QNX's API, from my own code without the need for the instrumented kernel. Obviously it would only contains USER EVENT but that is pretty much what I need. ______________________________________ From: Colin Burgess [community-noreply@qnx.com] Sent: Monday, December 17, 2012 10:19 PM To: ostech-core_os@community.qnx.com Subject: Re: format of .kev file I don't think so. What are you looking to do? On 12-12-17 8:01 PM, Mario Charest wrote: > Is the format of the .kev file documented somewhere? > > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post98183 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com -- cburgess@qnx.com _______________________________________________ OSTech http://community.qnx.com/sf/go/post98184 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Tue, 18 Dec 2012 04:43:48 GMT http://community.qnx.com/sf/go/post98185 Mario Charest 2012-12-18T04:43:48Z post98184: Re: format of .kev file http://community.qnx.com/sf/go/post98184 I don't think so. What are you looking to do? On 12-12-17 8:01 PM, Mario Charest wrote: > Is the format of the .kev file documented somewhere? > > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post98183 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com -- cburgess@qnx.com Tue, 18 Dec 2012 03:23:04 GMT http://community.qnx.com/sf/go/post98184 Colin Burgess 2012-12-18T03:23:04Z post98183: format of .kev file http://community.qnx.com/sf/go/post98183 Is the format of the .kev file documented somewhere? Tue, 18 Dec 2012 01:01:59 GMT http://community.qnx.com/sf/go/post98183 Mario Charest 2012-12-18T01:01:59Z post97936: Re: How to use a USB barcode reader as an HID device http://community.qnx.com/sf/go/post97936 I have verified that the console is in raw mode. I found the setup program for the barcode reader that lets me configure some parameters. I programmed it to issue a carriage return after a read, and ran devc-con-hid in edit mode. This didn't help. I found that if I boosted the priority of the usbdi_event_handler(6) task in io-hid to 15, the problem went away. This priority is above the UI, logging, and Ethernet tasks and even with our serial communications task. I could boost this task's priority in our application when it starts, but I only want to do this as a last resort. Is there any native way to boost this task in io-hid? I would be satisfied by a custom version of io-hid, but access to the source code is nearly impossible now. Mon, 10 Dec 2012 15:17:43 GMT http://community.qnx.com/sf/go/post97936 Robert Murrell 2012-12-10T15:17:43Z post97870: Re: How to use a USB barcode reader as an HID device http://community.qnx.com/sf/go/post97870 In your program which opens /dev/con1, try setting the device to "raw". You can use "stty -a </dev/con1" to verify all settings. In particular, make sure you see -icanon. Thu, 06 Dec 2012 16:13:56 GMT http://community.qnx.com/sf/go/post97870 Dennis Kellly 2012-12-06T16:13:56Z post97869: Re: How to use a USB barcode reader as an HID device http://community.qnx.com/sf/go/post97869 I used renice to boost the priority of io-hid until its receive thread went from 21 to 25. This seems to have fixed the problem. I believe the fault lies in the io-hid or devh-usb.so drivers. If I power up the reader without USB communications, when reading a barcode, the reader will fault after 3 seconds. The problem I'm seeing is that the fault is issued immediately on reading the code. RS-232 barcode readers do not have this problem as the UART drivers are interrupt driven and buffer the characters. The reader itself is only issuing less than 20 characters per read. Is there a better solution than having our application adjust the priority of external processes to fix this? Thu, 06 Dec 2012 16:11:49 GMT http://community.qnx.com/sf/go/post97869 Robert Murrell 2012-12-06T16:11:49Z post97866: Re: How to use a USB barcode reader as an HID device http://community.qnx.com/sf/go/post97866 I found my original problem of why read is blocking. The console driver is running in editing mode and is awaiting for a carriage return to unblock the read. The barcode readier is issuing a string of characters followed by a tab character. I can not change this behavior. I started the console driver with the '-E' argument and my simple test program now works: devc-con-hid -E I put the code in our application, and now it only reads a few characters before the reader indicates an error. The application has many threads that run at higher priority that the rest of the system. The barcode thread is running at priority 12. most other threads are running at a higher priority, some as high as 25. I can only guess that some kind of timeout or overrun is occurring. Any ideas for fixing this? Thu, 06 Dec 2012 14:51:50 GMT http://community.qnx.com/sf/go/post97866 Robert Murrell 2012-12-06T14:51:50Z post96896: Re: QNX 6.5 OCB Extension Bug http://community.qnx.com/sf/go/post96896 Hi Timothy, Thanks for your help, I have been busy lately and didnt have much time to deal with this issue. I will read your code and try it on our application and let you know how it goes. Thank you, Dante Tue, 06 Nov 2012 17:49:42 GMT http://community.qnx.com/sf/go/post96896 Dante Tezza 2012-11-06T17:49:42Z post96895: Re: QNX 6.5 OCB Extension Bug http://community.qnx.com/sf/go/post96895 Hi Saul, I havent yet, I was solving another issue that we are facing but now I am getting back to solve this one. I will keep the post updated. Dante Tue, 06 Nov 2012 17:45:54 GMT http://community.qnx.com/sf/go/post96895 Dante Tezza 2012-11-06T17:45:54Z post96791: Re: QNX 6.5 OCB Extension Bug http://community.qnx.com/sf/go/post96791 Hi Dante, I was interested in your post because we seem to have some similar issues in our application. After working with your code for a while, I found a solution to your problem. The problem with your code seems to be where you call the iofunc_attr_init function. When I run your original code, I get a core dump error after loading the server and then running the client. If I move the call to iofunc_attr_init down a few lines after the attr.mount variable has been set, then the program works correctly. I modified your code to accept a command line option. If you run the new code with option 1 (serverRM 1 &), it runs just like your original code. If you run the new code with option 2 (serverRM 2 &), then it calls the iofunc_attr_init function after the attr.mount variable has been set. I can't explain why your code seemed to work on the older version of QNX. I hope this helps. -Tim Fisher Fri, 02 Nov 2012 13:14:31 GMT http://community.qnx.com/sf/go/post96791 Timothy Fisher 2012-11-02T13:14:31Z post96532: Re: QNX 6.5 OCB Extension Bug http://community.qnx.com/sf/go/post96532 Hi Dante, have you found solution to this? thanks, Saul Mon, 22 Oct 2012 23:50:25 GMT http://community.qnx.com/sf/go/post96532 Saul A 2012-10-22T23:50:25Z post96509: RE: Question about support lifecycle http://community.qnx.com/sf/go/post96509 Email info@qnx.com with details of region you/customer are located and your questions and the regional sales rep will get back to you. -----Original Message----- From: Seyfettin Sünger [mailto:community-noreply@qnx.com] Sent: October-22-12 4:00 AM To: ostech-core_os Subject: Re: Question about support lifecycle I believe it will be better if you contact to your local representative for those questions. Regards, _______________________________________________ OSTech http://community.qnx.com/sf/go/post96494 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Mon, 22 Oct 2012 13:43:32 GMT http://community.qnx.com/sf/go/post96509 Chris Travis 2012-10-22T13:43:32Z post96494: Re: Question about support lifecycle http://community.qnx.com/sf/go/post96494 I believe it will be better if you contact to your local representative for those questions. Regards, Mon, 22 Oct 2012 07:59:42 GMT http://community.qnx.com/sf/go/post96494 Seyfettin Sünger 2012-10-22T07:59:42Z post96488: Question about support lifecycle http://community.qnx.com/sf/go/post96488 I am a consultant. A customer of mine has QNX v. 6.3.2 and I'd like to upgrade them. So could anyone answer these questions: 1. Does 6.3.2 have any support deadline? Especially, given the current situation around QNX. 2. Will 6.5 run on same hardware as 6.3.2? they have a x86 PC-like board made in ~ 2005, no ACPI. 3. How much it may cost to the customer to update to 6.5: runtime licenses? IDE/Dev.kit? Other costs? Thanks in advance, Saul Sun, 21 Oct 2012 15:35:27 GMT http://community.qnx.com/sf/go/post96488 Saul A 2012-10-21T15:35:27Z post96266: Re: RE: Gaining acces to interrupt descriptor memory http://community.qnx.com/sf/go/post96266 mmap64 did not appear to work. I connected to the timer ISR and was able to access the IDT memory without mapping in the memory. I am guessing the address stored in the IDT register is a kernel virtual address and the timer ISR is executing from kernel space, it has access to that memory. Anyway, now my problem is sharing some data between my ISR and task. Some posts seemed to indicate the ISR would be able to access a global variable or use the communication area pointer passed in to the interruptAttach() function. However, neither would work for me. I am okay with writing a resource manager or device driver if that is required, just do not want to do the work unless I know it is needed. Thu, 11 Oct 2012 20:18:39 GMT http://community.qnx.com/sf/go/post96266 Eric Patrizi 2012-10-11T20:18:39Z post96196: RE: Gaining acces to interrupt descriptor memory http://community.qnx.com/sf/go/post96196 Try with mmap64, -----Message d'origine----- De : Eric Patrizi [mailto:community-noreply@qnx.com] Envoyé : Wednesday, October 10, 2012 10:53 AM À : ostech-core_os Objet : Re: Gaining acces to interrupt descriptor memory Ring 0 access may not be necessary. I was hoping someone might know the answer to that. When I execute BYTE idt[6]; __asm__("sidt %0" : "=m"(idt) ); I get p /x idt = (0xf, 0x2, 0x38, 0x1d, 0xd1, 0xfe) The limit 0x20f could make sense (QNX only supporting 0x42 interrupts, and it is supposed to be a multiple of 8 minus 1). However, the address 0xfed11d38 does not appear to be a physical address as my x86 board only has 512 MB installed. mmap() allows me to map this address, but all I read are 0xffffffff's. If 0xfed11d38 is a virtual address, I don't think mmap can be used. Does anyone know (or have an idea) how to map access to it? _______________________________________________ OSTech http://community.qnx.com/sf/go/post96187 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 10 Oct 2012 15:52:12 GMT http://community.qnx.com/sf/go/post96196 Mario Charest 2012-10-10T15:52:12Z post96188: How to use a USB barcode reader as an HID device http://community.qnx.com/sf/go/post96188 We have a minimal QNX installation on an embedded device. Very early in the startup, I redirect all console I/O to a serial port. Our application uses advanced graphics to write to the LCD screen, but all processes use the serial port for stdio for debug purposes. I was recently asked to try to interface a USB barcode reader to our unit. This reader acts like a standard PC USB keyboard. Reading a barcode spits out a sequence of keystrokes. It works with any Windows PC and our laptop with a full QNX with Photon installation. To try this out on our device, I started io-hid and devc-con-hid: # io-hid -d usb # devc-con-hid I can plug the reader into the USB port and scan barcodes without error. This tells me that someone is properly consuming the keystrokes. I then wrote a simple program to try and read the characters. I developed and ran it under QNX Momentics Debugger. It opens "/dev/con1" without error. It calls "select" to wait for activity. It pends until I read a barcode and indicates that there is something to read on the file descriptor. I call ioctl FIONREAD to read the number of bytes available. This call returns with EFAULT error. I try reading one byte with "read" and this never returns. What am I doing wrong? Wed, 10 Oct 2012 14:53:45 GMT http://community.qnx.com/sf/go/post96188 Robert Murrell 2012-10-10T14:53:45Z post96187: Re: Gaining acces to interrupt descriptor memory http://community.qnx.com/sf/go/post96187 Ring 0 access may not be necessary. I was hoping someone might know the answer to that. When I execute BYTE idt[6]; __asm__("sidt %0" : "=m"(idt) ); I get p /x idt = (0xf, 0x2, 0x38, 0x1d, 0xd1, 0xfe) The limit 0x20f could make sense (QNX only supporting 0x42 interrupts, and it is supposed to be a multiple of 8 minus 1). However, the address 0xfed11d38 does not appear to be a physical address as my x86 board only has 512 MB installed. mmap() allows me to map this address, but all I read are 0xffffffff's. If 0xfed11d38 is a virtual address, I don't think mmap can be used. Does anyone know (or have an idea) how to map access to it? Wed, 10 Oct 2012 14:53:29 GMT http://community.qnx.com/sf/go/post96187 Eric Patrizi 2012-10-10T14:53:29Z post96173: Re: Gaining acces to interrupt descriptor memory http://community.qnx.com/sf/go/post96173 Eric, access to ring 0 isn't supported ! --Armin Eric Patrizi wrote: > I need to be able to read the interrupt vector (descriptor) table memory in order to periodically perform a CRC calculation to verify the table has not been corrupted. Getting the address of the table seems to work at any privilege level. > > BYTE idt[6]; > > __asm__("sidt %0" > : "=m"(idt) > ); > > However, I get a seg fault when I try to access the memory. Understandable when done from user code. I attempted to access the memory from a timer interrupt (via timer_create() and SIGALRM) thinking that would allow (put me in ring 0) the access, but still get the seg fault. > > Anyone have any ideas how to get access to this memory? Do I need to map it in? Is code executed in the timer interrupt executed at ring 0? > > I am using QNX 6.3.2. > > Thanks, > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post96167 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com > Wed, 10 Oct 2012 07:11:34 GMT http://community.qnx.com/sf/go/post96173 Armin Steinhoff 2012-10-10T07:11:34Z post96171: RE: RE: Gaining acces to interrupt descriptor memory http://community.qnx.com/sf/go/post96171 Interrupt 0x41 ? You can`t randomly pick an interrupt. Your best bet is to connect to the timer interrupt, however what it is depends on the machine, on some it`s 0 on other it`s 2. Check InterruptAttach() to install your ISR. Everything in QNX is virtual, even when running in the context of an ISR, so you must take your physical address and map it to a virtual address via mmap() -----Message d'origine----- De : Eric Patrizi [mailto:community-noreply@qnx.com] Envoyé : Tuesday, October 09, 2012 9:58 PM À : ostech-core_os Objet : Re: RE: Gaining acces to interrupt descriptor memory Yes, most of the error checking we are required (Nuclear industry) to do is only valid on working hardware. Any failure and the most likely scenario is a dead processor. I tried using a software interrupt "INT $0x41", but my ISR was never called. I will put a little more effort into that. I picked 0x41 out of thin air, not sure what software interrupts the OS is using . Would a software interrupt ISR execute in ring 0? Would you expect the IDTR to have a physical memory address or virtual? I was assuming physical, but the address was a little odd. _______________________________________________ OSTech http://community.qnx.com/sf/go/post96170 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 10 Oct 2012 02:27:01 GMT http://community.qnx.com/sf/go/post96171 Mario Charest 2012-10-10T02:27:01Z post96170: Re: RE: Gaining acces to interrupt descriptor memory http://community.qnx.com/sf/go/post96170 Yes, most of the error checking we are required (Nuclear industry) to do is only valid on working hardware. Any failure and the most likely scenario is a dead processor. I tried using a software interrupt "INT $0x41", but my ISR was never called. I will put a little more effort into that. I picked 0x41 out of thin air, not sure what software interrupts the OS is using . Would a software interrupt ISR execute in ring 0? Would you expect the IDTR to have a physical memory address or virtual? I was assuming physical, but the address was a little odd. Wed, 10 Oct 2012 01:58:01 GMT http://community.qnx.com/sf/go/post96170 Eric Patrizi 2012-10-10T01:58:01Z post96168: RE: Gaining acces to interrupt descriptor memory http://community.qnx.com/sf/go/post96168 You need to map it first I would think, then you may or may not need ring 0 to read this, I don`t know. SIGALRM is NOT an interrupt, nor is timer_create. You would need to install a real ISR. -----Message d'origine----- De : Eric Patrizi [mailto:community-noreply@qnx.com] Envoyé : Tuesday, October 09, 2012 8:44 PM À : ostech-core_os Objet : Gaining acces to interrupt descriptor memory I need to be able to read the interrupt vector (descriptor) table memory in order to periodically perform a CRC calculation to verify the table has not been corrupted. Getting the address of the table seems to work at any privilege level. BYTE idt[6]; __asm__("sidt %0" : "=m"(idt) ); However, I get a seg fault when I try to access the memory. Understandable when done from user code. I attempted to access the memory from a timer interrupt (via timer_create() and SIGALRM) thinking that would allow (put me in ring 0) the access, but still get the seg fault. Anyone have any ideas how to get access to this memory? Do I need to map it in? Is code executed in the timer interrupt executed at ring 0? I am using QNX 6.3.2. Thanks, _______________________________________________ OSTech http://community.qnx.com/sf/go/post96167 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 10 Oct 2012 01:02:02 GMT http://community.qnx.com/sf/go/post96168 Mario Charest 2012-10-10T01:02:02Z post96169: RE: Gaining acces to interrupt descriptor memory http://community.qnx.com/sf/go/post96169 My guess is, if this gets corrupted you would not be able to check it, the machine would go bye bye. Don`t know about your application but I don`t think it`s wise to assume this doesn`t change. I doubt it does but I never read anything about it NOT changing. -----Message d'origine----- De : Eric Patrizi [mailto:community-noreply@qnx.com] Envoyé : Tuesday, October 09, 2012 8:44 PM À : ostech-core_os Objet : Gaining acces to interrupt descriptor memory I need to be able to read the interrupt vector (descriptor) table memory in order to periodically perform a CRC calculation to verify the table has not been corrupted. Getting the address of the table seems to work at any privilege level. BYTE idt[6]; __asm__("sidt %0" : "=m"(idt) ); However, I get a seg fault when I try to access the memory. Understandable when done from user code. I attempted to access the memory from a timer interrupt (via timer_create() and SIGALRM) thinking that would allow (put me in ring 0) the access, but still get the seg fault. Anyone have any ideas how to get access to this memory? Do I need to map it in? Is code executed in the timer interrupt executed at ring 0? I am using QNX 6.3.2. Thanks, _______________________________________________ OSTech http://community.qnx.com/sf/go/post96167 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 10 Oct 2012 01:00:55 GMT http://community.qnx.com/sf/go/post96169 Mario Charest 2012-10-10T01:00:55Z post96167: Gaining acces to interrupt descriptor memory http://community.qnx.com/sf/go/post96167 I need to be able to read the interrupt vector (descriptor) table memory in order to periodically perform a CRC calculation to verify the table has not been corrupted. Getting the address of the table seems to work at any privilege level. BYTE idt[6]; __asm__("sidt %0" : "=m"(idt) ); However, I get a seg fault when I try to access the memory. Understandable when done from user code. I attempted to access the memory from a timer interrupt (via timer_create() and SIGALRM) thinking that would allow (put me in ring 0) the access, but still get the seg fault. Anyone have any ideas how to get access to this memory? Do I need to map it in? Is code executed in the timer interrupt executed at ring 0? I am using QNX 6.3.2. Thanks, Wed, 10 Oct 2012 00:43:37 GMT http://community.qnx.com/sf/go/post96167 Eric Patrizi 2012-10-10T00:43:37Z post96157: Re: RE: ISR on SMP http://community.qnx.com/sf/go/post96157 Hi, The 2 ISRs do run concurrently. Now the problem is this: am I allowed to change QTIME from the ISR? (Is this supported?) Thanks, Javier Tue, 09 Oct 2012 21:13:52 GMT http://community.qnx.com/sf/go/post96157 Javier I. Acosta M. 2012-10-09T21:13:52Z post96121: Re: _KER_NOP Enter/_KER_NOP_Exit http://community.qnx.com/sf/go/post96121 Thanks. Seems to roughly correspond to a cross-core interrupt except on same core. ----- Original Message ----- From: Colin Burgess [mailto:community-noreply@qnx.com] Sent: Tuesday, October 09, 2012 09:07 AM To: ostech-core_os@community.qnx.com <ostech-core_os@community.qnx.com> Subject: Re: _KER_NOP Enter/_KER_NOP_Exit The NOP kercall is used to force a thread into the kernel so scheduling can take place. So that time is spent selecting and switching the running thread. On 12-10-08 8:13 AM, Dennis Kellly wrote: > Kernel trace for fftgen (mcdemo) i.mx6 (SP1), 4-cores, 8 compute-bound threads with round-robin schedulling, > > Whenever the rr timer expires, the kernel trace shows a _KER_NOP Enter/_KER_NOP_Exit pair. This seems to correspond to the switch of one thread to another thread ON THE SAME CORE. It shows 1-2us between enter/exit. > > Is this time lost? What is really going on? > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post96104 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com -- cburgess@qnx.com _______________________________________________ OSTech http://community.qnx.com/sf/go/post96119 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Tue, 09 Oct 2012 13:34:44 GMT http://community.qnx.com/sf/go/post96121 Dennis Kellly 2012-10-09T13:34:44Z post96119: Re: _KER_NOP Enter/_KER_NOP_Exit http://community.qnx.com/sf/go/post96119 The NOP kercall is used to force a thread into the kernel so scheduling can take place. So that time is spent selecting and switching the running thread. On 12-10-08 8:13 AM, Dennis Kellly wrote: > Kernel trace for fftgen (mcdemo) i.mx6 (SP1), 4-cores, 8 compute-bound threads with round-robin schedulling, > > Whenever the rr timer expires, the kernel trace shows a _KER_NOP Enter/_KER_NOP_Exit pair. This seems to correspond to the switch of one thread to another thread ON THE SAME CORE. It shows 1-2us between enter/exit. > > Is this time lost? What is really going on? > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post96104 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com -- cburgess@qnx.com Tue, 09 Oct 2012 13:11:17 GMT http://community.qnx.com/sf/go/post96119 Colin Burgess 2012-10-09T13:11:17Z post96104: _KER_NOP Enter/_KER_NOP_Exit http://community.qnx.com/sf/go/post96104 Kernel trace for fftgen (mcdemo) i.mx6 (SP1), 4-cores, 8 compute-bound threads with round-robin schedulling, Whenever the rr timer expires, the kernel trace shows a _KER_NOP Enter/_KER_NOP_Exit pair. This seems to correspond to the switch of one thread to another thread ON THE SAME CORE. It shows 1-2us between enter/exit. Is this time lost? What is really going on? Mon, 08 Oct 2012 12:13:36 GMT http://community.qnx.com/sf/go/post96104 Dennis Kellly 2012-10-08T12:13:36Z post95982: Re: RE: Exclusive access to physical memory http://community.qnx.com/sf/go/post95982 Thanks Jerry, I'll take a look, I'm worried that it is may not be persistent (doesn't stay resident) and showmen won't catch it.. Kevin Tue, 02 Oct 2012 18:11:11 GMT http://community.qnx.com/sf/go/post95982 Kevin Stallard 2012-10-02T18:11:11Z post95978: RE: Exclusive access to physical memory http://community.qnx.com/sf/go/post95978 I don't think you can prevent shared mapping for those memory, but you can always use showmem to find out if the registers are shared mapped to other processes. Jerry Sui | Software Developer | jsui@qnx.com O:613-591-0836 x 24904 C:613-240-9239 | www.qnx.com | QNX Software Systems Cisco Support Team email: cisco_support@qnx.com -----Original Message----- From: Kevin Stallard [mailto:community-noreply@qnx.com] Sent: October-02-12 12:34 PM To: ostech-core_os Subject: Exclusive access to physical memory Hi, We have a device driver (NAND Flash) that we wish to have exclusive access to the NAND registers. We suspect something is clobbering these registers and we'd like that something to seg-fault. The MAP_PRIVATE appears to make a copy of the are specified and allocate memory for the process. Is there a flag/api function that would allow us to use the MMU to prevent any other process from accessing the NAND flash registers after our driver has mapped them to its own process space? Thanks Kevin _______________________________________________ OSTech http://community.qnx.com/sf/go/post95976 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Tue, 02 Oct 2012 17:07:58 GMT http://community.qnx.com/sf/go/post95978 Jerry Sui 2012-10-02T17:07:58Z post95976: Exclusive access to physical memory http://community.qnx.com/sf/go/post95976 Hi, We have a device driver (NAND Flash) that we wish to have exclusive access to the NAND registers. We suspect something is clobbering these registers and we'd like that something to seg-fault. The MAP_PRIVATE appears to make a copy of the are specified and allocate memory for the process. Is there a flag/api function that would allow us to use the MMU to prevent any other process from accessing the NAND flash registers after our driver has mapped them to its own process space? Thanks Kevin Tue, 02 Oct 2012 16:33:56 GMT http://community.qnx.com/sf/go/post95976 Kevin Stallard 2012-10-02T16:33:56Z post95852: Re: Passing flag args to pterm, when pterm is spawned. http://community.qnx.com/sf/go/post95852 Thank you for the reply. Passing the arguments individually worked. Wed, 26 Sep 2012 17:36:14 GMT http://community.qnx.com/sf/go/post95852 Jim Baddoo 2012-09-26T17:36:14Z post95801: Re: Passing flag args to pterm, when pterm is spawned. http://community.qnx.com/sf/go/post95801 Sounds like you are not constructing the argument vector correctly. Try something like this: char *args[]={"on", "-c1", "./MyApp", NULL}; Now pass args as the argv for spawn(). Tue, 25 Sep 2012 19:39:54 GMT http://community.qnx.com/sf/go/post95801 Gervais Mulongoy 2012-09-25T19:39:54Z post95790: Passing flag args to pterm, when pterm is spawned. http://community.qnx.com/sf/go/post95790 I have a command file that executes the following command: pterm -z on -C 1 ./MyApp This has the effect of launching pterm, and then MyApp is launched within pterm by 'on' - in other words, it's as if one had typed into a pterm shell on -C 1 ./MyApp. I can verify subsequently that all of the threads within 'MyApp' have been constrained to run on core 1 (of a multi-core) CPU. I have a number of applications I wish to launch using a programme that reads, from a text file: (1) the application name (2) the core to which is should be constrained to run. I've constructed the equivalent text string, and pass this string to spawn() in the argv[] array. The pterm is launched, but it displays an error message: Cannot start program 'on -C 1 ' (No such file or directory) If I try to supply additional args that are valid for pterm (e.g. pterm -z -r ), followed by 'on -C 1 ./MyApp' the error message is: pterm: illegal option -- Does anyone know how I can use spawn to replicate the command string that I've shown to work from within a batch file? Thanks in advance. Tue, 25 Sep 2012 15:39:45 GMT http://community.qnx.com/sf/go/post95790 Jim Baddoo 2012-09-25T15:39:45Z post95607: Re: Good reasons for pthread_spin_init() failure with EBUSY? http://community.qnx.com/sf/go/post95607 Sorry, does anyone have an hint or idea for this? I applied all possible attentions allocating the memory, initilizing the pthread_spin_t and rleasing the memory when done, but I still get the init error with EBUSY. thanks, Davide Mon, 17 Sep 2012 15:22:48 GMT http://community.qnx.com/sf/go/post95607 Davide Ancri 2012-09-17T15:22:48Z post95488: RE: ISR on SMP http://community.qnx.com/sf/go/post95488 > -----Message d'origine----- > De : Javier A. [mailto:community-noreply@qnx.com] > Envoyé : 10 septembre 2012 13:28 > À : ostech-core_os > Objet : Re: ISR on SMP > > Hi guys, > Thank you for the update. > > Here is what I am doing right now. > > > volatile qtime_entry* qtime_ptr_; > There is no need to use mmap, qtime is already mmaped for you > //-Map the qtime kernel struct to local memory void init_memory(){ > struct qtime_entry* kernel_qtime = SYSPAGE_ENTRY ( qtime ); > off64_t offset = 0; > if( -1 == mem_offset64(kernel_qtime, NOFD, sizeof(qtime_entry), &offset, > 0)){ > fprintf(stderr, "Failed to get phyaddr %s\n", strerror(errno)); > exit(EXIT_FAILURE); > } > printf("Qtime physical addr 0x%x\n", offset); > qtime_ptr_ = (struct qtime_entry*) mmap_device_memory(0, > sizeof(qtime_entry), PROT_READ | PROT_WRITE | PROT_NOCACHE, 0, offset); > if (qtime_ptr_ == MAP_FAILED){ > fprintf(stderr, "Failed to map qtime %s\n", strerror(errno)); > exit(EXIT_FAILURE); > } > } > > //-ISR > const struct sigevent * isr(void* p, int id) { > //If not interrupt pending on my HW return NULL > ..... I don't see the point of disabling the interrupt > //-Disable timing interrupt > InterruptMask(qtime_ptr_->intr, -1); > //-Read until there is no change (this will ensure the clock is not in the > middle of an update) > uint64_t current_nsec; > do{ > current_nsec = qtime_ptr_->nsec; > } while (qtime_ptr_->nsec != current_nsec); > I have no idea if this is allowed or supported > //-Adjust clock (set it to next_time_sec & next_time_nsec) > qtime_ptr_->nsec_tod_adjust = (next_time_sec * 1000000000) + > next_time_nsec - current_nsec; > InterruptUnmask(qtime_ptr_->intr, -1); > > //-Fire event > return (&intr_event_); > > } > > If the 2 ISRs can run concurrently the only way to do a proper synchronization > would be to share a spinlock (which I do believe QNX has it but is only > internal to the Kernel). So far this is the best I ca do. If you have any ideas or > critics go ahead… > > Javier > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post95486 > To cancel your subscription to this discussion, please e-mail ostech-core_os- > unsubscribe@community.qnx.com Mon, 10 Sep 2012 18:37:56 GMT http://community.qnx.com/sf/go/post95488 Mario Charest 2012-09-10T18:37:56Z post95486: Re: ISR on SMP http://community.qnx.com/sf/go/post95486 Hi guys, Thank you for the update. Here is what I am doing right now. volatile qtime_entry* qtime_ptr_; //-Map the qtime kernel struct to local memory void init_memory(){ struct qtime_entry* kernel_qtime = SYSPAGE_ENTRY ( qtime ); off64_t offset = 0; if( -1 == mem_offset64(kernel_qtime, NOFD, sizeof(qtime_entry), &offset, 0)){ fprintf(stderr, "Failed to get phyaddr %s\n", strerror(errno)); exit(EXIT_FAILURE); } printf("Qtime physical addr 0x%x\n", offset); qtime_ptr_ = (struct qtime_entry*) mmap_device_memory(0, sizeof(qtime_entry), PROT_READ | PROT_WRITE | PROT_NOCACHE, 0, offset); if (qtime_ptr_ == MAP_FAILED){ fprintf(stderr, "Failed to map qtime %s\n", strerror(errno)); exit(EXIT_FAILURE); } } //-ISR const struct sigevent * isr(void* p, int id) { //If not interrupt pending on my HW return NULL ..... //-Disable timing interrupt InterruptMask(qtime_ptr_->intr, -1); //-Read until there is no change (this will ensure the clock is not in the middle of an update) uint64_t current_nsec; do{ current_nsec = qtime_ptr_->nsec; } while (qtime_ptr_->nsec != current_nsec); //-Adjust clock (set it to next_time_sec & next_time_nsec) qtime_ptr_->nsec_tod_adjust = (next_time_sec * 1000000000) + next_time_nsec - current_nsec; InterruptUnmask(qtime_ptr_->intr, -1); //-Fire event return (&intr_event_); } If the 2 ISRs can run concurrently the only way to do a proper synchronization would be to share a spinlock (which I do believe QNX has it but is only internal to the Kernel). So far this is the best I ca do. If you have any ideas or critics go ahead… Javier Mon, 10 Sep 2012 17:27:40 GMT http://community.qnx.com/sf/go/post95486 Javier A. 2012-09-10T17:27:40Z post95485: Re: ISR on SMP http://community.qnx.com/sf/go/post95485 > This is my scenario: I receive a pulse to do time correction so when I am > reading/writing the qtime (nsec) I would like to make sure I am not in the > middle of an update of the system clock. Just read time in loop util you get two matching values in a row. Mon, 10 Sep 2012 17:12:00 GMT http://community.qnx.com/sf/go/post95485 Oleh Derevenko 2012-09-10T17:12:00Z post95480: Re: ISR on SMP http://community.qnx.com/sf/go/post95480 Hi Javier, I am not a QNX employee, but my intial recommendation would be to suggest using InterruptAttachEvent() and a very very high priority user-mode thread that just calls clock_gettime(), which just uses the kernel's internal code to ensure interlocking with the tick interrupt. It you've got the ability to measure the latency, it might be worth benchmarking the latency of using that approach instead of an InterruptAttach() interrupt handler - there are a lot fewer restrictions on what you can do in your handler, and it makes debugging much easier. Assuming that InterruptAttachEvent() adds measurable delay that your application cannot tolerate, the next recommendation would be to do as the kernel does internally, and just inspect the time in a loop to make sure it hasn't changed (and therefore you have an atomic read!): Here is some example code (untested from memory, so you might have to fix it up): void get_current_time(uint64_t* time_out, int include_time_of_day) { volatile uint64_t* nsec_vol = &(SYSPAGE_ENTRY(qtime)->nsec); int64_t adjust; do { *time_out = *nsec_vol; adjust = SYSPAGE_ENTRY(qtime)->nsec_tod_adjust; } while (*time_out != *nsec_vol); if (include_time_of_day) *time_out += adjust; } Hope this helps some, -Will Mon, 10 Sep 2012 16:19:40 GMT http://community.qnx.com/sf/go/post95480 Will Miles 2012-09-10T16:19:40Z post95478: Re: ISR on SMP http://community.qnx.com/sf/go/post95478 Is there any QNX system guy on this forum? Thank you... Mon, 10 Sep 2012 15:54:03 GMT http://community.qnx.com/sf/go/post95478 Javier A. 2012-09-10T15:54:03Z post95477: Re: ISR on SMP http://community.qnx.com/sf/go/post95477 After running test. Conclusion: Concurrent ISR. Question: Is there any way top avoid the clock ISR to be running concurrently? Any help is appreciated :) Javier Mon, 10 Sep 2012 15:39:51 GMT http://community.qnx.com/sf/go/post95477 Javier A. 2012-09-10T15:39:51Z post95475: Re: Good reasons for pthread_spin_init() failure with EBUSY? http://community.qnx.com/sf/go/post95475 Another hypothesis when a pthread_spinlock_t gets initialized with pthread_spin_init(PTHREAD_PROCESS_PRIVATE), does it get automatically destroyed if the owner process exits without explicitly calling pthread_spin_destroy()? If not, this can be an explanation of my problem. And a lack of kernel rensonsibilities ;) Davide Mon, 10 Sep 2012 15:10:19 GMT http://community.qnx.com/sf/go/post95475 Davide Ancri 2012-09-10T15:10:19Z post95469: HAM heartbeat for external attach entities http://community.qnx.com/sf/go/post95469 Hi, Is there a way for a process, externally attached to HAM, to become self-attached without loosing the potential conditions and actions sets to HAM during the initial external attachment. The idea behind is to have all the necessary processes for an application to be started externally attached to the HAM, and to let the "smart enough" processes choose themselves to use the heartbeat. Thank's Christophe Mon, 10 Sep 2012 14:31:45 GMT http://community.qnx.com/sf/go/post95469 Christophe Thiblot 2012-09-10T14:31:45Z post95467: Re: Good reasons for pthread_spin_init() failure with EBUSY? http://community.qnx.com/sf/go/post95467 hi, it's me again I took a look to the kernel sources, to find out possible ideas, and it seems that it can fail only for a couple of reasons, here: function: synchash_add() module: services/system/ker/nano_sync.c reason 1) _scalloc() can't find new memory for the secondary hash table. This seems too strange to me: why always (and only) in front of my pthread_spin_init()? reason 2) the physical address of my pthread_spinlock_t object leads to something already present in the hash table. This sounds impossible since I'm initializing the pthread_spinlock_t into memory just allocated from the kernel (I call mmap64() directly, asking for physically contiguous ram), so noone else can hold that memory page. In fact, trying to understand the hashing rules, I see that only 23 bits of the physical mutex address are taken into account: can this be the probem? For sure I have some pthread_spinlock_t in other running processes... thanks for any help! Davide Mon, 10 Sep 2012 13:22:27 GMT http://community.qnx.com/sf/go/post95467 Davide Ancri 2012-09-10T13:22:27Z post95458: ISR on SMP http://community.qnx.com/sf/go/post95458 Hi, I have a question: When running on a SMP configuration, could I have concurrent ISRs running on each processor? This is my scenario: I receive a pulse to do time correction so when I am reading/writing the qtime (nsec) I would like to make sure I am not in the middle of an update of the system clock. Thank you, Javier Fri, 07 Sep 2012 20:39:41 GMT http://community.qnx.com/sf/go/post95458 Javier A. 2012-09-07T20:39:41Z post95451: Re: RE: Query the kernel about physical memory allocation and availability http://community.qnx.com/sf/go/post95451 but I can;t see "-Dm" option there... > 6.5.0 Service Pack 1 has a much better doc for showmem: > > http://www.qnx.com/developers/docs/6.5.0_sp1/topic/com.qnx.doc. > neutrino_utilities/s/showmem.html?cp=13_13_21_15 Fri, 07 Sep 2012 15:47:54 GMT http://community.qnx.com/sf/go/post95451 Davide Ancri 2012-09-07T15:47:54Z post95450: Re: Good reasons for pthread_spin_init() failure with EBUSY? http://community.qnx.com/sf/go/post95450 I omitted to say: I run qnx 6.4.1 > I have a sporadic failing pthread_spin_init() with errno=EBUSY, where the > spinner is located in a piece of ram to be shared with another process > (PTHREAD_PROCESS_SHARED flag is used, for this reason). Fri, 07 Sep 2012 15:46:31 GMT http://community.qnx.com/sf/go/post95450 Davide Ancri 2012-09-07T15:46:31Z post95449: Re: Query the kernel about physical memory allocation and availability http://community.qnx.com/sf/go/post95449 Great! unfortunately, I forgot to say that I run qnx 6.4.1, where showmem is much more limited. But I'm happy to know it have been improved ;) thanks Davide > showmem -Dm > http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=/com.qnx.doc. > neutrino_utilities/s/showmem.html Fri, 07 Sep 2012 15:42:27 GMT http://community.qnx.com/sf/go/post95449 Davide Ancri 2012-09-07T15:42:27Z post95448: RE: Query the kernel about physical memory allocation and availability http://community.qnx.com/sf/go/post95448 6.5.0 Service Pack 1 has a much better doc for showmem: http://www.qnx.com/developers/docs/6.5.0_sp1/topic/com.qnx.doc.neutrino_utilities/s/showmem.html?cp=13_13_21_15 Steve Reid (stever@qnx.com<mailto:stever@qnx.com>) Technical Editor QNX Software Systems From: Mate Szarvas [mailto:community-noreply@qnx.com] Sent: Friday, September 07, 2012 11:28 AM To: ostech-core_os@community.qnx.com Subject: Re: Query the kernel about physical memory allocation and availability showmem -Dm http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=/com.qnx.doc.neutrino_utilities/s/showmem.html use showmem: showmem [options] - display memory information -S Show memory summary (free/used) for the system -P Show process/sharedlibrary/ summary for the system -D[lshm] Show detailed process information l = libraries/binaries s = stack h = heap m = memory mapping -d file Dump the raw map information to specified file -v Increase the verbosity of the output From: Davide Ancri <community-noreply@qnx.com<mailto:community-noreply@qnx.com>> Reply-To: <ostech-core_os@community.qnx.com<mailto:ostech-core_os@community.qnx.com>> Date: Fri, 7 Sep 2012 11:27:01 -0400 To: ostech-core_os <ostech-core_os@community.qnx.com<mailto:ostech-core_os@community.qnx.com>> Subject: Query the kernel about physical memory allocation and availability hi all is there a way to know the current state (allocation/fragmentation/availability) of the physical memory? Something like "sin pmem" on old qnx4... but more complete about physical addresses if possible ;) thanks Davide _______________________________________________ OSTech http://community.qnx.com/sf/go/post95445 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com<mailto:ostech-core_os-unsubscribe@community.qnx.com> Fri, 07 Sep 2012 15:41:30 GMT http://community.qnx.com/sf/go/post95448 Steve Reid 2012-09-07T15:41:30Z post95447: Good reasons for pthread_spin_init() failure with EBUSY? http://community.qnx.com/sf/go/post95447 hi I have a sporadic failing pthread_spin_init() with errno=EBUSY, where the spinner is located in a piece of ram to be shared with another process (PTHREAD_PROCESS_SHARED flag is used, for this reason). Can you tell me the possible reason for EBUSY error? By the way: I 0-memset the spinner area right before calling pthread_spin_init(). thanks! Davide Fri, 07 Sep 2012 15:33:48 GMT http://community.qnx.com/sf/go/post95447 Davide Ancri 2012-09-07T15:33:48Z post95446: Re: Query the kernel about physical memory allocation and availability http://community.qnx.com/sf/go/post95446 showmem -Dm http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=/com.qnx.doc.neutrino_utilities/s/showmem.html use showmem: showmem [options] - display memory information -S Show memory summary (free/used) for the system -P Show process/sharedlibrary/ summary for the system -D[lshm] Show detailed process information l = libraries/binaries s = stack h = heap m = memory mapping -d file Dump the raw map information to specified file -v Increase the verbosity of the output From: Davide Ancri <community-noreply@qnx.com<mailto:community-noreply@qnx.com>> Reply-To: <ostech-core_os@community.qnx.com<mailto:ostech-core_os@community.qnx.com>> Date: Fri, 7 Sep 2012 11:27:01 -0400 To: ostech-core_os <ostech-core_os@community.qnx.com<mailto:ostech-core_os@community.qnx.com>> Subject: Query the kernel about physical memory allocation and availability hi all is there a way to know the current state (allocation/fragmentation/availability) of the physical memory? Something like "sin pmem" on old qnx4... but more complete about physical addresses if possible ;) thanks Davide _______________________________________________ OSTech http://community.qnx.com/sf/go/post95445 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com<mailto:ostech-core_os-unsubscribe@community.qnx.com> Fri, 07 Sep 2012 15:32:31 GMT http://community.qnx.com/sf/go/post95446 Mate Szarvas 2012-09-07T15:32:31Z post95445: Query the kernel about physical memory allocation and availability http://community.qnx.com/sf/go/post95445 hi all is there a way to know the current state (allocation/fragmentation/availability) of the physical memory? Something like "sin pmem" on old qnx4... but more complete about physical addresses if possible ;) thanks Davide Fri, 07 Sep 2012 15:27:01 GMT http://community.qnx.com/sf/go/post95445 Davide Ancri 2012-09-07T15:27:01Z post95365: Detecting HID devices in non-default configurations http://community.qnx.com/sf/go/post95365 Hello, I'm trying to write a client of the io-hid manager to support devices which only present a HID interface in a non-default USB configuration. I was having a problem that io-hid didn't trigger insertions for the device, even when I used an enum-usb script to place it in the correct USB configuration. I've discovered a work-around which is to write an enum-devices script to re-mount devh-usb.so on io-hid, which seems to trigger the correct insertion callback in my client code. However, this has the unwanted side-effect of causing all existing HID devices to be removed and then re-inserted (only at the io-hid interface, not at the USB level). This causes me problems since the devices are stateful and if I connect to them as if they were newly inserted then the negotiation will fail. Could anybody suggest a way to cause devh-usb.so to re-scan for new HID devices in a way which doesn't disconnect already-connected ones? It appears that whatever scan it does at startup detects devices with a HID interface in their current configuration, but after this initial scan it only seems to be notified of new devices if they have a HID interface in their *default* configuration. If I can find a way to trigger whatever scan it does at startup without causing removal notifications for existing devices, I can trigger this from my enum-devices script and the problem will be solved. Any ideas anyone could share would be very gratefully received. Tue, 04 Sep 2012 17:11:29 GMT http://community.qnx.com/sf/go/post95365 Andy Pearce 2012-09-04T17:11:29Z post95322: Re: 6.5.0SP1 devc-ser8250 error http://community.qnx.com/sf/go/post95322 I encoutered the situation too. But I solved the issue successfully. Please using "mkifs" to make a new image under SP1 enviroment, and please using new image to cover the old version "/.boot", then reboot again. You can't see this message again. Sat, 01 Sep 2012 10:11:56 GMT http://community.qnx.com/sf/go/post95322 Bill Xia 2012-09-01T10:11:56Z post95321: Re: devc-ser8250 driver http://community.qnx.com/sf/go/post95321 I encoutered the situation too. But I solved the issue successfully. Please using "mkifs" to make a new image under SP1 enviroment, and please using new image to cover the old version "/.boot", then reboot again. You can't see this message again. Sat, 01 Sep 2012 10:11:42 GMT http://community.qnx.com/sf/go/post95321 Bill Xia 2012-09-01T10:11:42Z post95320: Re: 6.5.0SP1 devc-ser8250 error http://community.qnx.com/sf/go/post95320 I encoutered the situation too. But I solved the issue successfully. Please using "mkifs" to make a new image under SP1 enviroment, and please using new image to cover the old version "/.boot", then reboot again. You can't see this message again. Sat, 01 Sep 2012 10:11:05 GMT http://community.qnx.com/sf/go/post95320 Bill Xia 2012-09-01T10:11:05Z post95254: Re: Setting up QNX to mount a disk. http://community.qnx.com/sf/go/post95254 The build file included in the x86 BSP for 6.5.0 is a good place to start. Wed, 29 Aug 2012 13:07:20 GMT http://community.qnx.com/sf/go/post95254 Gervais Mulongoy 2012-08-29T13:07:20Z post95252: OS clock sync up with Real time clock, at Boot up http://community.qnx.com/sf/go/post95252 I'm using QNX6.2.0. At boot-up i'm observing, that my OS clock is lagging from the RT clock by a few seconds. later if i run "rtc hw" and read the OS clock value, there is no error in the OS clock it gets rectified. This behavior is observed consistently at Low temperatures, temperatures below 20 degree C. if i switch Off the system for 20mins or more and power ON, i get this issue. If the temperature is more, say around 25, then issue is observed around 30mins, switch Off time. Questions: 1. Is the IPL responsible for the initial sync up?, i'm not doing any RTC sync up in my boot script. 2. Can anyone help me in this regard? Wed, 29 Aug 2012 12:47:37 GMT http://community.qnx.com/sf/go/post95252 Jayakumar Gopalakrishnan 2012-08-29T12:47:37Z post95235: Setting up QNX to mount a disk. http://community.qnx.com/sf/go/post95235 I just went throught the process of creating a bootable hard drive and putting an ifs image on it and booting my system. All is well there. The next thing I need to do is reconfigure QNX to start the disk drivers and mount the disk that I just booted from. My hardware confiquration is an x86 board with a SATA HD. What drivers do I need to include and start? Is there a good basic example I can follow. Regards, Mark Tue, 28 Aug 2012 20:48:42 GMT http://community.qnx.com/sf/go/post95235 Mark Bangert 2012-08-28T20:48:42Z post94892: Re: 6.5.0SP1 devc-ser8250 error http://community.qnx.com/sf/go/post94892 Hmm, when I ran mkifs with -vvvv, everything look OK (see below). I tried the 'quad-v' image on the system and the error was gone. I'm at a loss to explain the difference between the two mkifs runs. Thanks for the help. Here's output from mkifis. >mkifs -vvvv mccsmp.build mccsmp.ifs Offset Size Entry Ramoff Target=Host 400000 440 0 --- c:/QNX/QNX650SP1/target/qnx6/x86/boot/sys/bios.boot Execute: ldrel -s!* -p -l -t 0x400540 "c:/QNX/QNX650SP1/target/qnx6/x86/boot/sys/startup-bios" "C:\DOCUME~1\MARK_D~1\LOCALS~1\Temp\Q538041a7b55.tmp" Execute: ntox86-ld -T%QNX_TARGET%/x86/lib/nto.link -Ttext 0xf0018000 -o"C:\DOCUME~1\MARK_D~1\LOCALS~1\Temp\Q538041a7bf2.tmp" "c:/QNX/QNX650SP1/target/qnx6/x86/boot/sys/procnto-smp-instr" 400440 100 ---- --- Startup-header 400540 159d0 404e38 --- C:\DOCUME~1\MARK_D~1\LOCALS~1\Temp\Q538041a7b55.tmp (1297385664) 415ad0 5c ---- --- Image-header 415b2c 580 ---- --- Image-directory 4160ac 26c ---- --- proc/boot/startup-script=C:\DOCUME~1\MARK_D~1\LOCALS~1/Temp\Q538041a7b05.tmp 416318 12 ---- --- proc/boot/unlink_list=C:\DOCUME~1\MARK_D~1\LOCALS~1Temp\Q538041a7b35.tmp (449623294) 417000 91000 f0051578 --- proc/boot/procnto-smp-instr=C:\DOCUME~1\MARK_D~1\LOCALS~1\Temp\Q538041a7bf2.tmp (1619586354) 4a8000 7dc90 3f9e0 --- proc/boot/libc.so.3=c:/QNX/QNX650SP1/target/qnx6/x86/lib/libc.so (3216559672) ---- --- ---- --- proc/boot/libc.so=libc.so.3 (3216559672) 526000 6f46 19e0 --- proc/boot/libhiddi.so.1=c:/QNX/QNX650SP1/target/qnx6/x86/lib/libhiddi.so (1832649318) ---- --- ---- --- proc/boot/libhiddi.so=libhiddi.so.1 (1832649318) 52d000 139a8 41d0 --- proc/boot/libcam.so.2=c:/QNX/QNX650SP1/target/qnx6/x86/lib/libcam.so (1067910505) ---- --- ---- --- proc/boot/libcam.so=libcam.so.2 (1067910505) 541000 7d8ec 67c0 --- proc/boot/io-blk.so=c:/QNX/QNX650SP1/target/qnx6/x86/lib/dll/io-blk.so (3672287797) 5bf000 4102 c90 --- proc/boot/cam-disk.so=c:/QNX/QNX650SP1/target/qnx6/x86/lib/dll/cam-disk.so (1894384287) 5c4000 11ff6 1d90 --- proc/boot/fs-qnx6.so=c:/QNX/QNX650SP1/target/qnx6/x86/lib/dll/fs-qnx6.so (4285932322) 5d6000 13a52 1f50 --- proc/boot/fs-dos.so=c:/QNX/QNX650SP1/target/qnx6/x86/lib/dll/fs-dos.so (1446027264) 5ea000 dc15 17e0 --- proc/boot/fs-ext2.so=c:/QNX/QNX650SP1/target/qnx6/x86/lib/dll/fs-ext2.so (4123902041) 5f8000 5782 e40 --- proc/boot/cam-cdrom.so=c:/QNX/QNX650SP1/target/qnx6/x86/lib/dll/cam-cdrom.so (2809581546) 5fe000 c0f4 1680 --- proc/boot/fs-cd.so=c:/QNX/QNX650SP1/target/qnx6/x86/lib/dll/fs-cd.so (2612837027) 60b000 1585a 21b0 --- proc/boot/fs-udf.so=c:/QNX/QNX650SP1/target/qnx6/x86/lib/dll/fs-udf.so (3998463212) 621000 e586 2730 --- proc/boot/devh-ps2ser.so=c:/QNX/QNX650SP1/target/qnx6/x86/lib/dll/devh-ps2ser.so (669043340) 630000 32f5 8048998 --- proc/boot/seedres=c:/QNX/QNX650SP1/target/qnx6/x86/sbin/seedres (704932111) 634000 fc12 80492c8 --- proc/boot/pci-bios=c:/QNX/QNX650SP1/target/qnx6/x86/sbin/pci-bios 3446572288) 644000 1a56b 8049c18 --- proc/boot/devb-eide=c:/QNX/QNX650SP1/target/qnx6/x86sbin/devb-eide (823001228) 65f000 82e2 8049ca8 --- proc/boot/io-hid=c:/QNX/QNX650SP1/target/qnx6/x86/sbin/io-hid 1977451559) 668000 3afb 8048f08 --- proc/boot/slogger=c:/QNX/QNX650SP1/target/qnx6/x86/usr/sbin/slogger (3139326079) 66c000 5386 8049428 --- proc/boot/fesh=c:/QNX/QNX650SP1/target/qnx6/x86/bin/fesh (4152905123) 672000 1ab73 804a338 --- proc/boot/devc-con-hid=c:/QNX/QNX650SP1/target/qnx6/x86/sbin/devc-con-hid (585756925) 68cb74 4 ---- --- Image-trailer Thu, 16 Aug 2012 16:35:53 GMT http://community.qnx.com/sf/go/post94892 Mark Dowdy 2012-08-16T16:35:53Z post94883: RE: 6.5.0SP1 devc-ser8250 error http://community.qnx.com/sf/go/post94883 Something must have gone wrong with your build of the new image(didn't use the 650SP1 installed bins/libs)....what is the output from running mkifs with -vvvv option. Also, what is the output from the following on your 2 machines? ls -l /.boot From: Mark Dowdy [mailto:community-noreply@qnx.com] Sent: August-15-12 8:53 PM To: ostech-core_os@community.qnx.com Subject: 6.5.0SP1 devc-ser8250 error I installed 6.5.0 SP1 on my target machine, and my windows development machine, and built an updated boot file. When I attempt to load my boot file, I get the following error: ldd:FATAL: Unresolved symbol "hwi_find_item" called from Executable I saw topc22117 and collected the information below. As far as I know, this is not a pre-release version of SP1; I pulled qnxsdp-6.5.0SP1-201206270843-nto.sh and qnxsdp-6.5.0SP1-201206261830-win32.exe from qnx.com on August 6th. # use -i libc.so.3 NAME=libc.so DESCRIPTION=C runtime library DATE=2010/07/09-12:54:28-EDT STATE=stable HOST=mainbuild USER=builder VERSION=6.5.0 TAGID=89 # uname -a QNX MCC 6.5.0 2010/07/09-14:44:03EDT x86pc x86 MCC# use -i /proc/boot/libc.so NAME=libc.so DESCRIPTION=C runtime library DATE=2010/07/09-12:54:28-EDT STATE=stable HOST=mainbuild USER=builder VERSION=6.5.0 TAGID=89 # ls -l /proc/boot total 4268 -rwxrwxrwx 1 root root 22294 Jul 09 2010 cam-cdrom.so -rwxrwxrwx 1 root root 13738 Jul 09 2010 cam-disk.so -rwxrwxrwx 1 root root 107156 Jul 09 2010 devb-eide -rwxrwxrwx 1 root root 107815 Jul 09 2010 devc-con-hid -rwxrwxrwx 1 root root 58750 Jul 09 2010 devh-ps2ser.so -rwxrwxrwx 1 root root 21382 Jul 09 2010 fesh -rwxrwxrwx 1 root root 49356 Jul 09 2010 fs-cd.so -rwxrwxrwx 1 root root 78433 Jul 09 2010 fs-dos.so -rwxrwxrwx 1 root root 56333 Jul 09 2010 fs-ext2.so -rwxrwxrwx 1 root root 72902 Jul 09 2010 fs-qnx6.so -rwxrwxrwx 1 root root 85618 Jul 09 2010 fs-udf.so -rwxrwxrwx 1 root root 169908 Jul 09 2010 io-blk.so -rwxrwxrwx 1 root root 33170 Jul 09 2010 io-hid lrwxrwxrwx 1 root root 9 Jul 09 2010 libc.so -> libc.so.3 -rwxrwxrwx 1 root root 513152 Jul 09 2010 libc.so.3 lrwxrwxrwx 1 root root 11 Jul 09 2010 libcam.so -> libcam.so.2 -rwxrwxrwx 1 root root 73504 Jul 09 2010 libcam.so.2 lrwxrwxrwx 1 root root 13 Jul 09 2010 libhiddi.so -> libhiddi.so.1 -rwxrwxrwx 1 root root 27906 Jul 09 2010 libhiddi.so.1 -rwxrwxrwx 1 root root 64148 Jul 09 2010 pci-bios -rwxrwxrwx 1 root root 593920 Jul 09 2010 procnto-smp-instr -rwxrwxrwx 1 root root 13001 Jul 09 2010 seedres -rwxrwxrwx 1 root root 14636 Jul 09 2010 slogger -rw-rw-rw- 1 root root 620 May 06 2011 startup-script -rw-rw-rw- 1 root root 18 May 06 2011 unlink_list As was the case in topc22117, it looks like the binaries are 'old'. Why is that? Is there more required to install SP1 than running the .exe on my development machine and the .sh on my target? Thanks. Mark Thu, 16 Aug 2012 13:13:43 GMT http://community.qnx.com/sf/go/post94883 Chris Travis 2012-08-16T13:13:43Z post94882: Re: 6.5.0SP1 devc-ser8250 error http://community.qnx.com/sf/go/post94882 Not sure why this wasn't installed on your hosts but you probably need the SP1 libc.so (see attached). Thu, 16 Aug 2012 12:57:00 GMT http://community.qnx.com/sf/go/post94882 Gervais Mulongoy 2012-08-16T12:57:00Z post94872: 6.5.0SP1 devc-ser8250 error http://community.qnx.com/sf/go/post94872 I installed 6.5.0 SP1 on my target machine, and my windows development machine, and built an updated boot file. When I attempt to load my boot file, I get the following error: ldd:FATAL: Unresolved symbol "hwi_find_item" called from Executable I saw topc22117 and collected the information below. As far as I know, this is not a pre-release version of SP1; I pulled qnxsdp-6.5.0SP1-201206270843-nto.sh and qnxsdp-6.5.0SP1-201206261830-win32.exe from qnx.com on August 6th. # use -i libc.so.3 NAME=libc.so DESCRIPTION=C runtime library DATE=2010/07/09-12:54:28-EDT STATE=stable HOST=mainbuild USER=builder VERSION=6.5.0 TAGID=89 # uname -a QNX MCC 6.5.0 2010/07/09-14:44:03EDT x86pc x86 MCC# use -i /proc/boot/libc.so NAME=libc.so DESCRIPTION=C runtime library DATE=2010/07/09-12:54:28-EDT STATE=stable HOST=mainbuild USER=builder VERSION=6.5.0 TAGID=89 # ls -l /proc/boot total 4268 -rwxrwxrwx 1 root root 22294 Jul 09 2010 cam-cdrom.so -rwxrwxrwx 1 root root 13738 Jul 09 2010 cam-disk.so -rwxrwxrwx 1 root root 107156 Jul 09 2010 devb-eide -rwxrwxrwx 1 root root 107815 Jul 09 2010 devc-con-hid -rwxrwxrwx 1 root root 58750 Jul 09 2010 devh-ps2ser.so -rwxrwxrwx 1 root root 21382 Jul 09 2010 fesh -rwxrwxrwx 1 root root 49356 Jul 09 2010 fs-cd.so -rwxrwxrwx 1 root root 78433 Jul 09 2010 fs-dos.so -rwxrwxrwx 1 root root 56333 Jul 09 2010 fs-ext2.so -rwxrwxrwx 1 root root 72902 Jul 09 2010 fs-qnx6.so -rwxrwxrwx 1 root root 85618 Jul 09 2010 fs-udf.so -rwxrwxrwx 1 root root 169908 Jul 09 2010 io-blk.so -rwxrwxrwx 1 root root 33170 Jul 09 2010 io-hid lrwxrwxrwx 1 root root 9 Jul 09 2010 libc.so -> libc.so.3 -rwxrwxrwx 1 root root 513152 Jul 09 2010 libc.so.3 lrwxrwxrwx 1 root root 11 Jul 09 2010 libcam.so -> libcam.so.2 -rwxrwxrwx 1 root root 73504 Jul 09 2010 libcam.so.2 lrwxrwxrwx 1 root root 13 Jul 09 2010 libhiddi.so -> libhiddi.so.1 -rwxrwxrwx 1 root root 27906 Jul 09 2010 libhiddi.so.1 -rwxrwxrwx 1 root root 64148 Jul 09 2010 pci-bios -rwxrwxrwx 1 root root 593920 Jul 09 2010 procnto-smp-instr -rwxrwxrwx 1 root root 13001 Jul 09 2010 seedres -rwxrwxrwx 1 root root 14636 Jul 09 2010 slogger -rw-rw-rw- 1 root root 620 May 06 2011 startup-script -rw-rw-rw- 1 root root 18 May 06 2011 unlink_list As was the case in topc22117, it looks like the binaries are 'old'. Why is that? Is there more required to install SP1 than running the .exe on my development machine and the .sh on my target? Thanks. Mark Thu, 16 Aug 2012 00:54:20 GMT http://community.qnx.com/sf/go/post94872 Mark Dowdy 2012-08-16T00:54:20Z post94812: Re: setrlimit behaviour http://community.qnx.com/sf/go/post94812 The gear in the kernel appears to be in place to set limits on a given process, what's missing is the extension to libc, something like prlimit() on linux. Tue, 14 Aug 2012 17:08:47 GMT http://community.qnx.com/sf/go/post94812 Gervais Mulongoy 2012-08-14T17:08:47Z post94809: setrlimit behaviour http://community.qnx.com/sf/go/post94809 I've never used this function, but I had a question about its use in restricting a launched program's memory allocation. In reading the docs (http://www.qnx.com/developers/docs/6.3.0SP3/neutrino/lib_ref/s/setrlimit.html ), I think that it would work like this: Controlling program calls setrlimit to lower RLIMIT_DATA Controller then launches child process Child process inherits new lower rlimit Controller calls setrlimit again to bump limit back to normal. I have three questions: 1. Is my interpretation of setrlimit the proper way to spawn a child process with restricted memory limits? 2. What happens if the controlling app lowers the RLIMIT_DATA below what memory it's actually using? My interpretation is that the next heap alloc through brk() will fail, which means that you better not do this if you're multi-threaded unless you can guarantee no other threads will alloc memory. 3. Is there any way to inject an rlimit into an already running process? Tue, 14 Aug 2012 15:49:21 GMT http://community.qnx.com/sf/go/post94809 Andy Gryc 2012-08-14T15:49:21Z post94754: RE: TimerTimeout() not getting timeout http://community.qnx.com/sf/go/post94754 Ideally if this is a single threaded resmgr, the devctl handler should not block if it's waiting for something say there is no data available at the time, then save the ctp->rcvid for later reply and return _RESMGR_NOREPLY, then you don't have to create another thread for that. > -----Original Message----- > From: David Sarrazin [mailto:community-noreply@qnx.com] > Sent: August-10-12 10:41 AM > To: ostech-core_os@community.qnx.com > Subject: RE: TimerTimeout() not getting timeout > > Simplest way to is to MsgError(ctp->rcvid), which will unblock the client. It's > then very important for your resource manager to keep track of the fact that it > has already replied, and either abort the current operation, or simply skip over > the MsgReply that happens when the devctl thread finishes. > > > -----Original Message----- > > From: Fraser Moore [mailto:community-noreply@qnx.com] > > Sent: August-10-12 10:39 AM > > To: ostech-core_os@community.qnx.com > > Subject: Re: TimerTimeout() not getting timeout > > > > I can now get io_unblock to be called from a separate thread but how > > do I then reply to the client which is blocked on another thread to unblock it? > > > > cheers, > > fraser > > > > On 10/08/2012 10:43, Thomas Haupt wrote: > > > Hi Fraser, > > > > > > sure, feel free. > > > > > > Cheers, > > > Thomas > > > > > > -----Original Message----- > > > From: Fraser Moore [mailto:community-noreply@qnx.com] > > > Sent: Freitag, 10. August 2012 10:37 > > > To: ostech-core_os@community.qnx.com > > > Subject: Re: TimerTimeout() not getting timeout > > > > > > Hi Thomas, I think that's exactly what's happening. I had just > > > been reading > > the about this in the documentation. I will try and create a new > > thread to handle this. > > > > > > I may be back for more advice. > > > > > > Thanks, > > > Fraser > > > > > > On 10/08/2012 09:25, Thomas Haupt wrote: > > >> The io_unblock callout will only be invoked when you get back to > > >> your > > resource manager's main loop (dispatch_block() / dispatch_handle()) > > somehow. > > >> > > >> If you are handling the devctl in some way such that the resource > > manager will still be in io_devctl() when the timeout comes, no > > unblock handling will be done. > > >> > > >> In order for unblocking to work properly, you need to somehow put > > "long" (potentially blocking) tasks into the "background" and return > > to the main message handler loop. That could mean doing them in a > > separate thread, or adding entries on an "outstanding tasks" list that > > you can look into when you see a state change (e.g., an interrupt signaling > data coming in). > > >> > > >> Regards, > > >> Thomas > > >> > > >> -----Original Message----- > > >> From: Fraser Moore [mailto:community-noreply@qnx.com] > > >> Sent: Freitag, 10. August 2012 09:44 > > >> To: ostech-core_os@community.qnx.com > > >> Subject: Re: TimerTimeout() not getting timeout > > >> > > >> I tried defining my own io_unblock that simply calls > > iofunc_unblock_default(). However I never see this function getting > > called by the resource manager. I am new to writing resource managers > > so what should I be doing to handle unblocks? > > >> > > >> cheers, > > >> fraser > > >> > > >> On 09/08/2012 14:52, Lichun Zhu wrote: > > >>> I think this is it, the resmgr did not handle unblock. > > >>> > > >>> -----Original Message----- > > >>> From: Thomas Haupt [mailto:community-noreply@qnx.com] > > >>> Sent: Thursday, August 09, 2012 9:44 AM > > >>> To: 'ostech-core_os@community.qnx.com' > > >>> Subject: RE: TimerTimeout() not getting timeout > > >>> > > >>> Does it do proper unblock handling? > > >>> > > >>> -----Original Message----- > > >>> From: Fraser Moore [mailto:community-noreply@qnx.com] > > >>> Sent: Donnerstag, 9. August 2012 15:40 > > >>> To: ostech-core_os@community.qnx.com > > >>> Subject: Re: TimerTimeout() not getting timeout > > >>> > > >>> It is one that we have developed. > > >>> > > >>> On 09/08/2012 14:28, Thomas Haupt wrote: > > >>>> What resource manager is this devctl going to? > > >>>> > > >>>> - Thomas > > >>>> > > >>>> -----Original Message----- > > >>>> From: Fraser Moore [mailto:community-noreply@qnx.com] > > >>>> Sent: Donnerstag, 9. August 2012 15:27 > > >>>> To: ostech-core_os@community.qnx.com > > >>>> Subject: Re: TimerTimeout() not getting timeout > > >>>> > > >>>> Thanks for the reply. I had tried this but got the same results. > > >>>> > > >>>> On 09/08/2012 12:05, Gervais Mulongoy wrote: > > >>>>> Try setting an unblock event instead of NULL: > > >>>>> > > >>>>> SIGEV_UNBLOCK_INIT(&ev); > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> _______________________________________________ > > >>>>> > > >>>>> OSTech > > >>>>> http://community.qnx.com/sf/go/post94710 > > >>>>> To cancel your subscription to this discussion, please e-mail > > >>>>> ostech-core_os-unsubscribe@community.qnx.com > > >>>>> > > >>>> > > >>>> -- > > >>>> Fraser Moore > > >>>> Abelon Systems Ltd > > >>>> Building 4, Quantum Court, Research Avenue South, Heriot Watt > > Research Park, Riccarton, Edinburgh EH14 4AP. > > >>>> phone: 0131 449 9173 web: www.abelon.com > > >>>> > > >>>> > > >>>> > > >>>> > > >>>> _______________________________________________ > > >>>> > > >>>> OSTech > > >>>> http://community.qnx.com/sf/go/post94714 > > >>>> To cancel your subscription to this discussion, please e-mail > > >>>> ostech-core_os-unsubscribe@community.qnx.com > > >>>> > > >>>> > > >>>> > > >>>> > > >>>> _______________________________________________ > > >>>> > > >>>> OSTech > > >>>> http://community.qnx.com/sf/go/post94715 > > >>>> To cancel your subscription to this discussion, please e-mail > > >>>> ostech-core_os-unsubscribe@community.qnx.com > > >>>> > > >>> > > >>> -- > > >>> Fraser Moore > > >>> Abelon Systems Ltd > > >>> Building 4, Quantum Court, Research Avenue South, Heriot Watt > > Research Park, Riccarton, Edinburgh EH14 4AP. > > >>> phone: 0131 449 9173 web: www.abelon.com > > >>> > > >>> > > >>> > > >>> > > >>> _______________________________________________ > > >>> > > >>> OSTech > > >>> http://community.qnx.com/sf/go/post94716 > > >>> To cancel your subscription to this discussion, please e-mail > > >>> ostech-core_os-unsubscribe@community.qnx.com > > >>> > > >>> > > >>> > > >>> > > >>> _______________________________________________ > > >>> > > >>> OSTech > > >>> http://community.qnx.com/sf/go/post94717 > > >>> To cancel your subscription to this discussion, please e-mail > > >>> ostech-core_os-unsubscribe@community.qnx.com > > >>> > > >>> > > >>> > > >>> > > >>> _______________________________________________ > > >>> > > >>> OSTech > > >>> http://community.qnx.com/sf/go/post94718 > > >>> To cancel your subscription to this discussion, please e-mail > > >>> ostech-core_os-unsubscribe@community.qnx.com > > >>> > > >> > > >> -- > > >> Fraser Moore > > >> Abelon Systems Ltd > > >> Building 4, Quantum Court, Research Avenue South, Heriot Watt > > >> Research > > Park, Riccarton, Edinburgh EH14 4AP. > > >> phone: 0131 449 9173 web: www.abelon.com > > >> > > >> > > >> > > >> > > >> _______________________________________________ > > >> > > >> OSTech > > >> http://community.qnx.com/sf/go/post94741 > > >> To cancel your subscription to this discussion, please e-mail > > >> ostech-core_os-unsubscribe@community.qnx.com > > >> > > >> > > >> > > >> > > >> _______________________________________________ > > >> > > >> OSTech > > >> http://community.qnx.com/sf/go/post94743 > > >> To cancel your subscription to this discussion, please e-mail > > >> ostech-core_os-unsubscribe@community.qnx.com > > >> > > > > > > -- > > > Fraser Moore > > > Abelon Systems Ltd > > > Building 4, Quantum Court, Research Avenue South, Heriot Watt > > > Research > > Park, Riccarton, Edinburgh EH14 4AP. > > > phone: 0131 449 9173 web: www.abelon.com > > > > > > > > > > > > > > > _______________________________________________ > > > > > > OSTech > > > http://community.qnx.com/sf/go/post94744 > > > To cancel your subscription to this discussion, please e-mail > > > ostech-core_os-unsubscribe@community.qnx.com > > > > > > > > > > > > > > > _______________________________________________ > > > > > > OSTech > > > http://community.qnx.com/sf/go/post94745 > > > To cancel your subscription to this discussion, please e-mail > > > ostech-core_os-unsubscribe@community.qnx.com > > > > > > > -- > > Fraser Moore > > Abelon Systems Ltd > > Building 4, Quantum Court, Research Avenue South, Heriot Watt Research > > Park, Riccarton, Edinburgh EH14 4AP. > > phone: 0131 449 9173 web: www.abelon.com > > > > > > > > > > _______________________________________________ > > > > OSTech > > http://community.qnx.com/sf/go/post94751 > > To cancel your subscription to this discussion, please e-mail > > ostech-core_os- unsubscribe@community.qnx.com > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94752 > To cancel your subscription to this discussion, please e-mail ostech-core_os- > unsubscribe@community.qnx.com Fri, 10 Aug 2012 14:48:45 GMT http://community.qnx.com/sf/go/post94754 Lichun Zhu 2012-08-10T14:48:45Z post94753: AW: RE: TimerTimeout() not getting timeout http://community.qnx.com/sf/go/post94753 Of course, that'll leave one thread blocked in io_devctl, potentially forever. You might want to send a signal to the other thread, cancel it, or not do anything blocking in there in the first place. What operation is your devctl thread blocked on? What is it waiting for? ----- Originalnachricht ----- Von: David Sarrazin [mailto:community-noreply@qnx.com] Gesendet: Friday, August 10, 2012 10:40 AM An: ostech-core_os@community.qnx.com <ostech-core_os@community.qnx.com> Betreff: RE: TimerTimeout() not getting timeout Simplest way to is to MsgError(ctp->rcvid), which will unblock the client. It's then very important for your resource manager to keep track of the fact that it has already replied, and either abort the current operation, or simply skip over the MsgReply that happens when the devctl thread finishes. > -----Original Message----- > From: Fraser Moore [mailto:community-noreply@qnx.com] > Sent: August-10-12 10:39 AM > To: ostech-core_os@community.qnx.com > Subject: Re: TimerTimeout() not getting timeout > > I can now get io_unblock to be called from a separate thread but how do I > then reply to the client which is blocked on another thread to unblock it? > > cheers, > fraser > > On 10/08/2012 10:43, Thomas Haupt wrote: > > Hi Fraser, > > > > sure, feel free. > > > > Cheers, > > Thomas > > > > -----Original Message----- > > From: Fraser Moore [mailto:community-noreply@qnx.com] > > Sent: Freitag, 10. August 2012 10:37 > > To: ostech-core_os@community.qnx.com > > Subject: Re: TimerTimeout() not getting timeout > > > > Hi Thomas, I think that's exactly what's happening. I had just been reading > the about this in the documentation. I will try and create a new thread to > handle this. > > > > I may be back for more advice. > > > > Thanks, > > Fraser > > > > On 10/08/2012 09:25, Thomas Haupt wrote: > >> The io_unblock callout will only be invoked when you get back to your > resource manager's main loop (dispatch_block() / dispatch_handle()) > somehow. > >> > >> If you are handling the devctl in some way such that the resource > manager will still be in io_devctl() when the timeout comes, no unblock > handling will be done. > >> > >> In order for unblocking to work properly, you need to somehow put > "long" (potentially blocking) tasks into the "background" and return to the > main message handler loop. That could mean doing them in a separate > thread, or adding entries on an "outstanding tasks" list that you can look into > when you see a state change (e.g., an interrupt signaling data coming in). > >> > >> Regards, > >> Thomas > >> > >> -----Original Message----- > >> From: Fraser Moore [mailto:community-noreply@qnx.com] > >> Sent: Freitag, 10. August 2012 09:44 > >> To: ostech-core_os@community.qnx.com > >> Subject: Re: TimerTimeout() not getting timeout > >> > >> I tried defining my own io_unblock that simply calls > iofunc_unblock_default(). However I never see this function getting called > by the resource manager. I am new to writing resource managers so what > should I be doing to handle unblocks? > >> > >> cheers, > >> fraser > >> > >> On 09/08/2012 14:52, Lichun Zhu wrote: > >>> I think this is it, the resmgr did not handle unblock. > >>> > >>> -----Original Message----- > >>> From: Thomas Haupt [mailto:community-noreply@qnx.com] > >>> Sent: Thursday, August 09, 2012 9:44 AM > >>> To: 'ostech-core_os@community.qnx.com' > >>> Subject: RE: TimerTimeout() not getting timeout > >>> > >>> Does it do proper unblock handling? > >>> > >>> -----Original Message----- > >>> From: Fraser Moore [mailto:community-noreply@qnx.com] > >>> Sent: Donnerstag, 9. August 2012 15:40 > >>> To: ostech-core_os@community.qnx.com > >>> Subject: Re: TimerTimeout() not getting timeout > >>> > >>> It is one that we have developed. > >>> > >>> On 09/08/2012 14:28, Thomas Haupt wrote: > >>>> What resource manager is this devctl going to? > >>>> > >>>> - Thomas > >>>> > >>>> -----Original Message----- > >>>> From: Fraser Moore [mailto:community-noreply@qnx.com] > >>>> Sent: Donnerstag, 9. August 2012 15:27 > >>>> To: ostech-core_os@community.qnx.com > >>>> Subject: Re: TimerTimeout() not getting timeout > >>>> > >>>> Thanks for the reply. I had tried this but got the same results. > >>>> > >>>> On 09/08/2012 12:05, Gervais Mulongoy wrote: > >>>>> Try setting an unblock event instead of NULL: > >>>>> > >>>>> SIGEV_UNBLOCK_INIT(&ev); > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> _______________________________________________ > >>>>> > >>>>> OSTech > >>>>> http://community.qnx.com/sf/go/post94710 > >>>>> To cancel your subscription to this discussion, please e-mail > >>>>> ostech-core_os-unsubscribe@community.qnx.com > >>>>> > >>>> > >>>> -- > >>>> Fraser Moore > >>>> Abelon Systems Ltd > >>>> Building 4, Quantum Court, Research Avenue South, Heriot Watt > Research Park, Riccarton, Edinburgh EH14 4AP. > >>>> phone: 0131 449 9173 web: www.abelon.com > >>>> > >>>> > >>>> > >>>> > >>>> _______________________________________________ > >>>> > >>>> OSTech > >>>> http://community.qnx.com/sf/go/post94714 > >>>> To cancel your subscription to this discussion, please e-mail > >>>> ostech-core_os-unsubscribe@community.qnx.com > >>>> > >>>> > >>>> > >>>> > >>>> _______________________________________________ > >>>> > >>>> OSTech > >>>> http://community.qnx.com/sf/go/post94715 > >>>> To cancel your subscription to this discussion, please e-mail > >>>> ostech-core_os-unsubscribe@community.qnx.com > >>>> > >>> > >>> -- > >>> Fraser Moore > >>> Abelon Systems Ltd > >>> Building 4, Quantum Court, Research Avenue South, Heriot Watt > Research Park, Riccarton, Edinburgh EH14 4AP. > >>> phone: 0131 449 9173 web: www.abelon.com > >>> > >>> > >>> > >>> > >>> _______________________________________________ > >>> > >>> OSTech > >>> http://community.qnx.com/sf/go/post94716 > >>> To cancel your subscription to this discussion, please e-mail > >>> ostech-core_os-unsubscribe@community.qnx.com > >>> > >>> > >>> > >>> > >>> _______________________________________________ > >>> > >>> OSTech > >>> http://community.qnx.com/sf/go/post94717 > >>> To cancel your subscription to this discussion, please e-mail > >>> ostech-core_os-unsubscribe@community.qnx.com > >>> > >>> > >>> > >>> > >>> _______________________________________________ > >>> > >>> OSTech > >>> http://community.qnx.com/sf/go/post94718 > >>> To cancel your subscription to this discussion, please e-mail > >>> ostech-core_os-unsubscribe@community.qnx.com > >>> > >> > >> -- > >> Fraser Moore > >> Abelon Systems Ltd > >> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research > Park, Riccarton, Edinburgh EH14 4AP. > >> phone: 0131 449 9173 web: www.abelon.com > >> > >> > >> > >> > >> _______________________________________________ > >> > >> OSTech > >> http://community.qnx.com/sf/go/post94741 > >> To cancel your subscription to this discussion, please e-mail > >> ostech-core_os-unsubscribe@community.qnx.com > >> > >> > >> > >> > >> _______________________________________________ > >> > >> OSTech > >> http://community.qnx.com/sf/go/post94743 > >> To cancel your subscription to this discussion, please e-mail > >> ostech-core_os-unsubscribe@community.qnx.com > >> > > > > -- > > Fraser Moore > > Abelon Systems Ltd > > Building 4, Quantum Court, Research Avenue South, Heriot Watt Research > Park, Riccarton, Edinburgh EH14 4AP. > > phone: 0131 449 9173 web: www.abelon.com > > > > > > > > > > _______________________________________________ > > > > OSTech > > http://community.qnx.com/sf/go/post94744 > > To cancel your subscription to this discussion, please e-mail > > ostech-core_os-unsubscribe@community.qnx.com > > > > > > > > > > _______________________________________________ > > > > OSTech > > http://community.qnx.com/sf/go/post94745 > > To cancel your subscription to this discussion, please e-mail > > ostech-core_os-unsubscribe@community.qnx.com > > > > -- > Fraser Moore > Abelon Systems Ltd > Building 4, Quantum Court, Research Avenue South, Heriot Watt Research > Park, Riccarton, Edinburgh EH14 4AP. > phone: 0131 449 9173 web: www.abelon.com > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94751 > To cancel your subscription to this discussion, please e-mail ostech-core_os- > unsubscribe@community.qnx.com _______________________________________________ OSTech http://community.qnx.com/sf/go/post94752 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Fri, 10 Aug 2012 14:47:24 GMT http://community.qnx.com/sf/go/post94753 Thomas Haupt 2012-08-10T14:47:24Z post94751: Re: TimerTimeout() not getting timeout http://community.qnx.com/sf/go/post94751 I can now get io_unblock to be called from a separate thread but how do I then reply to the client which is blocked on another thread to unblock it? cheers, fraser On 10/08/2012 10:43, Thomas Haupt wrote: > Hi Fraser, > > sure, feel free. > > Cheers, > Thomas > > -----Original Message----- > From: Fraser Moore [mailto:community-noreply@qnx.com] > Sent: Freitag, 10. August 2012 10:37 > To: ostech-core_os@community.qnx.com > Subject: Re: TimerTimeout() not getting timeout > > Hi Thomas, I think that's exactly what's happening. I had just been reading the about this in the documentation. I will try and create a new thread to handle this. > > I may be back for more advice. > > Thanks, > Fraser > > On 10/08/2012 09:25, Thomas Haupt wrote: >> The io_unblock callout will only be invoked when you get back to your resource manager's main loop (dispatch_block() / dispatch_handle()) somehow. >> >> If you are handling the devctl in some way such that the resource manager will still be in io_devctl() when the timeout comes, no unblock handling will be done. >> >> In order for unblocking to work properly, you need to somehow put "long" (potentially blocking) tasks into the "background" and return to the main message handler loop. That could mean doing them in a separate thread, or adding entries on an "outstanding tasks" list that you can look into when you see a state change (e.g., an interrupt signaling data coming in). >> >> Regards, >> Thomas >> >> -----Original Message----- >> From: Fraser Moore [mailto:community-noreply@qnx.com] >> Sent: Freitag, 10. August 2012 09:44 >> To: ostech-core_os@community.qnx.com >> Subject: Re: TimerTimeout() not getting timeout >> >> I tried defining my own io_unblock that simply calls iofunc_unblock_default(). However I never see this function getting called by the resource manager. I am new to writing resource managers so what should I be doing to handle unblocks? >> >> cheers, >> fraser >> >> On 09/08/2012 14:52, Lichun Zhu wrote: >>> I think this is it, the resmgr did not handle unblock. >>> >>> -----Original Message----- >>> From: Thomas Haupt [mailto:community-noreply@qnx.com] >>> Sent: Thursday, August 09, 2012 9:44 AM >>> To: 'ostech-core_os@community.qnx.com' >>> Subject: RE: TimerTimeout() not getting timeout >>> >>> Does it do proper unblock handling? >>> >>> -----Original Message----- >>> From: Fraser Moore [mailto:community-noreply@qnx.com] >>> Sent: Donnerstag, 9. August 2012 15:40 >>> To: ostech-core_os@community.qnx.com >>> Subject: Re: TimerTimeout() not getting timeout >>> >>> It is one that we have developed. >>> >>> On 09/08/2012 14:28, Thomas Haupt wrote: >>>> What resource manager is this devctl going to? >>>> >>>> - Thomas >>>> >>>> -----Original Message----- >>>> From: Fraser Moore [mailto:community-noreply@qnx.com] >>>> Sent: Donnerstag, 9. August 2012 15:27 >>>> To: ostech-core_os@community.qnx.com >>>> Subject: Re: TimerTimeout() not getting timeout >>>> >>>> Thanks for the reply. I had tried this but got the same results. >>>> >>>> On 09/08/2012 12:05, Gervais Mulongoy wrote: >>>>> Try setting an unblock event instead of NULL: >>>>> >>>>> SIGEV_UNBLOCK_INIT(&ev); >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> >>>>> OSTech >>>>> http://community.qnx.com/sf/go/post94710 >>>>> To cancel your subscription to this discussion, please e-mail >>>>> ostech-core_os-unsubscribe@community.qnx.com >>>>> >>>> >>>> -- >>>> Fraser Moore >>>> Abelon Systems Ltd >>>> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. >>>> phone: 0131 449 9173 web: www.abelon.com >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> >>>> OSTech >>>> http://community.qnx.com/sf/go/post94714 >>>> To cancel your subscription to this discussion, please e-mail >>>> ostech-core_os-unsubscribe@community.qnx.com >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> >>>> OSTech >>>> http://community.qnx.com/sf/go/post94715 >>>> To cancel your subscription to this discussion, please e-mail >>>> ostech-core_os-unsubscribe@community.qnx.com >>>> >>> >>> -- >>> Fraser Moore >>> Abelon Systems Ltd >>> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. >>> phone: 0131 449 9173 web: www.abelon.com >>> >>> >>> >>> >>> _______________________________________________ >>> >>> OSTech >>> http://community.qnx.com/sf/go/post94716 >>> To cancel your subscription to this discussion, please e-mail >>> ostech-core_os-unsubscribe@community.qnx.com >>> >>> >>> >>> >>> _______________________________________________ >>> >>> OSTech >>> http://community.qnx.com/sf/go/post94717 >>> To cancel your subscription to this discussion, please e-mail >>> ostech-core_os-unsubscribe@community.qnx.com >>> >>> >>> >>> >>> _______________________________________________ >>> >>> OSTech >>> http://community.qnx.com/sf/go/post94718 >>> To cancel your subscription to this discussion, please e-mail >>> ostech-core_os-unsubscribe@community.qnx.com >>> >> >> -- >> Fraser Moore >> Abelon Systems Ltd >> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. >> phone: 0131 449 9173 web: www.abelon.com >> >> >> >> >> _______________________________________________ >> >> OSTech >> http://community.qnx.com/sf/go/post94741 >> To cancel your subscription to this discussion, please e-mail >> ostech-core_os-unsubscribe@community.qnx.com >> >> >> >> >> _______________________________________________ >> >> OSTech >> http://community.qnx.com/sf/go/post94743 >> To cancel your subscription to this discussion, please e-mail >> ostech-core_os-unsubscribe@community.qnx.com >> > > -- > Fraser Moore > Abelon Systems Ltd > Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. > phone: 0131 449 9173 web: www.abelon.com > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94744 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94745 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com > -- Fraser Moore Abelon Systems Ltd Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. phone: 0131 449 9173 web: www.abelon.com Fri, 10 Aug 2012 14:43:38 GMT http://community.qnx.com/sf/go/post94751 Fraser Moore 2012-08-10T14:43:38Z post94752: RE: TimerTimeout() not getting timeout http://community.qnx.com/sf/go/post94752 Simplest way to is to MsgError(ctp->rcvid), which will unblock the client. It's then very important for your resource manager to keep track of the fact that it has already replied, and either abort the current operation, or simply skip over the MsgReply that happens when the devctl thread finishes. > -----Original Message----- > From: Fraser Moore [mailto:community-noreply@qnx.com] > Sent: August-10-12 10:39 AM > To: ostech-core_os@community.qnx.com > Subject: Re: TimerTimeout() not getting timeout > > I can now get io_unblock to be called from a separate thread but how do I > then reply to the client which is blocked on another thread to unblock it? > > cheers, > fraser > > On 10/08/2012 10:43, Thomas Haupt wrote: > > Hi Fraser, > > > > sure, feel free. > > > > Cheers, > > Thomas > > > > -----Original Message----- > > From: Fraser Moore [mailto:community-noreply@qnx.com] > > Sent: Freitag, 10. August 2012 10:37 > > To: ostech-core_os@community.qnx.com > > Subject: Re: TimerTimeout() not getting timeout > > > > Hi Thomas, I think that's exactly what's happening. I had just been reading > the about this in the documentation. I will try and create a new thread to > handle this. > > > > I may be back for more advice. > > > > Thanks, > > Fraser > > > > On 10/08/2012 09:25, Thomas Haupt wrote: > >> The io_unblock callout will only be invoked when you get back to your > resource manager's main loop (dispatch_block() / dispatch_handle()) > somehow. > >> > >> If you are handling the devctl in some way such that the resource > manager will still be in io_devctl() when the timeout comes, no unblock > handling will be done. > >> > >> In order for unblocking to work properly, you need to somehow put > "long" (potentially blocking) tasks into the "background" and return to the > main message handler loop. That could mean doing them in a separate > thread, or adding entries on an "outstanding tasks" list that you can look into > when you see a state change (e.g., an interrupt signaling data coming in). > >> > >> Regards, > >> Thomas > >> > >> -----Original Message----- > >> From: Fraser Moore [mailto:community-noreply@qnx.com] > >> Sent: Freitag, 10. August 2012 09:44 > >> To: ostech-core_os@community.qnx.com > >> Subject: Re: TimerTimeout() not getting timeout > >> > >> I tried defining my own io_unblock that simply calls > iofunc_unblock_default(). However I never see this function getting called > by the resource manager. I am new to writing resource managers so what > should I be doing to handle unblocks? > >> > >> cheers, > >> fraser > >> > >> On 09/08/2012 14:52, Lichun Zhu wrote: > >>> I think this is it, the resmgr did not handle unblock. > >>> > >>> -----Original Message----- > >>> From: Thomas Haupt [mailto:community-noreply@qnx.com] > >>> Sent: Thursday, August 09, 2012 9:44 AM > >>> To: 'ostech-core_os@community.qnx.com' > >>> Subject: RE: TimerTimeout() not getting timeout > >>> > >>> Does it do proper unblock handling? > >>> > >>> -----Original Message----- > >>> From: Fraser Moore [mailto:community-noreply@qnx.com] > >>> Sent: Donnerstag, 9. August 2012 15:40 > >>> To: ostech-core_os@community.qnx.com > >>> Subject: Re: TimerTimeout() not getting timeout > >>> > >>> It is one that we have developed. > >>> > >>> On 09/08/2012 14:28, Thomas Haupt wrote: > >>>> What resource manager is this devctl going to? > >>>> > >>>> - Thomas > >>>> > >>>> -----Original Message----- > >>>> From: Fraser Moore [mailto:community-noreply@qnx.com] > >>>> Sent: Donnerstag, 9. August 2012 15:27 > >>>> To: ostech-core_os@community.qnx.com > >>>> Subject: Re: TimerTimeout() not getting timeout > >>>> > >>>> Thanks for the reply. I had tried this but got the same results. > >>>> > >>>> On 09/08/2012 12:05, Gervais Mulongoy wrote: > >>>>> Try setting an unblock event instead of NULL: > >>>>> > >>>>> SIGEV_UNBLOCK_INIT(&ev); > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> _______________________________________________ > >>>>> > >>>>> OSTech > >>>>> http://community.qnx.com/sf/go/post94710 > >>>>> To cancel your subscription to this discussion, please e-mail > >>>>> ostech-core_os-unsubscribe@community.qnx.com > >>>>> > >>>> > >>>> -- > >>>> Fraser Moore > >>>> Abelon Systems Ltd > >>>> Building 4, Quantum Court, Research Avenue South, Heriot Watt > Research Park, Riccarton, Edinburgh EH14 4AP. > >>>> phone: 0131 449 9173 web: www.abelon.com > >>>> > >>>> > >>>> > >>>> > >>>> _______________________________________________ > >>>> > >>>> OSTech > >>>> http://community.qnx.com/sf/go/post94714 > >>>> To cancel your subscription to this discussion, please e-mail > >>>> ostech-core_os-unsubscribe@community.qnx.com > >>>> > >>>> > >>>> > >>>> > >>>> _______________________________________________ > >>>> > >>>> OSTech > >>>> http://community.qnx.com/sf/go/post94715 > >>>> To cancel your subscription to this discussion, please e-mail > >>>> ostech-core_os-unsubscribe@community.qnx.com > >>>> > >>> > >>> -- > >>> Fraser Moore > >>> Abelon Systems Ltd > >>> Building 4, Quantum Court, Research Avenue South, Heriot Watt > Research Park, Riccarton, Edinburgh EH14 4AP. > >>> phone: 0131 449 9173 web: www.abelon.com > >>> > >>> > >>> > >>> > >>> _______________________________________________ > >>> > >>> OSTech > >>> http://community.qnx.com/sf/go/post94716 > >>> To cancel your subscription to this discussion, please e-mail > >>> ostech-core_os-unsubscribe@community.qnx.com > >>> > >>> > >>> > >>> > >>> _______________________________________________ > >>> > >>> OSTech > >>> http://community.qnx.com/sf/go/post94717 > >>> To cancel your subscription to this discussion, please e-mail > >>> ostech-core_os-unsubscribe@community.qnx.com > >>> > >>> > >>> > >>> > >>> _______________________________________________ > >>> > >>> OSTech > >>> http://community.qnx.com/sf/go/post94718 > >>> To cancel your subscription to this discussion, please e-mail > >>> ostech-core_os-unsubscribe@community.qnx.com > >>> > >> > >> -- > >> Fraser Moore > >> Abelon Systems Ltd > >> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research > Park, Riccarton, Edinburgh EH14 4AP. > >> phone: 0131 449 9173 web: www.abelon.com > >> > >> > >> > >> > >> _______________________________________________ > >> > >> OSTech > >> http://community.qnx.com/sf/go/post94741 > >> To cancel your subscription to this discussion, please e-mail > >> ostech-core_os-unsubscribe@community.qnx.com > >> > >> > >> > >> > >> _______________________________________________ > >> > >> OSTech > >> http://community.qnx.com/sf/go/post94743 > >> To cancel your subscription to this discussion, please e-mail > >> ostech-core_os-unsubscribe@community.qnx.com > >> > > > > -- > > Fraser Moore > > Abelon Systems Ltd > > Building 4, Quantum Court, Research Avenue South, Heriot Watt Research > Park, Riccarton, Edinburgh EH14 4AP. > > phone: 0131 449 9173 web: www.abelon.com > > > > > > > > > > _______________________________________________ > > > > OSTech > > http://community.qnx.com/sf/go/post94744 > > To cancel your subscription to this discussion, please e-mail > > ostech-core_os-unsubscribe@community.qnx.com > > > > > > > > > > _______________________________________________ > > > > OSTech > > http://community.qnx.com/sf/go/post94745 > > To cancel your subscription to this discussion, please e-mail > > ostech-core_os-unsubscribe@community.qnx.com > > > > -- > Fraser Moore > Abelon Systems Ltd > Building 4, Quantum Court, Research Avenue South, Heriot Watt Research > Park, Riccarton, Edinburgh EH14 4AP. > phone: 0131 449 9173 web: www.abelon.com > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94751 > To cancel your subscription to this discussion, please e-mail ostech-core_os- > unsubscribe@community.qnx.com Fri, 10 Aug 2012 14:41:59 GMT http://community.qnx.com/sf/go/post94752 David Sarrazin 2012-08-10T14:41:59Z post94748: Re: TimerTimeout() not getting timeout http://community.qnx.com/sf/go/post94748 Hi, if you are using QNX6.5 in APIC mode, the interrupt of timer 0 will be routed to IRQ2 and IRQ0 isn't available. Checkout if there is a timer 0 interrupt at IRQ2 ... --Armin Fraser Moore wrote: > Hi Thomas, I think that's exactly what's happening. I had just been > reading the about this in the documentation. I will try and create a > new thread to handle this. > > I may be back for more advice. > > Thanks, > Fraser > > On 10/08/2012 09:25, Thomas Haupt wrote: >> The io_unblock callout will only be invoked when you get back to your resource manager's main loop (dispatch_block() / dispatch_handle()) somehow. >> >> If you are handling the devctl in some way such that the resource manager will still be in io_devctl() when the timeout comes, no unblock handling will be done. >> >> In order for unblocking to work properly, you need to somehow put "long" (potentially blocking) tasks into the "background" and return to the main message handler loop. That could mean doing them in a separate thread, or adding entries on an "outstanding tasks" list that you can look into when you see a state change (e.g., an interrupt signaling data coming in). >> >> Regards, >> Thomas >> >> -----Original Message----- >> From: Fraser Moore [mailto:community-noreply@qnx.com] >> Sent: Freitag, 10. August 2012 09:44 >> To: ostech-core_os@community.qnx.com >> Subject: Re: TimerTimeout() not getting timeout >> >> I tried defining my own io_unblock that simply calls iofunc_unblock_default(). However I never see this function getting called by the resource manager. I am new to writing resource managers so what should I be doing to handle unblocks? >> >> cheers, >> fraser >> >> On 09/08/2012 14:52, Lichun Zhu wrote: >>> I think this is it, the resmgr did not handle unblock. >>> >>> -----Original Message----- >>> From: Thomas Haupt [mailto:community-noreply@qnx.com] >>> Sent: Thursday, August 09, 2012 9:44 AM >>> To: 'ostech-core_os@community.qnx.com' >>> Subject: RE: TimerTimeout() not getting timeout >>> >>> Does it do proper unblock handling? >>> >>> -----Original Message----- >>> From: Fraser Moore [mailto:community-noreply@qnx.com] >>> Sent: Donnerstag, 9. August 2012 15:40 >>> To: ostech-core_os@community.qnx.com >>> Subject: Re: TimerTimeout() not getting timeout >>> >>> It is one that we have developed. >>> >>> On 09/08/2012 14:28, Thomas Haupt wrote: >>>> What resource manager is this devctl going to? >>>> >>>> - Thomas >>>> >>>> -----Original Message----- >>>> From: Fraser Moore [mailto:community-noreply@qnx.com] >>>> Sent: Donnerstag, 9. August 2012 15:27 >>>> To: ostech-core_os@community.qnx.com >>>> Subject: Re: TimerTimeout() not getting timeout >>>> >>>> Thanks for the reply. I had tried this but got the same results. >>>> >>>> On 09/08/2012 12:05, Gervais Mulongoy wrote: >>>>> Try setting an unblock event instead of NULL: >>>>> >>>>> SIGEV_UNBLOCK_INIT(&ev); >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> >>>>> OSTech >>>>> http://community.qnx.com/sf/go/post94710 >>>>> To cancel your subscription to this discussion, please e-mail >>>>> ostech-core_os-unsubscribe@community.qnx.com >>>>> >>>> -- >>>> Fraser Moore >>>> Abelon Systems Ltd >>>> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. >>>> phone: 0131 449 9173 web: www.abelon.com >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> >>>> OSTech >>>> http://community.qnx.com/sf/go/post94714 >>>> To cancel your subscription to this discussion, please e-mail >>>> ostech-core_os-unsubscribe@community.qnx.com >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> >>>> OSTech >>>> http://community.qnx.com/sf/go/post94715 >>>> To cancel your subscription to this discussion, please e-mail >>>> ostech-core_os-unsubscribe@community.qnx.com >>>> >>> -- >>> Fraser Moore >>> Abelon Systems Ltd >>> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. >>> phone: 0131 449 9173 web: www.abelon.com >>> >>> >>> >>> >>> _______________________________________________ >>> >>> OSTech >>> http://community.qnx.com/sf/go/post94716 >>> To cancel your subscription to this discussion, please e-mail >>> ostech-core_os-unsubscribe@community.qnx.com >>> >>> >>> >>> >>> _______________________________________________ >>> >>> OSTech >>> http://community.qnx.com/sf/go/post94717 >>> To cancel your subscription to this discussion, please e-mail >>> ostech-core_os-unsubscribe@community.qnx.com >>> >>> >>> >>> >>> _______________________________________________ >>> >>> OSTech >>> http://community.qnx.com/sf/go/post94718 >>> To cancel your subscription to this discussion, please e-mail >>> ostech-core_os-unsubscribe@community.qnx.com >>> >> -- >> Fraser Moore >> Abelon Systems Ltd >> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. >> phone: 0131 449 9173 web: www.abelon.com >> >> >> >> >> _______________________________________________ >> >> OSTech >> http://community.qnx.com/sf/go/post94741 >> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com >> >> >> >> >> _______________________________________________ >> >> OSTech >> http://community.qnx.com/sf/go/post94743 >> To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com >> Fri, 10 Aug 2012 11:29:10 GMT http://community.qnx.com/sf/go/post94748 Armin Steinhoff 2012-08-10T11:29:10Z post94745: RE: TimerTimeout() not getting timeout http://community.qnx.com/sf/go/post94745 Hi Fraser, sure, feel free. Cheers, Thomas -----Original Message----- From: Fraser Moore [mailto:community-noreply@qnx.com] Sent: Freitag, 10. August 2012 10:37 To: ostech-core_os@community.qnx.com Subject: Re: TimerTimeout() not getting timeout Hi Thomas, I think that's exactly what's happening. I had just been reading the about this in the documentation. I will try and create a new thread to handle this. I may be back for more advice. Thanks, Fraser On 10/08/2012 09:25, Thomas Haupt wrote: > The io_unblock callout will only be invoked when you get back to your resource manager's main loop (dispatch_block() / dispatch_handle()) somehow. > > If you are handling the devctl in some way such that the resource manager will still be in io_devctl() when the timeout comes, no unblock handling will be done. > > In order for unblocking to work properly, you need to somehow put "long" (potentially blocking) tasks into the "background" and return to the main message handler loop. That could mean doing them in a separate thread, or adding entries on an "outstanding tasks" list that you can look into when you see a state change (e.g., an interrupt signaling data coming in). > > Regards, > Thomas > > -----Original Message----- > From: Fraser Moore [mailto:community-noreply@qnx.com] > Sent: Freitag, 10. August 2012 09:44 > To: ostech-core_os@community.qnx.com > Subject: Re: TimerTimeout() not getting timeout > > I tried defining my own io_unblock that simply calls iofunc_unblock_default(). However I never see this function getting called by the resource manager. I am new to writing resource managers so what should I be doing to handle unblocks? > > cheers, > fraser > > On 09/08/2012 14:52, Lichun Zhu wrote: >> I think this is it, the resmgr did not handle unblock. >> >> -----Original Message----- >> From: Thomas Haupt [mailto:community-noreply@qnx.com] >> Sent: Thursday, August 09, 2012 9:44 AM >> To: 'ostech-core_os@community.qnx.com' >> Subject: RE: TimerTimeout() not getting timeout >> >> Does it do proper unblock handling? >> >> -----Original Message----- >> From: Fraser Moore [mailto:community-noreply@qnx.com] >> Sent: Donnerstag, 9. August 2012 15:40 >> To: ostech-core_os@community.qnx.com >> Subject: Re: TimerTimeout() not getting timeout >> >> It is one that we have developed. >> >> On 09/08/2012 14:28, Thomas Haupt wrote: >>> What resource manager is this devctl going to? >>> >>> - Thomas >>> >>> -----Original Message----- >>> From: Fraser Moore [mailto:community-noreply@qnx.com] >>> Sent: Donnerstag, 9. August 2012 15:27 >>> To: ostech-core_os@community.qnx.com >>> Subject: Re: TimerTimeout() not getting timeout >>> >>> Thanks for the reply. I had tried this but got the same results. >>> >>> On 09/08/2012 12:05, Gervais Mulongoy wrote: >>>> Try setting an unblock event instead of NULL: >>>> >>>> SIGEV_UNBLOCK_INIT(&ev); >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> >>>> OSTech >>>> http://community.qnx.com/sf/go/post94710 >>>> To cancel your subscription to this discussion, please e-mail >>>> ostech-core_os-unsubscribe@community.qnx.com >>>> >>> >>> -- >>> Fraser Moore >>> Abelon Systems Ltd >>> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. >>> phone: 0131 449 9173 web: www.abelon.com >>> >>> >>> >>> >>> _______________________________________________ >>> >>> OSTech >>> http://community.qnx.com/sf/go/post94714 >>> To cancel your subscription to this discussion, please e-mail >>> ostech-core_os-unsubscribe@community.qnx.com >>> >>> >>> >>> >>> _______________________________________________ >>> >>> OSTech >>> http://community.qnx.com/sf/go/post94715 >>> To cancel your subscription to this discussion, please e-mail >>> ostech-core_os-unsubscribe@community.qnx.com >>> >> >> -- >> Fraser Moore >> Abelon Systems Ltd >> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. >> phone: 0131 449 9173 web: www.abelon.com >> >> >> >> >> _______________________________________________ >> >> OSTech >> http://community.qnx.com/sf/go/post94716 >> To cancel your subscription to this discussion, please e-mail >> ostech-core_os-unsubscribe@community.qnx.com >> >> >> >> >> _______________________________________________ >> >> OSTech >> http://community.qnx.com/sf/go/post94717 >> To cancel your subscription to this discussion, please e-mail >> ostech-core_os-unsubscribe@community.qnx.com >> >> >> >> >> _______________________________________________ >> >> OSTech >> http://community.qnx.com/sf/go/post94718 >> To cancel your subscription to this discussion, please e-mail >> ostech-core_os-unsubscribe@community.qnx.com >> > > -- > Fraser Moore > Abelon Systems Ltd > Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. > phone: 0131 449 9173 web: www.abelon.com > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94741 > To cancel your subscription to this discussion, please e-mail > ostech-core_os-unsubscribe@community.qnx.com > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94743 > To cancel your subscription to this discussion, please e-mail > ostech-core_os-unsubscribe@community.qnx.com > -- Fraser Moore Abelon Systems Ltd Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. phone: 0131 449 9173 web: www.abelon.com _______________________________________________ OSTech http://community.qnx.com/sf/go/post94744 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Fri, 10 Aug 2012 09:43:53 GMT http://community.qnx.com/sf/go/post94745 Thomas Haupt 2012-08-10T09:43:53Z post94744: Re: TimerTimeout() not getting timeout http://community.qnx.com/sf/go/post94744 Hi Thomas, I think that's exactly what's happening. I had just been reading the about this in the documentation. I will try and create a new thread to handle this. I may be back for more advice. Thanks, Fraser On 10/08/2012 09:25, Thomas Haupt wrote: > The io_unblock callout will only be invoked when you get back to your resource manager's main loop (dispatch_block() / dispatch_handle()) somehow. > > If you are handling the devctl in some way such that the resource manager will still be in io_devctl() when the timeout comes, no unblock handling will be done. > > In order for unblocking to work properly, you need to somehow put "long" (potentially blocking) tasks into the "background" and return to the main message handler loop. That could mean doing them in a separate thread, or adding entries on an "outstanding tasks" list that you can look into when you see a state change (e.g., an interrupt signaling data coming in). > > Regards, > Thomas > > -----Original Message----- > From: Fraser Moore [mailto:community-noreply@qnx.com] > Sent: Freitag, 10. August 2012 09:44 > To: ostech-core_os@community.qnx.com > Subject: Re: TimerTimeout() not getting timeout > > I tried defining my own io_unblock that simply calls iofunc_unblock_default(). However I never see this function getting called by the resource manager. I am new to writing resource managers so what should I be doing to handle unblocks? > > cheers, > fraser > > On 09/08/2012 14:52, Lichun Zhu wrote: >> I think this is it, the resmgr did not handle unblock. >> >> -----Original Message----- >> From: Thomas Haupt [mailto:community-noreply@qnx.com] >> Sent: Thursday, August 09, 2012 9:44 AM >> To: 'ostech-core_os@community.qnx.com' >> Subject: RE: TimerTimeout() not getting timeout >> >> Does it do proper unblock handling? >> >> -----Original Message----- >> From: Fraser Moore [mailto:community-noreply@qnx.com] >> Sent: Donnerstag, 9. August 2012 15:40 >> To: ostech-core_os@community.qnx.com >> Subject: Re: TimerTimeout() not getting timeout >> >> It is one that we have developed. >> >> On 09/08/2012 14:28, Thomas Haupt wrote: >>> What resource manager is this devctl going to? >>> >>> - Thomas >>> >>> -----Original Message----- >>> From: Fraser Moore [mailto:community-noreply@qnx.com] >>> Sent: Donnerstag, 9. August 2012 15:27 >>> To: ostech-core_os@community.qnx.com >>> Subject: Re: TimerTimeout() not getting timeout >>> >>> Thanks for the reply. I had tried this but got the same results. >>> >>> On 09/08/2012 12:05, Gervais Mulongoy wrote: >>>> Try setting an unblock event instead of NULL: >>>> >>>> SIGEV_UNBLOCK_INIT(&ev); >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> >>>> OSTech >>>> http://community.qnx.com/sf/go/post94710 >>>> To cancel your subscription to this discussion, please e-mail >>>> ostech-core_os-unsubscribe@community.qnx.com >>>> >>> >>> -- >>> Fraser Moore >>> Abelon Systems Ltd >>> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. >>> phone: 0131 449 9173 web: www.abelon.com >>> >>> >>> >>> >>> _______________________________________________ >>> >>> OSTech >>> http://community.qnx.com/sf/go/post94714 >>> To cancel your subscription to this discussion, please e-mail >>> ostech-core_os-unsubscribe@community.qnx.com >>> >>> >>> >>> >>> _______________________________________________ >>> >>> OSTech >>> http://community.qnx.com/sf/go/post94715 >>> To cancel your subscription to this discussion, please e-mail >>> ostech-core_os-unsubscribe@community.qnx.com >>> >> >> -- >> Fraser Moore >> Abelon Systems Ltd >> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. >> phone: 0131 449 9173 web: www.abelon.com >> >> >> >> >> _______________________________________________ >> >> OSTech >> http://community.qnx.com/sf/go/post94716 >> To cancel your subscription to this discussion, please e-mail >> ostech-core_os-unsubscribe@community.qnx.com >> >> >> >> >> _______________________________________________ >> >> OSTech >> http://community.qnx.com/sf/go/post94717 >> To cancel your subscription to this discussion, please e-mail >> ostech-core_os-unsubscribe@community.qnx.com >> >> >> >> >> _______________________________________________ >> >> OSTech >> http://community.qnx.com/sf/go/post94718 >> To cancel your subscription to this discussion, please e-mail >> ostech-core_os-unsubscribe@community.qnx.com >> > > -- > Fraser Moore > Abelon Systems Ltd > Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. > phone: 0131 449 9173 web: www.abelon.com > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94741 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94743 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com > -- Fraser Moore Abelon Systems Ltd Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. phone: 0131 449 9173 web: www.abelon.com Fri, 10 Aug 2012 08:39:38 GMT http://community.qnx.com/sf/go/post94744 Fraser Moore 2012-08-10T08:39:38Z post94743: RE: TimerTimeout() not getting timeout http://community.qnx.com/sf/go/post94743 The io_unblock callout will only be invoked when you get back to your resource manager's main loop (dispatch_block() / dispatch_handle()) somehow. If you are handling the devctl in some way such that the resource manager will still be in io_devctl() when the timeout comes, no unblock handling will be done. In order for unblocking to work properly, you need to somehow put "long" (potentially blocking) tasks into the "background" and return to the main message handler loop. That could mean doing them in a separate thread, or adding entries on an "outstanding tasks" list that you can look into when you see a state change (e.g., an interrupt signaling data coming in). Regards, Thomas -----Original Message----- From: Fraser Moore [mailto:community-noreply@qnx.com] Sent: Freitag, 10. August 2012 09:44 To: ostech-core_os@community.qnx.com Subject: Re: TimerTimeout() not getting timeout I tried defining my own io_unblock that simply calls iofunc_unblock_default(). However I never see this function getting called by the resource manager. I am new to writing resource managers so what should I be doing to handle unblocks? cheers, fraser On 09/08/2012 14:52, Lichun Zhu wrote: > I think this is it, the resmgr did not handle unblock. > > -----Original Message----- > From: Thomas Haupt [mailto:community-noreply@qnx.com] > Sent: Thursday, August 09, 2012 9:44 AM > To: 'ostech-core_os@community.qnx.com' > Subject: RE: TimerTimeout() not getting timeout > > Does it do proper unblock handling? > > -----Original Message----- > From: Fraser Moore [mailto:community-noreply@qnx.com] > Sent: Donnerstag, 9. August 2012 15:40 > To: ostech-core_os@community.qnx.com > Subject: Re: TimerTimeout() not getting timeout > > It is one that we have developed. > > On 09/08/2012 14:28, Thomas Haupt wrote: >> What resource manager is this devctl going to? >> >> - Thomas >> >> -----Original Message----- >> From: Fraser Moore [mailto:community-noreply@qnx.com] >> Sent: Donnerstag, 9. August 2012 15:27 >> To: ostech-core_os@community.qnx.com >> Subject: Re: TimerTimeout() not getting timeout >> >> Thanks for the reply. I had tried this but got the same results. >> >> On 09/08/2012 12:05, Gervais Mulongoy wrote: >>> Try setting an unblock event instead of NULL: >>> >>> SIGEV_UNBLOCK_INIT(&ev); >>> >>> >>> >>> >>> _______________________________________________ >>> >>> OSTech >>> http://community.qnx.com/sf/go/post94710 >>> To cancel your subscription to this discussion, please e-mail >>> ostech-core_os-unsubscribe@community.qnx.com >>> >> >> -- >> Fraser Moore >> Abelon Systems Ltd >> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. >> phone: 0131 449 9173 web: www.abelon.com >> >> >> >> >> _______________________________________________ >> >> OSTech >> http://community.qnx.com/sf/go/post94714 >> To cancel your subscription to this discussion, please e-mail >> ostech-core_os-unsubscribe@community.qnx.com >> >> >> >> >> _______________________________________________ >> >> OSTech >> http://community.qnx.com/sf/go/post94715 >> To cancel your subscription to this discussion, please e-mail >> ostech-core_os-unsubscribe@community.qnx.com >> > > -- > Fraser Moore > Abelon Systems Ltd > Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. > phone: 0131 449 9173 web: www.abelon.com > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94716 > To cancel your subscription to this discussion, please e-mail > ostech-core_os-unsubscribe@community.qnx.com > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94717 > To cancel your subscription to this discussion, please e-mail > ostech-core_os-unsubscribe@community.qnx.com > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94718 > To cancel your subscription to this discussion, please e-mail > ostech-core_os-unsubscribe@community.qnx.com > -- Fraser Moore Abelon Systems Ltd Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. phone: 0131 449 9173 web: www.abelon.com _______________________________________________ OSTech http://community.qnx.com/sf/go/post94741 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Fri, 10 Aug 2012 08:29:55 GMT http://community.qnx.com/sf/go/post94743 Thomas Haupt 2012-08-10T08:29:55Z post94741: Re: TimerTimeout() not getting timeout http://community.qnx.com/sf/go/post94741 I tried defining my own io_unblock that simply calls iofunc_unblock_default(). However I never see this function getting called by the resource manager. I am new to writing resource managers so what should I be doing to handle unblocks? cheers, fraser On 09/08/2012 14:52, Lichun Zhu wrote: > I think this is it, the resmgr did not handle unblock. > > -----Original Message----- > From: Thomas Haupt [mailto:community-noreply@qnx.com] > Sent: Thursday, August 09, 2012 9:44 AM > To: 'ostech-core_os@community.qnx.com' > Subject: RE: TimerTimeout() not getting timeout > > Does it do proper unblock handling? > > -----Original Message----- > From: Fraser Moore [mailto:community-noreply@qnx.com] > Sent: Donnerstag, 9. August 2012 15:40 > To: ostech-core_os@community.qnx.com > Subject: Re: TimerTimeout() not getting timeout > > It is one that we have developed. > > On 09/08/2012 14:28, Thomas Haupt wrote: >> What resource manager is this devctl going to? >> >> - Thomas >> >> -----Original Message----- >> From: Fraser Moore [mailto:community-noreply@qnx.com] >> Sent: Donnerstag, 9. August 2012 15:27 >> To: ostech-core_os@community.qnx.com >> Subject: Re: TimerTimeout() not getting timeout >> >> Thanks for the reply. I had tried this but got the same results. >> >> On 09/08/2012 12:05, Gervais Mulongoy wrote: >>> Try setting an unblock event instead of NULL: >>> >>> SIGEV_UNBLOCK_INIT(&ev); >>> >>> >>> >>> >>> _______________________________________________ >>> >>> OSTech >>> http://community.qnx.com/sf/go/post94710 >>> To cancel your subscription to this discussion, please e-mail >>> ostech-core_os-unsubscribe@community.qnx.com >>> >> >> -- >> Fraser Moore >> Abelon Systems Ltd >> Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. >> phone: 0131 449 9173 web: www.abelon.com >> >> >> >> >> _______________________________________________ >> >> OSTech >> http://community.qnx.com/sf/go/post94714 >> To cancel your subscription to this discussion, please e-mail >> ostech-core_os-unsubscribe@community.qnx.com >> >> >> >> >> _______________________________________________ >> >> OSTech >> http://community.qnx.com/sf/go/post94715 >> To cancel your subscription to this discussion, please e-mail >> ostech-core_os-unsubscribe@community.qnx.com >> > > -- > Fraser Moore > Abelon Systems Ltd > Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. > phone: 0131 449 9173 web: www.abelon.com > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94716 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94717 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94718 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com > -- Fraser Moore Abelon Systems Ltd Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. phone: 0131 449 9173 web: www.abelon.com Fri, 10 Aug 2012 07:47:27 GMT http://community.qnx.com/sf/go/post94741 Fraser Moore 2012-08-10T07:47:27Z post94718: RE: TimerTimeout() not getting timeout http://community.qnx.com/sf/go/post94718 I think this is it, the resmgr did not handle unblock. -----Original Message----- From: Thomas Haupt [mailto:community-noreply@qnx.com] Sent: Thursday, August 09, 2012 9:44 AM To: 'ostech-core_os@community.qnx.com' Subject: RE: TimerTimeout() not getting timeout Does it do proper unblock handling? -----Original Message----- From: Fraser Moore [mailto:community-noreply@qnx.com] Sent: Donnerstag, 9. August 2012 15:40 To: ostech-core_os@community.qnx.com Subject: Re: TimerTimeout() not getting timeout It is one that we have developed. On 09/08/2012 14:28, Thomas Haupt wrote: > What resource manager is this devctl going to? > > - Thomas > > -----Original Message----- > From: Fraser Moore [mailto:community-noreply@qnx.com] > Sent: Donnerstag, 9. August 2012 15:27 > To: ostech-core_os@community.qnx.com > Subject: Re: TimerTimeout() not getting timeout > > Thanks for the reply. I had tried this but got the same results. > > On 09/08/2012 12:05, Gervais Mulongoy wrote: >> Try setting an unblock event instead of NULL: >> >> SIGEV_UNBLOCK_INIT(&ev); >> >> >> >> >> _______________________________________________ >> >> OSTech >> http://community.qnx.com/sf/go/post94710 >> To cancel your subscription to this discussion, please e-mail >> ostech-core_os-unsubscribe@community.qnx.com >> > > -- > Fraser Moore > Abelon Systems Ltd > Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. > phone: 0131 449 9173 web: www.abelon.com > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94714 > To cancel your subscription to this discussion, please e-mail > ostech-core_os-unsubscribe@community.qnx.com > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94715 > To cancel your subscription to this discussion, please e-mail > ostech-core_os-unsubscribe@community.qnx.com > -- Fraser Moore Abelon Systems Ltd Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. phone: 0131 449 9173 web: www.abelon.com _______________________________________________ OSTech http://community.qnx.com/sf/go/post94716 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com _______________________________________________ OSTech http://community.qnx.com/sf/go/post94717 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 09 Aug 2012 13:55:50 GMT http://community.qnx.com/sf/go/post94718 Lichun Zhu 2012-08-09T13:55:50Z post94717: RE: TimerTimeout() not getting timeout http://community.qnx.com/sf/go/post94717 Does it do proper unblock handling? -----Original Message----- From: Fraser Moore [mailto:community-noreply@qnx.com] Sent: Donnerstag, 9. August 2012 15:40 To: ostech-core_os@community.qnx.com Subject: Re: TimerTimeout() not getting timeout It is one that we have developed. On 09/08/2012 14:28, Thomas Haupt wrote: > What resource manager is this devctl going to? > > - Thomas > > -----Original Message----- > From: Fraser Moore [mailto:community-noreply@qnx.com] > Sent: Donnerstag, 9. August 2012 15:27 > To: ostech-core_os@community.qnx.com > Subject: Re: TimerTimeout() not getting timeout > > Thanks for the reply. I had tried this but got the same results. > > On 09/08/2012 12:05, Gervais Mulongoy wrote: >> Try setting an unblock event instead of NULL: >> >> SIGEV_UNBLOCK_INIT(&ev); >> >> >> >> >> _______________________________________________ >> >> OSTech >> http://community.qnx.com/sf/go/post94710 >> To cancel your subscription to this discussion, please e-mail >> ostech-core_os-unsubscribe@community.qnx.com >> > > -- > Fraser Moore > Abelon Systems Ltd > Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. > phone: 0131 449 9173 web: www.abelon.com > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94714 > To cancel your subscription to this discussion, please e-mail > ostech-core_os-unsubscribe@community.qnx.com > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94715 > To cancel your subscription to this discussion, please e-mail > ostech-core_os-unsubscribe@community.qnx.com > -- Fraser Moore Abelon Systems Ltd Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. phone: 0131 449 9173 web: www.abelon.com _______________________________________________ OSTech http://community.qnx.com/sf/go/post94716 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 09 Aug 2012 13:47:15 GMT http://community.qnx.com/sf/go/post94717 Thomas Haupt 2012-08-09T13:47:15Z post94716: Re: TimerTimeout() not getting timeout http://community.qnx.com/sf/go/post94716 It is one that we have developed. On 09/08/2012 14:28, Thomas Haupt wrote: > What resource manager is this devctl going to? > > - Thomas > > -----Original Message----- > From: Fraser Moore [mailto:community-noreply@qnx.com] > Sent: Donnerstag, 9. August 2012 15:27 > To: ostech-core_os@community.qnx.com > Subject: Re: TimerTimeout() not getting timeout > > Thanks for the reply. I had tried this but got the same results. > > On 09/08/2012 12:05, Gervais Mulongoy wrote: >> Try setting an unblock event instead of NULL: >> >> SIGEV_UNBLOCK_INIT(&ev); >> >> >> >> >> _______________________________________________ >> >> OSTech >> http://community.qnx.com/sf/go/post94710 >> To cancel your subscription to this discussion, please e-mail >> ostech-core_os-unsubscribe@community.qnx.com >> > > -- > Fraser Moore > Abelon Systems Ltd > Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. > phone: 0131 449 9173 web: www.abelon.com > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94714 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94715 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com > -- Fraser Moore Abelon Systems Ltd Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. phone: 0131 449 9173 web: www.abelon.com Thu, 09 Aug 2012 13:42:17 GMT http://community.qnx.com/sf/go/post94716 Fraser Moore 2012-08-09T13:42:17Z post94714: Re: TimerTimeout() not getting timeout http://community.qnx.com/sf/go/post94714 Thanks for the reply. I had tried this but got the same results. On 09/08/2012 12:05, Gervais Mulongoy wrote: > Try setting an unblock event instead of NULL: > > SIGEV_UNBLOCK_INIT(&ev); > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94710 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com > -- Fraser Moore Abelon Systems Ltd Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. phone: 0131 449 9173 web: www.abelon.com Thu, 09 Aug 2012 13:30:16 GMT http://community.qnx.com/sf/go/post94714 Fraser Moore 2012-08-09T13:30:16Z post94715: RE: TimerTimeout() not getting timeout http://community.qnx.com/sf/go/post94715 What resource manager is this devctl going to? - Thomas -----Original Message----- From: Fraser Moore [mailto:community-noreply@qnx.com] Sent: Donnerstag, 9. August 2012 15:27 To: ostech-core_os@community.qnx.com Subject: Re: TimerTimeout() not getting timeout Thanks for the reply. I had tried this but got the same results. On 09/08/2012 12:05, Gervais Mulongoy wrote: > Try setting an unblock event instead of NULL: > > SIGEV_UNBLOCK_INIT(&ev); > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94710 > To cancel your subscription to this discussion, please e-mail > ostech-core_os-unsubscribe@community.qnx.com > -- Fraser Moore Abelon Systems Ltd Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. phone: 0131 449 9173 web: www.abelon.com _______________________________________________ OSTech http://community.qnx.com/sf/go/post94714 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 09 Aug 2012 13:29:17 GMT http://community.qnx.com/sf/go/post94715 Thomas Haupt 2012-08-09T13:29:17Z post94710: Re: TimerTimeout() not getting timeout http://community.qnx.com/sf/go/post94710 Try setting an unblock event instead of NULL: SIGEV_UNBLOCK_INIT(&ev); Thu, 09 Aug 2012 11:07:22 GMT http://community.qnx.com/sf/go/post94710 Gervais Mulongoy 2012-08-09T11:07:22Z post94708: TimerTimeout() not getting timeout http://community.qnx.com/sf/go/post94708 Hi, I'm trying to use TimerTimeout() to check for timeouts before calling devctl(), i.e. timeout = 1000000000; ret = TimerTimeout( CLOCK_REALTIME, _NTO_TIMEOUT_SEND | _NTO_TIMEOUT_REPLY, NULL, &timeout, NULL); ret = devctl( fd, dcmd, ipcMsg, IPC_MESSAGE_SIZE( ipcMsg->dataLength ), NULL); If I set timeout to 0 then I always get a timeout with devctl() returning ETIMEDOUT as expected. But if I set it to any other non-zero value then I never get the timeout event. I'm building for the x86 platform and running it on a VMWare VM. I'm not sure if I'm doing something wrong, or there is an issue with the timeouts on this platform. Any help much appreciated. Fraser -- Fraser Moore Abelon Systems Ltd Building 4, Quantum Court, Research Avenue South, Heriot Watt Research Park, Riccarton, Edinburgh EH14 4AP. phone: 0131 449 9173 web: www.abelon.com Thu, 09 Aug 2012 08:27:10 GMT http://community.qnx.com/sf/go/post94708 Fraser Moore 2012-08-09T08:27:10Z post94668: QNX 6.5 OCB Extension Bug http://community.qnx.com/sf/go/post94668 Hello, I would like to know if anyone tried and was succesfull extending OCB's on the 6.5 version. I believe that there is a bug allocating the extended OCB memory. The code compiles and executes, however the RM is not accessible even thou it is listed under devices. On older versions of the OS the code works perfectly. If I comment the line where we overwrite the mount.funcs structure (mount.funcs=&mount_funcs; in the attached code) the RM works but it may crash sometime since the memory is not allocated corrected. I am attaching the following code that shows the problem if anyone is interested in trying to fix it. It is a simple server/client application where the cliente registers its name on the server extended OCB, and on every write() call the cliente sends the server prints the client name. Anyone has any ideas how to work-around this bug? Thanks, Dante Tezza ps: when running the client, the desired name should be passed as an argument Tue, 07 Aug 2012 11:55:52 GMT http://community.qnx.com/sf/go/post94668 Dante Tezza 2012-08-07T11:55:52Z post94571: posix_spawnp diffifculties with file actions http://community.qnx.com/sf/go/post94571 I'm currently using posix_spawnp() to create child processes. I'm using posix_spawnp() instead of soawn() because I need the ability to start the child process with a specified uid:gid that is not the same as the parent process. I also want to "redirect" or open a specific file to rep[lace stdin, stdout, & stderr in the child process. Anybody out there an 'expert' on posix_spawn ? The code below doesn't seem to work for the file replacement. The following is a snipit of code [left out error handling] that I'm am using that is not working for the file portion. The function is called simple_spawn(), parameters are the path/file of the process to spawn, and a pointer to a argv[] type of array. simpleSpawn( char *file, char **argv ) { int rtn; pid_t childPid = -1; char * replFileName = "/var/log/mylog.txt"; posix_spawnattr_t spawnAttrib; posix_spawn_file_actions_t spawnFileActions; // init & setup attrib object posix_spawnattr_init( &spawnAttrib ); posix_spawnattr_setxflags( &spawnAttrib, POSIX_SPAWN_SETCRED ); posix_spawnattr_setcred( &spawnAttrib, 0, 0 ); // init & setup file actions object posix_spawn_file_actions_init( &spawnFileActions ); // replace stdin posix_spawn_file_actions_addopen( &spawnFileActions, 0, replFileName, O_RDWR | O_CREAT | O_APPEND, 0600 ) // replace stdout posix_spawn_file_actions_addopen( &spawnFileActions, 1, replFileName, O_RDWR | O_CREAT | O_APPEND, 0600 ) // replace stderr posix_spawn_file_actions_addopen( &spawnFileActions, 2, replFileName, O_RDWR | O_CREAT | O_APPEND, 0600 ) // spawn the child posix_spawnp( &childPid, file, &spawnFileActions, &spawnAttrib, argv, NULL ) return childPid; } Wed, 01 Aug 2012 18:13:27 GMT http://community.qnx.com/sf/go/post94571 Jim Crites 2012-08-01T18:13:27Z post94560: Re: devc-ser8250 driver http://community.qnx.com/sf/go/post94560 This was a problem with the pre-release versions of SP1 but was addressed before SP1 released. The issue was the installer did not rebuild and copy new ifs images into the /.boot directory. If you installed a pre-release version of SP1, I would suggest uninstall 6.5.0 and re-installing 6.5.0 and then SP1. If you did use a released version of SP1 and still ended up with older IFS images in your /.boot directory, then we should be looking at how that happened and PR it. You can also rebuild your ifs images and copy them into your /.boot directory. - Dave Wed, 01 Aug 2012 13:18:32 GMT http://community.qnx.com/sf/go/post94560 Dave Nickerson 2012-08-01T13:18:32Z post94550: Re: QNX6.5.0 SP1 problem with posix_memalign. http://community.qnx.com/sf/go/post94550 Adam thanks. It works very well. bogdan Wed, 01 Aug 2012 06:59:47 GMT http://community.qnx.com/sf/go/post94550 bogdan celer 2012-08-01T06:59:47Z post94549: IRQ bound http://community.qnx.com/sf/go/post94549 Hi all Can qnx support IRQ bound to a core in ARM cortex A9 2cores smp enviroment ? thanks Wed, 01 Aug 2012 02:09:57 GMT http://community.qnx.com/sf/go/post94549 Xiongwei Huang 2012-08-01T02:09:57Z post94520: Re: QNX6.5.0 SP1 problem with posix_memalign. http://community.qnx.com/sf/go/post94520 Thanks for the report, it's been addressed and if you have a priority support plan you can request a hotfix using reference #179337. In the meantime you can work around the issue by setting your bin sizes as such: MALLOC_BAND_CONFIG_STR="8:16,32,0:24,32,0:32,32,0:48,24,0:64,24,0:80,24,0:9 6,16,0:128,8,0" And exporting that environment variable or setting the same parameters via mallopt(). -- Adam Mallory (amallory@qnx.com) On 12-07-14 5:59 AM, "bogdan celer" <community-noreply@qnx.com> wrote: >In QNX6. 5.0SP1 appears mistake in posix_memalign. >Test program ># cat Test.c >#include <stdlib.h> >int main(int argc, char **argv) >{ > void *ptr = 0; > posix_memalign(&ptr, 16, 16 - 2 * sizeof (void*)); > posix_memalign(&ptr, 32, 32 - 2 * sizeof (void*)); > posix_memalign(&ptr, 64, 64 - 2 * sizeof (void*)); > posix_memalign(&ptr, 128, 128 - 2 * sizeof (void*)); > return (0); >} ># gcc -g -o Test Test.c > >After starting - ./Test the program is standing in the STATE = RUNNIG >state. >This state is caused by: >posix_memalign(&ptr, 128, 128 - 2 * sizeof (void*)); ># gdb Test >GNU gdb 6.8 qnx-nto (rev. 506) >Copyright (C) 2008 Free Software Foundation, Inc. >License GPLv3+: GNU GPL version 3 or later ><http://gnu.org/licenses/gpl.html> >This is free software: you are free to change and redistribute it. >There is NO WARRANTY, to the extent permitted by law. Type "show copying" >and "show warranty" for details. >This GDB was configured as "i486-pc-nto-qnx6.5.0"... >(gdb) start >Temporary breakpoint 1 at 0x8048699: file Test.c, line 4. >Starting program: /root/Test0 >[New pid 2007084 tid 1] > >Temporary breakpoint 1, main (argc=1, argv=0x8047a04) at Test.c:4 >4 void *ptr = 0; >(gdb) n >5 posix_memalign(&ptr, 16, 16 - 2 * sizeof (void*)); >(gdb) >6 posix_memalign(&ptr, 32, 32 - 2 * sizeof (void*)); >(gdb) >7 posix_memalign(&ptr, 64, 64 - 2 * sizeof (void*)); >(gdb) >8 posix_memalign(&ptr, 128, 128 - 2 * sizeof (void*)); >(gdb) <= and the program is standing in this place in the RUNNIG >state > <= After the interrupt - Ctrl C >Program received signal SIGINT, Interrupt. >0xb032799f in _band_get_aligned () from >/usr/qnx650/target/qnx6/x86/lib/libc.so.3 >(gdb) q >The program is running. Exit anyway? (y or n) y ># > >I think that the problem lies in the function _band_get_aligned from >libc. > > > > > > >_______________________________________________ > >OSTech >http://community.qnx.com/sf/go/post94257 >To cancel your subscription to this discussion, please e-mail >ostech-core_os-unsubscribe@community.qnx.com Mon, 30 Jul 2012 17:57:40 GMT http://community.qnx.com/sf/go/post94520 Adam Mallory 2012-07-30T17:57:40Z post94257: QNX6.5.0 SP1 problem with posix_memalign. http://community.qnx.com/sf/go/post94257 In QNX6. 5.0SP1 appears mistake in posix_memalign. Test program # cat Test.c #include <stdlib.h> int main(int argc, char **argv) { void *ptr = 0; posix_memalign(&ptr, 16, 16 - 2 * sizeof (void*)); posix_memalign(&ptr, 32, 32 - 2 * sizeof (void*)); posix_memalign(&ptr, 64, 64 - 2 * sizeof (void*)); posix_memalign(&ptr, 128, 128 - 2 * sizeof (void*)); return (0); } # gcc -g -o Test Test.c After starting - ./Test the program is standing in the STATE = RUNNIG state. This state is caused by: posix_memalign(&ptr, 128, 128 - 2 * sizeof (void*)); # gdb Test GNU gdb 6.8 qnx-nto (rev. 506) Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-pc-nto-qnx6.5.0"... (gdb) start Temporary breakpoint 1 at 0x8048699: file Test.c, line 4. Starting program: /root/Test0 [New pid 2007084 tid 1] Temporary breakpoint 1, main (argc=1, argv=0x8047a04) at Test.c:4 4 void *ptr = 0; (gdb) n 5 posix_memalign(&ptr, 16, 16 - 2 * sizeof (void*)); (gdb) 6 posix_memalign(&ptr, 32, 32 - 2 * sizeof (void*)); (gdb) 7 posix_memalign(&ptr, 64, 64 - 2 * sizeof (void*)); (gdb) 8 posix_memalign(&ptr, 128, 128 - 2 * sizeof (void*)); (gdb) <= and the program is standing in this place in the RUNNIG state <= After the interrupt - Ctrl C Program received signal SIGINT, Interrupt. 0xb032799f in _band_get_aligned () from /usr/qnx650/target/qnx6/x86/lib/libc.so.3 (gdb) q The program is running. Exit anyway? (y or n) y # I think that the problem lies in the function _band_get_aligned from libc. Sat, 14 Jul 2012 09:59:29 GMT http://community.qnx.com/sf/go/post94257 bogdan celer 2012-07-14T09:59:29Z post94222: Re: devc-ser8250 driver http://community.qnx.com/sf/go/post94222 Thank you for this information. It would appear Neutrino is booting from the older 6.5.0 IFS (qnxbase*.ifs) as your libc is not from SP1. The time stamps on the /proc/boot files (July 2010) also confirm that this is not an updated image. This is why the new devc-ser8250 does not work; it requires the SP1 libc.so. Cheers, Andy On 2012-07-12, at 3:43 AM, Pekka Tuusjärvi wrote: > Heres the output use -i /proc/boot/libc.so : > > NAME=libc.so > DESCRIPTION=C runtime library > DATE=2010/07/09-12:54:28-EDT > STATE=stable > HOST=mainbuild > USER=builder > VERSION=6.5.0 > TAGID=89 > > And here ls -l /proc/boot : > > total 6353 > -rwxr-xr-x 1 root root 22294 Jul 09 2010 cam-cdrom.so > -rwxr-xr-x 1 root root 13738 Jul 09 2010 cam-disk.so > -rwxr-xr-x 1 root root 162930 Jul 09 2010 devb-adpu320 > -rwxr-xr-x 1 root root 162115 Jul 09 2010 devb-aha8 > -rwxr-xr-x 1 root root 38975 Jul 09 2010 devb-ahci > -rwxr-xr-x 1 root root 107156 Jul 09 2010 devb-eide > -rwxr-xr-x 1 root root 40821 Jul 09 2010 devb-mvSata > -rwxr-xr-x 1 root root 35648 Jul 09 2010 devb-umass > -rwxr-xr-x 1 root root 86733 Jul 09 2010 devc-con > -rwxr-xr-x 1 root root 107815 Jul 09 2010 devc-con-hid > -rwxr-xr-x 1 root root 58750 Jul 09 2010 devh-ps2ser.so > -rwxr-xr-x 1 root root 21128 Jul 09 2010 devh-usb.so > -rwxr-xr-x 1 root root 39142 Jul 09 2010 devu-ehci.so > -rwxr-xr-x 1 root root 30761 Jul 09 2010 devu-ohci.so > -rwxr-xr-x 1 root root 30007 Jul 09 2010 devu-uhci.so > -rwxr-xr-x 1 root root 76369 Jul 09 2010 diskboot > -rwxr-xr-x 1 root root 21382 Jul 09 2010 fesh > -rwxr-xr-x 1 root root 49356 Jul 09 2010 fs-cd.so > -rwxr-xr-x 1 root root 78433 Jul 09 2010 fs-dos.so > -rwxr-xr-x 1 root root 56333 Jul 09 2010 fs-ext2.so > -rwxr-xr-x 1 root root 62610 Jul 09 2010 fs-mac.so > -rwxr-xr-x 1 root root 36735 Jul 09 2010 fs-nt.so > -rwxr-xr-x 1 root root 55343 Jul 09 2010 fs-qnx4.so > -rwxr-xr-x 1 root root 72902 Jul 09 2010 fs-qnx6.so > -rwxr-xr-x 1 root root 85618 Jul 09 2010 fs-udf.so > -rwxr-xr-x 1 root root 169908 Jul 09 2010 io-blk.so > -rwxr-xr-x 1 root root 33170 Jul 09 2010 io-hid > -rwxr-xr-x 1 root root 94088 Jul 09 2010 io-usb > lrwxr-xr-x 1 root root 9 Jul 09 2010 libc.so -> libc.so.3 > -rwxr-xr-x 1 root root 513152 Jul 09 2010 libc.so.3 > lrwxr-xr-x 1 root root 11 Jul 09 2010 libcam.so -> libcam.so.2 > -rwxr-xr-x 1 root root 73504 Jul 09 2010 libcam.so.2 > lrwxr-xr-x 1 root root 13 Jul 09 2010 libhiddi.so -> libhiddi.so.1 > -rwxr-xr-x 1 root root 27906 Jul 09 2010 libhiddi.so.1 > lrwxr-xr-x 1 root root 13 Jul 09 2010 libusbdi.so -> libusbdi.so.2 > -rwxr-xr-x 1 root root 47748 Jul 09 2010 libusbdi.so.2 > -rwxr-xr-x 1 root root 64148 Jul 09 2010 pci-bios > -rwxr-xr-x 1 root root 593920 Jul 09 2010 procnto-smp-instr > -rwxr-xr-x 1 root root 13001 Jul 09 2010 seedres > -rwxr-xr-x 1 root root 14636 Jul 09 2010 slogger > -rw-rw-rw- 1 root root 144 Jul 10 2010 startup-script > -rwxr-xr-x 1 root root 36783 Jul 09 2010 umass-enum > -rw-r--r-- 1 root root 4113 Oct 26 2004 umass-enum.cfg > -rw-rw-rw- 1 root root 18 Jul 10 2010 unlink_list > > >> Try use -i /proc/boot/libc.so >> And also ls -l /proc/boot >> >> >> >> ----- Original Message ----- >> From: Pekka Tuusjärvi [mailto:community-noreply@qnx.com] >> Sent: Thursday, July 05, 2012 01:58 AM >> To: ostech-core_os <ostech-core_os@community.qnx.com> >> Subject: Re: devc-ser8250 driver >> >> Here is the output of that command. >> >> 'libc.so.3' is not an executable file in PATH: '/sbin:/usr/sbin:/usr/photon/ >> bin:/bin:/usr/bin:/usr/lo >> cal/bin:/opt/bin:/opt/sbin:/usr/photon/appbuilder:/opt/X11R6/bin:/usr/X11R6/ >> bin:/usr/photon/dll:/usr/ >> photon/lib:/opt/lib:/usr/local/lib:/opt/X11R6/lib:/usr/X11R6/lib'. >> >> What should I do next? >> >> >> >> _______________________________________________ >> >> OSTech >> http://community.qnx.com/sf/go/post94041 >> To cancel your subscription to this discussion, please e-mail ostech-core_os- >> unsubscribe@community.qnx.com > > > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94216 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 12 Jul 2012 13:58:12 GMT http://community.qnx.com/sf/go/post94222 Andrew Sherk 2012-07-12T13:58:12Z post94216: Re: devc-ser8250 driver http://community.qnx.com/sf/go/post94216 Heres the output use -i /proc/boot/libc.so : NAME=libc.so DESCRIPTION=C runtime library DATE=2010/07/09-12:54:28-EDT STATE=stable HOST=mainbuild USER=builder VERSION=6.5.0 TAGID=89 And here ls -l /proc/boot : total 6353 -rwxr-xr-x 1 root root 22294 Jul 09 2010 cam-cdrom.so -rwxr-xr-x 1 root root 13738 Jul 09 2010 cam-disk.so -rwxr-xr-x 1 root root 162930 Jul 09 2010 devb-adpu320 -rwxr-xr-x 1 root root 162115 Jul 09 2010 devb-aha8 -rwxr-xr-x 1 root root 38975 Jul 09 2010 devb-ahci -rwxr-xr-x 1 root root 107156 Jul 09 2010 devb-eide -rwxr-xr-x 1 root root 40821 Jul 09 2010 devb-mvSata -rwxr-xr-x 1 root root 35648 Jul 09 2010 devb-umass -rwxr-xr-x 1 root root 86733 Jul 09 2010 devc-con -rwxr-xr-x 1 root root 107815 Jul 09 2010 devc-con-hid -rwxr-xr-x 1 root root 58750 Jul 09 2010 devh-ps2ser.so -rwxr-xr-x 1 root root 21128 Jul 09 2010 devh-usb.so -rwxr-xr-x 1 root root 39142 Jul 09 2010 devu-ehci.so -rwxr-xr-x 1 root root 30761 Jul 09 2010 devu-ohci.so -rwxr-xr-x 1 root root 30007 Jul 09 2010 devu-uhci.so -rwxr-xr-x 1 root root 76369 Jul 09 2010 diskboot -rwxr-xr-x 1 root root 21382 Jul 09 2010 fesh -rwxr-xr-x 1 root root 49356 Jul 09 2010 fs-cd.so -rwxr-xr-x 1 root root 78433 Jul 09 2010 fs-dos.so -rwxr-xr-x 1 root root 56333 Jul 09 2010 fs-ext2.so -rwxr-xr-x 1 root root 62610 Jul 09 2010 fs-mac.so -rwxr-xr-x 1 root root 36735 Jul 09 2010 fs-nt.so -rwxr-xr-x 1 root root 55343 Jul 09 2010 fs-qnx4.so -rwxr-xr-x 1 root root 72902 Jul 09 2010 fs-qnx6.so -rwxr-xr-x 1 root root 85618 Jul 09 2010 fs-udf.so -rwxr-xr-x 1 root root 169908 Jul 09 2010 io-blk.so -rwxr-xr-x 1 root root 33170 Jul 09 2010 io-hid -rwxr-xr-x 1 root root 94088 Jul 09 2010 io-usb lrwxr-xr-x 1 root root 9 Jul 09 2010 libc.so -> libc.so.3 -rwxr-xr-x 1 root root 513152 Jul 09 2010 libc.so.3 lrwxr-xr-x 1 root root 11 Jul 09 2010 libcam.so -> libcam.so.2 -rwxr-xr-x 1 root root 73504 Jul 09 2010 libcam.so.2 lrwxr-xr-x 1 root root 13 Jul 09 2010 libhiddi.so -> libhiddi.so.1 -rwxr-xr-x 1 root root 27906 Jul 09 2010 libhiddi.so.1 lrwxr-xr-x 1 root root 13 Jul 09 2010 libusbdi.so -> libusbdi.so.2 -rwxr-xr-x 1 root root 47748 Jul 09 2010 libusbdi.so.2 -rwxr-xr-x 1 root root 64148 Jul 09 2010 pci-bios -rwxr-xr-x 1 root root 593920 Jul 09 2010 procnto-smp-instr -rwxr-xr-x 1 root root 13001 Jul 09 2010 seedres -rwxr-xr-x 1 root root 14636 Jul 09 2010 slogger -rw-rw-rw- 1 root root 144 Jul 10 2010 startup-script -rwxr-xr-x 1 root root 36783 Jul 09 2010 umass-enum -rw-r--r-- 1 root root 4113 Oct 26 2004 umass-enum.cfg -rw-rw-rw- 1 root root 18 Jul 10 2010 unlink_list > Try use -i /proc/boot/libc.so > And also ls -l /proc/boot > > > > ----- Original Message ----- > From: Pekka Tuusjärvi [mailto:community-noreply@qnx.com] > Sent: Thursday, July 05, 2012 01:58 AM > To: ostech-core_os <ostech-core_os@community.qnx.com> > Subject: Re: devc-ser8250 driver > > Here is the output of that command. > > 'libc.so.3' is not an executable file in PATH: '/sbin:/usr/sbin:/usr/photon/ > bin:/bin:/usr/bin:/usr/lo > cal/bin:/opt/bin:/opt/sbin:/usr/photon/appbuilder:/opt/X11R6/bin:/usr/X11R6/ > bin:/usr/photon/dll:/usr/ > photon/lib:/opt/lib:/usr/local/lib:/opt/X11R6/lib:/usr/X11R6/lib'. > > What should I do next? > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94041 > To cancel your subscription to this discussion, please e-mail ostech-core_os- > unsubscribe@community.qnx.com Thu, 12 Jul 2012 07:43:07 GMT http://community.qnx.com/sf/go/post94216 Pekka Tuusjärvi 2012-07-12T07:43:07Z post94176: typed mem versus shared mem http://community.qnx.com/sf/go/post94176 Is there a recommended way to shared typed mem. We need shared memory but above the 4G barrier. Tue, 10 Jul 2012 19:41:23 GMT http://community.qnx.com/sf/go/post94176 Mario Charest 2012-07-10T19:41:23Z post94055: Re: devc-ser8250 driver http://community.qnx.com/sf/go/post94055 Try use -i /proc/boot/libc.so And also ls -l /proc/boot ----- Original Message ----- From: Pekka Tuusjärvi [mailto:community-noreply@qnx.com] Sent: Thursday, July 05, 2012 01:58 AM To: ostech-core_os <ostech-core_os@community.qnx.com> Subject: Re: devc-ser8250 driver Here is the output of that command. 'libc.so.3' is not an executable file in PATH: '/sbin:/usr/sbin:/usr/photon/bin:/bin:/usr/bin:/usr/lo cal/bin:/opt/bin:/opt/sbin:/usr/photon/appbuilder:/opt/X11R6/bin:/usr/X11R6/bin:/usr/photon/dll:/usr/ photon/lib:/opt/lib:/usr/local/lib:/opt/X11R6/lib:/usr/X11R6/lib'. What should I do next? _______________________________________________ OSTech http://community.qnx.com/sf/go/post94041 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 05 Jul 2012 11:47:01 GMT http://community.qnx.com/sf/go/post94055 Andrew Sherk 2012-07-05T11:47:01Z post94041: Re: devc-ser8250 driver http://community.qnx.com/sf/go/post94041 Here is the output of that command. 'libc.so.3' is not an executable file in PATH: '/sbin:/usr/sbin:/usr/photon/bin:/bin:/usr/bin:/usr/lo cal/bin:/opt/bin:/opt/sbin:/usr/photon/appbuilder:/opt/X11R6/bin:/usr/X11R6/bin:/usr/photon/dll:/usr/ photon/lib:/opt/lib:/usr/local/lib:/opt/X11R6/lib:/usr/X11R6/lib'. What should I do next? Thu, 05 Jul 2012 05:58:51 GMT http://community.qnx.com/sf/go/post94041 Pekka Tuusjärvi 2012-07-05T05:58:51Z post94023: Re: devc-ser8250 driver http://community.qnx.com/sf/go/post94023 > ldd:FATAL: Unresolved symbol "hwi_find_item" called from Executable > > If I copy the driver from the older ISO it works just fine. I suspect that while you've updated binaries to SP1, you have booted from a pre-SP1 image (IFS) where the first libc in the search path (probably /proc/boot/libc.so.3) is not updated to SP1. Can you check that you are using the SP1 libc.so.3 ? use -i libc.so.3 should tell you. Wed, 04 Jul 2012 13:53:05 GMT http://community.qnx.com/sf/go/post94023 Andrew Sherk 2012-07-04T13:53:05Z post94017: Re: devc-ser8250 driver http://community.qnx.com/sf/go/post94017 From the runtime, what is the output of uname -a ? On 2012-07-04, at 5:54 AM, Pekka Tuusjärvi wrote: > Hi, I installed SP1 update to 6.5.0 and then burned the runtime image. In the SP1 runtime that serial driver wont work. Here is the error message when I try to start the driver : > > ldd:FATAL: Unresolved symbol "hwi_find_item" called from Executable > > If I copy the driver from the older ISO it works just fine. Some kind of compile bug?? > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post94005 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 04 Jul 2012 12:53:26 GMT http://community.qnx.com/sf/go/post94017 Andrew Sherk 2012-07-04T12:53:26Z post94005: devc-ser8250 driver http://community.qnx.com/sf/go/post94005 Hi, I installed SP1 update to 6.5.0 and then burned the runtime image. In the SP1 runtime that serial driver wont work. Here is the error message when I try to start the driver : ldd:FATAL: Unresolved symbol "hwi_find_item" called from Executable If I copy the driver from the older ISO it works just fine. Some kind of compile bug?? Wed, 04 Jul 2012 09:54:47 GMT http://community.qnx.com/sf/go/post94005 Pekka Tuusjärvi 2012-07-04T09:54:47Z post94001: Re: select_attach read callback with no data http://community.qnx.com/sf/go/post94001 Replying to my own post, we seem to have found the issue and a solution. See http://community.qnx.com/sf/discussion/do/listPosts/projects.bsp/discussion.bsp.topc22070. Mark Wed, 04 Jul 2012 00:52:09 GMT http://community.qnx.com/sf/go/post94001 Mark Dowdy 2012-07-04T00:52:09Z post93943: Re: RE: select() not respecting the timeout parameter? http://community.qnx.com/sf/go/post93943 Thanks... that opens some more possibilities for fixing my problem :) Thu, 28 Jun 2012 19:53:16 GMT http://community.qnx.com/sf/go/post93943 Dragan Juric 2012-06-28T19:53:16Z post93940: RE: select() not respecting the timeout parameter? http://community.qnx.com/sf/go/post93940 Timer harmonization: http://foundry51.qnx.com/sf/discussion/do/listPosts/projects.internal_deckard/discussion.announcements.topc31937 -----Original Message----- From: Dragan Juric [mailto:community-noreply@qnx.com] Sent: June 28, 2012 3:20 PM To: ostech-core_os Subject: select() not respecting the timeout parameter? Hello, While working on EMA (the service that enrolls a device into BDS) I noticed that a select.select() call from python (which maps into regular C select() Unix/Posix API) does not respect the timeout. I give it a timeout of 300 (5 min) but it timeouts semi-randomly, sometimes after 8 min, sometimes after 9 or 6 or 5 or 10... and the consequence of that was promptly reported back to me as a gating issue. For the time being, I reworked it as a loop with timeout of 0 at select() and a call to time.sleep(), but, does anyone have any idea what's going on here? _______________________________________________ OSTech http://community.qnx.com/sf/go/post93939 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Thu, 28 Jun 2012 19:27:03 GMT http://community.qnx.com/sf/go/post93940 Brian Stecher 2012-06-28T19:27:03Z post93939: select() not respecting the timeout parameter? http://community.qnx.com/sf/go/post93939 Hello, While working on EMA (the service that enrolls a device into BDS) I noticed that a select.select() call from python (which maps into regular C select() Unix/Posix API) does not respect the timeout. I give it a timeout of 300 (5 min) but it timeouts semi-randomly, sometimes after 8 min, sometimes after 9 or 6 or 5 or 10... and the consequence of that was promptly reported back to me as a gating issue. For the time being, I reworked it as a loop with timeout of 0 at select() and a call to time.sleep(), but, does anyone have any idea what's going on here? Thu, 28 Jun 2012 19:20:01 GMT http://community.qnx.com/sf/go/post93939 Dragan Juric 2012-06-28T19:20:01Z post93833: Re: Can't use more than 3.5GB of RAM http://community.qnx.com/sf/go/post93833 There is also a virtual memory limitation. Are you trying to allocate all of this memory in a single process? ----- Original Message ----- From: Chris Travis [mailto:community-noreply@qnx.com] Sent: Friday, June 22, 2012 10:04 AM To: ostech-core_os@community.qnx.com <ostech-core_os@community.qnx.com>; ostech-core_os <ostech-core_os@community.qnx.com> Subject: Re: Can't use more than 3.5GB of RAM Rebuild you're image with the -x option to startup. Sent from my BlackBerry® PlayBook™ www.blackberry.com ________________________________ From: "noname noname" <community-noreply@qnx.com> To: "ostech-core_os" <ostech-core_os@community.qnx.com> Sent: 22 June, 2012 4:57 AM Subject: Re: Can't use more than 3.5GB of RAM Maybe QSS can build special version of QNX SDK Platform (self-hosted) for x86 with out-of-box support more 4GB of RAM. I'm think this will be usable feature. Thanks. _______________________________________________ OSTech http://community.qnx.com/sf/go/post93824 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com _______________________________________________ OSTech http://community.qnx.com/sf/go/post93832 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Fri, 22 Jun 2012 14:19:14 GMT http://community.qnx.com/sf/go/post93833 David Sarrazin 2012-06-22T14:19:14Z post93832: Re: Can't use more than 3.5GB of RAM http://community.qnx.com/sf/go/post93832 Rebuild you're image with the -x option to startup. Sent from my BlackBerry® PlayBook™ www.blackberry.com ________________________________ From: "noname noname" <community-noreply@qnx.com> To: "ostech-core_os" <ostech-core_os@community.qnx.com> Sent: 22 June, 2012 4:57 AM Subject: Re: Can't use more than 3.5GB of RAM Maybe QSS can build special version of QNX SDK Platform (self-hosted) for x86 with out-of-box support more 4GB of RAM. I'm think this will be usable feature. Thanks. _______________________________________________ OSTech http://community.qnx.com/sf/go/post93824 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Fri, 22 Jun 2012 14:08:27 GMT http://community.qnx.com/sf/go/post93832 Chris Travis 2012-06-22T14:08:27Z post93824: Re: Can't use more than 3.5GB of RAM http://community.qnx.com/sf/go/post93824 Maybe QSS can build special version of QNX SDK Platform (self-hosted) for x86 with out-of-box support more 4GB of RAM. I'm think this will be usable feature. Thanks. Fri, 22 Jun 2012 08:57:24 GMT http://community.qnx.com/sf/go/post93824 Vitaly 2012-06-22T08:57:24Z post93578: Re: Shutdown[0,0] ... QNX Version 6.5.0 Release 2010/07/09-14:35:30EDT http://community.qnx.com/sf/go/post93578 Seems like you were right. The only line in init_raminfo() is add_ram which adds 8MB of memory (should be enough). I looked at add_ram() code and found that it calls alloc_ram() for the part of RAM that overlaps with loaded image (which is also true in my case). I looked at alloc_ram() code and found three remarked kprintf's left there - I unremarked them and what it printed, pointed me to the source of my problem: I was passing wrong base address to add_ram() in init_raminfo(). Now there's no kernel dump anymore, actually, there's nothing at all that could give me a clue that the system is working :( Maybe something is wrong with my script? What display_msg command actually does? Is it using callout_debug (which seems to work OK as I was able to see kernel dump) for producing the output? Thu, 07 Jun 2012 19:39:30 GMT http://community.qnx.com/sf/go/post93578 Paul Osmialowski 2012-06-07T19:39:30Z post93577: Re: Shutdown[0,0] ... QNX Version 6.5.0 Release 2010/07/09-14:35:30EDT http://community.qnx.com/sf/go/post93577 Those SIGTRAP ones are essentially assertion failures in the code. In this particular case line 347 of pa.c (reported as pa@347) That particular one seems to be a failure to find a large enough sysram chunk to satisfy an early kernel memory allocation. Is your startup's init_raminfo() working correctly? Sunil. On 12-06-07 1:54 PM, Paul Osmialowski wrote: > Something similar occured to me. Right after cpu_startnext() function started procnto: > > System page at phys:84709000 user:84709000 kern:84709000 > Starting next program at v84755bd4 > > Shutdown[0,0] S/C/F=5/4/3 C/D=84732850/84799c4c state(c0)= now lock > QNX Version 6.5.0 Release 2010/07/09-14:41:25EDT > shle context[84798378]: > 0000: 00000000 fffffff8 847983f0 00000000 00000000 00005100 00000000 84700000 > 0020: 1ffffffe 847983d0 00004fe0 1fffffff 84799f18 84799f14 84798468 847983d0 > 0040: 400000f1 8474b820 84708000 00000000 000000d0 8474b782 > instruction[8474b820] (pa@347): > 03 a0 09 00 63 5f 79 84 5b 01 63 60 04 e2 2d 40 0c 70 d1 91 1c 35 01 76 2d 46 > stack[847983d0]: > 0000: 00000002 00000000 00000000 8470b000 84bfffff 00000000 00000000 84700000 > 0020: 84707fff 00000000 00000000 00000000 00000000 00000000 00000000 00000000 > 0040: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 > 0060: 00000000 00000000 00000000 84798440 8470926d 00000000 8474b758 84798468 > > Seems like there's no process started yet (no PID in kernel dump), addresses seem to be OK (things are where I loaded it using tftp), examining signal.h, sigininfo.h and fault.h gave me following S/C/F cause: > - S: SIGTRAP > - C: TRAP_CRASH (or NSIGTRAP) > - F: BREAKPOINT instr. > > I have no clue why breakpoint instruction was reached. Image spec is like this: > Thu, 07 Jun 2012 18:14:14 GMT http://community.qnx.com/sf/go/post93577 Sunil Kittur 2012-06-07T18:14:14Z post93576: Re: Shutdown[0,0] ... QNX Version 6.5.0 Release 2010/07/09-14:35:30EDT http://community.qnx.com/sf/go/post93576 Something similar occured to me. Right after cpu_startnext() function started procnto: System page at phys:84709000 user:84709000 kern:84709000 Starting next program at v84755bd4 Shutdown[0,0] S/C/F=5/4/3 C/D=84732850/84799c4c state(c0)= now lock QNX Version 6.5.0 Release 2010/07/09-14:41:25EDT shle context[84798378]: 0000: 00000000 fffffff8 847983f0 00000000 00000000 00005100 00000000 84700000 0020: 1ffffffe 847983d0 00004fe0 1fffffff 84799f18 84799f14 84798468 847983d0 0040: 400000f1 8474b820 84708000 00000000 000000d0 8474b782 instruction[8474b820] (pa@347): 03 a0 09 00 63 5f 79 84 5b 01 63 60 04 e2 2d 40 0c 70 d1 91 1c 35 01 76 2d 46 stack[847983d0]: 0000: 00000002 00000000 00000000 8470b000 84bfffff 00000000 00000000 84700000 0020: 84707fff 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0040: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0060: 00000000 00000000 00000000 84798440 8470926d 00000000 8474b758 84798468 Seems like there's no process started yet (no PID in kernel dump), addresses seem to be OK (things are where I loaded it using tftp), examining signal.h, sigininfo.h and fault.h gave me following S/C/F cause: - S: SIGTRAP - C: TRAP_CRASH (or NSIGTRAP) - F: BREAKPOINT instr. I have no clue why breakpoint instruction was reached. Image spec is like this: [image=0x84720000] [virtual=shle,binary] .bootstrap = { startup-mb442 PATH=/proc/boot procnto } libc.so [type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so [+script] .script = { display_msg Welcome to QNX Neutrino 6.5.0 on the mb442-derived board SYSNAME=nto TERM=qansi HOME=/ LD_LIBRARY_PATH=.:/tmp/:/proc/boot:/usr/photon/lib:/dll:/lib:/lib/dll:/usr/lib:/usr/photon/dll:/opt/lib PATH=.:/tmp:/proc/boot:.:/sbin:/usr/sbin:/usr/bin:/bin:/usr/local/bin:/usr/photon/bin:/opt/bin [+session] ksh & } ########################################################################### ## File system links ########################################################################### [type=link] /bin/sh=/proc/boot/ksh [type=link] /tmp=/dev/shmem libcam.so.2 libm.so.2 ########################################################################### ## QNX applications ########################################################################### syslogd ls ksh pipe pidin slogger sloginfo slay mount umount cat cp rm pipe mkdir kill hogs grep chmod sleep tracelogger shutdown use ########################################################################### ## END OF BUILD SCRIPT ########################################################################### As you can see, my welcome message wasn't displayed, kernel crashed earlier. I tried to change procnto to procnto-instr - no change, kernel dump is still the same. I placed plenty of kprintf in libstartup functions, all of them were displayed at boot time, so at least startup-mb442 seems to be OK. I feel not experienced enough to move further with this. Thu, 07 Jun 2012 17:54:37 GMT http://community.qnx.com/sf/go/post93576 Paul Osmialowski 2012-06-07T17:54:37Z post93559: Preventing buffer copies in SPI API http://community.qnx.com/sf/go/post93559 I noticed that the SPI API provides both spi_xchange() and spi_dma_xchange(). Ideally I would like to read/write the buffers directly from application memory. While I don't have DMA enabled, could spi_dma_xchange() be used in my hardware interface to prevent the buffer copy from occurring? If so will the dma_xfer function have access to this physical memory or am I limited to the ISR? Thanks, Devan Wed, 06 Jun 2012 20:47:29 GMT http://community.qnx.com/sf/go/post93559 Devan Lippman 2012-06-06T20:47:29Z post93535: which & how to install compiler for ADA and Fortran? tried below stuff but stuck with errors >> g77: installation problem http://community.qnx.com/sf/go/post93535 This is for Fortran. Please advice for ADA too. Got this error :- g77: installation problem, cannot exec `as': No such file or directory when followed the below links and those files I installed 1] http://www.ajam.org.pl/ gcc4.6.1-x86-qnx6.5.0-bld1.tar.bz2 2] http://www.opal-rt.com/kb-article/how-compile-fortran-code-qnx-61-632-or-650 g77-rtp6.1-files-010921.tgz 3] http://hintsforums.macworld.com/archive/index.php/t-62445.html searched for 'as' in /usr/qnx650/host/x86/usr/bin and at that to PATH /usr/qnx650/host/x86/usr/bin 'as' is assembler but its missing there and also in root/usr/bin # echo $PATH /sbin:/usr/sbin:/bin:/usr/bin:/usr/photon/bin:/usr/photon/appbuilder:/opt/X11R6/ bin:/usr/X11R6/bin:/usr/local/bin:/opt/bin:/opt/sbin # uname -a QNX localhost 6.5.0 2010/07/09-14:43:25EDT x86pc x86 # qconfig $QNX_CONFIGURATION not set, -d not given, and/or /etc/qnx/qconfig doesn't exist. snaps and add.f file is in zip file attached Wed, 06 Jun 2012 03:40:04 GMT http://community.qnx.com/sf/go/post93535 Atul Kumbhar 2012-06-06T03:40:04Z post93448: Re[2]: interactions within the microkernel http://community.qnx.com/sf/go/post93448 Thank you for having responded. And I'll try to clarify. I am interested in how the microkernel jn level assembly instructions Fri, 01 Jun 2012 11:33:42 GMT http://community.qnx.com/sf/go/post93448 Igor Kutuzov 2012-06-01T11:33:42Z post93436: Re: interactions within the microkernel http://community.qnx.com/sf/go/post93436 > As elements interact with each other microkernels? And what happens when the > processes are executed in the kernel (as the interaction occurs at the level > of teams) Sorry, I am not really getting your point. Processes are not executed in the kernel. Please check this page to get more insight: http://community.qnx.com/sf/wiki/do/viewPage/projects.core_os/wiki/KernelSystemCall Hope this helps, -Jeevan Thu, 31 May 2012 21:59:55 GMT http://community.qnx.com/sf/go/post93436 Jeevan Mathew 2012-05-31T21:59:55Z post93422: interactions within the microkernel http://community.qnx.com/sf/go/post93422 As elements interact with each other microkernels? And what happens when the processes are executed in the kernel (as the interaction occurs at the level of teams) Thu, 31 May 2012 15:37:01 GMT http://community.qnx.com/sf/go/post93422 Igor Kutuzov 2012-05-31T15:37:01Z post93306: Re: Problem with ClockCycles http://community.qnx.com/sf/go/post93306 What is the overhead of the ClockCycles() call? eg. delta between 2 back-to-back ClockCycles()? The code uses an emulation that traps into the kernel and calls the BSP timer_value() callout to calculate a delta from the last clock. The clock tick handler maintains a 64-bit counter that is incremented by qtime->timer_load so that ClockCycles returns: counter + qtime->timer_value() On 12-05-25 2:31 PM, Bruno Silva wrote: > I'm trying to measure the tick overhead in a Beagleboard-XM-REV C. That uses an arm processor. > I get a problem when using the ClockCycles() system call, because the counter seems to start counting backward when I reduce the tick period. > > I've made the following code to confirm this situation: > > int main(int argc, char *argv[]) { > > _uint64 before_clkper, after_clkper; > float cpu_freq; > struct _clockperiod clkper; > > { > struct sched_param param; > int ret; > param.sched_priority = sched_get_priority_max( SCHED_RR ); > ret = sched_setscheduler( 0, SCHED_RR,&param); > assert ( ret != -1 ); > } > cpu_freq = SYSPAGE_ENTRY( qtime )->cycles_per_sec; > printf("Frequency of ClockCycles: %f\n", cpu_freq); > > clkper.nsec = 10000000; > clkper.fract = 0; > ClockPeriod ( CLOCK_REALTIME,&clkper, NULL, 0 ); > > > clkper.nsec = 10000; > clkper.fract = 0; > before_clkper= ClockCycles(); > ClockPeriod ( CLOCK_REALTIME,&clkper, NULL, 0 ); > after_clkper= ClockCycles(); > printf("Before clock period %lld. After clock period %lld\n", before_clkper, after_clkper); > printf("Difference between clock period %lld\n", after_clkper-before_clkper); > return 0; > } > > The results were: > > Frequency of ClockCycles: 13000000.000000 > Before clock period 15088465604. After clock period 15088465368 > Difference between clock period -236 > > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post93305 > To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Fri, 25 May 2012 18:56:41 GMT http://community.qnx.com/sf/go/post93306 Sunil Kittur 2012-05-25T18:56:41Z post93305: Problem with ClockCycles http://community.qnx.com/sf/go/post93305 I'm trying to measure the tick overhead in a Beagleboard-XM-REV C. That uses an arm processor. I get a problem when using the ClockCycles() system call, because the counter seems to start counting backward when I reduce the tick period. I've made the following code to confirm this situation: int main(int argc, char *argv[]) { _uint64 before_clkper, after_clkper; float cpu_freq; struct _clockperiod clkper; { struct sched_param param; int ret; param.sched_priority = sched_get_priority_max( SCHED_RR ); ret = sched_setscheduler( 0, SCHED_RR, &param); assert ( ret != -1 ); } cpu_freq = SYSPAGE_ENTRY( qtime )->cycles_per_sec; printf("Frequency of ClockCycles: %f\n", cpu_freq); clkper.nsec = 10000000; clkper.fract = 0; ClockPeriod ( CLOCK_REALTIME, &clkper, NULL, 0 ); clkper.nsec = 10000; clkper.fract = 0; before_clkper= ClockCycles(); ClockPeriod ( CLOCK_REALTIME, &clkper, NULL, 0 ); after_clkper= ClockCycles(); printf("Before clock period %lld. After clock period %lld\n", before_clkper, after_clkper); printf("Difference between clock period %lld\n", after_clkper-before_clkper); return 0; } The results were: Frequency of ClockCycles: 13000000.000000 Before clock period 15088465604. After clock period 15088465368 Difference between clock period -236 Fri, 25 May 2012 18:31:55 GMT http://community.qnx.com/sf/go/post93305 Bruno Silva 2012-05-25T18:31:55Z post92893: Linker options for qcc: QNX Build Errors http://community.qnx.com/sf/go/post92893 Hi, In QNX build, am seeing shared objects are generated instead of binary executable. While invoking qcc the option "-shared" is not passed but "-fPIC" is passed. Any one please give me a clue what will trigger qcc to generate shared object other than "-fPIC" option. Thu, 03 May 2012 13:31:32 GMT http://community.qnx.com/sf/go/post92893 Rajesh Kannan Balasubramanian 2012-05-03T13:31:32Z post92880: RE: Restoring STDIN after redirection on command line ... http://community.qnx.com/sf/go/post92880 Glad to help. :) - Thomas -----Original Message----- From: Robert Selby [mailto:Robert.Selby@snellgroup.com] Sent: Mittwoch, 2. Mai 2012 13:34 To: ostech-core_os@community.qnx.com Subject: RE: Restoring STDIN after redirection on command line ... Very true ... fc = fdopen(dup2(1, 0), "r"); seems to work OK too :-) Thanks very much for the help :-) Bob Selby Senior Engineer, Software Snell Innovation in the Multi-Screen World T +44 (0) 118 921 4592 (direct) T +44 (0) 118 986 6123 (switchboard) F +44 (0) 118 975 4920 snellgroup.com Hartman House, Danehill, Lower Earley, Reading, Berkshire, RG6 4PB UK Routing | Modular Infrastructure | Conversion & Restoration | Live Production | Automation & Media Management | Control & Monitoring -----Original Message----- From: Thomas Haupt [mailto:thaupt@qnx.com] Sent: 02 May 2012 12:29 To: 'ostech-core_os@community.qnx.com' Subject: RE: Restoring STDIN after redirection on command line ... Hi Bob, that looks mostly reasonable. I'd still add a 'dup' or 'dup2', though, to have separate file descriptors for stdin and stdout. Cheers, Thomas -----Original Message----- From: Robert Selby [mailto:Robert.Selby@snellgroup.com] Sent: Mittwoch, 2. Mai 2012 13:12 To: ostech-core_os@community.qnx.com Subject: RE: Restoring STDIN after redirection on command line ... Thanks for that :-) I tried the following for "util < scriptfile" and it seems to do what I want ... ----------------------------------------------------- FILE * fc = stdin; ... fgets(fc, ... // Reads from redirected script file ... On EOF I do ... fclose(fc); fc = fdopen(STDOUT_FILENO, "r") ) == NULL ) ... fgets(fc, ... // Reads from keyboard ... ----------------------------------------------------- Bob Selby Senior Engineer, Software Snell Innovation in the Multi-Screen World T +44 (0) 118 921 4592 (direct) T +44 (0) 118 986 6123 (switchboard) F +44 (0) 118 975 4920 snellgroup.com Hartman House, Danehill, Lower Earley, Reading, Berkshire, RG6 4PB UK Routing | Modular Infrastructure | Conversion & Restoration | Live Production | Automation & Media Management | Control & Monitoring -----Original Message----- From: Thomas Haupt [mailto:thaupt@qnx.com] Sent: 02 May 2012 11:24 To: 'ostech-core_os@community.qnx.com' Subject: RE: Restoring STDIN after redirection on command line ... Hi Bob, I'm not sure if there is a really clean solution to your problem. To achieve the desired behavior, you would need to: - find out which device should become your new stdin (as you noticed, /dev/tty isn't necessarily the right choice), and - redirect the stream 'stdin' to take its input from that device. Finding the appropriate device may be anywhere between not too hard and impossible. In the easy case, stdout or stderr refer to the TTY you want to use. In the worst case, they have been redirected to files or closed entirely, and your process has detached from its controlling terminal (i.e., become a daemon) - in this scenario, there'd be no reasonable guess which device to attach to. Let's assume a simple case - stdout refers to a TTY. You could of course just call dup2( 1, 0 ) to duplicate the stdout file descriptor and have the duplicate your current stdin fd. The problem is that the (FILE) stream object represented by *stdin will not be aware of this change. There is the fdopen() function to wrap a FILE object around an existing file descriptor, but that will allocate a new object, not use an existing one... ...and alas, *stdin/-out/-err are static _objects_ - so we cannot merely replace stdin by a new pointer. You could try to flush and rewind the stdin stream, then call dup2( 1, 0 ) to replace the stdin file descriptor. I'd suggest, though, to provide your input file via a command line argument and have a few custom input functions that will read either from that file or, once it reached EOF, the original stdin. Cheers, Thomas -----Original Message----- From: Bob Selby [mailto:robert.selby@snellgroup.com] Sent: Mittwoch, 2. Mai 2012 10:46 To: ostech-core_os Subject: Restoring STDIN after redirection on command line ... A bit of a newbie question, possibly. I am trying to have a QNX 650 built utility that normally accepts its input from stdin but can be run with a script file with "utility < scriptfile" and then revert to input from the keyboard when it hits EOF. What is the best way to do this ?? Currently, at EOF I close "stdin" and then fopen("/dev/tty", "r") - this works well for the debug serial port but not for telnet, etc. TIA, Bob _______________________________________________ OSTech http://community.qnx.com/sf/go/post92871 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com _______________________________________________ OSTech http://community.qnx.com/sf/go/post92875 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com This email and any attachments are confidential, may be legally privileged and are intended for the use of the addressee only. If you are not the intended recipient, please note that any use, disclosure, printing or copying of this email is strictly prohibited and may be unlawful. If received in error, please delete this email and any attachments and confirm this to the sender. Snell Limited, registered number 1160119 Registered in England, registered office at Hartman House, Danehill, Lower Earley, Reading, Berkshire RG6 4PB _______________________________________________ OSTech http://community.qnx.com/sf/go/post92877 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com _______________________________________________ OSTech http://community.qnx.com/sf/go/post92878 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com This email and any attachments are confidential, may be legally privileged and are intended for the use of the addressee only. If you are not the intended recipient, please note that any use, disclosure, printing or copying of this email is strictly prohibited and may be unlawful. If received in error, please delete this email and any attachments and confirm this to the sender. Snell Limited, registered number 1160119 Registered in England, registered office at Hartman House, Danehill, Lower Earley, Reading, Berkshire RG6 4PB _______________________________________________ OSTech http://community.qnx.com/sf/go/post92879 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 02 May 2012 11:38:38 GMT http://community.qnx.com/sf/go/post92880 Thomas Haupt 2012-05-02T11:38:38Z post92879: RE: Restoring STDIN after redirection on command line ... http://community.qnx.com/sf/go/post92879 Very true ... fc = fdopen(dup2(1, 0), "r"); seems to work OK too :-) Thanks very much for the help :-) Bob Selby Senior Engineer, Software Snell Innovation in the Multi-Screen World T +44 (0) 118 921 4592 (direct) T +44 (0) 118 986 6123 (switchboard) F +44 (0) 118 975 4920 snellgroup.com Hartman House, Danehill, Lower Earley, Reading, Berkshire, RG6 4PB UK Routing | Modular Infrastructure | Conversion & Restoration | Live Production | Automation & Media Management | Control & Monitoring -----Original Message----- From: Thomas Haupt [mailto:thaupt@qnx.com] Sent: 02 May 2012 12:29 To: 'ostech-core_os@community.qnx.com' Subject: RE: Restoring STDIN after redirection on command line ... Hi Bob, that looks mostly reasonable. I'd still add a 'dup' or 'dup2', though, to have separate file descriptors for stdin and stdout. Cheers, Thomas -----Original Message----- From: Robert Selby [mailto:Robert.Selby@snellgroup.com] Sent: Mittwoch, 2. Mai 2012 13:12 To: ostech-core_os@community.qnx.com Subject: RE: Restoring STDIN after redirection on command line ... Thanks for that :-) I tried the following for "util < scriptfile" and it seems to do what I want ... ----------------------------------------------------- FILE * fc = stdin; ... fgets(fc, ... // Reads from redirected script file ... On EOF I do ... fclose(fc); fc = fdopen(STDOUT_FILENO, "r") ) == NULL ) ... fgets(fc, ... // Reads from keyboard ... ----------------------------------------------------- Bob Selby Senior Engineer, Software Snell Innovation in the Multi-Screen World T +44 (0) 118 921 4592 (direct) T +44 (0) 118 986 6123 (switchboard) F +44 (0) 118 975 4920 snellgroup.com Hartman House, Danehill, Lower Earley, Reading, Berkshire, RG6 4PB UK Routing | Modular Infrastructure | Conversion & Restoration | Live Production | Automation & Media Management | Control & Monitoring -----Original Message----- From: Thomas Haupt [mailto:thaupt@qnx.com] Sent: 02 May 2012 11:24 To: 'ostech-core_os@community.qnx.com' Subject: RE: Restoring STDIN after redirection on command line ... Hi Bob, I'm not sure if there is a really clean solution to your problem. To achieve the desired behavior, you would need to: - find out which device should become your new stdin (as you noticed, /dev/tty isn't necessarily the right choice), and - redirect the stream 'stdin' to take its input from that device. Finding the appropriate device may be anywhere between not too hard and impossible. In the easy case, stdout or stderr refer to the TTY you want to use. In the worst case, they have been redirected to files or closed entirely, and your process has detached from its controlling terminal (i.e., become a daemon) - in this scenario, there'd be no reasonable guess which device to attach to. Let's assume a simple case - stdout refers to a TTY. You could of course just call dup2( 1, 0 ) to duplicate the stdout file descriptor and have the duplicate your current stdin fd. The problem is that the (FILE) stream object represented by *stdin will not be aware of this change. There is the fdopen() function to wrap a FILE object around an existing file descriptor, but that will allocate a new object, not use an existing one... ...and alas, *stdin/-out/-err are static _objects_ - so we cannot merely replace stdin by a new pointer. You could try to flush and rewind the stdin stream, then call dup2( 1, 0 ) to replace the stdin file descriptor. I'd suggest, though, to provide your input file via a command line argument and have a few custom input functions that will read either from that file or, once it reached EOF, the original stdin. Cheers, Thomas -----Original Message----- From: Bob Selby [mailto:robert.selby@snellgroup.com] Sent: Mittwoch, 2. Mai 2012 10:46 To: ostech-core_os Subject: Restoring STDIN after redirection on command line ... A bit of a newbie question, possibly. I am trying to have a QNX 650 built utility that normally accepts its input from stdin but can be run with a script file with "utility < scriptfile" and then revert to input from the keyboard when it hits EOF. What is the best way to do this ?? Currently, at EOF I close "stdin" and then fopen("/dev/tty", "r") - this works well for the debug serial port but not for telnet, etc. TIA, Bob _______________________________________________ OSTech http://community.qnx.com/sf/go/post92871 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com _______________________________________________ OSTech http://community.qnx.com/sf/go/post92875 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com This email and any attachments are confidential, may be legally privileged and are intended for the use of the addressee only. If you are not the intended recipient, please note that any use, disclosure, printing or copying of this email is strictly prohibited and may be unlawful. If received in error, please delete this email and any attachments and confirm this to the sender. Snell Limited, registered number 1160119 Registered in England, registered office at Hartman House, Danehill, Lower Earley, Reading, Berkshire RG6 4PB _______________________________________________ OSTech http://community.qnx.com/sf/go/post92877 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com _______________________________________________ OSTech http://community.qnx.com/sf/go/post92878 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com This email and any attachments are confidential, may be legally privileged and are intended for the use of the addressee only. If you are not the intended recipient, please note that any use, disclosure, printing or copying of this email is strictly prohibited and may be unlawful. If received in error, please delete this email and any attachments and confirm this to the sender. Snell Limited, registered number 1160119 Registered in England, registered office at Hartman House, Danehill, Lower Earley, Reading, Berkshire RG6 4PB Wed, 02 May 2012 11:37:03 GMT http://community.qnx.com/sf/go/post92879 Bob Selby 2012-05-02T11:37:03Z post92878: RE: Restoring STDIN after redirection on command line ... http://community.qnx.com/sf/go/post92878 Hi Bob, that looks mostly reasonable. I'd still add a 'dup' or 'dup2', though, to have separate file descriptors for stdin and stdout. Cheers, Thomas -----Original Message----- From: Robert Selby [mailto:Robert.Selby@snellgroup.com] Sent: Mittwoch, 2. Mai 2012 13:12 To: ostech-core_os@community.qnx.com Subject: RE: Restoring STDIN after redirection on command line ... Thanks for that :-) I tried the following for "util < scriptfile" and it seems to do what I want ... ----------------------------------------------------- FILE * fc = stdin; ... fgets(fc, ... // Reads from redirected script file ... On EOF I do ... fclose(fc); fc = fdopen(STDOUT_FILENO, "r") ) == NULL ) ... fgets(fc, ... // Reads from keyboard ... ----------------------------------------------------- Bob Selby Senior Engineer, Software Snell Innovation in the Multi-Screen World T +44 (0) 118 921 4592 (direct) T +44 (0) 118 986 6123 (switchboard) F +44 (0) 118 975 4920 snellgroup.com Hartman House, Danehill, Lower Earley, Reading, Berkshire, RG6 4PB UK Routing | Modular Infrastructure | Conversion & Restoration | Live Production | Automation & Media Management | Control & Monitoring -----Original Message----- From: Thomas Haupt [mailto:thaupt@qnx.com] Sent: 02 May 2012 11:24 To: 'ostech-core_os@community.qnx.com' Subject: RE: Restoring STDIN after redirection on command line ... Hi Bob, I'm not sure if there is a really clean solution to your problem. To achieve the desired behavior, you would need to: - find out which device should become your new stdin (as you noticed, /dev/tty isn't necessarily the right choice), and - redirect the stream 'stdin' to take its input from that device. Finding the appropriate device may be anywhere between not too hard and impossible. In the easy case, stdout or stderr refer to the TTY you want to use. In the worst case, they have been redirected to files or closed entirely, and your process has detached from its controlling terminal (i.e., become a daemon) - in this scenario, there'd be no reasonable guess which device to attach to. Let's assume a simple case - stdout refers to a TTY. You could of course just call dup2( 1, 0 ) to duplicate the stdout file descriptor and have the duplicate your current stdin fd. The problem is that the (FILE) stream object represented by *stdin will not be aware of this change. There is the fdopen() function to wrap a FILE object around an existing file descriptor, but that will allocate a new object, not use an existing one... ...and alas, *stdin/-out/-err are static _objects_ - so we cannot merely replace stdin by a new pointer. You could try to flush and rewind the stdin stream, then call dup2( 1, 0 ) to replace the stdin file descriptor. I'd suggest, though, to provide your input file via a command line argument and have a few custom input functions that will read either from that file or, once it reached EOF, the original stdin. Cheers, Thomas -----Original Message----- From: Bob Selby [mailto:robert.selby@snellgroup.com] Sent: Mittwoch, 2. Mai 2012 10:46 To: ostech-core_os Subject: Restoring STDIN after redirection on command line ... A bit of a newbie question, possibly. I am trying to have a QNX 650 built utility that normally accepts its input from stdin but can be run with a script file with "utility < scriptfile" and then revert to input from the keyboard when it hits EOF. What is the best way to do this ?? Currently, at EOF I close "stdin" and then fopen("/dev/tty", "r") - this works well for the debug serial port but not for telnet, etc. TIA, Bob _______________________________________________ OSTech http://community.qnx.com/sf/go/post92871 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com _______________________________________________ OSTech http://community.qnx.com/sf/go/post92875 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com This email and any attachments are confidential, may be legally privileged and are intended for the use of the addressee only. If you are not the intended recipient, please note that any use, disclosure, printing or copying of this email is strictly prohibited and may be unlawful. If received in error, please delete this email and any attachments and confirm this to the sender. Snell Limited, registered number 1160119 Registered in England, registered office at Hartman House, Danehill, Lower Earley, Reading, Berkshire RG6 4PB _______________________________________________ OSTech http://community.qnx.com/sf/go/post92877 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 02 May 2012 11:31:58 GMT http://community.qnx.com/sf/go/post92878 Thomas Haupt 2012-05-02T11:31:58Z post92877: RE: Restoring STDIN after redirection on command line ... http://community.qnx.com/sf/go/post92877 Thanks for that :-) I tried the following for "util < scriptfile" and it seems to do what I want ... ----------------------------------------------------- FILE * fc = stdin; ... fgets(fc, ... // Reads from redirected script file ... On EOF I do ... fclose(fc); fc = fdopen(STDOUT_FILENO, "r") ) == NULL ) ... fgets(fc, ... // Reads from keyboard ... ----------------------------------------------------- Bob Selby Senior Engineer, Software Snell Innovation in the Multi-Screen World T +44 (0) 118 921 4592 (direct) T +44 (0) 118 986 6123 (switchboard) F +44 (0) 118 975 4920 snellgroup.com Hartman House, Danehill, Lower Earley, Reading, Berkshire, RG6 4PB UK Routing | Modular Infrastructure | Conversion & Restoration | Live Production | Automation & Media Management | Control & Monitoring -----Original Message----- From: Thomas Haupt [mailto:thaupt@qnx.com] Sent: 02 May 2012 11:24 To: 'ostech-core_os@community.qnx.com' Subject: RE: Restoring STDIN after redirection on command line ... Hi Bob, I'm not sure if there is a really clean solution to your problem. To achieve the desired behavior, you would need to: - find out which device should become your new stdin (as you noticed, /dev/tty isn't necessarily the right choice), and - redirect the stream 'stdin' to take its input from that device. Finding the appropriate device may be anywhere between not too hard and impossible. In the easy case, stdout or stderr refer to the TTY you want to use. In the worst case, they have been redirected to files or closed entirely, and your process has detached from its controlling terminal (i.e., become a daemon) - in this scenario, there'd be no reasonable guess which device to attach to. Let's assume a simple case - stdout refers to a TTY. You could of course just call dup2( 1, 0 ) to duplicate the stdout file descriptor and have the duplicate your current stdin fd. The problem is that the (FILE) stream object represented by *stdin will not be aware of this change. There is the fdopen() function to wrap a FILE object around an existing file descriptor, but that will allocate a new object, not use an existing one... ...and alas, *stdin/-out/-err are static _objects_ - so we cannot merely replace stdin by a new pointer. You could try to flush and rewind the stdin stream, then call dup2( 1, 0 ) to replace the stdin file descriptor. I'd suggest, though, to provide your input file via a command line argument and have a few custom input functions that will read either from that file or, once it reached EOF, the original stdin. Cheers, Thomas -----Original Message----- From: Bob Selby [mailto:robert.selby@snellgroup.com] Sent: Mittwoch, 2. Mai 2012 10:46 To: ostech-core_os Subject: Restoring STDIN after redirection on command line ... A bit of a newbie question, possibly. I am trying to have a QNX 650 built utility that normally accepts its input from stdin but can be run with a script file with "utility < scriptfile" and then revert to input from the keyboard when it hits EOF. What is the best way to do this ?? Currently, at EOF I close "stdin" and then fopen("/dev/tty", "r") - this works well for the debug serial port but not for telnet, etc. TIA, Bob _______________________________________________ OSTech http://community.qnx.com/sf/go/post92871 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com _______________________________________________ OSTech http://community.qnx.com/sf/go/post92875 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com This email and any attachments are confidential, may be legally privileged and are intended for the use of the addressee only. If you are not the intended recipient, please note that any use, disclosure, printing or copying of this email is strictly prohibited and may be unlawful. If received in error, please delete this email and any attachments and confirm this to the sender. Snell Limited, registered number 1160119 Registered in England, registered office at Hartman House, Danehill, Lower Earley, Reading, Berkshire RG6 4PB Wed, 02 May 2012 11:15:02 GMT http://community.qnx.com/sf/go/post92877 Bob Selby 2012-05-02T11:15:02Z post92875: RE: Restoring STDIN after redirection on command line ... http://community.qnx.com/sf/go/post92875 Hi Bob, I'm not sure if there is a really clean solution to your problem. To achieve the desired behavior, you would need to: - find out which device should become your new stdin (as you noticed, /dev/tty isn't necessarily the right choice), and - redirect the stream 'stdin' to take its input from that device. Finding the appropriate device may be anywhere between not too hard and impossible. In the easy case, stdout or stderr refer to the TTY you want to use. In the worst case, they have been redirected to files or closed entirely, and your process has detached from its controlling terminal (i.e., become a daemon) - in this scenario, there'd be no reasonable guess which device to attach to. Let's assume a simple case - stdout refers to a TTY. You could of course just call dup2( 1, 0 ) to duplicate the stdout file descriptor and have the duplicate your current stdin fd. The problem is that the (FILE) stream object represented by *stdin will not be aware of this change. There is the fdopen() function to wrap a FILE object around an existing file descriptor, but that will allocate a new object, not use an existing one... ...and alas, *stdin/-out/-err are static _objects_ - so we cannot merely replace stdin by a new pointer. You could try to flush and rewind the stdin stream, then call dup2( 1, 0 ) to replace the stdin file descriptor. I'd suggest, though, to provide your input file via a command line argument and have a few custom input functions that will read either from that file or, once it reached EOF, the original stdin. Cheers, Thomas -----Original Message----- From: Bob Selby [mailto:robert.selby@snellgroup.com] Sent: Mittwoch, 2. Mai 2012 10:46 To: ostech-core_os Subject: Restoring STDIN after redirection on command line ... A bit of a newbie question, possibly. I am trying to have a QNX 650 built utility that normally accepts its input from stdin but can be run with a script file with "utility < scriptfile" and then revert to input from the keyboard when it hits EOF. What is the best way to do this ?? Currently, at EOF I close "stdin" and then fopen("/dev/tty", "r") - this works well for the debug serial port but not for telnet, etc. TIA, Bob _______________________________________________ OSTech http://community.qnx.com/sf/go/post92871 To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com Wed, 02 May 2012 10:26:41 GMT http://community.qnx.com/sf/go/post92875 Thomas Haupt 2012-05-02T10:26:41Z post92871: Restoring STDIN after redirection on command line ... http://community.qnx.com/sf/go/post92871 A bit of a newbie question, possibly. I am trying to have a QNX 650 built utility that normally accepts its input from stdin but can be run with a script file with "utility < scriptfile" and then revert to input from the keyboard when it hits EOF. What is the best way to do this ?? Currently, at EOF I close "stdin" and then fopen("/dev/tty", "r") - this works well for the debug serial port but not for telnet, etc. TIA, Bob Wed, 02 May 2012 08:46:01 GMT http://community.qnx.com/sf/go/post92871 Bob Selby 2012-05-02T08:46:01Z post92750: select_attach read callback with no data http://community.qnx.com/sf/go/post92750 We register a callback using select_attach on a file descriptor for /dev/ser1 with the SELECT_FLAG_READ and SELECT_FLAG_REARM flags and we're occasionally seeing cases where our callback is called and read() returns 0 bytes. Once this 0 byte read happens, a kernel trace shows the system going into a tight loop of ionotify, read 0 bytes, ionotify, read 0 bytes, etc.. Any ideas what could be causing devc-ser8250 to fire the callback when no data is actually pending? Thanks. Mark Thu, 26 Apr 2012 20:49:00 GMT http://community.qnx.com/sf/go/post92750 Mark Dowdy 2012-04-26T20:49:00Z post92698: Re: RE: How to reboot really fast? http://community.qnx.com/sf/go/post92698 Another fast reboot method. It is not very friendly to the file system. It solves known shutdown problems on some x86 boards under QNX 6.5.0. #define KBD_CTRL_IO 0x64 int main( void ) { uintptr_t hndl; if (ThreadCtl (_NTO_TCTL_IO, 0) != -1) { if ( (hndl = mmap_device_io(2, KBD_CTRL_IO)) != MAP_DEVICE_FAILED) { /* disable interrupts when accesing hardware */ /* write to the keyboard port system reset command */ asm("cli"); out8(KBD_CTRL_IO, 0xfe); // should not get here exit (EXIT_SUCCESS); } } exit(EXIT_FAILURE); } Mon, 23 Apr 2012 14:40:20 GMT http://community.qnx.com/sf/go/post92698 janusz ruszel 2012-04-23T14:40:20Z post92669: Re: Device register mapping in ARM http://community.qnx.com/sf/go/post92669 Memory mapped I/O doesn't require privileged mode, so _NTO_TCTL_IO is essentially only required to manipulate the CPSR I bit to disable interrupts. Sunil. On 12-04-20 5:56 AM, Richard Jones wrote: > I'd also like to know the answer to this question. > > i.e mmap_device_io appears to allow I/O access without I/O priveleges even though the documentation indicates ThreadCtl(...) is required. > > Is this an aspect of ARM memory mapped I/O and therefore only root permissions are required in order to do the mapping in the first place, or is this an oversight in the documentation that should indicate this isn't strictly necessary for ARM processors but should be coded thus for portability? > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post92662 > Fri, 20 Apr 2012 12:49:25 GMT http://community.qnx.com/sf/go/post92669 Sunil Kittur 2012-04-20T12:49:25Z post92662: Re: Device register mapping in ARM http://community.qnx.com/sf/go/post92662 I'd also like to know the answer to this question. i.e mmap_device_io appears to allow I/O access without I/O priveleges even though the documentation indicates ThreadCtl(...) is required. Is this an aspect of ARM memory mapped I/O and therefore only root permissions are required in order to do the mapping in the first place, or is this an oversight in the documentation that should indicate this isn't strictly necessary for ARM processors but should be coded thus for portability? Fri, 20 Apr 2012 09:56:17 GMT http://community.qnx.com/sf/go/post92662 Richard Jones 2012-04-20T09:56:17Z post92617: socketCAN in qnx http://community.qnx.com/sf/go/post92617 Is there socketCAN driver available for qnx 6.4.1? We like to have IP over CAN. Regards, Ranjit Wed, 18 Apr 2012 16:13:25 GMT http://community.qnx.com/sf/go/post92617 Ranjit Paulraj 2012-04-18T16:13:25Z post92603: Device register mapping in ARM http://community.qnx.com/sf/go/post92603 we are using AT91SAM9263 on QNX 6.4.1. As per QNX documentation 'mmap_device_io()' should be called only with io privileges. i.e)calling thread should have called ThreadCtl() with the _NTO_TCTL_IO before using mmap_device_io(). I got following code to toggle gpio port. I am able to run this code successful without io privilege. fyi, I am running this code as 'root'. #include <stdlib.h> #include <stdio.h> #include <stdint.h> #include <sys/mman.h> #include <arm/at91sam9263.h> #include <sys/types.h> #include <hw/inout.h> int main(int argc, char *argv[]) { volatile uintptr_t gpio_hw_vbase = (uintptr_t)MAP_FAILED; gpio_hw_vbase = mmap_device_io((size_t)(5u * (uint_t)AT91SAM9263_PIO_SIZE), (uint64_t)AT91SAM9263_PIOA_BASE); if(gpio_hw_vbase == MAP_FAILED) { printf("map failed, no io privilege"); } else { printf("map success, io privilege granted"); out32( (uintptr_t)(gpio_hw_vbase + ((uintptr_t)2*(uintptr_t)AT91SAM9263_PIO_SIZE) + AT91SAM9263_PIO_SODR), (uint32_t)0x00001000u ); getchar(); out32( (uintptr_t)(gpio_hw_vbase + ((uintptr_t)2*(uintptr_t)AT91SAM9263_PIO_SIZE) + AT91SAM9263_PIO_CODR), (uint32_t)0x00001000u ); } return EXIT_SUCCESS; } Wed, 18 Apr 2012 12:22:53 GMT http://community.qnx.com/sf/go/post92603 Ranjit Paulraj 2012-04-18T12:22:53Z post92599: Re: RE: check io privileges of a thread/process http://community.qnx.com/sf/go/post92599 Thanks for the explanation. It is very useful. Ranjit Wed, 18 Apr 2012 11:56:48 GMT http://community.qnx.com/sf/go/post92599 Ranjit Paulraj 2012-04-18T11:56:48Z post92445: Re: HAM http://community.qnx.com/sf/go/post92445 The priority is likely inherited through from a pulse or a message that is sent from the ham thread to the threads in question. See the following about QNX Neutrino IPC, specifically the heading on "Priority Inheritance and messages": http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=/com.qnx.doc.neutrino_sys_arch/ipc.html Wed, 04 Apr 2012 11:44:06 GMT http://community.qnx.com/sf/go/post92445 Gervais Mulongoy 2012-04-04T11:44:06Z post92433: HAM http://community.qnx.com/sf/go/post92433 Stopping ham by executing the command hamctrl -stop makes few running threads inherits the ham priority and make the system appear non-responsive. It appears that one of the thread which can occupy the entire cpu time, if allowed, is inheriting the ham priority and not allowing any other threads a chance to run. Any thoughts on how a thread can inherit the ham priority when the ham is stopped? Wed, 04 Apr 2012 00:47:57 GMT http://community.qnx.com/sf/go/post92433 Ranajit Samadder 2012-04-04T00:47:57Z post92244: RE: check io privileges of a thread/process http://community.qnx.com/sf/go/post92244 I'll create a PR to add the "F" format to the docs. Thanks for the explanation. Steve Reid (stever@qnx.com) Technical Editor QNX Software Systems -----Original Message----- From: Brian Stecher [mailto:community-noreply@qnx.com] Sent: Thursday, March 22, 2012 10:54 AM To: ostech-core_os Subject: Re: check io privileges of a thread/process Thread flags are different from process flags. #define _NTO_TF_IOPRIV 0x80000000 On Thu, Mar 22, 2012 at 10:30:25AM -0400, Steve Reid wrote: > The docs for pidin call that bit _NTO_PF_THREADWATCH. Is that correct? > > Steve Reid (stever@qnx.com) > Technical Editor > QNX Software Systems > > > -----Original Message----- > From: Brian Stecher [mailto:community-noreply@qnx.com] > Sent: Wednesday, March 21, 2012 8:43 AM > To: ostech-core_os > Subject: Re: check io privileges of a thread/process > > It's not in the usage message but "pidin -faNbF" will display the thread flags. > If the 0x80000000 bit is on, that thread has io priv. > > Brian > > On Wed, Mar 21, 2012 at 08:35:02AM -0400, Ranjit Paulraj wrote: > > Due to a overlook, we end up having multiple process having io privileges. So, many user processes are running in system mode. We have fixed this problem. Now we wanted to check whether io privileges are removed for user processes. shell commands like 'ps' or 'pidin' do not seem to display this status. Is there any other way to check this status? > > > > > > > > _______________________________________________ > > > > OSTech > > http://community.qnx.com/sf/go/post92220 > > > > -- > Brian Stecher (bstecher@qnx.com) QNX Software Systems Limited > phone: +1 (613) 591-0931 (voice) 1001 Farrar Road > +1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2K 0B3 > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post92221 > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post92239 > -- Brian Stecher (bstecher@qnx.com) QNX Software Systems Limited phone: +1 (613) 591-0931 (voice) 1001 Farrar Road +1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2K 0B3 _______________________________________________ OSTech http://community.qnx.com/sf/go/post92241 Thu, 22 Mar 2012 15:20:43 GMT http://community.qnx.com/sf/go/post92244 Steve Reid 2012-03-22T15:20:43Z post92241: Re: check io privileges of a thread/process http://community.qnx.com/sf/go/post92241 Thread flags are different from process flags. #define _NTO_TF_IOPRIV 0x80000000 On Thu, Mar 22, 2012 at 10:30:25AM -0400, Steve Reid wrote: > The docs for pidin call that bit _NTO_PF_THREADWATCH. Is that correct? > > Steve Reid (stever@qnx.com) > Technical Editor > QNX Software Systems > > > -----Original Message----- > From: Brian Stecher [mailto:community-noreply@qnx.com] > Sent: Wednesday, March 21, 2012 8:43 AM > To: ostech-core_os > Subject: Re: check io privileges of a thread/process > > It's not in the usage message but "pidin -faNbF" will display the thread flags. > If the 0x80000000 bit is on, that thread has io priv. > > Brian > > On Wed, Mar 21, 2012 at 08:35:02AM -0400, Ranjit Paulraj wrote: > > Due to a overlook, we end up having multiple process having io privileges. So, many user processes are running in system mode. We have fixed this problem. Now we wanted to check whether io privileges are removed for user processes. shell commands like 'ps' or 'pidin' do not seem to display this status. Is there any other way to check this status? > > > > > > > > _______________________________________________ > > > > OSTech > > http://community.qnx.com/sf/go/post92220 > > > > -- > Brian Stecher (bstecher@qnx.com) QNX Software Systems Limited > phone: +1 (613) 591-0931 (voice) 1001 Farrar Road > +1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2K 0B3 > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post92221 > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post92239 > -- Brian Stecher (bstecher@qnx.com) QNX Software Systems Limited phone: +1 (613) 591-0931 (voice) 1001 Farrar Road +1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2K 0B3 Thu, 22 Mar 2012 14:54:27 GMT http://community.qnx.com/sf/go/post92241 Brian Stecher 2012-03-22T14:54:27Z post92239: RE: check io privileges of a thread/process http://community.qnx.com/sf/go/post92239 The docs for pidin call that bit _NTO_PF_THREADWATCH. Is that correct? Steve Reid (stever@qnx.com) Technical Editor QNX Software Systems -----Original Message----- From: Brian Stecher [mailto:community-noreply@qnx.com] Sent: Wednesday, March 21, 2012 8:43 AM To: ostech-core_os Subject: Re: check io privileges of a thread/process It's not in the usage message but "pidin -faNbF" will display the thread flags. If the 0x80000000 bit is on, that thread has io priv. Brian On Wed, Mar 21, 2012 at 08:35:02AM -0400, Ranjit Paulraj wrote: > Due to a overlook, we end up having multiple process having io privileges. So, many user processes are running in system mode. We have fixed this problem. Now we wanted to check whether io privileges are removed for user processes. shell commands like 'ps' or 'pidin' do not seem to display this status. Is there any other way to check this status? > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post92220 > -- Brian Stecher (bstecher@qnx.com) QNX Software Systems Limited phone: +1 (613) 591-0931 (voice) 1001 Farrar Road +1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2K 0B3 _______________________________________________ OSTech http://community.qnx.com/sf/go/post92221 Thu, 22 Mar 2012 14:30:24 GMT http://community.qnx.com/sf/go/post92239 Steve Reid 2012-03-22T14:30:24Z post92221: Re: check io privileges of a thread/process http://community.qnx.com/sf/go/post92221 It's not in the usage message but "pidin -faNbF" will display the thread flags. If the 0x80000000 bit is on, that thread has io priv. Brian On Wed, Mar 21, 2012 at 08:35:02AM -0400, Ranjit Paulraj wrote: > Due to a overlook, we end up having multiple process having io privileges. So, many user processes are running in system mode. We have fixed this problem. Now we wanted to check whether io privileges are removed for user processes. shell commands like 'ps' or 'pidin' do not seem to display this status. Is there any other way to check this status? > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post92220 > -- Brian Stecher (bstecher@qnx.com) QNX Software Systems Limited phone: +1 (613) 591-0931 (voice) 1001 Farrar Road +1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2K 0B3 Wed, 21 Mar 2012 12:42:51 GMT http://community.qnx.com/sf/go/post92221 Brian Stecher 2012-03-21T12:42:51Z post92220: check io privileges of a thread/process http://community.qnx.com/sf/go/post92220 Due to a overlook, we end up having multiple process having io privileges. So, many user processes are running in system mode. We have fixed this problem. Now we wanted to check whether io privileges are removed for user processes. shell commands like 'ps' or 'pidin' do not seem to display this status. Is there any other way to check this status? Wed, 21 Mar 2012 12:35:02 GMT http://community.qnx.com/sf/go/post92220 Ranjit Paulraj 2012-03-21T12:35:02Z post92215: Re: missing function getopt_long() in libc http://community.qnx.com/sf/go/post92215 Hello, I am looking for the getopt_long function compiled for QNX/ARM. Is there a version out there? If not where I can find a src package that I can build? Thanks, -Zahira Tue, 20 Mar 2012 20:29:31 GMT http://community.qnx.com/sf/go/post92215 Zahira Ammarguellat 2012-03-20T20:29:31Z post92100: can some pleaseexplain the cache callout code. http://community.qnx.com/sf/go/post92100 Dear QNX forum, I am trying to understand these call outs implementation, 1. Is this code is for L1 cache or L2 cache ? if L2 , does L2 also has separate data and instruction cache areas? 2. cache_mp11_i and cache_mp11_d , what are they representing ? data cahne and instruction cahce? 3. How much cache memory is available in this file. Is it 32*64*1024/8 = 256 KB ? or it is implementation for a 512KB cache? 4. If I want to change it to 1MB cache , what are the changes required ? 5. Where can I find help for the CP15 instructions used here ? any link ? 6. Where else we will tell to the QNX OS about the 7. If this code is not for L2 cache. Pleas provide information / location where I have to see for L2 cache code. Thanks, Ravinder Are # # Copyright 2007, 2008, QNX Software Systems. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not reproduce, modify or distribute this software except in # compliance with the License. You may obtain a copy of the License # at: http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" basis, # WITHOUT WARRANTIES OF ANY KIND, either express or implied. # # This file may contain contributions from others, either as # contributors under the License or as licensors under other terms. # Please review this entire file for other proprietary rights or license # notices, as well as the QNX Development Suite License Guide at # http://licensing.qnx.com/license-guide/ for other information. # /* * ARM11 MPcore specific cache operations * * unsigned control(paddr32_t base, * unsigned num_lines, * int flags, * struct cacheattr_entry *cache, * volatile struct syspage_entry * ) */ #include "callout.ah" #define MAX_LINES 32 #define LINE_SIZE 32 CALLOUT_START(cache_mp11_i, 0, 0) /* * Trim the address to a cache line boundary, and stop at 32 lines * to avoid having to re-issue the whole flush if we get preempted */ bic r3, r0, #0x1f cmp r1, #MAX_LINES movhi r1, #MAX_LINES mov r0, r1 /* * Invalidate lines by address */ 0: mcr p15, 0, r3, c7, c5, 1 add r3, r3, #LINE_SIZE subs r1, r1, #1 bne 0b mov pc, lr CALLOUT_END(cache_mp11_i) CALLOUT_START(cache_mp11_d, 0, 0) /* * Trim the address to a cache line boundary, and stop at 32 lines * to avoid having to re-issue the whole flush if we get preempted */ bic r3, r0, #0x1f cmp r1, #MAX_LINES movhi r1, #MAX_LINES mov r0, r1 tst r2, #MS_INVALIDATE bne 1f /* * Clean lines by address */ 0: mcr p15, 0, r3, c7, c10, 1 add r3, r3, #LINE_SIZE subs r1, r1, #1 bne 0b /* * Drain write buffer */ mcr p15, 0, r1, c7, c10, 4 mov pc, lr /* * Clean and invalidate lines by address */ 1: mcr p15, 0, r3, c7, c14, 1 add r3, r3, #LINE_SIZE subs r1, r1, #1 bne 1b /* * Drain write buffer */ mcr p15, 0, r1, c7, c10, 4 mov pc, lr CALLOUT_END(cache_mp11_d) Wed, 14 Mar 2012 01:58:10 GMT http://community.qnx.com/sf/go/post92100 ravinder are 2012-03-14T01:58:10Z post92083: Re: RE: RE: shm_ctl() fails when setting up a shared memory physical DMA buffer for a PCI card http://community.qnx.com/sf/go/post92083 It's a long story so I'll be as brief as possible. I'm writing a QNX driver for our PCI and PCIe boards which have 3 data links. I do have a working driver using mmap and memoffset64 but this limits access to the driver buffers to the driver process. I originally designesd our QNX driver as a full resource manager driver but I found that there was a problem with multiple reads and writes (i.e. serviing 3 duplex data links concurrently). I documented this issue at: http://community.qnx.com/sf/discussion/do/listPosts/projects.community/discussion.community.topc21108 and never found a solution. We needed to get driver released so I kept the resource manager but bypassed read and write, instead using a seperate thread (and shared events) for each readlink and write link to copy data to/from the dma buffers to/from shared memory buffers accessed by a higher level API running in a user process. This works reliably but is too processor intensive. So, to improve this, the obvious solution is to use a single buffer to DMA in and out of that our driver interface API (running in a user process) can memcpy in/out of. Tue, 13 Mar 2012 14:10:51 GMT http://community.qnx.com/sf/go/post92083 Iain Martin 2012-03-13T14:10:51Z post92079: RE: RE: shm_ctl() fails when setting up a shared memory physical DMA buffer for a PCI card http://community.qnx.com/sf/go/post92079 Hi Iain, that's a bit weird; I tested on a quad-core SMP x86 machine with QNX 6.5.0 as well... Here's a question for you: Do you actually need that DMA memory to be in a shared memory object? If you only needed access to the memory in the application that allocates the memory, you could use only mmap() and mem_offset(). Cheers, Thomas -----Original Message----- From: Iain Martin [mailto:community-noreply@qnx.com] Sent: Dienstag, 13. März 2012 14:50 To: ostech-core_os Subject: Re: RE: shm_ctl() fails when setting up a shared memory physical DMA buffer for a PCI card Thanks for your quick reply. Unfortunately, it also fails for me the first time I run it, when there is no physical memory associated with the shared memory object. I retested with a new memory object to confirm this. As it works for you the first time, that suggests to me that the approach I'm taking is sensible? I neglected to mention that I am using QNX 6.5.0. _______________________________________________ OSTech http://community.qnx.com/sf/go/post92078 Tue, 13 Mar 2012 13:55:06 GMT http://community.qnx.com/sf/go/post92079 Thomas Haupt 2012-03-13T13:55:06Z post92078: Re: RE: shm_ctl() fails when setting up a shared memory physical DMA buffer for a PCI card http://community.qnx.com/sf/go/post92078 Thanks for your quick reply. Unfortunately, it also fails for me the first time I run it, when there is no physical memory associated with the shared memory object. I retested with a new memory object to confirm this. As it works for you the first time, that suggests to me that the approach I'm taking is sensible? I neglected to mention that I am using QNX 6.5.0. Tue, 13 Mar 2012 13:50:12 GMT http://community.qnx.com/sf/go/post92078 Iain Martin 2012-03-13T13:50:12Z post92076: RE: shm_ctl() fails when setting up a shared memory physical DMA buffer for a PCI card http://community.qnx.com/sf/go/post92076 Hi Iain, I can reproduce the problem - if the shared memory object already exists and has physical memory assigned to it. When I run your code for the first time, it works perfectly. From then on, it will fail on shm_ctl. This kind of makes sense, since you're trying to associate physical memory with a shared memory object which already has physical memory associated with it. It's mostly the error code that is misleading. Cheers, Thomas -----Original Message----- From: Iain Martin [mailto:community-noreply@qnx.com] Sent: Dienstag, 13. März 2012 13:54 To: ostech-core_os Subject: shm_ctl() fails when setting up a shared memory physical DMA buffer for a PCI card I am trying to set up a shared memory buffer for DMA, so I can DMA directly in/out from one process and memcpy in/out from other processes but shm_ctl() fails. I have been "doing the dance" with shm_open(), shm_ctl(), mmap() and mem_offset64() but not managed to combine these in a way that enables the call to shm_ctl to succeed with the physical flag set. There are other threads on this topic and I have followed their suggestions but they don't work for me. (for example: http://www.openqnx.com/newsgroups/viewtopic.php?f=13&t=12398) The "tested example" that thread works for me but it specifies the phyiscal address directly and does not obtain it from an mmap allocation followed by mem_offset64. As soon as I pass the mmap allocation physical address to shm_ctl(), it fails with "error: Function not implemented". I'm testing on a 4 core x86 PC. An extract from my code is: /* Allocate contiguous memory for DMA buffer */ /* byte size is page aligned */ uint32_t * ptr = mmap(NULL, bytesize, PROT_READ | PROT_WRITE | PROT_NOCACHE, MAP_PHYS | MAP_ANON, NOFD, 0); /* Get the physical addresss, note that mem_offset fails so I use mem_offset64 */ mem_offset64(ptr, NOFD, bytesize, &physical_addr_64, &contig_len /* Create a shared memory object */ int fd = shm_open("/turnip", O_RDWR | O_CREAT, 0644); /* Overlay the shared memory object to the physical memory address */ if (shm_ctl(fd, SHMCTL_GLOBAL|SHMCTL_PHYS, physical_addr_64, bytesize) == -1) { perror("shm_open"); exit(EXIT_FAILURE); } If I replace physical_addr_64 with 0xa0000, shm_ctl() works but this seems too risky because I am allocating a large amount for memory for driver DMA buffers so I'm not happy just picking any physical address for a driver buffer. If I just use mmap and memoffset_64 to have a DMA buffer in process memory space this works fine and if I create a shared memory objects, this also works fine. I have read conflicting accounts of using ltruncate to allocate the physical buffer but I couldn't get that to work either and Ithink I'm going round in circles now! Any help or advice would be greatly appreciated. Is it possible to allocate a DMA buffer that can be shared between processes? _______________________________________________ OSTech http://community.qnx.com/sf/go/post92072 Tue, 13 Mar 2012 13:19:20 GMT http://community.qnx.com/sf/go/post92076 Thomas Haupt 2012-03-13T13:19:20Z post92072: shm_ctl() fails when setting up a shared memory physical DMA buffer for a PCI card http://community.qnx.com/sf/go/post92072 I am trying to set up a shared memory buffer for DMA, so I can DMA directly in/out from one process and memcpy in/out from other processes but shm_ctl() fails. I have been "doing the dance" with shm_open(), shm_ctl(), mmap() and mem_offset64() but not managed to combine these in a way that enables the call to shm_ctl to succeed with the physical flag set. There are other threads on this topic and I have followed their suggestions but they don't work for me. (for example: http://www.openqnx.com/newsgroups/viewtopic.php?f=13&t=12398) The "tested example" that thread works for me but it specifies the phyiscal address directly and does not obtain it from an mmap allocation followed by mem_offset64. As soon as I pass the mmap allocation physical address to shm_ctl(), it fails with "error: Function not implemented". I'm testing on a 4 core x86 PC. An extract from my code is: /* Allocate contiguous memory for DMA buffer */ /* byte size is page aligned */ uint32_t * ptr = mmap(NULL, bytesize, PROT_READ | PROT_WRITE | PROT_NOCACHE, MAP_PHYS | MAP_ANON, NOFD, 0); /* Get the physical addresss, note that mem_offset fails so I use mem_offset64 */ mem_offset64(ptr, NOFD, bytesize, &physical_addr_64, &contig_len /* Create a shared memory object */ int fd = shm_open("/turnip", O_RDWR | O_CREAT, 0644); /* Overlay the shared memory object to the physical memory address */ if (shm_ctl(fd, SHMCTL_GLOBAL|SHMCTL_PHYS, physical_addr_64, bytesize) == -1) { perror("shm_open"); exit(EXIT_FAILURE); } If I replace physical_addr_64 with 0xa0000, shm_ctl() works but this seems too risky because I am allocating a large amount for memory for driver DMA buffers so I'm not happy just picking any physical address for a driver buffer. If I just use mmap and memoffset_64 to have a DMA buffer in process memory space this works fine and if I create a shared memory objects, this also works fine. I have read conflicting accounts of using ltruncate to allocate the physical buffer but I couldn't get that to work either and Ithink I'm going round in circles now! Any help or advice would be greatly appreciated. Is it possible to allocate a DMA buffer that can be shared between processes? Tue, 13 Mar 2012 12:53:51 GMT http://community.qnx.com/sf/go/post92072 Iain Martin 2012-03-13T12:53:51Z post91976: Re: cpu_pte_split() problem in QNX procnto. http://community.qnx.com/sf/go/post91976 A crash in cpu_pte_manipulate typically means that an L2 table is not mapped - the code checks whether there is a valid L1 entry for the address range, and if so, expects that there is an L2 table allocated. The L2 tables are mapped within a sparse 4MB space where 4K of tables should be mapped for each 4MB area that is covered by valid L1 entries. The code will crash if the mapping in that region is not present. What OS version and cpu target are you using? Is this the first user address space that has been created? Sunil. On 12-03-08 5:59 AM, ravinder are wrote: > Dear QNX-OSTech, > > We are working on ARM based platform. While the procnto starts running we are seeing a hard crash. Please check the below call stack. > It is appearing like there is some problem while preparing a Page Table entry by making pte split, which was called by mmap(). > In our case we are trying to allocate 1560 bytes memory, for that it is trying to split a 10MB space and create pte entry . Please find the MMU entries below. > From the trace messages Mmap() is trying to map the physical address paddr = 0x80C36000, to vaddr = 0x78000000. > To allocate the physical address 0x80C36000 from the MMU table entries ,it is observed that the 10MB+ has to be split. > > we found similar issue at http://community.qnx.com/sf/go/projects.core_os/discussion.newcode.topc3141 > > Please suggest /provide some solution. > > CallStack > > __hardcrash(asm) > > exception > cpu_pte_split( > vaddr = 0x78000000, > data = 0xE8AFBBE0 = BUILDENV_qss+0x0E8AFBBDF -> ( > paddr = 0x80C36000, > adp = 0xE8CDF49C = BUILDENV_qss+0x0E8CDF49B, > start = 0x78000000, > end = 0x78001FFF, > split_end = 0x78001FFF, > first = 0x78000000, > prot = 0x0561, > op = 0x81, > special = 0x0, > shmem_flags = 0x00030002)) > flags = 0x8 > r = 0x78000000 > va = 0x78000000 > asid = 0x2 > pte = 0xFFBF0780 = end+0x1B1E058 -> 0xC0C0C0C0 > ptp = 0xFFFF3E00 = end+0x1F216D8 -> 0xC0C0C0C0 > > do_manipulation( > manip = 0xE8AFBBE0 = BUILDENV_qss+0x0E8AFBBDF -> ( > data = (paddr = 0x80C36000, adp = 0xE8CDF49C = BUILDENV_qss+0x0E8CDF49B, start = 0x78000000, end = > state = 0x0, > mapped = 0x78000000)) > > ker_manipulate( > data = 0xE8AFBBE0 = BUILDENV_qss+0x0E8AFBBDF -> ) > > ker_ring0( > ?, > ?) > > > MMU page table > > _________address_____________|_physical____________________|sec|_d_|_size____|_permissions____________________|_glb|_shr|_pageflags_( > C:0002:00000000--DFFFFFFF| | | | | | | | > C:0002:E0000000--E8CFFFFF| A:00:80200000--88EFFFFF| ns| 00| 00100000| P:readwrite U:noaccess exec | yes| no | strongly or > C:0002:E8D00000--FC3FFFFF| | | | | | | | > C:0002:FC400000--FC403FFF| A:00:80CD4000--80CD7FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FC404000--FC404FFF| A:00:80CDC000--80CDCFFF| ns| 00| 00001000| P:readwrite U:readonly exec | yes| no | strongly or > C:0002:FC405000--FC405FFF| A:00:0209A000--0209AFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FC406000--FC408FFF| A:00:02000000--02002FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FC409000--FC40BFFF| A:00:02000000--02002FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FC40C000--FC40EFFF| A:00:02000000--02002FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FC40F000--FC411FFF| A:00:02000000--02002FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FC412000--FC413FFF| A:00:00800000--00801FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FC414000--FC414FFF| A:00:2A03F000--2A03FFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FC415000--FC416FFF| A:00:00800000--00801FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FC417000--FC417FFF| A:00:2A03F000--2A03FFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FC418000--FC418FFF| A:00:02000000--02000FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FC419000--FC41AFFF| A:00:00800000--00801FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FC41B000--FC41CFFF| A:00:00800000--00801FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FC41D000--FC41DFFF| A:00:0208A000--0208AFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FC41E000--FC41EFFF| A:00:0208A000--0208AFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FC41F000--FC41FFFF| A:00:00200000--00200FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FC420000--FC421FFF| A:00:2A03F000--2A040FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FC422000--FC422FFF| A:00:00200000--00200FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FC423000--FC424FFF| A:00:2A03F000--2A040FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FC425000--FC425FFF| A:00:88EED000--88EEDFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FC426000--FDFFFFFF| | | | | | | | > C:0002:FE000000--FE0FFFFF| A:00:80200000--802FFFFF| ns| 00| 00100000| P:readwrite U:noaccess exec | yes| no | strongly or > ____C:0002:FE100000--FFBEFFFF|_____________________________|___|___|_________|________________________________|____|____| > C:0002:FFBF0000--FFBF0FFF| A:00:88CF4000--88CF4FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| no | no | strongly or > C:0002:FFBF1000--FFBF1FFF| A:00:80CD9000--80CD9FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FFBF2000--FFBFDFFF| | | | | | | | > C:0002:FFBFE000--FFBFEFFF| A:00:80CD8000--80CD8FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FFBFF000--FFBFFFFF| A:00:80CDB000--80CDBFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or > C:0002:FFC00000--FFFEFFFF| | | | | | | | > C:0002:FFFF0000--FFFF0FFF| A:00:80CDA000--80CDAFFF| ns| 00| 00001000| P:readwrite U:noaccess exec | yes| no | strongly or > C:0002:FFFF1000--FFFF1FFF| | | | | | | | > C:0002:FFFF2000--FFFF3FFF| A:00:88ECA000--88ECBFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| no | no | strongly or > C:0002:FFFF4000--FFFFFFFF| | | | | | | | > > > Thanks, > Ravinder Are > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post91971 > Thu, 08 Mar 2012 14:50:07 GMT http://community.qnx.com/sf/go/post91976 Sunil Kittur 2012-03-08T14:50:07Z post91971: cpu_pte_split() problem in QNX procnto. http://community.qnx.com/sf/go/post91971 Dear QNX-OSTech, We are working on ARM based platform. While the procnto starts running we are seeing a hard crash. Please check the below call stack. It is appearing like there is some problem while preparing a Page Table entry by making pte split, which was called by mmap(). In our case we are trying to allocate 1560 bytes memory, for that it is trying to split a 10MB space and create pte entry . Please find the MMU entries below. From the trace messages Mmap() is trying to map the physical address paddr = 0x80C36000, to vaddr = 0x78000000. To allocate the physical address 0x80C36000 from the MMU table entries ,it is observed that the 10MB+ has to be split. we found similar issue at http://community.qnx.com/sf/go/projects.core_os/discussion.newcode.topc3141 Please suggest /provide some solution. CallStack __hardcrash(asm) exception cpu_pte_split( vaddr = 0x78000000, data = 0xE8AFBBE0 = BUILDENV_qss+0x0E8AFBBDF -> ( paddr = 0x80C36000, adp = 0xE8CDF49C = BUILDENV_qss+0x0E8CDF49B, start = 0x78000000, end = 0x78001FFF, split_end = 0x78001FFF, first = 0x78000000, prot = 0x0561, op = 0x81, special = 0x0, shmem_flags = 0x00030002)) flags = 0x8 r = 0x78000000 va = 0x78000000 asid = 0x2 pte = 0xFFBF0780 = end+0x1B1E058 -> 0xC0C0C0C0 ptp = 0xFFFF3E00 = end+0x1F216D8 -> 0xC0C0C0C0 do_manipulation( manip = 0xE8AFBBE0 = BUILDENV_qss+0x0E8AFBBDF -> ( data = (paddr = 0x80C36000, adp = 0xE8CDF49C = BUILDENV_qss+0x0E8CDF49B, start = 0x78000000, end = state = 0x0, mapped = 0x78000000)) ker_manipulate( data = 0xE8AFBBE0 = BUILDENV_qss+0x0E8AFBBDF -> ) ker_ring0( ?, ?) MMU page table _________address_____________|_physical____________________|sec|_d_|_size____|_permissions____________________|_glb|_shr|_pageflags_( C:0002:00000000--DFFFFFFF| | | | | | | | C:0002:E0000000--E8CFFFFF| A:00:80200000--88EFFFFF| ns| 00| 00100000| P:readwrite U:noaccess exec | yes| no | strongly or C:0002:E8D00000--FC3FFFFF| | | | | | | | C:0002:FC400000--FC403FFF| A:00:80CD4000--80CD7FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FC404000--FC404FFF| A:00:80CDC000--80CDCFFF| ns| 00| 00001000| P:readwrite U:readonly exec | yes| no | strongly or C:0002:FC405000--FC405FFF| A:00:0209A000--0209AFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FC406000--FC408FFF| A:00:02000000--02002FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FC409000--FC40BFFF| A:00:02000000--02002FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FC40C000--FC40EFFF| A:00:02000000--02002FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FC40F000--FC411FFF| A:00:02000000--02002FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FC412000--FC413FFF| A:00:00800000--00801FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FC414000--FC414FFF| A:00:2A03F000--2A03FFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FC415000--FC416FFF| A:00:00800000--00801FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FC417000--FC417FFF| A:00:2A03F000--2A03FFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FC418000--FC418FFF| A:00:02000000--02000FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FC419000--FC41AFFF| A:00:00800000--00801FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FC41B000--FC41CFFF| A:00:00800000--00801FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FC41D000--FC41DFFF| A:00:0208A000--0208AFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FC41E000--FC41EFFF| A:00:0208A000--0208AFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FC41F000--FC41FFFF| A:00:00200000--00200FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FC420000--FC421FFF| A:00:2A03F000--2A040FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FC422000--FC422FFF| A:00:00200000--00200FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FC423000--FC424FFF| A:00:2A03F000--2A040FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FC425000--FC425FFF| A:00:88EED000--88EEDFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FC426000--FDFFFFFF| | | | | | | | C:0002:FE000000--FE0FFFFF| A:00:80200000--802FFFFF| ns| 00| 00100000| P:readwrite U:noaccess exec | yes| no | strongly or ____C:0002:FE100000--FFBEFFFF|_____________________________|___|___|_________|________________________________|____|____| C:0002:FFBF0000--FFBF0FFF| A:00:88CF4000--88CF4FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| no | no | strongly or C:0002:FFBF1000--FFBF1FFF| A:00:80CD9000--80CD9FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FFBF2000--FFBFDFFF| | | | | | | | C:0002:FFBFE000--FFBFEFFF| A:00:80CD8000--80CD8FFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FFBFF000--FFBFFFFF| A:00:80CDB000--80CDBFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| yes| no | strongly or C:0002:FFC00000--FFFEFFFF| | | | | | | | C:0002:FFFF0000--FFFF0FFF| A:00:80CDA000--80CDAFFF| ns| 00| 00001000| P:readwrite U:noaccess exec | yes| no | strongly or C:0002:FFFF1000--FFFF1FFF| | | | | | | | C:0002:FFFF2000--FFFF3FFF| A:00:88ECA000--88ECBFFF| ns| 00| 00001000| P:readwrite U:noaccess notexec| no | no | strongly or C:0002:FFFF4000--FFFFFFFF| | | | | | | | Thanks, Ravinder Are Thu, 08 Mar 2012 10:59:07 GMT http://community.qnx.com/sf/go/post91971 ravinder are 2012-03-08T10:59:07Z post91913: Crash in IP stack http://community.qnx.com/sf/go/post91913 Hi, We are encountering error while accessing /dev/io-net/ip0. Errno indicates "No such file or directory". Pls. indicate its probable cause and solution. regards, Tue, 06 Mar 2012 04:22:57 GMT http://community.qnx.com/sf/go/post91913 Christian Scheuch 2012-03-06T04:22:57Z post91776: Re: Kernel trace : setup static filters to trace only specific processes http://community.qnx.com/sf/go/post91776 Hello Colin, It`s quite a pity. Anyway, now it is clear, thank you! Fri, 24 Feb 2012 17:41:48 GMT http://community.qnx.com/sf/go/post91776 Konstantin V 2012-02-24T17:41:48Z post91768: Re: Kernel trace : dynamic filtering : event handler restrictions http://community.qnx.com/sf/go/post91768 It's essentially the same as an interrupt handler - your entire address space is mapped, but you are limited in stack usage and can't make any kernel calls. On 12-02-24 5:59 AM, Konstantin V wrote: > Hello QNX Developers, > > As I understand from docs, I can attach event handling routine via TraceEvent (_NTO_TRACE_ADDEVENTHANDLER, ...) and it will be called by the kernel directly. > > 1) What are the stack restrictions ? > > 2) How much of process address space is mapped ? > Can I affect it in any way ? > Example code from QNX documentation accesses process global variable, so I assume that at least > some part of process address space is mapped. > In case of complete address space is mapped, then may be it makes > sense to keep the size of the executable implementing dynamic kernel event filtering > as small as possible... > > Thank you! > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post91764 > -- cburgess@qnx.com Fri, 24 Feb 2012 13:18:01 GMT http://community.qnx.com/sf/go/post91768 Colin Burgess 2012-02-24T13:18:01Z post91767: Re: Kernel trace : setup static filters to trace only specific processes http://community.qnx.com/sf/go/post91767 Hi Konstantin, You will have to use dynamic filtering, the static pid filter is limited to one pid. On 12-02-24 5:23 AM, Konstantin V wrote: > Hello QNX Developers, > > I need to setup kernel trace filters so only communication messages emitted by specific processes are recorded. I followed QNX documentation and wrote little helper util, but eventually tracing is performed only for the last process specified. > > The core functionality of this util is based on following TraceEvent() call : > TraceEvent(_NTO_TRACE_SETCLASSPID, int class, pid_t pid) > > Usecase > > 1) Execute tracelogger : tracelogger -d1 -s 10 -f trace_mcd_`date -t`.kev > 2) In another console, get required process ids : pidin -f "aA" | grep -i -E "eide|mcd|any_other" > 3) Start tracing : ./mcd_event_filter 1 2 3 > > Note that in case of tracelogger is not running, setting filters will (legally) fail : ./mcd_event_filter: line:109 function call TraceEvent() failed, errno(47): Operation canceled > > Expected results : > - kernel trace for communication messages (and other trace classes) caused by all these processes is enabled > > Current behavior : > - kernel trace only for the last (!) PID specified is available > > Could you please point me what`s wrong with this idea/util ? > > Is it possible to implement such filter without resorting to dynamic filtering ? > > See attached source for the mentioned code. > > Thank you! > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post91763 -- cburgess@qnx.com Fri, 24 Feb 2012 13:17:11 GMT http://community.qnx.com/sf/go/post91767 Colin Burgess 2012-02-24T13:17:11Z post91764: Kernel trace : dynamic filtering : event handler restrictions http://community.qnx.com/sf/go/post91764 Hello QNX Developers, As I understand from docs, I can attach event handling routine via TraceEvent (_NTO_TRACE_ADDEVENTHANDLER, ...) and it will be called by the kernel directly. 1) What are the stack restrictions ? 2) How much of process address space is mapped ? Can I affect it in any way ? Example code from QNX documentation accesses process global variable, so I assume that at least some part of process address space is mapped. In case of complete address space is mapped, then may be it makes sense to keep the size of the executable implementing dynamic kernel event filtering as small as possible... Thank you! Fri, 24 Feb 2012 10:59:10 GMT http://community.qnx.com/sf/go/post91764 Konstantin V 2012-02-24T10:59:10Z post91763: Kernel trace : setup static filters to trace only specific processes http://community.qnx.com/sf/go/post91763 Hello QNX Developers, I need to setup kernel trace filters so only communication messages emitted by specific processes are recorded. I followed QNX documentation and wrote little helper util, but eventually tracing is performed only for the last process specified. The core functionality of this util is based on following TraceEvent() call : TraceEvent(_NTO_TRACE_SETCLASSPID, int class, pid_t pid) Usecase 1) Execute tracelogger : tracelogger -d1 -s 10 -f trace_mcd_`date -t`.kev 2) In another console, get required process ids : pidin -f "aA" | grep -i -E "eide|mcd|any_other" 3) Start tracing : ./mcd_event_filter 1 2 3 Note that in case of tracelogger is not running, setting filters will (legally) fail : ./mcd_event_filter: line:109 function call TraceEvent() failed, errno(47): Operation canceled Expected results : - kernel trace for communication messages (and other trace classes) caused by all these processes is enabled Current behavior : - kernel trace only for the last (!) PID specified is available Could you please point me what`s wrong with this idea/util ? Is it possible to implement such filter without resorting to dynamic filtering ? See attached source for the mentioned code. Thank you! Fri, 24 Feb 2012 10:23:23 GMT http://community.qnx.com/sf/go/post91763 Konstantin V 2012-02-24T10:23:23Z post91696: Disc cache get inefficient while used http://community.qnx.com/sf/go/post91696 Hi, I've noticed that disc caches get inefficient when used for longer time. I see this when I compile my project (~1000 cpp files, build folders with all the compiled objects and binaries > 2.6 Gb). If I build right after computer reboot the build completes much faster. However if computer had been used for some time the build can take twice as long and even more. Having experimented a little I've found that the main bottleneck is the includes search/loading during compilation. Nothing helped except for increasing disk caches size. Currently my system runs with "blk cache=1792m,mfu=33,vnode=10240" on 4Gb RAM quad-core machine. If files are compiled soon after reboot the disc activity heared is minimal. However if project is built after some use (even if build folder with project files and compiled objects are just deleted and unpacked once again) the disc activity on next build gets much higher for each file and pauses between files get noticeably longer. So something is definitelty wrong with disc caching algorithms you implemented for 650. Tue, 21 Feb 2012 22:30:41 GMT http://community.qnx.com/sf/go/post91696 Oleh Derevenko 2012-02-21T22:30:41Z post91626: Display resolution is out of range http://community.qnx.com/sf/go/post91626 Hi, I compiled and flashed QNX image to my board. When i started it, display says "out of range". Its about resolution problem. So, i need to change resolution datas over terminal, because no have woking screen. About that, how can i do it, could you help me about that? Note: Terminal screenshot added to attachment (need to edit xres and yres). Thanks, Mr. Can Thu, 16 Feb 2012 02:21:36 GMT http://community.qnx.com/sf/go/post91626 Mustafa Can Kaya 2012-02-16T02:21:36Z post91561: Re: Try to install qnxsdp-6.5.0-201007091524-dvd.iso, but fail. The error code is at below http://community.qnx.com/sf/go/post91561 Final solution: 1. Install qnxsdp-6.4.0-200810211530-dvd okay. Give up the version of 6.5.0. Tue, 14 Feb 2012 14:54:01 GMT http://community.qnx.com/sf/go/post91561 HuiHsien Wu 2012-02-14T14:54:01Z post91546: Re: MTU configuration on IPStack http://community.qnx.com/sf/go/post91546 Here are the details of ifconfig ifconfig lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 33212 capabilities=7<IP4CSUM,TCP4CSUM,UDP4CSUM> enabled=0<> inet 127.0.0.1 netmask 0xff000000 en0: flags=843<UP,BROADCAST,RUNNING,SIMPLEX> mtu 1500 address: 00:40:43:15:1a:30 inet 192.168.255.126 netmask 0xffff0000 broadcast 192.168.255.255 en1: flags=843<UP,BROADCAST,RUNNING,SIMPLEX> mtu 1504 address: 10:71:61:03:38:00 inet 172.18.4.244 netmask 0xffffff00 broadcast 172.18.4.255 en2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 address: 1e:42:86:27:01:08 inet 192.168.255.126 netmask 0xffff0000 broadcast 192.168.255.255 inet alias 192.168.255.125 netmask 0xffffff80 broadcast 192.168.255.127 vlan4095: flags=843<UP,BROADCAST,RUNNING,SIMPLEX> mtu 1500 vlan: 4095 parent: en0 address: 00:40:43:15:1a:30 vlan799: flags=843<UP,BROADCAST,RUNNING,SIMPLEX> mtu 1500 vlan: 799 parent: en0 address: 00:40:43:15:1a:30 inet 10.10.10.12 netmask 0xffffff00 broadcast 10.10.10.255 Tue, 14 Feb 2012 09:17:04 GMT http://community.qnx.com/sf/go/post91546 Christian Scheuch 2012-02-14T09:17:04Z post91545: MTU configuration on IPStack http://community.qnx.com/sf/go/post91545 Hi, We have configured MTU 1504 on en0 and MTU 1500 on en1 But we have observed that during Ftp negotiations 1464 is advertised. Incase MTU 1500 is configured both on en0 and en1, 1460 is advertised. [Packet summary from wireshark] 13 14:35:28.886466 172.18.4.118 172.18.4.244 TCP cisco-ipsla > ftp [SYN] Seq=0 Win=65535 Len=0 MSS=1460 14 14:35:28.887697 172.18.4.244 172.18.4.118 TCP ftp > cisco-ipsla [SYN, ACK] Seq=0 Ack=1 Win=16384 Len=0 MSS=1464 where 172.18.4.244 is the IP for the site running on QNX Pls. let us know what is the probable cause. regards, Tue, 14 Feb 2012 09:13:59 GMT http://community.qnx.com/sf/go/post91545 Christian Scheuch 2012-02-14T09:13:59Z post91462: Re: Problems of Neutrino installation on PC/104 http://community.qnx.com/sf/go/post91462 I got the same issue. Does anyone can help us? Fri, 10 Feb 2012 04:29:55 GMT http://community.qnx.com/sf/go/post91462 HuiHsien Wu 2012-02-10T04:29:55Z post91458: Try to install qnxsdp-6.5.0-201007091524-dvd.iso, but fail. The error code is at below http://community.qnx.com/sf/go/post91458 Try to install qnxsdp-6.5.0-201007091524-dvd.iso via a CD disk. After booting. The status is at below. Booting QNX SDP Press the space bar to input Boot options or D to disable DMA. Trying SATA achi. Scanning for devices. Found 1 device. Trying EIDE. Scanning for devices. xpt_configure:No eide interfaces found. Trying SATA mvSata. Scanning for devices. xpt_configure:No mvSata interfaces found. Would you like to apply a driver update disk? After that, I don't know how to install a QNX neutrino RTOS as a target operating system. Does anyone know how to solve the issue? Thanks your attention. Fri, 10 Feb 2012 03:31:09 GMT http://community.qnx.com/sf/go/post91458 HuiHsien Wu 2012-02-10T03:31:09Z post91323: Re: sem_xxxx APIs http://community.qnx.com/sf/go/post91323 You can get an accurate answer regarding the CPU use implication by profiling a test application using the system profiler. sem_open() will have the largest overhead: you will want to avoid open()/closing() the same resource in a loop. -- Mate From: Lawrence Lee <community-noreply@qnx.com<mailto:community-noreply@qnx.com>> Reply-To: <post91301@community.qnx.com<mailto:post91301@community.qnx.com>> Date: Thu, 2 Feb 2012 10:46:22 -0500 To: ostech-core_os <post91301@community.qnx.com<mailto:post91301@community.qnx.com>> Subject: sem_xxxx APIs QNX implemented POSIX APIs, but how does sem_xxxx APIs got implemented. Does sem_xxxx routines actually send message to a "semaphore resource manager"? How expansive if it is sending messages all the time, if an application calling sem_open, follow by sem_wait, follow by sem_post, and then sem_close all the time. _______________________________________________ OSTech http://community.qnx.com/sf/go/post91301 Fri, 03 Feb 2012 02:28:03 GMT http://community.qnx.com/sf/go/post91323 Mate Szarvas 2012-02-03T02:28:03Z post91301: sem_xxxx APIs http://community.qnx.com/sf/go/post91301 QNX implemented POSIX APIs, but how does sem_xxxx APIs got implemented. Does sem_xxxx routines actually send message to a "semaphore resource manager"? How expansive if it is sending messages all the time, if an application calling sem_open, follow by sem_wait, follow by sem_post, and then sem_close all the time. Thu, 02 Feb 2012 15:46:21 GMT http://community.qnx.com/sf/go/post91301 Lawrence Lee 2012-02-02T15:46:21Z post91272: Re: Adobe Air libcore.so loader http://community.qnx.com/sf/go/post91272 Hi roger thanks for reply what we want is dlopen() and dlsym() with lazy load at start , but the ldd result of libCore.so with about 30 library files linked . I think this will get the libCore.so load a little slow when first start . if you can get the library not linked direct to the libCore.so , I think it should start fajavascript:if (validateCreatePost(document.createPost)) { submitForm(document.createPost, 'submit'); } else { void(0) }ster thanks Wed, 01 Feb 2012 03:11:16 GMT http://community.qnx.com/sf/go/post91272 Xiongwei Huang 2012-02-01T03:11:16Z post91271: Re: Adobe Air libcore.so loader http://community.qnx.com/sf/go/post91271 Load what with dlopen? If you refer to libCore.so, libCore.so is AIR (and is dlopened). On 12-01-31 9:43 PM, "Xiongwei Huang" <community-noreply@qnx.com> wrote: >Hi all > >we are working on flash air , and seem adl start with a little slow than >what we expect > >and we notice the libcore.so linked with lots of library in elf header , >as I think , maybe you can load it with dlopen() and this will speed up >the start time . > >can you modify your code ? this will be helpful for all your flash air >based product . >thanks and regards Wed, 01 Feb 2012 02:56:32 GMT http://community.qnx.com/sf/go/post91271 Roger Maclean 2012-02-01T02:56:32Z post91270: Adobe Air libcore.so loader http://community.qnx.com/sf/go/post91270 Hi all we are working on flash air , and seem adl start with a little slow than what we expect and we notice the libcore.so linked with lots of library in elf header , as I think , maybe you can load it with dlopen() and this will speed up the start time . can you modify your code ? this will be helpful for all your flash air based product . thanks and regards Wed, 01 Feb 2012 02:43:36 GMT http://community.qnx.com/sf/go/post91270 Xiongwei Huang 2012-02-01T02:43:36Z post91212: OLSR porting http://community.qnx.com/sf/go/post91212 Hello everyone, I'm trying to port the implementation of the OSLR protocol to the QNX OS. I'm a newbie in QNX and in porting applications. Do you have any hint on the best way to proceed? Thanks Fri, 27 Jan 2012 16:50:09 GMT http://community.qnx.com/sf/go/post91212 Riccardo Macioce 2012-01-27T16:50:09Z post91160: Does qnx have prelink tools ? http://community.qnx.com/sf/go/post91160 Hi all I have searched google and QNX doc , and I no result about prelink implement in QNX The prelink was very useful for fast boot and common used in linux/android enviroment . from link and loader side , I think this is no difference from qnx and linux . Does anyone try to porting this ? or where can I get it ? and this is about 6 years ago tools , http://people.redhat.com/jakub/prelink.pdf is there copyright issure or some other problem porting this to qnx ? i really think its useful for fast boot Thu, 26 Jan 2012 08:29:10 GMT http://community.qnx.com/sf/go/post91160 Xiongwei Huang 2012-01-26T08:29:10Z post91141: Re: InterruptAttach question http://community.qnx.com/sf/go/post91141 OK. So the definitive statement is for QNX running under the ISA architecture, the PCI interrupts are level-sensitive and the ISA interrupts are edge-sensitive. Wed, 25 Jan 2012 17:42:41 GMT http://community.qnx.com/sf/go/post91141 Robert Murrell 2012-01-25T17:42:41Z post91138: Re: InterruptAttach question http://community.qnx.com/sf/go/post91138 Robert Murrell wrote: > Well, now on testing, InterruptAttach is returning a unique ID. So for now, I'm going to assume what I had seen yesterday was the result of a short between the headsets. However, thank you for confirming that the ISA IRQs are level-sensitive under QNX No ... the ISA interrupt is edge sensitive and this behavior has been defined by ISA archttecture. Level sensitive is the PCI interrupt as defined by the PCI standard. --Armin > so the next guy doesn't have to guess. I am seeing some oddities with this interrupt scheme, but I will make separate posts if I have more questions. > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post91133 > > Wed, 25 Jan 2012 16:19:10 GMT http://community.qnx.com/sf/go/post91138 Armin Steinhoff 2012-01-25T16:19:10Z post91133: Re: RE: InterruptAttach question http://community.qnx.com/sf/go/post91133 Well, now on testing, InterruptAttach is returning a unique ID. So for now, I'm going to assume what I had seen yesterday was the result of a short between the headsets. However, thank you for confirming that the ISA IRQs are level-sensitive under QNX so the next guy doesn't have to guess. I am seeing some oddities with this interrupt scheme, but I will make separate posts if I have more questions. Wed, 25 Jan 2012 15:28:49 GMT http://community.qnx.com/sf/go/post91133 Robert Murrell 2012-01-25T15:28:49Z post91128: RE: InterruptAttach question http://community.qnx.com/sf/go/post91128 Hi Robert, level-sensitive should be correct. Identical interrupt ids would not be expected; are you sure they aren't -1, or your threads terminated right after attaching their interrupt handlers ? Perhaps you'd care to post your test-case and sample output? Cheers, Thomas -----Original Message----- From: Robert Murrell [mailto:community-noreply@qnx.com] Sent: Mittwoch, 25. Januar 2012 15:11 To: ostech-core_os Subject: InterruptAttach question I'm trying to share an interrupt between two devices on an x86 system with a vanilla PC architecture. There are political reasons that I have to either get it working or prove it won't work other than "Its a bad idea". Each device has its own interrupt handler and process thread. On initialization each thread calls InterruptAttach on the same IRQ line. Both calls to InterruptAttach return the same value. Is this normal behavior? Also, I have been assuming that QNX configures the 8259 PIC with level-sensitive interrupts like DOS and Windows. Is this a correct assumption? _______________________________________________ OSTech http://community.qnx.com/sf/go/post91127 Wed, 25 Jan 2012 14:32:13 GMT http://community.qnx.com/sf/go/post91128 Thomas Haupt 2012-01-25T14:32:13Z post91127: InterruptAttach question http://community.qnx.com/sf/go/post91127 I'm trying to share an interrupt between two devices on an x86 system with a vanilla PC architecture. There are political reasons that I have to either get it working or prove it won't work other than "Its a bad idea". Each device has its own interrupt handler and process thread. On initialization each thread calls InterruptAttach on the same IRQ line. Both calls to InterruptAttach return the same value. Is this normal behavior? Also, I have been assuming that QNX configures the 8259 PIC with level-sensitive interrupts like DOS and Windows. Is this a correct assumption? Wed, 25 Jan 2012 14:10:53 GMT http://community.qnx.com/sf/go/post91127 Robert Murrell 2012-01-25T14:10:53Z post91090: Which is the timer interrupt on x86 6.4.0 IRQ 0/1 ? http://community.qnx.com/sf/go/post91090 If I do "pidin irqs" the handlers that I see connected to procnto-smp-instr show following: irq 0: seems to be a no-op irq 1: seems like a handler. Are QNX IRQs not directly mapped to x86 IRQs? My board has Pentium M and 6300ESB chipset. Does QNX use APIC or PIC to generate timer interrupt? I have captured a rare hang in JTAG connected system. It seems like no interrupts are coming in. Every time I stop in JTAG, the processor seems to stop at a HLT instruction in kernel with interrupts enabled around F0050216. If this is not the right forum, then please let me know where I can get better help. Thanks. Tue, 24 Jan 2012 00:21:37 GMT http://community.qnx.com/sf/go/post91090 Subodh Harmalkar 2012-01-24T00:21:37Z post91067: Re: OS/micro-kernel Hangs?? http://community.qnx.com/sf/go/post91067 Has any one else seen OS (QNX 6.4.0) hanging at either of these two: 0xF0050216 that follows after a HLT with IF enabled? Implying idle task is running while hi-pri tasks are starved? 0xFED13AF8 that follows after CLI then HLT? Implying some sort of panic? Our startup-bios was not started with -A option. Any ideas about what I should look into? Our application runs on a Pentium M / PC architecture board in a chassis populated with other PCI cards. It runs well most of the time. Once in 5-20 days OS hangs. I am suspecting spurious interrupts, but that's just a suspicion. I have a JTAG put on two boards. Not able to isolate suspect code yet. That's why I am looking for ideas. Thanks a bunch. Sun, 22 Jan 2012 16:19:48 GMT http://community.qnx.com/sf/go/post91067 Subodh Harmalkar 2012-01-22T16:19:48Z post91052: OS/micro-kernel Hangs?? http://community.qnx.com/sf/go/post91052 I am struggling (rather gasping :-) at a problem where OS seems to hang completely. So far, I have seen two different behaviors: One where Interrupt flag was disabled and HLT was executed. See, Jan-19-2012.bmp. Another where Interrupt flag was enabled and HLT was executed. See, tb1-hang-no-access.bmp In both cases, system did not respond to ssh/keyboard/mouse. We are using procnto-smp-instr. I don't have access to source code. We are running 6.4.0. tb1-hang-no-access seems like a situation where IDLE task was running. Jan-19-2012 seems like a Blue Screen of Death / Out of Interrupt event. Any one can confirm and give suggestions on how to debug this further? I have a JTAG connected to the system that shows Jan-20-2012.bmp Please help. It seems like a case of spurious interrupt. I want to know how can I determine which interrupt is causing this. Thanks a bunch. Fri, 20 Jan 2012 16:43:19 GMT http://community.qnx.com/sf/go/post91052 Subodh Harmalkar 2012-01-20T16:43:19Z post91037: Is physical address required in x86 version of CACHE_FLUSH? http://community.qnx.com/sf/go/post91037 Hello, In the x86 implementation of the CACHE_FLUSH and CACHE_INVAL macros (which are really pointers to the cache_ctrl.cf->flush() and cache_ctrl.cf->invalidate() functions, is the real physical address of the memory you are trying to work on required? I ask because our existing architecture, PPC, doesn't use the function pointers above but use PPC specific functions, which do not appear to use the physical address. As such, my code has the physical address set to NULL to avoid the unnecessary call to mem_offset(). Thanks Chip Bagwell Thu, 19 Jan 2012 20:56:25 GMT http://community.qnx.com/sf/go/post91037 Chip Bagwell 2012-01-19T20:56:25Z post91015: Re: syslogd not working http://community.qnx.com/sf/go/post91015 Make sure the file exists before syslogd is started. On Thu, Jan 19, 2012 at 11:19:06AM -0500, Paul Boyle wrote: > > This works: > "*.* /var/log/syslog" > > This doesn't work > "*.* /var/log/sysLog" > > > I.e, a capatilization of the letter 'l'. There no write permissions issue. I can touch "/var/log/AnyThingIWant" > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post91014 > Thu, 19 Jan 2012 16:22:36 GMT http://community.qnx.com/sf/go/post91015 Sean Boudreau 2012-01-19T16:22:36Z post91014: Re: syslogd not working http://community.qnx.com/sf/go/post91014 This works: "*.* /var/log/syslog" This doesn't work "*.* /var/log/sysLog" I.e, a capatilization of the letter 'l'. There no write permissions issue. I can touch "/var/log/AnyThingIWant" Thu, 19 Jan 2012 16:19:04 GMT http://community.qnx.com/sf/go/post91014 Paul Boyle 2012-01-19T16:19:04Z post91013: Re: syslogd not working http://community.qnx.com/sf/go/post91013 Be careful of whitespace and line endings (no CRLF). -seanb On Thu, Jan 19, 2012 at 10:53:35AM -0500, Paul Boyle wrote: > > syslog is not working properly on 6.4.1 > > By default I have the following config file contents: > ------------------------------------------------------------ > # cat /etc/syslog.conf > # The file must exist for logging to occur!! > mail.* /var/log/maillog > *.* /var/log/syslog > ------------------------------------------------------------- > > If I modify this in anyway, the logging doesn't work. If the log file path is modified, logs don't appear. If the config file doesn't exist, logs don't appear. If I add extra logging files, logs don't appear. If I add remote logging, logs don't get exported over the net. > > Any ideas? > > Paul > > > > > > _______________________________________________ > > OSTech > http://community.qnx.com/sf/go/post91012 > Thu, 19 Jan 2012 16:16:01 GMT http://community.qnx.com/sf/go/post91013 Sean Boudreau 2012-01-19T16:16:01Z post91012: syslogd not working http://community.qnx.com/sf/go/post91012 syslog is not working properly on 6.4.1 By default I have the following config file contents: ------------------------------------------------------------ # cat /etc/syslog.conf # The file must exist for logging to occur!! mail.* /var/log/maillog *.* /var/log/syslog ------------------------------------------------------------- If I modify this in anyway, the logging doesn't work. If the log file path is modified, logs don't appear. If the config file doesn't exist, logs don't appear. If I add extra logging files, logs don't appear. If I add remote logging, logs don't get exported over the net. Any ideas? Paul Thu, 19 Jan 2012 15:53:33 GMT http://community.qnx.com/sf/go/post91012 Paul Boyle 2012-01-19T15:53:33Z post90926: Re: message from driver to app http://community.qnx.com/sf/go/post90926 You're welcome, Hung. -Steven D. Thu, 12 Jan 2012 23:44:27 GMT http://community.qnx.com/sf/go/post90926 Steven Dufresne 2012-01-12T23:44:27Z post90925: Re: message from driver to app http://community.qnx.com/sf/go/post90925 Thanks, Steven. I followed your advice and call ConnectAttach() in the driver. It works. Thanks again for responding, hung Thu, 12 Jan 2012 22:43:20 GMT http://community.qnx.com/sf/go/post90925 Hung Tran 2012-01-12T22:43:20Z post90848: Re: Wrong size returned by readdir for /proc http://community.qnx.com/sf/go/post90848 > Hi, > > In QNX650, while calling readdir() for root folder, for "proc" entry dirent:: > d_namelen comes with value of 6, while normally it would have to be 5 (the > length + zero terminator). > While being easy to work around, it's still unpleasant to have to be doing > strlen() for every directory entry and re-validating everything because of > this bug. Well, a little correction: d_namelen comes with value of 5, while normally it would have to be 4 Thu, 05 Jan 2012 10:53:43 GMT http://community.qnx.com/sf/go/post90848 Oleh Derevenko 2012-01-05T10:53:43Z post90847: Wrong size returned by readdir for /proc http://community.qnx.com/sf/go/post90847 Hi, In QNX650, while calling readdir() for root folder, for "proc" entry dirent::d_namelen comes with value of 6, while normally it would have to be 5 (the length + zero terminator). While being easy to work around, it's still unpleasant to have to be doing strlen() for every directory entry and re-validating everything because of this bug. Thu, 05 Jan 2012 10:42:24 GMT http://community.qnx.com/sf/go/post90847 Oleh Derevenko 2012-01-05T10:42:24Z post90830: Re: RE: Timer expiry http://community.qnx.com/sf/go/post90830 Thanks Steven. Thanks Thomas for the reply. Yes our system time is updated but update is not quite often. We will try the suggested alternatives. We were suspecting low virtual memory as cause for this. How can we know that timer was expired but our function was not called because temporarily enough memory was not available to create the threads as after few seconds (8-10 seconds) eventually our routine was called. Wed, 04 Jan 2012 06:04:34 GMT http://community.qnx.com/sf/go/post90830 Christian Scheuch 2012-01-04T06:04:34Z