SlideShare a Scribd company logo
1 of 7
How to put 10lbs of functionality into a 5lb package.




      How to put 10lbs of functionality
            into a 5lb package.




By

Marc Karasek
Senior Firmware Engineer
marckarasek@ivivity.com




ESC-370 San Jose California Spring 2007                            Page 1 of 7
How to put 10lbs of functionality into a 5lb package.

How to put 10lbs of functionality into a 5lb package..........................................................1
Overview: ............................................................................................................................3
Layering Your Code :..........................................................................................................4
  In looking at the boot process for today’s embedded designs, more functionality is
  being added earlier in the process. Some examples are : power status, OS flash image
  integrity and system recovery. Each of these requires a different amount of software
  support. Some will require notification to the user of the status and some will require
  interaction with the user. Most of these features are in addition to bringing the system
  up to a point where an OS and/or application can run. ..................................................4
  Many embedded designs have one large firmware image that is both the boot code and
  the OS/application rolled into one. This monolithic approach to the code has many
  limitations associated with it. Some examples are : ......................................................4
  Upgrading the firmware is a potentially dangerous problem that could leave the device
  nonfunctional. ................................................................................................................4
  The ability to maintain multiple images, a requirement in some cases, is impossible
  without some form of hardware support. ........................................................................4
  Each layer should have a mechanism to load the layer above it. It should also have as
  much debug capability in the code as possible. (See next section). .............................5
  Having split the monolithic firmware image into these layers allows us to move from a
  monolithic way of debugging the code to a more modular approach. ............................5
Debugging without the Bloat :.............................................................................................5
  Most embedded firmware has some form of debug monitor capabilities in it. This is
  usually accessed by a key sequence during boot time or through a menu system that is
  the default interface for the device. This debug monitor usually requires that the
  majority of the system be functional in order to work. This does not lend itself to
  debugging problems that occur early in the boot process and is usually used to help
  debug OS/applications. In order to debug the hardware/boot code better we need a
  monitor that needs little to no resources to run. One such monitor is Micromon
  developed for the MIPs family of chips by IDT. This monitor as a standalone binary is
  only 13K in size, yet it provides all of the features needed to help debug during system
  bring-up. It could very easily be adapted to another processor. It only needs 8 GP
  registers for the stack and input positions........................................................................5
  Using the split firmware above, .....................................................................................5
Assumptions : ......................................................................................................................5
Definitions : ........................................................................................................................6




ESC-370 San Jose California Spring 2007                                                                              Page 2 of 7
How to put 10lbs of functionality into a 5lb package.




Overview:
In today’s embedded designs more and more functionality is being crammed
into smaller packages. As this functionality increases so does the amount of
upper layer “OS” software needed to run it. With cost always a driving
factor, flash devices used for the system software need to be as small as
possible. A combination of cost + increased system functionality means less
space available for the boot/initialization code. At the same time there is
pressure to also add functionality too the boot/initialization code. As an
embedded systems engineer, you need to be able to understand the
implications associated with adding this functionality. Will you need to
increase the size of the flash part, can you live without this feature or is it a
must have or can you squeeze some more space from your current flash?
You must become an “embedded systems engineer” to know what affect a
specific feature request will have on the system.

Knowing what the choices you have when a feature request hits your inbox
is only the first step. You also need to be able to communicate this
information to your managers/executives. It maybe that the request for this
wiz-bang new feature has come from your manager and he/she is just
convinced that the end product will be a complete disaster without it. You
must be able to explain what are the options associated with adding this new
feature. We have all heard the line one time or another that ‘it is only code
and what is the big deal’.

If we are prepared ahead of time to deal with these requests, then ‘putting 10
lbs of functionality into a 5 lb package’ will be a lot easier. There are a few
things an engineer can do up front that will help:

   1) Layering the firmware, with a clear plan for what each layer of the
      code is responsible for.
   2) Adding debug code while minimizing the impact to the boot process
      and avoiding code bloat.
   3) Maintaining multiple firmware images in a system with a minimal
      footprint in the boot process.




ESC-370 San Jose California Spring 2007                               Page 3 of 7
How to put 10lbs of functionality into a 5lb package.


Layering Your Code :
In looking at the boot process for today’s embedded designs, more
     functionality is being added earlier in the process. Some examples are :
     power status, OS flash image integrity and system recovery. Each of
     these requires a different amount of software support. Some will
     require notification to the user of the status and some will require
     interaction with the user. Most of these features are in addition to
     bringing the system up to a point where an OS and/or application can
     run.

