Rev 7040 | Rev 7727 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7040 | Rev 7270 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2011-2015. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2011-2015. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line 8... | ||
8 | $Revision: 7040 $ |
8 | $Revision: 7270 $ |
9 | 9 | ||
10 | ; ============================================================================= |
10 | ; ============================================================================= |
11 | ; ================================= Constants ================================= |
11 | ; ================================= Constants ================================= |
Line 958... | Line 958... | ||
958 | dword[ebx+GPTH.PartitionEntryLBA+4], esp |
958 | dword[ebx+GPTH.PartitionEntryLBA+4], esp |
959 | test eax, eax |
959 | test eax, eax |
960 | pop eax |
960 | pop eax |
961 | jnz .fail_free_gpea_gpt |
961 | jnz .fail_free_gpea_gpt |
962 | ; Compute and check CRC32 of GPEA |
962 | ; Compute and check CRC32 of GPEA |
963 | mov edx, [ebx+GPTH.PartitionEntryArrayCRC32] |
- | |
964 | mov eax, -1 |
963 | mov eax, -1 |
965 | stdcall crc_32, 0xEDB88320, edi, [GPEA_len] |
964 | stdcall crc_32, 0xEDB88320, edi, [GPEA_len] |
966 | xor eax, -1 |
965 | xor eax, -1 |
967 | cmp eax, edx |
966 | cmp eax, [ebx+GPTH.PartitionEntryArrayCRC32] |
968 | jnz .fail_free_gpea_gpt |
967 | jnz .fail_free_gpea_gpt |
Line 969... | Line 968... | ||
969 | 968 | ||
970 | ; Process partitions, skip zeroed ones. |
969 | ; Process partitions, skip zeroed ones. |
971 | .next_gpe: |
970 | .next_gpe: |
Line 980... | Line 979... | ||
980 | mov edx, dword[edi+GPE.EndingLBA+4] |
979 | mov edx, dword[edi+GPE.EndingLBA+4] |
981 | sub eax, dword[edi+GPE.StartingLBA+0] |
980 | sub eax, dword[edi+GPE.StartingLBA+0] |
982 | sbb edx, dword[edi+GPE.StartingLBA+4] |
981 | sbb edx, dword[edi+GPE.StartingLBA+4] |
983 | add eax, 1 |
982 | add eax, 1 |
984 | adc edx, 0 |
983 | adc edx, 0 |
- | 984 | push ebx |
|
- | 985 | mov ebx, [ebp-8] ; three-sectors-sized buffer |
|
985 | stdcall disk_add_partition, dword[edi+GPE.StartingLBA+0], \ |
986 | stdcall disk_add_partition, dword[edi+GPE.StartingLBA+0], \ |
986 | dword[edi+GPE.StartingLBA+4], eax, edx, esi |
987 | dword[edi+GPE.StartingLBA+4], eax, edx, esi |
- | 988 | pop ebx |
|
987 | add edi, [ebx+GPTH.SizeOfPartitionEntry] |
989 | add edi, [ebx+GPTH.SizeOfPartitionEntry] |
988 | .skip: |
990 | .skip: |
989 | dec [ebx+GPTH.NumberOfPartitionEntries] |
991 | dec [ebx+GPTH.NumberOfPartitionEntries] |
990 | jnz .next_gpe |
992 | jnz .next_gpe |