Re: Realtek MMC/MMCSD reader?

2016-02-19 Thread Lundberg, Johannes
I'm also newbie and I'm working on adding a sdhci_acpi driver for Intel's
Atom SoC. I wonder if your device would work with the existing sdhci_pci
driver. Maybe it just a matter of adding the device id and possibly setting
some quirks or you might have to write a new driver for the host
controller? For me it's a bit tricky because I have to communicate with the
card using GPIO before it can be detected.

There is a driver in FreeBSD for reading and writing to a mmc so maybe it
is just a matter of connecting that to the controller.

Searching the Linux source for the device id to see if there is a driver is
a good idea.

For FreeBSD source check

sys/dev/mmc/
sys/dev/sdhci/

There is also a ongoing project to rewrite mmc to use cam. Maybe good idea
to check that as well.

https://wiki.freebsd.org/SDIO

On Friday, February 19, 2016, Larry Rosenman  wrote:

> On 2016-02-19 22:25, Gary Corcoran wrote:
>
>> On 2/19/2016 11:08 PM, Larry Rosenman wrote:
>>
>>> On 2016-02-19 22:05, Mehmet Erol Sanliturk wrote:
>>>
 On Fri, Feb 19, 2016 at 7:58 PM, Larry Rosenman  wrote:

 Great.  Since I've never done that
>
> Any ideas of anyone that might be able to help?
>
> Or where to even start?
>
>
>
>

 Perhaps

 https://www.nostarch.com/bsddrivers.htm
 FreeBSD Device Drivers


 ?


 Mehmet Erol Sanliturk


 perhaps.  But I'd need an NDA with RealTek to get the chip specs, and
>>> I'm not sure I can do that working for Nokia during the day
>>> as I do.
>>>
>>> I'd love for one of the current folks that do realtek stuff to look.
>>>
>> Sometimes people look to see if Linux has a driver, and if so, you
>> might be able to get enough
>> programming info from their driver to be able to write a FreeBSD
>> driver, without getting the
>> full chip specs.
>>
>> Gary
>>
>>
> http://askubuntu.com/questions/731093/sd-card-reader-realtek-522a-not-working-in-dell-i7559-in-ubuntu-15-10
>
> I'm still VERY much a newbie (like ZERO experience) writing drivers.
>
> Does anyone want to help?
>
> I'm more than willing to guinea pig stuff.
>
>
> --
> Larry Rosenman http://www.lerctr.org/~ler
> Phone: +1 214-642-9640 E-Mail: l...@lerctr.org
> US Mail: 7011 W Parmer Ln, Apt 1115, Austin, TX 78729-6961
> ___
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
>


-- 
--
Name: Johannes Lundberg
Position: Mirama project leader
Phone:+1-408-636-2161
Skype:brilliantjohannes
Online:   LinkedIn  Facebook
 Reddit
 Twitter
 GitHub 
GitLab 
Company:  Mirama  Brilliantservice US
 Brilliantservice JP


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
秘密保持について:この電子メールは、名宛人に送信したものであり、秘匿特権の対象となる情報を含んでいます。
もし、名宛人以外の方が受信された場合、このメールの破棄、およびこのメールに関する一切の開示、
複写、配布、その他の利用、または記載内容に基づくいかなる行動もされないようお願い申し上げます。
---
CONFIDENTIALITY NOTE: The information in this email is confidential
and intended solely for the addressee.
Disclosure, copying, distribution or any other action of use of this
email by person other than intended recipient, is prohibited.
If you are not the intended recipient and have received this email in
error, please destroy the original message.
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

new computer, strange usb messages at boot

2016-02-19 Thread Larry Rosenman
Does any of this look weird?  What can I provide to help?

Dell Inspiron 15 7559