Many embedded designs have one large firmware image that is both the boot
   code and the OS/application rolled into one. This monolithic approach
   to the code has many limitations associated with it. Some examples
   are :
  • Upgrading the firmware is a potentially dangerous problem that could
     leave the device nonfunctional.
  • The ability to maintain multiple images, a requirement in some cases,
     is impossible without some form of hardware support.

A better way to deal with this is to modularize or layer the code. Look at
what initialization needs to be done and break this up into sections. From
this see what is platform dependent and what is platform agnostic. This is
your first point of layering. If you have any system initialization code, this
would become the next layer. The final layer would be the OS/application
for the device. So we now have three layers for our firmware (see Figure 1).


                                Platf orm Dependent Code




                                 Sy stem Dependent Code




                                     OS/Application




ESC-370 San Jose California Spring 2007                             Page 4 of 7
How to put 10lbs of functionality into a 5lb package.

                             Figure 1 : Firmware Layering

Each layer should have a mechanism to load the layer above it. It should
    also have as much debug capability in the code as possible. (See next
    section).


Having split the monolithic firmware image into these layers allows us to
    move from a monolithic way of debugging the code to a more modular
    approach.

Debugging without the Bloat :
Most embedded firmware has some form of debug monitor capabilities in it.
    This is usually accessed by a key sequence during boot time or through
    a menu system that is the default interface for the device. This debug
    monitor usually requires that the majority of the system be functional in
    order to work. This does not lend itself to debugging problems that
    occur early in the boot process and is usually used to help debug
    OS/applications. In order to debug the hardware/boot code better we
    need a monitor that needs little to no resources to run. One such
    monitor is Micromon developed for the MIPs family of chips by IDT.
    This monitor as a standalone binary is only 13K in size, yet it provides
    all of the features needed to help debug during system bring-up. It
    could very easily be adapted to another processor. It only needs 8 GP
    registers for the stack and input positions.

Using the split firmware above,




Assumptions :
The assumptions for this paper are that the reader has a good understanding
of embedded systems and an understanding of the general boot process for
microprocessors. An understanding of C is expected and some assembly
would be helpful.

Layering your code :




ESC-370 San Jose California Spring 2007                             Page 5 of 7
How to put 10lbs of functionality into a 5lb package.



Definitions :
Boot Device :

Reset Vector :




ESC-370 San Jose California Spring 2007                            Page 6 of 7
How to put 10lbs of functionality into a 5lb package.




As embedded engineers we are faced with pressures to put the maximum functionality into
our systems within the minimal footprint.



What this means from a boot code perspective is the initialization code is being squeezed into
a smaller footprint so that the upper layer applications have more room. At the same time,
we are being asked to add additional functionality.




[Understanding how to add as much functionality into your boot code, and the tradeoffs
associated this.] Presentation on how to modularize your boot code into different layers. This
will include examples of code using the MIPS processor. How to add debug output into the
boot process without slowing down the process and fitting into the available boot device being
used. How to satisfy requirements of having multiple boot images in a system with a minimal
footprint in the boot process.




ESC-370 San Jose California Spring 2007                                            Page 7 of 7

More Related Content

What's hot

World of Tanks* 1.0+: Enriching Gamers Experience with Multicore Optimized Ph...
World of Tanks* 1.0+: Enriching Gamers Experience with Multicore Optimized Ph...World of Tanks* 1.0+: Enriching Gamers Experience with Multicore Optimized Ph...
World of Tanks* 1.0+: Enriching Gamers Experience with Multicore Optimized Ph...Intel® Software
 
Healthcheck 07 application
Healthcheck 07 applicationHealthcheck 07 application
Healthcheck 07 applicationNakedi Kobo
 
Automotive embedded systems part7 v1
Automotive embedded systems part7 v1Automotive embedded systems part7 v1
Automotive embedded systems part7 v1Keroles karam khalil
 
Automotive embedded systems part6 v1
Automotive embedded systems part6 v1Automotive embedded systems part6 v1
Automotive embedded systems part6 v1Keroles karam khalil
 
Forts and Fights Scaling Performance on Unreal Engine*
Forts and Fights Scaling Performance on Unreal Engine*Forts and Fights Scaling Performance on Unreal Engine*
Forts and Fights Scaling Performance on Unreal Engine*Intel® Software
 
Virtualization with Lenovo X6 Blade Servers: white paper
Virtualization with Lenovo X6 Blade Servers: white paperVirtualization with Lenovo X6 Blade Servers: white paper
Virtualization with Lenovo X6 Blade Servers: white paperLenovo Data Center
 
