The Pedigree Project 0.1
armv7/Processor.h
1#ifndef KERNEL_PROCESSOR_ARMV7_PROCESSOR_H
2#define KERNEL_PROCESSOR_ARMV7_PROCESSOR_H
3
4#include "pedigree/kernel/processor/Processor.h"
5
6class Armv7Processor : public ProcessorBase {};
7
8#if ARMV7
9ALWAYS_INLINE inline ProcessorInformation& ProcessorBase::information() {
10 ProcessorInformation* info;
11 asm volatile("mrc p15, 0, %0, c13, c0, 4" : "=r"(info));
12 return info ? *info : m_SafeBspProcessorInformation;
13}
14
15ALWAYS_INLINE inline size_t ProcessorBase::index() {
16 return information().processorId();
17}
18#endif
19
20#endif
static ProcessorInformation & information()
static ProcessorInformation m_SafeBspProcessorInformation
Definition Processor.h:516
static size_t index()