WWDC2003 Session 508

Transcript

Kind: captions
Language: en
well good afternoon ladies and gentlemen
welcome to the quick time feedback
session if you really want the QuickTime
feedback session there you shouldn't be
in here you should be in the room right
behind us the marina so does anybody
want to take this opportunity to get up
and leave okay so welcome to the farwa
reference platform session my name is
Colin would bestow Evans and I speak
with an English accent so this is really
just a few words for you to get yourself
calibrated to listening to an English
accent the other thing I should perhaps
warn you about is that when I get
excited about technology I tend to speak
faster and faster so you may have to
slow me down as well or else it'll be
totally impossible to understand what
I'm saying
so what I'm intending to tell you about
over the next hour or so is to give you
an overview of what the far our
reference platform is and then to tell
you in some detail about two or three of
its components in particular I'm going
to tell you about something called TNS
kernel which is the heart of it tnf sis
tnf link drivers this is the heart of
the platform I'm going to be given two
examples of the code which is included
in the platform for supporting protocols
for our protocols there are many
protocols supporters in the platform and
these are really just two examples and
TNS it gets used very frequently in this
presentation and what it means is just a
little acronym for 1394 so we talk about
TNS this 10 s that all the time and
you'll find that all the api's we've got
the word the letters TNS at the
beginning and that really was just a
little attempts to make sure we didn't
get nasty name clashes and the like but
just to say that really the objectives I
have this afternoon is not to train you
in every fine detail of the reference
platform but to give you a flavor of how
it is constructed how it is architected
and how you can use it and how you might
go about building your applications
using the TNF reference platform so what
is it well in a single sentence the
reference platform is the source code
and documentation for I paulo software
which enables you to develop to develop
what we might call end of the wire far y
devices so these are products that you
would like to build which are
complementary to the main Mac products
this also means that this software is
not related to other Apple operating
system far less tax software it is
independent of that and it's intended to
be free standing in end of the wire
products indeed it's been designed very
much with the embedded system in mind it
needs some form of real-time operating
system but really it's requirements on
real-time operating system are pretty
pretty small and the lightweight
operating real-time operating system
will do there are a variety of artisans
that are supported and there's a very
easy way of putting it to other art
houses as well it also supports a
variety of certain 94 link chips you may
be aware that in a computer like a Mac
you find a link chip which is called
ohci open house controller interface and
that is very much a chip which is
optimized to use in in that sort of
device in a Mac of some sort but there
are many other link chips around which
are again optimized towards embedded
applications and the farmer reference
platform really is designed to be
equally suitable for use in an OHV I
environment or in other links ship
environments so there are several
drivers provided and in essence of the
kit provided which you can use in order
to drive other 1394 link chips but the
great thing about it is that it supports
multiple flower application protocols
and its support from simultaneously in
that you can build an application which
which requires in order to work probably
several different flower application
protocols and you can have those all
running simultaneously within your
application using the reference platform
so what actually is in the box or when
you go and download from the web what do
you find well first of all you find some
software for a number of modules which
we call the class services the heart of
the whole system is a thing called the
kernel tnf colonel their events and
services for supporting different
classes of protocols one the main one
first one we mentioned here is ABC
general the audiovisual control
protocols is there a large family of
protocols that have been standardized by
the certain 94 trade association we
provide the support for all of those the
generals underlying support for all of
those and then we provide specific
protocols for disc DVD panel and tape
subunits we provide software for
asynchronous connections that's a method
of streaming data from one application
to a one device to another but by using
asynchronous operations that again is a
standardized protocol we supplied
support for something called EIA 775
with an e I a protocol for on-screen
display for digital tvs we provide IP
1394 in particular RFC 27 34 which is
ipv4 PPP PDT point-to-point data
transport protocol and last but not
least SVP to which is a protocol
specifically for devices like disks and
Printers you find all of those in the
file our reference platform for our top
interfaces there's a module called TNF
sis which is the module which a single
module which provides the art of
independence and we provide the TNF
implementations for VxWorks Michael
Itron nucleus a rather early version
micros VOS and there's also a generic
template so that you can port to your
own favorite artists now we provide a
board support package so that you can
bring bring up the whole of the foul our
reference platform and actually make it
tick and do something even though it may
not be working on your particular
hardware and that's been engineered
around a standard PC x86 platform with
vxworks for link drivers you find link
drivers for ohci for the Texas
Instruments see links and GP links for
the md80 4 12 and also a generic link
driver toolkit the link driver also
features some plugins because quite
often you have some specialized hardware
that you also want to be able to access
that the sort of a driver level and in
particular there's a couple of examples
one is for the global unique identifier
which will be implemented in the system
dependent way in your hardware and the
other one is for dma features in order
to exercise this pile of software we
have a chimeric command-line interface
which is called v shell using the shell
we then provide a number of little come
online applications and which
essentially implement very certain that
if all transactions exercise various
protocols and so on the generic one
called tma and when you get to use the
file reference platform you probably
find yourself using PMA really quite a
lot it's a rather low level thing but it
allows you to directly generate 1394
transactions on the bus so that you can
do reads and writes you can go and view
devices you can find out what's on the
bus you can find out which devices route
and so on and so forth you can generate
buzz resets by typing appropriate
command lines commands at it there are
then command line applications for an
ABC tape controller and target in other
words you can pretend to be an ABC tape
controller and gives the sorts of
commands as an AVC tape controller will
do or you can pretend to be an ABC tape
target there's a somewhat embryonic but
it's there a certain idea for bridge
manager that's an anticipation of the
1394 dot 1 standard which is still not
yet finished ABC disk controller and
target DVD pbbt SBP two discs etc there
are few others as well so all of these
are the rather low level ways of
exercising these functions from the file
our reference platform we also have a
number of demonstration applications
built into the reference platform
there's one for the on-screen display
features of the eia 775 the digital
televisions there's actually a couple of
applications for personal video
recorders essentially nu lating a tape
recorder using the disc there's some
demonstration of of IP 1394 ABC panel
there another PVR application which is
really using ABC disc directly SVP to
disc SVP to initiator where your way on
the host side controlling a disc and
some more so a whole range of
demonstration applications which with a
bit of luck you ought to be able to get
up and running really quite quickly
against it sort of get you started get
youth yeah with the right sort of feel
for what it's like to either drive or to
implement a far end of the wire device
and of course there's a ton of
documentation I actually went through
and counted with there's a total of
twenty PDF manuals in this thing and
also various release notes with the
various modules and then there's a whole
lot of a sort of a sort of other things
which are helpful and useful like make
fire
of and various other little tools all
bound up in it it all comes in a car now
the architecture of all of this is given
in this slide the heart of it all as i
said is TNS colonel tnf kernel provides
transaction services for the 3rd 94 bus
it operates as a on a client-server
model model so it can support a number
of clients and the client if you like
two logs into tnf colonel get some IDs
and then does what it wants to do and so
examples the plants are our protocols to
support SG p 2 or our protocols to
support ABC IP 1394 or whatever tnf
colonel also includes some bus
management utilities which in fact
operators clients as well so you can
have any number of clients and this is
extensive world you can invent your own
clients if you like then each of our
protocols actually operates in the same
sort of model each protocol itself can
have one or more clients so we have some
software to support disks and printers
for example which one on top of SBP to
ABC we've got some software modules
which support the support various
specific ABC devices on top of all of
this you build then your application and
in general you will use the interfaces
sort of up here to the particular
protocols that you want to support and
as they're one of the great features
about this is that you can write an
application which may well have several
of these clients instantiated and
operational so you might have an
application which goes in users SBP to
because it wants sometimes it wants to
look like a disk
but it might actually also want to look
like an ABC unit and it may be that your
application has some nice user interface
features which you decide to implement
by implementing a web star a web server
which runs over IP 1394 so that a user
of this device can go and configure it
or do whatever else he likes with his
web browser you could build all of that
into an application and run all of those
simultaneously and then this will all
filtered down through to tnf colonel at
the lower level tnf kernel itself goes
and makes calls to a link driver and
then the link driver will access the
link silicon which you have on your
embedded hardware and the five silicon
which is on your embedded hardware so
that's the overall sort of structure of
how a file our reference platform system
is put together and looks so let's start
peeling the analyte and in a little bit
tell you a little bit more about two or
three of these modules as I said really
the objective here is not to give you
every last detail but to give you a
flavor of how these things are
constructed how they're used and how you
can build an application with them and
we start off at ens colonel so the main
features of tnf colonel first of all it
provides transaction support for certain
94 operations and they follow our
transaction is something like a read or
write so you get corporate reads call it
writes block reads block rights to other
devices on the bus and this is actually
both incoming and outgoing so other
devices on the bus can send reads and
writes to your device and kernel will
pick up those reads and writes and we'll
decide what to do with them it has
command and indication queues so if you
like the model as far as you're
concerned as far as the clients of
colonel okay
that several transactions can be
outstanding at the same time you know
that's a nice feature of fowl are it's
very good for bus efficiency that you
don't have to wait for one transaction
to finish before another one could start
with split transactions and Colonel
supports that indication queues are
essentially the queues for the request
transactions that are coming into this
device from across the bus and of course
if you get a request coming in like a
read request you need to generate a
response so there's a response
generation and you can also sign up for
the handlers so that you can see the
requests and generate the appropriate
responses so essentially everything you
need to everything you need in order to
be able to do normal 1394 bus
transactions is in pns colonel and of
course it does a whole lot of nice
things to make sure that these
transactions are properly formatted and
you get them right and they dealt with
correctly across bus resets and a few
things like that it is sort of deals
with some nitty-gritty issues of that
sort second feature in PMF kernel is bus
management functions main function of
bus management is to do things like
optimize the bus by optimizing gap
counts making sure that the most capable
note on the bus is indeed the bus
manager and so on so we provide serial
bus management and by and large that's
autonomous you just say to the colonel I
want you to be bus manager capable and
it'll go and do it and you don't have to
worry about it again csr services this
is wonderful misnomer in 1394 which is
called configuration ROM which is always
changing essentially the configuration
rom is an area in your address space
where you advertise to the outside world
what you're capable of doing and
this can be built up dynamically using
colonel services so you can say i want a
configuration rom that says I'm an an
SVP to target and colonel will go away
and build the right sort of
configuration rom taking into account
the fact that someone some other client
of colonel has also asked for something
else to be advertised in configuration
rom and the configuration rom
specifications got a sort of complicated
structure of pointers and the like and
the colonel will build the right
structure given all the requests that
have been made of it and you can go and
add capabilities dynamically if you wish
to full of complementary to that are
reset services a bus reset on farwa is
essentially the hint that something's
changed there's a new device on the bus
perhaps the device has gone away that
used to be there or perhaps a device
that's on the bus was there before has
actually changed what it can and can't
do it's got an extra capability or maybe
a capabilities gone away so there's a
bus reset on the bus and that's sort of
a hint for everybody else to go out and
look at the configuration rom and see
what's changed and then understand what
the bus now looks like and there's a
whole pile of reset services which deal
with that for you in tnf colonel now one
of the ways that Colonel helps the
application is that it provides a device
reference which is not the Phi ID it's
not the node number on the bus because
actually the node number changes every
time we all can change every time you
have a bus reset what Colonel has is a
device reference which it holds constant
so by and large when you want to go and
talk to a device across the bus you
don't say i want to send it to node
number 5 you say i want to send it to
this device reference and Colonel
maintains track of what node number is
the correct no number for this
particular device reference at this
moment in time so it looks after all of
that sort of stuff for you as well
what I've talked about so far is
basically been looking after the aspects
of asynchronous transactions the ones
that use the memory address space but
there's a whole lot of isochronous
services as well provided by Colonel
again as part of serial bus management
visiting called the isochronous Resource
Manager which tracks what channels are
being used what bambus has been used
what's available to be allocated and tnf
kernel provides the isochronous Resource
Manager function it provides support for
something called function control
protocol this is a protocol to find in
IEC 61 83 which is the basis for order
the ABC protocols and some others as
well so the basic function control
protocol support is implemented in tnf
kernel that are isochronous services for
doing isochronous transactions so you
depending on the nature of your link
link ship you can send and receive a
sock on those packets some link tips
this may sort of go completely through
hardware to a side port and Colonel
needn't get in the way for other link
chips it may well be that software gets
involved as a fairly low level with
sending and receiving device o'connor's
packets and basically the isochronous
services that you need are provided in
tnf colonel then there are wonderful
things called plugs which is a way of
managing the isochronous channels on
farwa and we provide input and output
plug handlers and plug in plug
management for Fowler that again is
defined in ic 6 183
so looking at how all this fits in with
the rest of the system here's Colonel or
you basically have three main api's we
have a protocol client API which is goes
to these clients mainly the ones
implementing specific protocols we have
assistance services API and we have a
kernel services link driver API text to
go with previous foil suggests a moment
of too little on the marketing when
you're going to use tnf colonel when is
the sort of thing going to be useful
well what does it do for you main thing
it does for you is indeed to abstract a
whole lot of nitty gritty details of
what it is to be a good citizen on 1394
and then abstracts that from the clients
in other words it looks after that for
you so there's actually quite a lot in
firewall which you have to get right and
it's great just to go with tnf colonel
because then you know there's a pile of
well proven software which is going to
get it right for you you don't have to
worry too much we isolate all the
hardware specific codes to the
particular link driver so all the API is
that are at the top of tnf colonel all
the client AP is essentially independent
or whatever link chip might be
underneath so you may well be able to
develop some software which is generic
across a range of products which or
across a involving sequence of products
which may well have new and different
and improved link chips and your
application software is protected
against those changes it'll stay at the
same and of course the same thing goes
for different diet offers and different
hardware you can recompile and go to on
a different CPU you
move all your software onto a different
artists so again you may well have a
family of products of different
complexities which for good reasons have
different art office and skill your
application can look the same it can
look and feel the same so the supposed
to support advantage and the usability
advantage so going into the architecture
in a little bit more detail we find
ourselves with initialisation services
reset services are so common services
csr services and then various cues and
clients which essentially take you
directly from the client api's down to
the link driver or in the other
direction is the case may be so first of
all a word on the link driver I've only
got one slide on this but it said before
it does support a variety of link
devices and one of the ways it does this
is that it has a capability call and so
a link driver essentially reports what
it's capable of doing this link can
transmit isochronous or perhaps the
think can transmit isochronous this link
does isochronous completely
independently this link has various
levels of queueing or or whatever so the
link capability is derived by the link
driver itself saying what it can do and
then there are various features in
kernel which essentially use that
information to make sure that a bus
utilization is as optimal as the link
chip allows and it is very much the case
that some link chips allow much more
efficient use of the bus than others
that may or may not be an issue but it's
good to know that you actually are going
to use the bus as well as a particular
link it does allow then in fact it
essentially he's got one API one main
API which is a single command for all
all of the bus sub actions by the time
you get down to the link driver you're
talking in terms of sub actions not
transactions a transaction is something
like
request and then the response coming
back at this level in the lint driver
you're talking about the request going
out or a response going out underling
driver has some specific plug-ins for
for a specific hardware support which
you may well may well have the system
interface API is the place at which we
try to isolate everything which is going
to be dependent on the system and the
real-time operating system there is a
module which is called tnf sis and if
you want to port to a different
operating system basically you go and
pull out tnf fish and you go through it
api buy API and work out exactly how the
api's are going to be implemented for
this particular artists and kernels a
real-time system it's a concurrent
system so it does need support of
concurrency but really there's not very
much in the way of API for the needs and
they're pretty conventional pretty
familiar so we
we have a system initialize create task
we use semaphore so you create a
semaphore you post to a semaphore you
planned on a semaphore you can create a
queue delete a queue you can send a
message on a queue you can receive the
restoration of Q pend on a tube for a
message and that essentially is the the
main interface that we expect an artist
to provide for us there are memory
allocation operations as well basically
the the TNF malik which in many systems
just gets implemented straightforward as
malik there is a kick as a facility for
doing a DMA safe memory allocation in
some cases you need to make sure that
the memory is not going to be taken away
from you buy some all powerful memory
management system which really has got
no place in an embedded system anyway
and those sorts of things there were
some system calls for atomic operations
but essentially it's a pretty pretty
simple and straightforward set of AP is
easily portable to a new artists moving
on to the client services we can't
services support an arbitrary number of
clients there's no particular limit
built into the software in fact this
could this runs for through a thread
through much of tnf kernel and the tnf
software is that by and large we haven't
built in artificial limits instead we've
gone for things which go and allow
configuration so you can you can set
limits which are relevant to your
particular application in its particular
circumstances and by and large those
limits are set dynamically rather than
statically they are set in
initialization calls rather than hash
defines so the typical clans are the
castle protocols for applications they
operate independently they operate in
parallel and also some of the features
that kernel itself provides you such as
bus manager the FCP function control
protocol implementation those actually
are implemented again as clients because
what they want to do is to do ordinary
bus transactions so what happens is that
I client which is one of these protocols
maybe or maybe your own application a
task in your own application will
introduce itself to click to Colonel
little log in and then we'll get a
client ID and then if you use that in
future calls so Colonel can keep track
of which clients are asking for which
features in which capabilities which
callbacks and so on and so forth so the
sorts of things that the client can do
haven't got its ID is that it can sign
up for unit notification a unit is a
capability in a device somewhere on the
bus and when there's a bus reset and
some new device joins the bus a client
of tnf colonel can say I want to be told
when an SVP to target turns up on the
bus I want to be told when an ABC tape
recorder turns up on the bus so concerta
can set up for unit notification you can
sign up for cable event notification for
some some purposes things like bus reset
are important many applications is the
case it doesn't matter and you can often
get away with the applicator your
application not even knowing about bus
resets on file wha but for some
applications it is important and so you
can even sign up for that you can read
CSR locations on 13 594 nodes you can
actually go and read because the
configuration wrong on some other node
you can go and search the roms for
specific entries essentially it's the
same sort of thing as client
notification you can see
notification you can say find me a tape
recorders for Islam and there's a whole
pile of other functions similarly now if
a clamp wants to access a particular
devices on the bus what it does is to
save the colonel I want to be able to do
this give me a device reference so it
gets a device reference ID from Colonel
I mean essentially that's a pointer to
an internal data structure of Colonel
and normally it does this by sorry
within Colonel Colonel tracks particular
devices by global unique identifier the
device reference remains the same for
all time and then the sorts of services
which kernel provides to a device for
sort of device references all the
asynchronous request types create our
sock on the stream descriptors you can
also do things like I saw allocated our
tsoukalos channels and bandwidth sign up
to receive isochronous events bus reset
notifications and the like there are in
fact two sorts of device references one
is the standard way the way I've been
talking about so far where where Colonel
tracks is all for you and you just use
to use a knife strapped device presents
alternatively you can there's a tag
called unspecified which provides you
maximum control in other words you can
actually then go and access the device
by its specific device address on the
bus but that of course requires you to
go and track the changes to that so if
for some reason you don't want to use
the colonel services are doing this
we're not sort of blocking you off from
a lower level access to the bus you can
do that if you really wish to in general
you won't need to
the research services I said you can
stand up a bus reset well you can sign
up for all battery sex you can sign up
for a bus reset notification when a
particular device or unit joins the bus
or if it leaves the bus system
initialization you do you can set the
number of outstanding requests in the
outset and the outbound request queue
you can set the number of incoming
requests that can be queued you can set
the number of climb procedures and these
basically just limit the internal data
structures that the the colonel will
build for itself one minor point I
should make when we're talking about
request queues the colonel model to its
clients is that outbound request for
queued and yes they are queued but in
fact it turns out that they're not cute
actually in the colonel the colonel
codes and passwords on the queuing
responsibilities to the link driver and
that might seem a rather odd thing to do
because it makes link drive is more
difficult to write but it turns out that
our thumb link chips are more morling
chips which basically support queuing in
Hardware ohci is the put is a very good
example but there are others as well so
by passing on the queuing
responsibilities down to the link driver
this allows the link driver in turn to
take advantage of any queuing
capabilities that might be in the
hardware the particular chip that it's a
driver for
you want to be able to configure the
node as well what's this no doing you
can set it so you I you can set busy
retry codes that pending controls and
things say whether you want to be do I
pendings disease or whatever and then
there's a whole pile of optional
features which you can decide whether
they're going to go into your device or
not and of course these are optional
features which are dynamic so you can
build bus registries you can contend for
being bussed manager you can decide that
this device is going to be bus a bus
manager or potentially the optimized gap
count decided it's going to be
isochronous capable power manager
capable and so on and so forth you can
decide it's going to be factored master
as I said these are dynamic which means
that you can build software which may be
itself goes and loads capabilities
dynamically and so you know for some
time you may decide you don't want to be
I suppose resource manager capable or
something until some other software's
actually manage to get loaded or or
something of that sort so you can decide
as the capabilities come and go whether
you wish to have these features
advertised when these capabilities are
supported another class of services that
are provided are to be able to access
the five chips that are across the bus
your local ship or a remote chips so you
can do things like force set for a bit
to persuade a particular device that it
wants to be route you can send link on
which goes and turns on the link layer
device link layer hardware in a remote
device incept out counts you can ping
nodes you can engage in suspend resume
power management stuff enable powerful
five ports and you can read and write
remote PHY registers so if you have a
new
need for being able to access 55 tips
across the bust you can do that now i
have to admit the main user of this is
going to be a bust manager which is
incurring colonel anyway so unlikely
that you will actually need these
services but they're there if you do and
they're probably the ones again and
they're the ones that are going to be
used by some of the other features that
kernel provides anyway looking at this
sort from the other way around you can
be a target device advertising research
are on and so we provide the
capabilities to build the CSR rom and to
modify Arab units to the CSR rom
dynamically so essentially if they read
to CS Aram comes into the bus comes into
the node then Colonel will actually
provide the response based on what
you've asked Colonel to set up in CSR
wrong and you needn't you don't that
your application doesn't actually
directly get involved in servicing those
CSR read and write commands unless for
some reason it wants to you can choose
to but in general you won't want to
there's a direct memory clamp this
allows you to designate an area of your
memory and hand it over to Colonel and
say well what I want you to do is to
allow access to this area's memory from
remote devices across the bus so reason
rights to this area of memory will go
straight to that memory and by and large
your application needn't get involved
now sometimes this is can be directly
supported by hardware ohci has of the
surgery for supporting this other some
other link chips can support the sort of
thing as well otherwise it's supported
by software but then the question is
okay so that our device is reading and
writing from this lump of memory there's
going to be times when I do actually
want to be able to know what's going on
put things in that memory get things out
of that memory so what I'd like is I'd
like to
hold when other devices do access that
memory I can be told i can say i want to
be told every time I mean we can get say
what to be told never or perhaps I want
to be told every end packets so as to
the end packets that are red from memory
then I'm going to go back and I'm going
to go and fill it up with some more
stuff or perhaps every n bytes that are
read from that memory or written to that
memory I want to be told and as optional
support for posted rights in other words
a post to the right is one where the
transaction comes in and it's
acknowledged with an act complete even
before the data that's in that traction
transaction that right transaction has
been physically placed in the memory the
device at the far end thinks it's got
there and that's a lot a lot as a good
optimization which is used quite a lot
in flower to the colonel sensor you know
says that competes right complete
whatever may be needed to finish that
for isochronous services you can
allocate envy allocate channels and
bandwidth you can initialize myself in
the stream you can start a nice opera
stream you can stop on and then you can
sign up for our sockless event
notification and the sorts of events are
starters isochronous data end of our
softness data and then some all things
to do with channels and managing what
happens with cycle starts
the FCP services those are the
underpinning services for ABC and the
functions that are provider there are
two send an ftp command or an FCP
response you have to be careful and xdp
response is not a serial bus response
FCP uses directed writes its protocol
and it's one FCP with FCP initiator will
send an SVP directed right to the target
and then the target will send an FCP
response which is an FCP directed right
back to the initiator so you can send
SCP commands or responses you can add an
SCP command handler for incoming
commands you can add a response handler
and then there are plugs which you can
deal with as well all of these features
of where the colonel has been put
together a little endian beginning
support whatever presence there you
happen to be using sort of whatever
reasonable sized person so you having to
be using there are some compile-time
optimizations so for example if you
decide that you're never never ever
going to be bus manager you needn't
compile it in and a few things of that
sort in order to get the footprint down
I'm through this multi-threaded
multitasking support so how do you use
colonel well the steps are that first of
all you configure it you configure
Colonel your application sort of a
master application level goes and sex
with various queue size of the various
parameters that are needed you then
complete the node configuration you say
whether you want the nose to be bus
manager cable irm whatever
then you create CSR rom ready for the
various clients that are going to want
to advertise their capabilities in CSR
rom around about that time tnf goes and
gets capabilities of the link driver and
there's a link driver configuration and
then your various clients a protocol
clamps will individually register for
required services so basically you go
and set the clients going is independent
tasks in your application and they'll
down register for their services and
then you just sit back and enjoy it what
it all work so that's Colonel second
module that I'd like to introduce you to
is pms ABC and this provides an API for
ABC controllers and maybe three targets
and actually this presentation this part
of the presentation feels just like the
previous part of the presentation it's
the same model all over the game same
sorts of things same feel all over again
first of all were supporting multiple
subunits so your ABC device can have
several personalities simultaneously
there are notification mechanisms for
ABC related bus and remote unit events
you can construct appropriate unit and
subunit descriptives if you're an ABC
target to go into your configuration rom
you publicize your ABC unit directory
you can be a controller and ABC provides
support for pausing the descriptives
that you'll find in some other targets
somewhere else on the design device and
again the API provides references to
units and subunits and plugs and so on
and so forth by logical device logical
references which will remain unchanged
through bus resets and through things
which might actually change the physical
representation of these as known on
favre are so again it insulates the
application of the higher level protocol
from those changes ABC supports ABC 3.0
the Serta 94 trade association
specification it provides complete set
of API for both controllers and targets
multiple subunits does the automatic the
mapping of addresses and plugs and so on
and so forth after bus reset provides
dynamic construction of descriptors and
there are also some interesting rules
for open and close descriptors and again
it's ensure that those rules are
complied with it provides IC 610 hits
reconnection management it provides
support for FCP or asynchronous
connections for command transport and
both of those are used in different
circumstances you can have multiple of
multiples of those command transports
multiple outstanding transactions and
they target can service multiple
controllers it's quite an important
feature multiple devices outside on the
bus can find that this is a target and
it won't fall over if two or three of
them start trying to poke at it so the
block diagram amazingly looks just like
the previous block diagram ABC sitting
down here it's got its interface to
Colonel using those colonel api's as I
was talking about a moment ago it's got
its interface to tnf sis and its
interface it then provides the api's to
the particular particular protocols
particularly AVC protocols that you want
to support
and again the the sort of the block
diagram looks similar we have our
various services essentially going
between the ABC device API and the
transport controller which goes down to
the down to curl system API actually
hardly how to use at all the only thing
that it does is to provide their memory
allocation it goes to tnf malik for
memory allocation incidentally i should
have mentioned that the the fact that
tnf malik is provided and that
everything that we provide and foul our
reference platform goes through tnf
malik means that you can choose just to
go and call malloc if you want to but if
there's some good reason why you want to
control the memory areas that are used
for order the flower reference platform
data structures and buffers and so on
and so forth you can go and implement
your own special version of tnf malik
with your own own specific applicants
its independent capabilities and the
rest of the flower reference platform
will just go and use then that all
automatically support multiple
transports and we support them
simultaneously you don't get any dead
locks or anything horrible like that as
a result of doing this
[Music]
you want to access a particular target
device a particular target unit that
someone else on the bus you go and get
an ABC reference ID and then you'll use
that in all future calls to go and make
accesses to that target device because
getting its units information hub eunjin
information plug information and so on
and so forth now if you look at the the
layers of connection management
protocols that a defiant of the defined
for far wha there's a set of protocols
called plug management connection
management protocols which uses this
model of a plug so two devices sort of
share a plug if they're going to send
our softness data to each other and
that's supported in in kernel then what
ABC does is that it extends that model
so did you push into a device and you
get to some subunits essentially you put
a plug on a subunit and you plug that to
some other subunit in some other device
and in fact you can even go and plug one
subunits to a another sub unit on the
same device if you really want to so ABC
general goes and extends this model two
subunits from just units and so our ABC
supports all of that so we find
ourselves being able to do things like
configure the Apple plugs masterplug
figure the input plugs connecting
disconnect plugs at the serial blasts
plugs if you like at the device level
and most important of all perhaps is
that we can connect and disconnect
between subunit plugs and other subunit
plugs and or unit plugs so you can put a
plug your system together whatever way
round is is appropriate
all references to advise are made by a
device reference ID and you can then go
and get the various units and
information information from an ABC
reference we have basically again
references for units and four subunits
and for plugs so all of that again is
handled in a way which won't change our
bus resets won't change over certain
magical topology changes or
reconfigurations so essentially what you
do is to initialize me in ABC device you
say it's going to be a controller it's
going to be target or perhaps going to
be both you register for the units event
notifications that you're interested in
you deal with subunits you can construct
ABC command headers for sending commands
to other devices and you can get plug
references if you're a target then you
can create a target unit with the
reference ID for yourself you can create
sub units within your targets you can
create ABC plugs and you can register
for to be a command handler and this is
because you'd want to do this because
somebody else on the bus is going to
send you as a target an ABC command so
you can have a command handler which
goes and deals with at ABC command when
it comes across so that's a look at ABC
and finally another protocol is sp2 and
this is just slightly different from the
other two but it gives you again to give
you a feel for the sorts of software and
the sorts of ways we've gone about
constructing the support of rest
protocols in the file file reference
platform I do want to emphasize in this
presentation I'm talking about SVP to
target we provide a support excellent
support for both SUV to initiate
and for attributed targets and the fact
that i'm picking out on targets for this
presentation is simply a matter of my
time and your patience so as would be to
target well we provide to full target
support it's a generic API for all types
of sop to targets disks printers
whatever you like plotters FCP to is
defined in n sites three two sides and
it's fully compliant with that and of
course it operates of the client of tnf
colonel so this in this particular case
is only uses the TNS Colonel api's its
operating system independent it uses the
TNF Malik and I think it uses TNS DMA
safe but so it's using the main api's
that we provide no others if we run in
any environment to which tnf colonel
one's done it provides callback
functions for csr event handling so in
fact the application does in this case
have to get involved and this is one of
those cases where actually a bus reset
has to be significant unfortunately it
has to bust reset as a significant event
as far as a client of SUV to is
concerned we can't hide the bus resets
full range of configuration functions
and buffers was needed are allocated
dynamically and that's whenever
initially acts some initiator across the
bus goes and initiates a session with
this target at that point we then gerin
and allocate all necessary buffers for
that particular login that the initiator
has made
so the architecture for this is what his
colonel his SUV to API and we provide a
basically two tasks which we provide and
then there's a couple of tasks which you
the implementer have to provide and then
there's an application API the system
task deals with csr actors/actresses
control and skaters role mattresses so
this is where initiator is finding out
about this SUV to target what it's
capable of and what it can do what it
can't do there's a management agent and
thats deals with initiator login device
across the bus logs into FCP to target
logs into the disk or whatever before it
started with reads and writes to that
disk so this management agent task deals
with those logins then the application
tasks deal with orbs operation request
block processing so the actual request
to go and read bloxham bisque or
whatever we tend to be four disks would
tend to be a command protocols such as
the African his name there's a specific
kalam protocol for disks that
interpretation would have to be done by
the application task which a user
application writer would write
and we have to issue a sort of little
health warning here as well there are
some aspects of this review to
compliance which actually depend on a
perfect application behavior we're not
able to shield you entirely from bees
and so for example every time the
initiator sends you an operation request
block you are required to attend status
for that block and we rely on the
application doing that correctly but the
reason why we've done this is to allow
application flexibility but we do have a
sample sample target application you can
actually go and run the application code
and do accesses to a real risk if you if
you wish to so that you can see how to
implement it a compliant application the
api's the management ones are for
initialization in termination
configuration and control functions and
[Music]
status information
although this is sitting on top of
Colonel there's nothing in this which
prevents the application from getting
directly to the colonel api's if it
wishes to for the data transfer ap is
one of the things we do provide is
automatic support for initiator page
tables in other words in the SVP model
there are various models of when you're
sending rights across the bus where they
get where exactly way they go to how you
deal with the fact that the initiator
might have page tables or might have a
linear memory and the code that we
provide actually deals with that
essentially the API is to the
application as a start date of transfer
and then are codependent determines
whether a page table direct memory is
being used and translates that into the
appropriate bus transactions to be able
to enable the right thing to occur so
the application will make repeated calls
to rebuff or write buffer and then call
stop edge transfer status AP is the
various times when an application needs
to send status there's a thing for
sending unsolicited status you need to
send status in the quest in response to
our orbs that come in and command error
and all their our stances in order to
achieve these functions the application
provides for event handlers and we'll
have a quick look at the management and
command agent event handlers
the event handler is an event have Lewis
provided when there's real work to be
done for example operation request
blocks and event handler for things like
bus reset and some of the event handlers
are optional so the consideration of
these callbacks works by the application
calling as we do target initialize it
target in it with one callback parameter
which is called on open session so the
idea here is that whenever a initiator
initiates a new session then this
callback will be provided and the login
descriptors provided with parameters
that callback entries for all the other
callbacks that you might neither are
provided and within that data structure
so on the on open session call back you
initiate those entries which are then
set up according to our your application
wants to consider all those other
callbacks for this particular session so
you can actually use different callbacks
for different sessions if you wish to so
the callback functions are on open
session on n session set password abort
our sex reset target or buffer full
stuff to do get on with it please this
doorbell which basically says go and
read the host descriptors for more
commands you needn't actually do
anything about doorbell in the
application if you don't want to you can
rely on the SCP to code doing that for
you there are also some callbacks that
may be called as the result of internal
conditions like agent dead battery set
unit attention
that's a quick look at SVP too and just
as the final slide follow our reference
platform is available on the web you can
go download it there are some mailing
lists where people who are using this
are putting all their experience
questions and indeed swapping their own
own good hints as to how to make best
use of this so that's the end of a quick
gander through all the facilities that
are provided in the flower reference
platform