Optimizing Direct X On Multi Core Architectures
Optimizing Direct X On Multi Core ArchitecturesOptimizing Direct X On Multi Core Architectures
Optimizing Direct X On Multi Core Architecturespsteinb
 
Real-Time Game Optimization with Intel® GPA
Real-Time Game Optimization with Intel® GPAReal-Time Game Optimization with Intel® GPA
Real-Time Game Optimization with Intel® GPAIntel® Software
 
Are you ready to work in the Parallel Universe? Rise to the challenge at SC13
Are you ready to work in the Parallel Universe? Rise to the challenge at SC13Are you ready to work in the Parallel Universe? Rise to the challenge at SC13
Are you ready to work in the Parallel Universe? Rise to the challenge at SC13Intel IT Center
 
Scalability for All: Unreal Engine* 4 with Intel
Scalability for All: Unreal Engine* 4 with Intel Scalability for All: Unreal Engine* 4 with Intel
Scalability for All: Unreal Engine* 4 with Intel Intel® Software
 
BoxGrinder – FUDCon 2011 Tempe
BoxGrinder – FUDCon 2011 TempeBoxGrinder – FUDCon 2011 Tempe
BoxGrinder – FUDCon 2011 Tempemarekgoldmann
 
SafePeak Installation guide
SafePeak Installation guideSafePeak Installation guide
SafePeak Installation guideVladi Vexler
 
Scale CPU Experiences: Maximize Unity* Performance Using the Entity Component...
Scale CPU Experiences: Maximize Unity* Performance Using the Entity Component...Scale CPU Experiences: Maximize Unity* Performance Using the Entity Component...
Scale CPU Experiences: Maximize Unity* Performance Using the Entity Component...Intel® Software
 
Pc Open Del2
Pc Open Del2Pc Open Del2
Pc Open Del2grifflyd
 
Threading Game Engines: QUAKE 4 & Enemy Territory QUAKE Wars
Threading Game Engines: QUAKE 4 & Enemy Territory QUAKE WarsThreading Game Engines: QUAKE 4 & Enemy Territory QUAKE Wars
Threading Game Engines: QUAKE 4 & Enemy Territory QUAKE Warspsteinb
 
The Architecture of 11th Generation Intel® Processor Graphics
The Architecture of 11th Generation Intel® Processor GraphicsThe Architecture of 11th Generation Intel® Processor Graphics
The Architecture of 11th Generation Intel® Processor GraphicsIntel® Software
 
Automotive embedded systems part2 v1
Automotive embedded systems part2 v1Automotive embedded systems part2 v1
Automotive embedded systems part2 v1Keroles karam khalil
 
Kvm for ibm_z_systems_v1.1.2_limits
Kvm for ibm_z_systems_v1.1.2_limitsKvm for ibm_z_systems_v1.1.2_limits
Kvm for ibm_z_systems_v1.1.2_limitsKrystel Hery
 
In The Trenches Optimizing UE4 for Intel
In The Trenches Optimizing UE4 for IntelIn The Trenches Optimizing UE4 for Intel
In The Trenches Optimizing UE4 for IntelIntel® Software
 

What's hot (20)

World of Tanks* 1.0+: Enriching Gamers Experience with Multicore Optimized Ph...
World of Tanks* 1.0+: Enriching Gamers Experience with Multicore Optimized Ph...World of Tanks* 1.0+: Enriching Gamers Experience with Multicore Optimized Ph...
World of Tanks* 1.0+: Enriching Gamers Experience with Multicore Optimized Ph...
 
Healthcheck 07 application
Healthcheck 07 applicationHealthcheck 07 application
Healthcheck 07 application
 
Automotive embedded systems part7 v1
Automotive embedded systems part7 v1Automotive embedded systems part7 v1
Automotive embedded systems part7 v1
 
Automotive embedded systems part6 v1
Automotive embedded systems part6 v1Automotive embedded systems part6 v1
Automotive embedded systems part6 v1
 
Forts and Fights Scaling Performance on Unreal Engine*
Forts and Fights Scaling Performance on Unreal Engine*Forts and Fights Scaling Performance on Unreal Engine*
Forts and Fights Scaling Performance on Unreal Engine*
 
Virtualization with Lenovo X6 Blade Servers: white paper
Virtualization with Lenovo X6 Blade Servers: white paperVirtualization with Lenovo X6 Blade Servers: white paper
Virtualization with Lenovo X6 Blade Servers: white paper
 
Optimizing Direct X On Multi Core Architectures
Optimizing Direct X On Multi Core ArchitecturesOptimizing Direct X On Multi Core Architectures
Optimizing Direct X On Multi Core Architectures
 
