ASSP Variant/cpupage_chipset_api.h
author Arnaud Lenoir
Tue, 05 Oct 2010 14:48:01 +0100
changeset 26 0cdfb9e7f8e5
parent 0 bb4b476bbb96
permissions -rw-r--r--
FYI - READ ONLY - Updated SHAI_public_APIs-status.xlsx. contact arnaudl@symbian.org for any changes you want.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     1
/*
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     2
  cpupage_chipset_api.h
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     3
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     4
  Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     5
  All rights reserved.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     6
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     7
  This program and the accompanying materials are made available 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     8
  under the terms of the Eclipse Public License v1.0 which accompanies 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
     9
  this distribution, and is available at 
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    10
  http://www.eclipse.org/legal/epl-v10.html
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    11
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    12
  Initial Contributors:
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    13
  Nokia Corporation - initial contribution.
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    14
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    15
  Contributors:
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    16
*/
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    17
/** @file
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    18
@brief CPU page chipset API H
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    19
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    20
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    21
@publishedDeviceAbstraction
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    22
*/
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    23
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    24
#ifndef __CPUPAGE_CHIPSET_API_H__
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    25
#define __CPUPAGE_CHIPSET_API_H__
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    26
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    27
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    28
// Include files
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    29
#include <kern_priv.h>
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    30
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    31
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    32
/**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    33
CPU page structure which contains data delivered by bootstrap to ASSP/Variant
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    34
*/
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    35
struct TCpuPage
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    36
    {
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    37
    public:
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    38
        TBool     iRdcAvailable;     /**< is R&D certificate available */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    39
        TPhysAddr *iDebugBufferPhys; /**< address of the debug buffer */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    40
        TUint32   iDebugBufferSize;  /**< size of the debug buffer */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    41
    };
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    42
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    43
/**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    44
@brief CPU page class
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    45
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    46
class CPU page which contains the methods returning the CPU page related data
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    47
*/
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    48
class CpuPage
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    49
    {
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    50
    public:
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    51
        /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    52
        returns the address and size of the debug buffer
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    53
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    54
        @param aAddr address of the buffer on output in case of a success, NULL otherwise
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    55
        @param aSize size of the buffer on output (65536 bytes on success, 0 otherwise)
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    56
        @return returns KErrNone on success, KErrNotSupported otherwise
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    57
        @pre Pre-condition: bootstrap has reserved the memory for the debug buffer
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    58
             and has set up the CPU page: iDebugBufferPhys, iDebugBufferSize, Kern::SuperPage().iMachineData
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    59
        */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    60
        IMPORT_C static TInt GetDebugBuffer(TPhysAddr &aAddr, TUint32 &aSize);
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    61
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    62
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    63
        /**
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    64
        returns whether R&D certificate is available
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    65
        @pre Pre-condition: bootstrap has set up the CPU page: iRdcAvailable, Kern::SuperPage().iMachineData
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    66
        */
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    67
        IMPORT_C static TBool IsRdcAvailable();
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    68
    };
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    69
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    70
bb4b476bbb96 Initial contribution of SHAI APIs from Nokia.
Daniel Rubio <danielr@symbian.org>
parents:
diff changeset
    71
#endif // __CPUPAGE_CHIPSET_API_H__