Copyright (c) 1992-2016 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.0-CURRENT #0 r295683: Wed Feb 17 02:07:17 UTC 2016
r...@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 3.7.1 (tags/RELEASE_371/final 255217) 20151225
WARNING: WITNESS option enabled, expect reduced performance.
VT(efifb): resolution 2048x1200
CPU: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz (2592.13-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x506e3  Family=0x6  Model=0x5e  Stepping=3
  
Features=0xbfebfbff
  
Features2=0x7ffafbbf
  AMD Features=0x2c100800
  AMD Features2=0x121
  Structured Extended 
Features=0x29c6fbf
  XSAVE Features=0xf
  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
  TSC: P-state invariant, performance statistics
real memory  = 17179869184 (16384 MB)
avail memory = 16396095488 (15636 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: 
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s) x 2 SMT threads
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
 cpu2 (AP): APIC ID:  2
 cpu3 (AP): APIC ID:  3
 cpu4 (AP): APIC ID:  4
 cpu5 (AP): APIC ID:  5
 cpu6 (AP): APIC ID:  6
 cpu7 (AP): APIC ID:  7
random: unblocking device.
ioapic0  irqs 0-119 on motherboard
random: entropy device external interface
kbd1 at kbdmux0
netmap: loaded module
module_register_init: MOD_LOAD (vesa, 0x80ee1ef0, 0) error 19
random: registering fast source Intel Secure Key RNG
random: fast provider: "Intel Secure Key RNG"
cryptosoft0:  on motherboard
acpi0:  on motherboard
acpi0: Power Button (fixed)
cpu0:  on acpi0
cpu1:  on acpi0
cpu2:  on acpi0
cpu3:  on acpi0
cpu4:  on acpi0
cpu5:  on acpi0
cpu6:  on acpi0
cpu7:  on acpi0
hpet0:  iomem 0xfed0-0xfed003ff on acpi0
Timecounter "HPET" frequency 2400 Hz quality 950
Event timer "HPET" frequency 2400 Hz quality 550
atrtc0:  port 0x70-0x77 irq 8 on acpi0
atrtc0: Warning: Couldn't map I/O.
Event timer "RTC" frequency 32768 Hz quality 0
attimer0:  port 0x40-0x43,0x50-0x53 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1808-0x180b on acpi0
acpi_ec0:  port 0x62,0x66 on acpi0
pcib0:  port 0xcf8-0xcff on acpi0
pci0:  on pcib0
pcib1:  irq 16 at device 1.0 on pci0
pci1:  on pcib1
pcib2:  irq 16 at device 1.1 on pci0
pci2:  on pcib2
vgapci0:  port 0xe000-0xe07f mem 
0xde00-0xdeff,0xc000-0xcfff,0xd000-0xd1ff irq 17 at 
device 0.0 on pci2
nvidia0:  on vgapci0
vgapci0: child nvidia0 requested pci_enable_io
vgapci0: child nvidia0 requested pci_enable_io
vgapci1:  port 0xf000-0xf03f mem 
0xdd00-0xddff,0xb000-0xbfff irq 16 at device 2.0 on pci0
vgapci1: Boot video device
xhci0:  mem 0xdf41-0xdf41 irq 16 at 
device 20.0 on pci0
xhci0: 32 bytes context size, 64-bit DMA
usbus0: waiting for BIOS to give up control
usbus0 on xhci0
pci0:  at device 22.0 (no driver attached)
ahci0:  port 0xf090-0xf097,0xf080-0xf083,0xf060-0xf07f 
mem 0xdf43-0xdf431fff,0xdf434000-0xdf4340ff,0xdf433000-0xdf4337ff irq 16 at 
device 23.0 on pci0
ahci0: AHCI v1.31 with 2 6Gbps ports, Port Multiplier not supported
ahcich0:  at channel 0 on ahci0
ahcich1:  at channel 1 on ahci0
ahciem0:  on ahci0
pcib3:  irq 16 at device 28.0 on pci0
pci3:  on pcib3
pcib4:  irq 16 at device 28.4 on pci0
pci4:  on pcib4
re0:  port 
0xd000-0xd0ff mem 0xdf304000-0xdf304fff,0xdf30-0xdf303fff irq 16 at device 
0.0 on pci4
re0: Using 1 MSI-X message
re0: turning off MSI enable bit.
re0: ASPM disabled
re0: Chip rev. 0x5080
re0: MAC rev. 0x0010
miibus0:  on re0
rgephy0:  PHY 1 on miibus0
rgephy0:  none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 
100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT-FDX, 1000baseT-FDX-master, 
1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
re0: Using defaults for TSO: 65518/35/2048
re0: Ethernet address: 20:47:47:73:07:5f
re0: netmap queues/slots: TX 1/256, RX 1/256
pcib5:  irq 17 at device 28.5 on pci0
pci5:  on pcib5
pci5:  at device 0.0 (no driver attached)
pcib6:  irq 18 at device 28.6 on pci0
pci6:  on pcib6
pci6:  at device 0.0 (no driver attached)
isab0:  at 

Re: Realtek MMC/MMCSD reader?

2016-02-19 Thread Larry Rosenman

On 2016-02-19 22:25, Gary Corcoran wrote:

On 2/19/2016 11:08 PM, Larry Rosenman wrote:

On 2016-02-19 22:05, Mehmet Erol Sanliturk wrote:
On Fri, Feb 19, 2016 at 7:58 PM, Larry Rosenman  
wrote:



Great.  Since I've never done that

Any ideas of anyone that might be able to help?

Or where to even start?






Perhaps

https://www.nostarch.com/bsddrivers.htm
FreeBSD Device Drivers


?


Mehmet Erol Sanliturk


perhaps.  But I'd need an NDA with RealTek to get the chip specs, and 
I'm not sure I can do that working for Nokia during the day

as I do.

I'd love for one of the current folks that do realtek stuff to look.

Sometimes people look to see if Linux has a driver, and if so, you
might be able to get enough
programming info from their driver to be able to write a FreeBSD
driver, without getting the
full chip specs.

Gary


http://askubuntu.com/questions/731093/sd-card-reader-realtek-522a-not-working-in-dell-i7559-in-ubuntu-15-10

I'm still VERY much a newbie (like ZERO experience) writing drivers.

Does anyone want to help?

I'm more than willing to guinea pig stuff.


--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 214-642-9640 E-Mail: l...@lerctr.org
US Mail: 7011 W Parmer Ln, Apt 1115, Austin, TX 78729-6961
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Realtek MMC/MMCSD reader?

2016-02-19 Thread Gary Corcoran

On 2/19/2016 11:08 PM, Larry Rosenman wrote:

On 2016-02-19 22:05, Mehmet Erol Sanliturk wrote:

On Fri, Feb 19, 2016 at 7:58 PM, Larry Rosenman  wrote:


Great.  Since I've never done that

Any ideas of anyone that might be able to help?

Or where to even start?






Perhaps

https://www.nostarch.com/bsddrivers.htm
FreeBSD Device Drivers


?


Mehmet Erol Sanliturk



perhaps.  But I'd need an NDA with RealTek to get the chip specs, and I'm not 
sure I can do that working for Nokia during the day
as I do.

I'd love for one of the current folks that do realtek stuff to look.

Sometimes people look to see if Linux has a driver, and if so, you might be 
able to get enough
programming info from their driver to be able to write a FreeBSD driver, 
without getting the
full chip specs.

Gary

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Realtek MMC/MMCSD reader?

2016-02-19 Thread Larry Rosenman

On 2016-02-19 22:05, Mehmet Erol Sanliturk wrote:

On Fri, Feb 19, 2016 at 7:58 PM, Larry Rosenman  wrote:


Great.  Since I've never done that

Any ideas of anyone that might be able to help?

Or where to even start?






Perhaps

https://www.nostarch.com/bsddrivers.htm
FreeBSD Device Drivers


?


Mehmet Erol Sanliturk


perhaps.  But I'd need an NDA with RealTek to get the chip specs, and 
I'm not sure I can do that working for Nokia during the day

as I do.

I'd love for one of the current folks that do realtek stuff to look.



--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 214-642-9640 E-Mail: l...@lerctr.org
US Mail: 7011 W Parmer Ln, Apt 1115, Austin, TX 78729-6961
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Realtek MMC/MMCSD reader?

2016-02-19 Thread Mehmet Erol Sanliturk
On Fri, Feb 19, 2016 at 7:58 PM, Larry Rosenman  wrote:

> Great.  Since I've never done that
>
> Any ideas of anyone that might be able to help?
>
> Or where to even start?
>
>
>


Perhaps

https://www.nostarch.com/bsddrivers.htm
FreeBSD Device Drivers


?


Mehmet Erol Sanliturk




> On Fri, Feb 19, 2016 at 08:48:02PM -0700, Warner Losh wrote:
> > You'll have to write a driver for it.
> >
> > Warner
> > On Feb 19, 2016 8:32 PM, "Larry Rosenman"  wrote:
> >
> > > Any chance of supporting:
> > >
> > > none7@pci0:6:0:0:   class=0xff card=0x522a10ec chip=0x522a10ec
> > > rev=0x01 hdr=0x00
> > > vendor = 'Realtek Semiconductor Co., Ltd.'
> > >
> > >
> > > Thanks!
> > > ___
> > > freebsd-current@freebsd.org mailing list
> > > https://lists.freebsd.org/mailman/listinfo/freebsd-current
> > > To unsubscribe, send any mail to "
> freebsd-current-unsubscr...@freebsd.org"
> > >
> > ___
> > freebsd-current@freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-current
> > To unsubscribe, send any mail to "
> freebsd-current-unsubscr...@freebsd.org"
> ___
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
>
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Realtek MMC/MMCSD reader?

2016-02-19 Thread Larry Rosenman
Great.  Since I've never done that

Any ideas of anyone that might be able to help?

Or where to even start?


On Fri, Feb 19, 2016 at 08:48:02PM -0700, Warner Losh wrote:
> You'll have to write a driver for it.
> 
> Warner
> On Feb 19, 2016 8:32 PM, "Larry Rosenman"  wrote:
> 
> > Any chance of supporting:
> >
> > none7@pci0:6:0:0:   class=0xff card=0x522a10ec chip=0x522a10ec
> > rev=0x01 hdr=0x00
> > vendor = 'Realtek Semiconductor Co., Ltd.'
> >
> >
> > Thanks!
> > ___
> > freebsd-current@freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-current
> > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
> >
> ___
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Realtek MMC/MMCSD reader?

2016-02-19 Thread Warner Losh
You'll have to write a driver for it.

Warner
On Feb 19, 2016 8:32 PM, "Larry Rosenman"  wrote:

> Any chance of supporting:
>
> none7@pci0:6:0:0:   class=0xff card=0x522a10ec chip=0x522a10ec
> rev=0x01 hdr=0x00
> vendor = 'Realtek Semiconductor Co., Ltd.'
>
>
> Thanks!
> ___
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
>
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Realtek MMC/MMCSD reader?

2016-02-19 Thread Larry Rosenman
Any chance of supporting:

none7@pci0:6:0:0:   class=0xff card=0x522a10ec chip=0x522a10ec rev=0x01 
hdr=0x00
vendor = 'Realtek Semiconductor Co., Ltd.'


Thanks!
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Thinkpad T410: resume broken

2016-02-19 Thread John Baldwin
On Friday, February 19, 2016 06:38:27 PM Alexey Dokuchaev wrote:
> On Thu, Feb 18, 2016 at 09:51:08AM -0800, John Baldwin wrote:
> > On Thursday, February 18, 2016 10:56:29 PM Alexey Dokuchaev wrote:
> > > # pciconf -lc pci0:0:0
> > > hostb0@pci0:0:0:0:  class=0x06 card=0x83191033 chip=0x25908086 
> > > rev=0x04 hdr=0x00
> > > cap 09[e0] = vendor (length 9) Intel cap 2 version 1
> > 
> > Humm, perhaps PCI0 is not at 0:0.  Can you find the _ADR method for
> > _SB_.PCI0?  That contains the "slot" and "function" as two words, e.g.
> > 0x10002 would correspond to the 'pci0:1:2' device (or possibly pci0:2:1,
> > don't recall the order off the top of my head).
> 
> Seems it's all zeros:
> 
> Device (PCI0)
> {
> ...
> Name (_ADR, 0x00)  // _ADR: Address
> 
> I've uploaded the dump on freefall [1], perhaps I've missed something so
> you can have a better/sharper look.

Ok, so your BIOS is just odd / broken.  It's asked us to power that device
down to D2, but it doesn't support any power management at all, so we whine.
In practice it should be harmless and something you can ignore.

-- 
John Baldwin
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Thinkpad T410: resume broken

2016-02-19 Thread Jean-Sébastien Pédron
On 18/02/2016 16:47, Alexey Dokuchaev wrote:
> On a related note, how does one configure sc(4) with old drm (vs.
> drm2) shall I need to try that?

Hi!

xf86-video-intel and xf86-video-ati do not handle modesetting for a long
time now (almost three years), so they can't be used with the old "drm"
(only "drm2"). We don't have xf86-video-nouveau for the same reason.

You can't use older versions of those xf86-video-* (ie. those doing user
modesetting) because they are not supported anymore by the X.Org server.

That was the whole WITH_NEW_XORG drama.

-- 
Jean-Sébastien Pédron



signature.asc
Description: OpenPGP digital signature


Re: Call for testing: Using ELF Tool Chain elfcopy as objcopy

2016-02-19 Thread Dmitry Marakasov
* Ed Maste (ema...@freebsd.org) wrote:

JFYI, I've just updated my desktop to 295763 with
WITH_ELFCOPY_AS_OBJCOPY=yes, and rebuilt all ~800 installed ports,
no problems so far.

-- 
Dmitry Marakasov   .   55B5 0596 FF1E 8D84 5F56  9510 D35A 80DD F9D2 F77D
amd...@amdmi3.ru  ..:  jabber: amd...@jabber.ru  http://amdmi3.ru
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Thinkpad T410: resume broken

2016-02-19 Thread Alexey Dokuchaev
On Thu, Feb 18, 2016 at 09:51:08AM -0800, John Baldwin wrote:
> On Thursday, February 18, 2016 10:56:29 PM Alexey Dokuchaev wrote:
> > # pciconf -lc pci0:0:0
> > hostb0@pci0:0:0:0:  class=0x06 card=0x83191033 chip=0x25908086 
> > rev=0x04 hdr=0x00
> > cap 09[e0] = vendor (length 9) Intel cap 2 version 1
> 
> Humm, perhaps PCI0 is not at 0:0.  Can you find the _ADR method for
> _SB_.PCI0?  That contains the "slot" and "function" as two words, e.g.
> 0x10002 would correspond to the 'pci0:1:2' device (or possibly pci0:2:1,
> don't recall the order off the top of my head).

Seems it's all zeros:

Device (PCI0)
{
...
Name (_ADR, 0x00)  // _ADR: Address

I've uploaded the dump on freefall [1], perhaps I've missed something so
you can have a better/sharper look.

./danfe

[1] http://people.freebsd.org/~danfe/nec_versa_s950.asl
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Thinkpad T410: resume broken

2016-02-19 Thread Alexey Dokuchaev
On Thu, Feb 18, 2016 at 10:02:17AM -0800, Adrian Chadd wrote:
> [snip]
> 
> Someone should sit me down with pizza and "help" me just modularise
> the vesa/fb code so we can use it in vt.
> 
> It isn't /that/ hard, I've just been preoccupied.

And before it happens, someone(tm) could write a few paragraphs of current
state of affairs and codependencies between sc(4), vt(4), and VESA. :-)

Hopefully this would lower the degree of "black magic" surrounding this
code and help with some [1] related PRs.

./danfe

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=174504
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Thinkpad T410: resume broken

2016-02-19 Thread Alexey Dokuchaev
On Thu, Feb 18, 2016 at 09:48:40AM -0800, John Baldwin wrote:
> On Thursday, February 18, 2016 09:47:12 PM Alexey Dokuchaev wrote:
> > On Thu, Feb 18, 2016 at 06:50:34AM -0800, John Baldwin wrote:
> > > On Thursday, February 18, 2016 08:13:38 PM Alexey Dokuchaev wrote:
> > > vesa.ko shouldn't be working with KMS.  KMS turns off the legacy VGA
> > > emulation in the hardware when it starts which prevents VESA from
> > > working (VESA requires the legacy VGA interface).
> > 
> > Hmm, could this explain why vesa.ko can be loaded from loader.conf, but
> > not via kldload(8)?  OTOH, kldload'ing it later does not seem to work
> > (ir)regardless of whether i915kms.ko is loaded or not...
> 
> You might load it from loader.conf but it might then fail with an error
> about failing to register in dmesg.  In that case it is effectively
> ignored.

By "can be loaded from loader.conf" I mean that it's reported in kldstat(8)
output.  I'm still unsure if I understand all implications of having or not
having VESA kernel option or vesa.ko loaded in vt(4)+KMS world.  E.g., do I
understand correctly that vesa.ko is not needed (or might even cause certain
problems) with vt(4)+KMS, and "options VESA" is left in GENERIC as part of
syscons(4) support, and will likely go south together with syscons(4) some
day?

> > I'm about to try fresh -CURRENT on some HP AMD APU-based laptops, hence
> > I'll ask: do [Intel or Radeon graphics] laptops suspend/resume without
> > issues in X11 or on the naked console as well?  (In a shop, I could only
> > quickly test our X11-less memstick image.)
> 
> Once KMS is loaded they resume fine.  They require the KMS driver to turn
> the LCD panel back on.  Without KMS they also "resume" but the screen is off
> so you can't see anything.  However, you can type blind and run commands.
> If the network is up you can ssh into the laptop, etc. after resume.
> [...]
> On HEAD you need to set kern.vty=sc to use sc(4) instead of vt(4).  For
> suspend/resume without X that should be sufficient.  You would only need
> the old drm drivers for X.
> [...]
> Note that for the HP netbook, resume in console with vt(4) does not work
> without KMS (due to vt(4) not supporting VESA).

OK I see, makes sense.  So my best bet would be to try suspend/resume with
vt(4)+KMS, then if it fails try with kern.vty=sc (in the context of GENERIC
kernel and pure console).

./danfe
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Memory modified after free in "MAP ENTRY" zone (vm_map_entry_t->read_ahead)

2016-02-19 Thread Andriy Gapon
On 18/02/2016 17:13, Konstantin Belousov wrote:
> So this is arguably a fallout from r188331.
> The following is somewhat non-insistent attempt to fix the problem.

Kostik,

thank you very much, I am testing the patch.

> diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
> index a7e3d37..cddf1eb 100644
> --- a/sys/vm/vm_fault.c
> +++ b/sys/vm/vm_fault.c
> @@ -291,7 +291,8 @@ vm_fault_hold(vm_map_t map, vm_offset_t vaddr, vm_prot_t 
> fault_type,
>   struct faultstate fs;
>   struct vnode *vp;
>   vm_page_t m;
> - int ahead, behind, cluster_offset, error, locked;
> + int ahead, behind, cluster_offset, error, locked, rv;
> + u_char behavior;
>  
>   hardfault = 0;
>   growstack = TRUE;
> @@ -550,9 +551,18 @@ readrest:
>* zero-filled pages.
>*/
>   if (fs.object->type != OBJT_DEFAULT) {
> - int rv;
> - u_char behavior = vm_map_entry_behavior(fs.entry);
> -
> + if (!fs.lookup_still_valid) {
> + locked = vm_map_trylock_read(fs.map);
> + if (locked)
> + fs.lookup_still_valid = TRUE;
> + if (!locked || fs.map->timestamp !=
> + map_generation) {
> + release_page();
> + unlock_and_deallocate();
> + goto RetryFault;
> + }
> + }
> + behavior = vm_map_entry_behavior(fs.entry);
>   era = fs.entry->read_ahead;
>   if (behavior == MAP_ENTRY_BEHAV_RANDOM ||
>   P_KILLED(curproc)) {
> @@ -603,6 +613,7 @@ readrest:
>   }
>   ahead = ulmin(ahead, atop(fs.entry->end - vaddr) - 1);
>   if (era != nera)
> + /* XXX only read-lock on map */
>   fs.entry->read_ahead = nera;
>  
>   /*
> 


-- 
Andriy Gapon
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"