Real-Time Game Optimization with Intel® GPA
Real-Time Game Optimization with Intel® GPAReal-Time Game Optimization with Intel® GPA
Real-Time Game Optimization with Intel® GPA
 
Are you ready to work in the Parallel Universe? Rise to the challenge at SC13
Are you ready to work in the Parallel Universe? Rise to the challenge at SC13Are you ready to work in the Parallel Universe? Rise to the challenge at SC13
Are you ready to work in the Parallel Universe? Rise to the challenge at SC13
 
Scalability for All: Unreal Engine* 4 with Intel
Scalability for All: Unreal Engine* 4 with Intel Scalability for All: Unreal Engine* 4 with Intel
Scalability for All: Unreal Engine* 4 with Intel
 
BoxGrinder – FUDCon 2011 Tempe
BoxGrinder – FUDCon 2011 TempeBoxGrinder – FUDCon 2011 Tempe
BoxGrinder – FUDCon 2011 Tempe
 
XS Boston 2008 VT-D PCI
XS Boston 2008 VT-D PCIXS Boston 2008 VT-D PCI
XS Boston 2008 VT-D PCI
 
SafePeak Installation guide
SafePeak Installation guideSafePeak Installation guide
SafePeak Installation guide
 
Scale CPU Experiences: Maximize Unity* Performance Using the Entity Component...
Scale CPU Experiences: Maximize Unity* Performance Using the Entity Component...Scale CPU Experiences: Maximize Unity* Performance Using the Entity Component...
Scale CPU Experiences: Maximize Unity* Performance Using the Entity Component...
 
Pc Open Del2
Pc Open Del2Pc Open Del2
Pc Open Del2
 
Threading Game Engines: QUAKE 4 & Enemy Territory QUAKE Wars
Threading Game Engines: QUAKE 4 & Enemy Territory QUAKE WarsThreading Game Engines: QUAKE 4 & Enemy Territory QUAKE Wars
Threading Game Engines: QUAKE 4 & Enemy Territory QUAKE Wars
 
The Architecture of 11th Generation Intel® Processor Graphics
The Architecture of 11th Generation Intel® Processor GraphicsThe Architecture of 11th Generation Intel® Processor Graphics
The Architecture of 11th Generation Intel® Processor Graphics
 
Automotive embedded systems part2 v1
Automotive embedded systems part2 v1Automotive embedded systems part2 v1
Automotive embedded systems part2 v1
 
Kvm for ibm_z_systems_v1.1.2_limits
Kvm for ibm_z_systems_v1.1.2_limitsKvm for ibm_z_systems_v1.1.2_limits
Kvm for ibm_z_systems_v1.1.2_limits
 
In The Trenches Optimizing UE4 for Intel
In The Trenches Optimizing UE4 for IntelIn The Trenches Optimizing UE4 for Intel
In The Trenches Optimizing UE4 for Intel
 

Viewers also liked

Dodawanie +4, Stefcio, Nauka Liczenia z MagWords, Dodawanie, Glenn Doman
Dodawanie +4, Stefcio, Nauka Liczenia z MagWords, Dodawanie, Glenn DomanDodawanie +4, Stefcio, Nauka Liczenia z MagWords, Dodawanie, Glenn Doman
Dodawanie +4, Stefcio, Nauka Liczenia z MagWords, Dodawanie, Glenn DomanMagWords.pl
 
Dodawanie +7, Nauka Liczenia z MagWords wg metody Glenna Domana
Dodawanie +7, Nauka Liczenia z MagWords wg metody Glenna DomanaDodawanie +7, Nauka Liczenia z MagWords wg metody Glenna Domana
Dodawanie +7, Nauka Liczenia z MagWords wg metody Glenna DomanaMagWords.pl
 
Almond Ricotta Cannoli's with Brandy and Honey Infused Rasins
Almond Ricotta Cannoli's with Brandy and Honey Infused Rasins Almond Ricotta Cannoli's with Brandy and Honey Infused Rasins
Almond Ricotta Cannoli's with Brandy and Honey Infused Rasins Melissa Cozzi
 
Deconstructed Goat Cheese Cheesecake & Figs
Deconstructed Goat Cheese Cheesecake & FigsDeconstructed Goat Cheese Cheesecake & Figs
Deconstructed Goat Cheese Cheesecake & FigsMelissa Cozzi
 
Two Tier Round Cake with Gum Paste Roses
Two Tier Round Cake with Gum Paste Roses Two Tier Round Cake with Gum Paste Roses
Two Tier Round Cake with Gum Paste Roses Melissa Cozzi
 
