nb/intel/x4x/raminit: Add DDR3 specific dra/drb settings
[coreboot.git] / payloads / coreinfo / cpuid.S
blobd98bd2c304ccfb6e2831b21a591c533b01b71614
1 /*
2  * This file is part of the coreinfo project.
3  *
4  * It is derived from the x86info project, which is GPLv2-licensed.
5  *
6  * Copyright (C) 2001-2007 Dave Jones <davej@codemonkey.org.uk>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; version 2 of the License.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  */
18 /* calling syntax:  docpuid(idx,eax,ebx,ecx,edx) */
20 .align 4
21 .text
23 .global docpuid
24         .type docpuid,@function
26 docpuid:
27         pushl %ebp
28         movl %esp, %ebp
29         pushl %edi
30         pushl %ebx
31         pushl %ecx
32         pushl %edx
33         movl 8(%ebp),%eax
34         cpuid
35         movl 12(%ebp),%edi
36         test %edi,%edi
37         jz L1
38         movl %eax, (%edi)
40 L1:     movl 16(%ebp),%edi
41         test %edi,%edi
42         jz L2
43         movl %ebx,(%edi)
45 L2:     movl 20(%ebp),%edi
46         test %edi,%edi
47         jz L3
48         movl %ecx,(%edi)
50 L3:     movl 24(%ebp), %edi
51         test %edi,%edi
52         jz L4
53         movl %edx,(%edi)
55 L4:     popl %edx
56         popl %ecx
57         popl %ebx
58         popl %edi
59         movl %ebp,%esp
60         popl %ebp
61         ret
63 .section .note.GNU-stack,"", @progbits