已阅读5页,还剩45页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Thesuccess sroad CELinuxPM WhatWe llTalk PMTheoryandHardwareSupport2 6kernelPM SubsystemCELFPMSpecificationAppendixCurrentPMImplementation Hardwarecomponents Hardwarecomponents PowerControlledComponentsinclude IntelPXAXscaleCPU real timeclock DRAM Flash LCD frontlight UART audiocodec touchscreen keysandpowerbutton etc TheXscalePXA27XCPUsupportsseveralpower savingfeatures XscaleCPUPMFeatures PXA27XPMfeatures includingfrequencyscalingandCPUcorevoltagescaling Andseveralmodesofoperation RunmodeAllpowersuppliesenabled allclocksrunningandeveryon chipresourceisfunctional IdlemodeCPUclockstopped otheron chipresourcesareactive Whenaninterruptoccurs theCPUisreactivated SleepmodePowerisswitchedofftothemajorityoftheprocessor Somepreprogrammedevent suchasapowerbuttonpress wakesuptheCPUfromthismode HandheldEnergyBudgets PMTheory OSPMfocusesonactivepowerconsumptionModulatemethods Voltage clockmodulateClockselectedPowersupplyselected KernelPM Subsystem KernelPM Subsystem WhatwewilltalkCoversthetwobroadareasofpowermanagement SystemPowerManagement SPM DevicePowerManagement DPM Andmore DevicePowerManagement DPM DevicePMDealswiththeprocessofplacingindividualdevicesintolow powerstateswhilethesystemisrunning Invokedexplicitlyondevices ormayhappenautomaticallyafteradevicehasbeenidleforasetofamountoftime SystemPowerManagement SPM SystemPMTheentiresystemisplacedintoalow powerstate runningsystemissavedbeforepowereddown andrestoredoncethesystemhasregainedpower Automaticallyenteralow powerstateafterithasbeenidleforsomeamountoftime orwhensomecriticalstatehasbeenreached Alsopolicydecisionsthatareuptotheusertoconfigureandrequiresomeglobalmechanismforcontrolling DevicePowerManagement Newdrivermodel LDM inthe2 6kernel whichprovidesahierarchicalrepresentationofthedevicesinthesystem Devicepowerstatesaredescribedas D states andconsistofstatesD0 D3 inclusive InfluencedbyACPISpec DevicePMDataStructs Adevice sPMinforstoredinstructdevice pm structdevicecontainsadevice pmobject structdevice pm dev power tpower state u8 saved state atomic tdepend atomic tdisable structkobjectkobj DevicePMDataStructs typedefenum DEVICE PM ON DEVICE PM INT1 DEVICE PM INT2 DEVICE PM OFF DEVICE PM UNKNOWN Device sinitialpowerstate dev power t enum SUSPEND SAVE STATE SUSPEND POWER DOWN enum RESUME POWER ON RESUME RESTORE STATE PowerDependencies TwostepstosuspenddeviceonetosavestateanothertopowerthedevicedownConversely onecallismadetotheresume methodtopowerthedeviceupanothertorestoredevicestate allchildrendevicesmustbepowereddownbeforetheirparentcanbepowereddown Conversely theparentdevicemustbepoweredupbeforeanychildrendevicesmaybeaccessed Onlywhenadevice sdependcount structdevice pm dependfield is0mayitbepowereddown intdevice pm get put structdevice RegisterPMhandlers staticint initi2c init void retval bus register DeviceSpecifieddriver explainlater RegisterPMhandlers staticstructdevice driveri2c adapter driver name i2c adapter bus RegisterPMhandlers staticstructdevice driveri2c pxa driver name pxa2xx i2c bus RegisterPMhandlers staticinti2c pxa controller suspend structdevice dev u32state u32level ifdefCONFIG PMi2c pxa wait bus not busy i2c pxa stop endifreturn0 InternalSequenceofDevicePM echon sys bus i2c devices 1 1 power state ncanbe 0 3 Whenn 0 resumestepssimilar state store drivers base power sysfs c dpm runtime suspend drivers base power runtime c suspend device drivers base power suspend c callsuspendhandlerofthebuswhichthespecifieddevicebelongsto callsuspendhandlerforthespecifieddevice SystemPowerManagement PowerStates KernelsupportsstatesareStandby Suspend andHibernate typedefenum POWER ON 0 POWER STANDBY 0 x01 POWER SUSPEND 0 x02 POWER HIBERNATE 0 x04 pm system state t SystemPMStates Standbylow latencypoweras power onsuspend systemconservespowerbyplacingtheCPUinahaltstateandthedevicesintheD1state Thepowersavingsarenotsignificant buttheresponselatencyisminimal SuspendAs suspend to RAM alldevicesareplacedintheD3stateandtheentiresystem exceptmainmemory isexpectedtolosepower Memoryisplacedinself refreshmode soitscontentsarenotlost ResponselatencyishigherthanStandby Hibernateconservesthemostpowerbyturningofftheentiresystem aftersavingstatetoapersistentmedium Alldevicesarepoweredoffunconditionally Theresponselatencyisthehighest Butwewon ttalkaboutithere SystemPMDataStructs structpm state structpm driver drv handlethepowerstatepm system state tsys low levelpowerstatesystemwillenterpm device state tdev lowestpowerstatedevicesmayenter structkobjectkobj objectformanaginganinstance slifetime structpm statepm state standby structpm statepm state suspend structpm statepm state hibernate SPMsysfsinterface Example cat sys power stateResults standbysuspendhibernate echosuspend sys power stateBywritingthenameofastatetothisfile thesystemwillperformapowerstatetransition SPMPlatformDrivers structpm driver u32states int prepare u32state int save u32state int sleep u32state int restore u32state int cleanup u32state structkobjectkobj intpm driver register structpm driver voidpm driver unregister structpm driver SPMPlatformDrivers structpm attribute structattributeattr ssize t show structpm driver char ssize t store structpm driver constchar size t intpm attribute create structpm driver structpm attribute voidpm attribute remove structpm driver structpm attribute pm attribute store methodwillcall enter state state andenterrelatedpmstate PowerStateTransitions Triggeredbywritingtherequestedstatetothesysfsfile sys power state Suspendsequence Firstverifythatthesystemcanenterthepowerstate PMcorethenqueststherunningsystembydisablingpreemptionand freezing allprocesses Next device suspend tosavesystemdevicestate driver ssave methodtosavelow levelsystemstate PMcorethendisablesinterruptsandcallsdevice power down toplaceeachdeviceinthespecifiedlowpowerstate Finally itcallsthedriver ssleep methodtotransitionthesystemtothelow powerstate PowerStateTransitions ResumesequencePlatformreturningexcecutiontothecorrectplace afterthereturnfromthedriver ssleep method PMcorepoweronalldevicesandrestoreinterrupts driver srestore methodiscalledtorestorelow levelsystemstate anddevice pm resume iscalledtorestoredevicecontext Finally thedriver scleanup methodiscalled processesare thawed andpreemptionisreenabled InternalSequenceofSystemPM echo standby sys power statestate store kernel power main c enter state kernel power main c ThisistheentrancetoSPM gowiththesameroutewhenpm suspend called InternalSequenceofSystemPM pm suspend callflowenter state kernel power main c suspend prepare kernel power main c pm prepare console kernel power console c freeze processes kernel power process c pm ops prepare device suspend driver base power suspend c suspend device foreachdeviceonthe dpm active list driver base power suspend c movetheentryfrom dpm active to dpm off or dpm off irq onsuspendhandlerreturns EAGAINsuspend enter kernel power main c local irq save Con InternalSequenceofSystemPM device power down drivers base power suspend c suspend device foreachdeviceonthe dpm off irq list drivers base power suspend c sysdev suspend drivers base sys c pm ops enter Systemwilldownheredevice power up calledwith irqoff drivers base power resume c sysdev resume drivers base sys c dpm power up drivers base power resume c resume device foreachdeviceonthe dpm off irq list driver base power suspend c movetheentryfrom dpm irq off to dpm active local irq restore suspend finish kernel power main c InternalSequenceofSystemPM device resume calledwith irqon drivers base power resume c dpm resume drivers base power resume c resume device foreachdeviceonthe dpm off list movetheentryto dpm active from dpm off pm ops finish targetPMspecificthaw processes kernel power process c pm restore console kernel power console c InternalSequenceofSystemPM suspend device drivers base power suspend c callsuspendhandlerthebuswhichthespecifieddevicebelongsto callsuspendhandlerforthespecifieddevicesysdev suspend drivers base sys c foreachkernelsusbsysandclasscallsuspendhandlerforeachdriveron global drivers registeredwithsysdev register callasuspendhandlerforeachdriverundertheclass callasuspendhandlerfortheclass InternalSequenceofSystemPM sysdev resume drivers base sys c foreachkernelsusbsysandclasscallaresumehandlerfortheclasscallaresumehandlerforeachdriverundertheclass callresumehandlerforeachdriveron global drivers registeredwithsysdev register resume device drivers base power resume c callresumehandlerofthebuswhichthespecifieddevicebelongsto callresumehandlerforthespecifieddevice PM OPS staticstructpm opsacpi pm ops prepare acpi pm prepare enter acpi pm enter finish acpi pm finish drivers acpi sleep main c pm set ops Thegloblestructpm ops pm opsislinktoacpi pm ops SothePMSubsystemcanbeusedwithACPIImplement PXAPM OPS PXAPM OPSImplementationpm set ops implementsuspendtoram AllthePMfunctioncanbeaccessedbysysfsinterfaces orapmd orothersD CELFPMSpecificationAppendix CELFspecifiedPMtechnologiesareclassifiedintothreecategories platformsuspend resume TalkedAbove devicepowermanagement TalkedAbove platformdynamicpowermanagement WillTalk Dynamicpowermanagementisusedforreducingpowerdissipationwhileaproductisbeingused Dynamicpowermanagementcoversalsoreducingpowerforveryshortidleperiodsoftimewhileaproductisbusy Andmore Dynamicpowermanagement Dynamicpowermanagement Socalled DynamicPM Suchpowermanagementcaninvolvedynamiccontrolofperipheralclocksandpowersupplies varyingthetimertickfrequencyduringidleperiodsandCPUfrequency voltagescaling Thisusesacombinationofuser spaceandkernel spacesoftwareaPolicyManagercomponentrunninginuser spaceaPowerManagementEngine PM Engine componentrunninginkernel space Dynamicpowermanagement Thesoftwareselectsthesystemoperatingstatebasedonacombinationofthefollowing applicationrequirementstheparametersforbatterylifetimeortaskdeadlinesCPUloadingthecurrentdeviceconstraintsthecurrentoperatingstateuserinteraction KernelPM Subsystem DynamicPMImplement DPM PowerManagementPolicy PoliciestellDPMhowtorespondtosystemeventsandlower raisethepowerusageaccordinglyPolicyisbasedonthefollowingsystemdependentterms OperatingPoints UniqueprocessorpowerstatesdefinedbytheadjustablepowerparametersforyoursystemOperatingStates CPUexecutionstates suchasSleep Task andIdle thataretriggeredbyanoperatingpointClasses Associateoperatingpointswithoperatingstates allowingyoutoassignanoperatingstatemorethanoneoperatingpoint UsingDPM OperatingStates DPMProvidestheseoperatingstates SleepIdleTaskIfmorearerequired definetheminyourarch specificDPMfileFilenamewillbeasfollowsdependingonyourarchitecture linux include asm arm arch dpm hlinux include arch ppc platforms dpm h UsingDPM Initialize bi
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 制米工操作规程测试考核试卷含答案
- 油母页岩干馏工诚信强化考核试卷含答案
- 白酒酿造工岗前技术突破考核试卷含答案
- 驳筑、集拆坨盐工安全管理强化考核试卷含答案
- 剑麻纤维生产工安全培训效果评优考核试卷含答案
- 刨花板调施胶工岗前安全教育考核试卷含答案
- 干法熄焦工岗前基础验收考核试卷含答案
- 电线电缆包制工成果转化模拟考核试卷含答案
- 樟川双语面试题目及答案
- 联通考核面试题目及答案
- GB/T 47241-2026虚拟电厂技术导则
- 泰州市土地资产经营有限公司招聘笔试题库2026
- 2026年3月山东济南轨道交通集团运营有限公司社会招聘笔试历年参考题库附带答案详解
- 2026浙江省储备粮管理集团有限公司所属企业招聘人员6人(第一批)笔试模拟试题及答案解析
- 中国人寿校园招聘历年真题
- 冲压车间事故案例分析
- 2025“魅力嘉定精彩国资”上海嘉定区区属国有企业春季专场招聘136人笔试历年难易错考点试卷带答案解析
- 疏浚施工方案范本(3篇)
- (2025年)供应链岗位招聘笔试题与参考答案(某大型国企)
- 汽车钣金薪酬考核制度
- 建筑工程质量检测培训课件2026年
评论
0/150
提交评论