Nauka Liczenia z MagWords - by Glenn Doman, dodawanie/counting +3, matematyka...
Nauka Liczenia z MagWords - by Glenn Doman, dodawanie/counting +3, matematyka...Nauka Liczenia z MagWords - by Glenn Doman, dodawanie/counting +3, matematyka...
Nauka Liczenia z MagWords - by Glenn Doman, dodawanie/counting +3, matematyka...MagWords.pl
 
Ansal Pioneer city Broucher,9136824702
Ansal Pioneer city Broucher,9136824702Ansal Pioneer city Broucher,9136824702
Ansal Pioneer city Broucher,9136824702sahilkharkara1
 
Rolls-Royce presentation FINAL PP
Rolls-Royce presentation FINAL PPRolls-Royce presentation FINAL PP
Rolls-Royce presentation FINAL PPEsra Bombaci
 

Viewers also liked (14)

Call sheet2
Call sheet2Call sheet2
Call sheet2
 
Carpet One's Spring Cleaning Checklist
Carpet One's Spring Cleaning ChecklistCarpet One's Spring Cleaning Checklist
Carpet One's Spring Cleaning Checklist
 
Dodawanie +4, Stefcio, Nauka Liczenia z MagWords, Dodawanie, Glenn Doman
Dodawanie +4, Stefcio, Nauka Liczenia z MagWords, Dodawanie, Glenn DomanDodawanie +4, Stefcio, Nauka Liczenia z MagWords, Dodawanie, Glenn Doman
Dodawanie +4, Stefcio, Nauka Liczenia z MagWords, Dodawanie, Glenn Doman
 
Dodawanie +7, Nauka Liczenia z MagWords wg metody Glenna Domana
Dodawanie +7, Nauka Liczenia z MagWords wg metody Glenna DomanaDodawanie +7, Nauka Liczenia z MagWords wg metody Glenna Domana
Dodawanie +7, Nauka Liczenia z MagWords wg metody Glenna Domana
 
Almond Ricotta Cannoli's with Brandy and Honey Infused Rasins
Almond Ricotta Cannoli's with Brandy and Honey Infused Rasins Almond Ricotta Cannoli's with Brandy and Honey Infused Rasins
Almond Ricotta Cannoli's with Brandy and Honey Infused Rasins
 
Deconstructed Goat Cheese Cheesecake & Figs
Deconstructed Goat Cheese Cheesecake & FigsDeconstructed Goat Cheese Cheesecake & Figs
Deconstructed Goat Cheese Cheesecake & Figs
 
Evaluation 2
Evaluation 2Evaluation 2
Evaluation 2
 
Two Tier Round Cake with Gum Paste Roses
Two Tier Round Cake with Gum Paste Roses Two Tier Round Cake with Gum Paste Roses
Two Tier Round Cake with Gum Paste Roses
 
Doc1
Doc1Doc1
Doc1
 
Nauka Liczenia z MagWords - by Glenn Doman, dodawanie/counting +3, matematyka...
Nauka Liczenia z MagWords - by Glenn Doman, dodawanie/counting +3, matematyka...Nauka Liczenia z MagWords - by Glenn Doman, dodawanie/counting +3, matematyka...
Nauka Liczenia z MagWords - by Glenn Doman, dodawanie/counting +3, matematyka...
 
Ansal Pioneer city Broucher,9136824702
Ansal Pioneer city Broucher,9136824702Ansal Pioneer city Broucher,9136824702
Ansal Pioneer city Broucher,9136824702
 
Gta postmodern
Gta postmodernGta postmodern
Gta postmodern
 
Polymers,PVC
Polymers,PVC Polymers,PVC
Polymers,PVC
 
Rolls-Royce presentation FINAL PP
Rolls-Royce presentation FINAL PPRolls-Royce presentation FINAL PP
Rolls-Royce presentation FINAL PP
 

Similar to How to put 10lbs of functionality into a 5lb package.

Why software performance reduces with time?.pdf
Why software performance reduces with time?.pdfWhy software performance reduces with time?.pdf
Why software performance reduces with time?.pdfMike Brown
 
Performance out of the box developers
Performance   out of the box developersPerformance   out of the box developers
Performance out of the box developersMichelle Holley
 
Ceph Day Beijing - SPDK in Ceph
Ceph Day Beijing - SPDK in CephCeph Day Beijing - SPDK in Ceph
Ceph Day Beijing - SPDK in CephCeph Community
 
Ceph Day Beijing - SPDK for Ceph
Ceph Day Beijing - SPDK for CephCeph Day Beijing - SPDK for Ceph
Ceph Day Beijing - SPDK for CephDanielle Womboldt
 
