Re: MSI on HyperTransport

2011-05-30 Thread Stuart Henderson
On 2011/05/29 20:03, Mark Kettenis wrote:
 On some machines the MSI remapping capabilities are not automatically
 enabled by the BIOS.  My diff leaves those disabled.

I guess this is the case with my HT-1000 based Supermicro; system still
works but msi is not used.

 This diff will effectively enable MSI for many systems with AMD CPUs,
 without an easy way to turn it off.

Maybe G5 macppc too. See 4.7 on PowerMac9,1 (G5 late 2004) in
dmesglog.47, also there are HT-1000 based MP Mac systems but I don't
think we run on those yet.



Re: Deprecating mips-openbsd

2011-05-30 Thread Rainer Orth
Richard Sandiford rdsandif...@googlemail.com writes:

 Index: gcc/config.gcc
 ===
 --- gcc/config.gcc2011-05-28 09:00:32.0 +0100
 +++ gcc/config.gcc2011-05-28 09:00:45.0 +0100
 @@ -240,6 +240,7 @@ case ${target} in
 i[34567]86-*-interix3*\
   | score-*   \
   | *-*-solaris2.8*   \
 + | mips*-*-openbsd*  \
   )
  if test x$enable_obsolete != xyes; then
echo *** Configuration ${target} is obsolete. 2

Would you mind keeping the list sorted alphabetically?

Thanks.
Rainer

-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University



Re: Deprecating mips-openbsd

2011-05-30 Thread Otto Moerbeek
On Mon, May 30, 2011 at 10:09:59AM +0200, Rainer Orth wrote:

 Richard Sandiford rdsandif...@googlemail.com writes:
 
  Index: gcc/config.gcc
  ===
  --- gcc/config.gcc  2011-05-28 09:00:32.0 +0100
  +++ gcc/config.gcc  2011-05-28 09:00:45.0 +0100
  @@ -240,6 +240,7 @@ case ${target} in
  i[34567]86-*-interix3*  \
| score-* \
| *-*-solaris2.8* \
  + | mips*-*-openbsd*\
)
   if test x$enable_obsolete != xyes; then
 echo *** Configuration ${target} is obsolete. 2
 
 Would you mind keeping the list sorted alphabetically?

Hmm, this still woudl match mips64el-unknown-openbsd4.9 and
mips64-unknown-openbsd4.9, right?

Those two are active openbsd ports.

-Otto



Re: Deprecating mips-openbsd

2011-05-30 Thread Richard Sandiford
Rainer Orth r...@cebitec.uni-bielefeld.de writes:
 Richard Sandiford rdsandif...@googlemail.com writes:
 Index: gcc/config.gcc
 ===
 --- gcc/config.gcc   2011-05-28 09:00:32.0 +0100
 +++ gcc/config.gcc   2011-05-28 09:00:45.0 +0100
 @@ -240,6 +240,7 @@ case ${target} in
 i[34567]86-*-interix3*   \
   | score-*  \
   | *-*-solaris2.8*  \
 + | mips*-*-openbsd* \
   )
  if test x$enable_obsolete != xyes; then
echo *** Configuration ${target} is obsolete. 2

 Would you mind keeping the list sorted alphabetically?

Sorry, fixed as follows.

Richard


gcc/
* config.gcc: Keep obselete list sorted.

Index: gcc/config.gcc
===
--- gcc/config.gcc  2011-05-30 17:26:51.0 +0100
+++ gcc/config.gcc  2011-05-30 17:26:58.0 +0100
@@ -238,9 +238,9 @@ md_file=
 # Obsolete configurations.
 case ${target} in
i[34567]86-*-interix3*  \
+ | mips*-*-openbsd*\
  | score-* \
  | *-*-solaris2.8* \
- | mips*-*-openbsd*\
  )
 if test x$enable_obsolete != xyes; then
   echo *** Configuration ${target} is obsolete. 2



