Chameleon

Chameleon Svn Source Tree

Root/branches/JrCs/i386/libsaio/platform.c

1/*
2 * platform.c
3 *
4 */
5
6#include "libsaio.h"
7#include "bootstruct.h"
8#include "pci.h"
9#include "platform.h"
10#include "cpu.h"
11#include "mem.h"
12#include "spd.h"
13
14#ifndef DEBUG_PLATFORM
15#define DEBUG_PLATFORM 0
16#endif
17
18#if DEBUG_PLATFORM
19#define DBG(x...)printf(x)
20#else
21#define DBG(x...)
22#endif
23
24PlatformInfo_t Platform;
25
26bool platformCPUFeature(uint32_t feature)
27{
28if (Platform.CPU.Features & feature) {
29return true;
30} else {
31return false;
32}
33}
34
35void scan_platform(void)
36{
37memset(&Platform, 0, sizeof(Platform));
38build_pci_dt();
39scan_cpu(&Platform);
40scan_memory(&Platform);
41scan_spd(&Platform);
42}
43

Archive Download this file

Revision: 15