| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- /* Copyright Statement:
- *
- * This software/firmware and related documentation ("MediaTek Software") are
- * protected under relevant copyright laws. The information contained herein
- * is confidential and proprietary to MediaTek Inc. and/or its licensors.
- * Without the prior written permission of MediaTek inc. and/or its licensors,
- * any reproduction, modification, use or disclosure of MediaTek Software,
- * and information contained herein, in whole or in part, shall be strictly prohibited.
- */
- /* MediaTek Inc. (C) 2015. All rights reserved.
- *
- * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
- * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
- * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON
- * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
- * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
- * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
- * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
- * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
- * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
- * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
- * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
- * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
- * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
- * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
- * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
- * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
- */
- #ifndef __EFI_H__
- #define __EFI_H__
- typedef struct {
- u8 b[16];
- } __attribute__((packed)) efi_guid_t;
- typedef struct {
- u64 signature;
- u32 revision;
- u32 header_size;
- u32 header_crc32;
- u32 reserved;
- u64 my_lba;
- u64 alternate_lba;
- u64 first_usable_lba;
- u64 last_usable_lba;
- efi_guid_t disk_guid;
- u64 partition_entry_lba;
- u32 num_partition_entries;
- u32 sizeof_partition_entry;
- u32 partition_entry_array_crc32;
- } __attribute__((packed)) gpt_header;
- #define GPT_ENTRY_NAME_LEN (72 / sizeof(u16))
- typedef struct {
- efi_guid_t partition_type_guid;
- efi_guid_t unique_partition_guid;
- u64 starting_lba;
- u64 ending_lba;
- u64 attributes;
- u16 partition_name[GPT_ENTRY_NAME_LEN];
- } __attribute__((packed))gpt_entry;
- #define GPT_PROTECTIVE_MBR (0xEE)
- typedef struct {
- u8 boot_ind;
- u8 head;
- u8 sector;
- u8 cyl;
- u8 sys_ind;
- u8 end_head;
- u8 end_sector;
- u8 end_cyl;
- u32 start_sector;
- u32 nr_sects;
- } __attribute__((packed)) mbr_partition;
- typedef struct {
- u8 boot_code[440];
- u32 unique_mbr_signature;
- u16 unknown;
- mbr_partition partition_record[4];
- u16 signature;
- } __attribute__((packed)) pmbr;
- #define GPT_HEADER_SIGNATURE 0x5452415020494645ULL
- #endif
|