]>
git.saurik.com Git - apple/boot.git/blob - gen/libsaio/table.c
e73b438fb4236e9025aa869dede30f660089844c
2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
26 * Mach Operating System
27 * Copyright (c) 1990 Carnegie-Mellon University
28 * Copyright (c) 1989 Carnegie-Mellon University
29 * All rights reserved. The CMU software License Agreement specifies
30 * the terms and conditions for use and redistribution.
34 * INTEL CORPORATION PROPRIETARY INFORMATION
36 * This software is supplied under the terms of a license agreement or
37 * nondisclosure agreement with Intel Corporation and may not be copied
38 * nor disclosed except in accordance with the terms of that agreement.
40 * Copyright 1988, 1989 Intel Corporation
44 * Copyright 1993 NeXT, Inc.
45 * All rights reserved.
51 #define GDTLIMIT 48 /* NGDTENT * 8 */
56 * ------------------------------------------------------------
57 * | | |B| |A| | | |1|0|E|W|A| |
58 * | BASE 31..24 |G|/|0|V| LIMIT |P|DPL| TYPE | BASE 23:16 |
59 * | | |D| |L| 19..16| | |1|1|C|R|A| |
60 * ------------------------------------------------------------
62 * | BASE 15..0 | LIMIT 15..0 |
64 * ------------------------------------------------------------
68 unsigned short limit_15_0
;
69 unsigned short base_15_0
;
70 unsigned char base_23_16
;
71 unsigned char bit_15_8
;
72 unsigned char bit_23_16
;
73 unsigned char base_31_24
;
77 struct seg_desc Gdt
[NGDTENT
] = {
78 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, /* 0x0 : null */
79 // byte granularity, 1Mb limit, MEMBASE offset
80 {0xFFFF, MEMBASE
, 0x0, 0x9E, 0x4F, 0x0}, /* 0x8 : boot code */
81 // dword granularity, 2Gb limit, MEMBASE offset
82 {0xFFFF, MEMBASE
, 0x0, 0x92, 0xCF, 0x0}, /* 0x10 : boot data */
83 {0xFFFF, MEMBASE
, 0x0, 0x9E, 0xF, 0x0}, /* 0x18 : boot code, 16 bits */
84 {0xFFFF, 0x0, 0x0, 0x92, 0xCF, 0x0}, /* 0x20 : init data */
85 {0xFFFF, 0x0, 0x0, 0x9E, 0xCF, 0x0} /* 0x28 : init code */