DAOS - Scale-Out Software-Defined Storage for HPC/Big Data/AI Convergence
DAOS - Scale-Out Software-Defined Storage for HPC/Big Data/AI ConvergenceDAOS - Scale-Out Software-Defined Storage for HPC/Big Data/AI Convergence
DAOS - Scale-Out Software-Defined Storage for HPC/Big Data/AI Convergenceinside-BigData.com
 
Agentless System Crawler - InterConnect 2016
Agentless System Crawler - InterConnect 2016Agentless System Crawler - InterConnect 2016
Agentless System Crawler - InterConnect 2016Canturk Isci
 
Esm rel notes_6.0cp1
Esm rel notes_6.0cp1Esm rel notes_6.0cp1
Esm rel notes_6.0cp1Protect724v3
 
Optimizing Apache Spark Throughput Using Intel Optane and Intel Memory Drive...
 Optimizing Apache Spark Throughput Using Intel Optane and Intel Memory Drive... Optimizing Apache Spark Throughput Using Intel Optane and Intel Memory Drive...
Optimizing Apache Spark Throughput Using Intel Optane and Intel Memory Drive...Databricks
 
Joanna Rutkowska Subverting Vista Kernel
Joanna Rutkowska   Subverting Vista KernelJoanna Rutkowska   Subverting Vista Kernel
Joanna Rutkowska Subverting Vista Kernelguestf1a032
 
ESM 5.5 Patch 1 Release Notes
ESM 5.5 Patch 1 Release NotesESM 5.5 Patch 1 Release Notes
ESM 5.5 Patch 1 Release NotesProtect724
 
SMI_SNUG_paper_v10
SMI_SNUG_paper_v10SMI_SNUG_paper_v10
SMI_SNUG_paper_v10Igor Lesik
 
The Architecture of Intel Processor Graphics: Gen 11
The Architecture of Intel Processor Graphics: Gen 11The Architecture of Intel Processor Graphics: Gen 11
The Architecture of Intel Processor Graphics: Gen 11DESMOND YUEN
 
Oracle ebs-r12-1-3installationlinux64bit
Oracle ebs-r12-1-3installationlinux64bitOracle ebs-r12-1-3installationlinux64bit
Oracle ebs-r12-1-3installationlinux64bitRavi Kumar Lanke
 
Blades for HPTC
Blades for HPTCBlades for HPTC
Blades for HPTCGuy Coates
 
Mikrotik
MikrotikMikrotik
Mikrotikhzcom
 
Accelerating Virtual Machine Access with the Storage Performance Development ...
Accelerating Virtual Machine Access with the Storage Performance Development ...Accelerating Virtual Machine Access with the Storage Performance Development ...
Accelerating Virtual Machine Access with the Storage Performance Development ...Michelle Holley
 

Similar to How to put 10lbs of functionality into a 5lb package. (20)

Read me
Read meRead me
Read me
 
Why software performance reduces with time?.pdf
Why software performance reduces with time?.pdfWhy software performance reduces with time?.pdf
Why software performance reduces with time?.pdf
 
Clear Linux OS - Architecture Overview
Clear Linux OS - Architecture OverviewClear Linux OS - Architecture Overview
Clear Linux OS - Architecture Overview
 
Performance out of the box developers
Performance   out of the box developersPerformance   out of the box developers
Performance out of the box developers
 
Embedded Systems
Embedded SystemsEmbedded Systems
Embedded Systems
 
Ceph Day Beijing - SPDK in Ceph
Ceph Day Beijing - SPDK in CephCeph Day Beijing - SPDK in Ceph
Ceph Day Beijing - SPDK in Ceph
 
Ceph Day Beijing - SPDK for Ceph
Ceph Day Beijing - SPDK for CephCeph Day Beijing - SPDK for Ceph
Ceph Day Beijing - SPDK for Ceph
 
DAOS - Scale-Out Software-Defined Storage for HPC/Big Data/AI Convergence
DAOS - Scale-Out Software-Defined Storage for HPC/Big Data/AI ConvergenceDAOS - Scale-Out Software-Defined Storage for HPC/Big Data/AI Convergence
DAOS - Scale-Out Software-Defined Storage for HPC/Big Data/AI Convergence
 
Agentless System Crawler - InterConnect 2016
Agentless System Crawler - InterConnect 2016Agentless System Crawler - InterConnect 2016
Agentless System Crawler - InterConnect 2016
 
Esm rel notes_6.0cp1
Esm rel notes_6.0cp1Esm rel notes_6.0cp1
Esm rel notes_6.0cp1
 
