Chameleon

Chameleon Svn Source Tree

Root/branches/cparm/i386/libsaio/smp.h

1/*
2 * <Insert copyright here : it must be BSD-like so everyone can use it>
3 *
4 * Author: Erich Boleyn <erich@uruk.org> http://www.uruk.org/~erich/
5 *
6 * Header file implementing Intel MultiProcessor Specification (MPS)
7 * version 1.1 and 1.4 SMP hardware control for Intel Architecture CPUs,
8 * with hooks for running correctly on a standard PC without the hardware.
9 *
10 * This file was created from information in the Intel MPS version 1.4
11 * document, order number 242016-004, which can be ordered from the
12 * Intel literature center.
13 */
14#ifndef _SMP_H
15#define _SMP_H
16
17#include "libsaio.h"
18
19//#define MP_SIGL 0x5f504d5f
20#define MP_SIGSTR "_MP_"
21
22/*
23 * MP Configuration Table Header (cth)
24 *
25 * Look at page 4-5 of the MP spec for the starting definitions of
26 * this structure.
27 */
28struct imps_cth
29{
30unsigned sig;
31unsigned short base_length;
32unsigned char spec_rev;
33unsigned char checksum;
34char oem_id[8];
35char prod_id[12];
36unsigned oem_table_ptr;
37unsigned short oem_table_size;
38unsigned short entry_count;
39unsigned lapic_addr;
40unsigned short extended_length;
41unsigned char extended_checksum;
42char reserved[1];
43};
44
45/*
46 * Defines that are here so as not to be in the global header file.
47 */
48#define EBDA_SEG_ADDR0x40E
49#define EBDA_SEG_LEN0x400
50#define BIOS_RESET_VECTOR0x467
51#define LAPIC_ADDR_DEFAULT0xFEE00000uL
52#define IOAPIC_ADDR_DEFAULT0xFEC00000uL
53#define CMOS_RESET_CODE0xF
54#defineCMOS_RESET_JUMP 0xa
55#define CMOS_BASE_MEMORY0x15
56#define LAPIC_ID0x20
57
58/*
59 * This contains the local APIC hardware address.
60 */
61extern unsigned imps_lapic_addr;
62/*
63 * Defines that use variables
64 */
65
66#define IMPS_LAPIC_READ(x) (*((volatile unsigned *) (imps_lapic_addr+(x))))
67#define IMPS_LAPIC_WRITE(x, y) \
68(*((volatile unsigned *) (imps_lapic_addr+(x))) = (y))
69
70#endif /* !_SMP_H */

Archive Download this file

Revision: 1119