Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Dec 2012 20:47:07 -0800
From:      Neel Natu <neelnatu@gmail.com>
To:        Garrett Cooper <yanegomi@gmail.com>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Neel Natu <neel@freebsd.org>
Subject:   Re: svn commit: r244526 - head/usr.sbin/mptable
Message-ID:  <CAFgRE9GHc2T8pf5jZkE25npm%2BmQdeM1AaRr%2By6NGfVHMGQN2xg@mail.gmail.com>
In-Reply-To: <CAGH67wQtTF57pPAC9WbaJtORW1fhyQZJKD3HdcFJL_14wW8oGA@mail.gmail.com>
References:  <201212210131.qBL1Vuu4062307@svn.freebsd.org> <CAGH67wQtTF57pPAC9WbaJtORW1fhyQZJKD3HdcFJL_14wW8oGA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Garrett,

On Thu, Dec 20, 2012 at 6:07 PM, Garrett Cooper <yanegomi@gmail.com> wrote:
> On Thu, Dec 20, 2012 at 5:31 PM, Neel Natu <neel@freebsd.org> wrote:
>> Author: neel
>> Date: Fri Dec 21 01:31:56 2012
>> New Revision: 244526
>> URL: http://svnweb.freebsd.org/changeset/base/244526
>>
>> Log:
>>   The MPtable specification allows for an 8-bit "BUS ID" and "I/O APIC ID".
>>
>>   Since the 'busses[]' and 'apics[]' arrays are indexed by these 8-bit IDs
>>   make sure that they have enough space to accomodate up to 256 entries.
>>
>>   Submitted by: Ravi Shamanna
>>   Obtained from:        NetApp
>>
>> Modified:
>>   head/usr.sbin/mptable/mptable.c
>>
>> Modified: head/usr.sbin/mptable/mptable.c
>> ==============================================================================
>> --- head/usr.sbin/mptable/mptable.c     Fri Dec 21 01:19:48 2012        (r244525)
>> +++ head/usr.sbin/mptable/mptable.c     Fri Dec 21 01:31:56 2012        (r244526)
>> @@ -270,8 +270,8 @@ static void pnstr( char* s, int c );
>>  /* global data */
>>  static int     pfd;            /* physical /dev/mem fd */
>>
>> -static int     busses[16];
>> -static int     apics[16];
>> +static int     busses[256];
>> +static int     apics[256];
>>
>>  static int     ncpu;
>>  static int     nbus;
>> @@ -711,7 +711,7 @@ MPConfigTableHeader( u_int32_t pap )
>>      printf( "MP Config Base Table Entries:\n\n" );
>>
>>      /* initialze tables */
>> -    for ( x = 0; x < 16; ++x ) {
>> +    for ( x = 0; x < 256; ++x ) {
>
> `nitems(busses)` (requires sys/param.h)?

Sure.

Fixed in: http://svnweb.freebsd.org/base?view=revision&revision=244530

best
Neel

>
>>         busses[ x ] = apics[ x ] = 0xff;
>>
>>      }
>
> Thanks,
> -Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFgRE9GHc2T8pf5jZkE25npm%2BmQdeM1AaRr%2By6NGfVHMGQN2xg>