Re: Deprecating mips-openbsd

2011-05-30 Thread Richard Sandiford
Otto Moerbeek o...@drijf.net writes:
 On Mon, May 30, 2011 at 10:09:59AM +0200, Rainer Orth wrote:
 Richard Sandiford rdsandif...@googlemail.com writes:
 
  Index: gcc/config.gcc
  ===
  --- gcc/config.gcc 2011-05-28 09:00:32.0 +0100
  +++ gcc/config.gcc 2011-05-28 09:00:45.0 +0100
  @@ -240,6 +240,7 @@ case ${target} in
  i[34567]86-*-interix3* \
| score-*\
| *-*-solaris2.8*\
  + | mips*-*-openbsd*   \
)
   if test x$enable_obsolete != xyes; then
 echo *** Configuration ${target} is obsolete. 2
 
 Would you mind keeping the list sorted alphabetically?

 Hmm, this still woudl match mips64el-unknown-openbsd4.9 and
 mips64-unknown-openbsd4.9, right?

Yes, in the trivial sense that those target names match the glob.
But configuring for those targets would generate the same code as
mips-openbsd and mipsel-openbsd; they wouldn't generate 64-bit code.
There is no separate 64-bit MIPS OpenBSD configuration in FSF sources.

Richard



misc. ksh diffs

2011-05-30 Thread Alexander Polakov
I think ksh needs more love from the devs ;)

[PATCH 1/7] ksh/vi mode: complete as command on Ctrl-f.

 * adds a flag for x_cf_glob() to force completion like it was a command
 * new argument for complete_word() to pass the flag
 * reuse print_expansions() unused argument to pass the flag

 Why: useful for sudo or one-liner completion
 XXX: use different key combination?
---
 edit.c |2 ++
 edit.h |7 ---
 vi.c   |   22 +++---
 3 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/edit.c b/edit.c
index 6c357a7..0b1ff7d 100644
--- a/edit.c
+++ b/edit.c
@@ -599,6 +599,8 @@ x_cf_glob(int flags, const char *buf, int buflen, int pos, 
int *startp,
len = x_locate_word(buf, buflen, pos, startp, is_command);
if (!(flags  XCF_COMMAND))
is_command = 0;
+   if (flags  XCF_FORCE_COMMAND)
+   is_command = 1;
/* Don't do command globing on zero length strings - it takes too
 * long and isn't very useful.  File globs are more likely to be
 * useful, so allow these.
diff --git a/edit.h b/edit.h
index f966fe4..9c75ffc 100644
--- a/edit.h
+++ b/edit.h
@@ -38,9 +38,10 @@ typedef struct {
 EXTERN X_chars edchars;
 
 /* x_fc_glob() flags */
-#define XCF_COMMANDBIT(0)  /* Do command completion */
-#define XCF_FILE   BIT(1)  /* Do file completion */
-#define XCF_FULLPATH   BIT(2)  /* command completion: store full path */
+#define XCF_COMMANDBIT(0)  /* Do command completion */
+#define XCF_FILE   BIT(1)  /* Do file completion */
+#define XCF_FULLPATH   BIT(2)  /* command completion: store full path 
*/
+#define XCF_FORCE_COMMAND  BIT(3)  /* Force completion as a command */
 #define XCF_COMMAND_FILE (XCF_COMMAND|XCF_FILE)
 
 /* edit.c */
diff --git a/vi.c b/vi.c
index 889b35a..e4173c7 100644
--- a/vi.c
+++ b/vi.c
@@ -58,7 +58,7 @@ static intnewcol(int, int);
 static voiddisplay(char *, char *, int);
 static voided_mov_opt(int, char *);
 static int expand_word(int);
-static int complete_word(int, int);
+static int complete_word(int, int, int);
 static int print_expansions(struct edstate *, int);
 static int char_len(int);
 static voidx_vi_zotc(int);
@@ -651,7 +651,7 @@ vi_insert(int ch)
break;
 
case Ctrl('f'):
-   complete_word(0, 0);
+   complete_word(0, 0, XCF_FORCE_COMMAND);
break;
 
case Ctrl('e'):
@@ -660,7 +660,7 @@ vi_insert(int ch)
 
case Ctrl('i'):
if (Flag(FVITABCOMPLETE)) {
-   complete_word(0, 0);
+   complete_word(0, 0, 0);
break;
}
/* FALLTHROUGH */
@@ -,14 +,14 @@ vi_cmd(int argcnt, const char *cmd)
 
case '=':   /* att ksh */
case Ctrl('e'): /* Nonstandard vi/ksh */
-   print_expansions(es, 1);
+   print_expansions(es, 0);
break;
 
 
case Ctrl('i'): /* Nonstandard vi/ksh */
if (!Flag(FVITABCOMPLETE))
return -1;
-   complete_word(1, argcnt);
+   complete_word(1, argcnt, 0);
break;
 
case Ctrl('['): /* some annoying att ksh's */
@@ -1126,7 +1126,7 @@ vi_cmd(int argcnt, const char *cmd)
return -1;
case '\\':  /* att ksh */
case Ctrl('f'): /* Nonstandard vi/ksh */
-   complete_word(1, argcnt);
+   complete_word(1, argcnt, 0);
break;
 
 
@@ -1939,7 +1939,7 @@ expand_word(int command)
 }
 
 static int
-complete_word(int command, int count)
+complete_word(int command, int count, int flags)
 {
static struct edstate *buf;
int rval = 0;
@@ -1953,7 +1953,7 @@ complete_word(int command, int count)
 
/* Undo previous completion */
if (command == 0  expanded == COMPLETE  buf) {
-   print_expansions(buf, 0);
+   print_expansions(buf, flags);
expanded = PRINT;
return 0;
}
@@ -1971,7 +1971,7 @@ complete_word(int command, int count)
/* XCF_FULLPATH for count 'cause the menu printed by print_expansions()
 * was done this way.
 */
-   nwords = x_cf_glob(XCF_COMMAND_FILE | (count ? XCF_FULLPATH : 0),
+   nwords = x_cf_glob(XCF_COMMAND_FILE | (count ? XCF_FULLPATH : 0) | 
flags,
es-cbuf, es-linelen, es-cursor,
start, end, words, is_command);
if (nwords == 0) {
@@ -2044,14 +2044,14 @@ complete_word(int command, int count)
 }
 
 static int
-print_expansions(struct edstate *e, int command)
+print_expansions(struct edstate *e, 

Re: cwm: utf-8 diff

2011-05-30 Thread Owain Ainsworth
On Fri, May 27, 2011 at 04:28:44PM +0400, Alexander Polakov wrote:
 This diff works for me with some fonts (fixed, snap, even verdana),
 but doesn't work with terminus (black squares instead of chars).

I have been meaning to write this diff for years.

I will try and get to it soon.

Cheers,

-0-
 
 Index: app/cwm/calmwm.c
 ===
 RCS file: /cvs/xenocara/app/cwm/calmwm.c,v
 retrieving revision 1.54
 diff -u -p -u -r1.54 calmwm.c
 --- app/cwm/calmwm.c  11 May 2011 13:53:51 -  1.54
 +++ app/cwm/calmwm.c  27 May 2011 12:35:51 -
 @@ -30,6 +30,7 @@
  #include string.h
  #include stdio.h
  #include unistd.h
 +#include locale.h
  
  #include calmwm.h
  
 @@ -61,6 +62,8 @@ main(int argc, char **argv)
   const char  *conf_file = NULL;
   char*display_name = NULL;
   int  ch;
 +
 + setlocale(LC_CTYPE, );
  
   while ((ch = getopt(argc, argv, c:d:)) != -1) {
   switch (ch) {
 Index: app/cwm/font.c
 ===
 RCS file: /cvs/xenocara/app/cwm/font.c,v
 retrieving revision 1.14
 diff -u -p -u -r1.14 font.c
 --- app/cwm/font.c11 May 2011 13:53:51 -  1.14
 +++ app/cwm/font.c27 May 2011 12:35:51 -
 @@ -66,7 +66,7 @@ font_width(struct screen_ctx *sc, const 
  {
   XGlyphInfo   extents;
  
 - XftTextExtents8(X_Dpy, sc-font, (const XftChar8*)text,
 + XftTextExtentsUtf8(X_Dpy, sc-font, (unsigned char*)text,
   len, extents);
  
   return (extents.xOff);
 @@ -77,9 +77,8 @@ font_draw(struct screen_ctx *sc, const c
  Drawable d, int x, int y)
  {
   XftDrawChange(sc-xftdraw, d);
 - /* Really needs to be UTF8'd. */
 - XftDrawString8(sc-xftdraw, sc-xftcolor, sc-font, x, y,
 - (const FcChar8*)text, len);
 + XftDrawStringUtf8(sc-xftdraw, sc-xftcolor, sc-font, x, y,
 + (const unsigned char*)text, len);
  }
  
  XftFont *
 
 -- 
 Alexander Polakov | plhk.ru
 

-- 
When the going gets tough, the tough get empirical
-- Jon Carroll



switch to xkeyboard-config XKB configuration: please test

2011-05-30 Thread Matthieu Herrb
Hi,

Some years ago X.Org decided to switch to a new set of XKB (the X
Keyboard extension) data files known as xkeyboard-config. 

For various reasons (local changes, complexity of the build system for 
xkeyboard-config, slacking) Xenocara is still using the old and
unmaintained xkb-data. 

The update is needed for libxklavier which is a required library for
some Desktop related ports. Keyboard handling in GNOME3 for one will
not work at all without this update. KDE4 may require the same at some
point and same goes for ports that use xkeyboard-config.

With the help of Alexandr Shadchin, Xenocara now ready to switch to
xkeyboard-config, but we'd like to have a last round of tests. 

For this apply the patch below and rebuild xenocara from sources. 

Please note that this will move the xkb data files from /etc/X11 to
/usr/X11R6/share/X11 

Report success/failures to shadchin@ and me. Thanks.

Index: share/mk/bsd.xconf.mk
===
RCS file: /cvs/OpenBSD/xenocara/share/mk/bsd.xconf.mk,v
retrieving revision 1.18
diff -u -p -u -r1.18 bsd.xconf.mk
--- share/mk/bsd.xconf.mk   8 Mar 2011 20:48:59 -   1.18
+++ share/mk/bsd.xconf.mk   29 May 2011 17:07:33 -
@@ -19,4 +19,4 @@ XENOCARA_BUILD_PIXMAN?=yes
 .endif
 
 # Build xkeyboard-config?
-XENOCARA_USE_XKEYBOARD_CONFIG?=no
+XENOCARA_USE_XKEYBOARD_CONFIG?=yes

-- 
Matthieu Herrb



Don't bother checking for an empty pageq before freeing the

2011-05-30 Thread Owain Ainsworth
list
Reply-To: 


It will handle an empty list just fine (there is a potential small
optimisation in there to avoid grabbing the fpageqlock if no pages need
freeing but that is another diff)

ok?

diff --git uvm/uvm_km.c uvm/uvm_km.c
index 1990adf..818cb18 100644
--- uvm/uvm_km.c
+++ uvm/uvm_km.c
@@ -925,8 +925,7 @@ alloc_va:
while (uvm_km_pages.free == 0) {
if (kd-kd_waitok == 0) {
mtx_leave(uvm_km_pages.mtx);
-   if (!TAILQ_EMPTY(pgl))
-   uvm_pglistfree(pgl);
+   uvm_pglistfree(pgl);
return NULL;
}
msleep(uvm_km_pages.free, uvm_km_pages.mtx, PVM,
@@ -959,8 +958,7 @@ try_map:
tsleep(map, PVM, km_allocva, 0);
goto try_map;
}
-   if (!TAILQ_EMPTY(pgl))
-   uvm_pglistfree(pgl);
+   uvm_pglistfree(pgl);
return (NULL);
}
}
-- 
1.7.5

-- 
Banectomy, n.:
The removal of bruises on a banana.
-- Rich Hall, Sniglets



replaced handrolled version of uvmfault_unlockmaps with that function

2011-05-30 Thread Owain Ainsworth
ok?

diff --git uvm/uvm_fault.c uvm/uvm_fault.c
index 76f0708..76429dc 100644
--- uvm/uvm_fault.c
+++ uvm/uvm_fault.c
@@ -1936,11 +1936,7 @@ uvmfault_lookup(struct uvm_faultinfo *ufi, boolean_t 
write_lock)
 */
if (UVM_ET_ISSUBMAP(ufi-entry)) {
tmpmap = ufi-entry-object.sub_map;
-   if (write_lock) {
-   vm_map_unlock(ufi-map);
-   } else {
-   vm_map_unlock_read(ufi-map);
-   }
+   uvmfault_unlockmaps(ufi, write_lock);
ufi-map = tmpmap;
continue;
}
-- 
1.7.5

-- 
It's easier to fight for one's principles than to live up to them.



Move uvm_pglist* to uvm_page.c

2011-05-30 Thread Owain Ainsworth
These functions used to be big and complicated, now they are glorified
wrappers around pmemrange and don't really need their own file.
Discussed with ariane@ a while ago.

ok?


diff --git conf/files conf/files
index 02da860..017e5f9 100644
--- conf/files
+++ conf/files
@@ -1007,7 +1007,6 @@ file uvm/uvm_object.c
 file uvm/uvm_page.c
 file uvm/uvm_pager.c
 file uvm/uvm_pdaemon.c
-file uvm/uvm_pglist.c
 file uvm/uvm_pmemrange.c
 file uvm/uvm_stat.c
 file uvm/uvm_swap.c
diff --git uvm/uvm_page.c uvm/uvm_page.c
index 10ef7d1..ed8e6d4 100644
--- uvm/uvm_page.c
+++ uvm/uvm_page.c
@@ -806,6 +806,81 @@ uvm_pagealloc_pg(struct vm_page *pg, struct uvm_object 
*obj, voff_t off,
 }
 
 /*
+ * uvm_pglistalloc: allocate a list of pages
+ *
+ * = allocated pages are placed at the tail of rlist.  rlist is
+ *assumed to be properly initialized by caller.
+ * = returns 0 on success or errno on failure
+ * = doesn't take into account clean non-busy pages on inactive list
+ * that could be used(?)
+ * = params:
+ * sizethe size of the allocation, rounded to page size.
+ * low the low address of the allowed allocation range.
+ * highthe high address of the allowed allocation range.
+ * alignment   memory must be aligned to this power-of-two boundary.
+ * boundaryno segment in the allocation may cross this 
+ * power-of-two boundary (relative to zero).
+ * = flags:
+ * UVM_PLA_NOWAIT  fail if allocation fails
+ * UVM_PLA_WAITOK  wait for memory to become avail
+ * UVM_PLA_ZEROreturn zeroed memory
+ */
+int
+uvm_pglistalloc(psize_t size, paddr_t low, paddr_t high, paddr_t alignment,
+paddr_t boundary, struct pglist *rlist, int nsegs, int flags)
+{
+   UVMHIST_FUNC(uvm_pglistalloc); UVMHIST_CALLED(pghist);
+
+   KASSERT((alignment  (alignment - 1)) == 0);
+   KASSERT((boundary  (boundary - 1)) == 0);
+   KASSERT(!(flags  UVM_PLA_WAITOK) ^ !(flags  UVM_PLA_NOWAIT));
+
+   if (size == 0)
+   return (EINVAL);
+
+   if ((high  PAGE_MASK) != PAGE_MASK) {
+   printf(uvm_pglistalloc: Upper boundary 0x%lx 
+   not on pagemask.\n, (unsigned long)high);
+   }
+
+   /*
+* Our allocations are always page granularity, so our alignment
+* must be, too.
+*/
+   if (alignment  PAGE_SIZE)
+   alignment = PAGE_SIZE;
+
+   low = atop(roundup(low, alignment));
+   /*
+* high + 1 may result in overflow, in which case high becomes 0x0,
+* which is the 'don't care' value.
+* The only requirement in that case is that low is also 0x0, or the
+* lowhigh assert will fail.
+*/
+   high = atop(high + 1);
+   size = atop(round_page(size));
+   alignment = atop(alignment);
+   if (boundary  PAGE_SIZE  boundary != 0)
+   boundary = PAGE_SIZE;
+   boundary = atop(boundary);
+
+   return uvm_pmr_getpages(size, low, high, alignment, boundary, nsegs,
+   flags, rlist);
+}
+
+/*
+ * uvm_pglistfree: free a list of pages
+ *
+ * = pages should already be unmapped
+ */
+void
+uvm_pglistfree(struct pglist *list)
+{
+   UVMHIST_FUNC(uvm_pglistfree); UVMHIST_CALLED(pghist);
+   uvm_pmr_freepageq(list);
+}
+
+/*
  * interface used by the buffer cache to allocate a buffer at a time.
  * The pages are allocated wired in DMA accessible memory
  */
diff --git uvm/uvm_pglist.c uvm/uvm_pglist.c
deleted file mode 100644
index d29fb14..000
--- uvm/uvm_pglist.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/* $OpenBSD$   */
-/* $NetBSD: uvm_pglist.c,v 1.13 2001/02/18 21:19:08 chs Exp $  */
-
-/*-
- * Copyright (c) 1997 The NetBSD Foundation, Inc.
- * All rights reserved.
- *  
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
- * NASA Ames Research Center.  
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright 
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *  
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS 

check for correct flag in uvm_page_unbusy

2011-05-30 Thread Owain Ainsworth
No functional change since aobjs should never hit this path. However, I
introduced this diff when I reworked the page releasing stuff for
objects.

ok?

diff --git uvm/uvm_page.c uvm/uvm_page.c
index 10ef7d1..27e970a 100644
--- uvm/uvm_page.c
+++ uvm/uvm_page.c
@@ -1099,7 +1099,7 @@ uvm_page_unbusy(struct vm_page **pgs, int npgs)
uvm_lock_pageq();
pmap_page_protect(pg, VM_PROT_NONE);
/* XXX won't happen right now */
-   if (pg-pg_flags  PQ_ANON)
+   if (pg-pg_flags  PQ_AOBJ)
uao_dropswap(uobj,
pg-offset  PAGE_SHIFT);
uvm_pagefree(pg);
-- 
1.7.5


-- 
Blood flows down one leg and up the other.



km(4) support for AMD Family 14h processors

2011-05-30 Thread Brad
The newer AMD Family 14h processors have the same mechanism for accessing
the internal temp sensor as the previous Family 10h/11h processors.

I don't have a system with such a processor so if you have a newer
system with this processor please test.


Index: share/man/man4/km.4
===
RCS file: /home/cvs/src/share/man/man4/km.4,v
retrieving revision 1.5
diff -u -p -r1.5 km.4
--- share/man/man4/km.4 23 Jul 2009 17:19:07 -  1.5
+++ share/man/man4/km.4 30 May 2011 23:08:56 -
@@ -26,7 +26,7 @@
 The
 .Nm
 driver provides support for the temperature sensors available in the
-AMD Family 10h and 11h processors.
+AMD Family 10h, 11h and 14h processors.
 .Pp
 Each chip reports one temperature sensor.
 Multiprocessor systems have one instance of
@@ -47,14 +47,21 @@ interface.
 .%D March 26, 2008
 .%R Publication # 31116
 .%P pp. 236--237 and pp. 243--244
-.\ .%O 
http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/31116.PDF
+.\ .%O http://support.amd.com/us/Processor_TechDocs/31116.pdf
 .Re
 .Rs
 .%T BIOS and Kernel Developer's Guide for AMD Family 11h Processors
 .%D July 07, 2008
 .%R Publication # 41256
 .%P pp. 156--157 and pp. 159--160
-.\ .%O 
http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/41256.pdf
+.\ .%O http://support.amd.com/us/Processor_TechDocs/41256.pdf
+.Re
+.Rs
+.%T BIOS and Kernel Developer's Guide for AMD Family 14h Models 00h-04h 
Processors
+.%D May 02, 2011
+.%R Publication # 43170
+.%P pp. 277--278 and pp. 280--282
+.\ .%O http://support.amd.com/us/Processor_TechDocs/43170.pdf
 .Re
 .Sh HISTORY
 The
Index: sys/dev/pci/km.c
===
RCS file: /home/cvs/src/sys/dev/pci/km.c,v
retrieving revision 1.4
diff -u -p -r1.4 km.c
--- sys/dev/pci/km.c26 Jan 2009 15:07:49 -  1.4
+++ sys/dev/pci/km.c30 May 2011 22:57:41 -
@@ -29,7 +29,7 @@
 
 
 /*
- * AMD Family 10h/11h Processors, Function 3 -- Miscellaneous Control
+ * AMD Family 10h/11h/14h Processors, Function 3 -- Miscellaneous Control
  */
 
 /* Function 3 Registers */
@@ -69,7 +69,8 @@ struct cfdriver km_cd = {
 
 static const struct pci_matchid km_devices[] = {
{ PCI_VENDOR_AMD, PCI_PRODUCT_AMD_AMD64_10_MISC },
-   { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_AMD64_11_MISC }
+   { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_AMD64_11_MISC },
+   { PCI_VENDOR_AMD, PCI_PRODUCT_AMD_AMD64_14_MISC }
 };
 
 

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



Re: Radeon HD 4350 variant diff

2011-05-30 Thread Joe Gidi
On Thu, May 26, 2011 8:55 pm, Joe Gidi wrote:
 Last week I picked up another Radeon HD 4350 card, expecting it to just
 work like another 4350 I own. For whatever reason, the new card (same
 manufacturer, same part number) has a different PCI ID and didn't work
 until I patched in support for it.

 I wasn't exactly sure what to call this new card; both Xenocara's
 ati_pciids.csv file and the latest ati_pciids.csv from upstream call this
 product ID an ATI Mobility Radeon 4300 Series.I went with Mobility
 Radeon HD 4350, although my particular card is a regular PCI-E card for a
 desktop PC.

 In any case, the card is tested and works fine once the PCI ID is added,
 and Xenocara already knows about it. Any developers willing to take a look
 at this? I believe the flags are correct, though I can see it might be
 misleading to call it a Mobility and not have RADEON_IS_MOBILITY in
 the flags.


 Index: sys/dev/pci/pcidevs
 ===
 RCS file: /cvs/src/sys/dev/pci/pcidevs,v
 retrieving revision 1.1602
 diff -u -r1.1602 pcidevs
 --- sys/dev/pci/pcidevs   22 May 2011 18:34:42 -  1.1602
 +++ sys/dev/pci/pcidevs   27 May 2011 00:36:43 -
 @@ -1338,6 +1338,7 @@
  product ATI RADEON_HD38500x9505  Radeon HD 3850
  product ATI RADEON_HD45500x9540  Radeon HD 4550
  product ATI RADEON_HD43500x954f  Radeon HD 4350
 +product ATI RADEON_HD4350_M  0x9552  Mobility Radeon HD 4350
  product ATI RADEON_HD4500_M  0x9553  Mobility Radeon HD 4500
  product ATI RADEON_HD2600_M760x9581  Mobility Radeon HD 2600
  product ATI RADEON_HD2600PROAGP  0x9587  Radeon HD 2600 Pro AGP
 Index: sys/dev/pci/drm/radeon_drv.c
 ===
 RCS file: /cvs/src/sys/dev/pci/drm/radeon_drv.c,v
 retrieving revision 1.53
 diff -u -r1.53 radeon_drv.c
 --- sys/dev/pci/drm/radeon_drv.c  2 May 2011 10:22:13 -   1.53
 +++ sys/dev/pci/drm/radeon_drv.c  27 May 2011 00:36:43 -
 @@ -510,6 +510,8 @@
   CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP},
   {PCI_VENDOR_ATI, PCI_PRODUCT_ATI_RADEON_HD4350,
   CHIP_RV710|RADEON_NEW_MEMMAP},
 + {PCI_VENDOR_ATI, PCI_PRODUCT_ATI_RADEON_HD4350_M,
 + CHIP_RV710|RADEON_NEW_MEMMAP},
   {PCI_VENDOR_ATI, PCI_PRODUCT_ATI_RADEON_HD4500_M,
   CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP},
   {PCI_VENDOR_ATI, PCI_PRODUCT_ATI_RADEON_HD4650,


 --
 Joe Gidi
 j...@entropicblur.com

 You cannot buy skill. -- Ross Seyfried

Apparently this should be a Mobility Radeon HD 4330; correct diff follows.
I have no idea why this HD 4350 PCI-E card thinks it belongs in a laptop,
but hardware makers do strange things...

Index: src/sys/dev/pci/pcidevs
===
RCS file: /cvs/src/sys/dev/pci/pcidevs,v
retrieving revision 1.1609
diff -u -r1.1609 pcidevs
--- src/sys/dev/pci/pcidevs 29 May 2011 20:24:21 -  1.1609
+++ src/sys/dev/pci/pcidevs 30 May 2011 21:06:19 -
@@ -1358,6 +1358,7 @@
 product ATI RADEON_HD3850  0x9505  Radeon HD 3850
 product ATI RADEON_HD4550  0x9540  Radeon HD 4550
 product ATI RADEON_HD4350  0x954f  Radeon HD 4350
+product ATI RADEON_HD4330_M0x9552  Mobility Radeon HD 4330
 product ATI RADEON_HD4500_M0x9553  Mobility Radeon HD 4500
 product ATI RADEON_HD2600_M76  0x9581  Mobility Radeon HD 2600
 product ATI RADEON_HD2600PROAGP0x9587  Radeon HD 2600 Pro AGP
Index: src/sys/dev/pci/drm/radeon_drv.c
===
RCS file: /cvs/src/sys/dev/pci/drm/radeon_drv.c,v
retrieving revision 1.53
diff -u -r1.53 radeon_drv.c
--- src/sys/dev/pci/drm/radeon_drv.c2 May 2011 10:22:13 -   1.53
+++ src/sys/dev/pci/drm/radeon_drv.c30 May 2011 21:06:19 -
@@ -510,6 +510,8 @@
CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP},
{PCI_VENDOR_ATI, PCI_PRODUCT_ATI_RADEON_HD4350,
CHIP_RV710|RADEON_NEW_MEMMAP},
+   {PCI_VENDOR_ATI, PCI_PRODUCT_ATI_RADEON_HD4330_M,
+   CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP},
{PCI_VENDOR_ATI, PCI_PRODUCT_ATI_RADEON_HD4500_M,
CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP},
{PCI_VENDOR_ATI, PCI_PRODUCT_ATI_RADEON_HD4650,

--
Joe Gidi
j...@entropicblur.com

You cannot buy skill. -- Ross Seyfried