Optimizing Apache Spark Throughput Using Intel Optane and Intel Memory Drive...
 Optimizing Apache Spark Throughput Using Intel Optane and Intel Memory Drive... Optimizing Apache Spark Throughput Using Intel Optane and Intel Memory Drive...
Optimizing Apache Spark Throughput Using Intel Optane and Intel Memory Drive...
 
Joanna Rutkowska Subverting Vista Kernel
Joanna Rutkowska   Subverting Vista KernelJoanna Rutkowska   Subverting Vista Kernel
Joanna Rutkowska Subverting Vista Kernel
 
ESM 5.5 Patch 1 Release Notes
ESM 5.5 Patch 1 Release NotesESM 5.5 Patch 1 Release Notes
ESM 5.5 Patch 1 Release Notes
 
SMI_SNUG_paper_v10
SMI_SNUG_paper_v10SMI_SNUG_paper_v10
SMI_SNUG_paper_v10
 
The Architecture of Intel Processor Graphics: Gen 11
The Architecture of Intel Processor Graphics: Gen 11The Architecture of Intel Processor Graphics: Gen 11
The Architecture of Intel Processor Graphics: Gen 11
 
Embedded systems
Embedded systemsEmbedded systems
Embedded systems
 
Oracle ebs-r12-1-3installationlinux64bit
Oracle ebs-r12-1-3installationlinux64bitOracle ebs-r12-1-3installationlinux64bit
Oracle ebs-r12-1-3installationlinux64bit
 
Blades for HPTC
Blades for HPTCBlades for HPTC
Blades for HPTC
 
Mikrotik
MikrotikMikrotik
Mikrotik
 
Accelerating Virtual Machine Access with the Storage Performance Development ...
Accelerating Virtual Machine Access with the Storage Performance Development ...Accelerating Virtual Machine Access with the Storage Performance Development ...
Accelerating Virtual Machine Access with the Storage Performance Development ...
 

