Added Mainboard parser to i386/coreboot.c; see patch below.
Signed-off-by: Sean Nelson <[EMAIL PROTECTED]>
---
On Tue, Aug 12, 2008 at 7:32 AM, Jordan Crouse <[EMAIL PROTECTED]> wrote:
> On 12/08/08 01:21 -0700, Sean Nelson wrote:
>> Stefan Reinauer wrote:
>> > Sean Nelson wrote:
>> >
>> >> Patrick Georgi wrote:
>> >>
>> >>> Sean Nelson schrieb:
>> >>>
>> >>>> patch to move coreboot table code into libpayload. Allows payloads
>> >>>> using libpayload to access coreboot tables.
>> >>>>
>> >>>> Signed-Off-By: Sean Nelson <[EMAIL PROTECTED]>
>> >>>>
>> >>>>
>> >>> What about licensing? libpayload is BSD-licensed, the cbtable code
>> >>> seems to be GPL.
>> >>>
>> >>>
>> >>> Regards,
>> >>> Patrick Georgi
>> >>>
>> >>>
>> >> Laziness got the best of me, this patch fixes the licensing.
>> >>
>> >>
>> >
>> > Why did you add another probing function instead of extending
>> > i386/coreboot.c in libpayload?
>> >
>> >
>> >
>> >
>> fixed...
>
> This is rather different then the description - can you fire off a
> new description?
>
> If so, I'll ack this.
>
> Jordan
>
>
Index: include/sysinfo.h
===================================================================
--- include/sysinfo.h (revision 3501)
+++ include/sysinfo.h (working copy)
@@ -48,6 +48,9 @@
u32 cmos_range_start;
u32 cmos_range_end;
u32 cmos_checksum_location;
+
+ unsigned char mb_vendor[32];
+ unsigned char mb_part[32];
};
extern struct sysinfo_t lib_sysinfo;
Index: i386/coreboot.c
===================================================================
--- i386/coreboot.c (revision 3501)
+++ i386/coreboot.c (working copy)
@@ -90,6 +90,15 @@
}
#endif
+static void cb_parse_mainboard(unsigned char *ptr, struct sysinfo_t *info)
+{
+ struct cb_mainboard *mb = (struct cb_mainboard *)ptr;
+
+ memcpy(info->mb_vendor, MB_VENDOR_STRING(mb), 31);
+ memcpy(info->mb_part, MB_PART_STRING(mb), 31);
+}
+
+
static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
{
struct cb_header *header;
@@ -128,6 +137,9 @@
case CB_TAG_MEMORY:
cb_parse_memory(ptr, info);
break;
+ case CB_TAG_MAINBOARD:
+ cb_parse_mainboard(ptr, info);
+ break;
case CB_TAG_SERIAL:
cb_parse_serial(ptr, info);
break;
--
coreboot mailing list
[email protected]
http://www.coreboot.org/mailman/listinfo/coreboot