Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Issue 1701017: Add more test cases for GptInit() and fixed some bugs (Closed)

Created:
10 years, 8 months ago by Louis
Modified:
9 years, 4 months ago
Reviewers:
gauravsh
CC:
chromium-os-reviews_chromium.org, gauravsh
Visibility:
Public.

Description

Add more test cases for GptInit() and fixed some bugs

Patch Set 1 #

Total comments: 94

Patch Set 2 : refine according to Gaurav's code review #

Total comments: 17

Patch Set 3 : refine for code review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1684 lines, -158 lines) Patch
M src/platform/vboot_reference/cgptlib/cgpt.h View 1 2 6 chunks +34 lines, -6 lines 0 comments Download
M src/platform/vboot_reference/cgptlib/cgpt.c View 1 2 2 chunks +521 lines, -14 lines 0 comments Download
A src/platform/vboot_reference/cgptlib/cgpt_internal.h View 1 chunk +36 lines, -0 lines 0 comments Download
A src/platform/vboot_reference/cgptlib/crc32.h View 1 chunk +12 lines, -0 lines 0 comments Download
A src/platform/vboot_reference/cgptlib/crc32.c View 2 1 chunk +109 lines, -0 lines 0 comments Download
M src/platform/vboot_reference/cgptlib/gpt.h View 2 chunks +6 lines, -6 lines 0 comments Download
A src/platform/vboot_reference/cgptlib/quick_sort.h View 1 chunk +23 lines, -0 lines 0 comments Download
A src/platform/vboot_reference/cgptlib/quick_sort.c View 2 1 chunk +59 lines, -0 lines 0 comments Download
M src/platform/vboot_reference/cgptlib/tests/cgpt_test.h View 1 2 chunks +15 lines, -8 lines 0 comments Download
M src/platform/vboot_reference/cgptlib/tests/cgpt_test.c View 1 2 10 chunks +721 lines, -124 lines 0 comments Download
A src/platform/vboot_reference/cgptlib/tests/quick_sort_test.h View 1 chunk +11 lines, -0 lines 0 comments Download
A src/platform/vboot_reference/cgptlib/tests/quick_sort_test.c View 2 1 chunk +137 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Louis
10 years, 8 months ago (2010-04-28 01:15:31 UTC) #1
gauravsh
Hi Louis, Here is a first pass of comments. Some high level comments: 1) There ...
10 years, 7 months ago (2010-04-28 23:47:33 UTC) #2
Louis
10 years, 7 months ago (2010-04-30 01:34:02 UTC) #3
Louis
Hi Gaurav, Thanks for your great reviews. I have refined my CL according to your ...
10 years, 7 months ago (2010-04-30 01:34:54 UTC) #4
gauravsh
Overall this is looking very good. I mostly only have minor nits now. And thanks ...
10 years, 7 months ago (2010-04-30 05:57:14 UTC) #5
Louis
10 years, 7 months ago (2010-04-30 18:40:51 UTC) #6
Louis
Thank you, Gaurav. Your portability concern is right. I've removed the designated initializers. Also modified ...
10 years, 7 months ago (2010-04-30 18:45:05 UTC) #7
gauravsh
LGTM with comment. http://codereview.chromium.org/1701017/diff/7001/8001 File src/platform/vboot_reference/cgptlib/cgpt.c (right): http://codereview.chromium.org/1701017/diff/7001/8001#newcode230 src/platform/vboot_reference/cgptlib/cgpt.c:230: (GptHeader*)gpt->primary_header, On 2010/04/30 18:45:05, Louis wrote: ...
10 years, 7 months ago (2010-04-30 22:50:05 UTC) #8
Louis
10 years, 7 months ago (2010-04-30 23:06:45 UTC) #9
I don't think so. GPT headers/entries are actually stored on hard drive. vboot
is the only one, as far as I know, would read it from hard drive.

On 2010/04/30 22:50:05, gauravsh wrote:
> LGTM with comment.
> 
> http://codereview.chromium.org/1701017/diff/7001/8001
> File src/platform/vboot_reference/cgptlib/cgpt.c (right):
> 
> http://codereview.chromium.org/1701017/diff/7001/8001#newcode230
> src/platform/vboot_reference/cgptlib/cgpt.c:230:
> (GptHeader*)gpt->primary_header,
> On 2010/04/30 18:45:05, Louis wrote:
> > gpt->primary_header is actually defined as uint8_t* so that caller doesn't
> have
> > to know the implementation of GptHeader. For caller, it just loads blob from
> > sector and calls GptInit() to handle that.
> > On 2010/04/30 05:57:14, gauravsh wrote:
> > > This cast (GptHeader*) is unnecessary (assuming gpt->primary_header is
> defined
> > > as GptHeader*) 
> > 
> > 
> Oh all right. In that case, I just want to be sure that we don't run into
> padding issues later on - say we generate the GptHeader on a different
platform
> with different alignment requirements, and this type cast doesn't do what we
> intend.
> 
> Is GptData_t something that will be used by the firmware?

Powered by Google App Engine
This is Rietveld 408576698