Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 291861 Details for
Bug 428979
[Patch] Add support for geode CPUS
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
adds support for geode CPU's
rpm-4.4.2.2-geode.patch (text/plain), 6.55 KB, created by
Dennis Gilmore
on 2008-01-16 15:41:37 UTC
(
hide
)
Description:
adds support for geode CPU's
Filename:
MIME Type:
Creator:
Dennis Gilmore
Created:
2008-01-16 15:41:37 UTC
Size:
6.55 KB
patch
obsolete
>diff -Nru rpm-4.4.2.2-orig/installplatform rpm-4.4.2.2/installplatform >--- rpm-4.4.2.2-orig/installplatform 2007-09-11 01:46:16.000000000 -0500 >+++ rpm-4.4.2.2/installplatform 2008-01-15 16:54:11.000000000 -0600 >@@ -21,7 +21,7 @@ > > RPM="./rpm --rcfile $TEMPRC" > >-canonarch_sed='s_i.86_i386_;s_pentium[34]_i386_;s_athlon_i386_;s_sparc[^-]*_sparc_;s_alpha[^-]*_alpha_;s_arm[^-]*_arm_;s_\(powerpc\|ppc\)[^-]*_ppc_' >+canonarch_sed='s_i.86_i386_;s_pentium[34]_i386_;s_athlon_i386_;s_geode_i386_;s_sparc[^-]*_sparc_;s_alpha[^-]*_alpha_;s_arm[^-]*_arm_;s_\(powerpc\|ppc\)[^-]*_ppc_' > arch="`$RPM --eval '%{_arch}'|sed -e "$canonarch_sed"`" > VENDOR="`$RPM --eval '%{_vendor}'`" > OS="`$RPM --eval '%{_os}'`" >@@ -30,7 +30,7 @@ > target="`$RPM --eval '%{_target}'|sed -e "$canonarch_sed"`" > > case "$arch" in >- i[3456]86|pentium[34]|athlon) SUBSTS='s_i386_i386_ s_i386_i486_ s_i386_i586_ s_i386_i686_ s_i386_pentium3_ s_i386_pentium4_ s_i386_athlon_' ;; >+ i[3456]86|pentium[34]|athlon|geode) SUBSTS='s_i386_i386_ s_i386_i486_ s_i386_i586_ s_i386_i686_ s_i386_pentium3_ s_i386_pentium4_ s_i386_athlon_ s_i386_geode_' ;; > alpha*) SUBSTS='s_alpha_alpha_ s_alpha_alphaev5_ s_alpha_alphaev56_ s_alpha_alphapca56_ s_alpha_alphaev6_ s_alpha_alphaev67_' ;; > arm*) SUBSTS='s_arm_armv3l_ s_arm_armv4l_ s_arm_armv4tl_ s_arm_armv5tel_ s_arm_armv5tejl_ s_arm_armv6l_' ;; > sparc*) SUBSTS='s_sparc\(64\|64v\|v9v\|v9\)_sparc_ s_sparc64_sparcv9_;s_sparc\([^v]\|$\)_sparcv9\1_ s_sparcv9_sparc64_;s_sparc\([^6]\|$\)_sparc64\1_' ;; >@@ -70,7 +70,7 @@ > s390x-linux) LIB=lib64; MULTILIBNO=2 ;; > ppc-linux) MULTILIBNO=1 ;; > ppc64-linux) LIB=lib64; MULTILIBNO=2 ;; >- i?86-linux|pentium?-linux|athlon-linux) MULTILIBNO=1 ;; >+ i?86-linux|pentium?-linux|athlon-linux|geode-linux) MULTILIBNO=1 ;; > x86_64-linux|amd64-linux|ia32e-linux) LIB=lib64; MULTILIBNO=2 ;; > esac > >diff -Nru rpm-4.4.2.2-orig/lib/rpmrc.c rpm-4.4.2.2/lib/rpmrc.c >--- rpm-4.4.2.2-orig/lib/rpmrc.c 2007-09-11 01:28:15.000000000 -0500 >+++ rpm-4.4.2.2/lib/rpmrc.c 2008-01-15 17:11:44.000000000 -0600 >@@ -1082,6 +1082,32 @@ > return 0; > } > >+static int is_geode() >+{ >+ unsigned int eax, ebx, ecx, edx, family, model; >+ char vendor[16]; >+ /* If you care about space, you can just check ebx, ecx and edx directly >+ instead of forming a string first and then doing a strcmp */ >+ memset(vendor, 0, sizeof(vendor)); >+ >+ cpuid(0, &eax, &ebx, &ecx, &edx); >+ memset(vendor, 0, sizeof(vendor)); >+ *((unsigned int *)&vendor[0]) = ebx; >+ *((unsigned int *)&vendor[4]) = edx; >+ *((unsigned int *)&vendor[8]) = ecx; >+ if (strncmp(vendor, "AuthenticAMD", 12) != 0) >+ return 0; >+ cpuid(1, &eax, &ebx, &ecx, &edx); >+ family = (eax >> 8) & 0x0f; >+ model = (eax >> 4) & 0x0f; >+ if (family == 5) >+ switch (model) >+ { >+ case 10: // Geode >+ return 1; >+ } >+ return 0; >+} > #endif > > #if defined(__linux__) && defined(__powerpc__) >@@ -1329,6 +1355,8 @@ > strcpy(un.machine, "pentium4"); > else if (is_pentium3()) > strcpy(un.machine, "pentium3"); >+ else if (is_geode()) >+ strcpy(un.machine, "geode"); > else if (strchr("3456", un.machine[1]) && un.machine[1] != class) > un.machine[1] = class; > } >diff -Nru rpm-4.4.2.2-orig/lib/rpmts.c rpm-4.4.2.2/lib/rpmts.c >--- rpm-4.4.2.2-orig/lib/rpmts.c 2007-09-27 02:38:46.000000000 -0500 >+++ rpm-4.4.2.2/lib/rpmts.c 2008-01-15 16:54:11.000000000 -0600 >@@ -226,7 +226,7 @@ > /*@-nullassign@*/ > /*@observer@*/ > static const char *arches[] = { >- "i386", "i486", "i586", "i686", "athlon", "pentium3", "pentium4", "x86_64", "amd64", "ia32e", >+ "i386", "i486", "i586", "i686", "athlon", "pentium3", "pentium4", "x86_64", "amd64", "ia32e", "geode", > "alpha", "alphaev5", "alphaev56", "alphapca56", "alphaev6", "alphaev67", > "sparc", "sun4", "sun4m", "sun4c", "sun4d", "sparcv8", "sparcv9", "sparcv9v", > "sparc64", "sparc64v", "sun4u", >diff -Nru rpm-4.4.2.2-orig/macros.in rpm-4.4.2.2/macros.in >--- rpm-4.4.2.2-orig/macros.in 2007-09-27 06:11:31.000000000 -0500 >+++ rpm-4.4.2.2/macros.in 2008-01-15 16:54:11.000000000 -0600 >@@ -1188,7 +1188,7 @@ > # rpm can use regular expressions against target platforms in macro > # conditionals. > # >-%ix86 i386 i486 i586 i686 pentium3 pentium4 athlon >+%ix86 i386 i486 i586 i686 pentium3 pentium4 athlon geode > > #------------------------------------------------------------------------------ > # arch macro for all supported ARM processors >diff -Nru rpm-4.4.2.2-orig/Makefile.am rpm-4.4.2.2/Makefile.am >--- rpm-4.4.2.2-orig/Makefile.am 2007-09-11 01:46:59.000000000 -0500 >+++ rpm-4.4.2.2/Makefile.am 2008-01-15 16:54:11.000000000 -0600 >@@ -152,7 +152,8 @@ > $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/i486 ;\ > $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/i586 ;\ > $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/i686 ;\ >- $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/athlon ;;\ >+ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/athlon ;\ >+ $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/geode ;;\ > alpha*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/alpha ;\ > $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/alphaev6 ;;\ > arm*) $(mkinstalldirs) $(DESTDIR)$(pkgsrcdir)/RPMS/armv3l ;\ >diff -Nru rpm-4.4.2.2-orig/rpmrc.in rpm-4.4.2.2/rpmrc.in >--- rpm-4.4.2.2-orig/rpmrc.in 2007-09-27 02:33:19.000000000 -0500 >+++ rpm-4.4.2.2/rpmrc.in 2008-01-15 16:54:11.000000000 -0600 >@@ -22,6 +22,7 @@ > optflags: pentium3 -O2 -g -m32 -march=pentium3 -mtune=generic -fasynchronous-unwind-tables > optflags: pentium4 -O2 -g -m32 -march=pentium4 -mtune=generic -fasynchronous-unwind-tables > optflags: athlon -O2 -g -m32 -march=athlon -fasynchronous-unwind-tables >+optflags: geode -Os -g -m32 -march=geode > optflags: ia64 -O2 -g -m64 -mtune=generic > optflags: x86_64 -O2 -g -m64 -mtune=generic > optflags: amd64 -O2 -g -mtune=generic >@@ -83,6 +84,7 @@ > # Canonical arch names and numbers > > arch_canon: athlon: athlon 1 >+arch_canon: geode: geode 1 > arch_canon: pentium4: pentium4 1 > arch_canon: pentium3: pentium3 1 > arch_canon: i686: i686 1 >@@ -198,6 +200,7 @@ > buildarchtranslate: osfmach3_i386: i386 > > buildarchtranslate: athlon: i386 >+buildarchtranslate: geode: i386 > buildarchtranslate: pentium4: i386 > buildarchtranslate: pentium3: i386 > buildarchtranslate: i686: i386 >@@ -267,6 +270,7 @@ > arch_compat: alpha: axp noarch > > arch_compat: athlon: i686 >+arch_compat: geode: i586 > arch_compat: pentium4: pentium3 > arch_compat: pentium3: i686 > arch_compat: i686: i586 >@@ -371,6 +375,7 @@ > buildarch_compat: ia64: noarch > > buildarch_compat: athlon: i686 >+buildarch_compat: geode: i586 > buildarch_compat: pentium4: pentium3 > buildarch_compat: pentium3: i686 > buildarch_compat: i686: i586
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 428979
: 291861