From f083c6c388c9bea8d87e360850329e0c60ce21aa Mon Sep 17 00:00:00 2001 From: Apple Date: Fri, 24 Oct 2003 23:30:25 +0000 Subject: [PATCH 1/1] boot-111.tar.gz --- APPLE_LICENSE | 513 +++++----- Makefile | 2 +- gen/libsa/bsearch.c | 23 +- gen/libsa/ctype.h | 23 +- gen/libsa/error.c | 23 +- gen/libsa/fontio.h | 23 +- gen/libsa/getsegbyname.c | 23 +- gen/libsa/io_inline.h | 23 +- gen/libsa/kernBootStruct.h | 23 +- gen/libsa/keys.h | 23 +- gen/libsa/libsa.h | 23 +- gen/libsa/mach.c | 23 +- gen/libsa/memcpy.c | 23 +- gen/libsa/memory.h | 23 +- gen/libsa/memset.c | 23 +- gen/libsa/prf.c | 23 +- gen/libsa/setjmp.s | 23 +- gen/libsa/sprintf.c | 23 +- gen/libsa/string1.c | 23 +- gen/libsa/string2.c | 23 +- gen/libsa/strtol.c | 23 +- gen/libsa/zalloc.c | 23 +- gen/libsa/zalloc.h | 23 +- gen/libsaio/cache.c | 23 +- gen/libsaio/cache.h | 23 +- gen/libsaio/disk.c | 25 +- gen/libsaio/errorV.c | 23 +- gen/libsaio/gets.c | 23 +- gen/libsaio/localPrintf.c | 23 +- gen/libsaio/localVPrintf.c | 23 +- gen/libsaio/printf.c | 23 +- gen/libsaio/reallyPrint.c | 23 +- gen/libsaio/stringTable.c | 40 +- gen/libsaio/sys.c | 27 +- gen/libsaio/table.c | 23 +- gen/libsaio/ufs_byteorder.c | 29 +- gen/libsaio/ufs_byteorder.h | 27 +- gen/libsaio/unpackbits.c | 23 +- gen/rcz/rcz.c | 23 +- gen/rcz/rcz_common.c | 23 +- gen/rcz/rcz_common.h | 23 +- gen/rcz/rcz_compress_mem.c | 23 +- gen/rcz/rcz_compress_mem.h | 23 +- gen/rcz/rcz_decompress_file.c | 23 +- gen/rcz/rcz_decompress_file.h | 23 +- gen/rcz/rcz_decompress_mem.c | 23 +- gen/rcz/rcz_decompress_mem.h | 23 +- gen/util/machOconv.c | 27 +- i386/Makefile | 4 +- i386/boot0/boot0.s | 160 ++-- i386/boot1/Makefile | 8 +- i386/boot1/boot1.s | 834 ++++++++--------- i386/boot1/gonext.c | 23 +- i386/boot1/nullboot1.s | 23 +- i386/boot1/replace.c | 23 +- i386/boot1u/Makefile | 103 +++ i386/boot1u/asm.s | 439 +++++++++ i386/boot1u/bios.s | 134 +++ i386/boot1u/boot.c | 95 ++ i386/boot1u/boot1u.h | 27 + i386/boot1u/boot1u.s | 112 +++ i386/boot1u/boot1u0.s | 707 ++++++++++++++ i386/boot1u/disk.c | 250 +++++ i386/boot1u/disk.h | 27 + i386/boot1u/malloc.c | 42 + i386/boot1u/put.c | 69 ++ i386/boot1u/string.c | 179 ++++ i386/boot2/Makefile | 11 +- i386/boot2/appleClut8.h | 151 +-- i386/boot2/appleboot.h | 162 ++++ i386/boot2/boot.c | 177 ++-- i386/boot2/boot.h | 43 +- i386/boot2/boot2.s | 25 +- i386/boot2/drivers.c | 875 ++++-------------- i386/boot2/graphics.c | 310 +++++-- i386/boot2/happy_screen.h | 80 -- i386/boot2/lzss.c | 93 ++ i386/boot2/options.c | 80 +- i386/boot2/prompt.c | 23 +- i386/cdboot/Makefile | 25 + i386/cdboot/biostest.asm | 325 +++++++ i386/cdboot/cdboot.s | 309 +++++++ i386/libsa/Makefile | 7 +- i386/libsa/error.c | 23 +- i386/libsa/kernBootStruct.h | 148 --- i386/libsa/libsa.h | 26 +- i386/libsa/memory.h | 43 +- i386/libsa/prf.c | 23 +- i386/libsa/printf.c | 23 +- i386/libsa/qsort.c | 29 +- i386/libsa/setjmp.s | 23 +- i386/libsa/string.c | 34 +- i386/libsa/strtol.c | 23 +- i386/libsa/zalloc.c | 154 ++- i386/libsaio/Makefile | 13 +- i386/libsaio/asm.s | 40 +- i386/libsaio/bios.h | 29 +- i386/libsaio/bios.s | 143 +-- i386/libsaio/biosfn.c | 444 +++++++-- i386/libsaio/bootstruct.c | 97 +- i386/libsaio/bootstruct.h | 28 + i386/libsaio/cache.c | 33 +- i386/libsaio/console.c | 29 +- i386/libsaio/disk.c | 385 ++++++-- i386/libsaio/fdisk.h | 23 +- i386/libsaio/hfs.c | 54 +- i386/libsaio/hfs.h | 30 + i386/libsaio/hfs_CaseTables.h | 23 +- i386/libsaio/hfs_compare.c | 23 +- i386/libsaio/io_inline.h | 23 +- i386/libsaio/libsaio.h | 24 +- i386/libsaio/load.c | 428 ++++----- i386/libsaio/memory.c | 74 ++ i386/libsaio/misc.c | 56 +- i386/libsaio/nbp.c | 28 +- i386/libsaio/nbp_cmd.h | 26 +- i386/libsaio/pci.c | 23 +- i386/libsaio/pci.h | 23 +- i386/libsaio/saio_internal.h | 61 +- i386/libsaio/saio_types.h | 51 +- i386/libsaio/sl.h | 23 +- i386/libsaio/stringConstants.h | 23 +- i386/libsaio/stringTable.c | 478 ++++------ i386/libsaio/sys.c | 118 ++- i386/libsaio/table.c | 23 +- i386/libsaio/ufs.c | 32 +- i386/libsaio/ufs.h | 30 + i386/libsaio/ufs_byteorder.c | 37 +- i386/libsaio/ufs_byteorder.h | 30 +- i386/libsaio/vbe.c | 173 +++- i386/libsaio/vbe.h | 74 +- i386/libsaio/xml.c | 663 +++++++++++++ i386/libsaio/xml.h | 90 ++ i386/nasm/assemble.c | 29 +- i386/nasm/assemble.h | 23 +- i386/nasm/disasm.c | 27 +- i386/nasm/disasm.h | 23 +- i386/nasm/eval.c | 23 +- i386/nasm/eval.h | 23 +- i386/nasm/float.c | 23 +- i386/nasm/float.h | 23 +- i386/nasm/insns.h | 23 +- i386/nasm/insnsa.c | 23 +- i386/nasm/insnsd.c | 23 +- i386/nasm/labels.c | 23 +- i386/nasm/labels.h | 23 +- i386/nasm/listing.c | 23 +- i386/nasm/listing.h | 23 +- i386/nasm/macros.c | 23 +- i386/nasm/names.c | 23 +- i386/nasm/nasm.c | 23 +- i386/nasm/nasm.h | 23 +- i386/nasm/nasmlib.c | 25 +- i386/nasm/nasmlib.h | 23 +- i386/nasm/ndisasm.c | 27 +- i386/nasm/outaout.c | 25 +- i386/nasm/outas86.c | 27 +- i386/nasm/outbin.c | 23 +- i386/nasm/outcoff.c | 25 +- i386/nasm/outdbg.c | 23 +- i386/nasm/outelf.c | 23 +- i386/nasm/outform.c | 23 +- i386/nasm/outform.h | 23 +- i386/nasm/outobj.c | 23 +- i386/nasm/outrdf.c | 23 +- i386/nasm/parser.c | 23 +- i386/nasm/parser.h | 23 +- i386/nasm/preproc.c | 25 +- i386/nasm/preproc.h | 23 +- i386/nasm/sync.c | 23 +- i386/nasm/sync.h | 23 +- i386/rcz/rcz_common.c | 23 +- i386/rcz/rcz_common.h | 23 +- i386/rcz/rcz_compress_file.c | 23 +- i386/rcz/rcz_compress_file.h | 23 +- i386/rcz/rcz_compress_mem.c | 23 +- i386/rcz/rcz_compress_mem.h | 23 +- i386/rcz/rcz_decompress_file.c | 25 +- i386/rcz/rcz_decompress_file.h | 23 +- i386/rcz/rcz_decompress_mem.c | 25 +- i386/rcz/rcz_decompress_mem.h | 23 +- i386/strings/BootHelp.txt | 4 +- .../strings/English.lproj/Localizable.strings | Bin 4605 -> 9156 bytes i386/strings/English.lproj/NetInstall.strings | Bin 4627 -> 9204 bytes i386/strings/French.lproj/Localizable.strings | Bin 6912 -> 13758 bytes i386/strings/French.lproj/NetInstall.strings | Bin 6945 -> 13824 bytes i386/strings/German.lproj/Localizable.strings | Bin 6824 -> 13582 bytes i386/strings/German.lproj/NetInstall.strings | Bin 6840 -> 13614 bytes .../strings/Italian.lproj/Localizable.strings | Bin 6598 -> 13130 bytes i386/strings/Italian.lproj/NetInstall.strings | Bin 6636 -> 13206 bytes i386/strings/Language.table | 6 +- .../strings/Spanish.lproj/Localizable.strings | Bin 6620 -> 13178 bytes i386/strings/Spanish.lproj/NetInstall.strings | Bin 6641 -> 13220 bytes .../strings/Swedish.lproj/Localizable.strings | Bin 5951 -> 11836 bytes i386/strings/Swedish.lproj/NetInstall.strings | Bin 5969 -> 11872 bytes i386/testmodule/install/install.h | 23 +- i386/testmodule/install/mode.c | 23 +- i386/testmodule/test.c | 23 +- i386/testmodule/test.h | 23 +- i386/tests/bootHelper.c | 23 +- i386/tests/rldtest.c | 23 +- i386/tests/satest.c | 23 +- i386/tests/sizeof.c | 25 +- i386/util/BooterBitmap.h | 23 +- i386/util/BooterBitmap.m | 23 +- i386/util/FontBitmap.h | 23 +- i386/util/Makefile | 2 +- i386/util/bitmap.h | 23 +- i386/util/cursor.h | 23 +- i386/util/dot.h | 23 +- i386/util/dot_bitmap.h | 23 +- i386/util/dumptiff.m | 23 +- i386/util/font.h | 23 +- i386/util/hdot.h | 23 +- i386/util/hdot_bitmap.h | 23 +- i386/util/images.h | 23 +- i386/util/machOconv.c | 35 +- i386/util/mkfont.c | 23 +- i386/util/ns_box.h | 23 +- i386/util/ns_box_bitmap.h | 23 +- i386/util/ns_logo.h | 23 +- i386/util/ns_logo_bitmap.h | 23 +- i386/util/ns_wait1.h | 23 +- i386/util/ns_wait1_bitmap.h | 23 +- i386/util/ns_wait2.h | 23 +- i386/util/ns_wait2_bitmap.h | 23 +- i386/util/ns_wait3.h | 23 +- i386/util/ns_wait3_bitmap.h | 23 +- i386/util/return.h | 23 +- i386/util/return_bitmap.h | 23 +- i386/util/sig.c | 23 +- i386/util/spin_cursor.h | 23 +- i386/util/test.c | 23 +- i386/util/tif_packbits.c | 25 +- 234 files changed, 9200 insertions(+), 4955 deletions(-) create mode 100644 i386/boot1u/Makefile create mode 100644 i386/boot1u/asm.s create mode 100644 i386/boot1u/bios.s create mode 100644 i386/boot1u/boot.c create mode 100644 i386/boot1u/boot1u.h create mode 100644 i386/boot1u/boot1u.s create mode 100644 i386/boot1u/boot1u0.s create mode 100644 i386/boot1u/disk.c create mode 100644 i386/boot1u/disk.h create mode 100644 i386/boot1u/malloc.c create mode 100644 i386/boot1u/put.c create mode 100644 i386/boot1u/string.c create mode 100644 i386/boot2/appleboot.h delete mode 100644 i386/boot2/happy_screen.h create mode 100644 i386/boot2/lzss.c create mode 100644 i386/cdboot/Makefile create mode 100644 i386/cdboot/biostest.asm create mode 100644 i386/cdboot/cdboot.s delete mode 100644 i386/libsa/kernBootStruct.h create mode 100644 i386/libsaio/bootstruct.h create mode 100644 i386/libsaio/hfs.h create mode 100644 i386/libsaio/memory.c create mode 100644 i386/libsaio/ufs.h create mode 100644 i386/libsaio/xml.c create mode 100644 i386/libsaio/xml.h diff --git a/APPLE_LICENSE b/APPLE_LICENSE index 84687a4..fe81a60 100644 --- a/APPLE_LICENSE +++ b/APPLE_LICENSE @@ -1,26 +1,19 @@ APPLE PUBLIC SOURCE LICENSE -Version 1.1 - April 19,1999 +Version 2.0 - August 6, 2003 Please read this License carefully before downloading this software. -By downloading and using this software, you are agreeing to be bound -by the terms of this License. If you do not or cannot agree to the -terms of this License, please do not download or use the software. - -1. General; Definitions. This License applies to any program or other -work which Apple Computer, Inc. ("Apple") publicly announces as -subject to this Apple Public Source License and which contains a -notice placed by Apple identifying such program or work as "Original -Code" and stating that it is subject to the terms of this Apple Public -Source License version 1.1 (or subsequent version thereof), as it may -be revised from time to time by Apple ("License"). As used in this -License: - -1.1 "Affected Original Code" means only those specific portions of -Original Code that allegedly infringe upon any party's intellectual -property rights or are otherwise the subject of a claim of -infringement. - -1.2 "Applicable Patent Rights" mean: (a) in the case where Apple is +By downloading or using this software, you are agreeing to be bound by +the terms of this License. If you do not or cannot agree to the terms +of this License, please do not download or use the software. + +1. General; Definitions. This License applies to any program or other +work which Apple Computer, Inc. ("Apple") makes publicly available and +which contains a notice placed by Apple identifying such program or +work as "Original Code" and stating that it is subject to the terms of +this Apple Public Source License version 2.0 ("License"). As used in +this License: + +1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is the grantor of rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to Apple and (ii) that cover subject matter contained in the Original Code, but only to the extent @@ -30,22 +23,27 @@ rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to You and (ii) that cover subject matter in Your Modifications, taken alone or in combination with Original Code. +1.2 "Contributor" means any person or entity that creates or +contributes to the creation of Modifications. + 1.3 "Covered Code" means the Original Code, Modifications, the combination of Original Code and any Modifications, and/or any respective portions thereof. -1.4 "Deploy" means to use, sublicense or distribute Covered Code other -than for Your internal research and development (R&D), and includes -without limitation, any and all internal use or distribution of -Covered Code within Your business or organization except for R&D use, -as well as direct or indirect sublicensing or distribution of Covered -Code by You to any third party in any form or manner. +1.4 "Externally Deploy" means: (a) to sublicense, distribute or +otherwise make Covered Code available, directly or indirectly, to +anyone other than You; and/or (b) to use Covered Code, alone or as +part of a Larger Work, in any way to provide a service, including but +not limited to delivery of content, through electronic communication +with a client other than You. 1.5 "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. 1.6 "Modifications" mean any addition to, deletion from, and/or change -to, the substance and/or structure of Covered Code. When code is +to, the substance and/or structure of the Original Code, any previous +Modifications, the combination of Original Code and any previous +Modifications, and/or any respective portions thereof. When code is released as a series of files, a Modification is: (a) any addition to or deletion from the contents of a file containing Covered Code; and/or (b) any new file or other representation of computer program @@ -66,7 +64,7 @@ scripts used to control compilation and installation of an executable (object code). 1.9 "You" or "Your" means an individual or a legal entity exercising -rights under this License. For legal entities, "You" or "Your" +rights under this License. For legal entities, "You" or "Your" includes any entity which controls, is controlled by, or is under common control with, You, where "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, @@ -74,258 +72,253 @@ whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. -2. Permitted Uses; Conditions & Restrictions. Subject to the terms +2. Permitted Uses; Conditions & Restrictions. Subject to the terms and conditions of this License, Apple hereby grants You, effective on the date You accept this License and download the Original Code, a -world-wide, royalty-free, non- exclusive license, to the extent of +world-wide, royalty-free, non-exclusive license, to the extent of Apple's Applicable Patent Rights and copyrights covering the Original Code, to do the following: -2.1 You may use, copy, modify and distribute Original Code, with or -without Modifications, solely for Your internal research and -development, provided that You must in each instance: - -(a) retain and reproduce in all copies of Original Code the copyright -and other proprietary notices and disclaimers of Apple as they appear -in the Original Code, and keep intact all notices in the Original Code -that refer to this License; - -(b) include a copy of this License with every copy of Source Code of -Covered Code and documentation You distribute, and You may not offer -or impose any terms on such Source Code that alter or restrict this -License or the recipients' rights hereunder, except as permitted under -Section 6; and - -(c) completely and accurately document all Modifications that you have -made and the date of each such Modification, designate the version of -the Original Code you used, prominently include a file carrying such -information with the Modifications, and duplicate the notice in -Exhibit A in each file of the Source Code of all such Modifications. - -2.2 You may Deploy Covered Code, provided that You must in each - instance: - -(a) satisfy all the conditions of Section 2.1 with respect to the -Source Code of the Covered Code; - -(b) make all Your Deployed Modifications publicly available in Source -Code form via electronic distribution (e.g. download from a web site) -under the terms of this License and subject to the license grants set -forth in Section 3 below, and any additional terms You may choose to -offer under Section 6. You must continue to make the Source Code of -Your Deployed Modifications available for as long as you Deploy the -Covered Code or twelve (12) months from the date of initial -Deployment, whichever is longer; - -(c) if You Deploy Covered Code containing Modifications made by You, -inform others of how to obtain those Modifications by filling out and -submitting the information found at -http://www.apple.com/publicsource/modifications.html, if available; -and - -(d) if You Deploy Covered Code in object code, executable form only, -include a prominent notice, in the code itself as well as in related -documentation, stating that Source Code of the Covered Code is -available under the terms of this License with information on how and -where to obtain such Source Code. - -3. Your Grants. In consideration of, and as a condition to, the -licenses granted to You under this License: - -(a) You hereby grant to Apple and all third parties a non-exclusive, -royalty-free license, under Your Applicable Patent Rights and other -intellectual property rights owned or controlled by You, to use, -reproduce, modify, distribute and Deploy Your Modifications of the -same scope and extent as Apple's licenses under Sections 2.1 and 2.2; -and - -(b) You hereby grant to Apple and its subsidiaries a non-exclusive, -worldwide, royalty-free, perpetual and irrevocable license, under Your -Applicable Patent Rights and other intellectual property rights owned -or controlled by You, to use, reproduce, execute, compile, display, -perform, modify or have modified (for Apple and/or its subsidiaries), -sublicense and distribute Your Modifications, in any form, through -multiple tiers of distribution. - -4. Larger Works. You may create a Larger Work by combining Covered +2.1 Unmodified Code. You may use, reproduce, display, perform, +internally distribute within Your organization, and Externally Deploy +verbatim, unmodified copies of the Original Code, for commercial or +non-commercial purposes, provided that in each instance: + +(a) You must retain and reproduce in all copies of Original Code the +copyright and other proprietary notices and disclaimers of Apple as +they appear in the Original Code, and keep intact all notices in the +Original Code that refer to this License; and + +(b) You must include a copy of this License with every copy of Source +Code of Covered Code and documentation You distribute or Externally +Deploy, and You may not offer or impose any terms on such Source Code +that alter or restrict this License or the recipients' rights +hereunder, except as permitted under Section 6. + +2.2 Modified Code. You may modify Covered Code and use, reproduce, +display, perform, internally distribute within Your organization, and +Externally Deploy Your Modifications and Covered Code, for commercial +or non-commercial purposes, provided that in each instance You also +meet all of these conditions: + +(a) You must satisfy all the conditions of Section 2.1 with respect to +the Source Code of the Covered Code; + +(b) You must duplicate, to the extent it does not already exist, the +notice in Exhibit A in each file of the Source Code of all Your +Modifications, and cause the modified files to carry prominent notices +stating that You changed the files and the date of any change; and + +(c) If You Externally Deploy Your Modifications, You must make +Source Code of all Your Externally Deployed Modifications either +available to those to whom You have Externally Deployed Your +Modifications, or publicly available. Source Code of Your Externally +Deployed Modifications must be released under the terms set forth in +this License, including the license grants set forth in Section 3 +below, for as long as you Externally Deploy the Covered Code or twelve +(12) months from the date of initial External Deployment, whichever is +longer. You should preferably distribute the Source Code of Your +Externally Deployed Modifications electronically (e.g. download from a +web site). + +2.3 Distribution of Executable Versions. In addition, if You +Externally Deploy Covered Code (Original Code and/or Modifications) in +object code, executable form only, You must include a prominent +notice, in the code itself as well as in related documentation, +stating that Source Code of the Covered Code is available under the +terms of this License with information on how and where to obtain such +Source Code. + +2.4 Third Party Rights. You expressly acknowledge and agree that +although Apple and each Contributor grants the licenses to their +respective portions of the Covered Code set forth herein, no +assurances are provided by Apple or any Contributor that the Covered +Code does not infringe the patent or other intellectual property +rights of any other entity. Apple and each Contributor disclaim any +liability to You for claims brought by any other entity based on +infringement of intellectual property rights or otherwise. As a +condition to exercising the rights and licenses granted hereunder, You +hereby assume sole responsibility to secure any other intellectual +property rights needed, if any. For example, if a third party patent +license is required to allow You to distribute the Covered Code, it is +Your responsibility to acquire that license before distributing the +Covered Code. + +3. Your Grants. In consideration of, and as a condition to, the +licenses granted to You under this License, You hereby grant to any +person or entity receiving or distributing Covered Code under this +License a non-exclusive, royalty-free, perpetual, irrevocable license, +under Your Applicable Patent Rights and other intellectual property +rights (other than patent) owned or controlled by You, to use, +reproduce, display, perform, modify, sublicense, distribute and +Externally Deploy Your Modifications of the same scope and extent as +Apple's licenses under Sections 2.1 and 2.2 above. + +4. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and -distribute the Larger Work as a single product. In each such -instance, You must make sure the requirements of this License are -fulfilled for the Covered Code or any portion thereof. +distribute the Larger Work as a single product. In each such instance, +You must make sure the requirements of this License are fulfilled for +the Covered Code or any portion thereof. -5. Limitations on Patent License. Except as expressly stated in +5. Limitations on Patent License. Except as expressly stated in Section 2, no other patent rights, express or implied, are granted by -Apple herein. Modifications and/or Larger Works may require -additional patent licenses from Apple which Apple may grant in its -sole discretion. - -6. Additional Terms. You may choose to offer, and to charge a fee -for, warranty, support, indemnity or liability obligations and/or -other rights consistent with the scope of the license granted herein -("Additional Terms") to one or more recipients of Covered -Code. However, You may do so only on Your own behalf and as Your sole -responsibility, and not on behalf of Apple. You must obtain the -recipient's agreement that any such Additional Terms are offered by -You alone, and You hereby agree to indemnify, defend and hold Apple -harmless for any liability incurred by or claims asserted against -Apple by reason of any such Additional Terms. - -7. Versions of the License. Apple may publish revised and/or new -versions of this License from time to time. Each version will be -given a distinguishing version number. Once Original Code has been -published under a particular version of this License, You may continue -to use it under the terms of that version. You may also choose to use -such Original Code under the terms of any subsequent version of this -License published by Apple. No one other than Apple has the right to +Apple herein. Modifications and/or Larger Works may require additional +patent licenses from Apple which Apple may grant in its sole +discretion. + +6. Additional Terms. You may choose to offer, and to charge a fee for, +warranty, support, indemnity or liability obligations and/or other +rights consistent with the scope of the license granted herein +("Additional Terms") to one or more recipients of Covered Code. +However, You may do so only on Your own behalf and as Your sole +responsibility, and not on behalf of Apple or any Contributor. You +must obtain the recipient's agreement that any such Additional Terms +are offered by You alone, and You hereby agree to indemnify, defend +and hold Apple and every Contributor harmless for any liability +incurred by or claims asserted against Apple or such Contributor by +reason of any such Additional Terms. + +7. Versions of the License. Apple may publish revised and/or new +versions of this License from time to time. Each version will be given +a distinguishing version number. Once Original Code has been published +under a particular version of this License, You may continue to use it +under the terms of that version. You may also choose to use such +Original Code under the terms of any subsequent version of this +License published by Apple. No one other than Apple has the right to modify the terms applicable to Covered Code created under this License. -8. NO WARRANTY OR SUPPORT. The Original Code may contain in whole or -in part pre-release, untested, or not fully tested works. The -Original Code may contain errors that could cause failures or loss of -data, and may be incomplete or contain inaccuracies. You expressly -acknowledge and agree that use of the Original Code, or any portion -thereof, is at Your sole and entire risk. THE ORIGINAL CODE IS -PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND -AND APPLE AND APPLE'S LICENSOR(S) (FOR THE PURPOSES OF SECTIONS 8 AND -9, APPLE AND APPLE'S LICENSOR(S) ARE COLLECTIVELY REFERRED TO AS -"APPLE") EXPRESSLY DISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -AND/OR CONDITIONS OF MERCHANTABILITY OR SATISFACTORY QUALITY AND -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY -RIGHTS. APPLE DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE -ORIGINAL CODE WILL MEET YOUR REQUIREMENTS, OR THAT THE OPERATION OF -THE ORIGINAL CODE WILL BE UNINTERRUPTED OR ERROR- FREE, OR THAT -DEFECTS IN THE ORIGINAL CODE WILL BE CORRECTED. NO ORAL OR WRITTEN -INFORMATION OR ADVICE GIVEN BY APPLE OR AN APPLE AUTHORIZED -REPRESENTATIVE SHALL CREATE A WARRANTY OR IN ANY WAY INCREASE THE -SCOPE OF THIS WARRANTY. You acknowledge that the Original Code is not -intended for use in the operation of nuclear facilities, aircraft -navigation, communication systems, or air traffic control machines in -which case the failure of the Original Code could lead to death, -personal injury, or severe physical or environmental damage. - -9. Liability. - -9.1 Infringement. If any portion of, or functionality implemented by, -the Original Code becomes the subject of a claim of infringement, -Apple may, at its option: (a) attempt to procure the rights necessary -for Apple and You to continue using the Affected Original Code; (b) -modify the Affected Original Code so that it is no longer infringing; -or (c) suspend Your rights to use, reproduce, modify, sublicense and -distribute the Affected Original Code until a final determination of -the claim is made by a court or governmental administrative agency of -competent jurisdiction and Apple lifts the suspension as set forth -below. Such suspension of rights will be effective immediately upon -Apple's posting of a notice to such effect on the Apple web site that -is used for implementation of this License. Upon such final -determination being made, if Apple is legally able, without the -payment of a fee or royalty, to resume use, reproduction, -modification, sublicensing and distribution of the Affected Original -Code, Apple will lift the suspension of rights to the Affected -Original Code by posting a notice to such effect on the Apple web site -that is used for implementation of this License. If Apple suspends -Your rights to Affected Original Code, nothing in this License shall -be construed to restrict You, at Your option and subject to applicable -law, from replacing the Affected Original Code with non-infringing -code or independently negotiating for necessary rights from such third -party. - -9.2 LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES SHALL APPLE BE -LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES -ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR USE OR INABILITY TO -USE THE ORIGINAL CODE, OR ANY PORTION THEREOF, WHETHER UNDER A THEORY -OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY -OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF -ANY REMEDY. In no event shall Apple's total liability to You for all -damages under this License exceed the amount of fifty dollars -($50.00). - -10. Trademarks. This License does not grant any rights to use the -trademarks or trade names "Apple", "Apple Computer", "Mac OS X", "Mac -OS X Server" or any other trademarks or trade names belonging to Apple -(collectively "Apple Marks") and no Apple Marks may be used to endorse -or promote products derived from the Original Code other than as -permitted by and in strict compliance at all times with Apple's third -party trademark usage guidelines which are posted at -http://www.apple.com/legal/guidelinesfor3rdparties.html. - -11. Ownership. Apple retains all rights, title and interest in and to -the Original Code and any Modifications made by or on behalf of Apple -("Apple Modifications"), and such Apple Modifications will not be -automatically subject to this License. Apple may, at its sole -discretion, choose to license such Apple Modifications under this -License, or on different terms from those contained in this License or -may choose not to license them at all. Apple's development, use, -reproduction, modification, sublicensing and distribution of Covered -Code will not be subject to this License. +8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in +part pre-release, untested, or not fully tested works. The Covered +Code may contain errors that could cause failures or loss of data, and +may be incomplete or contain inaccuracies. You expressly acknowledge +and agree that use of the Covered Code, or any portion thereof, is at +Your sole and entire risk. THE COVERED CODE IS PROVIDED "AS IS" AND +WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND AND APPLE AND +APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE" FOR THE +PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM +ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT +NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF +MERCHANTABILITY, OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR +PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD +PARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT WARRANT AGAINST +INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE +FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS, +THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR +ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO +ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE +AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY. +You acknowledge that the Covered Code is not intended for use in the +operation of nuclear facilities, aircraft navigation, communication +systems, or air traffic control machines in which case the failure of +the Covered Code could lead to death, personal injury, or severe +physical or environmental damage. + +9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO +EVENT SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL, +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING +TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE COVERED CODE, OR +ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY, +TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF +APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY +REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF +INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY +TO YOU. In no event shall Apple's total liability to You for all +damages (other than as may be required by applicable law) under this +License exceed the amount of fifty dollars ($50.00). + +10. Trademarks. This License does not grant any rights to use the +trademarks or trade names "Apple", "Apple Computer", "Mac", "Mac OS", +"QuickTime", "QuickTime Streaming Server" or any other trademarks, +service marks, logos or trade names belonging to Apple (collectively +"Apple Marks") or to any trademark, service mark, logo or trade name +belonging to any Contributor. You agree not to use any Apple Marks in +or as part of the name of products derived from the Original Code or +to endorse or promote products derived from the Original Code other +than as expressly permitted by and in strict compliance at all times +with Apple's third party trademark usage guidelines which are posted +at http://www.apple.com/legal/guidelinesfor3rdparties.html. + +11. Ownership. Subject to the licenses granted under this License, +each Contributor retains all rights, title and interest in and to any +Modifications made by such Contributor. Apple retains all rights, +title and interest in and to the Original Code and any Modifications +made by or on behalf of Apple ("Apple Modifications"), and such Apple +Modifications will not be automatically subject to this License. Apple +may, at its sole discretion, choose to license such Apple +Modifications under this License, or on different terms from those +contained in this License or may choose not to license them at all. 12. Termination. -12.1 Termination. This License and the rights granted hereunder will - terminate: +12.1 Termination. This License and the rights granted hereunder will +terminate: (a) automatically without notice from Apple if You fail to comply with any term(s) of this License and fail to cure such breach within 30 -days of becoming aware of such breach; (b) immediately in the event of -the circumstances described in Section 13.5(b); or (c) automatically -without notice from Apple if You, at any time during the term of this -License, commence an action for patent infringement against Apple. - -12.2 Effect of Termination. Upon termination, You agree to -immediately stop any further use, reproduction, modification, -sublicensing and distribution of the Covered Code and to destroy all -copies of the Covered Code that are in your possession or control. -All sublicenses to the Covered Code which have been properly granted -prior to termination shall survive any termination of this License. -Provisions which, by their nature, should remain in effect beyond the -termination of this License shall survive, including but not limited -to Sections 3, 5, 8, 9, 10, 11, 12.2 and 13. Neither party will be -liable to the other for compensation, indemnity or damages of any sort -solely as a result of terminating this License in accordance with its -terms, and termination of this License will be without prejudice to -any other right or remedy of either party. - -13. Miscellaneous. - -13.1 Government End Users. The Covered Code is a "commercial item" as -defined in FAR 2.101. Government software and technical data rights -in the Covered Code include only those rights customarily provided to -the public as defined in this License. This customary commercial -license in technical data and software is provided in accordance with -FAR 12.211 (Technical Data) and 12.212 (Computer Software) and, for +days of becoming aware of such breach; + +(b) immediately in the event of the circumstances described in Section +13.5(b); or + +(c) automatically without notice from Apple if You, at any time during +the term of this License, commence an action for patent infringement +against Apple; provided that Apple did not first commence +an action for patent infringement against You in that instance. + +12.2 Effect of Termination. Upon termination, You agree to immediately +stop any further use, reproduction, modification, sublicensing and +distribution of the Covered Code. All sublicenses to the Covered Code +which have been properly granted prior to termination shall survive +any termination of this License. Provisions which, by their nature, +should remain in effect beyond the termination of this License shall +survive, including but not limited to Sections 3, 5, 8, 9, 10, 11, +12.2 and 13. No party will be liable to any other for compensation, +indemnity or damages of any sort solely as a result of terminating +this License in accordance with its terms, and termination of this +License will be without prejudice to any other right or remedy of +any party. + +13. Miscellaneous. + +13.1 Government End Users. The Covered Code is a "commercial item" as +defined in FAR 2.101. Government software and technical data rights in +the Covered Code include only those rights customarily provided to the +public as defined in this License. This customary commercial license +in technical data and software is provided in accordance with FAR +12.211 (Technical Data) and 12.212 (Computer Software) and, for Department of Defense purchases, DFAR 252.227-7015 (Technical Data -- Commercial Items) and 227.7202-3 (Rights in Commercial Computer -Software or Computer Software Documentation). Accordingly, all U.S. +Software or Computer Software Documentation). Accordingly, all U.S. Government End Users acquire Covered Code with only those rights set forth herein. -13.2 Relationship of Parties. This License will not be construed as +13.2 Relationship of Parties. This License will not be construed as creating an agency, partnership, joint venture or any other form of -legal association between You and Apple, and You will not represent to -the contrary, whether expressly, by implication, appearance or -otherwise. +legal association between or among You, Apple or any Contributor, and +You will not represent to the contrary, whether expressly, by +implication, appearance or otherwise. -13.3 Independent Development. Nothing in this License will impair +13.3 Independent Development. Nothing in this License will impair Apple's right to acquire, license, develop, have others develop for it, market and/or distribute technology or products that perform the same or similar functions as, or otherwise compete with, Modifications, Larger Works, technology or products that You may develop, produce, market or distribute. -13.4 Waiver; Construction. Failure by Apple to enforce any provision -of this License will not be deemed a waiver of future enforcement of -that or any other provision. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -will not apply to this License. +13.4 Waiver; Construction. Failure by Apple or any Contributor to +enforce any provision of this License will not be deemed a waiver of +future enforcement of that or any other provision. Any law or +regulation which provides that the language of a contract shall be +construed against the drafter will not apply to this License. -13.5 Severability. (a) If for any reason a court of competent +13.5 Severability. (a) If for any reason a court of competent jurisdiction finds any provision of this License, or portion thereof, to be unenforceable, that provision of the License will be enforced to the maximum extent permissible so as to effect the economic benefits and intent of the parties, and the remainder of this License will -continue in full force and effect. (b) Notwithstanding the foregoing, +continue in full force and effect. (b) Notwithstanding the foregoing, if applicable law prohibits or restricts You from fully and/or specifically complying with Sections 2 and/or 3 or prevents the enforceability of either of those Sections, this License will @@ -333,7 +326,7 @@ immediately terminate and You must immediately discontinue any use of the Covered Code and destroy all copies of it that are in your possession or control. -13.6 Dispute Resolution. Any litigation or other dispute resolution +13.6 Dispute Resolution. Any litigation or other dispute resolution between You and Apple relating to this License shall take place in the Northern District of California, and You and Apple hereby consent to the personal jurisdiction of, and venue in, the state and federal @@ -341,9 +334,9 @@ courts within that District with respect to this License. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. -13.7 Entire Agreement; Governing Law. This License constitutes the +13.7 Entire Agreement; Governing Law. This License constitutes the entire agreement between the parties with respect to the subject -matter hereof. This License shall be governed by the laws of the +matter hereof. This License shall be governed by the laws of the United States and the State of California, except that body of California law concerning conflicts of law. @@ -355,18 +348,20 @@ connexes soient rediges en anglais. EXHIBIT A. -"Portions Copyright (c) 1999 Apple Computer, Inc. All Rights -Reserved. This file contains Original Code and/or Modifications of -Original Code as defined in and that are subject to the Apple Public -Source License Version 1.1 (the "License"). You may not use this file -except in compliance with the License. Please obtain a copy of the -License at http://www.apple.com/publicsource and read it before using -this file. +"Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights +Reserved. + +This file contains Original Code and/or Modifications of Original Code +as defined in and that are subject to the Apple Public Source License +Version 2.0 (the 'License'). You may not use this file except in +compliance with the License. Please obtain a copy of the License at +http://www.opensource.apple.com/apsl/ and read it before using this +file. The Original Code and all software distributed under the License are -distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER +distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the -License for the specific language governing rights and limitations -under the License." +FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. +Please see the License for the specific language governing rights and +limitations under the License." diff --git a/Makefile b/Makefile index fe88a53..7c6f380 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ ARCHLESS_RC_CFLAGS=`echo $(RC_CFLAGS) | sed 's/-arch [a-z0-9]*//g'` VPATH = $(OBJROOT):$(SYMROOT) -GENERIC_SUBDIRS = gen +GENERIC_SUBDIRS = # # Currently builds for i386 diff --git a/gen/libsa/bsearch.c b/gen/libsa/bsearch.c index 48070a8..39039ad 100644 --- a/gen/libsa/bsearch.c +++ b/gen/libsa/bsearch.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsa/ctype.h b/gen/libsa/ctype.h index 9a56c58..ecf80ae 100644 --- a/gen/libsa/ctype.h +++ b/gen/libsa/ctype.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsa/error.c b/gen/libsa/error.c index 0dafad8..0834bc2 100644 --- a/gen/libsa/error.c +++ b/gen/libsa/error.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsa/fontio.h b/gen/libsa/fontio.h index 08b8e3d..04fce69 100644 --- a/gen/libsa/fontio.h +++ b/gen/libsa/fontio.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsa/getsegbyname.c b/gen/libsa/getsegbyname.c index 125cf7f..65c0fb7 100644 --- a/gen/libsa/getsegbyname.c +++ b/gen/libsa/getsegbyname.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsa/io_inline.h b/gen/libsa/io_inline.h index 3bfa75d..e52da45 100644 --- a/gen/libsa/io_inline.h +++ b/gen/libsa/io_inline.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsa/kernBootStruct.h b/gen/libsa/kernBootStruct.h index a685321..eb0850b 100644 --- a/gen/libsa/kernBootStruct.h +++ b/gen/libsa/kernBootStruct.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsa/keys.h b/gen/libsa/keys.h index 1275551..c145f36 100644 --- a/gen/libsa/keys.h +++ b/gen/libsa/keys.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsa/libsa.h b/gen/libsa/libsa.h index 1346fc4..56b5abe 100644 --- a/gen/libsa/libsa.h +++ b/gen/libsa/libsa.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsa/mach.c b/gen/libsa/mach.c index 53ef503..866afc2 100644 --- a/gen/libsa/mach.c +++ b/gen/libsa/mach.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsa/memcpy.c b/gen/libsa/memcpy.c index 6bb9347..a1e4c04 100644 --- a/gen/libsa/memcpy.c +++ b/gen/libsa/memcpy.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsa/memory.h b/gen/libsa/memory.h index d753fc8..0f7b639 100644 --- a/gen/libsa/memory.h +++ b/gen/libsa/memory.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsa/memset.c b/gen/libsa/memset.c index 2abd6cf..69fde22 100644 --- a/gen/libsa/memset.c +++ b/gen/libsa/memset.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsa/prf.c b/gen/libsa/prf.c index a9a74e5..97d34d7 100644 --- a/gen/libsa/prf.c +++ b/gen/libsa/prf.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsa/setjmp.s b/gen/libsa/setjmp.s index 90c1ae1..afd9939 100644 --- a/gen/libsa/setjmp.s +++ b/gen/libsa/setjmp.s @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsa/sprintf.c b/gen/libsa/sprintf.c index 6850ace..061ab1c 100644 --- a/gen/libsa/sprintf.c +++ b/gen/libsa/sprintf.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsa/string1.c b/gen/libsa/string1.c index 6291112..0b4bb39 100644 --- a/gen/libsa/string1.c +++ b/gen/libsa/string1.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsa/string2.c b/gen/libsa/string2.c index ba525c7..7233b2a 100644 --- a/gen/libsa/string2.c +++ b/gen/libsa/string2.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsa/strtol.c b/gen/libsa/strtol.c index 2cf2b23..1bb6bee 100644 --- a/gen/libsa/strtol.c +++ b/gen/libsa/strtol.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsa/zalloc.c b/gen/libsa/zalloc.c index d0dce72..ea3b9a8 100644 --- a/gen/libsa/zalloc.c +++ b/gen/libsa/zalloc.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsa/zalloc.h b/gen/libsa/zalloc.h index b4dd0a9..2933d5c 100644 --- a/gen/libsa/zalloc.h +++ b/gen/libsa/zalloc.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsaio/cache.c b/gen/libsaio/cache.c index 0f978cc..2e4f8a6 100644 --- a/gen/libsaio/cache.c +++ b/gen/libsaio/cache.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsaio/cache.h b/gen/libsaio/cache.h index 193974f..5a6af36 100644 --- a/gen/libsaio/cache.h +++ b/gen/libsaio/cache.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsaio/disk.c b/gen/libsaio/disk.c index 9f99c83..41f0f39 100644 --- a/gen/libsaio/disk.c +++ b/gen/libsaio/disk.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -47,7 +48,7 @@ #define DRIVER_PRIVATE #import "sys/types.h" -#import +#import #import #import "libsaio.h" #import "memory.h" diff --git a/gen/libsaio/errorV.c b/gen/libsaio/errorV.c index 231c7ec..0d7e0c5 100644 --- a/gen/libsaio/errorV.c +++ b/gen/libsaio/errorV.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsaio/gets.c b/gen/libsaio/gets.c index 5fdc758..6a69acf 100644 --- a/gen/libsaio/gets.c +++ b/gen/libsaio/gets.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsaio/localPrintf.c b/gen/libsaio/localPrintf.c index b9b6ad8..536f9aa 100644 --- a/gen/libsaio/localPrintf.c +++ b/gen/libsaio/localPrintf.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsaio/localVPrintf.c b/gen/libsaio/localVPrintf.c index e6ce692..9cbebe4 100644 --- a/gen/libsaio/localVPrintf.c +++ b/gen/libsaio/localVPrintf.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsaio/printf.c b/gen/libsaio/printf.c index f282f6e..66e878b 100644 --- a/gen/libsaio/printf.c +++ b/gen/libsaio/printf.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsaio/reallyPrint.c b/gen/libsaio/reallyPrint.c index b47ad07..157f167 100644 --- a/gen/libsaio/reallyPrint.c +++ b/gen/libsaio/reallyPrint.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsaio/stringTable.c b/gen/libsaio/stringTable.c index 66f10e9..34f74d3 100644 --- a/gen/libsaio/stringTable.c +++ b/gen/libsaio/stringTable.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -27,10 +28,9 @@ */ #import "libsaio.h" -#import "kernBootStruct.h" +#import "bootstruct.h" #import -extern KERNBOOTSTRUCT *kernBootStruct; extern char *Language; extern char *LoadableFamilies; @@ -315,9 +315,9 @@ BOOL getValueForKey( int *size ) { - if (getValueForBootKey(kernBootStruct->bootString, key, val, size)) + if (getValueForBootKey(bootArgs->bootString, key, val, size)) return YES; - else if (getValueForStringTableKey(kernBootStruct->config, key, val, size)) + else if (getValueForStringTableKey(bootArgs->config, key, val, size)) return YES; return NO; @@ -382,7 +382,7 @@ int sysConfigValid; int loadConfigFile( char *configFile, char **table, int allocTable) { - char *configPtr = kernBootStruct->configEnd; + char *configPtr = bootArgs->configEnd; int fd, count; /* Read config file into memory */ @@ -391,7 +391,7 @@ loadConfigFile( char *configFile, char **table, int allocTable) if (allocTable) { configPtr = malloc(file_size(fd)+2); } else { - if ((configPtr - kernBootStruct->config) > CONFIG_SIZE) { + if ((configPtr - bootArgs->config) > CONFIG_SIZE) { error("No room in memory for config file %s\n",configFile); close(fd); return -1; @@ -406,7 +406,7 @@ loadConfigFile( char *configFile, char **table, int allocTable) *configPtr++ = 0; *configPtr = 0; if (!allocTable) - kernBootStruct->configEnd = configPtr; + bootArgs->configEnd = configPtr; return 0; } else { @@ -552,8 +552,8 @@ loadOtherConfigs( error("Warning: No active drivers specified in system config\n"); } - kernBootStruct->first_addr0 = - (int)kernBootStruct->configEnd + 1024; + bootArgs->first_addr0 = + (int)bootArgs->configEnd + 1024; return 0; } diff --git a/gen/libsaio/sys.c b/gen/libsaio/sys.c index 27c8244..7a9bf9c 100644 --- a/gen/libsaio/sys.c +++ b/gen/libsaio/sys.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -58,7 +59,7 @@ #import #import #import -#import +#import #import "libsaio.h" #import "cache.h" #import "kernBootStruct.h" @@ -273,7 +274,7 @@ sbmap(struct iob *io, daddr_t bn) // for now it is little endian FS for intel nb = bap[i]; #else - nb = NXSwapBigLongToHost(bap[i]); + nb = OSSwapBigToHostInt32(bap[i]); #endif 1 #else BIG_ENDIAN_FS nb = bap[i]; diff --git a/gen/libsaio/table.c b/gen/libsaio/table.c index 2c15021..e73b438 100644 --- a/gen/libsaio/table.c +++ b/gen/libsaio/table.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/libsaio/ufs_byteorder.c b/gen/libsaio/ufs_byteorder.c index ab90632..0d267de 100644 --- a/gen/libsaio/ufs_byteorder.c +++ b/gen/libsaio/ufs_byteorder.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -30,12 +31,12 @@ #import #import #import -#import +#include #import "ufs_byteorder.h" #import "libsaio.h" -#define swapBigLongToHost(thing) ((thing) = NXSwapBigLongToHost(thing)) -#define swapBigShortToHost(thing) ((thing) = NXSwapBigShortToHost(thing)) +#define swapBigLongToHost(thing) ((thing) = OSSwapBigToHostInt32(thing)) +#define swapBigShortToHost(thing) ((thing) = OSSwapBigToHostInt16(thing)) void swapBigIntsToHost(int *array, int count) diff --git a/gen/libsaio/ufs_byteorder.h b/gen/libsaio/ufs_byteorder.h index ed353f7..6053669 100644 --- a/gen/libsaio/ufs_byteorder.h +++ b/gen/libsaio/ufs_byteorder.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -35,10 +36,12 @@ #import #import #import -#import +#import #import #import +#include + void byte_swap_ints(int *array, int count); void byte_swap_shorts(short *array, int count); diff --git a/gen/libsaio/unpackbits.c b/gen/libsaio/unpackbits.c index 46ae370..c60d321 100644 --- a/gen/libsaio/unpackbits.c +++ b/gen/libsaio/unpackbits.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/rcz/rcz.c b/gen/rcz/rcz.c index 6155f0c..8d7ff2b 100644 --- a/gen/rcz/rcz.c +++ b/gen/rcz/rcz.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/rcz/rcz_common.c b/gen/rcz/rcz_common.c index 264dafd..635884f 100644 --- a/gen/rcz/rcz_common.c +++ b/gen/rcz/rcz_common.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/rcz/rcz_common.h b/gen/rcz/rcz_common.h index 9c691ac..c0bd6d6 100644 --- a/gen/rcz/rcz_common.h +++ b/gen/rcz/rcz_common.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/rcz/rcz_compress_mem.c b/gen/rcz/rcz_compress_mem.c index 56a58c2..576c6bc 100644 --- a/gen/rcz/rcz_compress_mem.c +++ b/gen/rcz/rcz_compress_mem.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/rcz/rcz_compress_mem.h b/gen/rcz/rcz_compress_mem.h index bf3e8b1..9c5ad02 100644 --- a/gen/rcz/rcz_compress_mem.h +++ b/gen/rcz/rcz_compress_mem.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/rcz/rcz_decompress_file.c b/gen/rcz/rcz_decompress_file.c index d47abbd..96dc5f2 100644 --- a/gen/rcz/rcz_decompress_file.c +++ b/gen/rcz/rcz_decompress_file.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/rcz/rcz_decompress_file.h b/gen/rcz/rcz_decompress_file.h index f962a12..180db9e 100644 --- a/gen/rcz/rcz_decompress_file.h +++ b/gen/rcz/rcz_decompress_file.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/rcz/rcz_decompress_mem.c b/gen/rcz/rcz_decompress_mem.c index e223f49..1fe2eb2 100644 --- a/gen/rcz/rcz_decompress_mem.c +++ b/gen/rcz/rcz_decompress_mem.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/rcz/rcz_decompress_mem.h b/gen/rcz/rcz_decompress_mem.h index bae443f..1b7db25 100644 --- a/gen/rcz/rcz_decompress_mem.h +++ b/gen/rcz/rcz_decompress_mem.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/gen/util/machOconv.c b/gen/util/machOconv.c index 1e37f00..c1296a9 100644 --- a/gen/util/machOconv.c +++ b/gen/util/machOconv.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -26,7 +27,7 @@ #include #include #include -#include +#include int infile, outfile; @@ -40,7 +41,7 @@ static unsigned long swap( ) { if (swap_ends) - return NXSwapLong(x); + return OSSwapInt32(x); else return x; } diff --git a/i386/Makefile b/i386/Makefile index 88b7ee3..245d8de 100644 --- a/i386/Makefile +++ b/i386/Makefile @@ -26,8 +26,8 @@ SRCROOT=/tmp VPATH = $(OBJROOT):$(SYMROOT) -# SUBDIRS = rcz util libsa libsaio sarld nasm boot2 boot1 boot0 strings -SUBDIRS = rcz util libsa libsaio nasm boot2 boot1 boot0 strings +# The order of building is important. +SUBDIRS = rcz util libsa libsaio nasm boot2 boot1 boot1u boot0 cdboot strings all tags clean debug install installhdrs: @for i in ${SUBDIRS}; \ diff --git a/i386/boot0/boot0.s b/i386/boot0/boot0.s index f1eb72e..7a1c570 100644 --- a/i386/boot0/boot0.s +++ b/i386/boot0/boot0.s @@ -1,37 +1,34 @@ -; Copyright (c) 1999 Apple Computer, Inc. All rights reserved. +; Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. ; ; @APPLE_LICENSE_HEADER_START@ ; -; Portions Copyright (c) 1999 Apple Computer, Inc. All Rights -; Reserved. This file contains Original Code and/or Modifications of -; Original Code as defined in and that are subject to the Apple Public -; Source License Version 1.1 (the "License"). You may not use this file -; except in compliance with the License. Please obtain a copy of the -; License at http://www.apple.com/publicsource and read it before using -; this file. +; Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. +; +; This file contains Original Code and/or Modifications of Original Code +; as defined in and that are subject to the Apple Public Source License +; Version 2.0 (the 'License'). You may not use this file except in +; compliance with the License. Please obtain a copy of the License at +; http://www.opensource.apple.com/apsl/ and read it before using this +; file. ; ; The Original Code and all software distributed under the License are -; distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER +; distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ; EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ; INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, -; FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the -; License for the specific language governing rights and limitations -; under the License. +; FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. +; Please see the License for the specific language governing rights and +; limitations under the License. ; ; @APPLE_LICENSE_HEADER_END@ ; ; Boot Loader: boot0 ; ; A small boot sector program written in x86 assembly whose only -; responsibility is to locate the booter partition, load the -; booter into memory, and jump to the booter's entry point. -; The booter partition can be a primary or a logical partition. +; responsibility is to locate the active partition, load the +; partition booter into memory, and jump to the booter's entry point. +; It leaves the boot drive in DL and a pointer to the partition entry in SI. ; -; This boot loader can be placed at any of the following places: -; 1. Master Boot Record (MBR) -; 2. Boot sector of an extended partition -; 3. Boot sector of a primary partition -; 4. Boot sector of a logical partition +; This boot loader must be placed in the Master Boot Record. ; ; In order to coexist with a fdisk partition table (64 bytes), and ; leave room for a two byte signature (0xAA55) in the end, boot0 is @@ -50,7 +47,7 @@ DEBUG EQU 0 ; -; Set to 1 to support loading the booter (boot2) from a +; Set to 1 to support loading the partition booter (boot1) from a ; logical partition. ; EXT_PART_SUPPORT EQU 1 @@ -70,10 +67,6 @@ kPartTableOffset EQU 0x1be kMBRPartTable EQU kMBRBuffer + kPartTableOffset kExtPartTable EQU kExtBuffer + kPartTableOffset -kBoot2Sectors EQU 112 ; sectors to load for boot2 -kBoot2Address EQU 0x0000 ; boot2 load address -kBoot2Segment EQU 0x2000 ; boot2 load segment - kSectorBytes EQU 512 ; sector size in bytes kBootSignature EQU 0xAA55 ; boot sector signature @@ -83,18 +76,14 @@ kPartTypeExtDOS EQU 0x05 ; DOS extended partition type kPartTypeExtWin EQU 0x0f ; Windows extended partition type kPartTypeExtLinux EQU 0x85 ; Linux extended partition type +kPartActive EQU 0x80 + %ifdef FLOPPY kDriveNumber EQU 0x00 %else kDriveNumber EQU 0x80 %endif -; -; In memory variables. -; -ebios_lba dd 0 ; starting LBA of the intial extended partition. -read_func dw 0 ; pointer to the LBA or CHS read function - ; ; Format of fdisk partition entry. ; @@ -186,23 +175,8 @@ start_reloc: ; Clear various flags in memory. ; xor eax, eax - mov [ebios_lba], eax ; clear EBIOS LBA offset - mov WORD [read_func], read_chs ; assume CHS support - - ; - ; Since this code may not always reside in the MBR, always start by - ; loading the MBR to kMBRBuffer. - ; - mov al, 1 ; load one sector - xor bx, bx - mov es, bx ; MBR load segment = 0 - mov bx, kMBRBuffer ; MBR load address - mov si, bx ; pointer to fake partition entry - mov WORD [si], 0x0000 ; CHS DX: head = 0 - mov WORD [si + 2], 0x0001 ; CHS CX: cylinder = 0, sector = 1 - - call load - jc .next_drive ; MBR load error + mov [ebios_lba], eax ; clear EBIOS LBA offset + mov [ebios_present], al ; clear EBIOS support flag ; ; Check if EBIOS is supported for this hard drive. @@ -225,10 +199,25 @@ start_reloc: cmp bx, 0xAA55 ; check BX = 0xAA55 jnz .ebios_check_done test cl, 0x01 ; check enhanced drive read support - mov WORD [read_func], read_lba ; use read_lba for reads + setnz [ebios_present] ; EBIOS supported, set flag DebugChar('E') ; EBIOS supported .ebios_check_done: + ; + ; Since this code may not always reside in the MBR, always start by + ; loading the MBR to kMBRBuffer. + ; + mov al, 1 ; load one sector + xor bx, bx + mov es, bx ; MBR load segment = 0 + mov bx, kMBRBuffer ; MBR load address + mov si, bx ; pointer to fake partition entry + mov WORD [si], 0x0000 ; CHS DX: head = 0 + mov WORD [si + 2], 0x0001 ; CHS CX: cylinder = 0, sector = 1 + + call load + jc .next_drive ; MBR load error + ; ; Look for the booter partition in the MBR partition table, ; which is at offset kMBRPartTable. @@ -249,7 +238,7 @@ hang: jmp SHORT hang ;-------------------------------------------------------------------------- -; Find the boot partition and load the booter from the partition. +; Find the active (boot) partition and load the booter from the partition. ; ; Arguments: ; AH = recursion nesting level @@ -275,7 +264,7 @@ find_boot: .loop: ; - ; First scan through the partition table looking for the boot + ; First scan through the partition table looking for the active ; partition. Postpone walking the extended partition chain for ; the second pass. Do not merge the two without changing the ; buffering scheme used to store extended partition tables. @@ -287,26 +276,33 @@ find_boot: call print_hex %endif - cmp BYTE [si + part.type], kPartTypeBoot + cmp BYTE [si + part.bootid], kPartActive jne .continue + DebugChar('*') + ; - ; Found boot partition, read boot2 image to memory. + ; Found boot partition, read boot sector to memory. ; - mov al, kBoot2Sectors - mov bx, kBoot2Segment + mov al, 1 + mov bx, kBoot0Segment mov es, bx - mov bx, kBoot2Address + mov bx, kBoot0LoadAddr call load ; will not return on success jc .continue ; load error, keep looking? + ; + ; Fix up absolute block location in partition record. ; - ; Jump to boot2. The drive number is already in register DL. + mov eax, [si + part.lba] + add eax, [ebios_lba] + mov [si + part.lba], eax + ; - ; The first sector loaded from the disk is reserved for the boot - ; block (boot0), adjust the jump location by adding a sector offset. + ; Jump to partition booter. The drive number is already in register DL. + ; SI is pointing to the modified partition entry. ; - jmp kBoot2Segment:kBoot2Address + kSectorBytes + jmp kBoot0Segment:kBoot0LoadAddr .continue: add si, part_size ; advance SI to next partition entry @@ -409,14 +405,24 @@ find_boot: ; load: push cx - mov cx, 5 ; number of times to retry + test BYTE [ebios_present], 1 + jz .chs -.loop: - call [read_func] ; call either read_chs or read_lba - jnc .exit ; load success - loop .loop ; retry on error +.ebios: + mov cx, 5 ; load retry count +.ebios_loop: + call read_lba ; use INT13/F42 + jnc .exit + loop .ebios_loop -.exit: +.chs: + mov cx, 5 ; load retry count +.chs_loop: + call read_chs ; use INT13/F2 + jnc .exit + loop .chs_loop + +.exit pop cx ret @@ -466,7 +472,7 @@ read_chs: int 0x13 ; INT 13 jnc .exit - DebugChar('e') ; indicate INT13/F2 error + DebugChar('r') ; indicate INT13/F2 error ; ; Issue a disk reset on error. @@ -543,7 +549,7 @@ read_lba: jnc .exit - DebugChar('E') ; indicate INT13/F42 error + DebugChar('R') ; indicate INT13/F42 error ; ; Issue a disk reset on error. @@ -581,8 +587,9 @@ print_string .exit ret -%if DEBUG +%if DEBUG + ;-------------------------------------------------------------------------- ; Write a ASCII character to the console. ; @@ -645,12 +652,19 @@ print_nibble: call print_char ret +getc: + pusha + mov ah, 0 + int 0x16 + popa + ret + %endif ; DEBUG ;-------------------------------------------------------------------------- ; NULL terminated strings. ; -boot_error_str db 10, 13, 'Boot Error', 0 +boot_error_str db 10, 13, 'Error', 0 ;-------------------------------------------------------------------------- ; Pad the rest of the 512 byte sized booter with zeroes. The last @@ -659,6 +673,12 @@ boot_error_str db 10, 13, 'Boot Error', 0 ; If the booter code becomes too large, then nasm will complain ; that the 'times' argument is negative. +; +; In memory variables. +; +ebios_lba dd 0 ; starting LBA of the intial extended partition. +ebios_present db 0 ; 1 if EBIOS is supported, 0 otherwise. + pad_boot times 446-($-$$) db 0 diff --git a/i386/boot1/Makefile b/i386/boot1/Makefile index b8f16d0..9fd2dd5 100644 --- a/i386/boot1/Makefile +++ b/i386/boot1/Makefile @@ -7,10 +7,10 @@ DIRS_NEEDED = $(OBJROOT) $(SYMROOT) NASM = $(SYMROOT)/nasm -VERSIONED_FILES = boot1 boot1f +VERSIONED_FILES = boot1h boot1f VERS = `vers_string -f 5.0 | tr - .` -NEW_VERS = Rhapsody boot1 v$(VERS) +NEW_VERS = Darwin boot1h v$(VERS) ifneq "" "$(wildcard /bin/mkdirs)" MKDIRS = /bin/mkdirs else @@ -19,14 +19,14 @@ endif all: $(DIRS_NEEDED) $(VERSIONED_FILES) -boot1: boot1.s Makefile +boot1h: boot1.s Makefile $(NASM) -dBOOTDEV=HDISK -dVERS="'$(NEW_VERS)'" boot1.s -o $(SYMROOT)/$@ boot1f: boot1.s Makefile $(NASM) -dBOOTDEV=FLOPPY -dVERS="'$(NEW_VERS)'" boot1.s -o $(SYMROOT)/$@ install_i386:: all $(INSTALLDIR) - cp $(SYMROOT)/boot1 $(INSTALLDIR)/ + cp $(SYMROOT)/boot1h $(INSTALLDIR)/ cp $(SYMROOT)/boot1f $(INSTALLDIR)/ cd $(INSTALLDIR); chmod u+w $(VERSIONED_FILES) diff --git a/i386/boot1/boot1.s b/i386/boot1/boot1.s index 8af950e..799ed04 100644 --- a/i386/boot1/boot1.s +++ b/i386/boot1/boot1.s @@ -1,563 +1,533 @@ -; Copyright (c) 1999 Apple Computer, Inc. All rights reserved. +; Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. ; ; @APPLE_LICENSE_HEADER_START@ ; -; Portions Copyright (c) 1999 Apple Computer, Inc. All Rights -; Reserved. This file contains Original Code and/or Modifications of -; Original Code as defined in and that are subject to the Apple Public -; Source License Version 1.1 (the "License"). You may not use this file -; except in compliance with the License. Please obtain a copy of the -; License at http://www.apple.com/publicsource and read it before using -; this file. +; Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. +; +; This file contains Original Code and/or Modifications of Original Code +; as defined in and that are subject to the Apple Public Source License +; Version 2.0 (the 'License'). You may not use this file except in +; compliance with the License. Please obtain a copy of the License at +; http://www.opensource.apple.com/apsl/ and read it before using this +; file. ; ; The Original Code and all software distributed under the License are -; distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER +; distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ; EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ; INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, -; FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the -; License for the specific language governing rights and limitations -; under the License. +; FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. +; Please see the License for the specific language governing rights and +; limitations under the License. ; ; @APPLE_LICENSE_HEADER_END@ ; -; Boot Loader: boot0 +; Partition Boot Loader: boot1h ; -; A small boot sector program written in x86 assembly whose only -; responsibility is to locate the booter partition, load the -; booter into memory, and jump to the booter's entry point. -; The booter partition can be a primary or a logical partition. -; But the booter partition must reside within the 8GB limit -; imposed by CHS addressing + translation. +; This program is designed to reside in sector 0 of an HFS+ partition. +; The HFS+ partition can be a primary or a logical partition. +; It expects that the MBR has left the drive number in DL +; and a pointer to the partition entry in SI. ; -; This boot loader can be placed at any of the following places: -; * Master Boot Record (MBR) -; * Boot sector of an extended partition -; * Boot sector of a primary partition -; * Boot sector of a logical partition -; -; In order to coexist with a fdisk partition table (64 bytes), and -; leave room for a two byte signature (0xAA55) in the end, boot0 is -; restricted to 446 bytes (512 - 64 - 2). If boot0 did not have to -; live in the MBR, then we would have 510 bytes to play with. -; -; boot0 is always loaded by the BIOS or another first level booter -; to 0:7C00h. +; This version requires a BIOS with EBIOS (LBA) support. ; ; This code is written for the NASM assembler. ; nasm boot0.s -o boot0 -;-------------------------------------------------------------------------- -; Constants. - -FLOPPY EQU 0x00 ; floppy dev number -HDISK EQU 0x80 ; hard drive dev number -DEBUG EQU 0 ; enable debugging output - -BOOTSEG EQU 0x0 ; our sole segment -BOOTSP EQU 0xFFF0 ; stack pointer -BOOTLOAD EQU 0x7C00 ; booter load address -BOOTRELOC EQU 0xE000 ; booter is relocated here -BOOTSIG EQU 0xAA55 ; booter signature - -BOOT2_SIZE EQU 112 ; load this many blocks for boot2 -BOOT2_ADDR EQU 0x0200 ; where to load boot2 -BOOT2_SEG EQU 0x2000 - -%IF BOOTDEV = FLOPPY -DRIVE_NUM EQU FLOPPY ; floppy drive -%ELSE -DRIVE_NUM EQU HDISK ; "C" drive -%ENDIF -SECTOR_BYTES EQU 512 ; sector size in bytes - -BUF_MBR EQU 0x1000 ; memory buffer for MBR -BUF_EXT EQU 0x1200 ; memory buffer for extended partition - -TABLE_MAIN EQU BUF_MBR + 0x1be ; location of main partition table -TABLE_EXT EQU BUF_EXT + 0x1be ; location of ext partition table -ENTRY_SIZE EQU 16 ; size of each fdisk partition entry -TYPE_BOOT EQU 0xab ; partition type we are looking for -TYPE_EXT EQU 0x05 ; extended partition type -TYPE_EXT_1 EQU 0x0f ; Windows extended partition -TYPE_EXT_2 EQU 0x85 ; Linux extended partition -EXT_LEVELS_MAX EQU 128 ; max extended partition levels +; +; Set to 1 to enable obscure debug messages. +; +DEBUG EQU 0 +; +; Set to 1 to support loading the booter (boot2) from a +; logical partition. +; +EXT_PART_SUPPORT EQU 0 -;-------------------------------------------------------------------------- -; Start of text segment. +; +; Various constants. +; +kBoot0Segment EQU 0x0000 +kBoot0Stack EQU 0xFFF0 ; boot0 stack pointer +kBoot0LoadAddr EQU 0x7C00 ; boot0 load address +kBoot0RelocAddr EQU 0xE000 ; boot0 relocated address - SEGMENT .text +ebios_lba EQU 0xEF00 ; storage for variables - ORG 0xE000 ; must match BOOTRELOC +kMBRBuffer EQU 0x1000 ; MBR buffer address +kExtBuffer EQU 0x1200 ; EXT boot block buffer address -;-------------------------------------------------------------------------- -; Loaded at 0:7c00h. -; -start - ; Set up the stack to grow down from BOOTSEG:BOOTSP. - ; Interrupts should be off while the stack is being manipulated. - ; - cli ; interrupts off - mov ax, BOOTSEG ; - mov ss, ax ; ss <- BOOTSEG - mov sp, BOOTSP ; sp <- BOOTSP - sti ; reenable interrupts +kPartTableOffset EQU 0x1be +kMBRPartTable EQU kMBRBuffer + kPartTableOffset +kExtPartTable EQU kExtBuffer + kPartTableOffset - ; Relocate the booter code from DS:SI to ES:DI, - ; or from 0:7C00h to BOOTSEG:BOOTRELOC. - ; - mov es, ax ; es <- BOOTSEG - mov ds, ax ; ds <- BOOTSEG +kBoot2Sectors EQU 112 ; sectors to load for boot2 +kBoot2Address EQU 0x0000 ; boot2 load address +kBoot2Segment EQU 0x2000 ; boot2 load segment - mov si, BOOTLOAD ; si <- BOOTLOAD (source) - mov di, BOOTRELOC ; di <- BOOTRELOC (destination) - ; - cld ; auto-increment SI and/or DI registers - mov cx, 256 ; copy 256 words (512 bytes) - repnz movsw ; repeat string move (word) operation +kSectorBytes EQU 512 ; sector size in bytes +kBootSignature EQU 0xAA55 ; boot sector signature - ; Code relocated, jump to start_reloc in relocated location. - ; - jmp BOOTSEG:start_reloc +kPartCount EQU 4 ; number of paritions per table +kPartTypeBoot EQU 0xab ; boot2 partition type +kPartTypeHFS EQU 0xaf +kPartTypeExtDOS EQU 0x05 ; DOS extended partition type +kPartTypeExtWin EQU 0x0f ; Windows extended partition type +kPartTypeExtLinux EQU 0x85 ; Linux extended partition type + +kPartActive EQU 0x80 -;-------------------------------------------------------------------------- -; Start execution from the relocated location. -; -start_reloc - mov al, '=' ; indicate execution start - call putchar +;; +;; HFS constants +;; +kHFSSig EQU 0x4442 ; HFS volume signature +kAlBlStOffset EQU 0x1c +kEmbedStartOffset EQU 0x7e +kAlBlkSizOffset EQU 0x14 - ; Get disk parameters (CHS) using INT13/F8 call. - ; - mov dl, DRIVE_NUM ; boot drive is drive C - mov ah, 8 ; Read Disk Driver Parameter function - int 0x13 - and cl, 0x3f ; sectors/track - mov [max_sectors], cl - mov [max_heads], dh - jc error +;; +;; HFS+ constants +;; +kHFSPlusSig EQU 0x2B48 ; HFS+ volume signature +kBlockSizeOffset EQU 0x28 +kExtentOffset EQU 0x1c0 + +kHFSBuffer EQU 0x1400 ; HFS volume header address - mov al, '>' ; indicate INT13/F8 success - call putchar +kHFSSigAddr EQU kHFSBuffer +kHFSAlBlSt EQU kHFSBuffer + kAlBlStOffset +kHFSEmbedStart EQU kHFSBuffer + kEmbedStartOffset +kHFSAlBlkSiz EQU kHFSBuffer + kAlBlkSizOffset - ; Since this code may not always reside in the MBR, we will always - ; start by loading the MBR to BUF_MBR. - ; - mov WORD [chs_cx], 0x0001 ; cyl = 0, sect = 1 - mov BYTE [chs_dx + 1], 0 ; head = 0 - xor cx, cx ; skip 0 sectors - mov ax, 1 ; read 1 sector - mov bx, BUF_MBR ; load buffer - call load - jc error +kHFSPlusSigAddr EQU kHFSBuffer +kHFSPlusBlockSize EQU kHFSBuffer + kBlockSizeOffset +kHFSPlusExtent EQU kHFSBuffer + kExtentOffset - mov di, TABLE_MAIN ; argument for find_booter - cmp WORD [di + 64], BOOTSIG ; correct signature found? - jne error ; Oops! no signature! - mov bl, TYPE_BOOT ; look for this partition type - mov bh, 0 ; initial nesting level is 0 - call find_booter -error - mov si, load_error - call message -hang_1 - jmp hang_1 +%ifdef FLOPPY +kDriveNumber EQU 0x00 +%else +kDriveNumber EQU 0x80 +%endif -;-------------------------------------------------------------------------- -; Locate the booter partition and load the booter. ; -; Arguments: -; di - pointer to fdisk partition table. -; bl - partition type to look for. +; Format of fdisk partition entry. ; -; The following registers are modified: -; ax, bh +; The symbol 'part_size' is automatically defined as an `EQU' +; giving the size of the structure. ; -find_booter - push cx - push si - - mov si, di ; si <- pointer to partition table - mov cx, 4 ; 4 partition entries per table + struc part +.bootid: resb 1 ; bootable or not +.head: resb 1 ; starting head, sector, cylinder +.sect: resb 1 ; +.cyl: resb 1 ; +.type: resb 1 ; partition type +.endhead resb 1 ; ending head, sector, cylinder +.endsect: resb 1 ; +.endcyl: resb 1 ; +.lba: resd 1 ; starting lba +.sectors resd 1 ; size in sectors + endstruc -find_booter_pri - ; - ; Hunt for a fdisk partition type that matches the value in bl. - ; -%IF DEBUG - mov al, bh ; log partition type seen - call putspace - mov al, [si + 4] - call display_byte -%ENDIF +; +; Macros. +; +%macro DebugCharMacro 1 + mov al, %1 + call print_char + call getc +%endmacro - cmp BYTE [si + 4], bl ; Is this the booter partition? - je load_booter ; yes, load the booter +%if DEBUG +%define DebugChar(x) DebugCharMacro x +%else +%define DebugChar(x) +%endif + + +;-------------------------------------------------------------------------- +; Start of text segment. - add si, ENTRY_SIZE ; si <- next partition entry - loop find_booter_pri ; loop while cx is not zero + SEGMENT .text - ; No primary (or perhaps logical) booter partition found in the - ; current partition table. Restart and look for extended partitions. - ; - mov si, di ; si <- pointer to partition table - mov cx, 4 ; 4 partition entries per table + ORG 0xE000 ; must match kBoot0RelocAddr -find_booter_ext +;-------------------------------------------------------------------------- +; Boot code is loaded at 0:7C00h. +; +start ; - ; Look for extended partition entries in the partition table. + ; Set up the stack to grow down from kBoot0Segment:kBoot0Stack. + ; Interrupts should be off while the stack is being manipulated. ; -%IF DEBUG - mov al, bh ; log partition type seen - call putspace - mov al, 'E' - call putchar - mov al, [si + 4] - call display_byte -%ENDIF + cli ; interrupts off + xor ax, ax ; zero ax + mov ss, ax ; ss <- 0 + mov sp, kBoot0Stack ; sp <- top of stack + sti ; reenable interrupts - cmp BYTE [si + 4], TYPE_EXT ; Is this an extended partition? - je find_booter_ext_2 ; yes, load its partition table + mov es, ax ; es <- 0 + mov ds, ax ; ds <- 0 - cmp BYTE [si + 4], TYPE_EXT_1 ; Is this an extended partition? - je find_booter_ext_2 ; yes, load its partition table + DebugChar('H') - cmp BYTE [si + 4], TYPE_EXT_2 ; Is this an extended partition? - je find_booter_ext_2 ; yes, load its partition table +%if DEBUG + mov eax, [si + part.lba] + call print_hex +%endif -find_booter_ext_1 ; - ; si is not pointing to an extended partition entry, - ; try the next entry in the partition table. + ; Clear various flags in memory. ; - add si, ENTRY_SIZE ; si <- next partition entry - loop find_booter_ext ; loop while cx is not zero - - jmp find_booter_end ; give up - -find_booter_ext_2 - cmp bh, EXT_LEVELS_MAX - ja find_booter_end ; in too deep! - - inc bh ; increment nesting level counter - - ; Prepare the arguments for the load function call to - ; load the extended partition table into memory. - ; Note that si points to the extended partition entry. - ; - mov ax, [si] ; DH/DL - mov [chs_dx], ax - mov ax, [si + 2] ; CH/CL - mov [chs_cx], ax - pusha - xor cx, cx ; skip 0 sectors - mov ax, 1 ; read 1 sector - mov bx, BUF_EXT ; load to BUF_EXT + xor eax, eax + mov [ebios_lba], eax ; clear EBIOS LBA offset + + cmp BYTE [si + part.type], kPartTypeHFS + jne .part_err + cmp BYTE [si + part.bootid], kPartActive + jne .part_err + + jmp find_startup + +.part_err: + DebugChar('P') + jmp hang + +;;; --------------------------------------- +;;; +;;; find_startup - Find HFS+ startup file in a partition. +;;; +;;; Arguments: +;;; DL = drive number (0x80 + unit number) +;;; SI = pointer to the partition entry. +;;; +;;; On success, loads booter and jumps to it. +;;; +find_startup: + DebugChar(']') + + mov al, 1 ; read 1 sector + xor bx, bx + mov es, bx ; es = 0 + mov bx, kHFSBuffer ; load volume header + mov ecx, DWORD 2 call load - popa - - jc find_booter_ext_3 ; bail out if load failed - - mov di, TABLE_EXT ; di <- pointer to new partition table - cmp WORD [di + 64], BOOTSIG - jne find_booter_ext_3 ; OhOh! no signature! - - call find_booter ; recursion... - -find_booter_ext_3 - dec bh ; decrement nesting level counter - - ; If we got here, then we know there isn't a booter - ; partition linked from this partition entry. - - test bh, bh ; if we are at level 0, then - jz find_booter_ext_1 ; look for next extended partition entry - -find_booter_end - pop si - pop cx - ret - -;-------------------------------------------------------------------------- -; Yeah! Found the booter partition. The first sector in this partition -; is reserved for the boot sector code (us). So load the booter -; starting from the second sector in the partition, then jump to the -; start of the booter. -; -load_booter - mov ax, [si] ; DH/DL - mov [chs_dx], ax - mov ax, [si + 2] ; CH/CL - mov [chs_cx], ax - - mov cx, 1 ; skip the initial boot sector - mov ax, BOOT2_SIZE ; read BOOT2_SIZE sectors - mov bx, BOOT2_SEG + jnc .ok ; load error + + jmp startup_err + +.ok + mov ax, [kHFSSigAddr] + cmp ax, kHFSSig + jne .hfs_plus + + DebugChar('|') + mov ebx, [kHFSAlBlkSiz] + bswap ebx + sar ebx, 9 + + xor eax, eax + mov ax, [kHFSEmbedStart] + xchg al, ah ; byte-swap + push dx + mul ebx ; result in eax + pop dx + + xor ebx, ebx + mov bx, [kHFSAlBlSt] + xchg bl, bh ; byte-swap + add eax, ebx + + ;; now eax has sector of HFS+ partition + inc eax + inc eax + mov ecx, eax + + mov al, 1 ; read 1 sector + xor bx, bx + mov es, bx ; es = 0 + mov bx, kHFSBuffer ; load volume header + call load + jc startup_err ; load error + +.hfs_plus + DebugChar('}') + mov ax, [kHFSPlusSigAddr] + cmp ax, kHFSPlusSig + jne startup_err + +;;; Now the HFS+ volume header is in our buffer. + + DebugChar('*') + mov eax, [kHFSPlusBlockSize] + bswap eax + sar eax, 9 + + mov ebx, [kHFSPlusExtent] + bswap ebx + push dx + mul ebx ; result in eax + pop dx + + dec eax + dec eax +; add [ebios_lba], eax ; offset to startup file +; mov ecx, [ebios_lba] + add ecx, eax + + DebugChar('!') + + mov al, kBoot2Sectors + mov bx, kBoot2Segment mov es, bx - mov bx, BOOT2_ADDR ; where to place boot2 code - call load ; load it... + mov bx, kBoot2Address + kSectorBytes + call load + jc startup_err - xor edx, edx - mov dl, DRIVE_NUM ; argument for boot2 + DebugChar('Y') + ; + ; Jump to boot2. The drive number is already in register DL. + ; + jmp kBoot2Segment:kBoot2Address + kSectorBytes + +startup_err: - jmp BOOT2_SEG:BOOT2_ADDR ; there is no going back now! + DebugChar('X') + +hang: + hlt + jmp SHORT hang ;-------------------------------------------------------------------------- -; Load sectors from disk using INT13/F2 call. The sectors are loaded -; one sector at a time to avoid any BIOS bugs, and eliminate -; complexities with crossing track boundaries, and other gotchas. +; load - Load one or more sectors from a partition. ; ; Arguments: -; cx - number of sectors to skip -; ax - number of sectors to read -; bx - pointer to the memory buffer (must not cross a segment boundary) -; [chs_cx][chs_dx] - CHS starting position +; AL = number of 512-byte sectors to read. +; ES:BX = pointer to where the sectors should be stored. +; ECX = sector offset in partition +; DL = drive number (0x80 + unit number) +; SI = pointer to the partition entry. ; ; Returns: ; CF = 0 success -; CF = 1 error -; -; The caller must save any registers it needs. -; -load - jcxz load_sectors - call next_sector ; [chs_cx][chs_dx] <- next sector - loop load - -load_sectors - mov cx, ax ; cx <- number of sectors to read - -load_loop - call read_sector ; load a single sector - jc load_exit ; abort if carry flag is set - add bx, SECTOR_BYTES ; increment buffer pointer - call next_sector ; [chs_cx][chs_dx] <- next sector - loop load_loop - clc ; successful exit -load_exit - ret +; 1 error +; +; load: +; ; push cx + +; .ebios: +; ; mov cx, 5 ; load retry count +; .ebios_loop: +; call read_lba ; use INT13/F42 +; jnc .exit +; ; loop .ebios_loop + +; .exit +; pop cx +; ret + ;-------------------------------------------------------------------------- -; Read a single sector from the hard disk. +; read_lba - Read sectors from a partition using LBA addressing. ; ; Arguments: -; [chs_cx][chs_dx] - CHS starting position -; es:bx - pointer to the sector memory buffer -; (must not cross a segment boundary) +; AL = number of 512-byte sectors to read (valid from 1-127). +; ES:BX = pointer to where the sectors should be stored. +; ECX = sector offset in partition +; DL = drive number (0x80 + unit number) +; SI = pointer to the partition entry. ; ; Returns: ; CF = 0 success -; CF = 1 error +; 1 error ; -; Caller's cx register is preserved. +read_lba: +load: + pushad ; save all registers + mov bp, sp ; save current SP + ; -read_sector - push cx - mov cx, 5 ; try 5 times to read the sector + ; Create the Disk Address Packet structure for the + ; INT13/F42 (Extended Read Sectors) on the stack. + ; -read_sector_1 - mov bp, cx ; save cx + ; push DWORD 0 ; offset 12, upper 32-bit LBA + push ds ; For sake of saving memory, + push ds ; push DS register, which is 0. - mov cx, [chs_cx] - mov dx, [chs_dx] - mov dl, DRIVE_NUM ; drive number - mov ax, 0x0201 ; Func 2, read 1 sector - int 0x13 ; read sector - jnc read_sector_ok ; CF = 0 indicates success + add ecx, [ebios_lba] ; offset 8, lower 32-bit LBA + add ecx, [si + part.lba] - mov al, '*' ; sector read error indicator - call putchar + push ecx - xor ax, ax ; Reset the drive and retry the read - int 0x13 + push es ; offset 6, memory segment - mov cx, bp - loop read_sector_1 ; retry while cx is not zero + push bx ; offset 4, memory offset - stc ; set carry flag to indicate error - pop cx - ret + xor ah, ah ; offset 3, must be 0 + push ax ; offset 2, number of sectors -read_sector_ok - mov al, '.' ; successful sector read indicator - call putchar - clc ; success, clear carry flag - pop cx - ret +%if DEBUG + push ax + DebugChar('-') ; absolute sector offset + mov eax, ecx + call print_hex + DebugChar('=') ; count + pop ax + call print_hex +%endif + + push WORD 16 ; offset 0-1, packet size -;-------------------------------------------------------------------------- -; Given the current CHS position stored in [chs_cx][chs_dx], update -; it so that the value in [chs_cx][chs_dx] points to the following -; sector. ; -; Arguments: -; [chs_cx][chs_dx] - CHS position + ; INT13 Func 42 - Extended Read Sectors ; -; [max_sectors] and [max_heads] must be valid. + ; Arguments: + ; AH = 0x42 + ; DL = drive number (80h + drive unit) + ; DS:SI = pointer to Disk Address Packet ; -; Caller's ax and bx registers are preserved. + ; Returns: + ; AH = return status (sucess is 0) + ; carry = 0 success + ; 1 error ; -next_sector - push ax - push bx - - ; Extract the CHS values from the packed register values in memory. + ; Packet offset 2 indicates the number of sectors read + ; successfully. ; - mov al, [chs_cx] - and al, 0x3f ; al <- sector number (1-63) - - mov bx, [chs_cx] - rol bl, 2 - ror bx, 8 - and bx, 0x03ff ; bx <- cylinder number - - mov ah, [chs_dx + 1] ; ah <- head number - - inc al ; Increment CHS by one sector. - cmp al, [max_sectors] - jbe next_sector_done - - inc ah - cmp ah, [max_heads] - jbe next_sector_new_head - - inc bx +; mov dl, kDriveNumber + mov si, sp + mov ah, 0x42 + int 0x13 -next_sector_new_cyl - xor ah, ah ; head number starts at 0 + jnc .exit -next_sector_new_head - mov al, 1 ; sector number starts at 1 +%if DEBUG + call print_hex +%endif + DebugChar('R') ; indicate INT13/F42 error -next_sector_done - ; Reassemble the CHS values back into the packed representation - ; in memory. ; - mov [chs_cx + 1], bl ; lower 8-bits of the 10-bit cylinder - ror bh, 2 - or bh, al - mov [chs_cx], bh ; cylinder & sector number - mov [chs_dx + 1], ah ; head number + ; Issue a disk reset on error. + ; Should this be changed to Func 0xD to skip the diskette controller + ; reset? + ; + xor ax, ax ; Func 0 + int 0x13 ; INT 13 + stc ; set carry to indicate error - pop bx - pop ax +.exit: + mov sp, bp ; restore SP + popad ret -;-------------------------------------------------------------------------- +%if 0 +;------------------------------------------------------------------------- ; Write a string to the console. ; ; Arguments: -; ds:si pointer to a NULL terminated string. +; DS:SI pointer to a NULL terminated string. ; -; The following registers are modified: -; ax, bx, si +; Clobber list: +; AX, BX, SI ; -message - mov bx, 1 ; bh=0, bl=1 (blue) +print_string + mov bx, 1 ; BH=0, BL=1 (blue) cld ; increment SI after each lodsb call -message_loop - lodsb ; load a byte from DS:SI into al +.loop + lodsb ; load a byte from DS:SI into AL cmp al, 0 ; Is it a NULL? - je message_done ; yes, all done - mov ah, 0xE ; bios INT10 Func 0xE - int 0x10 ; bios display a byte in tty mode - jmp short message_loop -message_done + je .exit ; yes, all done + mov ah, 0xE ; INT10 Func 0xE + int 0x10 ; display byte in tty mode + jmp short .loop +.exit ret +%endif + +%if DEBUG ;-------------------------------------------------------------------------- ; Write a ASCII character to the console. ; ; Arguments: -; al contains the ASCII character printed. -; -putchar - push bx - mov bx, 1 ; bh=0, bl=1 (blue) - mov ah, 0x0e ; bios int 10, function 0xe - int 0x10 ; bios display a byte in tty mode - pop bx +; AL = ASCII character. +; +print_char + pushad + mov bx, 1 ; BH=0, BL=1 (blue) + mov ah, 0x0e ; bios INT 10, Function 0xE + int 0x10 ; display byte in tty mode + popad ret -%IF DEBUG -;========================================================================== -; DEBUG FUNCTION START -; -; If DEBUG is set to 1, this booter will become too large for the MBR, -; but it will still be less than 510 bytes, which is fine for a partition's -; boot sector. -;========================================================================== - ;-------------------------------------------------------------------------- ; Write a variable number of spaces to the console. ; ; Arguments: -; al number to spaces to display +; AL = number to spaces. ; -putspace - push cx +print_spaces: + pushad xor cx, cx - mov cl, al ; use cx as the loop counter + mov cl, al ; use CX as the loop counter mov al, ' ' ; character to print -putspace_loop - jcxz putspace_done - call putchar - loop putspace_loop -putspace_done - pop cx +.loop: + jcxz .exit + call print_char + loop .loop +.exit: + popad ret ;-------------------------------------------------------------------------- -; Write the hex byte value to the console. +; Write the byte value to the console in hex. ; ; Arguments: -; al contains the byte to be displayed. e.g. if al is 0x3f, then 3F -; will be displayed on screen. +; AL = Value to be displayed in hex. ; -display_byte +print_hex: + pushad + mov cx, WORD 4 + bswap eax +.loop push ax ror al, 4 - call display_nibble ; display upper nibble + call print_nibble ; display upper nibble pop ax - call display_nibble ; display lower nibble - ; - mov ax, 10 ; display carriage return - call putchar - mov ax, 13 - call putchar + call print_nibble ; display lower nibble + ror eax, 8 + loop .loop + + mov al, 10 ; carriage return + call print_char + mov al, 13 + call print_char + popad ret -display_nibble +print_nibble: and al, 0x0f add al, '0' cmp al, '9' - jna display_nibble_1 + jna .print_ascii add al, 'A' - '9' - 1 -display_nibble_1 - call putchar +.print_ascii: + call print_char ret -;========================================================================== -; DEBUG FUNCTION END -;========================================================================== -%ENDIF - -; Disk parameters gathered through INT13/F8 call. -; -max_sectors db 0 ; number of sectors per track -max_heads db 0 ; number of heads +getc: + mov ah, 0 + int 0x16 + ret -; Parameters to our load function. -; -chs_cx dw 0x0001 ; cx register for INT13/F2 call -chs_dx dw 0x0000 ; dx register for INT13/F2 call +%endif ; DEBUG ;-------------------------------------------------------------------------- ; NULL terminated strings. ; -load_error db 10, 13, 'Load Error', 0 +; boot_error_str db 10, 13, 'Error', 0 ;-------------------------------------------------------------------------- ; Pad the rest of the 512 byte sized booter with zeroes. The last @@ -567,9 +537,9 @@ load_error db 10, 13, 'Load Error', 0 ; that the 'times' argument is negative. pad_boot - times 446-($-$$) db 0 + times 510-($-$$) db 0 -%IF BOOTDEV = FLOPPY +%ifdef FLOPPY ;-------------------------------------------------------------------------- ; Put fake partition entries for the bootable floppy image ; @@ -588,10 +558,10 @@ times 3 db 0x00 ; ignore head/cyl/sect #'s part2relsect dd 0x00000082 ; start after booter ; part2numsect dd 0x00000abe ; 1.44MB - 65K part2numsect dd 0x000015fe ; 2.88MB - 65K -%ENDIF +%endif pad_table_and_sig times 510-($-$$) db 0 - dw BOOTSIG + dw kBootSignature END diff --git a/i386/boot1/gonext.c b/i386/boot1/gonext.c index 0fb0d8b..4fa31aa 100644 --- a/i386/boot1/gonext.c +++ b/i386/boot1/gonext.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/boot1/nullboot1.s b/i386/boot1/nullboot1.s index 7ec00d4..7e08c90 100644 --- a/i386/boot1/nullboot1.s +++ b/i386/boot1/nullboot1.s @@ -2,21 +2,22 @@ ; ; @APPLE_LICENSE_HEADER_START@ ; -; Portions Copyright (c) 1999 Apple Computer, Inc. All Rights -; Reserved. This file contains Original Code and/or Modifications of -; Original Code as defined in and that are subject to the Apple Public -; Source License Version 1.1 (the "License"). You may not use this file -; except in compliance with the License. Please obtain a copy of the -; License at http://www.apple.com/publicsource and read it before using -; this file. +; Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. +; +; This file contains Original Code and/or Modifications of Original Code +; as defined in and that are subject to the Apple Public Source License +; Version 2.0 (the 'License'). You may not use this file except in +; compliance with the License. Please obtain a copy of the License at +; http://www.opensource.apple.com/apsl/ and read it before using this +; file. ; ; The Original Code and all software distributed under the License are -; distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER +; distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ; EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ; INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, -; FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the -; License for the specific language governing rights and limitations -; under the License. +; FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. +; Please see the License for the specific language governing rights and +; limitations under the License. ; ; @APPLE_LICENSE_HEADER_END@ ; diff --git a/i386/boot1/replace.c b/i386/boot1/replace.c index 2d483fd..ac8e288 100644 --- a/i386/boot1/replace.c +++ b/i386/boot1/replace.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/boot1u/Makefile b/i386/boot1u/Makefile new file mode 100644 index 0000000..565c3b0 --- /dev/null +++ b/i386/boot1u/Makefile @@ -0,0 +1,103 @@ +DIR = boot1u +include ../MakePaths.dir + +# +# these paths are only valid in subdirectories of this directory +# +OBJROOT=../../obj/i386/boot1u +SYMROOT=../../sym/i386 +DSTROOT=../../dst/i386 +SRCROOT=/tmp + +OPTIM = -Os +CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -Werror \ + -fno-builtin -DSAIO_INTERNAL_USER -static \ + -fomit-frame-pointer -mpreferred-stack-boundary=2 \ + -fno-align-functions +DEFINES= +CONFIG = hd +SYMDIR = $(SYMROOT) +LIBSADIR = ../libsa +LIBSAIODIR = ../libsaio +UTILDIR = ../util +INC = -I. -I.. -I$(SYMDIR) -I$(LIBSADIR) -I$(LIBSAIODIR) -I$(UTILDIR) +ifneq "" "$(wildcard /bin/mkdirs)" + MKDIRS = /bin/mkdirs +else + MKDIRS = /bin/mkdir -p +endif +AS = as +LD = ld +LIBS= -L$(SYMDIR) -lsaio -lsa +#LIBS= -L$(SYMDIR) + +OTHER_FILES = + +INSTALLDIR = $(DSTROOT)/usr/standalone/i386 +VPATH = $(OBJROOT):$(SYMROOT) + +# The ordering is important; +# boot1u.o must be first. +#OBJS = $(OBJROOT)/boot1u.o $(OBJROOT)/asm.o $(OBJROOT)/bios.o $(OBJROOT)/boot.o $(OBJROOT)/string.o $(OBJROOT)/malloc.o $(OBJROOT)/disk.o $(OBJROOT)/put.o +OBJS = boot1u.o asm.o bios.o boot.o string.o malloc.o disk.o put.o + +# OBJS += $(OBJROOT)/../libsaio/ufs.o \ +# $(OBJROOT)/../libsaio/cache.o \ +# $(OBJROOT)/../libsaio/ufs_byteorder.o \ +# $(OBJROOT)/../libsaio/table.o \ +# $(OBJROOT)/../libsaio/misc.o + +# OBJS += $(OBJROOT)/../libsa/prf.o $(OBJROOT)/../libsa/printf.o + +# We get the following object files out of libsaio: +# ufs.o cache.o ufs_byteorder.o table.o +# and these from libsa: +# prf.o printf.o +# If they increase in size, or if other accidental dependencies +# are created with other .o files in libsaio.a, then boot1u can get too large. +# Use care in changing the library. + +UTILDIR = ../util +SFILES = boot1u.s bios.s asm.s +CFILES = boot.c disk.c string.c put.c malloc.c +HFILES = +OTHERFILES = Makefile +ALLSRC = $(FOREIGNSRC) $(FOREIGNBIN) $(SFILES) $(CFILES) \ + $(HFILES) $(OTHERFILES) +DIRS_NEEDED = $(OBJROOT) $(SYMROOT) +BOOT1UADDR = 10200 +MAXBOOTSIZE = 7680 +NASM = $(SYMROOT)/nasm + +all: $(DIRS_NEEDED) boot1u0 boot1u + +boot1u0: boot1u0.s Makefile $(NASM) + $(NASM) boot1u0.s -o $(SYMROOT)/$@ + +boot1u: $(SYMROOT)/machOconv $(OBJS) boot1u0 + $(LD) -static -preload -segaddr __TEXT $(BOOT1UADDR) -segalign 20 \ + -o $(SYMROOT)/boot1u.sys $(OBJS) $(LIBS) -lcc_kext + size $(SYMROOT)/boot1u.sys + $(SYMROOT)/machOconv $(SYMROOT)/boot1u.sys $(SYMROOT)/boot1u.post + ls -l $(SYMROOT)/boot1u.post + @( size=`ls -l $(SYMROOT)/boot1u.post | awk '{ print $$5}'` ; \ + if expr "$$size" ">" "$(MAXBOOTSIZE)" > /dev/null ;\ + then \ + echo "Booter executable larger than $(MAXBOOTSIZE) bytes" ;\ + exit 1;\ + fi) + cat $(SYMROOT)/boot1u0 $(SYMROOT)/boot1u.post | dd obs=8k conv=osync of=$(SYMROOT)/boot1u + rm $(SYMROOT)/boot1u.post + + +install_i386:: all $(INSTALLDIR) + cp $(SYMROOT)/boot1u $(OTHER_FILES) $(INSTALLDIR) + cd $(INSTALLDIR); chmod u+w boot1u $(OTHER_FILES) + +clean:: + rm -f $(SYMROOT)/boot1u.sys $(SYMROOT)/boot1u + +include ../MakeInc.dir + +#dependencies +-include $(OBJROOT)/Makedep diff --git a/i386/boot1u/asm.s b/i386/boot1u/asm.s new file mode 100644 index 0000000..67e4622 --- /dev/null +++ b/i386/boot1u/asm.s @@ -0,0 +1,439 @@ +/* + * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Mach Operating System + * Copyright (c) 1990 Carnegie-Mellon University + * Copyright (c) 1989 Carnegie-Mellon University + * All rights reserved. The CMU software License Agreement specifies + * the terms and conditions for use and redistribution. + */ +/* + * HISTORY + * $Log: asm.s,v $ + * Revision 1.2 2003/04/08 20:28:27 curtisg + * Merged PR-3073653, PR-3172003. + * + * Revision 1.1.2.1 2003/04/05 00:48:42 curtisg + * Changes for 3073653. + * + * Revision 1.4 2002/10/02 00:06:18 curtisg + * Integrating PR-3032510. + * + * Revision 1.3.6.1 2002/08/30 21:16:29 curtisg + * KERNBOOTSTRUCT is going away in favor of KernelBootArgs_t in . + * + * Revision 1.3 2002/07/09 14:06:21 jliu + * Merging changes from PR-2954224 branch in boot/i386. + * + * Revision 1.2.30.1 2002/07/05 16:24:51 jliu + * Merged UFS/HFS/HFS+ filesystem support from BootX. + * Moved boot2 load address due to increased size. boot0/boot1 also changed. + * Updated boot graphics and CLUT. + * Added support to chain load foreign booters. + * Fixed param passing bug in network loader. + * Misc cleanup in libsaio. + * + * Revision 1.2 2000/05/23 23:01:11 lindak + * Merged PR-2309530 into Kodiak (liu i386 booter: does not support label-less + * ufs partitions) + * + * Revision 1.1.1.2.4.1 2000/05/13 17:07:39 jliu + * New boot0 (boot1 has been deprecated). Booter must now reside in its own partition, no disk label required. + * + * Revision 1.1.1.2 1999/08/04 21:16:57 wsanchez + * Impoort of boot-66 + * + * Revision 1.3 1999/08/04 21:12:12 wsanchez + * Update APSL + * + * Revision 1.2 1999/03/25 05:48:30 wsanchez + * Add APL. + * Remove unused gzip code. + * Remove unused Adobe fonts. + * + * Revision 1.1.1.1.66.2 1999/03/16 16:08:54 wsanchez + * Substitute License + * + * Revision 1.1.1.1.66.1 1999/03/16 07:33:21 wsanchez + * Add APL + * + * Revision 1.1.1.1 1997/12/05 21:57:57 wsanchez + * Import of boot-25 (~mwatson) + * + * Revision 2.1.1.2 90//03//22 17:59:50 rvb + * Added _sp() => where is the stack at. [kupfer] + * + * Revision 2.1.1.1 90//02//09 17:25:04 rvb + * Add Intel copyright + * [90//02//09 rvb] + * + */ + + +// INTEL CORPORATION PROPRIETARY INFORMATION +// +// This software is supplied under the terms of a license agreement or +// nondisclosure agreement with Intel Corporation and may not be copied +// nor disclosed except in accordance with the terms of that agreement. +// +// Copyright 1988 Intel Corporation +// Copyright 1988, 1989 by Intel Corporation +// + +#include +#include "memory.h" + +#define data32 .byte 0x66 +#define addr32 .byte 0x67 + + .file "asm.s" + +CR0_PE_ON = 0x1 +CR0_PE_OFF = 0x7ffffffe + +STACK32_BASE = ADDR32(STACK_SEG, 0) +STACK16_SEG = STACK_SEG +CODE32_BASE = ADDR32(BOOT1U_SEG, 0) +CODE16_SEG = BOOT1U_SEG + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// Pointer to 6-bytes in memory that contains the base address and the limit +// (size of GDT table in bytes) of the GDT. The LGDT is the only instruction +// that directly loads a linear address (not a segment relative address) and +// a limit in protected mode. + +.globl _Gdtr + .data + .align 2, 0x90 +_Gdtr: + .word GDTLIMIT + .long vtop(_Gdt) + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// Data area for __switch_stack. +// +save_sp: .long STACK_OFS +save_ss: .long STACK_SEG + + .text + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// real_to_prot() +// +// Transfer from real mode to protected mode. +// Preserves all registers except EAX. +// +LABEL(__real_to_prot) + + // Interrupts are disabled in protected mode. + + cli + + // Load the Global Descriptor Table Register (GDTR). + + addr32 + data32 + lgdt OFFSET1U16(_Gdtr) + + // Enter protected mode by setting the PE bit in CR0. + + mov %cr0, %eax + data32 + or $CR0_PE_ON, %eax + mov %eax, %cr0 + + // Make intrasegment jump to flush the processor pipeline and + // reload CS register. + + data32 + ljmp $0x08, $xprot + +xprot: + // we are in USE32 mode now + // set up the protected mode segment registers : DS, SS, ES, FS, GS + + mov $0x10, %eax + movw %ax, %ds + movw %ax, %ss + movw %ax, %es + movw %ax, %fs + movw %ax, %gs + + // Convert STACK_SEG:SP to 32-bit linear stack pointer. + + movzwl %sp, %eax + addl $STACK32_BASE, %eax + movl %eax, %esp + + // Convert STACK_SEG:BP to 32-bit linear base pointer. + + movzwl %bp, %eax + addl $STACK32_BASE, %eax + movl %eax, %ebp + + // Modify the caller's return address on the stack from + // segment offset to linear address. + + popl %eax + addl $CODE32_BASE, %eax + pushl %eax + + ret + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// prot_to_real() +// +// Transfer from protected mode to real mode. +// Preserves all registers except EAX. +// +LABEL(__prot_to_real) + + // Set up segment registers appropriate for real mode. + + movw $0x30, %ax + movw %ax, %ds + movw %ax, %es + movw %ax, %fs + movw %ax, %gs + movw %ax, %ss + + ljmp $0x18, $x16 // change to USE16 mode + +x16: + mov %cr0, %eax // clear the PE bit of CR0 + data32 + and $CR0_PE_OFF, %eax + mov %eax, %cr0 + + // make intersegment jmp to flush the processor pipeline + // and reload CS register + + data32 + ljmp $CODE16_SEG, $xreal - CODE32_BASE + +xreal: + // we are in real mode now + // set up the real mode segment registers : DS, DS, ES, FS, GS + + movw %cs, %ax + movw %ax, %ds + movw %ax, %es + movw %ax, %fs + movw %ax, %gs + + // load stack segment register SS. + + data32 + movl $STACK16_SEG, %eax + movw %ax, %ss + + // clear top 16-bits of ESP and EBP. + + data32 + movzwl %sp, %esp + data32 + movzwl %bp, %ebp + + // Modify caller's return address on the stack + // from linear address to segment offset. + + data32 + popl %eax + data32 + movzwl %ax, %eax + data32 + pushl %eax + + // Reenable maskable interrupts. + + sti + + data32 + ret + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// halt() +// +LABEL(_halt) + hlt + jmp _halt + +#if 0 +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// startprog(phyaddr, arg) +// Start the program on protected mode where phyaddr is the entry point. +// Passes arg to the program in %eax. +// +LABEL(_startprog) + push %ebp + mov %esp, %ebp + + mov 0xc(%ebp), %eax // argument to program + mov 0x8(%ebp), %ecx // entry offset + mov $0x28, %ebx // segment + push %ebx + push %ecx + + // set up %ds and %es + + mov $0x20, %ebx + movw %bx, %ds + movw %bx, %es + + lret +#endif + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// Returns the current stack pointer. +// +LABEL(__sp) + mov %esp, %eax + ret + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// Returns the current frame pointer. +// +LABEL(__bp) + mov %ebp, %eax + ret + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// switch_stack() +// +// Switches stack pointer between SS:SP and memory save_ss:save_sp. +// Call this function from real mode only!!! +// +// AX, DI, and SI are clobbered. +// +LABEL(__switch_stack) + popl %eax # save return address + popl %edi # discard upper 16-bit + + data32 + addr32 + movl OFFSET1U16(save_ss), %esi # new SS to SI + + data32 + addr32 + movl OFFSET1U16(save_sp), %edi # new SP to DI + + addr32 + mov %ss, OFFSET1U16(save_ss) # save current SS to memory + + data32 + addr32 + movl %esp, OFFSET1U16(save_sp) # save current SP to memory + + cli + mov %si, %ss # switch stack + mov %di, %sp + sti + + pushl %eax # push IP of caller onto the new stack + + xorl %eax, %eax + xorl %esi, %esi + xorl %edi, %edi + + ret + +#if 0 +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// loader() +// +// Issue a request to the network loader. +// +LABEL(_loader) + enter $0, $0 + pushal + + # + # Pass a far pointer to the command structure + # to the INT call through DX:CX. + # + # The command code is in BX. + # + + movw 8(%ebp), %bx # 8[EBP] = command code + movw 12(%ebp), %cx # 12[EBP] = command structure offset + movw 14(%ebp), %dx # 14[EBP] = command structure segment + + call __prot_to_real # Revert to real mode + + ###### Real Mode Begin ###### + + data32 + call __switch_stack # Switch to NBP stack + + int $0x2b # Call NBP + + data32 + call __switch_stack # Restore stack + + data32 + call __real_to_prot # Back to protected mode + + ###### Real Mode End ###### + + popal + leave + ret +#endif + +#if 0 +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// pcpy(src, dst, cnt) +// where src is a virtual address and dst is a physical address +// +LABEL(_pcpy) + push %ebp + mov %esp, %ebp + push %es + push %esi + push %edi + push %ecx + + cld + + // set %es to point at the flat segment + + mov $0x20, %eax + movw %ax , %es + + mov 0x8(%ebp), %esi // source + mov 0xc(%ebp), %edi // destination + mov 0x10(%ebp), %ecx // count + + rep + movsb + + pop %ecx + pop %edi + pop %esi + pop %es + pop %ebp + + ret +#endif diff --git a/i386/boot1u/bios.s b/i386/boot1u/bios.s new file mode 100644 index 0000000..07afc12 --- /dev/null +++ b/i386/boot1u/bios.s @@ -0,0 +1,134 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright 1993 NeXT Computer, Inc. + * All rights reserved. + * + * Harness for calling real-mode BIOS functions. + */ + +#include +#include "memory.h" + +#define data32 .byte 0x66 +#define addr32 .byte 0x67 + +#define O_INT 0 +#define O_EAX 4 +#define O_EBX 8 +#define O_ECX 12 +#define O_EDX 16 +#define O_EDI 20 +#define O_ESI 24 +#define O_EBP 28 +#define O_CS 32 +#define O_DS 34 +#define O_ES 36 +#define O_FLG 38 + +.data + .lcomm save_eax, 4,2 + .lcomm save_edx, 4,2 + .lcomm save_es, 2,1 + .lcomm save_flag, 2,1 + .lcomm new_eax, 4,2 + .lcomm new_edx, 4,2 + .lcomm new_es, 2,1 + +.text + +/*============================================================================ + * Call real-mode BIOS INT functions. + * + */ +LABEL(_bios) + enter $0, $0 + pushal + + movl 8(%ebp), %edx // address of save area + movb O_INT(%edx), %al // save int number + movb %al, do_int+1 + + movl O_EBX(%edx), %ebx + movl O_ECX(%edx), %ecx + movl O_EDI(%edx), %edi + movl O_ESI(%edx), %esi + movl O_EBP(%edx), %ebp + movl %edx, save_edx + movl O_EAX(%edx), %eax + movl %eax, new_eax + movl O_EDX(%edx), %eax + movl %eax, new_edx + movw O_ES(%edx), %ax + movl %ax, new_es + + call __prot_to_real + + data32 + addr32 + mov OFFSET1U16(new_eax), %eax + data32 + addr32 + mov OFFSET1U16(new_edx), %edx + data32 + addr32 + mov OFFSET1U16(new_es), %es + +do_int: + int $0x00 + pushf + data32 + addr32 + movl %eax, OFFSET1U16(save_eax) + popl %eax // actually pop %ax + addr32 + movl %eax, OFFSET1U16(save_flag) // actually movw + mov %es, %ax + addr32 + movl %eax, OFFSET1U16(save_es) // actually movw + data32 + call __real_to_prot + + movl %edx, new_edx // save new edx before clobbering + movl save_edx, %edx + movl new_edx, %eax // now move it into buffer + movl %eax, O_EDX(%edx) + movl save_eax, %eax + movl %eax, O_EAX(%edx) + movw save_es, %ax + movw %ax, O_ES(%edx) + movw save_flag, %ax + movw %ax, O_FLG(%edx) + movl %ebx, O_EBX(%edx) + movl %ecx, O_ECX(%edx) + movl %edi, O_EDI(%edx) + movl %esi, O_ESI(%edx) + movl %ebp, O_EBP(%edx) + + popal + leave + + ret + diff --git a/i386/boot1u/boot.c b/i386/boot1u/boot.c new file mode 100644 index 0000000..69859b2 --- /dev/null +++ b/i386/boot1u/boot.c @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#include +#include +#include +#include + +#include +#include + +#include "boot1u.h" +#include "disk.h" + +#include + +void *gFSLoadAddress; + +//#define BOOT_FILE "/foo" +#define BOOT_FILE "/usr/standalone/i386/boot" + + +//========================================================================== +// Zero the BSS. + +static void zeroBSS() +{ + extern char _DATA__bss__begin, _DATA__bss__end; + extern char _DATA__common__begin, _DATA__common__end; + + bzero( &_DATA__bss__begin, + (&_DATA__bss__end - &_DATA__bss__begin) ); + + bzero( &_DATA__common__begin, + (&_DATA__common__end - &_DATA__common__begin) ); +} + +struct BootVolume bv; + +extern char chainbootdev; + +void boot(int biosdev, void *partPtr) +{ + struct fdisk_part part; + int cc; + + zeroBSS(); + + // printf("Hello, world.\n"); + + // Enable A20 gate before accessing memory above 1Mb. + enableA20(); + + biosdev = biosdev & 0xFF; + chainbootdev = biosdev; + + /* Don't believe the passed-in partition table */ + cc = findUFSPartition(biosdev, &part); + if (cc<0) { + printf("No UFS partition\n"); + halt(); + } + + initUFSBVRef(&bv, biosdev, &part); + + gFSLoadAddress = (void *)BOOT2_ADDR; + cc = UFSLoadFile(&bv, BOOT_FILE); + if (cc < 0) { + printf("Could not load" BOOT_FILE "\n"); + halt(); + } + // Return to execute booter +} diff --git a/i386/boot1u/boot1u.h b/i386/boot1u/boot1u.h new file mode 100644 index 0000000..8f74994 --- /dev/null +++ b/i386/boot1u/boot1u.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#define bcopy(src, dst, len) memcpy((dst), (src), (len)) +#define bzero(dst, len) memset((dst),'\0', (len)) diff --git a/i386/boot1u/boot1u.s b/i386/boot1u/boot1u.s new file mode 100644 index 0000000..8962aa1 --- /dev/null +++ b/i386/boot1u/boot1u.s @@ -0,0 +1,112 @@ +/* + * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Mach Operating System + * Copyright (c) 1990 Carnegie-Mellon University + * Copyright (c) 1989 Carnegie-Mellon University + * All rights reserved. The CMU software License Agreement specifies + * the terms and conditions for use and redistribution. + */ + +/* + * bootu() -- second stage boot. + * + * This function must be located at 0:BOOTER_ADDR and will be called + * by boot1 or by NBP. + */ + +#include +#include "memory.h" + +#define data32 .byte 0x66 +#define addr32 .byte 0x67 +#define retf .byte 0xcb + + .file "bootu.s" + + .data + +EXPORT(_chainbootdev) .byte 0x80 +EXPORT(_chainbootflag) .byte 0x00 + +.text + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Booter entry point. Called by the MBR booter. +# This routine must be the first in the TEXT segment. +# +# Arguments: +# DL = Boot drive number +# SI = Pointer to partition table entry. +# +LABEL(bootu) + pushl %ecx # Save general purpose registers + pushl %ebx + pushl %ebp + pushl %esi + pushl %edi + push %ds # Save DS, ES + push %es + + mov %cs, %ax # Update segment registers. + mov %ax, %ds # Set DS and ES to match CS + mov %ax, %es + + xor %ebx, %ebx + mov %si, %bx # save si + + data32 + call __switch_stack # Switch to new stack + + data32 + call __real_to_prot # Enter protected mode. + + # We are now in 32-bit protected mode. + # Transfer execution to C by calling boot(). + + pushl %ebx + pushl %edx # bootdev + call _boot + +start_boot2: + xorl %edx, %edx + movb _chainbootdev, %dl # Setup DL with the BIOS device number + + call __prot_to_real # Back to real mode. + + data32 + call __switch_stack # Restore original stack + + pop %es # Restore original ES and DS + pop %ds + popl %edi # Restore all general purpose registers + popl %esi # except EAX. + popl %ebp + popl %ebx + popl %ecx + + data32 + ljmp $0x2000, $0x0200 # Jump to boot code already in memory + diff --git a/i386/boot1u/boot1u0.s b/i386/boot1u/boot1u0.s new file mode 100644 index 0000000..ed93d68 --- /dev/null +++ b/i386/boot1u/boot1u0.s @@ -0,0 +1,707 @@ +; Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. +; +; @APPLE_LICENSE_HEADER_START@ +; +; Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. +; +; This file contains Original Code and/or Modifications of Original Code +; as defined in and that are subject to the Apple Public Source License +; Version 2.0 (the 'License'). You may not use this file except in +; compliance with the License. Please obtain a copy of the License at +; http://www.opensource.apple.com/apsl/ and read it before using this +; file. +; +; The Original Code and all software distributed under the License are +; distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER +; EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, +; INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, +; FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. +; Please see the License for the specific language governing rights and +; limitations under the License. +; +; @APPLE_LICENSE_HEADER_END@ +; +; Boot Loader: boot0 +; +; A small boot sector program written in x86 assembly whose only +; responsibility is to locate the booter partition, load the +; booter into memory, and jump to the booter's entry point. +; The booter partition can be a primary or a logical partition. +; +; This boot loader can be placed at any of the following places: +; 1. Master Boot Record (MBR) +; 2. Boot sector of an extended partition +; 3. Boot sector of a primary partition +; 4. Boot sector of a logical partition +; +; In order to coexist with a fdisk partition table (64 bytes), and +; leave room for a two byte signature (0xAA55) in the end, boot0 is +; restricted to 446 bytes (512 - 64 - 2). If boot0 did not have to +; live in the MBR, then we would have 510 bytes to work with. +; +; boot0 is always loaded by the BIOS or another booter to 0:7C00h. +; +; This code is written for the NASM assembler. +; nasm boot0.s -o boot0 + + +; +; Set to 1 to enable obscure debug messages. +; +DEBUG EQU 0 + +; +; Set to 1 to support loading the booter (boot2) from a +; logical partition. +; +EXT_PART_SUPPORT EQU 1 + +; +; Various constants. +; +kBoot0Segment EQU 0x0000 +kBoot0Stack EQU 0xFFF0 ; boot0 stack pointer +kBoot0LoadAddr EQU 0x7C00 ; boot0 load address +kBoot0RelocAddr EQU 0xE000 ; boot0 relocated address + +kMBRBuffer EQU 0x1000 ; MBR buffer address +kExtBuffer EQU 0x1200 ; EXT boot block buffer address + +kPartTableOffset EQU 0x1be +kMBRPartTable EQU kMBRBuffer + kPartTableOffset +kExtPartTable EQU kExtBuffer + kPartTableOffset + +kBoot1uSectors EQU 16 ; sectors to load for boot2 +kBoot1uAddress EQU 0x0000 ; boot2 load address +kBoot1uSegment EQU 0x1000 ; boot2 load segment + +kSectorBytes EQU 512 ; sector size in bytes +kBootSignature EQU 0xAA55 ; boot sector signature + +kPartCount EQU 4 ; number of paritions per table +kPartTypeBoot EQU 0xab ; boot2 partition type +kPartTypeUFS EQU 0xa8 ; +kPartTypeExtDOS EQU 0x05 ; DOS extended partition type +kPartTypeExtWin EQU 0x0f ; Windows extended partition type +kPartTypeExtLinux EQU 0x85 ; Linux extended partition type +kPartActive EQU 0x80 + +%ifdef FLOPPY +kDriveNumber EQU 0x00 +%else +kDriveNumber EQU 0x80 +%endif + +; +; In memory variables. +; +ebios_lba dd 0 ; starting LBA of the intial extended partition. +ebios_present db 0 ; 1 if EBIOS is supported, 0 otherwise. + +; +; Format of fdisk partition entry. +; +; The symbol 'part_size' is automatically defined as an `EQU' +; giving the size of the structure. +; + struc part +.bootid: resb 1 ; bootable or not +.head: resb 1 ; starting head, sector, cylinder +.sect: resb 1 ; +.cyl: resb 1 ; +.type: resb 1 ; partition type +.endhead resb 1 ; ending head, sector, cylinder +.endsect: resb 1 ; +.endcyl: resb 1 ; +.lba: resd 1 ; starting lba +.sectors resd 1 ; size in sectors + endstruc + +; +; Macros. +; +%macro DebugCharMacro 1 + mov al, %1 + call print_char +%endmacro + +%if DEBUG +%define DebugChar(x) DebugCharMacro x +%else +%define DebugChar(x) +%endif + +;-------------------------------------------------------------------------- +; Start of text segment. + + SEGMENT .text + + ORG 0xE000 ; must match kBoot0RelocAddr + +;-------------------------------------------------------------------------- +; Boot code is loaded at 0:7C00h. +; +start + ; + ; Set up the stack to grow down from kBoot0Segment:kBoot0Stack. + ; Interrupts should be off while the stack is being manipulated. + ; + cli ; interrupts off + xor ax, ax ; zero ax + mov ss, ax ; ss <- 0 + mov sp, kBoot0Stack ; sp <- top of stack + sti ; reenable interrupts + + mov es, ax ; es <- 0 + mov ds, ax ; ds <- 0 + + ; + ; Relocate boot0 code. + ; + mov si, kBoot0LoadAddr ; si <- source + mov di, kBoot0RelocAddr ; di <- destination + ; + cld ; auto-increment SI and/or DI registers + mov cx, kSectorBytes/2 ; copy 256 words + repnz movsw ; repeat string move (word) operation + + ; Code relocated, jump to start_reloc in relocated location. + ; + jmp 0:start_reloc + +;-------------------------------------------------------------------------- +; Start execution from the relocated location. +; +start_reloc: + + DebugChar('*') + + mov dl, kDriveNumber ; starting BIOS drive number + +.loop: + +%if DEBUG + mov al, dl + call print_hex +%endif + + ; + ; Clear various flags in memory. + ; + xor eax, eax + mov [ebios_lba], eax ; clear EBIOS LBA offset + mov [ebios_present], al ; clear EBIOS support flag + + ; + ; Since this code may not always reside in the MBR, always start by + ; loading the MBR to kMBRBuffer. + ; + mov al, 1 ; load one sector + xor bx, bx + mov es, bx ; MBR load segment = 0 + mov bx, kMBRBuffer ; MBR load address + mov si, bx ; pointer to fake partition entry + mov WORD [si], 0x0000 ; CHS DX: head = 0 + mov WORD [si + 2], 0x0001 ; CHS CX: cylinder = 0, sector = 1 + + call load + jc .next_drive ; MBR load error + + ; + ; Check if EBIOS is supported for this hard drive. + ; + mov ah, 0x41 ; Function 0x41 + mov bx, 0x55AA ; check signature +; mov dl, kDriveNumber ; Drive number + int 0x13 + + ; + ; If successful, the return values are as follows: + ; + ; carry = 0 + ; ah = major version of EBIOS extensions (0x21 = version 1.1) + ; al = altered + ; bx = 0xAA55 + ; cx = support bits. bit 0 must be set for function 0x42. + ; + jc .ebios_check_done + cmp bx, 0xAA55 ; check BX = 0xAA55 + jnz .ebios_check_done + test cl, 0x01 ; check enhanced drive read support + setnz [ebios_present] ; EBIOS supported, set flag + DebugChar('E') ; EBIOS supported +.ebios_check_done: + + ; + ; Look for the booter partition in the MBR partition table, + ; which is at offset kMBRPartTable. + ; + mov di, kMBRPartTable ; pointer to partition table + mov ah, 0 ; initial nesting level is 0 + call find_boot ; will not return on success + +.next_drive: +;; inc dl ; next drive number +;; test dl, 0x84 ; went through all 4 drives? +;; jz .loop ; not yet, loop again + + mov si, boot_error_str + call print_string + +hang: + hlt + jmp SHORT hang + +;-------------------------------------------------------------------------- +; Find the boot partition and load the booter from the partition. +; +; Arguments: +; AH = recursion nesting level +; DL = drive number (0x80 + unit number) +; DI = pointer to fdisk partition table. +; +; Clobber list: +; AX, BX, EBP +; +find_boot: + push cx ; preserve CX and SI + push si + + ; + ; Check for boot block signature 0xAA55 following the 4 partition + ; entries. + ; + cmp WORD [di + part_size * kPartCount], kBootSignature + jne .exit ; boot signature not found + + mov si, di ; make SI a pointer to partition table + mov cx, kPartCount ; number of partition entries per table + +.loop: + ; + ; First scan through the partition table looking for the boot + ; partition. Postpone walking the extended partition chain for + ; the second pass. Do not merge the two without changing the + ; buffering scheme used to store extended partition tables. + ; +%if DEBUG + mov al, ah ; indent based on nesting level + call print_spaces + mov al, [si + part.type] ; print partition type + call print_hex +%endif + + cmp BYTE [si + part.type], kPartTypeUFS + jne .continue + cmp BYTE [si + part.bootid], kPartActive + jne .continue + + ; + ; Found boot partition, read boot1u image to memory. + ; + mov al, kBoot1uSectors + mov bx, kBoot1uSegment + mov es, bx + mov bx, kBoot1uAddress + call load ; + jc .continue ; load error, keep looking? + +DebugChar('^') + ; + ; Jump to boot1u. The drive number is already in register DL. + ; + ; The first sector loaded from the disk is reserved for the boot + ; block (boot1), adjust the jump location by adding a sector offset. + ; + jmp kBoot1uSegment:kBoot1uAddress + kSectorBytes + +.continue: + add si, part_size ; advance SI to next partition entry + loop .loop ; loop through all partition entries + +%if EXT_PART_SUPPORT + ; + ; No primary (or logical) boot partition found in the current + ; partition table. Restart and look for extended partitions. + ; + mov si, di ; make SI a pointer to partition table + mov cx, kPartCount ; number of partition entries per table + +.ext_loop: + + mov al, [si + part.type] ; AL <- partition type + + cmp al, kPartTypeExtDOS ; Extended DOS + je .ext_load + + cmp al, kPartTypeExtWin ; Extended Windows(95) + je .ext_load + + cmp al, kPartTypeExtLinux ; Extended Linux + je .ext_load + +.ext_continue: + ; + ; Advance si to the next partition entry in the extended + ; partition table. + ; + add si, part_size ; advance SI to next partition entry + loop .ext_loop ; loop through all partition entries + jmp .exit ; boot partition not found + +.ext_load: + ; + ; Setup the arguments for the load function call to bring the + ; extended partition table into memory. + ; Remember that SI points to the extended partition entry. + ; + mov al, 1 ; read 1 sector + xor bx, bx + mov es, bx ; es = 0 + mov bx, kExtBuffer ; load extended boot sector + call load + jc .ext_continue ; load error + + ; + ; The LBA address of all extended partitions is relative based + ; on the LBA address of the extended partition in the MBR, or + ; the extended partition at the head of the chain. Thus it is + ; necessary to save the LBA address of the first extended partition. + ; + or ah, ah + jnz .ext_find_boot + mov ebp, [si + part.lba] + mov [ebios_lba], ebp + +.ext_find_boot: + ; + ; Call find_boot recursively to scan through the extended partition + ; table. Load DI with a pointer to the extended table in memory. + ; + inc ah ; increment recursion level + mov di, kExtPartTable ; partition table pointer + call find_boot ; recursion... + ;dec ah + + ; + ; Since there is an "unwritten" rule that limits each partition table + ; to have 0 or 1 extended partitions, there is no point in looking for + ; any additional extended partition entries at this point. There is no + ; boot partition linked beyond the extended partition that was loaded + ; above. + ; + +%endif ; EXT_PART_SUPPORT + +.exit: + ; + ; Boot partition not found. Giving up. + ; + pop si + pop cx + ret + +;-------------------------------------------------------------------------- +; load - Load one or more sectors from a partition. +; +; Arguments: +; AL = number of 512-byte sectors to read. +; ES:BX = pointer to where the sectors should be stored. +; DL = drive number (0x80 + unit number) +; SI = pointer to the partition entry. +; +; Returns: +; CF = 0 success +; 1 error +; +load: + push cx + test BYTE [ebios_present], 1 + jz .chs + +.ebios: + mov cx, 5 ; load retry count +.ebios_loop: + call read_lba ; use INT13/F42 + jnc .exit + loop .ebios_loop + +.chs: + mov cx, 5 ; load retry count +.chs_loop: + call read_chs ; use INT13/F2 + jnc .exit + loop .chs_loop + +.exit + pop cx + ret + +;-------------------------------------------------------------------------- +; read_chs - Read sectors from a partition using CHS addressing. +; +; Arguments: +; AL = number of 512-byte sectors to read. +; ES:BX = pointer to where the sectors should be stored. +; DL = drive number (0x80 + unit number) +; SI = pointer to the partition entry. +; +; Returns: +; CF = 0 success +; 1 error +; +read_chs: + pusha ; save all registers + + ; + ; Read the CHS start values from the partition entry. + ; + mov dh, [ si + part.head ] ; drive head + mov cx, [ si + part.sect ] ; drive sector + cylinder + + ; + ; INT13 Func 2 - Read Disk Sectors + ; + ; Arguments: + ; AH = 2 + ; AL = number of sectors to read + ; CH = lowest 8 bits of the 10-bit cylinder number + ; CL = bits 6 & 7: cylinder number bits 8 and 9 + ; bits 0 - 5: starting sector number (1-63) + ; DH = starting head number (0 to 255) + ; DL = drive number (80h + drive unit) + ; es:bx = pointer where to place sectors read from disk + ; + ; Returns: + ; AH = return status (sucess is 0) + ; AL = burst error length if ah=0x11 (ECC corrected) + ; carry = 0 success + ; 1 error + ; +; mov dl, kDriveNumber + mov ah, 0x02 ; Func 2 + int 0x13 ; INT 13 + jnc .exit + + DebugChar('r') ; indicate INT13/F2 error + + ; + ; Issue a disk reset on error. + ; Should this be changed to Func 0xD to skip the diskette controller + ; reset? + ; + xor ax, ax ; Func 0 + int 0x13 ; INT 13 + stc ; set carry to indicate error + +.exit: + popa + ret + +;-------------------------------------------------------------------------- +; read_lba - Read sectors from a partition using LBA addressing. +; +; Arguments: +; AL = number of 512-byte sectors to read (valid from 1-127). +; ES:BX = pointer to where the sectors should be stored. +; DL = drive number (0x80 + unit number) +; SI = pointer to the partition entry. +; +; Returns: +; CF = 0 success +; 1 error +; +read_lba: + pusha ; save all registers + mov bp, sp ; save current SP + + ; + ; Create the Disk Address Packet structure for the + ; INT13/F42 (Extended Read Sectors) on the stack. + ; + + ; push DWORD 0 ; offset 12, upper 32-bit LBA + push ds ; For sake of saving memory, + push ds ; push DS register, which is 0. + + mov ecx, [ebios_lba] ; offset 8, lower 32-bit LBA + add ecx, [si + part.lba] + push ecx + + push es ; offset 6, memory segment + + push bx ; offset 4, memory offset + + xor ah, ah ; offset 3, must be 0 + push ax ; offset 2, number of sectors + + push WORD 16 ; offset 0-1, packet size + + ; + ; INT13 Func 42 - Extended Read Sectors + ; + ; Arguments: + ; AH = 0x42 + ; DL = drive number (80h + drive unit) + ; DS:SI = pointer to Disk Address Packet + ; + ; Returns: + ; AH = return status (sucess is 0) + ; carry = 0 success + ; 1 error + ; + ; Packet offset 2 indicates the number of sectors read + ; successfully. + ; +; mov dl, kDriveNumber + mov si, sp + mov ah, 0x42 + int 0x13 + + jnc .exit + + DebugChar('R') ; indicate INT13/F42 error + + ; + ; Issue a disk reset on error. + ; Should this be changed to Func 0xD to skip the diskette controller + ; reset? + ; + xor ax, ax ; Func 0 + int 0x13 ; INT 13 + stc ; set carry to indicate error + +.exit: + mov sp, bp ; restore SP + popa + ret + +;-------------------------------------------------------------------------- +; Write a string to the console. +; +; Arguments: +; DS:SI pointer to a NULL terminated string. +; +; Clobber list: +; AX, BX, SI +; +print_string + mov bx, 1 ; BH=0, BL=1 (blue) + cld ; increment SI after each lodsb call +.loop + lodsb ; load a byte from DS:SI into AL + cmp al, 0 ; Is it a NULL? + je .exit ; yes, all done + mov ah, 0xE ; INT10 Func 0xE + int 0x10 ; display byte in tty mode + jmp short .loop +.exit + ret + +%if DEBUG + +;-------------------------------------------------------------------------- +; Write a ASCII character to the console. +; +; Arguments: +; AL = ASCII character. +; +print_char + pusha + mov bx, 1 ; BH=0, BL=1 (blue) + mov ah, 0x0e ; bios INT 10, Function 0xE + int 0x10 ; display byte in tty mode + popa + ret + +;-------------------------------------------------------------------------- +; Write a variable number of spaces to the console. +; +; Arguments: +; AL = number to spaces. +; +print_spaces: + pusha + xor cx, cx + mov cl, al ; use CX as the loop counter + mov al, ' ' ; character to print +.loop: + jcxz .exit + call print_char + loop .loop +.exit: + popa + ret + +;-------------------------------------------------------------------------- +; Write the byte value to the console in hex. +; +; Arguments: +; AL = Value to be displayed in hex. +; +print_hex: + push ax + ror al, 4 + call print_nibble ; display upper nibble + pop ax + call print_nibble ; display lower nibble + + mov al, 10 ; carriage return + call print_char + mov al, 13 + call print_char + ret + +print_nibble: + and al, 0x0f + add al, '0' + cmp al, '9' + jna .print_ascii + add al, 'A' - '9' - 1 +.print_ascii: + call print_char + ret + +%endif ; DEBUG + +;-------------------------------------------------------------------------- +; NULL terminated strings. +; +boot_error_str db 10, 13, 'Error', 0 + +;-------------------------------------------------------------------------- +; Pad the rest of the 512 byte sized booter with zeroes. The last +; two bytes is the mandatory boot sector signature. +; +; If the booter code becomes too large, then nasm will complain +; that the 'times' argument is negative. + +;;pad_boot + ;; times 446-($-$$) db 0 + +%ifdef FLOPPY +;-------------------------------------------------------------------------- +; Put fake partition entries for the bootable floppy image +; +part1bootid db 0x80 ; first partition active +part1head db 0x00 ; head # +part1sect db 0x02 ; sector # (low 6 bits) +part1cyl db 0x00 ; cylinder # (+ high 2 bits of above) +part1systid db 0xab ; Apple boot partition +times 3 db 0x00 ; ignore head/cyl/sect #'s +part1relsect dd 0x00000001 ; start at sector 1 +part1numsect dd 0x00000080 ; 64K for booter +part2bootid db 0x00 ; not active +times 3 db 0x00 ; ignore head/cyl/sect #'s +part2systid db 0xa8 ; Apple UFS partition +times 3 db 0x00 ; ignore head/cyl/sect #'s +part2relsect dd 0x00000082 ; start after booter +; part2numsect dd 0x00000abe ; 1.44MB - 65K +part2numsect dd 0x000015fe ; 2.88MB - 65K +%endif + +pad_table_and_sig + times 510-($-$$) db 0 + dw kBootSignature + + END diff --git a/i386/boot1u/disk.c b/i386/boot1u/disk.c new file mode 100644 index 0000000..91436ba --- /dev/null +++ b/i386/boot1u/disk.c @@ -0,0 +1,250 @@ +/* + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#include +#include "boot1u.h" +#include +#include +#include +#include + +#include "ufs.h" + +/* + * trackbuf points to the start of the track cache. Biosread() + * will store the sectors read from disk to this memory area. + * + * biosbuf points to a sector within the track cache, and is + * updated by Biosread(). + */ +#if 0 +static const char * const trackbuf = (char *) ptov(BIOS_ADDR); +#endif +static const char * biosbuf = (char *) ptov(BIOS_ADDR); + +/* + * diskinfo unpacking. + */ +#define SPT(di) ((di) & 0xff) +#define HEADS(di) ((((di)>>8) & 0xff) + 1) +#define SPC(di) (SPT(di) * HEADS(di)) + +#define BPS 512 /* sector size of the device */ +#define N_CACHE_SECS (BIOS_LEN / BPS) +#define UFS_FRONT_PORCH 0 + +#define ECC_CORRECTED_ERR 0x11 + +//#undef DEBUG_DISK +//#define DEBUG_DISK(x) printf x + +extern void bios(biosBuf_t *bb); + +static biosBuf_t bb; +int ebiosread(int dev, long sec, int count) +{ + int i; + static struct { + unsigned char size; + unsigned char reserved; + unsigned char numblocks; + unsigned char reserved2; + unsigned short bufferOffset; + unsigned short bufferSegment; + unsigned long long startblock; + } addrpacket = {0}; + addrpacket.size = sizeof(addrpacket); + + for (i=0;;) { + bb.intno = 0x13; + bb.eax.r.h = 0x42; + bb.edx.r.l = dev; + bb.esi.rr = OFFSET((unsigned)&addrpacket); + bb.ds = SEGMENT((unsigned)&addrpacket); + addrpacket.reserved = addrpacket.reserved2 = 0; + addrpacket.numblocks = count; + addrpacket.bufferOffset = OFFSET(ptov(BIOS_ADDR)); + addrpacket.bufferSegment = SEGMENT(ptov(BIOS_ADDR)); + addrpacket.startblock = sec; + bios(&bb); + if ((bb.eax.r.h == 0x00) || (i++ >= 5)) + break; + + /* reset disk subsystem and try again */ + bb.eax.r.h = 0x00; + bios(&bb); + } + return bb.eax.r.h; +} + +//========================================================================== +// Use BIOS INT13 calls to read the sector specified. This function will +// also perform read-ahead to cache a few subsequent sector to the sector +// cache. +// +// Return: +// 0 on success, or an error code from INT13/F2 or INT13/F42 BIOS call. + +static int Biosread( int biosdev, unsigned int secno ) +{ + int rc; + + DEBUG_DISK(("Biosread dev %x sec %d \n", biosdev, secno)); + + rc = ebiosread(biosdev, secno, 1); + if (rc == ECC_CORRECTED_ERR) { + rc = 0; + } + return rc; +} + +//========================================================================== + +static int readBytes( int biosdev, unsigned int blkno, + unsigned int byteCount, void * buffer ) +{ + + char * cbuf = (char *) buffer; + int error; + int copy_len; + + DEBUG_DISK(("%s: dev %x block %x [%d] -> 0x%x...", __FUNCTION__, + biosdev, blkno, byteCount, (unsigned)cbuf)); + + for ( ; byteCount; cbuf += BPS, blkno++ ) + { + error = Biosread( biosdev, blkno ); + if ( error ) + { + DEBUG_DISK(("error\n")); + return (-1); + } + + copy_len = (byteCount > BPS) ? BPS : byteCount; + bcopy( biosbuf, cbuf, copy_len ); + byteCount -= copy_len; + } + + DEBUG_DISK(("done\n")); + + return 0; +} + +//========================================================================== + +//========================================================================== +// Handle seek request from filesystem modules. + +void diskSeek( BVRef bvr, long long position ) +{ + bvr->fs_boff = position / BPS; +} + +//========================================================================== +// Handle read request from filesystem modules. + +int diskRead( BVRef bvr, long addr, long length ) +{ + return readBytes( bvr->biosdev, + bvr->fs_boff + bvr->part_boff, + length, + (void *) addr ); +} + +int +findUFSPartition(int dev, struct fdisk_part *_fp) +{ + struct disk_blk0 *db; + struct fdisk_part *fp; + int i, cc; + unsigned long offset = 0; + + db = (struct disk_blk0 *)biosbuf; + for (i=0; iparts[i]; + DEBUG_DISK(("systid %x\n", fp->systid)); + if (fp->systid == 0xA8) { + bcopy(fp, _fp, sizeof(struct fdisk_part)); + _fp->relsect += offset; + DEBUG_DISK(("found %d\n", i)); + return 0; + } else if (fp->systid == 0x05 || + fp->systid == 0x0F || + fp->systid == 0x85) { + offset += fp->relsect; + i = -1; + continue; + } + } + return -1; +} + + +void +initUFSBVRef( BVRef bvr, int biosdev, const struct fdisk_part * part) +{ + bvr->biosdev = biosdev; + bvr->part_no = 0; + bvr->part_boff = part->relsect + UFS_FRONT_PORCH/BPS, + bvr->part_type = part->systid; + bvr->fs_loadfile = UFSLoadFile; + bvr->fs_getdirentry = UFSGetDirEntry; + bvr->description = 0; +} + +void putc(int ch) +{ + bb.intno = 0x10; + bb.ebx.r.h = 0x00; /* background black */ + bb.ebx.r.l = 0x0F; /* foreground white */ + bb.eax.r.h = 0x0e; + bb.eax.r.l = ch; + bios(&bb); +} + +int bgetc(void) +{ + bb.intno = 0x16; + bb.eax.r.h = 0x00; + bios(&bb); + return bb.eax.rr; +} + +void delay(int ms) +{ + bb.intno = 0x15; + bb.eax.r.h = 0x86; + bb.ecx.rr = ms >> 16; + bb.edx.rr = ms & 0xFFFF; + bios(&bb); +} diff --git a/i386/boot1u/disk.h b/i386/boot1u/disk.h new file mode 100644 index 0000000..7ae22a6 --- /dev/null +++ b/i386/boot1u/disk.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +extern void initUFSBVRef( BVRef bvr, int biosdev, const struct fdisk_part * part); +extern int findUFSPartition(int dev, struct fdisk_part *_fp); diff --git a/i386/boot1u/malloc.c b/i386/boot1u/malloc.c new file mode 100644 index 0000000..100e52d --- /dev/null +++ b/i386/boot1u/malloc.c @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#include +#include + +static void *m_ptr = (void *)ZALLOC_ADDR; + +void *malloc(size_t size) +{ + void *result = m_ptr; + m_ptr += size; + return result; +} + +void free(void *ptr) +{ + // Do nothing +} + diff --git a/i386/boot1u/put.c b/i386/boot1u/put.c new file mode 100644 index 0000000..d39f99b --- /dev/null +++ b/i386/boot1u/put.c @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#include "libsa.h" + +extern void putc(int c); + +/* + * write one character to console + */ +void putchar(int c) +{ + if ( c == '\t' ) + { + for (c = 0; c < 8; c++) putc(' '); + return; + } + + if ( c == '\n' ) + { + putc('\r'); + } + + putc(c); +} + +int printf(const char * fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + prf(fmt, ap, putchar, 0); + va_end(ap); + return 0; +} + +int verbose(const char * fmt, ...) +{ +#if 1 + va_list ap; + + va_start(ap, fmt); + prf(fmt, ap, putchar, 0); + va_end(ap); +#endif + return(0); +} + diff --git a/i386/boot1u/string.c b/i386/boot1u/string.c new file mode 100644 index 0000000..75a037d --- /dev/null +++ b/i386/boot1u/string.c @@ -0,0 +1,179 @@ +/* + * Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* string operations */ + +#include "libsa.h" + +void * memset(void * dst, int val, size_t len) +{ + asm( "rep; stosb" + : "=c" (len), "=D" (dst) + : "0" (len), "1" (dst), "a" (val) + : "memory" ); + + return dst; +} + +void * memcpy(void * dst, const void * src, size_t len) +{ + asm( "rep; movsb" + : "=c" (len), "=D" (dst), "=S" (src) + : "0" (len), "1" (dst), "2" (src) + : "memory" ); + + return dst; +} + +void bcopy(const void * src, void * dst, size_t len) +{ + memcpy(dst, src, len); +} + +void bzero(void * dst, size_t len) +{ + memset(dst, 0, len); +} + +#if 0 +/* #if DONT_USE_GCC_BUILT_IN_STRLEN */ + +#define tolower(c) ((int)((c) & ~0x20)) +#define toupper(c) ((int)((c) | 0x20)) + +int strlen(const char * s) +{ + int n = 0; + while (*s++) n++; + return(n); +} + +/*#endif*/ +#endif + +int +strcmp(const char * s1, const char * s2) +{ + while (*s1 && (*s1 == *s2)) { + s1++; + s2++; + } + return (*s1 - *s2); +} + +#if 0 +int strncmp(const char * s1, const char * s2, size_t len) +{ + register int n = len; + while (--n >= 0 && *s1 == *s2++) + if (*s1++ == '\0') + return(0); + return(n<0 ? 0 : *s1 - *--s2); +} + +char * +strcpy(char * s1, const char * s2) +{ + register char *ret = s1; + while (*s1++ = *s2++) + continue; + return ret; +} +#endif + +char * +strncpy(char * s1, const char * s2, size_t n) +{ + register char *ret = s1; + while (n && (*s1++ = *s2++)) + n--; + return ret; +} + +char * +strlcpy(char * s1, const char * s2, size_t n) +{ + register char *ret = s1; + while (n && (*s1++ = *s2++)) + n--; + if (!n) *--s1=0; + return ret; +} + +#if 0 +int +ptol(const char *str) +{ + register int c = *str; + + if (c <= '7' && c >= '0') + c -= '0'; + else if (c <= 'h' && c >= 'a') + c -= 'a'; + else c = 0; + return c; +} +#endif + +int +atoi(const char *str) +{ + register int sum = 0; + while (*str == ' ' || *str == '\t') + str++; + while (*str >= '0' && *str <= '9') { + sum *= 10; + sum += *str++ - '0'; + } + return sum; +} + +#if 0 +char *strncat(char *s1, const char *s2, size_t n) +{ + register char *ret = s1; + while (*s1) + s1++; + while (n-- && *s2) + *s1++ = *s2++; + *s1 = '\0'; + return ret; +} + +char *strcat(char *s1, const char *s2) +{ + return(strncat(s1, s2, strlen(s2))); +} + +#if STRNCASECMP +int strncasecmp(const char *s1, const char *s2, size_t len) +{ + register int n = len; + while (--n >= 0 && tolower(*s1) == tolower(*s2++)) + if (*s1++ == '\0') + return(0); + return(n<0 ? 0 : tolower(*s1) - tolower(*--s2)); +} +#endif +#endif diff --git a/i386/boot2/Makefile b/i386/boot2/Makefile index 8bfefb0..7995505 100644 --- a/i386/boot2/Makefile +++ b/i386/boot2/Makefile @@ -7,7 +7,9 @@ include ../MakePaths.dir OPTIM = -Os CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -Werror \ - -fno-builtin -DSAIO_INTERNAL_USER -static + -fno-builtin -DSAIO_INTERNAL_USER -static \ + -fomit-frame-pointer -mpreferred-stack-boundary=2 \ + -fno-align-functions DEFINES= CONFIG = hd SYMDIR = $(SYMROOT) @@ -24,6 +26,7 @@ AS = as LD = ld # LIBS= -lc_static LIBS= -L$(SYMDIR) -lsaio -lsa -lrcz +LIBDEP= $(SYMDIR)/libsaio.a $(SYMDIR)/libsa.a $(SYMDIR)/librcz.a OTHER_FILES = @@ -32,13 +35,13 @@ VPATH = $(OBJROOT):$(SYMROOT) # The ordering is important; # boot2.o must be first. -OBJS = boot2.o boot.o graphics.o drivers.o prompt.o options.o +OBJS = boot2.o boot.o graphics.o drivers.o prompt.o options.o lzss.o # button.o browser.o scrollbar.o == NOTYET UTILDIR = ../util SFILES = boot2.s CFILES = boot.c graphics.c drivers.c prompt.c options.c -HFILES = boot.h +HFILES = boot.h appleClut8.h appleboot.h OTHERFILES = Makefile ALLSRC = $(FOREIGNSRC) $(FOREIGNBIN) $(SFILES) $(CFILES) \ $(HFILES) $(OTHERFILES) @@ -48,7 +51,7 @@ MAXBOOTSIZE = 65024 all: $(DIRS_NEEDED) boot -boot: machOconv $(OBJS) +boot: machOconv $(OBJS) $(LIBDEP) $(LD) -static -preload -segaddr __TEXT $(BOOT2ADDR) -segalign 20 \ -o $(SYMROOT)/boot.sys $(OBJS) $(LIBS) -lcc_kext machOconv $(SYMROOT)/boot.sys $(SYMROOT)/boot diff --git a/i386/boot2/appleClut8.h b/i386/boot2/appleClut8.h index 7e7ddff..cbcc043 100644 --- a/i386/boot2/appleClut8.h +++ b/i386/boot2/appleClut8.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -27,70 +28,70 @@ static const unsigned char appleClut8[ 256 * 3 ] = { - 0xff,0xff,0xff, 0xfe,0xfe,0xfe, 0xfd,0xfd,0xfd, 0xb8,0x27,0x2b, - 0xfc,0xfc,0xfc, 0xff,0xff,0x00, 0xfa,0xfa,0xfa, 0xf9,0xf9,0xf9, - 0xf8,0xf8,0xf8, 0xf7,0xf7,0xf7, 0xf6,0xf6,0xf6, 0xf5,0xf5,0xf5, - 0xf4,0xf4,0xf4, 0xf2,0xf2,0xf2, 0xf1,0xf1,0xf1, 0x00,0x00,0x00, - 0xef,0xef,0xef, 0xee,0xee,0xee, 0xed,0xed,0xed, 0xeb,0xeb,0xeb, - 0xe8,0xe8,0xe8, 0xe7,0xe7,0xe7, 0xc9,0x38,0x3e, 0xe5,0xe5,0xe5, - 0xff,0x00,0xff, 0xfb,0xfb,0xfb, 0xde,0x6c,0x72, 0xe0,0xe0,0xe0, - 0xe8,0x86,0x90, 0xde,0xde,0xde, 0xdd,0xdd,0xdd, 0xd3,0x7e,0x8d, - 0xd9,0xd9,0xd9, 0xf3,0x96,0xa6, 0xb1,0x1c,0x39, 0xff,0x00,0x00, - 0xbe,0x5e,0x72, 0xd3,0xd3,0xd3, 0xc6,0x2e,0x67, 0xd1,0xd1,0xd1, - 0xa3,0x06,0x45, 0xce,0xce,0xce, 0xcc,0xcc,0xff, 0xcc,0xcc,0xcc, - 0xc6,0x8f,0xa7, 0xe1,0xd3,0xd9, 0xce,0x9e,0xb4, 0xca,0xca,0xca, - 0xbf,0x3f,0x7d, 0xc9,0xc9,0xc9, 0xf4,0x89,0xbe, 0xc6,0xc6,0xc6, - 0xd6,0x51,0x97, 0xc9,0x2c,0x84, 0x96,0x1a,0x6a, 0xc2,0xc2,0xc2, - 0xf3,0x6f,0x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55,0xb2,0xe7, 0x32,0x89,0xa9, 0xcf,0xda,0xde, 0x29,0xa1,0xc7, - 0x86,0xa9,0xb4, 0x00,0x5f,0x79, 0x0c,0x77,0x8e, 0x12,0x8f,0xab, - 0x41,0xba,0xd5, 0x24,0x82,0x83, 0x2c,0xc4,0xc3, 0x1a,0xab,0xa6, - 0x4b,0xa8,0xa2, 0x0a,0x93,0x85, 0x0d,0xa5,0x96, 0x26,0xbc,0xac, - 0x04,0x81,0x72, 0x19,0xb3,0x86, 0x29,0xc1,0x94, 0x21,0x9c,0x71, - 0x02,0x8c,0x50, 0x35,0xd0,0x89, 0x46,0xa5,0x76, 0x02,0x7d,0x39, - 0x29,0xc9,0x71, 0x57,0xd6,0x8f, 0xa2,0xb5,0xaa, 0x01,0x88,0x2a, - 0x74,0xbe,0x8a, 0x19,0xb6,0x47, 0x2d,0xc6,0x51, 0x38,0xde,0x5d, - 0x4c,0xf4,0x6f, 0x91,0x9c,0x93, 0x00,0x8e,0x19, 0x10,0xaf,0x28, - 0xe3,0xe3,0xe3, 0x08,0xa1,0x1a, 0x59,0xc2,0x61, 0xf0,0xf0,0xf0, - 0x8f,0x9c,0x90, 0x23,0xce,0x2a, 0x12,0xba,0x17, 0x01,0x8a,0x02, - 0x03,0x9a,0x02, 0x40,0xe4,0x40, 0x08,0xb2,0x05, 0x13,0xcc,0x0f, - 0x36,0xd7,0x32, 0x28,0xe9,0x1f, 0x53,0xfb,0x4c, 0x6f,0xaf,0x6a, - 0x71,0xe0,0x67, 0x32,0xc0,0x12, 0x29,0xa5,0x08, 0x5c,0xdd,0x35, - 0x00,0xff,0xff, 0x63,0xc8,0x45, 0x86,0xfd,0x5b, 0x71,0xf6,0x39, - 0x55,0xcc,0x15, 0x00,0xff,0x00, 0x90,0xca,0x6e, 0x43,0xa7,0x01, - 0x8d,0xe4,0x37, 0xb3,0xf0,0x64, 0x85,0x8e,0x7a, 0xb0,0xfa,0x4d, - 0xd6,0xd6,0xd6, 0x88,0xd0,0x1a, 0x6a,0xa7,0x03, 0x98,0xbf,0x41, - 0xcd,0xf8,0x51, 0x94,0xa4,0x55, 0x91,0xb0,0x0a, 0xda,0xf1,0x3c, - 0xba,0xca,0x53, 0xb9,0xc3,0x28, 0xb1,0xba,0x12, 0xd2,0xd9,0x26, - 0xe8,0xec,0x2d, 0x98,0x96,0x02, 0xad,0xad,0x5c, 0xe2,0xd8,0x38, - 0xd9,0xc4,0x38, 0xa8,0x9a,0x50, 0x00,0x00,0xff, 0xbe,0xae,0x5e, - 0x9a,0x98,0x8e, 0xac,0x8d,0x0d, 0xc5,0xa0,0x2b, 0xdb,0xb5,0x48, - 0xdd,0x00,0x00, 0x9c,0x6d,0x03, 0xd4,0xa8,0x47, 0xb7,0x71,0x17, - 0xdc,0xa1,0x5a, 0xb9,0x9c,0x7c, 0xb4,0xab,0xa2, 0x9e,0x4b,0x01, - 0xc8,0x78,0x35, 0xd2,0x8d,0x51, 0xad,0x52,0x0f, 0x00,0xbb,0x00, - 0xb2,0x66,0x38, 0xb1,0xa6,0x9f, 0xb1,0x87,0x6f, 0xa4,0x34,0x03, - 0xee,0x9e,0x85, 0xc9,0x73,0x5a, 0xe6,0x94,0x7c, 0xa9,0x22,0x06, - 0xdb,0x87,0x74, 0xb0,0x2e,0x15, 0xb7,0x5a,0x50, 0xb2,0x42,0x3b, - 0xcd,0x73,0x6e, 0xd9,0x58,0x58, 0xac,0xac,0xac, 0xa0,0xa0,0xa0, - 0x9a,0x9a,0x9a, 0x92,0x92,0x92, 0x8e,0x8e,0x8e, 0xbb,0xbb,0xbb, - 0x81,0x81,0x81, 0x88,0x88,0x88, 0x77,0x77,0x77, 0x55,0x55,0x55, - 0x44,0x44,0x44, 0x22,0x22,0x22, 0x7b,0x7b,0x7b, 0x00,0x00,0x00 + 0xff,0xff,0xff, 0xbf,0xbf,0xbf, 0xbe,0xbe,0xbe, 0xbd,0xbd,0xbd, + 0xbc,0xbc,0xbc, 0xff,0xff,0x00, 0xba,0xba,0xba, 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, 0x79,0x79,0x79, + 0x78,0x78,0x78, 0x76,0x76,0x76, 0x75,0x75,0x75, 0x74,0x74,0x74, + 0x73,0x73,0x73, 0x72,0x72,0x72, 0x71,0x71,0x71, 0x70,0x70,0x70, + 0x6f,0x6f,0x6f, 0x6e,0x6e,0x6e, 0x6d,0x6d,0x6d, 0x6c,0x6c,0x6c, + 0x6b,0x6b,0x6b, 0x6a,0x6a,0x6a, 0x69,0x69,0x69, 0x68,0x68,0x68, + 0x67,0x67,0x67, 0x66,0x66,0x66, 0x64,0x64,0x64, 0x63,0x63,0x63, + 0x62,0x62,0x62, 0x61,0x61,0x61, 0x60,0x60,0x60, 0x5f,0x5f,0x5f, + 0x5e,0x5e,0x5e, 0x5d,0x5d,0x5d, 0x5c,0x5c,0x5c, 0x5b,0x5b,0x5b, + 0x5a,0x5a,0x5a, 0x59,0x59,0x59, 0x58,0x58,0x58, 0x57,0x57,0x57, + 0x56,0x56,0x56, 0x54,0x54,0x54, 0x53,0x53,0x53, 0x52,0x52,0x52, + 0x51,0x51,0x51, 0x50,0x50,0x50, 0x4f,0x4f,0x4f, 0x4e,0x4e,0x4e, + 0x4d,0x4d,0x4d, 0x4c,0x4c,0x4c, 0x4b,0x4b,0x4b, 0x4a,0x4a,0x4a, + 0x49,0x49,0x49, 0x48,0x48,0x48, 0x47,0x47,0x47, 0x46,0x46,0x46, + 0x45,0x45,0x45, 0x43,0x43,0x43, 0x42,0x42,0x42, 0x41,0x41,0x41, + 0x40,0x40,0x40, 0x3f,0x3f,0x3f, 0x3e,0x3e,0x3e, 0x3d,0x3d,0x3d, + 0x3c,0x3c,0x3c, 0x3b,0x3b,0x3b, 0x3a,0x3a,0x3a, 0x39,0x39,0x39, + 0x38,0x38,0x38, 0x37,0x37,0x37, 0x36,0x36,0x36, 0x35,0x35,0x35, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x00,0xff,0xff, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x00,0xff,0x00, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x00,0x00,0xff, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0xdd,0x00,0x00, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x00,0xbb,0x00, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, + 0x65,0x65,0x65, 0x65,0x65,0x65, 0x65,0x65,0x65, 0xbb,0xbb,0xbb, + 0x65,0x65,0x65, 0x88,0x88,0x88, 0x77,0x77,0x77, 0x55,0x55,0x55, + 0x44,0x44,0x44, 0x22,0x22,0x22, 0x65,0x65,0x65, 0x00,0x00,0x00 }; #endif /* !__BOOT2_APPLECLUT8_H */ diff --git a/i386/boot2/appleboot.h b/i386/boot2/appleboot.h new file mode 100644 index 0000000..e5fecca --- /dev/null +++ b/i386/boot2/appleboot.h @@ -0,0 +1,162 @@ +/* + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * appleboot.h - Apple logo shown durring boot + * + * Copyright (c) 2002 Apple Computer, Inc. + * + * DRI: Josh de Cesare + */ + +#define kAppleBootWidth (128) +#define kAppleBootHeight (128) +#define kAppleBootOffset (0) +#define kAppleBootFrames (1) +#define kAppleBootFPS (0) +#define kAppleBootRLEBlocks (686) + +// The original data was 16K in size (128x128) and would make the booter +// cross a 64K segment boundary. boot0 cannot load more than 127 sectors +// without changes. To eiminate that complexity, the data was run length +// encoded to save space. The reduced size is 1372 bytes. + +const unsigned char gAppleBootPictRLE[] = +{ + 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0x50, 0x01, 0x01, 0x02, 0x01, 0x17, + 0x01, 0x34, 0x01, 0x47, 0x03, 0x50, 0x01, 0x13, 0x76, 0x01, 0x01, 0x03, + 0x01, 0x20, 0x01, 0x40, 0x06, 0x50, 0x01, 0x13, 0x75, 0x01, 0x01, 0x1a, + 0x01, 0x42, 0x07, 0x50, 0x01, 0xfa, 0x01, 0x0a, 0x73, 0x01, 0x01, 0x07, + 0x01, 0x34, 0x09, 0x50, 0x01, 0x43, 0x01, 0x02, 0x72, 0x01, 0x01, 0x0e, + 0x01, 0x43, 0x0a, 0x50, 0x01, 0x36, 0x72, 0x01, 0x01, 0x14, 0x01, 0x4a, + 0x0b, 0x50, 0x01, 0x20, 0x71, 0x01, 0x01, 0x12, 0x01, 0x4b, 0x0b, 0x50, + 0x01, 0x4d, 0x01, 0x0b, 0x70, 0x01, 0x01, 0x0b, 0x01, 0x48, 0x0c, 0x50, + 0x01, 0xf9, 0x70, 0x01, 0x01, 0x03, 0x01, 0x3e, 0x0d, 0x50, 0x01, 0x1f, + 0x70, 0x01, 0x01, 0x2f, 0x0d, 0x50, 0x01, 0x48, 0x01, 0x06, 0x6f, 0x01, + 0x01, 0x15, 0x01, 0x4f, 0x0d, 0x50, 0x01, 0x27, 0x6f, 0x01, 0x01, 0x02, + 0x01, 0x3f, 0x0d, 0x50, 0x01, 0x45, 0x01, 0xf7, 0x6f, 0x01, 0x01, 0x1d, + 0x0e, 0x50, 0x01, 0x19, 0x6f, 0x01, 0x01, 0x02, 0x01, 0x40, 0x0d, 0x50, + 0x01, 0x2f, 0x70, 0x01, 0x01, 0x15, 0x0d, 0x50, 0x01, 0x3b, 0x01, 0x03, + 0x70, 0x01, 0x01, 0x34, 0x0c, 0x50, 0x01, 0x3f, 0x01, 0x07, 0x70, 0x01, + 0x01, 0xf7, 0x01, 0x47, 0x0b, 0x50, 0x01, 0xf9, 0x01, 0x07, 0x71, 0x01, + 0x01, 0x14, 0x0b, 0x50, 0x01, 0x36, 0x01, 0xf7, 0x72, 0x01, 0x01, 0x24, + 0x09, 0x50, 0x01, 0x4d, 0x01, 0x28, 0x74, 0x01, 0x01, 0x33, 0x08, 0x50, + 0x01, 0x3f, 0x01, 0x14, 0x75, 0x01, 0x01, 0x3a, 0x06, 0x50, 0x01, 0x41, + 0x01, 0x1f, 0x01, 0x02, 0x76, 0x01, 0x01, 0x3a, 0x03, 0x50, 0x01, 0x48, + 0x01, 0x35, 0x01, 0x17, 0x01, 0x02, 0x78, 0x01, 0x01, 0x15, 0x01, 0x33, + 0x01, 0x27, 0x01, 0x15, 0x01, 0xf7, 0x67, 0x01, 0x01, 0x02, 0x01, 0x08, + 0x01, 0x0e, 0x01, 0x13, 0x01, 0x14, 0x01, 0x12, 0x01, 0x0d, 0x01, 0x06, + 0x01, 0x02, 0x1c, 0x01, 0x01, 0x04, 0x01, 0x0b, 0x01, 0x12, 0x01, 0x17, + 0x01, 0x19, 0x01, 0x15, 0x01, 0x11, 0x01, 0x08, 0x01, 0x02, 0x4e, 0x01, + 0x01, 0x02, 0x01, 0x11, 0x01, 0x26, 0x01, 0x39, 0x01, 0x44, 0x01, 0x4c, + 0x01, 0x4f, 0x02, 0x50, 0x01, 0x4f, 0x01, 0x4d, 0x01, 0x4a, 0x01, 0x3f, + 0x01, 0x31, 0x01, 0x19, 0x01, 0xf7, 0x15, 0x01, 0x01, 0x0b, 0x01, 0x1c, + 0x01, 0x2e, 0x01, 0xf9, 0x01, 0x46, 0x01, 0x4d, 0x04, 0x50, 0x01, 0x4f, + 0x01, 0x4b, 0x01, 0x42, 0x01, 0x34, 0x01, 0x1f, 0x01, 0x0a, 0x49, 0x01, + 0x01, 0xf7, 0x01, 0x21, 0x01, 0x3f, 0x01, 0x4f, 0x0d, 0x50, 0x01, 0x47, + 0x01, 0x2d, 0x01, 0x0d, 0x10, 0x01, 0x01, 0x0d, 0x01, 0x25, 0x01, 0x3d, + 0x01, 0xfa, 0x0e, 0x50, 0x01, 0x4c, 0x01, 0x37, 0x01, 0x15, 0x45, 0x01, + 0x01, 0x04, 0x01, 0x25, 0x01, 0x45, 0x12, 0x50, 0x01, 0x4d, 0x01, 0x39, + 0x01, 0x19, 0x01, 0x02, 0x0a, 0x01, 0x01, 0x09, 0x01, 0x21, 0x01, 0xf9, + 0x01, 0x4d, 0x14, 0x50, 0x01, 0xf9, 0x01, 0x15, 0x42, 0x01, 0x01, 0x17, + 0x01, 0x42, 0x17, 0x50, 0x01, 0x42, 0x01, 0x27, 0x01, 0x0e, 0x01, 0x02, + 0x03, 0x01, 0x01, 0x02, 0x01, 0x0b, 0x01, 0x1f, 0x01, 0x38, 0x01, 0x4b, + 0x19, 0x50, 0x01, 0x33, 0x01, 0x06, 0x3e, 0x01, 0x01, 0x03, 0x01, 0x2e, + 0x1b, 0x50, 0x01, 0x4d, 0x01, 0x43, 0x01, 0x3a, 0x01, 0x37, 0x01, 0x3a, + 0x01, 0x42, 0x01, 0x4d, 0x1d, 0x50, 0x01, 0x42, 0x01, 0x0e, 0x3c, 0x01, + 0x01, 0x0a, 0x01, 0xf9, 0x41, 0x50, 0x01, 0x48, 0x01, 0x13, 0x3a, 0x01, + 0x01, 0x0d, 0x01, 0x45, 0x43, 0x50, 0x01, 0x4b, 0x01, 0x12, 0x38, 0x01, + 0x01, 0x10, 0x01, 0x48, 0x45, 0x50, 0x01, 0x48, 0x01, 0x0b, 0x36, 0x01, + 0x01, 0x0c, 0x01, 0x48, 0x47, 0x50, 0x01, 0x3d, 0x01, 0x03, 0x34, 0x01, + 0x01, 0x07, 0x01, 0x42, 0x49, 0x50, 0x01, 0x21, 0x34, 0x01, 0x01, 0x37, + 0x49, 0x50, 0x01, 0x42, 0x01, 0x12, 0x33, 0x01, 0x01, 0x22, 0x49, 0x50, + 0x01, 0x34, 0x01, 0xf7, 0x33, 0x01, 0x01, 0x0b, 0x01, 0x4b, 0x48, 0x50, + 0x01, 0x2c, 0x35, 0x01, 0x01, 0x36, 0x48, 0x50, 0x01, 0x29, 0x35, 0x01, + 0x01, 0x11, 0x01, 0x4f, 0x47, 0x50, 0x01, 0x2e, 0x36, 0x01, 0x01, 0x36, + 0x47, 0x50, 0x01, 0x3a, 0x01, 0x02, 0x35, 0x01, 0x01, 0x0b, 0x01, 0xfa, + 0x46, 0x50, 0x01, 0x46, 0x01, 0x08, 0x36, 0x01, 0x01, 0x26, 0x46, 0x50, + 0x01, 0x4e, 0x01, 0x15, 0x36, 0x01, 0x01, 0x02, 0x01, 0x40, 0x46, 0x50, + 0x01, 0x31, 0x37, 0x01, 0x01, 0x0e, 0x01, 0x4e, 0x45, 0x50, 0x01, 0x49, + 0x01, 0x08, 0x37, 0x01, 0x01, 0x25, 0x46, 0x50, 0x01, 0x29, 0x38, 0x01, + 0x01, 0x39, 0x45, 0x50, 0x01, 0x4c, 0x01, 0x0a, 0x37, 0x01, 0x01, 0xf7, + 0x01, 0x47, 0x45, 0x50, 0x01, 0x3a, 0x38, 0x01, 0x01, 0x10, 0x01, 0x4f, + 0x45, 0x50, 0x01, 0x22, 0x38, 0x01, 0x01, 0x1d, 0x46, 0x50, 0x01, 0x12, + 0x38, 0x01, 0x01, 0x29, 0x45, 0x50, 0x01, 0x4b, 0x01, 0x07, 0x38, 0x01, + 0x01, 0x36, 0x45, 0x50, 0x01, 0x42, 0x01, 0x02, 0x38, 0x01, 0x01, 0xf9, + 0x45, 0x50, 0x01, 0x3e, 0x39, 0x01, 0x01, 0x42, 0x45, 0x50, 0x01, 0x3c, + 0x39, 0x01, 0x01, 0x46, 0x45, 0x50, 0x01, 0x3b, 0x39, 0x01, 0x01, 0x48, + 0x45, 0x50, 0x01, 0xf9, 0x39, 0x01, 0x01, 0x48, 0x45, 0x50, 0x01, 0x3f, + 0x01, 0x02, 0x38, 0x01, 0x01, 0x46, 0x45, 0x50, 0x01, 0x48, 0x01, 0xf7, + 0x38, 0x01, 0x01, 0x43, 0x45, 0x50, 0x01, 0x4e, 0x01, 0x0e, 0x38, 0x01, + 0x01, 0x3f, 0x46, 0x50, 0x01, 0x1c, 0x38, 0x01, 0x01, 0x3a, 0x46, 0x50, + 0x01, 0x33, 0x38, 0x01, 0x01, 0x34, 0x46, 0x50, 0x01, 0x46, 0x01, 0x04, + 0x37, 0x01, 0x01, 0x2c, 0x47, 0x50, 0x01, 0x19, 0x37, 0x01, 0x01, 0x1f, + 0x47, 0x50, 0x01, 0x3a, 0x37, 0x01, 0x01, 0x15, 0x47, 0x50, 0x01, 0x4e, + 0x01, 0x11, 0x36, 0x01, 0x01, 0x0a, 0x01, 0xfa, 0x47, 0x50, 0x01, 0x37, + 0x36, 0x01, 0x01, 0x02, 0x01, 0x42, 0x47, 0x50, 0x01, 0x4f, 0x01, 0x15, + 0x36, 0x01, 0x01, 0x37, 0x48, 0x50, 0x01, 0x42, 0x01, 0x04, 0x35, 0x01, + 0x01, 0x25, 0x49, 0x50, 0x01, 0x2c, 0x35, 0x01, 0x01, 0x13, 0x49, 0x50, + 0x01, 0x4e, 0x01, 0x15, 0x34, 0x01, 0x01, 0xf7, 0x01, 0x47, 0x49, 0x50, + 0x01, 0x48, 0x01, 0x0b, 0x34, 0x01, 0x01, 0x37, 0x4a, 0x50, 0x01, 0x44, + 0x01, 0x0a, 0x33, 0x01, 0x01, 0x1f, 0x4b, 0x50, 0x01, 0x44, 0x01, 0x0d, + 0x32, 0x01, 0x01, 0x0a, 0x01, 0xfa, 0x4b, 0x50, 0x01, 0x48, 0x01, 0x17, + 0x32, 0x01, 0x01, 0x3a, 0x4c, 0x50, 0x01, 0x4f, 0x01, 0x2c, 0x01, 0x04, + 0x30, 0x01, 0x01, 0x1f, 0x4e, 0x50, 0x01, 0x41, 0x01, 0x19, 0x2f, 0x01, + 0x01, 0x07, 0x01, 0x4a, 0x4e, 0x50, 0x01, 0x44, 0x30, 0x01, 0x01, 0x33, + 0x4e, 0x50, 0x01, 0x36, 0x30, 0x01, 0x01, 0x14, 0x4e, 0x50, 0x01, 0x1f, + 0x30, 0x01, 0x01, 0x02, 0x01, 0x3f, 0x4c, 0x50, 0x01, 0x4d, 0x01, 0x0b, + 0x31, 0x01, 0x01, 0x1e, 0x4c, 0x50, 0x01, 0x3c, 0x32, 0x01, 0x01, 0x04, + 0x01, 0x44, 0x4b, 0x50, 0x01, 0x20, 0x33, 0x01, 0x01, 0x20, 0x4a, 0x50, + 0x01, 0x4a, 0x01, 0x07, 0x33, 0x01, 0x01, 0x04, 0x01, 0x43, 0x49, 0x50, + 0x01, 0x30, 0x35, 0x01, 0x01, 0x1c, 0x48, 0x50, 0x01, 0x4d, 0x01, 0x0e, + 0x35, 0x01, 0x01, 0x02, 0x01, 0x3e, 0x47, 0x50, 0x01, 0x36, 0x37, 0x01, + 0x01, 0x14, 0x01, 0x4f, 0x45, 0x50, 0x01, 0x4d, 0x01, 0x0e, 0x38, 0x01, + 0x01, 0x32, 0x45, 0x50, 0x01, 0x33, 0x39, 0x01, 0x01, 0x07, 0x01, 0x47, + 0x43, 0x50, 0x01, 0x4b, 0x01, 0x0b, 0x3a, 0x01, 0x01, 0x1c, 0x43, 0x50, + 0x01, 0x26, 0x3c, 0x01, 0x01, 0x37, 0x41, 0x50, 0x01, 0x41, 0x01, 0x04, + 0x3c, 0x01, 0x01, 0x08, 0x01, 0x48, 0x3f, 0x50, 0x01, 0x4e, 0x01, 0x13, + 0x3e, 0x01, 0x01, 0x19, 0x3f, 0x50, 0x01, 0x2d, 0x40, 0x01, 0x01, 0x2e, + 0x3d, 0x50, 0x01, 0x3f, 0x01, 0x03, 0x40, 0x01, 0x01, 0x03, 0x01, 0xf9, + 0x3b, 0x50, 0x01, 0x4a, 0x01, 0x0d, 0x42, 0x01, 0x01, 0x09, 0x01, 0x46, + 0x39, 0x50, 0x01, 0x4e, 0x01, 0x19, 0x44, 0x01, 0x01, 0x11, 0x01, 0x4b, + 0x38, 0x50, 0x01, 0x25, 0x46, 0x01, 0x01, 0x17, 0x01, 0x4d, 0x36, 0x50, + 0x01, 0x2e, 0x48, 0x01, 0x01, 0x1b, 0x01, 0x4d, 0x34, 0x50, 0x01, 0x31, + 0x4a, 0x01, 0x01, 0x17, 0x01, 0x4a, 0x14, 0x50, 0x01, 0x4d, 0x01, 0x44, + 0x01, 0x3b, 0x01, 0x34, 0x01, 0x2e, 0x01, 0x2c, 0x01, 0x2e, 0x01, 0x35, + 0x01, 0x3e, 0x01, 0x4a, 0x14, 0x50, 0x01, 0x2e, 0x4c, 0x01, 0x01, 0x0e, + 0x01, 0x41, 0x10, 0x50, 0x01, 0x4a, 0x01, 0x37, 0x01, 0x1f, 0x01, 0x0c, + 0x01, 0x03, 0x07, 0x01, 0x01, 0x06, 0x01, 0x15, 0x01, 0x2d, 0x01, 0x41, + 0x0f, 0x50, 0x01, 0x4a, 0x01, 0x1f, 0x4e, 0x01, 0x01, 0xf7, 0x01, 0x2e, + 0x01, 0xfa, 0x0b, 0x50, 0x01, 0x4f, 0x01, 0xf9, 0x01, 0x1e, 0x01, 0x07, + 0x0e, 0x01, 0x01, 0x02, 0x01, 0x14, 0x01, 0x31, 0x01, 0x48, 0x0b, 0x50, + 0x01, 0x37, 0x01, 0x0c, 0x51, 0x01, 0x01, 0x0d, 0x01, 0x2f, 0x01, 0x45, + 0x01, 0x4f, 0x05, 0x50, 0x01, 0x4f, 0x01, 0x43, 0x01, 0x2e, 0x01, 0x11, + 0x14, 0x01, 0x01, 0x07, 0x01, 0x1f, 0x01, 0x3c, 0x01, 0x4c, 0x04, 0x50, + 0x01, 0x4f, 0x01, 0x46, 0x01, 0x33, 0x01, 0x13, 0x55, 0x01, 0x01, 0x04, + 0x01, 0x12, 0x01, 0x1f, 0x01, 0x26, 0x01, 0x28, 0x01, 0x26, 0x01, 0x1e, + 0x01, 0x10, 0x01, 0x02, 0x19, 0x01, 0x01, 0x09, 0x01, 0x16, 0x01, 0x1e, + 0x01, 0x1f, 0x01, 0x1c, 0x01, 0x11, 0x01, 0x04, 0xff, 0x01, 0xff, 0x01, + 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, + 0xff, 0x01, 0xb3, 0x01 +}; diff --git a/i386/boot2/boot.c b/i386/boot2/boot.c index 368acab..fbd37ca 100644 --- a/i386/boot2/boot.c +++ b/i386/boot2/boot.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -50,13 +51,15 @@ */ #include "boot.h" +#include "bootstruct.h" +#include "sl.h" /* * The user asked for boot graphics. */ BOOL gBootGraphics = NO; -int gBIOSDev; long gBootMode = kBootModeNormal; +static char gBootKernelCacheFile[512]; static BOOL gUnloadPXEOnExit = 0; @@ -66,6 +69,11 @@ static BOOL gUnloadPXEOnExit = 0; */ #define kBootErrorTimeout 5 +/* + * Default path to kernel cache file + */ +#define kDefaultCachePath "/System/Library/Caches/com.apple.kernelcaches/kernelcache" + //========================================================================== // Zero the BSS. @@ -81,36 +89,43 @@ static void zeroBSS() (&_DATA__common__end - &_DATA__common__begin) ); } +//========================================================================== +// Malloc error function + +static void malloc_error(char *addr, size_t size) +{ + printf("\nMemory allocation error (0x%x, 0x%x)\n", + (unsigned)addr, (unsigned)size); + asm("hlt"); +} + //========================================================================== // execKernel - Load the kernel image (mach-o) and jump to its entry point. -static int execKernel(int fd) +static int ExecKernel(void *binary) { - register KERNBOOTSTRUCT * kbp = kernBootStruct; - static struct mach_header head; entry_t kernelEntry; int ret; - verbose("Loading kernel %s\n", kbp->bootFile); - - // Perform the actual load. + bootArgs->kaddr = bootArgs->ksize = 0; - kbp->kaddr = kbp->ksize = 0; - - ret = loadprog( kbp->kernDev, fd, - &head, - &kernelEntry, - (char **) &kbp->kaddr, - &kbp->ksize ); - close(fd); - clearActivityIndicator(); + ret = DecodeKernel(binary, + &kernelEntry, + (char **) &bootArgs->kaddr, + &bootArgs->ksize ); if ( ret != 0 ) return ret; + // Reserve space for boot args + reserveKernBootStruct(); + // Load boot drivers from the specifed root path. - LoadDrivers("/"); + if (!gHaveKernelCache) { + LoadDrivers("/"); + } + clearActivityIndicator(); if (gErrors) { @@ -130,10 +145,9 @@ static int execKernel(int fd) if ( APMPresent() ) APMConnect32(); } - // Cleanup the PXE base code. + // Cleanup the PXE base code. - if ( gUnloadPXEOnExit ) - { + if ( (gBootFileType == kNetworkDeviceType) && gUnloadPXEOnExit ) { if ( (ret = nbpUnloadBaseCode()) != nbpStatusSuccess ) { printf("nbpUnloadBaseCode error %d\n", (int) ret); @@ -147,7 +161,7 @@ static int execKernel(int fd) // Jump to kernel's entry point. There's no going back now. - startprog( kernelEntry ); + startprog( kernelEntry, bootArgs ); // Not reached @@ -162,13 +176,13 @@ static void scanHardware() extern int ReadPCIBusInfo(PCI_bus_info_t *); extern void PCI_Bus_Init(PCI_bus_info_t *); - ReadPCIBusInfo( &kernBootStruct->pciInfo ); + ReadPCIBusInfo( &bootArgs->pciInfo ); // // Initialize PCI matching support in the booter. // Not used, commented out to minimize code size. // - // PCI_Bus_Init( &kernBootStruct->pciInfo ); + // PCI_Bus_Init( &bootArgs->pciInfo ); } //========================================================================== @@ -185,12 +199,15 @@ static void scanHardware() void boot(int biosdev) { - register KERNBOOTSTRUCT * kbp = kernBootStruct; - int fd; int status; + char *bootFile; zeroBSS(); + // Initialize malloc + + malloc_init(0, 0, 0, malloc_error); + // Enable A20 gate before accessing memory above 1Mb. enableA20(); @@ -198,13 +215,7 @@ void boot(int biosdev) // Set reminder to unload the PXE base code. Neglect to unload // the base code will result in a hang or kernel panic. - if ( BIOS_DEV_TYPE(biosdev) == kBIOSDevTypeNetwork ) - gUnloadPXEOnExit = 1; - -#if 0 gUnloadPXEOnExit = 1; - biosdev = 0x80; -#endif // Record the device that the booter was loaded from. @@ -227,18 +238,26 @@ void boot(int biosdev) // Display banner and show hardware info. setCursorPosition( 0, 0, 0 ); - printf( bootBanner, kbp->convmem, kbp->extmem ); + printf( bootBanner, bootArgs->convmem, bootArgs->extmem ); printVBEInfo(); // Parse args, load and start kernel. while (1) { + const char *val; + int len, trycache; + long flags, cachetime, time; + int ret = -1; + // Initialize globals. sysConfigValid = 0; gErrors = 0; + // Reset config space. + bootArgs->configEnd = bootArgs->config; + getBootOptions(); status = processBootOptions(); if ( status == 1 ) break; @@ -246,31 +265,83 @@ void boot(int biosdev) // Found and loaded a config file. Proceed with boot. - printf("Loading Darwin/x86\n"); + // Check for cache file. - if ( (fd = openfile( kbp->bootFile, 0 )) >= 0 ) - { - execKernel(fd); // will not return on success + if (getValueForKey(kKernelCacheKey, &val, &len)) { + strncpy(gBootKernelCacheFile, val, len); + gBootKernelCacheFile[len] = '\0'; + } else { + strcpy(gBootKernelCacheFile, kDefaultCachePath); } - else - { - error("Can't find %s\n", kbp->bootFile); - if ( BIOS_DEV_TYPE(gBIOSDev) == kBIOSDevTypeFloppy ) + trycache = (((gBootMode & kBootModeSafe) == 0) && + (gBootFileType == kBlockDeviceType) && + (gBootKernelCacheFile[0] != '\0')); + + printf("Loading Darwin/x86\n"); + + if (trycache) do { + + // if we haven't found the kernel yet, don't use the cache + ret = GetFileInfo(NULL, bootArgs->bootFile, &flags, &time); + if ((ret != 0) || ((flags & kFileTypeMask) != kFileTypeFlat)) { + trycache = 0; + break; + } + ret = GetFileInfo(NULL, gBootKernelCacheFile, &flags, &cachetime); + if ((ret != 0) || ((flags & kFileTypeMask) != kFileTypeFlat) + || (cachetime < time)) { + trycache = 0; + break; + } + ret = GetFileInfo("/System/Library/", "Extensions", &flags, &time); + if ((ret == 0) && ((flags & kFileTypeMask) == kFileTypeDirectory) + && (cachetime < time)) { + trycache = 0; + break; + } + } while (0); + + do { + if (trycache) { + bootFile = gBootKernelCacheFile; + verbose("Loading kernel cache %s\n", bootFile); + ret = LoadFile(bootFile); + if (ret >= 0) { + break; + } + } + bootFile = bootArgs->bootFile; + verbose("Loading kernel %s\n", bootFile); + ret = LoadFile(bootFile); + } while (0); + + clearActivityIndicator(); + + if (ret < 0) { + error("Can't find %s\n", bootFile); + + if ( gBootFileType == kBIOSDevTypeFloppy ) { // floppy in drive, but failed to load kernel. gBIOSDev = kBIOSDevTypeHardDrive; initKernBootStruct( gBIOSDev ); printf("Attempt to load from hard drive."); } - else if ( BIOS_DEV_TYPE(gBIOSDev) == kBIOSDevTypeNetwork ) + else if ( gBootFileType == kNetworkDeviceType ) { // Return control back to PXE. Don't unload PXE base code. gUnloadPXEOnExit = 0; break; } + } else { + /* Won't return if successful. */ + ret = ExecKernel((void *)kLoadAddr); } + } /* while(1) */ - if (gUnloadPXEOnExit) nbpUnloadBaseCode(); + if ((gBootFileType == kNetworkDeviceType) && gUnloadPXEOnExit) { + nbpUnloadBaseCode(); + } } diff --git a/i386/boot2/boot.h b/i386/boot2/boot.h index 851c537..b570c09 100644 --- a/i386/boot2/boot.h +++ b/i386/boot2/boot.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -40,6 +41,7 @@ #define kQuietBootKey "Quiet Boot" #define kKernelFlagsKey "Kernel Flags" #define kKernelNameKey "Kernel" +#define kKernelCacheKey "Kernel Cache" /* * A global set by boot() to record the device that the booter @@ -72,6 +74,7 @@ extern void clearActivityIndicator(); * drivers.c */ extern long LoadDrivers(char * dirSpec); +extern long DecodeKernel(void *binary, entry_t *rentry, char **raddr, int *rsize); /* * options.c @@ -79,4 +82,22 @@ extern long LoadDrivers(char * dirSpec); extern void getBootOptions(); extern int processBootOptions(); +/* + * lzss.c + */ +extern int decompress_lzss(u_int8_t *dst, u_int8_t *src, u_int32_t srclen); + +struct compressed_kernel_header { + u_int32_t signature; + u_int32_t compress_type; + u_int32_t adler32; + u_int32_t uncompressed_size; + u_int32_t compressed_size; + u_int32_t reserved[11]; + char platform_name[64]; + char root_path[256]; + u_int8_t data[0]; +}; +typedef struct compressed_kernel_header compressed_kernel_header; + #endif /* !__BOOT2_BOOT_H */ diff --git a/i386/boot2/boot2.s b/i386/boot2/boot2.s index ab6389b..5ed8ad5 100644 --- a/i386/boot2/boot2.s +++ b/i386/boot2/boot2.s @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -79,6 +80,8 @@ LABEL(boot2) data32 call __real_to_prot # Enter protected mode. + fninit # FPU init + # We are now in 32-bit protected mode. # Transfer execution to C by calling boot(). diff --git a/i386/boot2/drivers.c b/i386/boot2/drivers.c index e335f4e..7fe6ae2 100644 --- a/i386/boot2/drivers.c +++ b/i386/boot2/drivers.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.0 (the 'License'). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License." + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -29,47 +30,14 @@ * DRI: Josh de Cesare */ +#include +#include +#include + #include "sl.h" #include "boot.h" - -enum { - kTagTypeNone = 0, - kTagTypeDict, - kTagTypeKey, - kTagTypeString, - kTagTypeInteger, - kTagTypeData, - kTagTypeDate, - kTagTypeFalse, - kTagTypeTrue, - kTagTypeArray -}; - -#define kXMLTagPList "plist " -#define kXMLTagDict "dict" -#define kXMLTagKey "key" -#define kXMLTagString "string" -#define kXMLTagInteger "integer" -#define kXMLTagData "data" -#define kXMLTagDate "date" -#define kXMLTagFalse "false/" -#define kXMLTagTrue "true/" -#define kXMLTagArray "array" - -#define kPropCFBundleIdentifier ("CFBundleIdentifier") -#define kPropCFBundleExecutable ("CFBundleExecutable") -#define kPropOSBundleRequired ("OSBundleRequired") -#define kPropOSBundleLibraries ("OSBundleLibraries") -#define kPropIOKitPersonalities ("IOKitPersonalities") -#define kPropIONameMatch ("IONameMatch") - -struct Tag { - long type; - char *string; - struct Tag *tag; - struct Tag *tagNext; -}; -typedef struct Tag Tag, *TagPtr; +#include "bootstruct.h" +#include "xml.h" struct Module { struct Module *nextModule; @@ -109,6 +77,8 @@ enum { kCFBundleType3 }; +static unsigned long Alder32( unsigned char * buffer, long length ); + static long FileLoadDrivers(char *dirSpec, long plugin); static long NetLoadDrivers(char *dirSpec); static long LoadDriverMKext(char *fileSpec); @@ -116,24 +86,12 @@ static long LoadDriverPList(char *dirSpec, char *name, long bundleType); static long LoadMatchedModules(void); static long MatchPersonalities(void); static long MatchLibraries(void); -static TagPtr GetProperty(TagPtr dict, char *key); -// static ModulePtr FindModule(char *name); +#ifdef NOTDEF +static ModulePtr FindModule(char *name); +static void ThinFatFile(void **loadAddrP, unsigned long *lengthP); +#endif static long ParseXML(char *buffer, ModulePtr *module, TagPtr *personalities); -static long ParseNextTag(char *buffer, TagPtr *tag); -static long ParseTagList(char *buffer, TagPtr *tag, long type, long empty); -static long ParseTagKey(char *buffer, TagPtr *tag); -static long ParseTagString(char *buffer, TagPtr *tag); -static long ParseTagInteger(char *buffer, TagPtr *tag); -static long ParseTagData(char *buffer, TagPtr *tag); -static long ParseTagDate(char *buffer, TagPtr *tag); -static long ParseTagBoolean(char *buffer, TagPtr *tag, long type); -static long GetNextTag(char *buffer, char **tag, long *start); -static long FixDataMatchingTag(char *buffer, char *tag); -static TagPtr NewTag(void); -static void FreeTag(TagPtr tag); -static char *NewSymbol(char *string); -static void FreeSymbol(char *string); -// static void DumpTag(TagPtr tag, long depth); +static long InitDriverSupport(void); static ModulePtr gModuleHead, gModuleTail; static TagPtr gPersonalityHead, gPersonalityTail; @@ -143,91 +101,6 @@ static char * gFileSpec; static char * gTempSpec; static char * gFileName; -//========================================================================== -// BootX shim functions. - -#define kPageSize 4096 -#define RoundPage(x) ((((unsigned)(x)) + kPageSize - 1) & ~(kPageSize - 1)) - -static long gImageFirstBootXAddr; -static long gImageLastKernelAddr; - -static void * -AllocateBootXMemory( long size ) -{ - long addr = gImageFirstBootXAddr - size; - - if ( addr < gImageLastKernelAddr ) return 0; - - bzero((void *)addr, size); - - gImageFirstBootXAddr = addr; - - return (void *)addr; -} - -static long -AllocateKernelMemory( long inSize ) -{ - long addr = gImageLastKernelAddr; - - gImageLastKernelAddr += RoundPage(inSize); - - if ( gImageLastKernelAddr > gImageFirstBootXAddr ) - stop( "AllocateKernelMemory error" ); - - kernBootStruct->ksize = gImageLastKernelAddr - kernBootStruct->kaddr; - - return addr; -} - -static long -AllocateMemoryRange(char * rangeName, long start, long length, long type) -{ - if ( kernBootStruct->numBootDrivers < NDRIVERS ) - { - int num = kernBootStruct->numBootDrivers; - - kernBootStruct->driverConfig[num].address = start; - kernBootStruct->driverConfig[num].size = length; - kernBootStruct->driverConfig[num].type = type; - kernBootStruct->numBootDrivers++; - } - else - { - stop( "AllocateMemoryRange error" ); - } - return 0; -} - -// Map BootX types to boot counterparts. - -#define gBootFileType BIOS_DEV_TYPE(gBIOSDev) -enum { - kNetworkDeviceType = kBIOSDevTypeNetwork, - kBlockDeviceType = kBIOSDevTypeHardDrive -}; - - -static long -InitDriverSupport() -{ - gExtensionsSpec = (char *) malloc( 4096 ); - gDriverSpec = (char *) malloc( 4096 ); - gFileSpec = (char *) malloc( 4096 ); - gTempSpec = (char *) malloc( 4096 ); - gFileName = (char *) malloc( 4096 ); - - if ( !gExtensionsSpec || !gDriverSpec || !gFileSpec || !gTempSpec || !gFileName ) - stop("InitDriverSupport error"); - - gImageLastKernelAddr = RoundPage( kernBootStruct->kaddr + - kernBootStruct->ksize ); - - gImageFirstBootXAddr = ( KERNEL_ADDR + KERNEL_LEN ); - - return 0; -} static unsigned long Alder32( unsigned char * buffer, long length ) @@ -258,6 +131,25 @@ Alder32( unsigned char * buffer, long length ) return result; } + +//========================================================================== +// InitDriverSupport + +static long +InitDriverSupport( void ) +{ + gExtensionsSpec = (char *) malloc( 4096 ); + gDriverSpec = (char *) malloc( 4096 ); + gFileSpec = (char *) malloc( 4096 ); + gTempSpec = (char *) malloc( 4096 ); + gFileName = (char *) malloc( 4096 ); + + if ( !gExtensionsSpec || !gDriverSpec || !gFileSpec || !gTempSpec || !gFileName ) + stop("InitDriverSupport error"); + + return 0; +} + //========================================================================== // LoadDrivers @@ -270,18 +162,16 @@ long LoadDrivers( char * dirSpec ) { NetLoadDrivers(dirSpec); } - else /* if ( gBootFileType == kBlockDeviceType ) */ + else if ( gBootFileType == kBlockDeviceType ) { strcpy(gExtensionsSpec, dirSpec); strcat(gExtensionsSpec, "System/Library/"); FileLoadDrivers(gExtensionsSpec, 0); } -#if 0 else { return 0; } -#endif MatchPersonalities(); @@ -351,7 +241,7 @@ FileLoadDrivers( char * dirSpec, long plugin ) ret = LoadDriverPList(dirSpec, gFileName, bundleType); if (ret != 0) { - // printf("LoadDrivers: failed\n"); + //printf("LoadDrivers: failed for '%s'/'%s'\n", dirSpec, gFileName); } if (!plugin) @@ -369,7 +259,7 @@ NetLoadDrivers( char * dirSpec ) { long tries; -#if 0 +#if NODEF long cnt; // Get the name of the kernel @@ -383,7 +273,7 @@ NetLoadDrivers( char * dirSpec ) #endif // INTEL modification - sprintf(gDriverSpec, "%s%s.mkext", dirSpec, kernBootStruct->bootFile); + sprintf(gDriverSpec, "%s%s.mkext", dirSpec, bootArgs->bootFile); verbose("NetLoadDrivers: Loading from [%s]\n", gDriverSpec); @@ -403,14 +293,18 @@ NetLoadDrivers( char * dirSpec ) static long LoadDriverMKext( char * fileSpec ) { - long driversAddr, driversLength; + unsigned long driversAddr, driversLength; + long length; char segName[32]; DriversPackage * package = (DriversPackage *)kLoadAddr; -#define GetPackageElement(e) NXSwapBigLongToHost(package->e) +#define GetPackageElement(e) OSSwapBigToHostInt32(package->e) // Load the MKext. - if (LoadFile(fileSpec) == -1) return -1; + length = LoadFile(fileSpec); + if (length == -1) return -1; + + ThinFatFile((void **)&package, &length); // Verify the MKext. if (( GetPackageElement(signature1) != kDriverPackageSignature1) || @@ -425,9 +319,9 @@ LoadDriverMKext( char * fileSpec ) // Make space for the MKext. driversLength = GetPackageElement(length); driversAddr = AllocateKernelMemory(driversLength); - + // Copy the MKext. - memcpy((void *)driversAddr, (void *)kLoadAddr, driversLength); + memcpy((void *)driversAddr, (void *)package, driversLength); // Add the MKext to the memory map. sprintf(segName, "DriversPackage-%lx", driversAddr); @@ -447,7 +341,7 @@ LoadDriverPList( char * dirSpec, char * name, long bundleType ) ModulePtr module; TagPtr personalities; char * buffer = 0; - char * tmpDriverPath = 0; + char * tmpDriverPath = 0; long ret = -1; do { @@ -455,9 +349,9 @@ LoadDriverPList( char * dirSpec, char * name, long bundleType ) sprintf(gFileSpec, "%s/%s/%s", dirSpec, name, (bundleType == kCFBundleType2) ? "Contents/MacOS/" : ""); - driverPathLength = strlen(gFileSpec); + driverPathLength = strlen(gFileSpec) + 1; - tmpDriverPath = malloc(driverPathLength + 1); + tmpDriverPath = malloc(driverPathLength); if (tmpDriverPath == 0) break; strcpy(tmpDriverPath, gFileSpec); @@ -470,32 +364,33 @@ LoadDriverPList( char * dirSpec, char * name, long bundleType ) length = LoadFile(gFileSpec); if (length == -1) break; - buffer = malloc(length + 1); + length = length + 1; + buffer = malloc(length); if (buffer == 0) break; - strncpy(buffer, (char *)kLoadAddr, length); + strlcpy(buffer, (char *)kLoadAddr, length); // Parse the plist. ret = ParseXML(buffer, &module, &personalities); - if (ret != 0) break; + if (ret != 0) { break; } // Allocate memory for the driver path and the plist. - module->driverPath = AllocateBootXMemory(driverPathLength + 1); - module->plistAddr = AllocateBootXMemory(length + 1); + module->driverPath = tmpDriverPath; + module->plistAddr = (void *)malloc(length); if ((module->driverPath == 0) || (module->plistAddr == 0)) break; // Save the driver path in the module. - - strcpy(module->driverPath, tmpDriverPath); + //strcpy(module->driverPath, tmpDriverPath); + tmpDriverPath = 0; // Add the plist to the module. - strncpy(module->plistAddr, (char *)kLoadAddr, length); - module->plistLength = length + 1; + strlcpy(module->plistAddr, (char *)kLoadAddr, length); + module->plistLength = length; // Add the module to the end of the module list. @@ -529,6 +424,54 @@ LoadDriverPList( char * dirSpec, char * name, long bundleType ) return ret; } +#if 0 +//========================================================================== +// ThinFatFile +// Checks the loaded file for a fat header; if present, updates +// loadAddr and length to be the portion of the fat file relevant +// to the current architecture; otherwise leaves them unchanged. + +static void +ThinFatFile(void **loadAddrP, unsigned long *lengthP) +{ + // Check for fat files. + struct fat_header *fhp = (struct fat_header *)kLoadAddr; + struct fat_arch *fap = (struct fat_arch *)((void *)kLoadAddr + + sizeof(struct fat_header)); + int nfat, swapped; + void *loadAddr = 0; + unsigned long length = 0; + + if (fhp->magic == FAT_MAGIC) { + nfat = fhp->nfat_arch; + swapped = 0; + } else if (fhp->magic == FAT_CIGAM) { + nfat = OSSwapInt32(fhp->nfat_arch); + swapped = 1; + } else { + nfat = 0; + swapped = 0; + } + + for (; nfat > 0; nfat--, fap++) { + if (swapped) { + fap->cputype = OSSwapInt32(fap->cputype); + fap->offset = OSSwapInt32(fap->offset); + fap->size = OSSwapInt32(fap->size); + } + if (fap->cputype == CPU_TYPE_I386) { + loadAddr = (void *)kLoadAddr + fap->offset; + length = fap->size; + break; + } + } + if (loadAddr) + *loadAddrP = loadAddr; + if (length) + *lengthP = length; +} +#endif + //========================================================================== // LoadMatchedModules @@ -547,7 +490,8 @@ LoadMatchedModules( void ) { if (module->willLoad) { - prop = GetProperty(module->dict, kPropCFBundleExecutable); + prop = XMLGetProperty(module->dict, kPropCFBundleExecutable); + if (prop != 0) { fileName = prop->string; @@ -559,6 +503,12 @@ LoadMatchedModules( void ) if (length != -1) { + void *driverModuleAddr = (void *)kLoadAddr; + if (length != 0) + { + ThinFatFile(&driverModuleAddr, &length); + } + // Make make in the image area. driverLength = sizeof(DriverInfo) + module->plistLength + length; driverAddr = AllocateKernelMemory(driverLength); @@ -583,7 +533,7 @@ LoadMatchedModules( void ) strcpy(driver->plistAddr, module->plistAddr); if (length != 0) { - memcpy(driver->moduleAddr, (void *)kLoadAddr, driver->moduleLength); + memcpy(driver->moduleAddr, driverModuleAddr, length); } // Add an entry to the memory map. @@ -604,7 +554,7 @@ LoadMatchedModules( void ) static long MatchPersonalities( void ) { -#warning IONameMatch support not implemented + /* IONameMatch support not implemented */ return 0; } @@ -626,7 +576,7 @@ MatchLibraries( void ) { if (module->willLoad == 1) { - prop = GetProperty(module->dict, kPropOSBundleLibraries); + prop = XMLGetProperty(module->dict, kPropOSBundleLibraries); if (prop != 0) { prop = prop->tag; @@ -635,7 +585,7 @@ MatchLibraries( void ) module2 = gModuleHead; while (module2 != 0) { - prop2 = GetProperty(module2->dict, kPropCFBundleIdentifier); + prop2 = XMLGetProperty(module2->dict, kPropCFBundleIdentifier); if ((prop2 != 0) && (!strcmp(prop->string, prop2->string))) { if (module2->willLoad == 0) module2->willLoad = 1; @@ -657,30 +607,6 @@ MatchLibraries( void ) return 0; } -//========================================================================== -// GetProperty - -static TagPtr -GetProperty( TagPtr dict, char * key ) -{ - TagPtr tagList, tag; - - if (dict->type != kTagTypeDict) return 0; - - tag = 0; - tagList = dict->tag; - while (tagList) - { - tag = tagList; - tagList = tag->tagNext; - - if ((tag->type != kTagTypeKey) || (tag->string == 0)) continue; - - if (!strcmp(tag->string, key)) return tag->tag; - } - - return 0; -} //========================================================================== // FindModule @@ -719,7 +645,7 @@ ParseXML( char * buffer, ModulePtr * module, TagPtr * personalities ) while (1) { - length = ParseNextTag(buffer + pos, &moduleDict); + length = XMLParseNextTag(buffer + pos, &moduleDict); if (length == -1) break; pos += length; @@ -727,24 +653,24 @@ ParseXML( char * buffer, ModulePtr * module, TagPtr * personalities ) if (moduleDict == 0) continue; if (moduleDict->type == kTagTypeDict) break; - FreeTag(moduleDict); + XMLFreeTag(moduleDict); } if (length == -1) return -1; - required = GetProperty(moduleDict, kPropOSBundleRequired); + required = XMLGetProperty(moduleDict, kPropOSBundleRequired); if ( (required == 0) || (required->type != kTagTypeString) || !strcmp(required->string, "Safe Boot")) { - FreeTag(moduleDict); + XMLFreeTag(moduleDict); return -2; } - tmpModule = AllocateBootXMemory(sizeof(Module)); + tmpModule = (ModulePtr)malloc(sizeof(Module)); if (tmpModule == 0) { - FreeTag(moduleDict); + XMLFreeTag(moduleDict); return -1; } tmpModule->dict = moduleDict; @@ -757,509 +683,64 @@ ParseXML( char * buffer, ModulePtr * module, TagPtr * personalities ) // Get the personalities. - *personalities = GetProperty(moduleDict, kPropIOKitPersonalities); + *personalities = XMLGetProperty(moduleDict, kPropIOKitPersonalities); return 0; } -//========================================================================== -// ParseNextTag +#if NOTDEF +static char gPlatformName[64]; +#endif -static long -ParseNextTag( char * buffer, TagPtr * tag ) +long +DecodeKernel(void *binary, entry_t *rentry, char **raddr, int *rsize) { - long length, pos; - char * tagName; - - length = GetNextTag(buffer, &tagName, 0); - if (length == -1) return -1; - - pos = length; - if (!strncmp(tagName, kXMLTagPList, 6)) - { - length = 0; - } - else if (!strcmp(tagName, kXMLTagDict)) - { - length = ParseTagList(buffer + pos, tag, kTagTypeDict, 0); - } - else if (!strcmp(tagName, kXMLTagDict "/")) - { - length = ParseTagList(buffer + pos, tag, kTagTypeDict, 1); - } - else if (!strcmp(tagName, kXMLTagKey)) - { - length = ParseTagKey(buffer + pos, tag); - } - else if (!strcmp(tagName, kXMLTagString)) - { - length = ParseTagString(buffer + pos, tag); - } - else if (!strcmp(tagName, kXMLTagInteger)) - { - length = ParseTagInteger(buffer + pos, tag); - } - else if (!strcmp(tagName, kXMLTagData)) - { - length = ParseTagData(buffer + pos, tag); - } - else if (!strcmp(tagName, kXMLTagDate)) - { - length = ParseTagDate(buffer + pos, tag); - } - else if (!strcmp(tagName, kXMLTagFalse)) - { - length = ParseTagBoolean(buffer + pos, tag, kTagTypeFalse); - } - else if (!strcmp(tagName, kXMLTagTrue)) - { - length = ParseTagBoolean(buffer + pos, tag, kTagTypeTrue); - } - else if (!strcmp(tagName, kXMLTagArray)) - { - length = ParseTagList(buffer + pos, tag, kTagTypeArray, 0); - } - else if (!strcmp(tagName, kXMLTagArray "/")) - { - length = ParseTagList(buffer + pos, tag, kTagTypeArray, 1); - } - else - { - *tag = 0; - length = 0; - } + long ret; + compressed_kernel_header * kernel_header = (compressed_kernel_header *) binary; + u_int32_t uncompressed_size, size; + void *buffer; - if (length == -1) return -1; - - return pos + length; -} - -//========================================================================== -// ParseTagList +#if 0 + printf("kernel header:\n"); + printf("signature: 0x%x\n", kernel_header->signature); + printf("compress_type: 0x%x\n", kernel_header->compress_type); + printf("adler32: 0x%x\n", kernel_header->adler32); + printf("uncompressed_size: 0x%x\n", kernel_header->uncompressed_size); + printf("compressed_size: 0x%x\n", kernel_header->compressed_size); + getc(); +#endif -static long -ParseTagList( char * buffer, TagPtr * tag, long type, long empty ) -{ - long length, pos; - TagPtr tagList, tmpTag; - - tagList = 0; - pos = 0; - - if (!empty) - { - while (1) - { - length = ParseNextTag(buffer + pos, &tmpTag); - if (length == -1) break; - - pos += length; - - if (tmpTag == 0) break; - tmpTag->tagNext = tagList; - tagList = tmpTag; - } - - if (length == -1) - { - FreeTag(tagList); + if (kernel_header->signature == OSSwapBigToHostConstInt32('comp')) { + if (kernel_header->compress_type != OSSwapBigToHostConstInt32('lzss')) { + error("kernel compression is bad\n"); return -1; } - } - - tmpTag = NewTag(); - if (tmpTag == 0) - { - FreeTag(tagList); - return -1; - } - - tmpTag->type = type; - tmpTag->string = 0; - tmpTag->tag = tagList; - tmpTag->tagNext = 0; - - *tag = tmpTag; - - return pos; -} - -//========================================================================== -// ParseTagKey - -static long -ParseTagKey( char * buffer, TagPtr * tag ) -{ - long length, length2; - char *string; - TagPtr tmpTag, subTag; - - length = FixDataMatchingTag(buffer, kXMLTagKey); - if (length == -1) return -1; - - length2 = ParseNextTag(buffer + length, &subTag); - if (length2 == -1) return -1; - - tmpTag = NewTag(); - if (tmpTag == 0) - { - FreeTag(subTag); - return -1; - } - - string = NewSymbol(buffer); - if (string == 0) - { - FreeTag(subTag); - FreeTag(tmpTag); - return -1; - } - - tmpTag->type = kTagTypeKey; - tmpTag->string = string; - tmpTag->tag = subTag; - tmpTag->tagNext = 0; - - *tag = tmpTag; - - return length + length2; -} - -//========================================================================== -// ParseTagString - -static long -ParseTagString( char * buffer, TagPtr * tag ) -{ - long length; - char * string; - TagPtr tmpTag; - - length = FixDataMatchingTag(buffer, kXMLTagString); - if (length == -1) return -1; - - tmpTag = NewTag(); - if (tmpTag == 0) return -1; - - string = NewSymbol(buffer); - if (string == 0) - { - FreeTag(tmpTag); - return -1; - } - - tmpTag->type = kTagTypeString; - tmpTag->string = string; - tmpTag->tag = 0; - tmpTag->tagNext = 0; - - *tag = tmpTag; - - return length; -} - -//========================================================================== -// ParseTagInteger - -static long -ParseTagInteger( char * buffer, TagPtr * tag ) -{ - long length, integer; - TagPtr tmpTag; - - length = FixDataMatchingTag(buffer, kXMLTagInteger); - if (length == -1) return -1; - - tmpTag = NewTag(); - if (tmpTag == 0) return -1; - - integer = 0; - - tmpTag->type = kTagTypeInteger; - tmpTag->string = (char *)integer; - tmpTag->tag = 0; - tmpTag->tagNext = 0; - - *tag = tmpTag; - - return length; -} - -//========================================================================== -// ParseTagData - -static long -ParseTagData( char * buffer, TagPtr * tag ) -{ - long length; - TagPtr tmpTag; - - length = FixDataMatchingTag(buffer, kXMLTagData); - if (length == -1) return -1; - - tmpTag = NewTag(); - if (tmpTag == 0) return -1; - - tmpTag->type = kTagTypeData; - tmpTag->string = 0; - tmpTag->tag = 0; - tmpTag->tagNext = 0; - - *tag = tmpTag; - - return length; -} - -//========================================================================== -// ParseTagDate - -static long -ParseTagDate( char * buffer, TagPtr * tag ) -{ - long length; - TagPtr tmpTag; - - length = FixDataMatchingTag(buffer, kXMLTagDate); - if (length == -1) return -1; - - tmpTag = NewTag(); - if (tmpTag == 0) return -1; - - tmpTag->type = kTagTypeDate; - tmpTag->string = 0; - tmpTag->tag = 0; - tmpTag->tagNext = 0; - - *tag = tmpTag; - - return length; -} - -//========================================================================== -// ParseTagBoolean - -static long -ParseTagBoolean( char * buffer, TagPtr * tag, long type ) -{ - TagPtr tmpTag; - - tmpTag = NewTag(); - if (tmpTag == 0) return -1; - - tmpTag->type = type; - tmpTag->string = 0; - tmpTag->tag = 0; - tmpTag->tagNext = 0; - - *tag = tmpTag; - - return 0; -} - -//========================================================================== -// GetNextTag - -static long -GetNextTag( char * buffer, char ** tag, long * start ) -{ - long cnt, cnt2; - - if (tag == 0) return -1; - - // Find the start of the tag. - cnt = 0; - while ((buffer[cnt] != '\0') && (buffer[cnt] != '<')) cnt++; - if (buffer[cnt] == '\0') return -1; - - // Find the end of the tag. - cnt2 = cnt + 1; - while ((buffer[cnt2] != '\0') && (buffer[cnt2] != '>')) cnt2++; - if (buffer[cnt2] == '\0') return -1; - - // Fix the tag data. - *tag = buffer + cnt + 1; - buffer[cnt2] = '\0'; - if (start) *start = cnt; - - return cnt2 + 1; -} - -//========================================================================== -// FixDataMatchingTag - -static long -FixDataMatchingTag( char * buffer, char * tag ) -{ - long length, start, stop; - char * endTag; - - start = 0; - while (1) - { - length = GetNextTag(buffer + start, &endTag, &stop); - if (length == -1) return -1; - - if ((*endTag == '/') && !strcmp(endTag + 1, tag)) break; - start += length; - } +#if NOTDEF + if (kernel_header->platform_name[0] && strcmp(gPlatformName, kernel_header->platform_name)) + return -1; + if (kernel_header->root_path[0] && strcmp(gBootFile, kernel_header->root_path)) + return -1; +#endif - buffer[start + stop] = '\0'; + uncompressed_size = OSSwapBigToHostInt32(kernel_header->uncompressed_size); + binary = buffer = malloc(uncompressed_size); - return start + length; -} - -//========================================================================== -// NewTag - -#define kTagsPerBlock (0x1000) - -static TagPtr gTagsFree; - -static TagPtr -NewTag( void ) -{ - long cnt; - TagPtr tag; - - if (gTagsFree == 0) - { - tag = (TagPtr)AllocateBootXMemory(kTagsPerBlock * sizeof(Tag)); - if (tag == 0) return 0; - - // Initalize the new tags. - for (cnt = 0; cnt < kTagsPerBlock; cnt++) - { - tag[cnt].type = kTagTypeNone; - tag[cnt].string = 0; - tag[cnt].tag = 0; - tag[cnt].tagNext = tag + cnt + 1; + size = decompress_lzss((u_int8_t *) binary, &kernel_header->data[0], + OSSwapBigToHostInt32(kernel_header->compressed_size)); + if (uncompressed_size != size) { + error("size mismatch from lzss: %x\n", size); + return -1; + } + if (OSSwapBigToHostInt32(kernel_header->adler32) != + Alder32(binary, uncompressed_size)) { + printf("adler mismatch\n"); + return -1; } - tag[kTagsPerBlock - 1].tagNext = 0; - - gTagsFree = tag; - } - - tag = gTagsFree; - gTagsFree = tag->tagNext; - - return tag; -} - -//========================================================================== -// FreeTag - -static void -FreeTag( TagPtr tag ) -{ - return; - if (tag == 0) return; - - if (tag->string) FreeSymbol(tag->string); - - FreeTag(tag->tag); - FreeTag(tag->tagNext); - - // Clear and free the tag. - tag->type = kTagTypeNone; - tag->string = 0; - tag->tag = 0; - tag->tagNext = gTagsFree; - gTagsFree = tag; -} - -//========================================================================== -// Symbol object. - -struct Symbol -{ - long refCount; - struct Symbol *next; - char string[1]; -}; -typedef struct Symbol Symbol, *SymbolPtr; - -static SymbolPtr FindSymbol(char * string, SymbolPtr * prevSymbol); - -static SymbolPtr gSymbolsHead; - -//========================================================================== -// NewSymbol - -static char * -NewSymbol( char * string ) -{ - SymbolPtr symbol; - - // Look for string in the list of symbols. - symbol = FindSymbol(string, 0); - - // Add the new symbol. - if (symbol == 0) - { - symbol = AllocateBootXMemory(sizeof(Symbol) + strlen(string)); - if (symbol == 0) return 0; - - // Set the symbol's data. - symbol->refCount = 0; - strcpy(symbol->string, string); - - // Add the symbol to the list. - symbol->next = gSymbolsHead; - gSymbolsHead = symbol; } - // Update the refCount and return the string. - symbol->refCount++; - return symbol->string; -} - -//========================================================================== -// FreeSymbol - -static void -FreeSymbol( char * string ) -{ -#if 0 - SymbolPtr symbol, prev; - - // Look for string in the list of symbols. - symbol = FindSymbol(string, &prev); - if (symbol == 0) return; - - // Update the refCount. - symbol->refCount--; - - if (symbol->refCount != 0) return; - - // Remove the symbol from the list. - if (prev != 0) prev->next = symbol->next; - else gSymbolsHead = symbol->next; - - // Free the symbol's memory. - free(symbol); -#endif -} - -//========================================================================== -// FindSymbol - -static SymbolPtr -FindSymbol( char * string, SymbolPtr * prevSymbol ) -{ - SymbolPtr symbol, prev; - - symbol = gSymbolsHead; - prev = 0; - - while (symbol != 0) - { - if (!strcmp(symbol->string, string)) break; - - prev = symbol; - symbol = symbol->next; - } + ThinFatFile(&binary, 0); - if ((symbol != 0) && (prevSymbol != 0)) *prevSymbol = prev; + ret = DecodeMachO(binary, rentry, raddr, rsize); - return symbol; + return ret; } diff --git a/i386/boot2/graphics.c b/i386/boot2/graphics.c index da3fb64..2bdec61 100644 --- a/i386/boot2/graphics.c +++ b/i386/boot2/graphics.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -29,7 +30,8 @@ #include "boot.h" #include "vbe.h" #include "appleClut8.h" -#include "happy_screen.h" +#include "appleboot.h" +#include "bootstruct.h" /* * for spinning disk @@ -51,7 +53,7 @@ static void drawDataRectangle( unsigned short x, unsigned short height, unsigned char * data ); -#define VIDEO(x) (kernBootStruct->video.v_ ## x) +#define VIDEO(x) (bootArgs->video.v_ ## x) //========================================================================== @@ -95,11 +97,12 @@ getVESAModeWithProperties( unsigned short width, unsigned char bitsPerPixel, unsigned short attributesSet, unsigned short attributesClear, - VBEModeInfoBlock * outModeInfo ) + VBEModeInfoBlock * outModeInfo, + unsigned short * vesaVersion ) { VBEInfoBlock vbeInfo; unsigned short * modePtr; - VBEModeInfoBlock modeInfo; + VBEModeInfoBlock modeInfo; unsigned char modeBitsPerPixel; unsigned short matchedMode = modeEndOfList; int err; @@ -117,6 +120,10 @@ getVESAModeWithProperties( unsigned short width, return modeEndOfList; } + // Report the VESA major/minor version number. + + if (vesaVersion) *vesaVersion = vbeInfo.VESAVersion; + // Loop through the mode list, and find the matching mode. for ( modePtr = VBEDecodeFP( unsigned short *, vbeInfo.VideoModePtr ); @@ -199,16 +206,23 @@ getVESAModeWithProperties( unsigned short width, break; } - // Save the next "best" mode in case a perfect match - // is not found. + // Save the next "best" mode in case a perfect match is not found. - if ( ( modeInfo.XResolution >= outModeInfo->XResolution ) && - ( modeInfo.YResolution >= outModeInfo->YResolution ) && - ( modeBitsPerPixel >= outModeInfo->BitsPerPixel ) ) + if ( modeInfo.XResolution == outModeInfo->XResolution && + modeInfo.YResolution == outModeInfo->YResolution && + modeBitsPerPixel <= outModeInfo->BitsPerPixel ) { - matchedMode = *modePtr; - bcopy( &modeInfo, outModeInfo, sizeof(modeInfo) ); + continue; // Saved mode has more depth. } + if ( modeInfo.XResolution < outModeInfo->XResolution || + modeInfo.YResolution < outModeInfo->YResolution || + modeBitsPerPixel < 16 ) + { + continue; // Saved mode has more resolution. + } + + matchedMode = *modePtr; + bcopy( &modeInfo, outModeInfo, sizeof(modeInfo) ); } return matchedMode; @@ -231,16 +245,43 @@ static void setupPalette( VBEPalette * p, const unsigned char * g ) } } +//========================================================================== +// Simple decompressor for boot images encoded in RLE format. + +static char * decodeRLE( const void * rleData, int rleBlocks, int outBytes ) +{ + char *out, *cp; + + struct RLEBlock { + unsigned char count; + unsigned char value; + } * bp = (struct RLEBlock *) rleData; + + out = cp = (char *) malloc( outBytes ); + if ( out == NULL ) return NULL; + + while ( rleBlocks-- ) + { + memset( cp, bp->value, bp->count ); + cp += bp->count; + bp++; + } + + return out; +} + //========================================================================== // setVESAGraphicsMode static int setVESAGraphicsMode( unsigned short width, unsigned short height, - unsigned char bitsPerPixel ) + unsigned char bitsPerPixel, + unsigned short refreshRate ) { VBEModeInfoBlock minfo; unsigned short mode; + unsigned short vesaVersion; int err = errFuncNotSupported; do { @@ -250,15 +291,44 @@ setVESAGraphicsMode( unsigned short width, maGraphicsModeBit | maLinearFrameBufferAvailBit, 0, - &minfo ); + &minfo, &vesaVersion ); if ( mode == modeEndOfList ) { break; } - // Set the mode. + if ( (vesaVersion >> 8) >= 3 && refreshRate >= 60 && + (gBootMode & kBootModeSafe) == 0 ) + { + VBECRTCInfoBlock timing; + + // Generate CRTC timing for given refresh rate. + + generateCRTCTiming( minfo.XResolution, minfo.YResolution, + refreshRate, kCRTCParamRefreshRate, + &timing ); + + // Find the actual pixel clock supported by the hardware. + + getVBEPixelClock( mode, &timing.PixelClock ); + + // Re-compute CRTC timing based on actual pixel clock. + + generateCRTCTiming( minfo.XResolution, minfo.YResolution, + timing.PixelClock, kCRTCParamPixelClock, + &timing ); + + // Set the video mode and use specified CRTC timing. + + err = setVBEMode( mode | kLinearFrameBufferBit | + kCustomRefreshRateBit, &timing ); + } + else + { + // Set the mode with default refresh rate. - err = setVBEMode( mode | kLinearFrameBufferBit ); + err = setVBEMode( mode | kLinearFrameBufferBit, NULL ); + } if ( err != errSuccess ) { break; @@ -286,58 +356,100 @@ setVESAGraphicsMode( unsigned short width, // Update KernBootStruct using info provided by the selected // VESA mode. - kernBootStruct->graphicsMode = GRAPHICS_MODE; - kernBootStruct->video.v_width = minfo.XResolution; - kernBootStruct->video.v_height = minfo.YResolution; - kernBootStruct->video.v_depth = minfo.BitsPerPixel; - kernBootStruct->video.v_rowBytes = minfo.BytesPerScanline; - kernBootStruct->video.v_baseAddr = VBEMakeUInt32(minfo.PhysBasePtr); + bootArgs->graphicsMode = GRAPHICS_MODE; + bootArgs->video.v_width = minfo.XResolution; + bootArgs->video.v_height = minfo.YResolution; + bootArgs->video.v_depth = minfo.BitsPerPixel; + bootArgs->video.v_rowBytes = minfo.BytesPerScanline; + bootArgs->video.v_baseAddr = VBEMakeUInt32(minfo.PhysBasePtr); } while ( 0 ); - if ( err == errSuccess ) - { - char * happyScreen; - short * happyScreen16; - long * happyScreen32; - long cnt, x, y; - - // Fill the background to white (same as BootX). + return err; +} - drawColorRectangle( 0, 0, minfo.XResolution, minfo.YResolution, - 0x00 /* color index */ ); +//========================================================================== +// drawBootGraphics - // Prepare the data for the happy mac. +static int +drawBootGraphics( unsigned short width, + unsigned short height, + unsigned char bitsPerPixel, + unsigned short refreshRate ) +{ + VBEModeInfoBlock minfo; + unsigned short mode; + unsigned short vesaVersion; + int err = errFuncNotSupported; + + char * appleBoot = 0; + short * appleBoot16; + long * appleBoot32; + long cnt, x, y; + char * appleBootPict; - switch ( VIDEO(depth) ) + do { + mode = getVESAModeWithProperties( width, height, bitsPerPixel, + maColorModeBit | + maModeIsSupportedBit | + maGraphicsModeBit | + maLinearFrameBufferAvailBit, + 0, + &minfo, &vesaVersion ); + if ( mode == modeEndOfList ) { - case 16 : - happyScreen16 = malloc(kHappyScreenWidth * kHappyScreenHeight * 2); - for (cnt = 0; cnt < (kHappyScreenWidth * kHappyScreenHeight); cnt++) - happyScreen16[cnt] = lookUpCLUTIndex(gHappyScreenPict[cnt], 16); - happyScreen = (char *) happyScreen16; - break; + break; + } - case 32 : - happyScreen32 = malloc(kHappyScreenWidth * kHappyScreenHeight * 4); - for (cnt = 0; cnt < (kHappyScreenWidth * kHappyScreenHeight); cnt++) - happyScreen32[cnt] = lookUpCLUTIndex(gHappyScreenPict[cnt], 32); - happyScreen = (char *) happyScreen32; - break; + // Fill the background to 75% grey (same as BootX). - default : - happyScreen = (char *) gHappyScreenPict; - break; - } + drawColorRectangle( 0, 0, minfo.XResolution, minfo.YResolution, + 0x01 /* color index */ ); + + appleBootPict = decodeRLE( gAppleBootPictRLE, kAppleBootRLEBlocks, + kAppleBootWidth * kAppleBootHeight ); - x = ( VIDEO(width) - kHappyScreenWidth ) / 2; - y = ( VIDEO(height) - kHappyScreenHeight ) / 2 + kHappyScreenOffset; + // Prepare the data for the happy mac. + + if ( appleBootPict ) + { + switch ( VIDEO(depth) ) + { + case 16 : + appleBoot16 = malloc(kAppleBootWidth * kAppleBootHeight * 2); + if ( !appleBoot16 ) break; + for (cnt = 0; cnt < (kAppleBootWidth * kAppleBootHeight); cnt++) + appleBoot16[cnt] = lookUpCLUTIndex(appleBootPict[cnt], 16); + appleBoot = (char *) appleBoot16; + break; + + case 32 : + appleBoot32 = malloc(kAppleBootWidth * kAppleBootHeight * 4); + if ( !appleBoot32 ) break; + for (cnt = 0; cnt < (kAppleBootWidth * kAppleBootHeight); cnt++) + appleBoot32[cnt] = lookUpCLUTIndex(appleBootPict[cnt], 32); + appleBoot = (char *) appleBoot32; + break; + + default : + appleBoot = (char *) appleBootPict; + break; + } - // Draw the happy mac in the center of the display. + x = ( VIDEO(width) - kAppleBootWidth ) / 2; + y = ( VIDEO(height) - kAppleBootHeight ) / 2 + kAppleBootOffset; + + // Draw the happy mac in the center of the display. + + if ( appleBoot ) + { + drawDataRectangle( x, y, kAppleBootWidth, kAppleBootHeight, + appleBoot ); + } - drawDataRectangle( x, y, kHappyScreenWidth, kHappyScreenHeight, - happyScreen ); - } + free( appleBootPict ); + } + } while (0); return err; } @@ -348,13 +460,13 @@ setVESAGraphicsMode( unsigned short width, static unsigned long lookUpCLUTIndex( unsigned char index, unsigned char depth ) { - long result, red, green, blue; + long result, red, green, blue; - red = appleClut8[index * 3 + 0]; - green = appleClut8[index * 3 + 1]; - blue = appleClut8[index * 3 + 2]; + red = appleClut8[index * 3 + 0]; + green = appleClut8[index * 3 + 1]; + blue = appleClut8[index * 3 + 2]; - switch (depth) { + switch (depth) { case 16 : result = ((red & 0xF8) << 7) | ((green & 0xF8) << 2) | @@ -372,7 +484,7 @@ static unsigned long lookUpCLUTIndex( unsigned char index, break; } - return result; + return result; } //========================================================================== @@ -449,10 +561,10 @@ setVESATextMode( unsigned short cols, maColorModeBit | maModeIsSupportedBit, maGraphicsModeBit, - &minfo ); + &minfo, NULL ); } - if ( ( mode == modeEndOfList ) || ( setVBEMode(mode) != errSuccess ) ) + if ( ( mode == modeEndOfList ) || ( setVBEMode(mode, NULL) != errSuccess ) ) { video_mode( 2 ); // VGA BIOS, 80x25 text mode. minfo.XResolution = 80; @@ -462,12 +574,12 @@ setVESATextMode( unsigned short cols, // Update KernBootStruct using info provided by the selected // VESA mode. - kernBootStruct->graphicsMode = TEXT_MODE; - kernBootStruct->video.v_baseAddr = 0xb8000; - kernBootStruct->video.v_width = minfo.XResolution; - kernBootStruct->video.v_height = minfo.YResolution; - kernBootStruct->video.v_depth = 8; - kernBootStruct->video.v_rowBytes = 0x8000; + bootArgs->graphicsMode = TEXT_MODE; + bootArgs->video.v_baseAddr = 0xb8000; + bootArgs->video.v_width = minfo.XResolution; + bootArgs->video.v_height = minfo.YResolution; + bootArgs->video.v_depth = 8; + bootArgs->video.v_rowBytes = 0x8000; return errSuccess; // always return success } @@ -480,8 +592,8 @@ getNumberArrayFromProperty( const char * propKey, unsigned long numbers[], unsigned long maxArrayCount ) { - char * propStr; - int count = 0; + char * propStr; + unsigned long count = 0; #define _isdigit(c) ((c) >= '0' && (c) <= '9') @@ -489,17 +601,18 @@ getNumberArrayFromProperty( const char * propKey, if ( propStr ) { char * delimiter = propStr; + char * p = propStr; - while ( count < maxArrayCount && *propStr != '\0' ) + while ( count < maxArrayCount && *p != '\0' ) { - unsigned long val = strtoul( propStr, &delimiter, 10 ); - if ( propStr != delimiter ) + unsigned long val = strtoul( p, &delimiter, 10 ); + if ( p != delimiter ) { numbers[count++] = val; - propStr = delimiter; + p = delimiter; } - while ( ( *propStr != '\0' ) && !_isdigit(*propStr) ) - propStr++; + while ( ( *p != '\0' ) && !_isdigit(*p) ) + p++; } free( propStr ); @@ -516,13 +629,14 @@ getNumberArrayFromProperty( const char * propKey, void setVideoMode( int mode ) { - unsigned long params[3]; + unsigned long params[4]; int count; int err = errSuccess; if ( mode == GRAPHICS_MODE ) { - count = getNumberArrayFromProperty( kGraphicsModeKey, params, 3 ); + params[3] = 0; + count = getNumberArrayFromProperty( kGraphicsModeKey, params, 4 ); if ( count < 3 ) { params[0] = 1024; // Default graphics mode is 1024x768x16. @@ -536,14 +650,18 @@ setVideoMode( int mode ) if ( params[2] == 555 ) params[2] = 16; if ( params[2] == 888 ) params[2] = 32; - err = setVESAGraphicsMode( params[0], params[1], params[2] ); + err = setVESAGraphicsMode( params[0], params[1], params[2], params[3] ); if ( err == errSuccess ) { // If this boolean is set to true, then the console driver // in the kernel will show the animated color wheel on the // upper left corner. - kernBootStruct->video.v_display = !gVerboseMode; + bootArgs->video.v_display = !gVerboseMode; + + if (!gVerboseMode) { + drawBootGraphics( params[0], params[1], params[2], params[3] ); + } } } @@ -557,10 +675,10 @@ setVideoMode( int mode ) } setVESATextMode( params[0], params[1], 4 ); - kernBootStruct->video.v_display = 0; + bootArgs->video.v_display = 0; } - currentIndicator = 0; + currentIndicator = 0; } //========================================================================== @@ -568,7 +686,7 @@ setVideoMode( int mode ) int getVideoMode(void) { - return kernBootStruct->graphicsMode; + return bootArgs->graphicsMode; } //========================================================================== @@ -591,7 +709,7 @@ spinActivityIndicator( void ) return; else lastTickTime = currentTickTime; - + if ( getVideoMode() == TEXT_MODE ) { string[0] = indicator[currentIndicator]; diff --git a/i386/boot2/happy_screen.h b/i386/boot2/happy_screen.h deleted file mode 100644 index 81f875d..0000000 --- a/i386/boot2/happy_screen.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * happy_screen.h - Picture displayed a the beginning of the boot process - * - * Copyright (c) 2002 Apple Computer, Inc. - * - * DRI: Josh de Cesare - */ - -#define kHappyScreenWidth (52) -#define kHappyScreenHeight (44) -#define kHappyScreenOffset (-44) - -static const unsigned char gHappyScreenPict[] = -{ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x12,0x27,0xf7,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0xf7,0x27,0x12,0x00,0x00, - 0x00,0x12,0x37,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x37,0x12,0x00, - 0x00,0x27,0x50,0x43,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x43,0x50,0x27,0x00, - 0x00,0xf7,0x50,0x20,0xa3,0x33,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x33,0xa3,0x20,0x50,0xf7,0x00, - 0x00,0x50,0x50,0x00,0x33,0x33,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x33,0x33,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x19,0x37,0x3c,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x19,0x37,0x3c,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa3,0x55,0x55,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa3,0x55,0x55,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0b,0x4d,0x50,0x0d,0x00,0x00,0x00,0x12,0x33,0x09,0x00,0x00,0x00,0x00,0x0b,0x4d,0x50,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x15,0x01,0x00,0x00,0x07,0x4d,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x15,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x50,0x0b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x4d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x4d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2f,0x50,0x19,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x29,0x50,0x15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1d,0x50,0x37,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0xc0,0x27,0x17,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x31,0x50,0x1b,0x00,0x00,0x00,0x00,0x00,0x00,0x1b,0x50,0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x50,0x33,0xa3,0x00,0x00,0x00,0x00,0xa3,0x33,0x50,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,0x2f,0x50,0x33,0x1b,0x0a,0x0a,0x1b,0x33,0x50,0x2f,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x2f,0x50,0x50,0x50,0x50,0x50,0x50,0x2f,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,0x1e,0x31,0x43,0x43,0x31,0x1e,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x4d,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x14,0x4d,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x00,0x33,0x33,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x33,0x33,0x00,0x50,0x50,0x00, - 0x00,0x50,0x50,0x20,0xa3,0x33,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x33,0xa3,0x20,0x50,0x50,0x00, - 0x00,0x27,0x50,0x43,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x43,0x50,0x27,0x00, - 0x00,0x12,0x37,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x37,0x12,0x00, - 0x00,0x00,0x12,0x27,0xf7,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0xf7,0x27,0x12,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 -}; diff --git a/i386/boot2/lzss.c b/i386/boot2/lzss.c new file mode 100644 index 0000000..2abff19 --- /dev/null +++ b/i386/boot2/lzss.c @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/************************************************************** + LZSS.C -- A Data Compression Program +*************************************************************** + 4/6/1989 Haruhiko Okumura + Use, distribute, and modify this program freely. + Please send me your improved versions. + PC-VAN SCIENCE + NIFTY-Serve PAF01022 + CompuServe 74050,1022 + +**************************************************************/ +/* + * lzss.c - Package for decompressing lzss compressed objects + * + * Copyright (c) 2003 Apple Computer, Inc. + * + * DRI: Josh de Cesare + */ + +#include + +#define N 4096 /* size of ring buffer - must be power of 2 */ +#define F 18 /* upper limit for match_length */ +#define THRESHOLD 2 /* encode string into position and length + if match_length is greater than this */ +#define NIL N /* index for root of binary search trees */ + +int +decompress_lzss(u_int8_t *dst, u_int8_t *src, u_int32_t srclen) +{ + /* ring buffer of size N, with extra F-1 bytes to aid string comparison */ + u_int8_t text_buf[N + F - 1]; + u_int8_t *dststart = dst; + u_int8_t *srcend = src + srclen; + int i, j, k, r, c; + unsigned int flags; + + dst = dststart; + srcend = src + srclen; + for (i = 0; i < N - F; i++) + text_buf[i] = ' '; + r = N - F; + flags = 0; + for ( ; ; ) { + if (((flags >>= 1) & 0x100) == 0) { + if (src < srcend) c = *src++; else break; + flags = c | 0xFF00; /* uses higher byte cleverly */ + } /* to count eight */ + if (flags & 1) { + if (src < srcend) c = *src++; else break; + *dst++ = c; + text_buf[r++] = c; + r &= (N - 1); + } else { + if (src < srcend) i = *src++; else break; + if (src < srcend) j = *src++; else break; + i |= ((j & 0xF0) << 4); + j = (j & 0x0F) + THRESHOLD; + for (k = 0; k <= j; k++) { + c = text_buf[(i + k) & (N - 1)]; + *dst++ = c; + text_buf[r++] = c; + r &= (N - 1); + } + } + } + + return dst - dststart; +} diff --git a/i386/boot2/options.c b/i386/boot2/options.c index b48f091..360ec13 100644 --- a/i386/boot2/options.c +++ b/i386/boot2/options.c @@ -3,26 +3,28 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ #include "boot.h" +#include "bootstruct.h" #include "fdisk.h" enum { @@ -84,7 +86,7 @@ static void flushKeyboardBuffer() static int countdown( const char * msg, int row, int timeout ) { - int time; + unsigned long time; int ch = 0; int col = strlen(msg) + 1; @@ -392,7 +394,7 @@ void getBootOptions() clearBootArgs(); clearScreenRows( kMenuTopRow, kScreenLastRow ); changeCursor( 0, kMenuTopRow, kCursorTypeUnderline, 0 ); - printf("Scanning device %x...", gBIOSDev); + verbose("Scanning device %x...", gBIOSDev); // Get a list of bootable volumes on the device. @@ -527,11 +529,12 @@ extern unsigned char chainbootflag; int processBootOptions() { - KERNBOOTSTRUCT * kbp = kernBootStruct; const char * cp = gBootArgs; const char * val = 0; const char * kernel; int cnt; + int userCnt; + int cntRemaining; skipblanks( &cp ); @@ -555,17 +558,20 @@ int processBootOptions() return 1; } - kbp->kernDev &= ~((B_UNITMASK << B_UNITSHIFT ) | + bootArgs->kernDev &= ~((B_UNITMASK << B_UNITSHIFT ) | (B_PARTITIONMASK << B_PARTITIONSHIFT)); - kbp->kernDev |= MAKEKERNDEV( 0, - /* unit */ BIOS_DEV_UNIT(gBootVolume->biosdev), + bootArgs->kernDev |= MAKEKERNDEV( 0, + /* unit */ BIOS_DEV_UNIT(gBootVolume), /* partition */ gBootVolume->part_no ); } // Load config table specified by the user, or use the default. - getValueForBootKey( cp, "config", &val, &cnt ); + if (getValueForBootKey( cp, "config", &val, &cnt ) == FALSE) { + val = 0; + cnt = 0; + } loadSystemConfig(val, cnt); if ( !sysConfigValid ) return -1; @@ -574,28 +580,52 @@ int processBootOptions() if (( kernel = extractKernelName((char **)&cp) )) { - strcpy( kbp->bootFile, kernel ); + strcpy( bootArgs->bootFile, kernel ); } else { if ( getValueForKey( kKernelNameKey, &val, &cnt ) ) - strncpy( kbp->bootFile, val, cnt ); + strlcpy( bootArgs->bootFile, val, cnt+1 ); + } + + // Check to see if we should ignore saved kernel flags. + if (getValueForBootKey(cp, "-F", &val, &cnt) == FALSE) { + if (getValueForKey( kKernelFlagsKey, &val, &cnt ) == FALSE) { + val = 0; + cnt = 0; + } } // Store the merged kernel flags and boot args. - getValueForKey( kKernelFlagsKey, &val, &cnt ); - if ( (strlen(cp) + 1 + cnt) < BOOT_STRING_LEN ) - { - if (cnt) strncpy(kbp->bootString, val, cnt); - sprintf(&kbp->bootString[cnt], "%s%s", cnt ? " " : "", cp); + cntRemaining = BOOT_STRING_LEN - 2; // save 1 for NULL, 1 for space + if (cnt > cntRemaining) { + error("Warning: boot arguments too long, truncated\n"); + cnt = cntRemaining; + } + if (cnt) { + strncpy(bootArgs->bootString, val, cnt); + bootArgs->bootString[cnt++] = ' '; } + cntRemaining = cntRemaining - cnt; + userCnt = strlen(cp); + if (userCnt > cntRemaining) { + error("Warning: boot arguments too long, truncated\n"); + userCnt = cntRemaining; + } + strncpy(&bootArgs->bootString[cnt], cp, userCnt); + bootArgs->bootString[cnt+userCnt] = '\0'; gVerboseMode = getValueForKey( "-v", &val, &cnt ) || getValueForKey( "-s", &val, &cnt ); gBootGraphics = getBoolForKey( kBootGraphicsKey ); + gBootGraphics = YES; + if ( getValueForKey(kBootGraphicsKey, &val, &cnt) && cnt && + (val[0] == 'N' || val[0] == 'n') ) + gBootGraphics = NO; + gBootMode = ( getValueForKey( "-f", &val, &cnt ) ) ? kBootModeSafe : kBootModeNormal; diff --git a/i386/boot2/prompt.c b/i386/boot2/prompt.c index cf2ea4d..a665a18 100644 --- a/i386/boot2/prompt.c +++ b/i386/boot2/prompt.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/cdboot/Makefile b/i386/cdboot/Makefile new file mode 100644 index 0000000..7cd53ad --- /dev/null +++ b/i386/cdboot/Makefile @@ -0,0 +1,25 @@ + +DIR = cdboot +include ../MakePaths.dir + +NASM = $(SYMROOT)/nasm +INSTALLDIR = $(DSTROOT)/usr/standalone/i386 +DIRS_NEEDED = $(SYMROOT) + +all: $(DIRS_NEEDED) cdboot + +cdboot: cdboot.s $(SYMROOT)/boot Makefile $(NASM) + $(NASM) cdboot.s -o $(SYMROOT)/cdboot + dd if=$(SYMROOT)/boot of=$(SYMROOT)/cdboot conv=sync bs=2k seek=1 + +biostest: biostest.asm Makefile $(NASM) + $(NASM) biostest.asm -o $(SYMROOT)/$@ + +install_i386:: all $(INSTALLDIR) + cp $(SYMROOT)/cdboot $(INSTALLDIR) + cd $(INSTALLDIR); chmod u+w cdboot + +include ../MakeInc.dir + +#dependencies + diff --git a/i386/cdboot/biostest.asm b/i386/cdboot/biostest.asm new file mode 100644 index 0000000..39dcb7f --- /dev/null +++ b/i386/cdboot/biostest.asm @@ -0,0 +1,325 @@ +; Copyright (c) 2002 Apple Computer, Inc. All rights reserved. +; +; @APPLE_LICENSE_HEADER_START@ +; +; Portions Copyright (c) 2002 Apple Computer, Inc. All Rights +; Reserved. This file contains Original Code and/or Modifications of +; Original Code as defined in and that are subject to the Apple Public +; Source License Version 1.2 (the "License"). You may not use this file +; except in compliance with the License. Please obtain a copy of the +; License at http://www.apple.com/publicsource and read it before using +; this file. +; +; The Original Code and all software distributed under the License are +; distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER +; EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, +; INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, +; FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the +; License for the specific language governing rights and limitations +; under the License. +; +; @APPLE_LICENSE_HEADER_END@ +; + +kStackAddr EQU 0xFFF0 + + code16 + ORG 0x7c00 + + SEGMENT .text + +boot equ $ + +_start: cli + jmp 0:start + times 8-($-$$) nop ; Ensure table is at offset 8 + + ; El Torito boot information table, filled in by the + ; mkisofs -boot-info-table option +bi_pvd: dd 0 ; LBA of primary volume descriptor +bi_file: dd 0 ; LBA of boot file +bi_length: dd 0 ; Length of boot file +bi_csum: dd 0 ; Checksum of boot file +bi_reserved: times 10 dd 0 ; Reserved + + + +start: + xor ax, ax + mov ss, ax + mov sp, kStackAddr + sti + cld + mov ds, ax + mov es, ax + mov [biosdrive], dl + + mov si, header_str + call print_string + + mov si, drive_str ; print drive number + call print_string + mov al, dl + call print_hex + mov si, crnl_str + call print_string + +test1: ; Test 1: El Torito status call + mov si, test1_str + call print_string + + mov ax, 0x4b01 + mov al, 0x01 + ;; dl already contains drive number + mov esi, spec + int 0x13 + + jnc test1a ; CF clear? + +test1_fail: + mov si, test1_fail1_str + call print_string + jmp short test1_end + +test1a: + cmp [spec.drive], dl ; drive in spec packet matches? + jne test1a_fail + mov si, pass_str + call print_string + jmp short test1_end + +test1a_fail: + mov si, test1_fail2_str + call print_string + +test1_end: + mov si, crnl_str + call print_string + + +test2: ; Check for EBIOS support + mov si, test2_str + call print_string + + mov cx, 0 + mov ah, 0x41 + mov bx, 0x55aa + mov dl, [biosdrive] + int 0x13 + + jnc test2a ; CF clear? + +test2_fail: + mov si, test2_fail1_str + call print_string + jmp short test2_end + +test2a: + cmp bx, 0xaa55 + je test2b + +test2a_fail: + mov si, test2_fail2_str + call print_string + jmp short test2_end + +test2b: + mov si, test2_vers_str ; print EDD version + call print_string + push cx + mov al, ah + call print_hex + mov si, test2_flag_str ; print EDD flags + call print_string + mov al, cl + call print_hex + mov al, ' ' + call putc + pop cx + and cl, 0x01 ; EDD drive access? + jnz test2_pass + +test2b_fail: + mov si, test2_fail3_str + call print_string + jmp short test2_end + +test2_pass + mov si, pass_str + call print_string + +test2_end: + mov si, crnl_str + call print_string + +test3: ; Disk geometry + mov si, test3_str + call print_string + + mov ah, 0x48 + mov dl, [biosdrive] + mov si, disk_params + int 0x13 + + jnc test3a + +test3_fail: + mov si, test3_fail1_str + call print_string + jmp test3_end + +test3a: + cmp word [disk_params.nbps], 0x0800 + je test3_pass + +test3a_fail: + mov al, [disk_params.nbps+1] + call print_hex + mov al, [disk_params.nbps] + call print_hex + mov al, ' ' + call putc + mov si, test3_fail2_str + call print_string + jmp test3_end + +test3_pass: + mov si, pass_str + call print_string + +test3_end: + mov si, crnl_str + call print_string + + +finished: + mov si, finished_str + call print_string + +halt: hlt + jmp short halt + + + + ;; ----- Helper functions ----- + + ;; putc(ch) + ;; character in AL + ;; clobbers AX, BX +putc: mov bx, 0x000f + mov ah, 0x0e + int 0x10 + ret + + ;; getc() + ;; clobbers AH + ;; returns character in AL +getc: mov ah, 0 + int 0x16 + ret + +;-------------------------------------------------------------------------- +; Write the byte value to the console in hex. +; +; Arguments: +; AL = Value to be displayed in hex. +; +print_hex: + push ax + ror al, 4 + call print_nibble ; display upper nibble + pop ax + call print_nibble ; display lower nibble + ret + +print_nibble: + and al, 0x0f + add al, '0' + cmp al, '9' + jna .print_ascii + add al, 'A' - '9' - 1 +.print_ascii: + call putc + ret + +;-------------------------------------------------------------------------- +; Write a string to the console. +; +; Arguments: +; DS:SI pointer to a NULL terminated string. +; +; Clobber list: +; none +; +print_string: + pushad + mov bx, 1 ; BH=0, BL=1 (blue) +.loop + lodsb ; load a byte from DS:SI into AL + cmp al, 0 ; Is it a NULL? + je .exit ; yes, all done + mov ah, 0xE ; INT10 Func 0xE + int 0x10 ; display byte in tty mode + jmp short .loop +.exit + popad + ret + + + SEGMENT .data + + ;; Strings + +header_str: db "BIOS test v0.3", 10,13, 0 +finished_str: db "Tests completed.", 10,13,0 +drive_str: db "Boot drive: ", 0 +pass_str: db "pass", 0 +fail_str: db "FAIL", 0 +crnl_str: db 10,13, 0 +test1_str: db "Test 1: El Torito status: ", 0 +test1_fail1_str: db "FAIL (CF=1)", 0 +test1_fail2_str: db "FAIL (spec drive)", 0 +test2_str: db "Test 2: EBIOS check: ", 0 +test2_vers_str: db "vers. ", 0 +test2_flag_str: db " flags ", 0 +test2_fail1_str: db "FAIL (CF=1)", 0 +test2_fail2_str: db "FAIL (BX != AA55)", 0 +test2_fail3_str: db "FAIL (CL & 1 == 0)", 0 +test3_str: db "Test 3: Geometry check: ", 0 +test3_fail1_str: db "FAIL (CF=1)", 0 +test3_fail2_str: db "FAIL (nbps != 0x200)", 0 + + ;; Other variables + +biosdrive: db 0 + + ;; El Torito spec packet +spec: +.size: db 0x13 +.type: db 0 +.drive: db 0 +.index: db 0 +.lba: dd 0 +.spec: dw 0 +.userseg: dw 0 +.loadseg: dw 0 +.seccnt: dw 0 +.cylcnt: db 0 +.ccl: db 0 +.hdcnt: db 0 + + ;; Disk parameter packet +disk_params: +.size: dw 66 +.flags: dw 0 +.cyls: dd 0 +.heads: dd 0 +.spt: dd 0 +.sectors: dd 0,0 +.nbps: dw 0 +.dpte_offset: dw 0 +.dpte_segment: dw 0 +.key: dw 0 +.ignored: times 34 db 0 + + diff --git a/i386/cdboot/cdboot.s b/i386/cdboot/cdboot.s new file mode 100644 index 0000000..54226fa --- /dev/null +++ b/i386/cdboot/cdboot.s @@ -0,0 +1,309 @@ +; Copyright (c) 2003 Apple Computer, Inc. All rights reserved. +; +; @APPLE_LICENSE_HEADER_START@ +; +; Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. +; +; This file contains Original Code and/or Modifications of Original Code +; as defined in and that are subject to the Apple Public Source License +; Version 2.0 (the 'License'). You may not use this file except in +; compliance with the License. Please obtain a copy of the License at +; http://www.opensource.apple.com/apsl/ and read it before using this +; file. +; +; The Original Code and all software distributed under the License are +; distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER +; EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, +; INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, +; FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. +; Please see the License for the specific language governing rights and +; limitations under the License. +; +; @APPLE_LICENSE_HEADER_END@ + +DEBUG EQU 0 + +%macro DebugCharMacro 1 + push ax + mov al, %1 + call putc + pop ax +%endmacro +%macro DebugPauseMacro 0 + push ax + call getc + pop ax +%endmacro + +%if DEBUG +%define DebugChar(x) DebugCharMacro x +%define DebugPause(x) DebugPauseMacro +%else +%define DebugChar(x) +%define DebugPause(x) +%endif + +kBoot2Sectors EQU 112 ; sectors to load for boot2 +kBoot2Address EQU 0x0200 ; boot2 load address +kBoot2Segment EQU 0x2000 ; boot2 load segment + +kBoot0Stack EQU 0xFFF0 ; boot0 stack pointer + +kReadBuffer EQU 0x1000 ; disk data buffer address + +kVolSectorOffset EQU 0x47 ; offset in buffer of sector number + ; in volume descriptor +kBootSectorOffset EQU 0x28 ; offset in boot catalog + ; of sector number to load boot file +kBootCountOffset EQU 0x26 ; offset in boot catalog + ; of number of sectors to read + + + code16 + ORG 0x7c00 + + SEGMENT .text + +start: + cli + jmp 0:start1 + times 8-($-$$) nop ; Put boot information table at offset 8 + + ; El Torito boot information table, filled in by the + ; mkisofs -boot-info-table option, if used. +bi_pvd: dd 0 ; LBA of primary volume descriptor +bi_file: dd 0 ; LBA of boot file +bi_length: dd 0 ; Length of boot file +bi_csum: dd 0 ; Checksum of boot file +bi_reserved: times 10 dd 0 ; Reserved + +start1: + xor ax, ax ; zero %ax + mov ss, ax ; setup the + mov sp, kBoot0Stack ; stack + sti + cld ; increment SI after each lodsb call + mov ds, ax ; setup the + mov es, ax ; data segments + ;; BIOS boot drive is in DL + + DebugChar('!') + DebugPause() + +%if DEBUG + mov eax, [kBoot2LoadAddr] + call print_hex + call getc +%endif + + ;; + ;; The BIOS likely didn't load the rest of the booter, + ;; so we have to fetch it ourselves. + ;; + xor ax, ax + mov es, ax + mov bx, kReadBuffer + mov al, 1 + mov ecx, 17 + call read_lba + jc error + + DebugChar('A') + + mov ecx, [kReadBuffer + kVolSectorOffset] +%if DEBUG + mov eax, ecx + call print_hex + DebugPause() +%endif + mov al, 1 + call read_lba + jc error + + ;; Now we have the boot catalog in the buffer. + ;; Really we should look at the validation entry, but oh well. + + DebugChar('B') + + mov ecx, [kReadBuffer + kBootSectorOffset] + inc ecx ; skip the first sector which is what we are in +%if DEBUG + mov eax, ecx + call print_hex + DebugPause() +%endif + + mov ax, kBoot2Segment + mov es, ax + + mov al, kBoot2Sectors / 4 + mov bx, kBoot2Address + call read_lba + jc error + + DebugChar('C') +%if DEBUG + mov eax, [es:kBoot2Address] + call print_hex + DebugPause() +%endif + + xor ax, ax + mov es, ax + + DebugChar('X') + DebugPause() + + ;; Jump to newly-loaded booter + jmp kBoot2Segment:kBoot2Address + +error: + mov al, 'E' + call putc + hlt + + ;; + ;; Support functions + ;; + +;-------------------------------------------------------------------------- +; read_lba - Read sectors from CD using LBA addressing. +; +; Arguments: +; AL = number of 2048-byte sectors to read (valid from 1-127). +; ES:BX = pointer to where the sectors should be stored. +; ECX = sector offset in partition +; DL = drive number (0x80 + unit number) +; +; Returns: +; CF = 0 success +; 1 error +; +read_lba: + pushad ; save all registers + mov bp, sp ; save current SP + + ; + ; Create the Disk Address Packet structure for the + ; INT13/F42 (Extended Read Sectors) on the stack. + ; + + ; push DWORD 0 ; offset 12, upper 32-bit LBA + push ds ; For sake of saving memory, + push ds ; push DS register, which is 0. + + push ecx + + push es ; offset 6, memory segment + + push bx ; offset 4, memory offset + + xor ah, ah ; offset 3, must be 0 + push ax ; offset 2, number of sectors + + push WORD 16 ; offset 0-1, packet size + + ; + ; INT13 Func 42 - Extended Read Sectors + ; + ; Arguments: + ; AH = 0x42 + ; DL = drive number (80h + drive unit) + ; DS:SI = pointer to Disk Address Packet + ; + ; Returns: + ; AH = return status (sucess is 0) + ; carry = 0 success + ; 1 error + ; + ; Packet offset 2 indicates the number of sectors read + ; successfully. + ; + mov si, sp + mov ah, 0x42 + int 0x13 + + jnc .exit + + DebugChar('R') ; indicate INT13/F42 error + + ; + ; Issue a disk reset on error. + ; Should this be changed to Func 0xD to skip the diskette controller + ; reset? + ; + xor ax, ax ; Func 0 + int 0x13 ; INT 13 + stc ; set carry to indicate error + +.exit: + mov sp, bp ; restore SP + popad + ret + +;; +;; Display a single character from AL. +;; +putc: pushad + mov bx, 0x1 ; attribute for output + mov ah, 0xe ; BIOS: put_char + int 0x10 ; call BIOS, print char in %al + popad + ret + +;; +;; Get a character from the keyboard and return it in AL. +;; +getc: mov ah, 0 + int 0x16 + ret + +%if DEBUG +;-------------------------------------------------------------------------- +; Write the 4-byte value to the console in hex. +; +; Arguments: +; EAX = Value to be displayed in hex. +; +print_hex: + pushad + mov cx, WORD 4 + bswap eax +.loop + push ax + ror al, 4 + call print_nibble ; display upper nibble + pop ax + call print_nibble ; display lower nibble + ror eax, 8 + loop .loop + + mov al, 10 ; carriage return + call putc + mov al, 13 + call putc + popad + ret + +print_nibble: + and al, 0x0f + add al, '0' + cmp al, '9' + jna .print_ascii + add al, 'A' - '9' - 1 +.print_ascii: + call putc + ret + +%endif ; DEBUG + + + + ;; Pad this file to a size of 2048 bytes (one CD sector). +pad: + times 2048-($-$$) db 0 + + ;; Location of loaded boot2 code. +kBoot2LoadAddr equ $ + + END diff --git a/i386/libsa/Makefile b/i386/libsa/Makefile index 0f65de1..7772a5d 100644 --- a/i386/libsa/Makefile +++ b/i386/libsa/Makefile @@ -8,7 +8,8 @@ INSTALL_MD_DIR = $(DSTROOT)/System/Library/Frameworks/System.framework/Versions/ OPTIM = -Os CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -Werror \ - -fno-builtin -static + -fno-builtin -static -fomit-frame-pointer \ + -mpreferred-stack-boundary=2 -fno-align-functions INC = -I. -I$(SYMROOT) -I$(UTILDIR) ifneq "" "$(wildcard /bin/mkdirs)" @@ -32,9 +33,8 @@ CFILES = prf.c printf.c zalloc.c \ string.c strtol.c error.c \ qsort.c HFILES = memory.h -EXPORTED_HFILES = libsa.h kernBootStruct.h memory.h +EXPORTED_HFILES = libsa.h memory.h INSTALLED_SA_HFILES = libsa.h -INSTALLED_MD_HFILES = kernBootStruct.h OTHERFILES = Makefile ALLSRC = $(SFILES) $(CFILES) $(HFILES) $(OTHERFILES) LIBS = libsa.a @@ -55,7 +55,6 @@ $(INSTALL_SA_DIR) $(INSTALL_MD_DIR): installhdrs:: $(INSTALL_SA_DIR) $(INSTALL_MD_DIR) cp $(INSTALLED_SA_HFILES) $(INSTALL_SA_DIR) - cp $(INSTALLED_MD_HFILES) $(INSTALL_MD_DIR) include ../MakeInc.dir diff --git a/i386/libsa/error.c b/i386/libsa/error.c index d536dd4..06e3627 100644 --- a/i386/libsa/error.c +++ b/i386/libsa/error.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/libsa/kernBootStruct.h b/i386/libsa/kernBootStruct.h deleted file mode 100644 index 550db5d..0000000 --- a/i386/libsa/kernBootStruct.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. - * - * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * kernBootStruct.h - * What the booter leaves behind for the kernel. - */ - -#ifndef __BOOT_KERNBOOTSTRUCT_H -#define __BOOT_KERNBOOTSTRUCT_H - -/* - * Maximum number of boot drivers that can be loaded. - */ -#define NDRIVERS 500 - -/* - * Types of boot driver that may be loaded by the booter. - */ -enum { - kBootDriverTypeInvalid = 0, - kBootDriverTypeKEXT = 1, - kBootDriverTypeMKEXT = 2 -}; - -typedef struct { - unsigned long address; // address where driver was loaded - unsigned long size; // number of bytes - unsigned long type; // driver type -} driver_config_t; - -/* - * APM BIOS information. - */ -typedef struct { - unsigned short major_vers; // == 0 if not present - unsigned short minor_vers; - unsigned long cs32_base; - unsigned long cs16_base; - unsigned long ds_base; - unsigned long cs_length; - unsigned long ds_length; - unsigned long entry_offset; - union { - struct { - unsigned long mode_16 :1; - unsigned long mode_32 :1; - unsigned long idle_slows_cpu :1; - unsigned long reserved :29; - } f; - unsigned long data; - } flags; - unsigned long connected; -} APM_config_t; - -/* - * PCI bus information. - */ -typedef struct _PCI_bus_info_t { - union { - struct { - unsigned char configMethod1 :1; - unsigned char configMethod2 :1; - unsigned char :2; - unsigned char specialCycle1 :1; - unsigned char specialCycle2 :1; - } s; - unsigned char d; - } u_bus; - unsigned char maxBusNum; - unsigned char majorVersion; - unsigned char minorVersion; - unsigned char BIOSPresent; -} PCI_bus_info_t; - -/* - * Video information. - */ -struct boot_video { - unsigned long v_baseAddr; // Base address of video memory - unsigned long v_display; // Display Code (if Applicable - unsigned long v_rowBytes; // Number of bytes per pixel row - unsigned long v_width; // Width - unsigned long v_height; // Height - unsigned long v_depth; // Pixel Depth -}; - -typedef struct boot_video boot_video; - -#define GRAPHICS_MODE 1 -#define TEXT_MODE 0 - -#define BOOT_STRING_LEN 160 -#define CONFIG_SIZE (12 * 4096) - -typedef struct { - short version; - char bootString[BOOT_STRING_LEN]; // boot arguments - int magicCookie; // KERNBOOTMAGIC - int numIDEs; // number of IDE drives - int rootdev; // root device - int convmem; // conventional memory - int extmem; // extended memory - char bootFile[128]; // kernel file name - int firstAddr0; // first address for kern convmem - int diskInfo[4]; // info for bios dev 80-83 - int graphicsMode; // booted in graphics mode? - int kernDev; // device kernel was fetched from - int numBootDrivers; // number of drivers loaded - char * configEnd; // pointer to end of config files - int kaddr; // kernel load address - int ksize; // size of kernel - driver_config_t driverConfig[NDRIVERS]; - char _reserved[2052]; - boot_video video; - PCI_bus_info_t pciInfo; - APM_config_t apmConfig; - char config[CONFIG_SIZE]; -} KERNBOOTSTRUCT; - -#define KERNSTRUCT_ADDR ((KERNBOOTSTRUCT *) 0x11000) -#define KERNBOOTMAGIC 0xa7a7a7a7 - -#ifndef KERNEL -extern KERNBOOTSTRUCT * kernBootStruct; -#endif - -#endif /* !__BOOT_KERNBOOTSTRUCT_H */ diff --git a/i386/libsa/libsa.h b/i386/libsa/libsa.h index f162c84..a6d06ce 100644 --- a/i386/libsa/libsa.h +++ b/i386/libsa/libsa.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -48,6 +49,7 @@ extern int strcmp(const char * s1, const char * s2); extern int strncmp(const char * s1, const char * s2, size_t n); extern char * strcpy(char * s1, const char * s2); extern char * strncpy(char * s1, const char * s2, size_t n); +extern char * strlcpy(char * s1, const char * s2, size_t n); extern int atoi(const char * str); extern int ptol(const char * str); extern int strlen(const char * str); @@ -85,7 +87,7 @@ extern int slvprintf(char * buffer, int len, const char * fmt, va_list arg); /* * zalloc.c */ -extern void malloc_init(char * start, int size, int nodes); +extern void malloc_init(char * start, int size, int nodes, void (*malloc_error)(char *, size_t)); extern void * malloc(size_t size); extern void free(void * start); extern void * realloc(void * ptr, size_t size); diff --git a/i386/libsa/memory.h b/i386/libsa/memory.h index 7eed3ea..6ea41f3 100644 --- a/i386/libsa/memory.h +++ b/i386/libsa/memory.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -31,11 +32,14 @@ #define STACK_SEG 0x3000 #define STACK_OFS 0xFFF0 // stack pointer +#define BOOT1U_SEG 0x1000 +#define BOOT1U_OFS 0x0200 + #define BOOT2_SEG BASE_SEG #define BOOT2_OFS 0x0200 // 512 byte disk sector offset #define BIOS_ADDR 0x0C00 // BIOS disk I/O buffer -#define BIOS_LEN 0x2400 // 9K +#define BIOS_LEN 0x2000 // 8K - divisible by 512 and 2048 /* These are all "virtual" addresses... * which are physical addresses plus MEMBASE. @@ -48,19 +52,21 @@ #define BOOTSTRUCT_LEN 0x00F000 #define BASE_ADDR ADDR32(BASE_SEG, 0) +#define BASE1U_ADDR ADDR32(BOOT1U_SEG, 0) +#define BOOT1U_ADDR ADDR32(BOOT1U_SEG, BOOT1U_OFS) #define BOOT2_ADDR ADDR32(BOOT2_SEG, BOOT2_OFS) #define VIDEO_ADDR 0x0A0000 // unusable space #define VIDEO_LEN 0x060000 -#define KERNEL_ADDR 0x100000 // 15M kernel + drivers -#define KERNEL_LEN 0xF00000 +#define KERNEL_ADDR 0x0100000 // 64M kernel + drivers +#define KERNEL_LEN 0x4000000 -#define ZALLOC_ADDR 0x1000000 // 4M zalloc area -#define ZALLOC_LEN 0x400000 +#define ZALLOC_ADDR 0x4100000 // 47M zalloc area +#define ZALLOC_LEN 0x2F00000 -#define LOAD_ADDR 0x01400000 // File download buffer -#define LOAD_LEN 0x800000 // Max file size +#define LOAD_ADDR 0x7000000 // 16M File load buffer +#define LOAD_LEN 0x1000000 #define TFTP_ADDR LOAD_ADDR // tftp download buffer #define TFTP_LEN LOAD_LEN @@ -78,6 +84,7 @@ * Extract segment/offset from a linear address. */ #define OFFSET16(addr) ((addr) - BASE_ADDR) +#define OFFSET1U16(addr) ((addr) - BASE1U_ADDR) #define OFFSET(addr) ((addr) & 0xFFFF) #define SEGMENT(addr) (((addr) & 0xF0000) >> 4) diff --git a/i386/libsa/prf.c b/i386/libsa/prf.c index a9a74e5..97d34d7 100644 --- a/i386/libsa/prf.c +++ b/i386/libsa/prf.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/libsa/printf.c b/i386/libsa/printf.c index 5013b2a..d411570 100644 --- a/i386/libsa/printf.c +++ b/i386/libsa/printf.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/libsa/qsort.c b/i386/libsa/qsort.c index 652e2f3..90d499b 100644 --- a/i386/libsa/qsort.c +++ b/i386/libsa/qsort.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -180,11 +181,11 @@ loop: SWAPINIT(a, es); pn = a + n * es; r = min(pa - (char *)a, pb - pa); vecswap(a, pb - r, r); - r = min(pd - pc, pn - pd - es); + r = min(pd - pc, (pn - pd) - (int)es); vecswap(pb, pn - r, r); - if ((r = pb - pa) > es) + if ((r = pb - pa) > (int)es) qsort(a, r / es, es, cmp); - if ((r = pd - pc) > es) { + if ((r = pd - pc) > (int)es) { /* Iterate rather than recurse to save stack space */ a = pn - r; n = r / es; diff --git a/i386/libsa/setjmp.s b/i386/libsa/setjmp.s index 6082ea0..547eea6 100644 --- a/i386/libsa/setjmp.s +++ b/i386/libsa/setjmp.s @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/libsa/string.c b/i386/libsa/string.c index 2d76e4e..0cf9dd5 100644 --- a/i386/libsa/string.c +++ b/i386/libsa/string.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -103,7 +104,16 @@ strncpy(char * s1, const char * s2, size_t n) register char *ret = s1; while (n && (*s1++ = *s2++)) n--; - if (!n) *s1=0; + return ret; +} + +char * +strlcpy(char * s1, const char * s2, size_t n) +{ + register char *ret = s1; + while (n && (*s1++ = *s2++)) + n--; + if (!n) *--s1=0; return ret; } diff --git a/i386/libsa/strtol.c b/i386/libsa/strtol.c index afad201..ad687e9 100644 --- a/i386/libsa/strtol.c +++ b/i386/libsa/strtol.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/libsa/zalloc.c b/i386/libsa/zalloc.c index 932fdec..5652665 100644 --- a/i386/libsa/zalloc.c +++ b/i386/libsa/zalloc.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -40,65 +41,100 @@ int zout; typedef struct { char * start; - int size; + size_t size; } zmem; static zmem * zalloced; static zmem * zavailable; static short availableNodes, allocedNodes, totalNodes; static char * zalloc_base; -static void (*zerror)(); +static char * zalloc_end; +static void (*zerror)(char *, size_t); static void zallocate(char * start,int size); static void zinsert(zmem * zp, int ndx); static void zdelete(zmem * zp, int ndx); static void zcoalesce(void); -#define ZALLOC_NODES 1024 +#if ZDEBUG +size_t zalloced_size; +#endif -static void malloc_error() +#define ZALLOC_NODES 16384 + +static void malloc_error(char *addr, size_t size) { - // printf("Out of memory\n"); +#ifdef i386 + asm("hlt"); +#endif } // define the block of memory that the allocator will use -void malloc_init(char * start, int size, int nodes) +void malloc_init(char * start, int size, int nodes, void (*malloc_err_fn)(char *, size_t)) { - zalloc_base = start; - totalNodes = nodes; + zalloc_base = start ? start : (char *)ZALLOC_ADDR; + totalNodes = nodes ? nodes : ZALLOC_NODES; zalloced = (zmem *) zalloc_base; - start += sizeof(zmem) * nodes; - zavailable = (zmem *) start; - start += sizeof(zmem) * nodes; - zavailable[0].start = start; - zavailable[0].size = size; + zavailable = (zmem *) zalloc_base + sizeof(zmem) * totalNodes;; + zavailable[0].start = (char *)zavailable + sizeof(zmem) * totalNodes; + if (size == 0) size = ZALLOC_LEN; + zavailable[0].size = size - (zavailable[0].start - zalloc_base); + zalloc_end = zalloc_base + size; availableNodes = 1; allocedNodes = 0; - zerror = malloc_error; + zerror = malloc_err_fn ? malloc_err_fn : malloc_error; } +#define BEST_FIT 1 + void * malloc(size_t size) { int i; +#if BEST_FIT + int bestFit; + size_t smallestSize; +#endif char * ret = 0; if ( !zalloc_base ) { // this used to follow the bss but some bios' corrupted it... - malloc_init((char *)ZALLOC_ADDR, ZALLOC_LEN, ZALLOC_NODES); + malloc_init((char *)ZALLOC_ADDR, ZALLOC_LEN, ZALLOC_NODES, malloc_error); } size = ((size + 0xf) & ~0xf); + + if (size == 0) { + if (zerror) (*zerror)((char *)0xdeadbeef, 0); + } +#if BEST_FIT + smallestSize = 0; + bestFit = -1; +#endif for (i = 0; i < availableNodes; i++) { - // uses first possible node, doesn't try to find best fit + // find node with equal size, or if not found, + // then smallest node that fits. if ( zavailable[i].size == size ) { zallocate(ret = zavailable[i].start, size); zdelete(zavailable, i); availableNodes--; goto done; } +#if BEST_FIT + else + { + if ((zavailable[i].size > size) && + ((smallestSize == 0) || + (zavailable[i].size < smallestSize))) + { + bestFit = i; + smallestSize = zavailable[i].size; + } + } + +#else else if ( zavailable[i].size > size ) { zallocate(ret = zavailable[i].start, size); @@ -106,25 +142,49 @@ void * malloc(size_t size) zavailable[i].size -= size; goto done; } - } +#endif + } +#if BEST_FIT + if (bestFit != -1) + { + zallocate(ret = zavailable[bestFit].start, size); + zavailable[bestFit].start += size; + zavailable[bestFit].size -= size; + } +#endif done: - if ((ret == 0) || (ret + size >= (char *)(ZALLOC_ADDR + ZALLOC_LEN))) + if ((ret == 0) || (ret + size >= zalloc_end)) { - if (zerror) (*zerror)(ret); + if (zerror) (*zerror)(ret, size); } if (ret != 0) { bzero(ret, size); } +#if ZDEBUG + zalloced_size += size; +#endif return (void *) ret; } void free(void * pointer) { - int i, tsize = 0, found = 0; + unsigned long rp; + int i, found = 0; + size_t tsize = 0; char * start = pointer; +#if i386 + // Get return address of our caller, + // in case we have to report an error below. + asm("movl %%esp, %%eax\n\t" + "subl $4, %%eax\n\t" + "movl 0(%%eax), %%eax" : "=a" (rp) ); +#else + rp = 0; +#endif + if ( !start ) return; for (i = 0; i < allocedNodes; i++) @@ -138,10 +198,19 @@ void free(void * pointer) #endif zdelete(zalloced, i); allocedNodes--; found = 1; +#if ZDEBUG + memset(pointer, 0x5A, tsize); +#endif break; } } - if ( !found ) return; + if ( !found ) { + if (zerror) (*zerror)(pointer, rp); + else return; + } +#if ZDEBUG + zalloced_size -= tsize; +#endif for (i = 0; i < availableNodes; i++) { @@ -154,7 +223,7 @@ void free(void * pointer) } if ((i > 0) && - (zavailable[i-1].start + zavailable[i-1].size == start)) + (zavailable[i-1].start + zavailable[i-1].size == start)) { zavailable[i-1].size += tsize; zcoalesce(); @@ -163,16 +232,21 @@ void free(void * pointer) if ((start + tsize) < zavailable[i].start) { - zinsert(zavailable, i); availableNodes++; + if (++availableNodes > totalNodes) { + if (zerror) (*zerror)((char *)0xf000f000, 0); + } + zinsert(zavailable, i); zavailable[i].start = start; zavailable[i].size = tsize; return; } } + if (++availableNodes > totalNodes) { + if (zerror) (*zerror)((char *)0xf000f000, 1); + } zavailable[i].start = start; zavailable[i].size = tsize; - availableNodes++; zcoalesce(); return; } @@ -186,7 +260,9 @@ zallocate(char * start,int size) #endif zalloced[allocedNodes].start = start; zalloced[allocedNodes].size = size; - allocedNodes++; + if (++allocedNodes > totalNodes) { + if (zerror) (*zerror)((char *)0xf000f000, 2); + }; } static void @@ -201,8 +277,7 @@ zinsert(zmem * zp, int ndx) for (; i >= ndx; i--, z1--, z2--) { - z2->start = z1->start; - z2->size = z1->size; + *z2 = *z1; } } @@ -217,8 +292,7 @@ zdelete(zmem * zp, int ndx) for (i = ndx; i < totalNodes-1; i++, z1++, z2++) { - z1->start = z2->start; - z1->size = z2->size; + *z1 = *z2; } } diff --git a/i386/libsaio/Makefile b/i386/libsaio/Makefile index 079c6a0..8ece05e 100644 --- a/i386/libsaio/Makefile +++ b/i386/libsaio/Makefile @@ -9,11 +9,13 @@ SYMROOT= OPTIM = -Os CFLAGS = $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost -Werror \ - -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER -fno-builtin -static \ - -DRCZ_COMPRESSED_FILE_SUPPORT + -D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \ + -DRCZ_COMPRESSED_FILE_SUPPORT \ + -fno-builtin -static -fomit-frame-pointer \ + -mpreferred-stack-boundary=2 -fno-align-functions DEFINES= CONFIG = hd -INC = -I../rcz -I. -I$(SYMROOT) -I$(UTILDIR) -I$(LIBSADIR) -I/System/Library/Frameworks/System.framework/PrivateHeaders +INC = -I../rcz -I. -I$(SYMROOT) -I$(UTILDIR) -I$(LIBSADIR) ifneq "" "$(wildcard /bin/mkdirs)" MKDIRS = /bin/mkdirs else @@ -29,8 +31,9 @@ VPATH = $(OBJROOT):$(SYMROOT) SAIO_OBJS = table.o asm.o bios.o biosfn.o \ disk.o sys.o cache.o bootstruct.o \ ufs.o ufs_byteorder.o \ - stringTable.o load.o misc.o \ - vbe.o nbp.o hfs.o hfs_compare.o + stringTable.o load.o memory.o misc.o \ + vbe.o nbp.o hfs.o hfs_compare.o \ + xml.o SAIO_EXTERN_OBJS = console.o diff --git a/i386/libsaio/asm.s b/i386/libsaio/asm.s index 2b27ffd..9cd131b 100644 --- a/i386/libsaio/asm.s +++ b/i386/libsaio/asm.s @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -31,6 +32,17 @@ /* * HISTORY * $Log: asm.s,v $ + * Revision 1.5 2002/11/05 20:34:26 jliu + * Integrating: + * 3051234 boot shouldnt require Graphics = Yes + * 3091627 Need support for refresh rate adjustment + * + * Revision 1.4 2002/10/02 00:06:18 curtisg + * Integrating PR-3032510. + * + * Revision 1.3.6.1 2002/08/30 21:16:29 curtisg + * KERNBOOTSTRUCT is going away in favor of KernelBootArgs_t in . + * * Revision 1.3 2002/07/09 14:06:21 jliu * Merging changes from PR-2954224 branch in boot/i386. * @@ -98,7 +110,7 @@ .file "asm.s" CR0_PE_ON = 0x1 -CR0_PE_OFF = 0x7ffffffe +CR0_PE_OFF = 0x7ffffff0 STACK32_BASE = ADDR32(STACK_SEG, 0) STACK16_SEG = STACK_SEG @@ -268,13 +280,15 @@ LABEL(_halt) jmp _halt // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// startprog(phyaddr) +// startprog(phyaddr, arg) // Start the program on protected mode where phyaddr is the entry point. +// Passes arg to the program in %eax. // LABEL(_startprog) push %ebp mov %esp, %ebp + mov 0xc(%ebp), %eax // argument to program mov 0x8(%ebp), %ecx // entry offset mov $0x28, %ebx // segment push %ebx diff --git a/i386/libsaio/bios.h b/i386/libsaio/bios.h index d99bafd..a706452 100644 --- a/i386/libsaio/bios.h +++ b/i386/libsaio/bios.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -29,6 +30,8 @@ #ifndef __LIBSAIO_BIOS_H #define __LIBSAIO_BIOS_H +#include + typedef union { unsigned int rx; unsigned short rr; @@ -71,7 +74,9 @@ typedef struct { } biosBuf_t; #define EBIOS_FIXED_DISK_ACCESS 0x01 +#define EBIOS_LOCKING_ACCESS 0x02 #define EBIOS_ENHANCED_DRIVE_INFO 0x04 -extern unsigned char uses_ebios[]; + +#define BASE_HD_DRIVE 0x80 #endif /* !__LIBSAIO_BIOS_H */ diff --git a/i386/libsaio/bios.s b/i386/libsaio/bios.s index 9654a12..4caa9df 100644 --- a/i386/libsaio/bios.s +++ b/i386/libsaio/bios.s @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -130,123 +131,3 @@ do_int: leave ret - -/*============================================================================ - * Determines the total system memory size using various BIOS Int 15 calls. - * - */ -LABEL(_get_memsize) - enter $0, $0 # create frame pointer (32 bit operand/stack) - pushal # save all registers - - movl 8(%ebp), %ebx # push input structure pointer to stack - pushl %ebx - - call __prot_to_real # switch to real mode - - ################################################################## - # In real mode. - # Do not forget the opcode overrides, since the assembler - # does not know we have made a transition to 16-bit operation. - ################################################################## - - data32 - movl $0xE801, %eax # Get memory size - clc - int $0x15 - data32 - jnc getmsz_e801 - - data32 - movl $0xDA88, %eax # Get memory size - clc - int $0x15 - data32 - jnc getmsz_da88 - - movb $0x8A, %ah # Get memory size - clc - int $0x15 - data32 - jnc getmsz_8a - - movb $0x88, %ah # Get memory size - clc - int $0x15 - data32 - jnc getmsz_88 - - xorl %edx, %edx # Error, cannot get memory size - xorl %eax, %eax - -getmsz_done: - data32 - addr32 - pushl %eax # Push EAX to 32-bit stack - - data32 - call __real_to_prot # Back to protected mode. EAX is modified. - - ################################################################## - # Back to protected mode. - ################################################################## - - popl %eax # Pop EAX from stack - popl %ebx # Pop pointer to register structure - - # Copy the result to the input structure pointed to by a pointer - # which is on top of the stack. Write register EAX and EDX to the - # structure. - - movl %eax, O_EAX(%ebx) - movl %edx, O_EDX(%ebx) - - popal # restore all registers - leave # undo enter operator - ret - -getmsz_88: - orl %eax, %eax - data32 - jz getmsz_64m - xorl %edx, %edx - -getmsz_8a: - data32 - movl $1024, %ebx # Add in 1M - addl %ebx, %eax - adcl $0, %edx - data32 - jmp getmsz_done - -getmsz_64m: - data32 - movl $1, %edx - xorl %eax, %eax - data32 - jmp getmsz_done - -getmsz_da88: - xor %dh, %dh - movb %cl, %dl - movl %ebx, %eax - data32 - jmp getmsz_8a - -getmsz_e801: - xorl %edx, %edx - orl %ebx, %ebx - data32 - jz getmsz_88 - - data32 - movl $64, %eax - mul %ebx - - data32 - movl $16384, %ebx - addl %ebx, %eax - adcl $0, %edx - - data32 - jmp getmsz_done diff --git a/i386/libsaio/biosfn.c b/i386/libsaio/biosfn.c index 8af9bbe..96c5ceb 100644 --- a/i386/libsaio/biosfn.c +++ b/i386/libsaio/biosfn.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -26,10 +27,12 @@ * All rights reserved. */ +#include "bootstruct.h" #include "libsaio.h" +#define MAX_DRIVES 8 + static biosBuf_t bb; -unsigned char uses_ebios[8] = {0, 0, 0, 0, 0, 0, 0, 0}; int bgetc(void) { @@ -77,31 +80,138 @@ unsigned int time18(void) return time.i; } -int memsize(int which) +unsigned long getMemoryMap( MemoryRange * rangeArray, + unsigned long maxRangeCount, + unsigned long * conMemSizePtr, + unsigned long * extMemSizePtr ) { - int size; - - if ( which ) + #define kMemoryMapSignature 'SMAP' + #define kDescriptorSizeMin 20 + + MemoryRange * range = rangeArray; + unsigned long count = 0; + unsigned long long conMemSize = 0; + unsigned long long extMemTop = 0; + + // The memory pointed by the rangeArray must reside within the + // first megabyte. + // + // Prepare for the INT15 E820h call. Each call returns a single + // memory range. A continuation value is returned that must be + // provided on a subsequent call to fetch the next range. + // + // Certain BIOSes (Award 6.00PG) expect the upper word in EAX + // to be cleared on entry, otherwise only a single range will + // be reported. + // + // Some BIOSes will simply ignore the value of ECX on entry. + // Probably best to keep its value at 20 to avoid surprises. + + bb.ebx.rx = 0; // Initial continuation value must be zero. + + while ( count < maxRangeCount ) { - // Get the total system memory discovered by the - // BIOS in kilobytes. + bb.intno = 0x15; + bb.eax.rx = 0xe820; + bb.ecx.rx = kDescriptorSizeMin; + bb.edx.rx = kMemoryMapSignature; + bb.edi.rr = OFFSET( (unsigned long) range ); + bb.es = SEGMENT( (unsigned long) range ); + bios(&bb); - get_memsize(&bb); - size = (bb.edx.rr << 16) | bb.eax.rr; + // Check for errors. - // Convert to extended memory size. + if ( bb.flags.cf + || bb.eax.rx != kMemoryMapSignature + || bb.ecx.rx != kDescriptorSizeMin ) break; - size = ( size > 1024 ) ? size - 1024 : 0; - } - else - { - // Get amount of conventional memory available. + // Tally up the conventional/extended memory sizes. - bb.intno = 0x12; - bios(&bb); - size = bb.eax.rr; + if ( range->type == kMemoryRangeUsable || + range->type == kMemoryRangeACPI || + range->type == kMemoryRangeNVS ) + { + // Tally the conventional memory ranges. + if ( range->base + range->length <= 0xa0000 ) + conMemSize += range->length; + + // Record the top of extended memory. + if ( range->base >= EXTENDED_ADDR && + range->base >= extMemTop ) + extMemTop = range->base + range->length; + } + + range++; + count++; + + // Is this the last address range? + + if ( bb.ebx.rx == 0 ) break; } - return size; + + if (extMemTop) extMemTop -= EXTENDED_ADDR; // convert to size + *conMemSizePtr = conMemSize / 1024; // size in KB + *extMemSizePtr = extMemTop / 1024; // size in KB + + return count; +} + +unsigned long getExtendedMemorySize() +{ + // Get extended memory size for large configurations. Not used unless + // the INT15, E820H call (Get System Address Map) failed. + // + // Input: + // + // AX Function Code E801h + // + // Outputs: + // + // CF Carry Flag Carry cleared indicates no error. + // AX Extended 1 Number of contiguous KB between 1 and 16 MB, + // maximum 0x3C00 = 15 MB. + // BX Extended 2 Number of contiguous 64 KB blocks between + // 16 MB and 4 GB. + // CX Configured 1 Number of contiguous KB between 1 and 16 MB, + // maximum 0x3C00 = 15 MB. + // DX Configured 2 Number of contiguous 64 KB blocks between + // 16 MB and 4 GB. + + bb.intno = 0x15; + bb.eax.rx = 0xe801; + bios(&bb); + + // Return the size of memory above 1MB (extended memory) in kilobytes. + + if ( bb.flags.cf == 0 ) return (bb.ebx.rr * 64 + bb.eax.rr); + + // Get Extended memory size. Called on last resort since the return + // value is limited to 16-bits (a little less than 64MB max). May + // not be supported by modern BIOSes. + // + // Input: + // + // AX Function Code E801h + // + // Outputs: + // + // CF Carry Flag Carry cleared indicates no error. + // AX Memory Count Number of contiguous KB above 1MB. + + bb.intno = 0x15; + bb.eax.rx = 0x88; + bios(&bb); + + // Return the size of memory above 1MB (extended memory) in kilobytes. + + return bb.flags.cf ? 0 : bb.eax.rr; +} + +unsigned long getConventionalMemorySize() +{ + bb.intno = 0x12; + bios(&bb); + return bb.eax.rr; // kilobytes } void video_mode(int mode) @@ -198,27 +308,113 @@ void putca(int ch, int attr, int repeat) bios(&bb); } -unsigned int get_diskinfo(int drive) +/* Check to see if the passed-in drive is in El Torito no-emulation mode. */ +int is_no_emulation(int drive) { - static struct { - unsigned short size; - unsigned short flags; - unsigned long cylinders; - unsigned long heads; - unsigned long sectors; - unsigned long long total_sectors; - unsigned short bps; - unsigned long params_p; - } ebios = {0}; - unsigned char useEbios = 0; + struct packet { + unsigned char packet_size; + unsigned char media_type; + unsigned char drive_num; + unsigned char ctrlr_index; + unsigned long lba; + unsigned short device_spec; + unsigned short buffer_segment; + unsigned short load_segment; + unsigned short sector_count; + unsigned char cyl_count; + unsigned char sec_count; + unsigned char head_count; + unsigned char reseved; + }; + static struct packet pkt; - union { - compact_diskinfo_t di; - unsigned int ui; - } ret; - static int maxhd = 0; + bzero(&pkt, sizeof(pkt)); + pkt.packet_size = 0x13; + + bb.intno = 0x13; + bb.eax.r.h = 0x4b; + bb.eax.r.l = 0x01; // subfunc: get info + bb.edx.r.l = drive; + bb.esi.rr = OFFSET((unsigned)&pkt); + bb.ds = SEGMENT((unsigned)&pkt); + + bios(&bb); +#if DEBUG + printf("el_torito info drive %x\n", drive); + + printf("--> cf %x, eax %x\n", bb.flags.cf, bb.eax.rr); - ret.ui = 0; + printf("pkt_size: %x\n", pkt.packet_size); + printf("media_type: %x\n", pkt.media_type); + printf("drive_num: %x\n", pkt.drive_num); + printf("device_spec: %x\n", pkt.device_spec); + printf("press a key->\n");getc(); +#endif + + /* Some BIOSes erroneously return cf = 1 */ + /* Just check to see if the drive number is the same. */ + if (pkt.drive_num == drive) { + if ((pkt.media_type & 0x0F) == 0) { + /* We are in no-emulation mode. */ + return 1; + } + } + + return 0; +} + +#if DEBUG +/* + * BIOS drive information. + */ +void print_drive_info(boot_drive_info_t *dp) +{ + // printf("buf_size = %x\n", dp->params.buf_size); + printf("info_flags = %x\n", dp->params.info_flags); + printf(" phys_cyls = %lx\n", dp->params. phys_cyls); + printf(" phys_heads = %lx\n", dp->params. phys_heads); + printf(" phys_spt = %lx\n", dp->params. phys_spt); + printf("phys_sectors = %lx%lx\n", ((unsigned long *)(&dp->params.phys_sectors))[1], + ((unsigned long *)(&dp->params.phys_sectors))[0]); + printf("phys_nbps = %x\n", dp->params.phys_nbps); + // printf("dpte_offset = %x\n", dp->params.dpte_offset); + // printf("dpte_segment = %x\n", dp->params.dpte_segment); + // printf("key = %x\n", dp->params.key); + // printf("path_len = %x\n", dp->params. path_len); + // printf("reserved1 = %x\n", dp->params. reserved1); + // printf("reserved2 = %x\n", dp->params.reserved2); + //printf("bus_type[4] = %x\n", dp->params. bus_type[4]); + //printf("interface_type[8] = %x\n", dp->params. interface_type[8]); + //printf("interface_path[8] = %x\n", dp->params. interface_path[8]); + //printf("dev_path[8] = %x\n", dp->params. dev_path[8]); + // printf("reserved3 = %x\n", dp->params. reserved3); + // printf("checksum = %x\n", dp->params. checksum); + + printf(" io_port_base = %x\n", dp->dpte.io_port_base); + printf(" control_port_base = %x\n", dp->dpte.control_port_base); + printf(" head_flags = %x\n", dp->dpte. head_flags); + printf(" vendor_info = %x\n", dp->dpte. vendor_info); + printf(" irq = %x\n", dp->dpte. irq); + // printf(" irq_unused = %x\n", dp->dpte. irq_unused); + printf(" block_count = %x\n", dp->dpte. block_count); + printf(" dma_channe = %x\n", dp->dpte. dma_channel); + printf(" dma_type = %x\n", dp->dpte. dma_type); + printf(" pio_type = %x\n", dp->dpte. pio_type); + printf(" pio_unused = %x\n", dp->dpte. pio_unused); + printf(" option_flags = %x\n", dp->dpte.option_flags); + // printf(" reserved = %x\n", dp->dpte.reserved); + printf(" revision = %x\n", dp->dpte. revision); + // printf(" checksum = %x\n", dp->dpte. checksum); +} + +#endif + +int get_drive_info(int drive, struct driveInfo *dp) +{ + boot_drive_info_t *di = &dp->di; + int ret = 0; + +#if 0 if (maxhd == 0) { bb.intno = 0x13; bb.eax.r.h = 0x08; @@ -230,6 +426,13 @@ unsigned int get_diskinfo(int drive) if (drive > maxhd) return 0; +#endif + + bzero(dp, sizeof(struct driveInfo)); + dp->biosdev = drive; + + /* Check for El Torito no-emulation mode. */ + dp->no_emulation = is_no_emulation(drive); /* Check drive for EBIOS support. */ bb.intno = 0x13; @@ -237,48 +440,82 @@ unsigned int get_diskinfo(int drive) bb.edx.r.l = drive; bb.ebx.rr = 0x55aa; bios(&bb); - if(bb.ebx.rr == 0xaa55 && bb.flags.cf == 0) { + if((bb.ebx.rr == 0xaa55) && (bb.flags.cf == 0)) { /* Get flags for supported operations. */ - useEbios = bb.ecx.r.l; + dp->uses_ebios = bb.ecx.r.l; } - if (useEbios & EBIOS_ENHANCED_DRIVE_INFO) { + if (dp->uses_ebios & (EBIOS_ENHANCED_DRIVE_INFO | EBIOS_LOCKING_ACCESS | EBIOS_FIXED_DISK_ACCESS)) { /* Get EBIOS drive info. */ - ebios.size = 26; + static struct drive_params params; + + params.buf_size = sizeof(params); bb.intno = 0x13; bb.eax.r.h = 0x48; bb.edx.r.l = drive; - bb.esi.rr = OFFSET((unsigned)&ebios); - bb.ds = SEGMENT((unsigned)&ebios); + bb.esi.rr = OFFSET((unsigned)¶ms); + bb.ds = SEGMENT((unsigned)¶ms); bios(&bb); - if(bb.flags.cf != 0) { - useEbios = 0; - } + if(bb.flags.cf != 0 /* || params.phys_sectors < 2097152 */) { + dp->uses_ebios = 0; + di->params.buf_size = 1; + } else { + bcopy(¶ms, &di->params, sizeof(params)); + + if (drive >= BASE_HD_DRIVE && + (dp->uses_ebios & EBIOS_ENHANCED_DRIVE_INFO) && + di->params.buf_size >= 30 && + !(di->params.dpte_offset == 0xFFFF && di->params.dpte_segment == 0xFFFF)) { + void *ptr = (void *)(di->params.dpte_offset + ((unsigned int)di->params.dpte_segment << 4)); + bcopy(ptr, &di->dpte, sizeof(di->dpte)); + } + } } - bb.intno = 0x13; - bb.eax.r.h = 0x08; - bb.edx.r.l = drive; - bios(&bb); - if (bb.flags.cf == 0 && bb.eax.r.h == 0) { - unsigned long cyl; - unsigned long sec; - unsigned long hds; - - hds = bb.edx.r.h; - sec = bb.ecx.r.l & 0x3F; - if(useEbios & EBIOS_ENHANCED_DRIVE_INFO) { - cyl = (ebios.total_sectors / ((hds + 1) * sec)) - 1; - } - else { - cyl = bb.ecx.r.h | ((bb.ecx.r.l & 0xC0) << 2); - } - ret.di.heads = hds; - ret.di.sectors = sec; - ret.di.cylinders = cyl; + if (di->params.phys_heads == 0 || di->params.phys_spt == 0) { + /* Either it's not EBIOS, or EBIOS didn't tell us. */ + bb.intno = 0x13; + bb.eax.r.h = 0x08; + bb.edx.r.l = drive; + bios(&bb); + if (bb.flags.cf == 0 && bb.eax.r.h == 0) { + unsigned long cyl; + unsigned long sec; + unsigned long hds; + + hds = bb.edx.r.h; + sec = bb.ecx.r.l & 0x3F; + if((dp->uses_ebios & EBIOS_ENHANCED_DRIVE_INFO) && (sec != 0)) { + cyl = (di->params.phys_sectors / ((hds + 1) * sec)) - 1; + } + else { + cyl = bb.ecx.r.h | ((bb.ecx.r.l & 0xC0) << 2); + } + di->params.phys_heads = hds; + di->params.phys_spt = sec; + di->params.phys_cyls = cyl; + } else { + ret = -1; + } + } + + if (dp->no_emulation) { + /* Some BIOSes give us erroneous EBIOS support information. + * Assume that if you're on a CD, then you can use + * EBIOS disk calls. + */ + dp->uses_ebios |= EBIOS_FIXED_DISK_ACCESS; + } +#if DEBUG + print_drive_info(di); + printf("uses_ebios = 0x%x\n", dp->uses_ebios); + printf("press a key->\n");getc(); +#endif + + if (ret == 0) { + dp->valid = 1; } - if(drive >= 0x80) uses_ebios[drive - 0x80] = useEbios; - return ret.ui; + return ret; } void setCursorPosition(int x, int y, int page) @@ -339,7 +576,7 @@ void setActiveDisplayPage( int page ) int terminateDiskEmulation() { - static char cd_spec[0x12]; + static char cd_spec[0x13]; bb.intno = 0x13; bb.eax.r.h = 0x4b; @@ -375,8 +612,6 @@ int readDriveParameters(int drive, struct driveParameters *dp) int APMPresent(void) { - KERNBOOTSTRUCT *kbp = kernBootStruct; - bb.intno = APM_INTNO; bb.eax.r.h = APM_INTCODE; bb.eax.r.l = 0x00; @@ -386,9 +621,9 @@ APMPresent(void) (bb.ebx.r.h == 'P') && (bb.ebx.r.l == 'M')) { /* Success */ - kbp->apmConfig.major_vers = bb.eax.r.h; - kbp->apmConfig.minor_vers = bb.eax.r.l; - kbp->apmConfig.flags.data = bb.ecx.rr; + bootArgs->apmConfig.major_vers = bb.eax.r.h; + bootArgs->apmConfig.minor_vers = bb.eax.r.l; + bootArgs->apmConfig.flags.data = bb.ecx.rr; return 1; } return 0; @@ -397,8 +632,6 @@ APMPresent(void) int APMConnect32(void) { - KERNBOOTSTRUCT *kbp = kernBootStruct; - bb.intno = APM_INTNO; bb.eax.r.h = APM_INTCODE; bb.eax.r.l = 0x03; @@ -406,19 +639,19 @@ APMConnect32(void) bios(&bb); if (bb.flags.cf == 0) { /* Success */ - kbp->apmConfig.cs32_base = (bb.eax.rr) << 4; - kbp->apmConfig.entry_offset = bb.ebx.rx; - kbp->apmConfig.cs16_base = (bb.ecx.rr) << 4; - kbp->apmConfig.ds_base = (bb.edx.rr) << 4; - if (kbp->apmConfig.major_vers >= 1 && - kbp->apmConfig.minor_vers >= 1) { - kbp->apmConfig.cs_length = bb.esi.rr; - kbp->apmConfig.ds_length = bb.edi.rr; + bootArgs->apmConfig.cs32_base = (bb.eax.rr) << 4; + bootArgs->apmConfig.entry_offset = bb.ebx.rx; + bootArgs->apmConfig.cs16_base = (bb.ecx.rr) << 4; + bootArgs->apmConfig.ds_base = (bb.edx.rr) << 4; + if (bootArgs->apmConfig.major_vers >= 1 && + bootArgs->apmConfig.minor_vers >= 1) { + bootArgs->apmConfig.cs_length = bb.esi.rr; + bootArgs->apmConfig.ds_length = bb.edi.rr; } else { - kbp->apmConfig.cs_length = - kbp->apmConfig.ds_length = 64 * 1024; + bootArgs->apmConfig.cs_length = + bootArgs->apmConfig.ds_length = 64 * 1024; } - kbp->apmConfig.connected = 1; + bootArgs->apmConfig.connected = 1; return 1; } return 0; @@ -531,3 +764,18 @@ ReadPCIBusInfo(PCI_bus_info_t *pp) } return -1; } + +void sleep(int n) +{ + unsigned int endtime = (time18() + 18*n); + while (time18() < endtime); +} + +void delay(int ms) +{ + bb.intno = 0x15; + bb.eax.r.h = 0x86; + bb.ecx.rr = ms >> 16; + bb.edx.rr = ms & 0xFFFF; + bios(&bb); +} diff --git a/i386/libsaio/bootstruct.c b/i386/libsaio/bootstruct.c index 667f7c0..dc3bdb4 100644 --- a/i386/libsaio/bootstruct.c +++ b/i386/libsaio/bootstruct.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -27,6 +28,7 @@ */ #include "libsaio.h" +#include "bootstruct.h" // CMOS access ports in I/O space. // @@ -79,52 +81,63 @@ static int countIDEDisks() * the kernel by the booter. */ -KERNBOOTSTRUCT * kernBootStruct = (KERNBOOTSTRUCT *) KERNSTRUCT_ADDR; +KernelBootArgs_t *bootArgs; void initKernBootStruct( int biosdev ) { static int init_done = 0; - unsigned char i; + + bootArgs = (KernelBootArgs_t *)KERNSTRUCT_ADDR; if ( !init_done ) { - bzero( (char *) kernBootStruct, sizeof(*kernBootStruct) ); - - // Get size of conventional memory. - - kernBootStruct->convmem = memsize(0); - - // Get size of extended memory. - - kernBootStruct->extmem = memsize(1); - - kernBootStruct->magicCookie = KERNBOOTMAGIC; - kernBootStruct->configEnd = kernBootStruct->config; - kernBootStruct->graphicsMode = TEXT_MODE; + bzero(bootArgs, sizeof(KernelBootArgs_t)); + + // Get system memory map. Also update the size of the + // conventional/extended memory for backwards compatibility. + + bootArgs->memoryMapCount = + getMemoryMap( bootArgs->memoryMap, kMemoryMapCountMax, + (unsigned long *) &bootArgs->convmem, + (unsigned long *) &bootArgs->extmem ); + + if ( bootArgs->memoryMapCount == 0 ) + { + // BIOS did not provide a memory map, systems with + // discontiguous memory or unusual memory hole locations + // may have problems. + + bootArgs->convmem = getConventionalMemorySize(); + bootArgs->extmem = getExtendedMemorySize(); + } + + bootArgs->magicCookie = KERNBOOTMAGIC; + bootArgs->configEnd = bootArgs->config; + bootArgs->graphicsMode = TEXT_MODE; + /* New style */ + /* XXX initialize bootArgs here */ + init_done = 1; } // Get number of ATA devices. - kernBootStruct->numIDEs = countIDEDisks(); + bootArgs->numDrives = countIDEDisks(); - // Get disk info from BIOS. + // Update kernDev from biosdev. - for ( i = 0; i < 4; i++ ) - { - kernBootStruct->diskInfo[i] = get_diskinfo(0x80 + i); - } + bootArgs->kernDev = biosdev; +} - // Update kernDev from biosdev. - switch ( BIOS_DEV_TYPE( biosdev ) ) - { - case kBIOSDevTypeNetwork: - kernBootStruct->kernDev = B_TYPE(DEV_EN); break; - case kBIOSDevTypeHardDrive: - kernBootStruct->kernDev = B_TYPE(DEV_HD); break; - case kBIOSDevTypeFloppy: - kernBootStruct->kernDev = B_TYPE(DEV_FD); break; - } +/* Copy boot args after kernel and record address. */ + +void +reserveKernBootStruct(void) +{ + void *oldAddr = bootArgs; + bootArgs = (KernelBootArgs_t *)AllocateKernelMemory(sizeof(KERNBOOTSTRUCT)); + bcopy(oldAddr, bootArgs, sizeof(KernelBootArgs_t)); } + diff --git a/i386/libsaio/bootstruct.h b/i386/libsaio/bootstruct.h new file mode 100644 index 0000000..fee8011 --- /dev/null +++ b/i386/libsaio/bootstruct.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#include + +extern KernelBootArgs_t *bootArgs; diff --git a/i386/libsaio/cache.c b/i386/libsaio/cache.c index 4528dc5..80dd75e 100644 --- a/i386/libsaio/cache.c +++ b/i386/libsaio/cache.c @@ -3,19 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -55,9 +58,11 @@ static CacheEntry gCacheEntries[kCacheMaxEntries]; static char gCacheBuffer[kCacheSize]; #endif +#if CACHE_STATS unsigned long gCacheHits; unsigned long gCacheMisses; unsigned long gCacheEvicts; +#endif void CacheInit( CICell ih, long blockSize ) { @@ -74,9 +79,11 @@ void CacheInit( CICell ih, long blockSize ) gCacheNumEntries = kCacheSize / gCacheBlockSize; gCacheTime = 0; +#if CACHE_STATS gCacheHits = 0; gCacheMisses = 0; gCacheEvicts = 0; +#endif gCacheIH = ih; @@ -113,7 +120,9 @@ long CacheRead( CICell ih, char * buffer, long long offset, // If the data was found copy it to the caller. if (cnt != gCacheNumEntries) { bcopy(gCacheBuffer + cnt * gCacheBlockSize, buffer, gCacheBlockSize); +#if CACHE_STATS gCacheHits++; +#endif return gCacheBlockSize; } @@ -124,7 +133,9 @@ long CacheRead( CICell ih, char * buffer, long long offset, // Read the data from the disk. Seek(ih, offset); Read(ih, (long)buffer, length); +#if CACHE_STATS if (cache) gCacheMisses++; +#endif // Put the data from the disk in the cache if needed. if (loadCache) { @@ -145,7 +156,9 @@ long CacheRead( CICell ih, char * buffer, long long offset, // If no free entry was found, use the oldest. if (cnt == gCacheNumEntries) { cnt = oldestEntry; +#if CACHE_STATS gCacheEvicts++; +#endif } // Copy the data from disk to the new entry. diff --git a/i386/libsaio/console.c b/i386/libsaio/console.c index 9f3555c..10b859d 100644 --- a/i386/libsaio/console.c +++ b/i386/libsaio/console.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -123,3 +124,9 @@ int error(const char * fmt, ...) va_end(ap); return(0); } + +void stop(const char * msg) +{ + error("\n%s\n", msg); + halt(); +} diff --git a/i386/libsaio/disk.c b/i386/libsaio/disk.c index 7c70cf8..3f61574 100644 --- a/i386/libsaio/disk.c +++ b/i386/libsaio/disk.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -44,19 +45,21 @@ * All rights reserved. */ +#include "bootstruct.h" #include "libsaio.h" #include "fdisk.h" +#include "ufs.h" +#include "hfs.h" -/* - * diskinfo unpacking. - */ -#define SPT(di) ((di) & 0xff) -#define HEADS(di) ((((di)>>8) & 0xff) + 1) -#define SPC(di) (SPT(di) * HEADS(di)) +#include +#include #define BPS 512 /* sector size of the device */ -#define N_CACHE_SECS (BIOS_LEN / BPS) +#define CD_BPS 2048 /* CD-ROM block size */ +#define N_CACHE_SECS (BIOS_LEN / BPS) /* Must be a multiple of 4 for CD-ROMs */ #define UFS_FRONT_PORCH 0 +#define kAPMSector 2 /* Sector number of Apple partition map */ +#define kAPMCDSector 8 /* Translated sector of Apple partition map on a CD */ /* * trackbuf points to the start of the track cache. Biosread() @@ -81,42 +84,27 @@ struct DiskBVMap { static struct DiskBVMap * gDiskBVMap = NULL; static struct disk_blk0 * gBootSector = NULL; -extern long HFSInitPartition(CICell ih); -extern long HFSLoadFile(CICell ih, char * filePath); -extern long HFSGetDirEntry(CICell ih, char * dirPath, long * dirIndex, - char ** name, long * flags, long * time); - -extern long UFSInitPartition(CICell ih); -extern long UFSLoadFile(CICell ih, char * filePath); -extern long UFSGetDirEntry(CICell ih, char * dirPath, long * dirIndex, - char ** name, long * flags, long * time); - extern void spinActivityIndicator(); static void getVolumeDescription(BVRef bvr, char * str, long strMaxLen); //========================================================================== -static int getDiskGeometry( int biosdev, int * spt, int * spc ) +static int getDriveInfo( int biosdev, struct driveInfo *dip ) { - static int cached_biosdev = -1; - static int cached_spt = 0; - static int cached_spc = 0; + static struct driveInfo cached_di; + int cc; - if ( biosdev != cached_biosdev ) + if ( !cached_di.valid || biosdev != cached_di.biosdev ) { - long di = get_diskinfo(biosdev); - if (di == 0) return (-1); // BIOS call error - - cached_spt = SPT(di); - cached_spc = cached_spt * HEADS(di); - - DEBUG_DISK(("%s: %d sectors, %d heads\n", - __FUNCTION__, cached_spt, (int)HEADS(di))); + cc = get_drive_info(biosdev, &cached_di); + if (cc < 0) { + cached_di.valid = 0; + return (-1); // BIOS call error + } } - *spt = cached_spt; - *spc = cached_spc; + bcopy(&cached_di, dip, sizeof(cached_di)); return 0; } @@ -178,34 +166,46 @@ static int Biosread( int biosdev, unsigned int secno ) static int xbiosdev, xcyl, xhead; static unsigned int xsec, xnsecs; static BOOL cache_valid = FALSE; + struct driveInfo di; int rc = -1; int cyl, head, sec; - int spt, spc; int tries = 0; + int bps, divisor; - // DEBUG_DISK(("Biosread dev %x sec %d \n", biosdev, secno)); + if (getDriveInfo(biosdev, &di) < 0) { + return -1; + } + if (di.no_emulation) { + /* Always assume 2k block size; BIOS may lie about geometry */ + bps = 2048; + } else { + bps = di.di.params.phys_nbps; + } + divisor = bps / BPS; + + DEBUG_DISK(("Biosread dev %x sec %d bps %d\n", biosdev, secno, bps)); // To read the disk sectors, use EBIOS if we can. Otherwise, // revert to the standard BIOS calls. if ((biosdev >= kBIOSDevTypeHardDrive) && - (uses_ebios[biosdev - kBIOSDevTypeHardDrive] & EBIOS_FIXED_DISK_ACCESS)) + (di.uses_ebios & EBIOS_FIXED_DISK_ACCESS)) { if (cache_valid && (biosdev == xbiosdev) && (secno >= xsec) && - (secno < (xsec + xnsecs))) + ((unsigned int)secno < (xsec + xnsecs))) { biosbuf = trackbuf + (BPS * (secno - xsec)); return 0; } xnsecs = N_CACHE_SECS; - xsec = secno; + xsec = (secno / divisor) * divisor; cache_valid = FALSE; - while ((rc = ebiosread(biosdev, secno, xnsecs)) && (++tries < 5)) + while ((rc = ebiosread(biosdev, secno / divisor, xnsecs / divisor)) && (++tries < 5)) { if (rc == ECC_CORRECTED_ERR) { /* Ignore corrected ECC errors */ @@ -217,18 +217,20 @@ static int Biosread( int biosdev, unsigned int secno ) sleep(1); } } - else if ( getDiskGeometry(biosdev, &spt, &spc) == 0 ) + else { + /* spc = spt * heads */ + int spc = (di.di.params.phys_spt * di.di.params.phys_heads); cyl = secno / spc; - head = (secno % spc) / spt; - sec = secno % spt; + head = (secno % spc) / di.di.params.phys_spt; + sec = secno % di.di.params.phys_spt; if (cache_valid && (biosdev == xbiosdev) && (cyl == xcyl) && (head == xhead) && - (sec >= xsec) && - (sec < (xsec + xnsecs))) + ((unsigned int)sec >= xsec) && + ((unsigned int)sec < (xsec + xnsecs))) { // this sector is in trackbuf cache biosbuf = trackbuf + (BPS * (sec - xsec)); @@ -241,7 +243,7 @@ static int Biosread( int biosdev, unsigned int secno ) xcyl = cyl; xhead = head; xsec = sec; - xnsecs = ((sec + N_CACHE_SECS) > spt) ? (spt - sec) : N_CACHE_SECS; + xnsecs = ((unsigned int)(sec + N_CACHE_SECS) > di.di.params.phys_spt) ? (di.di.params.phys_spt - sec) : N_CACHE_SECS; cache_valid = FALSE; while ((rc = biosread(biosdev, cyl, head, sec, xnsecs)) && @@ -264,7 +266,7 @@ static int Biosread( int biosdev, unsigned int secno ) if (rc == 0) { cache_valid = TRUE; } - biosbuf = trackbuf; + biosbuf = trackbuf + (secno % divisor) * BPS; xbiosdev = biosdev; spinActivityIndicator(); @@ -315,7 +317,7 @@ static int isExtendedFDiskPartition( const struct fdisk_part * part ) 0x85, /* Linux extended */ }; - int i; + unsigned int i; for (i = 0; i < sizeof(extParts)/sizeof(extParts[0]); i++) { @@ -401,7 +403,7 @@ static int getNextFDiskPartition( int biosdev, int * partno, part->relsect += sExtBase; *outPart = part; - *partno = sExtDepth ? (sExtDepth + 4) : sNextPartNo; + *partno = sExtDepth ? (int)(sExtDepth + 4) : sNextPartNo; break; } @@ -414,7 +416,7 @@ static int getNextFDiskPartition( int biosdev, int * partno, static BVRef newFDiskBVRef( int biosdev, int partno, unsigned int blkoff, const struct fdisk_part * part, FSInit initFunc, FSLoadFile loadFunc, - FSGetDirEntry getdirFunc, int probe ) + FSGetDirEntry getdirFunc, int probe, int type ) { BVRef bvr = (BVRef) malloc( sizeof(*bvr) ); if ( bvr ) @@ -428,6 +430,7 @@ static BVRef newFDiskBVRef( int biosdev, int partno, unsigned int blkoff, bvr->fs_loadfile = loadFunc; bvr->fs_getdirentry = getdirFunc; bvr->description = getVolumeDescription; + bvr->type = type; if ( part->bootid & FDISK_ACTIVE ) bvr->flags |= kBVFlagPrimary; @@ -464,24 +467,88 @@ static BVRef newFDiskBVRef( int biosdev, int partno, unsigned int blkoff, //========================================================================== -BVRef diskScanBootVolumes( int biosdev, int * countPtr ) +BVRef newAPMBVRef( int biosdev, int partno, unsigned int blkoff, + const DPME * part, + FSInit initFunc, FSLoadFile loadFunc, + FSGetDirEntry getdirFunc, int probe, int type ) +{ + BVRef bvr = (BVRef) malloc( sizeof(*bvr) ); + if ( bvr ) + { + bzero(bvr, sizeof(*bvr)); + + bvr->biosdev = biosdev; + bvr->part_no = partno; + bvr->part_boff = blkoff; + bvr->fs_loadfile = loadFunc; + bvr->fs_getdirentry = getdirFunc; + bvr->description = getVolumeDescription; + bvr->type = type; + strlcpy(bvr->name, part->dpme_name, DPISTRLEN); + strlcpy(bvr->type_name, part->dpme_type, DPISTRLEN); + + /* + if ( part->bootid & FDISK_ACTIVE ) + bvr->flags |= kBVFlagPrimary; + */ + + // Probe the filesystem. + + if ( initFunc ) + { + bvr->flags |= kBVFlagNativeBoot; + + if ( probe && initFunc( bvr ) != 0 ) + { + // filesystem probe failed. + + DEBUG_DISK(("%s: failed probe on dev %x part %d\n", + __FUNCTION__, biosdev, partno)); + + free(bvr); + bvr = NULL; + } + } + /* + else if ( readBootSector( biosdev, blkoff, (void *)0x7e00 ) == 0 ) + { + bvr->flags |= kBVFlagForeignBoot; + } + */ + else + { + free(bvr); + bvr = NULL; + } + } + return bvr; +} + +//========================================================================== + +static BVRef diskScanFDiskBootVolumes( int biosdev, int * countPtr ) { const struct fdisk_part * part; struct DiskBVMap * map; int partno = -1; BVRef bvr; BVRef booterUFS = NULL; - int spc, spt; - - do { - // Find an existing mapping for this device. + int spc; + struct driveInfo di; + boot_drive_info_t *dp; - for ( map = gDiskBVMap; map; map = map->next ) - { - if ( biosdev == map->biosdev ) break; - } - if ( map ) break; + /* Initialize disk info */ + if (getDriveInfo(biosdev, &di) != 0) { + return NULL; + } + dp = &di.di; + spc = (dp->params.phys_spt * dp->params.phys_heads); + if (spc == 0) { + /* This is probably a CD-ROM; punt on the geometry. */ + spc = 1; + } + do { // Create a new mapping. map = (struct DiskBVMap *) malloc( sizeof(*map) ); @@ -499,20 +566,20 @@ BVRef diskScanBootVolumes( int biosdev, int * countPtr ) { DEBUG_DISK(("%s: part %d [%x]\n", __FUNCTION__, partno, part->systid)); - bvr = 0; switch ( part->systid ) { case FDISK_UFS: - bvr = newFDiskBVRef( + bvr = newFDiskBVRef( biosdev, partno, part->relsect + UFS_FRONT_PORCH/BPS, part, UFSInitPartition, UFSLoadFile, UFSGetDirEntry, - 0 ); + 0, + kBIOSDevTypeHardDrive); break; case FDISK_HFS: @@ -523,13 +590,11 @@ BVRef diskScanBootVolumes( int biosdev, int * countPtr ) HFSInitPartition, HFSLoadFile, HFSGetDirEntry, - 0 ); + 0, + kBIOSDevTypeHardDrive); break; case FDISK_BOOTER: - if (getDiskGeometry(biosdev, &spt, &spc) != 0) - break; - booterUFS = newFDiskBVRef( biosdev, partno, ((part->relsect + spc - 1) / spc) * spc, @@ -537,7 +602,8 @@ BVRef diskScanBootVolumes( int biosdev, int * countPtr ) UFSInitPartition, UFSLoadFile, UFSGetDirEntry, - 0 ); + 0, + kBIOSDevTypeHardDrive); break; default: @@ -545,7 +611,8 @@ BVRef diskScanBootVolumes( int biosdev, int * countPtr ) biosdev, partno, part->relsect, part, - 0, 0, 0, 0 ); + 0, 0, 0, 0, + kBIOSDevTypeHardDrive); break; } @@ -572,11 +639,153 @@ BVRef diskScanBootVolumes( int biosdev, int * countPtr ) } } while (0); + /* + * If no FDisk partition, then we will check for + * an Apple partition map elsewhere. + */ +#if 0 + if (map->bvrcnt == 0) { + static struct fdisk_part cdpart; + cdpart.systid = 0xCD; + + /* Let's try assuming we are on a hybrid HFS/ISO9660 CD. */ + bvr = newFDiskBVRef( + biosdev, 0, + 0, + &cdpart, + HFSInitPartition, + HFSLoadFile, + HFSGetDirEntry, + 0, + kBIOSDevTypeHardDrive); + bvr->next = map->bvr; + map->bvr = bvr; + map->bvrcnt++; + } +#endif + if (countPtr) *countPtr = map ? map->bvrcnt : 0; return map ? map->bvr : NULL; } +//========================================================================== + +static BVRef diskScanAPMBootVolumes( int biosdev, int * countPtr ) +{ + struct DiskBVMap * map; + struct Block0 *block0_p; + unsigned int blksize; + unsigned int factor; + void *buffer = malloc(BPS); + + /* Check for alternate block size */ + if (readBytes( biosdev, 0, BPS, buffer ) != 0) { + return NULL; + } + block0_p = buffer; + if (NXSwapBigShortToHost(block0_p->sbSig) == BLOCK0_SIGNATURE) { + blksize = NXSwapBigShortToHost(block0_p->sbBlkSize); + if (blksize != BPS) { + free(buffer); + buffer = malloc(blksize); + } + factor = blksize / BPS; + } else { + blksize = BPS; + factor = 1; + } + + do { + // Create a new mapping. + + map = (struct DiskBVMap *) malloc( sizeof(*map) ); + if ( map ) + { + int error; + DPME *dpme_p = (DPME *)buffer; + UInt32 i, npart = UINT_MAX; + BVRef bvr; + + map->biosdev = biosdev; + map->bvr = NULL; + map->bvrcnt = 0; + map->next = gDiskBVMap; + gDiskBVMap = map; + + for (i=0; idpme_signature) != DPME_SIGNATURE) { + break; + } + + if (i==0) { + npart = NXSwapBigLongToHost(dpme_p->dpme_map_entries); + } + /* + printf("name = %s, %s%s %d -> %d [%d -> %d] {%d}\n", + dpme.dpme_name, dpme.dpme_type, (dpme.dpme_flags & DPME_FLAGS_BOOTABLE) ? "(bootable)" : "", + dpme.dpme_pblock_start, dpme.dpme_pblocks, + dpme.dpme_lblock_start, dpme.dpme_lblocks, + dpme.dpme_boot_block); + */ + + if (strcmp(dpme_p->dpme_type, "Apple_HFS") == 0) { + bvr = newAPMBVRef(biosdev, + i, + NXSwapBigLongToHost(dpme_p->dpme_pblock_start) * factor, + dpme_p, + HFSInitPartition, + HFSLoadFile, + HFSGetDirEntry, + 0, + kBIOSDevTypeHardDrive); + bvr->next = map->bvr; + map->bvr = bvr; + map->bvrcnt++; + } + } + } + } while (0); + + free(buffer); + + if (countPtr) *countPtr = map ? map->bvrcnt : 0; + + return map ? map->bvr : NULL; +} + +//========================================================================== + +BVRef diskScanBootVolumes( int biosdev, int * countPtr ) +{ + struct DiskBVMap * map; + BVRef bvr; + int count = 0; + + // Find an existing mapping for this device. + + for ( map = gDiskBVMap; map; map = map->next ) { + if ( biosdev == map->biosdev ) { + count = map->bvrcnt; + break; + } + } + + if (map == NULL) { + bvr = diskScanFDiskBootVolumes(biosdev, &count); + if (bvr == NULL) { + bvr = diskScanAPMBootVolumes(biosdev, &count); + } + } else { + bvr = map->bvr; + } + if (countPtr) *countPtr = count; + return bvr; +} + + //========================================================================== static const struct NamedValue fdiskTypes[] = @@ -587,6 +796,7 @@ static const struct NamedValue fdiskTypes[] = { FDISK_UFS, "Apple UFS" }, { FDISK_HFS, "Apple HFS" }, { FDISK_BOOTER, "Apple Boot/UFS" }, + { 0xCD, "CD-ROM" }, { 0x00, 0 } /* must be last */ }; @@ -595,14 +805,18 @@ static void getVolumeDescription( BVRef bvr, char * str, long strMaxLen ) unsigned char type = (unsigned char) bvr->part_type; const char * name = getNameForValue( fdiskTypes, type ); + if (name == NULL) + name = bvr->type_name; + if ( name ) sprintf( str, "hd(%d,%d) %s", - BIOS_DEV_UNIT(bvr->biosdev), bvr->part_no, name ); + BIOS_DEV_UNIT(bvr), bvr->part_no, name ); else sprintf( str, "hd(%d,%d) TYPE %02x", - BIOS_DEV_UNIT(bvr->biosdev), bvr->part_no, type ); + BIOS_DEV_UNIT(bvr), bvr->part_no, type ); } + //========================================================================== int readBootSector( int biosdev, unsigned int secno, void * buffer ) @@ -645,3 +859,14 @@ int diskRead( BVRef bvr, long addr, long length ) length, (void *) addr ); } + +void turnOffFloppy(void) +{ + /* + * Disable floppy: + * Hold controller in reset, + * disable DMA and IRQ, + * turn off floppy motors. + */ + outb(0x3F2, 0x00); +} diff --git a/i386/libsaio/fdisk.h b/i386/libsaio/fdisk.h index 6805024..cda163d 100644 --- a/i386/libsaio/fdisk.h +++ b/i386/libsaio/fdisk.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/libsaio/hfs.c b/i386/libsaio/hfs.c index 939d208..278c630 100644 --- a/i386/libsaio/hfs.c +++ b/i386/libsaio/hfs.c @@ -3,19 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -30,6 +33,8 @@ #include #include +#include "hfs.h" + #define kBlockSize (0x200) #define kMDBBaseOffset (2 * kBlockSize) @@ -117,8 +122,6 @@ long HFSInitPartition(CICell ih) return 0; } - verbose("HFSInitPartition: %x\n", ih); - #ifdef __i386__ if (!gTempStr) gTempStr = (char *)malloc(4096); if (!gLinkTemp) gLinkTemp = (char *)malloc(64); @@ -183,7 +186,10 @@ long HFSInitPartition(CICell ih) Read(ih, (long)gHFSPlusHeader, kBlockSize); // Not a HFS[+] volume. - if (SWAP_BE16(gHFSPlus->signature) != kHFSPlusSigWord) return -1; + if (SWAP_BE16(gHFSPlus->signature) != kHFSPlusSigWord) { + verbose("HFS signature was not present.\n"); + return -1; + } gIsHFSPlus = 1; gCacheBlockSize = gBlockSize = SWAP_BE32(gHFSPlus->blockSize); @@ -215,25 +221,29 @@ long HFSLoadFile(CICell ih, char * filePath) char entry[512]; long dirID, result, length, flags; - if (HFSInitPartition(ih) == -1) return -1; - verbose("Loading HFS%s file: [%s] from %x.\n", (gIsHFSPlus ? "+" : ""), filePath, ih); + if (HFSInitPartition(ih) == -1) return -1; + dirID = kHFSRootFolderID; // Skip a lead '\'. Start in the system folder if there are two. if (filePath[0] == '/') { if (filePath[1] == '/') { if (gIsHFSPlus) dirID = SWAP_BE32(((long *)gHFSPlus->finderInfo)[5]); else dirID = SWAP_BE32(gHFSMDB->drFndrInfo[5]); - if (dirID == 0) return -1; + if (dirID == 0) { + return -1; + } filePath++; } filePath++; } result = ResolvePathToCatalogEntry(filePath, &flags, entry, dirID, 0); - if ((result == -1) || ((flags & kFileTypeMask) != kFileTypeFlat)) return -1; + if ((result == -1) || ((flags & kFileTypeMask) != kFileTypeFlat)) { + return -1; + } #if 0 // Not yet for Intel. System.config/Default.table will fail this check. // Check file owner and permissions. @@ -241,7 +251,9 @@ long HFSLoadFile(CICell ih, char * filePath) #endif result = ReadFile(entry, &length); - if (result == -1) return -1; + if (result == -1) { + return -1; + } return length; } @@ -377,7 +389,7 @@ static long ResolvePathToCatalogEntry(char * filePath, long * flags, // Copy the file name to gTempStr cnt = 0; while ((filePath[cnt] != '/') && (filePath[cnt] != '\0')) cnt++; - strncpy(gTempStr, filePath, cnt); + strlcpy(gTempStr, filePath, cnt+1); // Move restPath to the right place. if (filePath[cnt] != '\0') cnt++; @@ -387,7 +399,9 @@ static long ResolvePathToCatalogEntry(char * filePath, long * flags, // restPath is the rest of the path if any. result = ReadCatalogEntry(gTempStr, dirID, entry, dirIndex); - if (result == -1) return -1; + if (result == -1) { + return -1; + } GetCatalogEntryInfo(entry, flags, 0); diff --git a/i386/libsaio/hfs.h b/i386/libsaio/hfs.h new file mode 100644 index 0000000..a1c1993 --- /dev/null +++ b/i386/libsaio/hfs.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +extern long HFSInitPartition(CICell ih); +extern long HFSLoadFile(CICell ih, char * filePath); +extern long HFSGetDirEntry(CICell ih, char * dirPath, long * dirIndex, + char ** name, long * flags, long * time); + diff --git a/i386/libsaio/hfs_CaseTables.h b/i386/libsaio/hfs_CaseTables.h index d4691b6..fb2f62e 100644 --- a/i386/libsaio/hfs_CaseTables.h +++ b/i386/libsaio/hfs_CaseTables.h @@ -3,19 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/libsaio/hfs_compare.c b/i386/libsaio/hfs_compare.c index 8917c1c..cb37bcb 100644 --- a/i386/libsaio/hfs_compare.c +++ b/i386/libsaio/hfs_compare.c @@ -3,19 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/libsaio/io_inline.h b/i386/libsaio/io_inline.h index 2a813a2..00c1e37 100644 --- a/i386/libsaio/io_inline.h +++ b/i386/libsaio/io_inline.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/libsaio/libsaio.h b/i386/libsaio/libsaio.h index 40c852c..925f4d7 100644 --- a/i386/libsaio/libsaio.h +++ b/i386/libsaio/libsaio.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -28,7 +29,6 @@ #include "libsa.h" #include "memory.h" -#include "kernBootStruct.h" #include "io_inline.h" #include "saio_types.h" #include "saio_internal.h" diff --git a/i386/libsaio/load.c b/i386/libsaio/load.c index 77e6ad0..a5be780 100644 --- a/i386/libsaio/load.c +++ b/i386/libsaio/load.c @@ -1,293 +1,219 @@ /* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ /* - * Copyright 1993 NeXT Computer, Inc. - * All rights reserved. + * load.c - Functions for decoding a Mach-o Kernel. + * + * Copyright (c) 1998-2003 Apple Computer, Inc. + * */ -#include "libsaio.h" -#include "rcz_common.h" -#include "rcz_decompress_file.h" #include +#include +#include -static int devMajor[3] = { 6, 3, 1 }; // sd, hd, fd major dev #'s +#include -static int xread(int fd, char * addr, int size); -static int loadmacho(struct mach_header * head, int dev, int io, - entry_t * rentry, char ** raddr, int * rsize, - int file_offset); +static long DecodeSegment(long cmdBase, unsigned int*load_addr, unsigned int *load_size); +static long DecodeUnixThread(long cmdBase, unsigned int *entry); -//========================================================================== -// Open a file for reading. If the file doesn't exist, -// try opening the compressed version. -#ifdef RCZ_COMPRESSED_FILE_SUPPORT -int openfile(const char * filename, int ignored) -{ - unsigned char *buf; - int fd, size, ret; - unsigned char *addr; +static unsigned long gBinaryAddress; +BOOL gHaveKernelCache; - if ((fd = open(filename, 0)) < 0) { - buf = malloc(256); - sprintf(buf, "%s%s", filename, RCZ_EXTENSION); - if ((fd = open(buf, 0)) >= 0) { - size = rcz_file_size(fd); - addr = (unsigned char *)((KERNEL_ADDR + KERNEL_LEN) - size); - ret = rcz_decompress_file(fd, addr); - close(fd); - if (ret < 0) - fd = -1; - else - fd = openmem(addr, size); - } - free(buf); - } - return fd; -} -#else -int openfile(char * filename, int ignored) -{ - return open(filename, 0); -} -#endif +// Public Functions -//========================================================================== -// loadprog - -int loadprog( int dev, int fd, struct mach_header * headOut, - entry_t * entry, /* entry point */ - char ** addr, /* load address */ - int * size ) /* size of loaded program */ +long ThinFatFile(void **binary, unsigned long *length) { - struct mach_header head; - int file_offset = 0; - -read_again: - - /* get file header */ - read(fd, (char *) &head, sizeof(head)); - - if ( headOut ) - bcopy((char *) &head, (char *) headOut, sizeof(head)); - - if ( head.magic == MH_MAGIC ) - { - return loadmacho(&head, dev, fd, entry, addr, size, file_offset); + unsigned long nfat, swapped, size = 0; + struct fat_header *fhp = (struct fat_header *)*binary; + struct fat_arch *fap = + (struct fat_arch *)((unsigned long)*binary + sizeof(struct fat_header)); + + if (fhp->magic == FAT_MAGIC) { + nfat = fhp->nfat_arch; + swapped = 0; + } else if (fhp->magic == FAT_CIGAM) { + nfat = NXSwapInt(fhp->nfat_arch); + swapped = 1; + } else { + return -1; + } + + for (; nfat > 0; nfat--, fap++) { + if (swapped) { + fap->cputype = NXSwapInt(fap->cputype); + fap->offset = NXSwapInt(fap->offset); + fap->size = NXSwapInt(fap->size); } - else if ( file_offset == 0 && - ((head.magic == FAT_CIGAM) || (head.magic == FAT_MAGIC)) ) - { - int swap = (head.magic == FAT_CIGAM) ? 1 : 0; - struct fat_header * fhp = (struct fat_header *) &head; - struct fat_arch * fap; - int i, narch = swap ? NXSwapLong(fhp->nfat_arch) : fhp->nfat_arch; - int cpu, size; - char * buf; - - size = sizeof(struct fat_arch) * narch; - buf = malloc(size); - b_lseek(fd, 0, 0); - read(fd, buf, size); - for ( i = 0, fap = (struct fat_arch *)(buf+sizeof(struct fat_header)); - i < narch; - i++, fap++ ) - { - cpu = swap ? NXSwapLong(fap->cputype) : fap->cputype; - if (cpu == CPU_TYPE_I386) - { - /* that's specific enough */ - free(buf); - file_offset = swap ? NXSwapLong(fap->offset) : fap->offset; - b_lseek(fd, file_offset, 0); - goto read_again; - } - } - free(buf); - error("Fat binary file doesn't contain i386 code\n"); - return -1; + if (fap->cputype == CPU_TYPE_I386) { + *binary = (void *) ((unsigned long)*binary + fap->offset); + size = fap->size; + break; } - error("Unrecognized binary format: %08x\n", head.magic); - return -1; + } + + if (length != 0) *length = size; + + return 0; } -//========================================================================== -// xread -// -// Read from file descriptor. addr is a physical address. - -static int xread( int fd, char * addr, int size ) +long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize) { - char * orgaddr = addr; - long offset; - unsigned count; - long max; -#define BUFSIZ 8192 - char * buf; - int bufsize = BUFSIZ; - -#if 0 - printf("xread: addr=%x, size=%x\n", addr, size); - sleep(1); -#endif - - buf = malloc(BUFSIZ); - - // align your read to increase speed - offset = tell(fd) & 4095; - if ( offset != 0 ) - max = 4096 - offset; - else - max = bufsize; - - while ( size > 0 ) - { - if ( size > max ) count = max; - else count = size; -#if 0 - printf("xread: loop size=%x, count=%x\n", size, count); - sleep(1); + struct mach_header *mH; + unsigned long ncmds, cmdBase, cmd, cmdsize; + // long headerBase, headerAddr, headerSize; + unsigned int vmaddr = ~0; + unsigned int vmend = 0; + unsigned long cnt; + long ret = -1; + unsigned int entry; + + gBinaryAddress = (unsigned long)binary; + + // headerBase = gBinaryAddress; + cmdBase = (unsigned long)gBinaryAddress + sizeof(struct mach_header); + + mH = (struct mach_header *)(gBinaryAddress); + if (mH->magic != MH_MAGIC) { + error("Mach-O file has bad magic number\n"); + return -1; + } + +#if NOTDEF + printf("magic: %x\n", (unsigned)mH->magic); + printf("cputype: %x\n", (unsigned)mH->cputype); + printf("cpusubtype: %x\n", (unsigned)mH->cpusubtype); + printf("filetype: %x\n", (unsigned)mH->filetype); + printf("ncmds: %x\n", (unsigned)mH->ncmds); + printf("sizeofcmds: %x\n", (unsigned)mH->sizeofcmds); + printf("flags: %x\n", (unsigned)mH->flags); + getc(); #endif - - if ( read(fd, buf, count) != count) break; - - bcopy(buf, ptov(addr), count); - size -= count; - addr += count; - - max = bufsize; - -#if 0 - tick += count; - if ( tick > (50*1024) ) - { - putchar('+'); - tick = 0; - } + + ncmds = mH->ncmds; + + for (cnt = 0; cnt < ncmds; cnt++) { + cmd = ((long *)cmdBase)[0]; + cmdsize = ((long *)cmdBase)[1]; + unsigned int load_addr; + unsigned int load_size; + + switch (cmd) { + + case LC_SEGMENT: + ret = DecodeSegment(cmdBase, &load_addr, &load_size); + if (ret == 0 && load_size != 0) { + vmaddr = min(vmaddr, load_addr); + vmend = max(vmend, load_addr + load_size); + } + break; + + case LC_UNIXTHREAD: + ret = DecodeUnixThread(cmdBase, &entry); + break; + + default: +#if NOTDEF + printf("Ignoring cmd type %d.\n", (unsigned)cmd); #endif + break; } - - free(buf); - return addr-orgaddr; + + if (ret != 0) return -1; + + cmdBase += cmdsize; + } + + *rentry = (entry_t)( (unsigned long) entry & 0x3fffffff ); + *rsize = vmend - vmaddr; + *raddr = (char *)vmaddr; + + return ret; } -//========================================================================== -// loadmacho +// Private Functions -static int loadmacho( struct mach_header * head, int dev, int io, - entry_t * rentry, char ** raddr, int * rsize, - int file_offset ) +static long DecodeSegment(long cmdBase, unsigned int *load_addr, unsigned int *load_size) { - int ncmds; - void * cmds; - void * cp; - unsigned int entry = 0; - int vmsize = 0; - unsigned int vmaddr = ~0; - unsigned int vmend = 0; - - struct xxx_thread_command { - unsigned long cmd; - unsigned long cmdsize; - unsigned long flavor; - unsigned long count; - i386_thread_state_t state; - } * th; - - // XXX should check cputype - cmds = malloc(head->sizeofcmds); - b_lseek(io, sizeof(struct mach_header) + file_offset, 0); - - if ( read(io, (char *) cmds, head->sizeofcmds) != head->sizeofcmds ) - { - error("loadmacho: error reading commands\n"); - goto shread; - } - - for ( ncmds = head->ncmds, cp = cmds; ncmds > 0; ncmds-- ) - { - unsigned int addr; - -#define lcp ((struct load_command *) cp) -#define scp ((struct segment_command *) cp) - - switch ( lcp->cmd ) - { - case LC_SEGMENT: - addr = (scp->vmaddr & 0x3fffffff) + (int)*raddr; - if ( scp->filesize ) - { - vmsize += scp->vmsize; - vmaddr = min(vmaddr, addr); - vmend = max(vmend, addr + scp->vmsize); - - // Zero any space at the end of the segment. - - bzero((char *)(addr + scp->filesize), - scp->vmsize - scp->filesize); - - // FIXME: check to see if we overflow - // the available space (should be passed in - // as the size argument). + struct segment_command *segCmd; + unsigned long vmaddr, fileaddr; + long vmsize, filesize; -#if 0 - printf("LC: fileoff %x, filesize %x, off %x, addr %x\n", - scp->fileoff, scp->filesize, file_offset, addr); - sleep(1); + segCmd = (struct segment_command *)cmdBase; + + vmaddr = (segCmd->vmaddr & 0x3fffffff); + vmsize = segCmd->vmsize; + + fileaddr = (gBinaryAddress + segCmd->fileoff); + filesize = segCmd->filesize; + + if (filesize == 0) { + *load_addr = ~0; + *load_size = 0; + return 0; + } + +#if NOTDEF + printf("segname: %s, vmaddr: %x, vmsize: %x, fileoff: %x, filesize: %x, nsects: %d, flags: %x.\n", + segCmd->segname, (unsigned)vmaddr, (unsigned)vmsize, (unsigned)fileaddr, (unsigned)filesize, + (unsigned) segCmd->nsects, (unsigned)segCmd->flags); + getc(); #endif + + if (vmaddr < KERNEL_ADDR || + (vmaddr + vmsize) > (KERNEL_ADDR + KERNEL_LEN)) { + stop("Kernel overflows available space"); + } + + if (vmsize && (strcmp(segCmd->segname, "__PRELINK") == 0)) { + gHaveKernelCache = 1; + } + + // Copy from file load area. + bcopy((char *)fileaddr, (char *)vmaddr, filesize); + + // Zero space at the end of the segment. + bzero((char *)(vmaddr + filesize), vmsize - filesize); - b_lseek(io, scp->fileoff + file_offset, 0); - if ( xread(io, (char *)addr, scp->filesize) - != scp->filesize) - { - error("loadmacho: error loading section\n"); - goto shread; - } - } - break; - - case LC_THREAD: - case LC_UNIXTHREAD: - th = (struct xxx_thread_command *) cp; - entry = th->state.eip; - break; - } - cp += lcp->cmdsize; - } - - kernBootStruct->rootdev = (dev & 0xffffff00) | devMajor[B_TYPE(dev)]; - - free(cmds); + *load_addr = vmaddr; + *load_size = vmsize; - *rentry = (entry_t)( (int) entry & 0x3fffffff ); - *rsize = vmend - vmaddr; - *raddr = (char *)vmaddr; + return 0; +} - return 0; -shread: - free(cmds); - return -1; +static long DecodeUnixThread(long cmdBase, unsigned int *entry) +{ + i386_thread_state_t *i386ThreadState; + + i386ThreadState = (i386_thread_state_t *) + (cmdBase + sizeof(struct thread_command) + 8); + + *entry = i386ThreadState->eip; + + return 0; } + diff --git a/i386/libsaio/memory.c b/i386/libsaio/memory.c new file mode 100644 index 0000000..535cbb4 --- /dev/null +++ b/i386/libsaio/memory.c @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#include "sl.h" +#include "saio_internal.h" +#include "bootstruct.h" + +static long gImageLastKernelAddr; + +#define kPageSize 4096 +#define RoundPage(x) ((((unsigned)(x)) + kPageSize - 1) & ~(kPageSize - 1)) + + +long +AllocateMemoryRange(char * rangeName, long start, long length, long type) +{ + if ( bootArgs->numBootDrivers < NDRIVERS ) + { + int num = bootArgs->numBootDrivers; + + bootArgs->driverConfig[num].address = start; + bootArgs->driverConfig[num].size = length; + bootArgs->driverConfig[num].type = type; + bootArgs->numBootDrivers++; + } + else + { + stop( "AllocateMemoryRange error" ); + } + return 0; +} + +long +AllocateKernelMemory( long inSize ) +{ + long addr; + + if (gImageLastKernelAddr == 0) { + gImageLastKernelAddr = RoundPage( bootArgs->kaddr + + bootArgs->ksize ); + } + addr = gImageLastKernelAddr; + gImageLastKernelAddr += RoundPage(inSize); + + if ( gImageLastKernelAddr >= (KERNEL_ADDR + KERNEL_LEN) ) { + stop ("AllocateKernelMemory error"); + } + + bootArgs->ksize = gImageLastKernelAddr - bootArgs->kaddr; + + return addr; +} diff --git a/i386/libsaio/misc.c b/i386/libsaio/misc.c index 1336ee6..d464483 100644 --- a/i386/libsaio/misc.c +++ b/i386/libsaio/misc.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -85,42 +86,13 @@ void enableA20() /* write output port */ outb(PORT_B, CMD_WOUT); + delay(100); /* wait until command is accepted */ while (inb(PORT_B) & KB_INFULL); outb(PORT_A, KB_A20); + delay(100); while (inb(PORT_B) & KB_INFULL); /* wait until done */ } - -void sleep(int n) -{ - int endtime = (time18() + 18*n); - while (time18() < endtime); -} - -void turnOffFloppy(void) -{ - /* - * Disable floppy: - * Hold controller in reset, - * disable DMA and IRQ, - * turn off floppy motors. - */ - outb(0x3F2, 0x00); -} - -char * newString(const char * oldString) -{ - if ( oldString ) - return strcpy(malloc(strlen(oldString)+1), oldString); - else - return NULL; -} - -void stop(const char * msg) -{ - error("\n%s\n", msg); - halt(); -} diff --git a/i386/libsaio/nbp.c b/i386/libsaio/nbp.c index bb35897..239a9d2 100644 --- a/i386/libsaio/nbp.c +++ b/i386/libsaio/nbp.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -69,11 +70,11 @@ static long NBPLoadFile(CICell ih, char * filePath) cmd.bufferSize = TFTP_LEN; cmd.buffer = TFTP_ADDR; - verbose("Loading file: %s\n", filePath); + verbose("Loading file: %s\n", filePath); ret = nbp(nbpCommandTFTPReadFile, (nbpCommand_u *) &cmd); - return (ret == nbpStatusSuccess) ? cmd.bufferSize : -1; + return (ret == nbpStatusSuccess) ? (long)cmd.bufferSize : -1; } /*========================================================================== @@ -113,6 +114,5 @@ BVRef nbpScanBootVolumes( int biosdev, int * countPtr ) gNetBVR->fs_getdirentry = NBPGetDirEntry; } } - return gNetBVR; } diff --git a/i386/libsaio/nbp_cmd.h b/i386/libsaio/nbp_cmd.h index 539b580..0b28299 100644 --- a/i386/libsaio/nbp_cmd.h +++ b/i386/libsaio/nbp_cmd.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -25,8 +26,7 @@ #ifndef __LIBSAIO_NBP_CMD_H #define __LIBSAIO_NBP_CMD_H -typedef unsigned long UInt32; -typedef unsigned char UInt8; +#include /*========================================================================== * NBP return status codes. diff --git a/i386/libsaio/pci.c b/i386/libsaio/pci.c index 1650bb6..7b167a4 100644 --- a/i386/libsaio/pci.c +++ b/i386/libsaio/pci.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/libsaio/pci.h b/i386/libsaio/pci.h index d1fde1a..4561a3e 100644 --- a/i386/libsaio/pci.h +++ b/i386/libsaio/pci.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/libsaio/saio_internal.h b/i386/libsaio/saio_internal.h index 6ecde2d..e000fa2 100644 --- a/i386/libsaio/saio_internal.h +++ b/i386/libsaio/saio_internal.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -31,12 +32,11 @@ extern void real_to_prot(void); extern void prot_to_real(void); extern void halt(void); -extern void startprog(unsigned int address); +extern void startprog(unsigned int address, void *arg); extern void loader(UInt32 code, UInt32 cmdptr); /* bios.s */ extern void bios(biosBuf_t *bb); -extern void get_memsize(biosBuf_t *bb); /* biosfn.c */ #ifdef EISA_SUPPORT @@ -45,11 +45,13 @@ extern BOOL eisa_present(void); extern int bgetc(void); extern int biosread(int dev, int cyl, int head, int sec, int num); extern int ebiosread(int dev, long sec, int count); +extern int get_drive_info(int drive, struct driveInfo *dp); extern void putc(int ch); extern void putca(int ch, int attr, int repeat); extern int getc(void); extern int readKeyboardStatus(void); extern unsigned int time18(void); +extern void delay(int ms); extern unsigned int get_diskinfo(int dev); extern int APMPresent(void); extern int APMConnect32(void); @@ -61,9 +63,16 @@ extern void getCursorPositionAndType(int *x, int *y, int *type); extern void scollPage(int x1, int y1, int x2, int y2, int attr, int rows, int dir); extern void clearScreenRows(int y1, int y2); extern void setActiveDisplayPage( int page ); +extern unsigned long getMemoryMap(struct MemoryRange * rangeArray, unsigned long maxRangeCount, + unsigned long * conMemSizePtr, unsigned long * extMemSizePtr); +extern unsigned long getExtendedMemorySize(); +extern unsigned long getConventionalMemorySize(); +extern void sleep(int n); /* bootstruct.c */ extern void initKernBootStruct(int biosdev); +extern void reserveKernBootStruct(void); +extern void copyKernBootStruct(void); /* cache.c */ extern void CacheInit(CICell ih, long blockSize); @@ -78,24 +87,26 @@ extern int getchar(void); extern int printf(const char *format, ...); extern int error(const char *format, ...); extern int verbose(const char *format, ...); +extern void stop(const char *message); /* disk.c */ extern BVRef diskScanBootVolumes(int biosdev, int *count); extern void diskSeek(BVRef bvr, long long position); extern int diskRead(BVRef bvr, long addr, long length); extern int readBootSector(int biosdev, unsigned int secno, void *buffer); +extern void turnOffFloppy(void); /* load.c */ -extern int openfile(const char *filename, int ignored); -extern int loadprog(int dev, int fd, struct mach_header *headOut, - entry_t *entry, char **addr, int *size); +extern char gHaveKernelCache; +extern long ThinFatFile(void **binary, unsigned long *length); +extern long DecodeMachO(void *binary, entry_t *rentry, char **raddr, int *rsize); + +/* memory.c */ +long AllocateKernelMemory( long inSize ); +long AllocateMemoryRange(char * rangeName, long start, long length, long type); /* misc.c */ -extern void sleep(int n); extern void enableA20(void); -extern void turnOffFloppy(void); -extern char * newString(const char *oldString); -extern void stop(const char *message); /* nbp.c */ extern UInt32 nbpUnloadBaseCode(); @@ -112,16 +123,12 @@ extern BOOL getValueForBootKey(const char *line, const char *match, const char extern BOOL getValueForKey(const char *key, const char **val, int *size); extern BOOL getBoolForKey(const char *key); extern BOOL getIntForKey(const char *key, int *val); -#if 0 -extern char * loadLocalizableStrings(char *name, char *tableName); -extern char * bundleLongName(char *bundleName, char *tableName); -extern int loadOtherConfigs(int useDefault); -#endif extern int loadConfigFile(const char *configFile, const char **table, BOOL allocTable); extern int loadConfigDir(const char *bundleName, BOOL useDefault, const char **table, BOOL allocTable); extern int loadSystemConfig(const char *which, int size); extern void addConfig(const char *config); +extern char * newString(const char *oldString); /* sys.c */ extern long LoadFile(const char *fileSpec); @@ -137,6 +144,7 @@ extern int read(int fdesc, char *buf, int count); extern int b_lseek(int fdesc, int addr, int ptr); extern int tell(int fdesc); extern const char * usrDevices(void); +extern const char * systemConfigDir(void); extern struct dirstuff * opendir(const char *path); extern int closedir(struct dirstuff *dirp); extern int readdir(struct dirstuff *dirp, const char **name, long *flags, long *time); @@ -147,4 +155,7 @@ extern BVRef scanBootVolumes(int biosdev, int *count); extern BVRef selectBootVolume(BVRef chain); extern void getBootVolumeDescription(BVRef bvr, char *str, long strMaxLen); +extern int gBIOSDev; +extern int gBootFileType; + #endif /* !__LIBSAIO_SAIO_INTERNAL_H */ diff --git a/i386/libsaio/saio_types.h b/i386/libsaio/saio_types.h index e78fc1a..a7e9edb 100644 --- a/i386/libsaio/saio_types.h +++ b/i386/libsaio/saio_types.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -30,8 +31,9 @@ #include #include "bios.h" #include "nbp_cmd.h" +#include -#if 0 +#if DEBUG #define DEBUG_DISK(x) printf x #else #define DEBUG_DISK(x) @@ -56,6 +58,15 @@ struct driveParameters { int totalDrives; }; +struct driveInfo { + boot_drive_info_t di; + int uses_ebios; + int no_emulation; + int biosdev; + int valid; +}; + + struct BootVolume; typedef struct BootVolume * BVRef; typedef struct BootVolume * CICell; @@ -87,9 +98,12 @@ struct dirstuff { BVRef dir_bvr; /* volume reference */ }; +#define BVSTRLEN 32 + struct BootVolume { BVRef next; /* list linkage pointer */ int biosdev; /* BIOS device number */ + int type; /* device type (floppy, hd, network) */ unsigned int flags; /* attribute flags */ BVGetDescription description; /* BVGetDescription function */ int part_no; /* partition number (1 based) */ @@ -98,6 +112,10 @@ struct BootVolume { unsigned int fs_boff; /* 1st block # of next read */ FSLoadFile fs_loadfile; /* FSLoadFile function */ FSGetDirEntry fs_getdirentry; /* FSGetDirEntry function */ + unsigned int bps; /* bytes per sector for this device */ + char name[BVSTRLEN]; /* (name of partition) */ + char type_name[BVSTRLEN]; /* (type of partition, eg. Apple_HFS) */ + }; enum { @@ -115,8 +133,8 @@ enum { kBIOSDevMask = 0xFF }; -#define BIOS_DEV_TYPE(d) ((d) & kBIOSDevTypeMask) -#define BIOS_DEV_UNIT(d) ((d) & kBIOSDevUnitMask) +//#define BIOS_DEV_TYPE(d) ((d) & kBIOSDevTypeMask) +#define BIOS_DEV_UNIT(bvr) ((bvr)->biosdev - (bvr)->type) /* * KernBootStruct device types. @@ -138,4 +156,9 @@ enum { #define MAKEKERNDEV(t, u, p) MAKEBOOTDEV(t, 0, 0, u, p) +enum { + kNetworkDeviceType = kBIOSDevTypeNetwork, + kBlockDeviceType = kBIOSDevTypeHardDrive +} gBootFileType_t; + #endif /* !__LIBSAIO_SAIO_TYPES_H */ diff --git a/i386/libsaio/sl.h b/i386/libsaio/sl.h index baa9e67..5ac7471 100644 --- a/i386/libsaio/sl.h +++ b/i386/libsaio/sl.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/libsaio/stringConstants.h b/i386/libsaio/stringConstants.h index 5b961cc..07808e9 100644 --- a/i386/libsaio/stringConstants.h +++ b/i386/libsaio/stringConstants.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/libsaio/stringTable.c b/i386/libsaio/stringTable.c index 1d91731..53792ae 100644 --- a/i386/libsaio/stringTable.c +++ b/i386/libsaio/stringTable.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -26,14 +27,17 @@ * All rights reserved. */ +#include "bootstruct.h" #include "libsaio.h" #include "stringConstants.h" #include "legacy/configTablePrivate.h" +#include "xml.h" -extern KERNBOOTSTRUCT *kernBootStruct; extern char *Language; extern char *LoadableFamilies; +static TagPtr gConfigDict; + static void eatThru(char val, const char **table_p); static inline int isspace(char c) @@ -147,6 +151,7 @@ newStringFromList( char *begin = *list, *end; char *newstr; int newsize = *size; + int bufsize; while (*begin && newsize && isspace(*begin)) { begin++; @@ -159,8 +164,9 @@ newStringFromList( } if (begin == end) return 0; - newstr = malloc(end - begin + 1); - strncpy(newstr, begin, end - begin); + bufsize = end - begin + 1; + newstr = malloc(bufsize); + strlcpy(newstr, begin, bufsize); *list = end; *size = newsize; return newstr; @@ -190,54 +196,68 @@ int stringLength(const char *table, int compress) return ret; } -// looks in table for strings of format << "key" = "value"; >> -// or << "key"; >> -BOOL getValueForStringTableKey(const char *table, const char *key, const char **val, int *size) +BOOL getValueForConfigTableKey(const char *table, const char *key, const char **val, int *size) { int keyLength; const char *tableKey; - do - { - eatThru('\"',&table); - tableKey = table; - keyLength = strlen(key); - if (keyLength && - (stringLength(table,1) == keyLength) && - (keyncmp(key, table, keyLength) == 0)) - { - int c; + if (gConfigDict != 0 ) { + /* Look up key in XML dictionary */ + TagPtr value; + value = XMLGetProperty(gConfigDict, key); + if (value != 0) { + if (value->type != kTagTypeString) { + error("Non-string tag '%s' found in config file\n", + key); + return NO; + } + *val = value->string; + *size = strlen(value->string); + return YES; + } + } else { + /* Legacy plist-style table */ + do + { + eatThru('\"',&table); + tableKey = table; + keyLength = strlen(key); + if (keyLength && + (stringLength(table,1) == keyLength) && + (keyncmp(key, table, keyLength) == 0)) + { + int c; - /* found the key; now look for either - * '=' or ';' - */ - while (c = *table) { - ++table; - if (c == '\\') { - ++table; - continue; - } else if (c == '=' || c == ';') { - break; - } - } - if (c == ';') { - table = tableKey; - } else { - eatThru('\"',&table); - } - *val = table; - *size = stringLength(table,0); - return YES; - } - - eatThru(';',&table); - - } while (*table); + /* found the key; now look for either + * '=' or ';' + */ + while (c = *table) { + ++table; + if (c == '\\') { + ++table; + continue; + } else if (c == '=' || c == ';') { + break; + } + } + if (c == ';') { + table = tableKey; + } else { + eatThru('\"',&table); + } + *val = table; + *size = stringLength(table,0); + return YES; + } + + eatThru(';',&table); + + } while (*table); + } return NO; } - /* * Returns a new malloc'ed string if one is found * in the string table matching 'key'. Also translates @@ -252,7 +272,7 @@ char *newStringForStringTableKey( char *newstr, *p; int size; - if (getValueForStringTableKey(table, key, &val, &size)) { + if (getValueForConfigTableKey(table, key, &val, &size)) { newstr = (char *)malloc(size+1); for (p = newstr; size; size--, p++, val++) { if ((*p = *val) == '\\') { @@ -289,7 +309,7 @@ newStringForKey(char *key) if (getValueForKey(key, &val, &size) && size) { newstr = (char *)malloc(size + 1); - strncpy(newstr, val, size); + strlcpy(newstr, val, size + 1); return newstr; } else { return 0; @@ -383,102 +403,16 @@ BOOL getValueForKey( int *size ) { - if (getValueForBootKey(kernBootStruct->bootString, key, val, size)) + if (getValueForBootKey(bootArgs->bootString, key, val, size)) return YES; - else if (getValueForStringTableKey(kernBootStruct->config, key, val, size)) + else if (getValueForConfigTableKey(bootArgs->config, key, val, size)) return YES; return NO; } -#if 0 -#define LOCALIZABLE_PATH \ - "%s/%s.config/%s.lproj/%s.strings" -char * -loadLocalizableStrings( - char *name, - char *tableName -) -{ - char buf[256], *config; - register int count, fd = -1; - const char *device_dir = usrDevices(); - - sprintf(buf, LOCALIZABLE_PATH, device_dir, name, - Language, tableName); - if ((fd = open(buf, 0)) < 0) { - sprintf(buf, LOCALIZABLE_PATH, device_dir, name, - "English", tableName); - if ((fd = open(buf,0)) < 0) { - return 0; - } - } - count = file_size(fd); - config = malloc(count); - count = read(fd, config, count); - close(fd); - if (count <= 0) { - free(config); - return 0; - } - return config; -} -#endif - -#if 0 // XXX -char * -bundleLongName( - char *bundleName, - char *tableName -) -{ - char *table, *name, *version, *newName; - char *path = malloc(256); - -#define LONG_NAME_FORMAT "%s (v%s)" - sprintf(path, "%s/%s.config/%s.table", - usrDevices(), bundleName, tableName ? tableName : "Default"); - if (loadConfigFile(path, &table, YES) == 0) { - version = newStringForStringTableKey(table, "Version"); - free(table); - } else { - version = newString("0.0"); - } - table = loadLocalizableStrings(bundleName, - tableName ? tableName : "Localizable"); - if (table) { - name = newStringForStringTableKey(table, "Long Name"); - free(table); - } else { - name = newString(bundleName); - } - newName = malloc(strlen(name)+strlen(version)+strlen(LONG_NAME_FORMAT)); - sprintf(newName, LONG_NAME_FORMAT, name, version); - free(name); free(version); - return newName; -} -#endif - int sysConfigValid; -void -addConfig( - const char *config -) -{ - char *configPtr = kernBootStruct->configEnd; - int len = strlen(config); - - if ((configPtr - kernBootStruct->config) > CONFIG_SIZE) { - error("No room in memory for config files\n"); - return; - } - strcpy(configPtr, config); - configPtr += (len + 1); - *configPtr = 0; - kernBootStruct->configEnd = configPtr; -} - #define TABLE_EXPAND_SIZE 192 /* @@ -491,7 +425,7 @@ addConfig( int loadConfigFile(const char *configFile, const char **table, BOOL allocTable) { - char *configPtr = kernBootStruct->configEnd; + char *configPtr = bootArgs->configEnd; int fd, count; /* Read config file into memory */ @@ -500,7 +434,7 @@ loadConfigFile(const char *configFile, const char **table, BOOL allocTable) if (allocTable) { configPtr = malloc(file_size(fd)+2+TABLE_EXPAND_SIZE); } else { - if ((configPtr - kernBootStruct->config) > CONFIG_SIZE) { + if ((configPtr - bootArgs->config) > CONFIG_SIZE) { error("No room in memory for config files\n"); close(fd); return -1; @@ -515,7 +449,7 @@ loadConfigFile(const char *configFile, const char **table, BOOL allocTable) *configPtr++ = 0; *configPtr = 0; if (!allocTable) - kernBootStruct->configEnd = configPtr; + bootArgs->configEnd = configPtr; return 0; } else { @@ -564,8 +498,10 @@ loadConfigDir( if (loadConfigFile(buf, table, allocTable) == 0) { ret = 1; } else { - if (!allocTable) + if (!allocTable) { error("Config file \"%s\" not found\n", buf); + sleep(1); // let the message be seen! + } ret = -1; } } @@ -590,8 +526,71 @@ loadConfigDir( #define LP '(' #define RP ')' +#define SYSTEM_CONFIG_DIR "/Library/Preferences/SystemConfiguration" +#define SYSTEM_CONFIG_FILE "/com.apple.Boot.plist" +#define SYSTEM_CONFIG_PATH SYSTEM_CONFIG_DIR SYSTEM_CONFIG_FILE +#define CONFIG_EXT ".plist" + +#if 1 +void +printSystemConfig(void) +{ + char *p1 = bootArgs->config; + char *p2 = p1, tmp; + + while (*p1 != '\0') { + while (*p2 != '\0' && *p2 != '\n') p2++; + tmp = *p2; + *p2 = '\0'; + printf("%s\n", p1); + *p2 = tmp; + if (tmp == '\0') break; + p1 = ++p2; + } +} +#endif + static int sysconfig_dev; +//========================================================================== +// ParseXMLFile +// Modifies the input buffer. +// Expects to see one dictionary in the XML file. +// Puts the first dictionary it finds in the +// tag pointer and returns 0, or returns -1 if not found +// (and does not modify dict pointer). +// +static long +ParseXMLFile( char * buffer, TagPtr * dict ) +{ + long length, pos; + TagPtr tag; + pos = 0; + char *configBuffer; + + configBuffer = malloc(strlen(buffer)+1); + strcpy(configBuffer, buffer); + + while (1) + { + length = XMLParseNextTag(configBuffer + pos, &tag); + if (length == -1) break; + + pos += length; + + if (tag == 0) continue; + if (tag->type == kTagTypeDict) break; + + XMLFreeTag(tag); + } + free(configBuffer); + if (length < 0) { + return -1; + } + *dict = tag; + return 0; +} + /* Returns 0 if requested config files were loaded, * 1 if default files were loaded, * -1 if no files were loaded. @@ -606,155 +605,60 @@ loadSystemConfig( char *buf, *bp; const char *cp; int ret, len, doDefault=0; - const char *device_dir = usrDevices(); -#if 0 - printf("In Load system config which=%d ; size=%d\n", which, size); - //sleep(1); -#endif 1 - buf = bp = malloc(256); - if (which && size) - { -#if 0 - printf("In Load system config alt\n"); - //sleep(1); -#endif 1 - for(cp = which, len = size; len && *cp && *cp != LP; cp++, len--) ; - if (*cp == LP) { - while (len-- && *cp && *cp++ != RP) ; - /* cp now points past device */ - strncpy(buf,which,cp - which); - bp += cp - which; - } else { - cp = which; - len = size; - } - if (*cp != '/') { - strcpy(bp, device_dir); - strcat(bp, "/System.config/"); - strncat(bp, cp, len); - if (strncmp(cp + len - strlen(IO_TABLE_EXTENSION), - IO_TABLE_EXTENSION, strlen(IO_TABLE_EXTENSION)) != 0) - strcat(bp, IO_TABLE_EXTENSION); - } else { - strncpy(bp, cp, len); - bp[size] = '\0'; - } - if ((strcmp(bp, USR_SYSTEM_DEFAULT_FILE) == 0) || - (strcmp(bp, ARCH_SYSTEM_DEFAULT_FILE) == 0)) - doDefault = 1; - ret = loadConfigFile(bp = buf, 0, 0); + buf = bp = malloc(512); + if (which && size) { + for(cp = which, len = size; len && *cp && *cp != LP; cp++, len--) ; + if (*cp == LP) { + while (len-- && *cp && *cp++ != RP) ; + /* cp now points past device */ + strlcpy(buf,which,cp - which); + bp += cp - which; + } else { + cp = which; + len = size; + } + if (*cp != '/') { + strcpy(bp, systemConfigDir()); + strcat(bp, "/"); + strncat(bp, cp, len); + if (strncmp(cp + len - strlen(CONFIG_EXT), + CONFIG_EXT, strlen(CONFIG_EXT)) != 0) + strcat(bp, CONFIG_EXT); + } else { + strlcpy(bp, cp, len); + } + if ((strcmp(bp, SYSTEM_CONFIG_PATH) == 0)) { + doDefault = 1; + } + ret = loadConfigFile(bp = buf, 0, 0); } else { -#if 0 - printf("In default SYSTEM_CONFIG LOAD\n"); - //sleep(1); -#endif 1 - ret = loadConfigDir((bp = SYSTEM_CONFIG), 0, 0, 0); -#if 0 - printf("come back from SYSTEM_CONFIG loadConfigDir\n"); - //sleep(1); -#endif 1 - } + strcpy(bp, systemConfigDir()); + strcat(bp, SYSTEM_CONFIG_FILE); + ret = loadConfigFile(bp, 0, 0); + if (ret < 0) { + ret = loadConfigDir((bp = SYSTEM_CONFIG), 0, 0, 0); + } + } sysconfig_dev = currentdev(); if (ret < 0) { error("System config file '%s' not found\n", bp); - } else + sleep(1); + } else { sysConfigValid = 1; + // Check for XML file; + // if not XML, gConfigDict will remain 0. + ParseXMLFile(bootArgs->config, &gConfigDict); + } free(buf); return (ret < 0 ? ret : doDefault); } -#ifdef DISABLED -int -loadOtherConfigs( - int useDefault -) -{ - char *val, *table; - char *path = malloc(256); - char *hintTable; - char *installVersion = NULL, *thisVersion; - char *longName, *tableName; - int count; - char *string; - int ret; - int old_dev = currentdev(); - - if (sysconfig_dev) - switchdev(sysconfig_dev); - if (getValueForKey( "Boot Drivers", &val, &count)) - { -#if 0 - printf("Loading Boot Drivers\n"); - sleep(1); -#endif 1 - while (string = newStringFromList(&val, &count)) { - /* Check installation hints... */ - sprintf(path, "%s/System.config/" INSTALL_HINTS - "/%s.table", usrDevices(), string); - - if (getBoolForKey("Ignore Hints") == NO && - loadConfigFile(path, &hintTable, YES) == 0) { - installVersion = newStringForStringTableKey( - hintTable, "Version"); - longName = newStringForStringTableKey( - hintTable, "Long Name"); - tableName = newStringForStringTableKey( - hintTable, "Default Table"); - free(hintTable); - } else { - installVersion = longName = tableName = NULL; - } - - ret = loadConfigDir(string, useDefault, &table, YES); - if (ret >= 0) { - thisVersion = newStringForStringTableKey( - table, "Version"); - if (installVersion && thisVersion && - (strcmp(thisVersion, installVersion) != 0)) { - /* Versions do not match */ - driverIsMissing(string, installVersion, longName, - tableName, DRIVER_VERSION_MISMATCH); - } else { - struct driver_load_data dl; - - dl.name = string; - if ((openDriverReloc(&dl)) >= 0) { - verbose("Loading binary for %s device driver.\n",string); - if (loadDriver(&dl) < 0) /// need to stop if error - error("Error loading %s device driver.\n",string); -#if 0 - printf("Calling link driver for %s\n", string); -#endif 1 - if (linkDriver(&dl) < 0) - error("Error linking %s device Driver.\n",string); - } - loadConfigDir(string, useDefault, NULL, NO); - driverWasLoaded(string, table, NULL); - free(table); - free(string); - free(installVersion); free(longName); - free(tableName); - } - free(thisVersion); - } else { - /* driver not found */ - driverIsMissing(string, installVersion, longName, - tableName, DRIVER_NOT_FOUND); - } -#if 0 - if (ret == 1) - useDefault = 1; // use defaults from now on -#endif - } - } else { - error("Warning: No Boot drivers specified in system config.\n"); - } - kernBootStruct->first_addr0 = - (int)kernBootStruct->configEnd + 1024; - free(path); - switchdev(old_dev); - return 0; +char * newString(const char * oldString) +{ + if ( oldString ) + return strcpy(malloc(strlen(oldString)+1), oldString); + else + return NULL; } -#endif /* DISABLED */ diff --git a/i386/libsaio/sys.c b/i386/libsaio/sys.c index b4e88ed..8224f64 100644 --- a/i386/libsaio/sys.c +++ b/i386/libsaio/sys.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -55,18 +56,21 @@ */ #include "libsaio.h" +#include "bootstruct.h" + struct devsw { const char * name; unsigned char biosdev; + int type; }; static struct devsw devsw[] = { - { "sd", 0x80 }, /* DEV_SD */ - { "hd", 0x80 }, /* DEV_HD */ - { "fd", 0x00 }, /* DEV_FD */ - { "en", 0xE0 }, /* DEV_EN */ + { "sd", 0x80, kBIOSDevTypeHardDrive }, /* DEV_SD */ + { "hd", 0x80, kBIOSDevTypeHardDrive }, /* DEV_HD */ + { "fd", 0x00, kBIOSDevTypeFloppy }, /* DEV_FD */ + { "en", 0xE0, kBIOSDevTypeNetwork }, /* DEV_EN */ { 0, 0 } }; @@ -85,6 +89,7 @@ static BVRef newBootVolumeRef( int biosdev, int partno ); //========================================================================== // LoadFile - LOW-LEVEL FILESYSTEM FUNCTION. // Load the specified file to the load buffer at LOAD_ADDR. +// If the file is fat, load only the i386 portion. long LoadFile(const char * fileSpec) { @@ -136,12 +141,31 @@ long GetDirEntry(const char * dirSpec, long * dirIndex, const char ** name, // GetFileInfo - LOW-LEVEL FILESYSTEM FUNCTION. // Get attributes for the specified file. +static char gMakeDirSpec[1024]; + long GetFileInfo(const char * dirSpec, const char * name, long * flags, long * time) { long index = 0; const char * entryName; + if (!dirSpec) { + long idx, len; + + len = strlen(name); + + for (idx = len; idx && (name[idx] != '/' && name[idx] != '\\'); idx--) {} + if (idx == 0) { + gMakeDirSpec[0] = '/'; + gMakeDirSpec[1] = '\0'; + } else { + idx++; + strncpy(gMakeDirSpec, name, idx); + name += idx; + } + dirSpec = gMakeDirSpec; + } + while (GetDirEntry(dirSpec, &index, &entryName, flags, time) == 0) { if (strcmp(entryName, name) == 0) @@ -242,7 +266,9 @@ gotfile: gFSLoadAddress = io->i_buf; io->i_filesize = bvr->fs_loadfile(bvr, (char *)filePath); - if (io->i_filesize < 0) goto error; + if (io->i_filesize < 0) { + goto error; + } return fdesc; @@ -306,7 +332,7 @@ int read(int fdesc, char * buf, int count) if ((io = iob_from_fdesc(fdesc)) == NULL) return (-1); - if (io->i_offset + count > io->i_filesize) + if ((io->i_offset + count) > (unsigned int)io->i_filesize) count = io->i_filesize - io->i_offset; if (count <= 0) @@ -387,14 +413,14 @@ int readdir(struct dirstuff * dirp, const char ** name, long * flags, int currentdev() { - return kernBootStruct->kernDev; + return bootArgs->kernDev; } //========================================================================== int switchdev(int dev) { - kernBootStruct->kernDev = dev; + bootArgs->kernDev = dev; return dev; } @@ -402,24 +428,36 @@ int switchdev(int dev) const char * usrDevices() { - return (B_TYPE(currentdev()) == DEV_EN) ? "" : "/private/Drivers/i386"; + if (gBootFileType == kNetworkDeviceType) + return ""; + return "/private/Drivers/i386"; } //========================================================================== +const char * systemConfigDir() +{ + if (gBootFileType == kNetworkDeviceType) + return ""; + return "/Library/Preferences/SystemConfiguration"; +} + +//========================================================================== + +int gBootFileType; + BVRef scanBootVolumes( int biosdev, int * count ) { BVRef bvr = 0; - switch ( BIOS_DEV_TYPE( biosdev ) ) - { - case kBIOSDevTypeFloppy: - case kBIOSDevTypeHardDrive: - bvr = diskScanBootVolumes( biosdev, count ); - break; - case kBIOSDevTypeNetwork: - bvr = nbpScanBootVolumes( biosdev, count ); - break; + bvr = diskScanBootVolumes(biosdev, count); + if (bvr == NULL) { + bvr = nbpScanBootVolumes(biosdev, count); + if (bvr != NULL) { + gBootFileType = kNetworkDeviceType; + } + } else { + gBootFileType = kBlockDeviceType; } return bvr; } @@ -443,8 +481,8 @@ BVRef selectBootVolume( BVRef chain ) if ( bvr->flags & kBVFlagPrimary ) bvr2 = bvr; } - bvr = bvr1 ? bvr1 : - bvr2 ? bvr2 : chain; + bvr = bvr2 ? bvr2 : + bvr1 ? bvr1 : chain; return bvr; } @@ -453,15 +491,15 @@ BVRef selectBootVolume( BVRef chain ) #define LP '(' #define RP ')' -extern int gBIOSDev; +int gBIOSDev; static BVRef getBootVolumeRef( const char * path, const char ** outPath ) { const char * cp; BVRef bvr; - int type = B_TYPE( kernBootStruct->kernDev ); - int unit = B_UNIT( kernBootStruct->kernDev ); - int part = B_PARTITION( kernBootStruct->kernDev ); + int type = B_TYPE( bootArgs->kernDev ); + int unit = B_UNIT( bootArgs->kernDev ); + int part = B_PARTITION( bootArgs->kernDev ); int biosdev = gBIOSDev; static BVRef lastBVR = 0; static int lastKernDev; @@ -475,7 +513,7 @@ static BVRef getBootVolumeRef( const char * path, const char ** outPath ) if (*cp != LP) // no left paren found { cp = path; - if ( lastBVR && lastKernDev == kernBootStruct->kernDev ) + if ( lastBVR && lastKernDev == bootArgs->kernDev ) { bvr = lastBVR; goto quick_exit; @@ -523,7 +561,7 @@ static BVRef getBootVolumeRef( const char * path, const char ** outPath ) for ( ; *cp && *cp != RP; cp++) /* LOOP */; if (*cp == RP) cp++; - biosdev = dp->biosdev; + biosdev = dp->biosdev + unit; } else { @@ -533,8 +571,6 @@ static BVRef getBootVolumeRef( const char * path, const char ** outPath ) if (*cp == RP) cp++; } - biosdev += (unit & kBIOSDevUnitMask); - if ((bvr = newBootVolumeRef(biosdev, part)) == NULL) { // error("newBootVolumeRef() error\n"); @@ -544,10 +580,10 @@ static BVRef getBootVolumeRef( const char * path, const char ** outPath ) // Record the most recent device parameters in the // KernBootStruct. - kernBootStruct->kernDev = MAKEKERNDEV(type, unit, bvr->part_no); + bootArgs->kernDev = biosdev; lastBVR = bvr; - lastKernDev = kernBootStruct->kernDev; + lastKernDev = bootArgs->kernDev; quick_exit: // Returns the file path following the device spec. diff --git a/i386/libsaio/table.c b/i386/libsaio/table.c index 35d2117..9f6a907 100644 --- a/i386/libsaio/table.c +++ b/i386/libsaio/table.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/libsaio/ufs.c b/i386/libsaio/ufs.c index 059a133..4182f25 100644 --- a/i386/libsaio/ufs.c +++ b/i386/libsaio/ufs.c @@ -3,19 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -29,6 +32,7 @@ #include +#include "ufs.h" #include "ufs_byteorder.h" typedef struct dinode Inode, *InodePtr; @@ -177,10 +181,10 @@ long UFSLoadFile( CICell ih, char * filePath ) { long ret, length, flags; - if (UFSInitPartition(ih) == -1) return -1; - verbose("Loading UFS file: [%s] from %x.\n", filePath, (unsigned)ih); + if (UFSInitPartition(ih) == -1) return -1; + // Skip one or two leading '/'. if (*filePath == '/') filePath++; if (*filePath == '/') filePath++; @@ -292,7 +296,7 @@ static long ResolvePathToInode( char * filePath, long * flags, // Copy the file name to gTempName cnt = 0; while ((filePath[cnt] != '/') && (filePath[cnt] != '\0')) cnt++; - strncpy(gTempName, filePath, cnt); + strlcpy(gTempName, filePath, cnt+1); // Move restPath to the right place. if (filePath[cnt] != '\0') cnt++; @@ -338,7 +342,7 @@ static long ReadDirEntry( InodePtr dirInode, long * fileInodeNum, } *fileInodeNum = dir->d_ino; - *name = strncpy(gTempName2, dir->d_name, dir->d_namlen); + *name = strlcpy(gTempName2, dir->d_name, dir->d_namlen+1); return 0; } diff --git a/i386/libsaio/ufs.h b/i386/libsaio/ufs.h new file mode 100644 index 0000000..9286af2 --- /dev/null +++ b/i386/libsaio/ufs.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +extern long UFSInitPartition(CICell ih); +extern long UFSLoadFile(CICell ih, char * filePath); +extern long UFSGetDirEntry(CICell ih, char * dirPath, long * dirIndex, + char ** name, long * flags, long * time); + diff --git a/i386/libsaio/ufs_byteorder.c b/i386/libsaio/ufs_byteorder.c index f55ac08..198e694 100644 --- a/i386/libsaio/ufs_byteorder.c +++ b/i386/libsaio/ufs_byteorder.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -30,22 +31,22 @@ #include #include #include -#include +#include #include "ufs_byteorder.h" #include "libsaio.h" -#define swapBigLongToHost(thing) ((thing) = NXSwapBigLongToHost(thing)) -#define swapBigShortToHost(thing) ((thing) = NXSwapBigShortToHost(thing)) -#define byte_swap_longlong(thing) ((thing) = NXSwapBigLongLongToHost(thing)) -#define byte_swap_int(thing) ((thing) = NXSwapBigLongToHost(thing)) -#define byte_swap_short(thing) ((thing) = NXSwapBigShortToHost(thing)) +#define swapBigLongToHost(thing) ((thing) = OSSwapBigToHostInt32(thing)) +#define swapBigShortToHost(thing) ((thing) = OSSwapBigToHostInt16(thing)) +#define byte_swap_longlong(thing) ((thing) = OSSwapBigToHostInt64(thing)) +#define byte_swap_int(thing) ((thing) = OSSwapBigToHostInt32(thing)) +#define byte_swap_short(thing) ((thing) = OSSwapBigToHostInt16(thing)) void byte_swap_longlongs(unsigned long long *array, int count) { register unsigned long long i; - for (i = 0; i < count; i++) + for (i = 0; i < (unsigned long long)count; i++) byte_swap_longlong(array[i]); } diff --git a/i386/libsaio/ufs_byteorder.h b/i386/libsaio/ufs_byteorder.h index ef0c37e..9fb00c3 100644 --- a/i386/libsaio/ufs_byteorder.h +++ b/i386/libsaio/ufs_byteorder.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -39,11 +40,14 @@ #include #include #include -#include +#include #include -#include +#include +#include #include +#include + void byte_swap_ints(int *array, int count); void byte_swap_shorts(short *array, int count); void byte_swap_longlongs(unsigned long long *array, int count); diff --git a/i386/libsaio/vbe.c b/i386/libsaio/vbe.c index a195171..f5e9f1d 100644 --- a/i386/libsaio/vbe.c +++ b/i386/libsaio/vbe.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -105,11 +106,145 @@ int setVBEDACFormat(unsigned char format) return(bb.eax.r.h); } -int setVBEMode(unsigned short mode) +/* + * Default GTF parameter values. + */ +#define kCellGranularity 8.0 // character cell granularity +#define kMinVSyncPlusBP 550.0 // min VSync + BP interval (us) +#define kMinFrontPorch 1.0 // minimum front porch in lines(V)/cells(H) +#define kVSyncLines 3.0 // width of VSync in lines +#define kHSyncWidth 8.0 // HSync as a percent of total line width +#define kC 30.0 // C = (C'-J) * (K/256) + J +#define kM 300.0 // M = K/256 * M' + +static inline double Round( double f ) { - bb.intno = 0x10; + asm volatile ("frndint" : "=t" (f) : "0" (f)); + return f; +} + +static inline double Sqrt( double f ) +{ + asm volatile ("fsqrt" : "=t" (f) : "0" (f)); + return f; +} + +int generateCRTCTiming( unsigned short width, + unsigned short height, + unsigned long paramValue, + int paramType, + VBECRTCInfoBlock * timing ) +{ + double h_period_est, h_freq, h_period, h_total_pixels, h_sync_pixels; + double h_active_pixels, h_ideal_duty_cycle, h_blank_pixels, pixel_freq = 0; + double v_sync_plus_bp = 0, v_total_lines = 0, v_field_rate_est, v_frame_rate = 0; + const double h_pixels = (double) width; + const double v_lines = (double) height; + + enum { + left_margin_pixels = 0, + right_margin_pixels = 0, + top_margin_lines = 0, + bot_margin_lines = 0, + interlace = 0 + }; + + // Total number of active pixels in image and both margins + h_active_pixels = h_pixels + left_margin_pixels + right_margin_pixels; + + if (paramType == kCRTCParamPixelClock) + { + // Pixel clock provided in MHz + pixel_freq = (double) paramValue / 1000000; + + // Ideal horizontal period from the blanking duty cycle equation + h_period = ((kC - 100) + (Sqrt(((100 - kC) * (100 - kC)) + (0.4 * kM * + (h_active_pixels + right_margin_pixels + left_margin_pixels) / + pixel_freq)))) / 2.0 / kM * 1000; + } + else /* kCRTCParamRefreshRate */ + { + double v_field_rate_in = (double) paramValue; + + // Estimate the horizontal period + h_period_est = ((1 / v_field_rate_in) - kMinVSyncPlusBP / 1000000) / + (v_lines + (2 * top_margin_lines) + kMinFrontPorch + interlace) * + 1000000; + + // Number of lines in Vsync + back porch + v_sync_plus_bp = Round(kMinVSyncPlusBP / h_period_est); + + // Total number of lines in Vetical field period + v_total_lines = v_lines + top_margin_lines + bot_margin_lines + + v_sync_plus_bp + interlace + kMinFrontPorch; + + // Estimate the vertical field frequency + v_field_rate_est = 1 / h_period_est / v_total_lines * 1000000; + + // Find the actual horizontal period + h_period = h_period_est / (v_field_rate_in / v_field_rate_est); + + // Find the vertical frame rate (no interlace) + v_frame_rate = 1 / h_period / v_total_lines * 1000000; + } + + // Ideal blanking duty cycle from the blanking duty cycle equation + h_ideal_duty_cycle = kC - (kM * h_period / 1000); + + // Number of pixels in the blanking time to the nearest double character cell + h_blank_pixels = Round(h_active_pixels * h_ideal_duty_cycle / + (100 - h_ideal_duty_cycle) / (2 * kCellGranularity)) * + (2 * kCellGranularity); + + // Total number of horizontal pixels + h_total_pixels = h_active_pixels + h_blank_pixels; + + if (paramType == kCRTCParamPixelClock) + { + // Horizontal frequency + h_freq = pixel_freq / h_total_pixels * 1000; + + // Number of lines in V sync + back porch + v_sync_plus_bp = Round(kMinVSyncPlusBP * h_freq / 1000); + + // Total number of lines in vertical field period + v_total_lines = v_lines + top_margin_lines + bot_margin_lines + + interlace + v_sync_plus_bp + kMinFrontPorch; + + // Vertical frame frequency + v_frame_rate = Round(h_freq / v_total_lines * 1000); + } + else + { + // Find pixel clock frequency + pixel_freq = Round(h_total_pixels / h_period); + } + + h_sync_pixels = Round(h_total_pixels * kHSyncWidth / 100 / kCellGranularity) * + kCellGranularity; + + timing->HTotal = h_total_pixels; + timing->HSyncStart = h_active_pixels + (h_blank_pixels / 2) - h_sync_pixels; + timing->HSyncEnd = timing->HSyncStart + h_sync_pixels; + timing->VTotal = v_total_lines; + timing->VSyncStart = v_total_lines - v_sync_plus_bp; + timing->VSyncEnd = timing->VSyncStart + kVSyncLines; + timing->Flags = kCRTCNegativeHorizontalSync; + timing->PixelClock = pixel_freq * 1000000; + timing->RefreshRate = v_frame_rate * 100; + + return 0; +} + +int setVBEMode(unsigned short mode, const VBECRTCInfoBlock * timing) +{ + bb.intno = 0x10; bb.eax.rr = funcSetMode; bb.ebx.rr = mode; + if (timing) { + bb.es = SEG(timing); + bb.edi.rr = OFF(timing); + } bios(&bb); return(bb.eax.r.h); } @@ -148,3 +283,15 @@ int getVBECurrentMode(unsigned short *mode) *mode = bb.ebx.rr; return(bb.eax.r.h); } + +int getVBEPixelClock(unsigned short mode, unsigned long * pixelClock) +{ + bb.intno = 0x10; + bb.eax.rr = funcGetSetPixelClock; + bb.ebx.r.l = 0; + bb.ecx.rx = *pixelClock; + bb.edx.rr = mode; + bios(&bb); + *pixelClock = bb.ecx.rx; + return(bb.eax.r.h); +} diff --git a/i386/libsaio/vbe.h b/i386/libsaio/vbe.h index 5481f8c..0f4c49b 100644 --- a/i386/libsaio/vbe.h +++ b/i386/libsaio/vbe.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -67,7 +68,8 @@ enum { funcGetSetDisplayStart = 0x4F07, funcGetSetPaletteFormat = 0x4F08, funcGetSetPaletteData = 0x4F09, - funcGetProtModeInterdace = 0x4F0A + funcGetProtModeInterdace = 0x4F0A, + funcGetSetPixelClock = 0x4F0B }; enum { @@ -217,10 +219,50 @@ enum { * Get/Set VBE Mode parameters */ enum { + kCustomRefreshRateBit = (1 << 11), kLinearFrameBufferBit = (1 << 14), kPreserveMemoryBit = (1 << 15) }; +/* + * CRTC information block passed to function 4F02 + * to override default refresh rate. + */ +#pragma pack(1) + +typedef struct { + unsigned short HTotal; + unsigned short HSyncStart; + unsigned short HSyncEnd; + unsigned short VTotal; + unsigned short VSyncStart; + unsigned short VSyncEnd; + unsigned char Flags; + unsigned long PixelClock; /* in Hz */ + unsigned short RefreshRate; /* units of 0.01 Hz */ + unsigned char Reserved[40]; +} VBECRTCInfoBlock; + +#pragma options align=reset + +/* + * Defined flags for 'Flags' field in VBECRTCInfoBlock. + */ +enum { + kCRTCDoubleScannedMode = (1 << 0), + kCRTCInterlacedMode = (1 << 1), + kCRTCNegativeHorizontalSync = (1 << 2), + kCRTCNegativeVerticalSync = (1 << 3) +}; + +/* + * The type of paramter passed to generateCRTCTimings(). + */ +enum { + kCRTCParamRefreshRate, + kCRTCParamPixelClock +}; + /* * Palette */ @@ -232,7 +274,13 @@ extern int getVBEDACFormat(unsigned char *format); extern int setVBEDACFormat(unsigned char format); extern int setVBEPalette(void *palette); extern int getVBEPalette(void *palette); -extern int setVBEMode(unsigned short mode); +extern int setVBEMode(unsigned short mode, const VBECRTCInfoBlock *timing); extern int getVBECurrentMode(unsigned short *mode); +extern int getVBEPixelClock(unsigned short mode, unsigned long *pixelClock); +extern int generateCRTCTiming(unsigned short width, + unsigned short height, + unsigned long paramValue, + int paramType, + VBECRTCInfoBlock * timing); #endif /* !__LIBSAIO_VBE_H */ diff --git a/i386/libsaio/xml.c b/i386/libsaio/xml.c new file mode 100644 index 0000000..5d5bbcf --- /dev/null +++ b/i386/libsaio/xml.c @@ -0,0 +1,663 @@ +/* + * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#include "bootstruct.h" +#include "libsaio.h" +#include "sl.h" +#include "xml.h" + +struct Module { + struct Module *nextModule; + long willLoad; + TagPtr dict; + char *plistAddr; + long plistLength; + char *driverPath; +}; +typedef struct Module Module, *ModulePtr; + +struct DriverInfo { + char *plistAddr; + long plistLength; + void *moduleAddr; + long moduleLength; +}; +typedef struct DriverInfo DriverInfo, *DriverInfoPtr; + +#define kDriverPackageSignature1 'MKXT' +#define kDriverPackageSignature2 'MOSX' + +struct DriversPackage { + unsigned long signature1; + unsigned long signature2; + unsigned long length; + unsigned long alder32; + unsigned long version; + unsigned long numDrivers; + unsigned long reserved1; + unsigned long reserved2; +}; +typedef struct DriversPackage DriversPackage; + +enum { + kCFBundleType2, + kCFBundleType3 +}; + + +#define USEMALLOC 1 +#define DOFREE 1 + +static long ParseTagList(char *buffer, TagPtr *tag, long type, long empty); +static long ParseTagKey(char *buffer, TagPtr *tag); +static long ParseTagString(char *buffer, TagPtr *tag); +static long ParseTagInteger(char *buffer, TagPtr *tag); +static long ParseTagData(char *buffer, TagPtr *tag); +static long ParseTagDate(char *buffer, TagPtr *tag); +static long ParseTagBoolean(char *buffer, TagPtr *tag, long type); +static long GetNextTag(char *buffer, char **tag, long *start); +static long FixDataMatchingTag(char *buffer, char *tag); +static TagPtr NewTag(void); +static char *NewSymbol(char *string); +#if DOFREE +static void FreeSymbol(char *string); +#endif + + +//========================================================================== +// XMLGetProperty + +TagPtr +XMLGetProperty( TagPtr dict, const char * key ) +{ + TagPtr tagList, tag; + + if (dict->type != kTagTypeDict) return 0; + + tag = 0; + tagList = dict->tag; + while (tagList) + { + tag = tagList; + tagList = tag->tagNext; + + if ((tag->type != kTagTypeKey) || (tag->string == 0)) continue; + + if (!strcmp(tag->string, key)) return tag->tag; + } + + return 0; +} + + +//========================================================================== +// XMLParseFile +// Expects to see one dictionary in the XML file. +// Puts the first dictionary it finds in the +// tag pointer and returns 0, or returns -1 if not found. +// +long +XMLParseFile( char * buffer, TagPtr * dict ) +{ + long length, pos; + TagPtr tag; + pos = 0; + + while (1) + { + length = XMLParseNextTag(buffer + pos, &tag); + if (length == -1) break; + + pos += length; + + if (tag == 0) continue; + if (tag->type == kTagTypeDict) break; + + XMLFreeTag(tag); + } + if (length < 0) { + return -1; + } + *dict = tag; + return 0; +} + +//========================================================================== +// ParseNextTag + +long +XMLParseNextTag( char * buffer, TagPtr * tag ) +{ + long length, pos; + char * tagName; + + length = GetNextTag(buffer, &tagName, 0); + if (length == -1) return -1; + + pos = length; + if (!strncmp(tagName, kXMLTagPList, 6)) + { + length = 0; + } + else if (!strcmp(tagName, kXMLTagDict)) + { + length = ParseTagList(buffer + pos, tag, kTagTypeDict, 0); + } + else if (!strcmp(tagName, kXMLTagDict "/")) + { + length = ParseTagList(buffer + pos, tag, kTagTypeDict, 1); + } + else if (!strcmp(tagName, kXMLTagKey)) + { + length = ParseTagKey(buffer + pos, tag); + } + else if (!strcmp(tagName, kXMLTagString)) + { + length = ParseTagString(buffer + pos, tag); + } + else if (!strcmp(tagName, kXMLTagInteger)) + { + length = ParseTagInteger(buffer + pos, tag); + } + else if (!strcmp(tagName, kXMLTagData)) + { + length = ParseTagData(buffer + pos, tag); + } + else if (!strcmp(tagName, kXMLTagDate)) + { + length = ParseTagDate(buffer + pos, tag); + } + else if (!strcmp(tagName, kXMLTagFalse)) + { + length = ParseTagBoolean(buffer + pos, tag, kTagTypeFalse); + } + else if (!strcmp(tagName, kXMLTagTrue)) + { + length = ParseTagBoolean(buffer + pos, tag, kTagTypeTrue); + } + else if (!strcmp(tagName, kXMLTagArray)) + { + length = ParseTagList(buffer + pos, tag, kTagTypeArray, 0); + } + else if (!strcmp(tagName, kXMLTagArray "/")) + { + length = ParseTagList(buffer + pos, tag, kTagTypeArray, 1); + } + else + { + *tag = 0; + length = 0; + } + + if (length == -1) return -1; + + return pos + length; +} + +//========================================================================== +// ParseTagList + +static long +ParseTagList( char * buffer, TagPtr * tag, long type, long empty ) +{ + long length, pos; + TagPtr tagList, tmpTag; + + tagList = 0; + pos = 0; + + if (!empty) + { + while (1) + { + length = XMLParseNextTag(buffer + pos, &tmpTag); + if (length == -1) break; + + pos += length; + + if (tmpTag == 0) break; + tmpTag->tagNext = tagList; + tagList = tmpTag; + } + + if (length == -1) + { + XMLFreeTag(tagList); + return -1; + } + } + + tmpTag = NewTag(); + if (tmpTag == 0) + { + XMLFreeTag(tagList); + return -1; + } + + tmpTag->type = type; + tmpTag->string = 0; + tmpTag->tag = tagList; + tmpTag->tagNext = 0; + + *tag = tmpTag; + + return pos; +} + +//========================================================================== +// ParseTagKey + +static long +ParseTagKey( char * buffer, TagPtr * tag ) +{ + long length, length2; + char *string; + TagPtr tmpTag, subTag; + + length = FixDataMatchingTag(buffer, kXMLTagKey); + if (length == -1) return -1; + + length2 = XMLParseNextTag(buffer + length, &subTag); + if (length2 == -1) return -1; + + tmpTag = NewTag(); + if (tmpTag == 0) + { + XMLFreeTag(subTag); + return -1; + } + + string = NewSymbol(buffer); + if (string == 0) + { + XMLFreeTag(subTag); + XMLFreeTag(tmpTag); + return -1; + } + + tmpTag->type = kTagTypeKey; + tmpTag->string = string; + tmpTag->tag = subTag; + tmpTag->tagNext = 0; + + *tag = tmpTag; + + return length + length2; +} + +//========================================================================== +// ParseTagString + +static long +ParseTagString( char * buffer, TagPtr * tag ) +{ + long length; + char * string; + TagPtr tmpTag; + + length = FixDataMatchingTag(buffer, kXMLTagString); + if (length == -1) return -1; + + tmpTag = NewTag(); + if (tmpTag == 0) return -1; + + string = NewSymbol(buffer); + if (string == 0) + { + XMLFreeTag(tmpTag); + return -1; + } + + tmpTag->type = kTagTypeString; + tmpTag->string = string; + tmpTag->tag = 0; + tmpTag->tagNext = 0; + + *tag = tmpTag; + return length; +} + +//========================================================================== +// ParseTagInteger + +static long +ParseTagInteger( char * buffer, TagPtr * tag ) +{ + long length, integer; + TagPtr tmpTag; + + length = FixDataMatchingTag(buffer, kXMLTagInteger); + if (length == -1) return -1; + + tmpTag = NewTag(); + if (tmpTag == 0) return -1; + + integer = 0; + + tmpTag->type = kTagTypeInteger; + tmpTag->string = (char *)integer; + tmpTag->tag = 0; + tmpTag->tagNext = 0; + + *tag = tmpTag; + + return length; +} + +//========================================================================== +// ParseTagData + +static long +ParseTagData( char * buffer, TagPtr * tag ) +{ + long length; + TagPtr tmpTag; + + length = FixDataMatchingTag(buffer, kXMLTagData); + if (length == -1) return -1; + + tmpTag = NewTag(); + if (tmpTag == 0) return -1; + + tmpTag->type = kTagTypeData; + tmpTag->string = 0; + tmpTag->tag = 0; + tmpTag->tagNext = 0; + + *tag = tmpTag; + + return length; +} + +//========================================================================== +// ParseTagDate + +static long +ParseTagDate( char * buffer, TagPtr * tag ) +{ + long length; + TagPtr tmpTag; + + length = FixDataMatchingTag(buffer, kXMLTagDate); + if (length == -1) return -1; + + tmpTag = NewTag(); + if (tmpTag == 0) return -1; + + tmpTag->type = kTagTypeDate; + tmpTag->string = 0; + tmpTag->tag = 0; + tmpTag->tagNext = 0; + + *tag = tmpTag; + + return length; +} + +//========================================================================== +// ParseTagBoolean + +static long +ParseTagBoolean( char * buffer, TagPtr * tag, long type ) +{ + TagPtr tmpTag; + + tmpTag = NewTag(); + if (tmpTag == 0) return -1; + + tmpTag->type = type; + tmpTag->string = 0; + tmpTag->tag = 0; + tmpTag->tagNext = 0; + + *tag = tmpTag; + + return 0; +} + +//========================================================================== +// GetNextTag + +static long +GetNextTag( char * buffer, char ** tag, long * start ) +{ + long cnt, cnt2; + + if (tag == 0) return -1; + + // Find the start of the tag. + cnt = 0; + while ((buffer[cnt] != '\0') && (buffer[cnt] != '<')) cnt++; + if (buffer[cnt] == '\0') return -1; + + // Find the end of the tag. + cnt2 = cnt + 1; + while ((buffer[cnt2] != '\0') && (buffer[cnt2] != '>')) cnt2++; + if (buffer[cnt2] == '\0') return -1; + + // Fix the tag data. + *tag = buffer + cnt + 1; + buffer[cnt2] = '\0'; + if (start) *start = cnt; + + return cnt2 + 1; +} + +//========================================================================== +// FixDataMatchingTag +// Modifies 'buffer' to add a '\0' at the end of the tag matching 'tag'. +// Returns the length of the data found, counting the end tag, +// or -1 if the end tag was not found. + +static long +FixDataMatchingTag( char * buffer, char * tag ) +{ + long length, start, stop; + char * endTag; + + start = 0; + while (1) + { + length = GetNextTag(buffer + start, &endTag, &stop); + if (length == -1) return -1; + + if ((*endTag == '/') && !strcmp(endTag + 1, tag)) break; + start += length; + } + + buffer[start + stop] = '\0'; + + return start + length; +} + +//========================================================================== +// NewTag + +#define kTagsPerBlock (0x1000) + +static TagPtr gTagsFree; + +static TagPtr +NewTag( void ) +{ + long cnt; + TagPtr tag; + + if (gTagsFree == 0) + { +#if USEMALLOC + tag = (TagPtr)malloc(kTagsPerBlock * sizeof(Tag)); +#else + tag = (TagPtr)AllocateBootXMemory(kTagsPerBlock * sizeof(Tag)); +#endif + if (tag == 0) return 0; + + // Initalize the new tags. + for (cnt = 0; cnt < kTagsPerBlock; cnt++) + { + tag[cnt].type = kTagTypeNone; + tag[cnt].string = 0; + tag[cnt].tag = 0; + tag[cnt].tagNext = tag + cnt + 1; + } + tag[kTagsPerBlock - 1].tagNext = 0; + + gTagsFree = tag; + } + + tag = gTagsFree; + gTagsFree = tag->tagNext; + + return tag; +} + +//========================================================================== +// XMLFreeTag + +void +XMLFreeTag( TagPtr tag ) +{ +#if DOFREE + if (tag == 0) return; + + if (tag->string) FreeSymbol(tag->string); + + XMLFreeTag(tag->tag); + XMLFreeTag(tag->tagNext); + + // Clear and free the tag. + tag->type = kTagTypeNone; + tag->string = 0; + tag->tag = 0; + tag->tagNext = gTagsFree; + gTagsFree = tag; +#else + return; +#endif +} + +//========================================================================== +// Symbol object. + +struct Symbol +{ + long refCount; + struct Symbol *next; + char string[]; +}; +typedef struct Symbol Symbol, *SymbolPtr; + +static SymbolPtr FindSymbol(char * string, SymbolPtr * prevSymbol); + +static SymbolPtr gSymbolsHead; + +//========================================================================== +// NewSymbol + +static char * +NewSymbol( char * string ) +{ +static SymbolPtr lastGuy = 0; + SymbolPtr symbol; + + // Look for string in the list of symbols. + symbol = FindSymbol(string, 0); + + // Add the new symbol. + if (symbol == 0) + { +#if USEMALLOC + symbol = (SymbolPtr)malloc(sizeof(Symbol) + 1 + strlen(string)); +#else + symbol = (SymbolPtr)AllocateBootXMemory(sizeof(Symbol) + 1 + strlen(string)); +#endif + if (symbol == 0) //return 0; + stop("NULL symbol!"); + + // Set the symbol's data. + symbol->refCount = 0; + strcpy(symbol->string, string); + + // Add the symbol to the list. + symbol->next = gSymbolsHead; + gSymbolsHead = symbol; + } + + // Update the refCount and return the string. + symbol->refCount++; + + if (lastGuy && lastGuy->next != 0) stop("last guy not last!"); + return symbol->string; +} + +//========================================================================== +// FreeSymbol + +#if DOFREE +static void +FreeSymbol( char * string ) +{ + SymbolPtr symbol, prev; + + // Look for string in the list of symbols. + symbol = FindSymbol(string, &prev); + if (symbol == 0) return; + + // Update the refCount. + symbol->refCount--; + + if (symbol->refCount != 0) return; + + // Remove the symbol from the list. + if (prev != 0) prev->next = symbol->next; + else gSymbolsHead = symbol->next; + + // Free the symbol's memory. + free(symbol); +} +#endif + +//========================================================================== +// FindSymbol + +static SymbolPtr +FindSymbol( char * string, SymbolPtr * prevSymbol ) +{ + SymbolPtr symbol, prev; + + symbol = gSymbolsHead; + prev = 0; + + while (symbol != 0) { + if (!strcmp(symbol->string, string)) break; + + prev = symbol; + symbol = symbol->next; + } + + if ((symbol != 0) && (prevSymbol != 0)) *prevSymbol = prev; + + return symbol; +} diff --git a/i386/libsaio/xml.h b/i386/libsaio/xml.h new file mode 100644 index 0000000..ca5ff08 --- /dev/null +++ b/i386/libsaio/xml.h @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef __LIBSAIO_XML_H +#define __LIBSAIO_XML_H + +enum { + kTagTypeNone = 0, + kTagTypeDict, + kTagTypeKey, + kTagTypeString, + kTagTypeInteger, + kTagTypeData, + kTagTypeDate, + kTagTypeFalse, + kTagTypeTrue, + kTagTypeArray +}; + +#define kXMLTagPList "plist " +#define kXMLTagDict "dict" +#define kXMLTagKey "key" +#define kXMLTagString "string" +#define kXMLTagInteger "integer" +#define kXMLTagData "data" +#define kXMLTagDate "date" +#define kXMLTagFalse "false/" +#define kXMLTagTrue "true/" +#define kXMLTagArray "array" + + +#define kPropCFBundleIdentifier ("CFBundleIdentifier") +#define kPropCFBundleExecutable ("CFBundleExecutable") +#define kPropOSBundleRequired ("OSBundleRequired") +#define kPropOSBundleLibraries ("OSBundleLibraries") +#define kPropIOKitPersonalities ("IOKitPersonalities") +#define kPropIONameMatch ("IONameMatch") + +struct Tag { + long type; + char *string; + struct Tag *tag; + struct Tag *tagNext; +}; +typedef struct Tag Tag, *TagPtr; + +extern long gImageFirstBootXAddr; +extern long gImageLastKernelAddr; + +TagPtr XMLGetProperty( TagPtr dict, const char * key ); +long XMLParseNextTag(char *buffer, TagPtr *tag); +void XMLFreeTag(TagPtr tag); +//========================================================================== +// XMLParseFile +// Expects to see one dictionary in the XML file. +// Puts the first dictionary it finds in the +// tag pointer and returns 0, or returns -1 if not found. +// +long XMLParseFile( char * buffer, TagPtr * dict ); + +#if 0 +// BootX shim functions + +extern long AllocateBootXMemory( long inSize ); +extern long InitBootXMemorySupport(void); +#endif + +#endif /* __LIBSAIO_XML_H */ diff --git a/i386/nasm/assemble.c b/i386/nasm/assemble.c index 7d00176..059c080 100644 --- a/i386/nasm/assemble.c +++ b/i386/nasm/assemble.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -260,7 +261,7 @@ long assemble (long segment, long offset, int bits, SEEK_SET); l = len; while (l > 0) { - long m = fread (buf, 1, (l>sizeof(buf)?sizeof(buf):l), + long m = fread (buf, 1, (l>(long)sizeof(buf)?(long)sizeof(buf):l), fp); if (!m) { /* @@ -972,9 +973,9 @@ static ea *process_ea (operand *input, ea *output, int addrbits, int rfield, }; int i; - for (i=0; ibasereg == regs[i]) break; - if (isib_present = FALSE;/* no SIB necessary */ output->bytes = 0; /* no offset necessary either */ output->modrm = 0xC0 | (rfield << 3) | (i/4); diff --git a/i386/nasm/assemble.h b/i386/nasm/assemble.h index aa22f7b..5074509 100644 --- a/i386/nasm/assemble.h +++ b/i386/nasm/assemble.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/disasm.c b/i386/nasm/disasm.c index 739a55d..f521f30 100644 --- a/i386/nasm/disasm.c +++ b/i386/nasm/disasm.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -560,13 +561,13 @@ long disasm (unsigned char *data, char *output, int segsize, long offset, case P_O32: slen += sprintf(output+slen, "o32 "); break; } - for (i = 0; i < elements(ico); i++) + for (i = 0; i < (int)elements(ico); i++) if ((*p)->opcode == ico[i]) { slen += sprintf(output+slen, "%s%s", icn[i], whichcond(ins.condition)); break; } - if (i >= elements(ico)) + if (i >= (int)elements(ico)) slen += sprintf(output+slen, "%s", insn_names[(*p)->opcode]); colon = FALSE; length += data - origdata; /* fix up for prefixes */ diff --git a/i386/nasm/disasm.h b/i386/nasm/disasm.h index 26499fc..6bdb53e 100644 --- a/i386/nasm/disasm.h +++ b/i386/nasm/disasm.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/eval.c b/i386/nasm/eval.c index f6020af..cfd02ff 100644 --- a/i386/nasm/eval.c +++ b/i386/nasm/eval.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/eval.h b/i386/nasm/eval.h index 141276f..3462346 100644 --- a/i386/nasm/eval.h +++ b/i386/nasm/eval.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/float.c b/i386/nasm/float.c index c7e6680..7c482e8 100644 --- a/i386/nasm/float.c +++ b/i386/nasm/float.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/float.h b/i386/nasm/float.h index e95b262..ea24ecc 100644 --- a/i386/nasm/float.h +++ b/i386/nasm/float.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/insns.h b/i386/nasm/insns.h index 184aa28..fedc057 100644 --- a/i386/nasm/insns.h +++ b/i386/nasm/insns.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/insnsa.c b/i386/nasm/insnsa.c index 690261f..8e73d6d 100644 --- a/i386/nasm/insnsa.c +++ b/i386/nasm/insnsa.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/insnsd.c b/i386/nasm/insnsd.c index 476405f..03d369c 100644 --- a/i386/nasm/insnsd.c +++ b/i386/nasm/insnsd.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/labels.c b/i386/nasm/labels.c index 7689fa4..c179762 100644 --- a/i386/nasm/labels.c +++ b/i386/nasm/labels.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/labels.h b/i386/nasm/labels.h index 40729d8..98ee7a4 100644 --- a/i386/nasm/labels.h +++ b/i386/nasm/labels.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/listing.c b/i386/nasm/listing.c index b5ee519..42daaad 100644 --- a/i386/nasm/listing.c +++ b/i386/nasm/listing.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/listing.h b/i386/nasm/listing.h index 01f6048..d97281b 100644 --- a/i386/nasm/listing.h +++ b/i386/nasm/listing.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/macros.c b/i386/nasm/macros.c index 66f9131..b0a87af 100644 --- a/i386/nasm/macros.c +++ b/i386/nasm/macros.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/names.c b/i386/nasm/names.c index 3d64302..e53982d 100644 --- a/i386/nasm/names.c +++ b/i386/nasm/names.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/nasm.c b/i386/nasm/nasm.c index 5c1e742..3360b54 100644 --- a/i386/nasm/nasm.c +++ b/i386/nasm/nasm.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/nasm.h b/i386/nasm/nasm.h index 262a2df..36b3a59 100644 --- a/i386/nasm/nasm.h +++ b/i386/nasm/nasm.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/nasmlib.c b/i386/nasm/nasmlib.c index 3d55c22..babc0e3 100644 --- a/i386/nasm/nasmlib.c +++ b/i386/nasm/nasmlib.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -720,7 +721,7 @@ int stdscan (void *private_data, struct tokenval *tv) { elements(insn_names)))>=0) { return tv->t_type = TOKEN_INSN; } - for (i=0; it_integer = ico[i]; diff --git a/i386/nasm/nasmlib.h b/i386/nasm/nasmlib.h index 3874e58..d7bfbf5 100644 --- a/i386/nasm/nasmlib.h +++ b/i386/nasm/nasmlib.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/ndisasm.c b/i386/nasm/ndisasm.c index ae6c34f..10f3ba9 100644 --- a/i386/nasm/ndisasm.c +++ b/i386/nasm/ndisasm.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -218,7 +219,7 @@ int main(int argc, char **argv) { if (lenread == 0) eof = TRUE; /* help along systems with bad feof */ p += lenread; - if (offset == nextsync) { + if (offset == (long)nextsync) { if (synclen) { printf("%08lX skipping 0x%lX bytes\n", offset, synclen); offset += synclen; @@ -230,7 +231,7 @@ int main(int argc, char **argv) { while (p > q && (p - q >= INSN_MAX || lenread == 0)) { lendis = disasm (q, outbuf, bits, offset, autosync); if (!lendis || lendis > (p - q) || - lendis > nextsync-offset) + lendis > (int)(nextsync-offset)) lendis = eatbyte (q, outbuf); output_ins (offset, q, lendis, outbuf); q += lendis; diff --git a/i386/nasm/outaout.c b/i386/nasm/outaout.c index 1faa613..04652c9 100644 --- a/i386/nasm/outaout.c +++ b/i386/nasm/outaout.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -832,7 +833,7 @@ static void aout_write_syms (void) { int i; saa_rewind (syms); - for (i=0; istrpos, aoutfp); fwritelong ((long)sym->type & ~SYM_WITH_SIZE, aoutfp); diff --git a/i386/nasm/outas86.c b/i386/nasm/outas86.c index 553920d..4042dff 100644 --- a/i386/nasm/outas86.c +++ b/i386/nasm/outas86.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -373,7 +374,7 @@ static void as86_write(void) { */ symlen = 0; saa_rewind (syms); - for (i = 0; i < nsyms; i++) { + for (i = 0; i < (int)nsyms; i++) { struct Symbol *sym = saa_rstruct (syms); if (sym->segment == SECT_BSS) sym->segment = SECT_DATA, sym->value += sdata.len; @@ -427,7 +428,7 @@ static void as86_write(void) { * Write the symbol table. */ saa_rewind (syms); - for (i = 0; i < nsyms; i++) { + for (i = 0; i < (int)nsyms; i++) { struct Symbol *sym = saa_rstruct (syms); fwriteshort (sym->strpos, as86fp); fwriteshort (sym->flags, as86fp); diff --git a/i386/nasm/outbin.c b/i386/nasm/outbin.c index f34d648..cb8d7b3 100644 --- a/i386/nasm/outbin.c +++ b/i386/nasm/outbin.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/outcoff.c b/i386/nasm/outcoff.c index b4c751a..fa9b753 100644 --- a/i386/nasm/outcoff.c +++ b/i386/nasm/outcoff.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -689,7 +690,7 @@ static void coff_write_symbols (void) { * The real symbols. */ saa_rewind (syms); - for (i=0; istrpos == -1 ? sym->name : NULL, sym->strpos, sym->value, sym->section, diff --git a/i386/nasm/outdbg.c b/i386/nasm/outdbg.c index d7a1af3..099d5e5 100644 --- a/i386/nasm/outdbg.c +++ b/i386/nasm/outdbg.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/outelf.c b/i386/nasm/outelf.c index d6de959..f71034a 100644 --- a/i386/nasm/outelf.c +++ b/i386/nasm/outelf.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/outform.c b/i386/nasm/outform.c index 2f1cc80..5b4cc16 100644 --- a/i386/nasm/outform.c +++ b/i386/nasm/outform.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/outform.h b/i386/nasm/outform.h index 63521eb..59b922b 100644 --- a/i386/nasm/outform.h +++ b/i386/nasm/outform.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/outobj.c b/i386/nasm/outobj.c index e56830e..0de87b4 100644 --- a/i386/nasm/outobj.c +++ b/i386/nasm/outobj.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/outrdf.c b/i386/nasm/outrdf.c index ffc07b2..9d271af 100644 --- a/i386/nasm/outrdf.c +++ b/i386/nasm/outrdf.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/parser.c b/i386/nasm/parser.c index c817583..7105f8f 100644 --- a/i386/nasm/parser.c +++ b/i386/nasm/parser.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/parser.h b/i386/nasm/parser.h index d35a11c..e44d4e7 100644 --- a/i386/nasm/parser.h +++ b/i386/nasm/parser.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/preproc.c b/i386/nasm/preproc.c index 8e4ada7..2361e67 100644 --- a/i386/nasm/preproc.c +++ b/i386/nasm/preproc.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -391,7 +392,7 @@ static int hash(char *s) { while (*s) { h += multipliers[i] * (unsigned char) (toupper(*s)); s++; - if (++i >= sizeof(multipliers)/sizeof(*multipliers)) + if (++i >= (int)sizeof(multipliers)/(int)sizeof(*multipliers)) i = 0; } h %= NHASH; diff --git a/i386/nasm/preproc.h b/i386/nasm/preproc.h index 11934a5..c04bfd0 100644 --- a/i386/nasm/preproc.h +++ b/i386/nasm/preproc.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/sync.c b/i386/nasm/sync.c index 4fe4efa..5de2d82 100644 --- a/i386/nasm/sync.c +++ b/i386/nasm/sync.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/nasm/sync.h b/i386/nasm/sync.h index ee01bc2..bafc3cb 100644 --- a/i386/nasm/sync.h +++ b/i386/nasm/sync.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/rcz/rcz_common.c b/i386/rcz/rcz_common.c index 264dafd..635884f 100644 --- a/i386/rcz/rcz_common.c +++ b/i386/rcz/rcz_common.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/rcz/rcz_common.h b/i386/rcz/rcz_common.h index 9c691ac..c0bd6d6 100644 --- a/i386/rcz/rcz_common.h +++ b/i386/rcz/rcz_common.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/rcz/rcz_compress_file.c b/i386/rcz/rcz_compress_file.c index 200ebe7..e8a319e 100644 --- a/i386/rcz/rcz_compress_file.c +++ b/i386/rcz/rcz_compress_file.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/rcz/rcz_compress_file.h b/i386/rcz/rcz_compress_file.h index 47798f2..c7257a2 100644 --- a/i386/rcz/rcz_compress_file.h +++ b/i386/rcz/rcz_compress_file.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/rcz/rcz_compress_mem.c b/i386/rcz/rcz_compress_mem.c index 56a58c2..576c6bc 100644 --- a/i386/rcz/rcz_compress_mem.c +++ b/i386/rcz/rcz_compress_mem.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/rcz/rcz_compress_mem.h b/i386/rcz/rcz_compress_mem.h index bf3e8b1..9c5ad02 100644 --- a/i386/rcz/rcz_compress_mem.h +++ b/i386/rcz/rcz_compress_mem.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/rcz/rcz_decompress_file.c b/i386/rcz/rcz_decompress_file.c index d47abbd..127fd7b 100644 --- a/i386/rcz/rcz_decompress_file.c +++ b/i386/rcz/rcz_decompress_file.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -117,7 +118,7 @@ rcz_decompress_file( { unsigned int c, j, k, jmatch, jabove; int length; - unsigned int even_length, word, token; + int even_length, word, token; unsigned char *outorigin = out; length = rcz_file_size(in_fd); diff --git a/i386/rcz/rcz_decompress_file.h b/i386/rcz/rcz_decompress_file.h index f962a12..180db9e 100644 --- a/i386/rcz/rcz_decompress_file.h +++ b/i386/rcz/rcz_decompress_file.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/rcz/rcz_decompress_mem.c b/i386/rcz/rcz_decompress_mem.c index e223f49..0934fa5 100644 --- a/i386/rcz/rcz_decompress_mem.c +++ b/i386/rcz/rcz_decompress_mem.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -44,7 +45,7 @@ rcz_decompress_memory(unsigned char *in, unsigned char *out) */ { unsigned int c, j, k, jmatch, jabove; - unsigned int length, even_length, word, token, version; + int length, even_length, word, token, version; unsigned char *outorigin = out; version = *in++; diff --git a/i386/rcz/rcz_decompress_mem.h b/i386/rcz/rcz_decompress_mem.h index bae443f..1b7db25 100644 --- a/i386/rcz/rcz_decompress_mem.h +++ b/i386/rcz/rcz_decompress_mem.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/strings/BootHelp.txt b/i386/strings/BootHelp.txt index 6f09934..869e04d 100644 --- a/i386/strings/BootHelp.txt +++ b/i386/strings/BootHelp.txt @@ -1,6 +1,6 @@ The boot: prompt waits ten seconds for you to type advanced startup options. -If you don't type anything, the computer continues starting up normally: It +If you don't type anything, the computer continues starting up normally. It uses the kernel and configuration files on the startup device, which it also uses as the root device. Advanced startup options use the following syntax: @@ -13,7 +13,7 @@ For example, to start up from: fd()mach_kernel rootdev=sd0a If the computer won't start up properly, you may be able to start it up using -the drivers you used to install Rhapsody. Type: config=Default +safe mode. Type: -f To continue starting up using standard options, press Return. diff --git a/i386/strings/English.lproj/Localizable.strings b/i386/strings/English.lproj/Localizable.strings index a990744c7d4f1d2c2eac2e54ae1aac085011daa8..a278da3347d6823d4cbd4829840e77a61de4e0f5 100644 GIT binary patch literal 9156 zcmeI2?Qa`J5XSej|B6$js({*5Z6$jj_S2a@ z+vzZ0H5zd*_4HXv>*}|i_SAo*)+Vj$*Eqe;zn9XNoqcX;u2<^s?OU34)*MaR&5|5w z#=~@>xkEZ1zoH%&l5|gV-j?i*u1%^&E1he^NNwnXPW!nXdEe@KEEyY(M%Nwnp!Hn+ z$~kuQ`y|i1r~XIj*F5elEmvA#!L!_g1juW%ou$hx#lGxlw!~W7x;D9*bgEg+!cD>! z=ULCN&zjoDl3=WP8nutIO_2FKueUGl8rl3!u_juN)$V?|&?;#5MkCCo$GUSdnW5HX zQ)4f*mXE!a=SMg5#h%)h^QZLUKy%e=c41*9Yi(Y_MtG)4ZA46a)clA>cx#?6w1@0y ze3b2Wko|wEv6q?yADjsR%O6k}R&HeLU41|so@rb6U6%W8{txC$RG2Q0GBVK0G1`t3 z+8DVnG#zOzyi(3ndt^BATiFATZ|7MY?I!7&xzPZ-yZsi!Ms0ydnrB0rz>>T2xv_5BC-D2J zJh-cN>|+st4QVNPx74^qfZM;XF~%`O%lw?TDwgi2AJUq>U#DmK9_aHVeXFb2>3;Uc z9bKDOxeuSw$C=IYQjLwCB*K^N>{VOE>xpyOkf zj@rm)q3@E|$NfbS52@aW*Vq@g*$-K%qS(35^XP#X`Xul5nagVg%j#w2 zxuoi*tRs<~N-`=e*MXXZTG-BJVB*U}4dJYf?YTFNqVSSO%WTQJs>r%Fqla^EZ%%dQ zbx2o+CFlAH#3-Y_uHDS)!Z%IE|eEDDCCk92s<0-4!v_W(`oa zB@4UGb_N)Gpsy#)O~2s>By(1EqB!6jj`J+Tx9>jcdch;6t7;&MrtyK@hv_?6exP>y zzah^K_3MdZpizu$YM-^GU#p51c8T2oN#ASf$2@}g*-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hX#cKQ*W2r9qq9d3RdV~Ye$3O zFt7U zrgVSzdUi7$UE}YcY4p<=HJZLY?v(UuJQ>aD?RYYw??yBnO-75+uz_HsFiLsx6ZIE8 zY2c3LyFW>nM8UKZT6l~w*rCdbG72q9_I%I5**f zl%MO)Xj%eh)1gY@p^NTmcXy{ln3($5O^1o>al@5V8kpB U6{aRr9({ofu&T2`9WFqB03Zhy`~Uy| diff --git a/i386/strings/English.lproj/NetInstall.strings b/i386/strings/English.lproj/NetInstall.strings index 97d780d9bc39624f1a0089e1672f3d9fe4b063c4..b09e29670ec3966c5ac6053ee07d9154cc8b160b 100644 GIT binary patch literal 9204 zcmeI2Yi}Dx6o%)sf5j?NRX}a3wh}@`fI^ajr8Eg~NWF=nj+|K1a?>RHOfBYF9gwH}1`e7VS!)2I+i*OWX;at~aUAy)KHPL#acK6F%tDxCyjWC;D=+1mGL#fHW z#?G~tkG&J;M>q4uP;Kk+lY4QXxym)$u&^1mHZNf#JX3`_BAOmGKcW%d>e7YwBs&_P zN4uRy|6ghBwdTMFQz2me0}7LsE7|%)AJB$p>ehW5<$e?YgZUg4rpuFv4775L*5iaW zMvjE0bFGC}@_9;+94`Ep_rT*vaTZ6rNjjC>NN`>zZguv5bYvIR~--MD_wF z#$m>TrLQ1MKehTMZkf1)gZ0U1K>W=MwiP)HU>L`u&KYkBqK(SWIM|sjQ4Cr zG)>fst&Jm-EMy_(gg2(aSk4))v`Syz8%X%k>G{aH?I8+)yJ=b9I$CEGernMd%Ap(W3B$O8T>>lp5+IzX}E zllo#^D}NHvVg0DOoU@WOsJW=VlINP5BfqhtNsApeRfpY|?e~PvJZ5f|>eI*?d0sF5 zx}l2iFd~0fi07*A)4q_HG)Rc9`_uF;Goalw`(bey4ev14(RfeSW`FLRPuv3Dr;Mwf zBq9##xxciG<9{YUz$s+%dbTKS@q@74mkn|YtSRQL>Mi@$S>n-xCH`p~(fhy=b)-!L zmT!v^!}v_z$k~D3Zd33-Qxp-UZ{qztdOway+=9-t?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EGJDoJj^~IYk|hQUOJQ(eSIM$E{jF`o~!qjBSqc4yFE=_Duhg-*AjE5i0 diff --git a/i386/strings/French.lproj/Localizable.strings b/i386/strings/French.lproj/Localizable.strings index 3f81b62295a983590a3bdfdc3c8af1674eebb248..ae96203f2a64ead98613f7452acd8a963db724ce 100644 GIT binary patch literal 13758 zcmeI3ZEsZ96@|}de#I3MqOC$B5~-?EwUuj|)RIFeW72+z6dBurDaN=SOrSqL>3Yuc z=InFlj%Q41RYjGBJ#+7Q*)MCaz0V6j{!~6KzbZr7D`(~V@~T{vm*ud$E^~c8)2CCt zds$A(LO+M)S^YGq$EW3%er}h2wL2`wYJaA;L)p={i}FMLep}yvuYb48c6nZ()1T4K zG{c}?C!-!ieK(XNje4nZ7V7)E$$9SR-M1QNvpHzJJhuCL{KuMkl^&J{`^=>yay1LJ z`S&%#k@Vs{dRedpAoVTyljyCq;py#jjW8Yk;=bPGZQGPwL^`5+Vu9l!;{(dxTe3X2B zQAcN{Z{?{h3*QGxa#>|K(^%l*3q70PaBMt#EbW@K`1M%!0h4o$Kd%;8m@=vw$$c(cn|B(L1 z%B9}q+5D8>NP|u1YDq+Z4x~KP+~?~5PTv`Kq0iXcQaFABH@kXsAsa{kv#SUr4jC1_ z21PBigyx{>LhmE8FEty8d9Kz*G#J2tj1cyWh~Lpu%gW3rRW`n3WqyNCw7`C^H2bCI zVIi?@L8?us~+P zWqvWMfCISWIt1{(*%+LFaPW&i!RkAGGwxr=X3YxMu}Sm2xn$bkL<2avtG{#2(L4rf zUhBtCTFm(wQrKfHLIz2Dq#vSbDl&q_0!^8FZ2K>&^|5)=ajRMYPn(gz9oD$3dCb&A zQAA1~1IX??!rW-+_@O`Xu`IzLCdIFo!5Z#MubknG32gO7BVwn1q;WK?%Hhir*#74l z5pB;aWAG{1j+tY0%XVv) zD3)uhddZ%FXVzn*w{fuLO>J#7n#-Ieb4?U}&zUwel^RaXD8U-c`7QTHeSmp4I%J*kI_N6F-E9)@FO^ZXP)X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)w$5-CTD`FVOtP4gPfZkf7-Ah~wx-S7E4&zUzv4AeuQ1BQ- zNA8Xrvy+Z6eiwy^bIO0|7U7x0T?JqG?Ck6>3dKkUR&|5n&nq!02(12p8R!Ff> zl+e^1*3#~Bq%{Val^=v>AX0S1g3YZR>ox*L48ScGX|;#F%rX9h>x~R_ZwF3z$=Asd zzt`8Xpc68=tpmprTBAO!Y%*-CpJ+K%-Ulojd2xuP(s28aH5$I7H5FxYyETp5HIhB} zC4diLMyF-I?Ct<1`oW-kftViJq_q_BwBXoZ%q#QNteZM6W&0vxYt%1Va+X)1%}Yyp zQT73MO}ic1a_6N9v=Am3YuI3a_|uR0K#efld}Z407rpv7SqmXw8TSYv_?H`0dWYW@ zJ$KGyo&DhKuUOtBh5Y+U6#Ridw3{N!y9SUMjauRnS`m`Ni5s!}PbDCZ|0HYAxs&C67*3J8E$6pXsLr`r%{E=G>z`0ELDZAOwditq?V8oiUGh3Ul;8 X0evY%l;AvC8}0ofgEyk7k_-O^b|Pl% diff --git a/i386/strings/French.lproj/NetInstall.strings b/i386/strings/French.lproj/NetInstall.strings index 9a65c3032af9153cd4816f42e9fe76ffbf894a79..e6f48a69f0e9e0a1375dd73c36c9d8cfe4a0b89b 100644 GIT binary patch literal 13824 zcmeI3>u*%o6~*so{)#IkL|cVKBvMtSYAe?^sU?R{#-#laDKglBDaN=Sn?V2gw(ED6 zH)o&w@Qew4sH!aNnS0M;Kh|D*p9g>cNB3Fxi>~kXy3_85?sa$Gz3L9Ti*BjUr}}iF zcdxqRZl#~Y?s@sttH)>EE&bf?_SNpNJ5u{oz3saleLL@dEZ=YI`)~B`cDLQVD9`E7 zXs4Q?SFhtikG{O?yJs5pQsb=D_t%s2+|j%5G|pyo(0V+!`+NMynt4tS%Y%KE(h<3; zh3fqK8sVAr;yrp$-ec0>yYyH?a=j!>U^jmeG4s5+AFP^C-s93%q%^E*T zzCJIbGt+nSRF;MBy(GCTGMs8GaPg&{EpIqBo;{LwRa*RdB>RBLrN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>sgxY?4>(ae^xO(}#EBT9!n}C)W=>)UQRcOy|)sSkz>duSo;oVr!VFzMo#VHfOP6 zxeH7@C*?M;O0ud*>-C=d%Sc$5;FMf8L?F35Y{XU)V52 ygx0dNUt!{aejRa1F~V9p7!GlP9P?nR(2el@wS4c!G5KqaYZiWkN^atJ<@s;Q)-&G# diff --git a/i386/strings/Italian.lproj/Localizable.strings b/i386/strings/Italian.lproj/Localizable.strings index cb1cb0ef833cf179f4d45bcd03d83d34fcf8d655..8909a1ea3283a016793737befaa3e50f7d257e58 100644 GIT binary patch literal 13130 zcmeI3ZEqXL6@}-sf5k$8p|(gIBms)TL0brtZ4gi-N0Qqw0Sw8MWFj`@l9rwH$G1Jt z9No;!?vkRE1PD-rkVJB4?%bDi&%HCd`pJ-lv(~&-Lz& zuDwm?X{py~y3Fr7&G;fc&}%F0Yuss?YW!SRyR@fIi}W#n-qPp4>SrtM=5J@|mHr}a zt`)9yg?ars-;BzAsP(_syiH}6@s@X_RafcRNiVFukT#d;TKX3cl=b!{;k{nIj_&93 z&Kr##oBwagLgx8eD|a>KS~8{@xh>h9-rJv@?0qlUb6q0}A?r={><^N=NZ)AuwMLw# zGmT&+d$q_o)4Z!JcdGHT^dZk%rbj(rP85}Q8cCFAk~X`MN4%KlzpPNN-|6agUUROw zZ}sz7BW4@Rs&xu1oJz+Jl2PL%v~?sw>N4AbzlfP_U#6e3&(5{JF$=ngj=k8)!iDBx zW0$~#V_9Pg+3z*#N?yN~)u0pk)^3?`;%M_7z9LGj$T~)I(FlKe&9_++(y{GID7Gz6 zv=*x^vQFd$NF=66Mcb)ld`z#i7RWOy7P=l8cda#u{A-Q2Zp4zfAR&AgnRqPuL@OjA zr_(rl@q_H}H_WwWT*n(^h4lgj+xj$&6eG!s)q2?O=bC+;{b$yAnC&F0&cvy%J<6{( z=VM;+_HgFx2HRfgSoVP7;;(Ur+F4=EDt>~|B4>#>dD^AII^pm5rpsQRYmD(_PhT~< z4%whYn@nF9XRd=s`x7*PP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+czcy239uPZ`<%S8%R;O;N!UD;~SAt zZ5tF*bO>FI5^6|t$iR&5J5}|6O6JD~b6>d)CKJqupd)Aq65y;;ObI2fFir*+7GPZG z%L52Eqv>o)lWTgI(&*#IY=$!WX);~TZfW_jTxOKfhwOgR$}vqA*cH@*GDmA6P2X!wWI1;OZC0S^PWRzTwm19*C@f7`j)CEf z(HHewoM7jjkL0v zVxv+3d$YmO+0vF7&@W3ghrrv$Ma>Rme@WJks`yT(n6a|CE_IP|M%u%Wr^;F^CNLb_ z5KTP#Lo8m}Vl`~jD|2G4lM?hDEgg;HLO{-Gb3SN?+_hiq+frMcDptUFzb}!67X2z? zAPjiVr*HxePY9~g6>q?Frn6#NcS6yrKx`&@7fwgY#U$rLToZ<=koL^+6%kD?Aw6Dk zbAXLkTjqyBUdcK(&Oh(cp>ogDXokD~S~R=L2p(Y184tpwyKp=G#A_M%=&^Rgz{m^C zqeZst*EddU{<}wc64wulR|Eu$+ z<~{V#1Y+2)c|2H$Ei~^q!UDTpK!-y<;Ie70AzK%xJ?}>uQ-!n54}bp~ekjsGSs4~A z>+ZWj^76GEHVnucd>PJoKzo(D4eBKp7wIthJ3;jRgZ$vaGiVoE#NP$b|Dm9x?+a!E z?z|&o+_6gC0hYAfN*H#_&xoZIK)j51ThF z^tXbTy4VaonR@G*n$VG!X{XiS2)Ee|``uTe?N8tE-XmxM3_>_D!fsGy>#effCq6!7 lT9wUzE*?ChQ^bw5EDe}c2vpB>gT7Lw?{4UXGi6MJ{{beH_Dlc( diff --git a/i386/strings/Italian.lproj/NetInstall.strings b/i386/strings/Italian.lproj/NetInstall.strings index ce1fb2ac1568d80dd68b17b7c38f29b71a4e4ed1..268aa9cf98d4ac8f0d75ff754e1405bcd628aee2 100644 GIT binary patch literal 13206 zcmeI3>uX%s6~)hI{}mU3QCkv+Bv6V&Tg1o?1Bzrza{DD&opUW2CpvRevO9ftJUjXOL9&-RMixTWd5-K)lDkUZ>HKS*ag>gA z2AUkzBI8)sU1qr_I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SbB^gRRly400|LY@}c*cU00Lcy^-}6SbU=mLqjFQFpVE8jY8CqwDEEM`P6S zOZxo7&3rzZk7jClb9J*&*ZA+_bo}?p9RI+j47WY>%3&R;^9wSAyC*))6{b0WO}(}<0_t@ zC42h0$piws;rhYyfh~Re_U&I3t3quy5)xYqCF%r;ng0uJ0Y)akMZhgG8GcBBGEl!e z@vu`q*}$us=#fi~j&UnHjP1^RL6ei>s#def&q%3TwB{gCT1j~HVq1*5FLB9=c3w2H zNI~SK%$oN~$I*}u;N%ojQq)S_IJKm`OpafCqXCE}(U)tSE=|!=|3}F_*vYJ1N&-m0 zppR{bP{CmgcM*&WJRxE6RG7+?DV3;oBUXIJ zH%KXKFVxbjaoj*eVwKtDLh_&R#&!afPW3)k;Fp|0^HpZ_^vrvDhSGBIM5LG~^ksM@ zsB=kXV(53fK$I;{FS21w1mfC+pv*tLsggp5jih0+i!&q*ym(mBDY*t~tFDW>NH4Rk zM`C50n0yFz-zqW-kg`Tyd2-Br**b}tTFunAohz3&{Bg#O;y zFBr$uTl^=7sO(4n!OJ&nVIYleI8U3>zU{PtBS5j*-h$K8pBf_C`Hu(mjn)w~;>2%p z`H1~B^e z=?ZN$vOI7grqp|s(1up?=oi;}UY=kF4)TE;))c8=J>Cv*XnZ9dE!|e{X`RR&r$_*q PqWx$MekW>$xS#zuTnqc- diff --git a/i386/strings/Swedish.lproj/Localizable.strings b/i386/strings/Swedish.lproj/Localizable.strings index 10762afc3a78a89a56b6cbc31286b634d4d76180..4c7f119e66d1394afee6290ec9dec69573f63dbd 100644 GIT binary patch literal 11836 zcmeI2|4$sp8OG=5{1q#t$ZaJYC6TJiQCm@i=_!uw7LxuFDFW_{DcGPpz@>kD+vhXS zz0Az+-W{f`)Jo9_Zf|$y{rbFLW@i8K&-6w5RqE0teMoQ9Wtyk==_p;NGhKhs)rFqD zPqVbp=O~@#t4=e%NT2Dmm0oJxQJQM}2R-f5u71ta$NYOszkjPgMjdJXOi#M}gzt9b zH>1=(*Q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;4ENy&t;Y4M-*UPv|!s3uymZ&q`?gid!%7fhW8Ku0X>z<@g!Ss(aoYi wTApgOeejZ2vWZ+`!wU;K+oZO2W7%L@EWfZD#GQ0sh>0h(yfbFXi>teT0wkXRg8%>k diff --git a/i386/strings/Swedish.lproj/NetInstall.strings b/i386/strings/Swedish.lproj/NetInstall.strings index 19d9dd183f55d005ef0bef752a486634b7f7941a..c7cb17c6a499682323e9435b5fc7d24ff401d8d1 100644 GIT binary patch literal 11872 zcmeI2?QdL16~^at|B98RDu8gRwh}_A0GZegR?{S4w|uEo`7MsI6I*LLsrlo9=QqzD z&zXDg?j`{wkgAovcki7!ug`gznfs4_me0zs%B<{`H|1ryEc5cZ9F&`Krt3Gly3n)N z<)mEeb5Ks})l4%!E1&4IQJ!ktK{?j=H+niN+xj&x@9OUj{r;W)7v>)7sw^i$n-K@5kk%HPl`GLQ4rc`)-&Fr)Z0u?5jXq67sAtO1ysoxp z99qw0&7<;4-#4Ovr|WZFUscYH%SN&EI~p_BjJc@H>U{8o$DoFM$GZPc^qOAy9P3~Y zBIH)o;r2?SjmOuzgT=D7B67agU1IR9=0m$#8_T@a9nb_y=As`cu(U7qNU@?)S|78WAt=h zcq~d0PhbYL=Ex6g{YlU8tSK?h*dOMIag=7euJ#aiX*R`=Uz&vCpfO?=AKIdisu!_X^U)B6 z7u6rrwJdp5WuXGT)Gs38?jGwQ%eL%CHg24qU5Fhli^cFZ9M0}%Tb?c1k!%vV zWxWsknj5*~L+!UyQ3P_GW5E4YmGV-!XgLQTTmBF6cW?6-((XjG(ZA(Y^mc`FU3Qkd z)yS9~_TAU~W!V`G$bV!+=YRjk+P-sePp=_>Ck-*iKi)z@@*VQhM-a`2y0$+vI)*ZC zFUAC}mSMqhNk$vuVwl1Astj}Ck1XT*5xNE!Bp-K4WC$bgMAmU_Y1(GV=3UmtH@SPV zU#9w{T)iLE2!C*ItsoBR1%|qH{)nmQn#zyAWSHj%eWQ%55L-&uDGj}@gD|2wo@(%Oz zVZ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E2UmEpN?GN%4boiBOjTDfEjZFFY%(9I(4)O zAL5*$pI9*GOGjug)3XHF-r$y=;>Pl37|Bw_T*<;1oG3hD+Ik$L+>9@0gy7W%@BR=3 zB)%Us>NQHCfE6LgO2w5|FzUJUO23gkv}%L5thZ3%ZUEeqH>)$T&8oeA<_$r$^w`|! zwB+ayaIz|sT>+2$&9*6TaC)nZymsPAKMF$uO`A>ZKw^gz1tM`klKz&F^xyRg|=avLv1Pb`N;3F}>&8aXHAhh3a@cuw-~PVOt?jy>ew6Z zY`(yQW_Cqoi8lt?3dcsjb)?KVjYHUA@1b+ QQkZx`YqrQ-^3pQzH{#n0TmS$7 diff --git a/i386/testmodule/install/install.h b/i386/testmodule/install/install.h index 252ea96..29a80d6 100644 --- a/i386/testmodule/install/install.h +++ b/i386/testmodule/install/install.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/testmodule/install/mode.c b/i386/testmodule/install/mode.c index 7afcb19..394a867 100644 --- a/i386/testmodule/install/mode.c +++ b/i386/testmodule/install/mode.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/testmodule/test.c b/i386/testmodule/test.c index 12e49b1..9a446c9 100644 --- a/i386/testmodule/test.c +++ b/i386/testmodule/test.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/testmodule/test.h b/i386/testmodule/test.h index 08575be..93aef06 100644 --- a/i386/testmodule/test.h +++ b/i386/testmodule/test.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/tests/bootHelper.c b/i386/tests/bootHelper.c index 07ddc33..db64946 100644 --- a/i386/tests/bootHelper.c +++ b/i386/tests/bootHelper.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/tests/rldtest.c b/i386/tests/rldtest.c index 428ee4e..ecaecf1 100644 --- a/i386/tests/rldtest.c +++ b/i386/tests/rldtest.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/tests/satest.c b/i386/tests/satest.c index ea5c106..9ae521a 100644 --- a/i386/tests/satest.c +++ b/i386/tests/satest.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/tests/sizeof.c b/i386/tests/sizeof.c index 9bd48db..1ee749d 100644 --- a/i386/tests/sizeof.c +++ b/i386/tests/sizeof.c @@ -3,25 +3,26 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ -#import "kernBootStruct.h" +#import main() { diff --git a/i386/util/BooterBitmap.h b/i386/util/BooterBitmap.h index 58ba632..a09a9be 100644 --- a/i386/util/BooterBitmap.h +++ b/i386/util/BooterBitmap.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/BooterBitmap.m b/i386/util/BooterBitmap.m index 16e5354..323b051 100644 --- a/i386/util/BooterBitmap.m +++ b/i386/util/BooterBitmap.m @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/FontBitmap.h b/i386/util/FontBitmap.h index 64873b1..a2c9d17 100644 --- a/i386/util/FontBitmap.h +++ b/i386/util/FontBitmap.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/Makefile b/i386/util/Makefile index 8bd1b72..8ae84b9 100644 --- a/i386/util/Makefile +++ b/i386/util/Makefile @@ -45,7 +45,7 @@ DUMPTIFF_OBJS = tif_packbits.o dumptiff.o BooterBitmap.o SIG = $(SYMROOT)/sig SIG_OBJS = sig.o -DIRS_NEEDED = $(OBJROOT) $(SYMROOT) $(LANGDIR) $(LOCALBIN) +DIRS_NEEDED = $(OBJROOT) $(SYMROOT) $(LANGDIR) #BITMAPS = Panel.image Wait1.image Wait2.image Wait3.image BITMAPS = Panel.image diff --git a/i386/util/bitmap.h b/i386/util/bitmap.h index 4c142e4..cfba40b 100644 --- a/i386/util/bitmap.h +++ b/i386/util/bitmap.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/cursor.h b/i386/util/cursor.h index bb37a33..68744dd 100644 --- a/i386/util/cursor.h +++ b/i386/util/cursor.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/dot.h b/i386/util/dot.h index 95a87b9..ffdfd76 100644 --- a/i386/util/dot.h +++ b/i386/util/dot.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/dot_bitmap.h b/i386/util/dot_bitmap.h index 98f5083..e22296c 100644 --- a/i386/util/dot_bitmap.h +++ b/i386/util/dot_bitmap.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/dumptiff.m b/i386/util/dumptiff.m index 89e38b6..d2f78af 100644 --- a/i386/util/dumptiff.m +++ b/i386/util/dumptiff.m @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/font.h b/i386/util/font.h index 745ac68..4b2d2ee 100644 --- a/i386/util/font.h +++ b/i386/util/font.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/hdot.h b/i386/util/hdot.h index 6cc8999..84cf741 100644 --- a/i386/util/hdot.h +++ b/i386/util/hdot.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/hdot_bitmap.h b/i386/util/hdot_bitmap.h index 49107db..a4ebf53 100644 --- a/i386/util/hdot_bitmap.h +++ b/i386/util/hdot_bitmap.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/images.h b/i386/util/images.h index d5f307a..2668069 100644 --- a/i386/util/images.h +++ b/i386/util/images.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/machOconv.c b/i386/util/machOconv.c index 78aac62..e69dddb 100644 --- a/i386/util/machOconv.c +++ b/i386/util/machOconv.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ @@ -27,7 +28,7 @@ #include #include #include -#include +#include #include int infile, outfile; @@ -42,7 +43,7 @@ static unsigned long swap( ) { if (swap_ends) - return NXSwapLong(x); + return OSSwapInt32(x); else return x; } @@ -80,7 +81,7 @@ usage: perror("read mach header"); exit(1); } - if (nc < sizeof (mh)) { + if (nc < (int)sizeof (mh)) { fprintf(stderr, "read mach header: premature EOF %d\n", nc); exit(1); } @@ -103,7 +104,7 @@ usage: perror("read load commands"); exit(1); } - if (nc < swap(mh.sizeofcmds)) { + if (nc < (int)swap(mh.sizeofcmds)) { fprintf(stderr, "read load commands: premature EOF %d\n", nc); exit(1); } @@ -135,13 +136,13 @@ usage: perror("read segment data"); exit(1); } - if (nc < swap(scp->filesize)) { + if (nc < (int)swap(scp->filesize)) { fprintf(stderr, "read segment data: premature EOF %d\n", nc); exit(1); } nc = write(outfile, (void *)data, vmsize); - if (nc < vmsize) { + if (nc < (int)vmsize) { perror("write segment data"); exit(1); } diff --git a/i386/util/mkfont.c b/i386/util/mkfont.c index caa9e4d..9fd01cf 100644 --- a/i386/util/mkfont.c +++ b/i386/util/mkfont.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/ns_box.h b/i386/util/ns_box.h index d087fa8..6370569 100644 --- a/i386/util/ns_box.h +++ b/i386/util/ns_box.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/ns_box_bitmap.h b/i386/util/ns_box_bitmap.h index 9731bc7..841e212 100644 --- a/i386/util/ns_box_bitmap.h +++ b/i386/util/ns_box_bitmap.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/ns_logo.h b/i386/util/ns_logo.h index 21ffd3d..20b3211 100644 --- a/i386/util/ns_logo.h +++ b/i386/util/ns_logo.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/ns_logo_bitmap.h b/i386/util/ns_logo_bitmap.h index 980289f..9048e9e 100644 --- a/i386/util/ns_logo_bitmap.h +++ b/i386/util/ns_logo_bitmap.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/ns_wait1.h b/i386/util/ns_wait1.h index 603a4ca..cd84f6e 100644 --- a/i386/util/ns_wait1.h +++ b/i386/util/ns_wait1.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/ns_wait1_bitmap.h b/i386/util/ns_wait1_bitmap.h index aa11729..dacac03 100644 --- a/i386/util/ns_wait1_bitmap.h +++ b/i386/util/ns_wait1_bitmap.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/ns_wait2.h b/i386/util/ns_wait2.h index 05c1336..d329c86 100644 --- a/i386/util/ns_wait2.h +++ b/i386/util/ns_wait2.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/ns_wait2_bitmap.h b/i386/util/ns_wait2_bitmap.h index 3165054..c21ea2a 100644 --- a/i386/util/ns_wait2_bitmap.h +++ b/i386/util/ns_wait2_bitmap.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/ns_wait3.h b/i386/util/ns_wait3.h index 3a0d435..d182e3a 100644 --- a/i386/util/ns_wait3.h +++ b/i386/util/ns_wait3.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/ns_wait3_bitmap.h b/i386/util/ns_wait3_bitmap.h index 4ec9868..f71b64f 100644 --- a/i386/util/ns_wait3_bitmap.h +++ b/i386/util/ns_wait3_bitmap.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/return.h b/i386/util/return.h index 218b682..7ad912f 100644 --- a/i386/util/return.h +++ b/i386/util/return.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/return_bitmap.h b/i386/util/return_bitmap.h index 0d35951..0017b90 100644 --- a/i386/util/return_bitmap.h +++ b/i386/util/return_bitmap.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/sig.c b/i386/util/sig.c index 5c5314c..7cb5a76 100644 --- a/i386/util/sig.c +++ b/i386/util/sig.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/spin_cursor.h b/i386/util/spin_cursor.h index fc4d364..3ab908a 100644 --- a/i386/util/spin_cursor.h +++ b/i386/util/spin_cursor.h @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/test.c b/i386/util/test.c index e216435..7016009 100644 --- a/i386/util/test.c +++ b/i386/util/test.c @@ -3,21 +3,22 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ diff --git a/i386/util/tif_packbits.c b/i386/util/tif_packbits.c index 4d47482..820f13b 100644 --- a/i386/util/tif_packbits.c +++ b/i386/util/tif_packbits.c @@ -3,26 +3,27 @@ * * @APPLE_LICENSE_HEADER_START@ * - * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights - * Reserved. This file contains Original Code and/or Modifications of - * Original Code as defined in and that are subject to the Apple Public - * Source License Version 1.1 (the "License"). You may not use this file - * except in compliance with the License. Please obtain a copy of the - * License at http://www.apple.com/publicsource and read it before using - * this file. + * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. * * The Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ #ifndef lint -static char rcsid[] = "$Header: /cvs/Darwin/boot/i386/util/tif_packbits.c,v 1.1.1.2 1999/08/04 21:17:19 wsanchez Exp $"; +static char rcsid[] = "$Header: /cvs/root/boot/i386/util/tif_packbits.c,v 1.1.1.2 1999/08/04 21:17:19 wsanchez Exp $"; #endif /* -- 2.45.2