On 2011-03-18, Stanislav Meduna <st...@meduna.org> wrote: > On 18.03.2011 20:52, Grant Edwards wrote: > >> Is there any eCos API support that the HAL can use to provide either >> random data or a unique id value to application or OS code? > > I don't know of any.
I've done some more grepping, but haven't found anything. >> Both random values and UUID values are required for a lot of network >> stuff. It's pretty common for hardware platforms to one or both, >> there doesn't seem to be an eCos API to access it. > > This is a very good request. Decent sources for unique IDs are probably a lot more common than decent entropy sources, but it seems like something for which we need an API. A UID can be pretty easily generated by hashing a few things (CPU serial number, flash serial number, MAC addresses, etc.). Generating entropy without hardware support is a lot harder. > However, I don't think this belongs into the HAL - it's more a device > driver semantics (see e.g. /dev/{u,}random on linux) and the > cyg_io_lookup / cyg_io_read is everything one needs here. > > What the HAL could provide is an interface supplying a source of > entropy That's pretty much what I meant. > - however, this is hard to do correctly especially on an embedded > system that is often running in a quite deterministic environment. Indeed. Even if it's not cryptographically strong, something to use for for things like pseuro-random retry-backoff would be great. -- Grant Edwards grant.b.edwards Yow! How many retured at bricklayers from FLORIDA gmail.com are out purchasing PENCIL SHARPENERS right NOW?? -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss