--- inteltool-0.0+r4091.orig/cpu.c +++ inteltool-0.0+r4091/cpu.c @@ -30,21 +30,23 @@ unsigned int cpuid(unsigned int op) { - unsigned int ret; - unsigned int dummy2, dummy3, dummy4; - asm volatile ( - "pushl %%ebx \n" - "cpuid \n" - "movl %%ebx, %1 \n" - "popl %%ebx \n" - : "=a" (ret), "=r" (dummy2), "=c" (dummy3), "=d" (dummy4) - : "a" (op) - : "cc" - ); + uint32_t ret; + +#if defined(__DARWIN__) && !defined(__LP64__) + asm volatile ( + "pushl %%ebx \n" + "cpuid \n" + "popl %%ebx \n" + : "=a" (ret) : "a" (op) : "%ecx", "%edx" + ); +#else + asm ("cpuid" : "=a" (ret) : "a" (op) : "%ebx", "%ecx", "%edx"); +#endif + return ret; } -#ifndef DARWIN +#ifndef __DARWIN__ int msr_readerror = 0; msr_t rdmsr(int addr) @@ -279,7 +281,7 @@ return -1; } -#ifndef DARWIN +#ifndef __DARWIN__ fd_msr = open("/dev/cpu/0/msr", O_RDWR); if (fd_msr < 0) { perror("Error while opening /dev/cpu/0/msr"); @@ -300,7 +302,7 @@ close(fd_msr); for (core = 0; core < 8; core++) { -#ifndef DARWIN +#ifndef __DARWIN__ char msrfilename[64]; memset(msrfilename, 0, 64); sprintf(msrfilename, "/dev/cpu/%d/msr", core); @@ -321,12 +323,12 @@ cpu->per_core_msrs[i].number, msr.hi, msr.lo, cpu->per_core_msrs[i].name); } -#ifndef DARWIN +#ifndef __DARWIN__ close(fd_msr); #endif } -#ifndef DARWIN +#ifndef __DARWIN__ if (msr_readerror) printf("\n(*) Some MSRs could not be read. The marked values are unreliable.\n"); #endif --- inteltool-0.0+r4091.orig/debian/ChangeLog +++ inteltool-0.0+r4091/debian/ChangeLog @@ -0,0 +1,133 @@ +------------------------------------------------------------------------ +r3794 | stepan | 2008-12-04 16:18:20 +0100 (Thu, 04 Dec 2008) | 8 lines + +Patch to util/inteltool: +* PMBASE dumping now knows the registers. +* Add support for i965, i975, ICH8M +* Add support for Darwin OS using DirectIO + +Signed-off-by: Stefan Reinauer +Acked-by: Uwe Hermann + +------------------------------------------------------------------------ +r3716 | stepan | 2008-11-02 12:11:40 +0100 (Sun, 02 Nov 2008) | 6 lines + +inteltool 82945G/GZ/P/PL Support (trivial) + +Signed-off-by: Stefan Reinauer +Acked-by: Stefan Reinauer + + +------------------------------------------------------------------------ +r3531 | stepan | 2008-08-20 15:41:24 +0200 (Wed, 20 Aug 2008) | 7 lines + +split the one file, as the several printing functions will continue to grow +immensly when they know more systems / cpus / chipsets + +Signed-off-by: Stefan Reinauer +Acked-by: Stefan Reinauer + + +------------------------------------------------------------------------ +r3530 | stepan | 2008-08-20 14:42:39 +0200 (Wed, 20 Aug 2008) | 6 lines + +use seperate array for core 2 cpus (trivial) + +Signed-off-by: Stefan Reinauer +Acked-by: Stefan Reinauer + + +------------------------------------------------------------------------ +r3514 | stepan | 2008-08-18 12:58:09 +0200 (Mon, 18 Aug 2008) | 6 lines + +inteltool: match cpuid before attempting to print MSRs (trivial) + +Signed-off-by: Stefan Reinauer +Acked-by: Stefan Reinauer + + +------------------------------------------------------------------------ +r3383 | stepan | 2008-06-22 19:15:03 +0200 (Sun, 22 Jun 2008) | 5 lines + +as per Peter's suggestion. clean binary in make clean +Signed-off-by: Stefan Reinauer +Acked-by: Stefan Reinauer + + +------------------------------------------------------------------------ +r3333 | uwe | 2008-05-17 23:33:35 +0200 (Sat, 17 May 2008) | 10 lines + +Initial support for the Intel 82845 (Brookdale) and ICH2 (trivial). + +Tested on hardware: +Intel Northbridge: 8086:1a30 (i845) +Intel Southbridge: 8086:2440 (ICH2) + +Signed-off-by: Uwe Hermann +Acked-by: Uwe Hermann + + +------------------------------------------------------------------------ +r3318 | uwe | 2008-05-14 23:20:55 +0200 (Wed, 14 May 2008) | 6 lines + +Cosmetics, whitespace, coding style, partially ident-aided (trivial). + +Signed-off-by: Uwe Hermann +Acked-by: Uwe Hermann + + +------------------------------------------------------------------------ +r3315 | stepan | 2008-05-14 22:05:00 +0200 (Wed, 14 May 2008) | 6 lines + +add ICH7-M and ICH7 DH to inteltool (trivial) + +Signed-off-by: Stefan Reinauer +Acked-by: Stefan Reinauer + + +------------------------------------------------------------------------ +r3313 | stepan | 2008-05-14 16:47:32 +0200 (Wed, 14 May 2008) | 5 lines + +fix license mentioning in manpage (trivial) +Signed-off-by: Stefan Reinauer +Acked-by: Stefan Reinauer + + +------------------------------------------------------------------------ +r3312 | stepan | 2008-05-14 16:22:59 +0200 (Wed, 14 May 2008) | 4 lines + +trivial patch: move maintainable parts to the top and add ICH7-M DH southbridge +Signed-off-by: Stefan Reinauer +Acked-by: Stefan Reinauer + +------------------------------------------------------------------------ +r3311 | stepan | 2008-05-14 15:52:50 +0200 (Wed, 14 May 2008) | 5 lines + +trivial patch to fix options. Thanks to Uwe Hermann for the hint! + +Signed-off-by: Stefan Reinauer +Acked-by: Stefan Reinauer + +------------------------------------------------------------------------ +r3307 | stepan | 2008-05-14 13:38:22 +0200 (Wed, 14 May 2008) | 9 lines + +Example on how to add other chipsets to inteltool. ICH/ICH0, ICH4(-M) and ICH7 +have different register meanings, so they get their own lookup tables. + +This is a trivial patch. + +Signed-off-by: Stefan Reinauer +Acked-by: Stefan Reinauer + + +------------------------------------------------------------------------ +r3304 | stepan | 2008-05-14 00:14:21 +0200 (Wed, 14 May 2008) | 7 lines + +Add new revised inteltool that dumps all kinds of chipset information and drop old +gpio_dump utility. + +Signed-off-by: Stefan Reinauer +Acked-by: Peter Stuge + + +------------------------------------------------------------------------ --- inteltool-0.0+r4091.orig/debian/watch +++ inteltool-0.0+r4091/debian/watch @@ -0,0 +1 @@ +# Not needed/used, we're tracking upstream svn revisions. --- inteltool-0.0+r4091.orig/debian/rules +++ inteltool-0.0+r4091/debian/rules @@ -0,0 +1,18 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/rules/utils.mk +include /usr/share/cdbs/1/class/makefile.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk + +DEB_MAKE_INSTALL_TARGET := install PREFIX=$(CURDIR)/debian/inteltool/usr +LDFLAGS += -lpci + +# Upstream ChangeLog generated via 'LC_ALL=C svn log > ChangeLog'. +DEB_INSTALL_CHANGELOGS_ALL := debian/ChangeLog + +clean:: + rm -f .dependencies core .test.c .test + +common-binary-post-install-arch:: list-missing + --- inteltool-0.0+r4091.orig/debian/changelog +++ inteltool-0.0+r4091/debian/changelog @@ -0,0 +1,19 @@ +inteltool (0.0+r4091-1.2) unstable; urgency=low + + * Non-maintainer upload. + * Restrict architectures to any-amd64 and any-i386. (Closes: #559958) + + -- Ansgar Burchardt Sat, 10 Sep 2011 15:36:29 +0200 + +inteltool (0.0+r4091-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Replaced cpu.c with latest upstream subversion revision (Closes: #528856). + + -- Michael Banck Sun, 29 Nov 2009 01:00:59 +0100 + +inteltool (0.0+r4091-1) unstable; urgency=low + + * Initial release (Closes: #523525). + + -- Uwe Hermann Fri, 10 Apr 2009 21:13:04 +0200 --- inteltool-0.0+r4091.orig/debian/control +++ inteltool-0.0+r4091/debian/control @@ -0,0 +1,21 @@ +Source: inteltool +Section: utils +Priority: extra +Maintainer: Uwe Hermann +Build-Depends: cdbs, debhelper (>= 7), libpci-dev +Standards-Version: 3.8.1 +Homepage: http://coreboot.org/Inteltool + +Package: inteltool +Architecture: any-amd64 any-i386 +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Dump Intel CPU / chipset configuration parameters + inteltool is a tool for dumping the configuration space of + Intel CPUs, northbridges and southbridges. + . + This includes register contents of e.g. GPIO, RCBA, PMBASE, MCHBAR, EPBAR, + DMIBAR, PCIEXBAR, and more. + . + It has been developed for the coreboot project (see http://coreboot.org for + details on coreboot), but may also be useful for other purposes. + --- inteltool-0.0+r4091.orig/debian/compat +++ inteltool-0.0+r4091/debian/compat @@ -0,0 +1 @@ +7 --- inteltool-0.0+r4091.orig/debian/dirs +++ inteltool-0.0+r4091/debian/dirs @@ -0,0 +1 @@ +usr/sbin --- inteltool-0.0+r4091.orig/debian/copyright +++ inteltool-0.0+r4091/debian/copyright @@ -0,0 +1,35 @@ +This package was debianized by: + + Uwe Hermann on Fri, 10 Apr 2009 21:13:04 +0200 + +It was downloaded from: + + http://coreboot.org/Inteltool + +Upstream Author: + + Stefan Reinauer + +------------------------------------------------------------------------------- + +Files: * +Copyright: © 2008 coresystems GmbH +License: GPL-2 + +On Debian systems, the complete text of the GNU General +Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'. + +------------------------------------------------------------------------------- + +Files: Makefile +Copyright: © 2008 coresystems GmbH +License: GPL-2+ + +------------------------------------------------------------------------------- + +Files: debian/* +Copyright: © 2009 Uwe Hermann +License: PD + The packaging done by Uwe Hermann is hereby + released as public domain. +