How to put 10lbs of functionality into a 5lb package.

  • 1. How to put 10lbs of functionality into a 5lb package. How to put 10lbs of functionality into a 5lb package. By Marc Karasek Senior Firmware Engineer marckarasek@ivivity.com ESC-370 San Jose California Spring 2007 Page 1 of 7
  • 2. How to put 10lbs of functionality into a 5lb package. How to put 10lbs of functionality into a 5lb package..........................................................1 Overview: ............................................................................................................................3 Layering Your Code :..........................................................................................................4 In looking at the boot process for today’s embedded designs, more functionality is being added earlier in the process. Some examples are : power status, OS flash image integrity and system recovery. Each of these requires a different amount of software support. Some will require notification to the user of the status and some will require interaction with the user. Most of these features are in addition to bringing the system up to a point where an OS and/or application can run. ..................................................4 Many embedded designs have one large firmware image that is both the boot code and the OS/application rolled into one. This monolithic approach to the code has many limitations associated with it. Some examples are : ......................................................4 Upgrading the firmware is a potentially dangerous problem that could leave the device nonfunctional. ................................................................................................................4 The ability to maintain multiple images, a requirement in some cases, is impossible without some form of hardware support. ........................................................................4 Each layer should have a mechanism to load the layer above it. It should also have as much debug capability in the code as possible. (See next section). .............................5 Having split the monolithic firmware image into these layers allows us to move from a monolithic way of debugging the code to a more modular approach. ............................5 Debugging without the Bloat :.............................................................................................5 Most embedded firmware has some form of debug monitor capabilities in it. This is usually accessed by a key sequence during boot time or through a menu system that is the default interface for the device. This debug monitor usually requires that the majority of the system be functional in order to work. This does not lend itself to debugging problems that occur early in the boot process and is usually used to help debug OS/applications. In order to debug the hardware/boot code better we need a monitor that needs little to no resources to run. One such monitor is Micromon developed for the MIPs family of chips by IDT. This monitor as a standalone binary is only 13K in size, yet it provides all of the features needed to help debug during system bring-up. It could very easily be adapted to another processor. It only needs 8 GP registers for the stack and input positions........................................................................5 Using the split firmware above, .....................................................................................5 Assumptions : ......................................................................................................................5 Definitions : ........................................................................................................................6 ESC-370 San Jose California Spring 2007 Page 2 of 7
  • 3. How to put 10lbs of functionality into a 5lb package. Overview: In today’s embedded designs more and more functionality is being crammed into smaller packages. As this functionality increases so does the amount of upper layer “OS” software needed to run it. With cost always a driving factor, flash devices used for the system software need to be as small as possible. A combination of cost + increased system functionality means less space available for the boot/initialization code. At the same time there is pressure to also add functionality too the boot/initialization code. As an embedded systems engineer, you need to be able to understand the implications associated with adding this functionality. Will you need to increase the size of the flash part, can you live without this feature or is it a must have or can you squeeze some more space from your current flash? You must become an “embedded systems engineer” to know what affect a specific feature request will have on the system. Knowing what the choices you have when a feature request hits your inbox is only the first step. You also need to be able to communicate this information to your managers/executives. It maybe that the request for this wiz-bang new feature has come from your manager and he/she is just convinced that the end product will be a complete disaster without it. You must be able to explain what are the options associated with adding this new feature. We have all heard the line one time or another that ‘it is only code and what is the big deal’. If we are prepared ahead of time to deal with these requests, then ‘putting 10 lbs of functionality into a 5 lb package’ will be a lot easier. There are a few things an engineer can do up front that will help: 1) Layering the firmware, with a clear plan for what each layer of the code is responsible for. 2) Adding debug code while minimizing the impact to the boot process and avoiding code bloat. 3) Maintaining multiple firmware images in a system with a minimal footprint in the boot process. ESC-370 San Jose California Spring 2007 Page 3 of 7
  • 4. How to put 10lbs of functionality into a 5lb package. Layering Your Code : In looking at the boot process for today’s embedded designs, more functionality is being added earlier in the process. Some examples are : power status, OS flash image integrity and system recovery. Each of these requires a different amount of software support. Some will require notification to the user of the status and some will require interaction with the user. Most of these features are in addition to bringing the system up to a point where an OS and/or application can run. Many embedded designs have one large firmware image that is both the boot code and the OS/application rolled into one. This monolithic approach to the code has many limitations associated with it. Some examples are : • Upgrading the firmware is a potentially dangerous problem that could leave the device nonfunctional. • The ability to maintain multiple images, a requirement in some cases, is impossible without some form of hardware support. A better way to deal with this is to modularize or layer the code. Look at what initialization needs to be done and break this up into sections. From this see what is platform dependent and what is platform agnostic. This is your first point of layering. If you have any system initialization code, this would become the next layer. The final layer would be the OS/application for the device. So we now have three layers for our firmware (see Figure 1). Platf orm Dependent Code Sy stem Dependent Code OS/Application ESC-370 San Jose California Spring 2007 Page 4 of 7
  • 5. How to put 10lbs of functionality into a 5lb package. Figure 1 : Firmware Layering Each layer should have a mechanism to load the layer above it. It should also have as much debug capability in the code as possible. (See next section). Having split the monolithic firmware image into these layers allows us to move from a monolithic way of debugging the code to a more modular approach. Debugging without the Bloat : Most embedded firmware has some form of debug monitor capabilities in it. This is usually accessed by a key sequence during boot time or through a menu system that is the default interface for the device. This debug monitor usually requires that the majority of the system be functional in order to work. This does not lend itself to debugging problems that occur early in the boot process and is usually used to help debug OS/applications. In order to debug the hardware/boot code better we need a monitor that needs little to no resources to run. One such monitor is Micromon developed for the MIPs family of chips by IDT. This monitor as a standalone binary is only 13K in size, yet it provides all of the features needed to help debug during system bring-up. It could very easily be adapted to another processor. It only needs 8 GP registers for the stack and input positions. Using the split firmware above, Assumptions : The assumptions for this paper are that the reader has a good understanding of embedded systems and an understanding of the general boot process for microprocessors. An understanding of C is expected and some assembly would be helpful. Layering your code : ESC-370 San Jose California Spring 2007 Page 5 of 7
  • 6. How to put 10lbs of functionality into a 5lb package. Definitions : Boot Device : Reset Vector : ESC-370 San Jose California Spring 2007 Page 6 of 7
  • 7. How to put 10lbs of functionality into a 5lb package. As embedded engineers we are faced with pressures to put the maximum functionality into our systems within the minimal footprint. What this means from a boot code perspective is the initialization code is being squeezed into a smaller footprint so that the upper layer applications have more room. At the same time, we are being asked to add additional functionality. [Understanding how to add as much functionality into your boot code, and the tradeoffs associated this.] Presentation on how to modularize your boot code into different layers. This will include examples of code using the MIPS processor. How to add debug output into the boot process without slowing down the process and fitting into the available boot device being used. How to satisfy requirements of having multiple boot images in a system with a minimal footprint in the boot process. ESC-370 San Jose California Spring 2007 Page 7 of 7