Changeset 3953


Ignore:
Timestamp:
Feb 17, 2009, 9:38:51 PM (7 years ago)
Author:
hailfinger
Message:

Add QWord support to acpigen.

Add TOM2 to the K8 DSDT.

Thanks to Rudolf Marek for testing and fixing this patch.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@…>
Signed-off-by: Rudolf Marek <r.marek@…>
Acked-by: Peter Stuge <peter@…>

Location:
trunk/coreboot-v2/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/coreboot-v2/src/arch/i386/boot/acpigen.c

    r3946 r3953  
    9898}
    9999
     100int acpigen_write_qword(uint64_t data)
     101{
     102        /* qword op */
     103        acpigen_emit_byte(0xe);
     104        acpigen_emit_byte(data & 0xff);
     105        acpigen_emit_byte((data >> 8) & 0xff);
     106        acpigen_emit_byte((data >> 16) & 0xff);
     107        acpigen_emit_byte((data >> 24) & 0xff);
     108        acpigen_emit_byte((data >> 32) & 0xff);
     109        acpigen_emit_byte((data >> 40) & 0xff);
     110        acpigen_emit_byte((data >> 48) & 0xff);
     111        acpigen_emit_byte((data >> 56) & 0xff);
     112        return 9;
     113}
     114
    100115int acpigen_write_name_byte(char *name, uint8_t val) {
    101116        int len;
     
    109124        len = acpigen_write_name(name);
    110125        len += acpigen_write_dword(val);
     126        return len;
     127}
     128
     129int acpigen_write_name_qword(char *name, uint64_t val) {
     130        int len;
     131        len = acpigen_write_name(name);
     132        len += acpigen_write_qword(val);
    111133        return len;
    112134}
  • trunk/coreboot-v2/src/arch/i386/include/arch/acpigen.h

    r3946 r3953  
    3131int acpigen_emit_stream(char *data, int size);
    3232int acpigen_write_dword(unsigned int data);
     33int acpigen_write_qword(uint64_t data);
    3334int acpigen_write_name(char *name);
    3435int acpigen_write_name_dword(char *name, uint32_t val);
     36int acpigen_write_name_qword(char *name, uint64_t val);
    3537int acpigen_write_name_byte(char *name, uint8_t val);
    3638int acpigen_write_scope(char *name);
  • trunk/coreboot-v2/src/northbridge/amd/amdk8/amdk8_acpi.c

    r3929 r3953  
    303303        msr = rdmsr(TOP_MEM);
    304304        lens += acpigen_write_name_dword("TOM1", msr.lo);
     305        msr = rdmsr(TOP_MEM2);
     306        lens += acpigen_write_name_qword("TOM2", (((uint64_t) msr.hi) << 32) | msr.lo);
    305307
    306308        lens += k8acpi_write_HT();
Note: See TracChangeset for help on using the changeset viewer.