summaryrefslogtreecommitdiff
path: root/src/cpu/amd/model_fxx/node_id.c
blob: 1904719270094239cc88ab63cad83cab28e77924 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* 2004.12 yhlu add dual core support */

#include <arch/cpu.h>
#include "cpu/amd/model_fxx/model_fxx_msr.h"

static inline unsigned get_node_id(void) {
	unsigned nodeid;
	//    get the apicid via cpuid(1) ebx[27:24]
        nodeid = (cpuid_ebx(1) >> 24) & 0x7;
	return nodeid;
}