Port-amiga archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Work on PCI support :-)



On May 30, 2011, at 11:13 PM, Radosław Kujawa wrote:

> Where pci_mem_area is the exact same tag I created earlier in p5pb. That's no 
> good, because pci_mem_area is already pointing to 0x268a000, which is mapped 
> PA 0xe0000000. So, if I understand correctly, any read or write using handle 
> created by this bus_space_map is hitting 0x268a000 + 0xe1000000, which leads 
> to a MMU fault.

Ok, I've created workaround, by implementing another absm with special 
bus_space_map, that operates on absolute PA address. Also I've had to implement 
swab32'ing absm methods (to access the device little-endian registers).

The p5pb driver sort-of-works now and Permedia framebuffer driver is able to 
attach properly. 

Still, it does not work as a console, the kernel just dies without a word, 
somewhere in wsdisplay_cnattach. Probably during/just after setting wsdisplay's 
cn_tab. Otherwise it works fine:

Connected.
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 5.99.45 (A3K_P5PB_DEV) #70: Tue May 31 12:45:19 CEST 2011
        
rkujawa@Radoslaw-Kujawas-MacBook-Pro.local:/Users/rkujawa/repos/NetBSD-current/src/sys/arch/amiga/compile/obj/A3K_P5PB_DEV
Amiga 3000 (68060 rev.1 CPU/MMU/FPU)
total memory = 127 MB
avail memory = 123 MB
memory segment 0 at 08000000 size 07f80000
memory segment 1 at 07c00000 size 00400000
memory segment 2 at 40000000 size 08000000
memory segment 3 at 00000000 size 00200000
sysctl_createv: sysctl_create(no_sa_support) returned 22
mainbus0 (root)
clock0 at mainbus0: CIA B system hz 100 hardware hz 709379
orig value: delaydivisor=12, amiga_clk_interval=7093
Calibrating delay loop... 
diff 1755 us, new divisor 21/1024 us
diff 1005 us, new divisor 21/1024 us
diff 1005 us, new divisor 21/1024 us
a34kbbc0 at mainbus0
ser0 at mainbus0: input fifo 512 output fifo 32
par0 at mainbus0
kbd0 at mainbus0: CIA A type Amiga
wskbd0 at kbd0 mux 1
ms0 at mainbus0
wsmouse0 at ms0 mux 0
wsmouse1 at ms0 mux 0
fdc0 at mainbus0trying to get pa for va: 0x46c000: dmabuf pa 0x1f8000: dmabuf 
ka 0x46c000
fd0 at fdc0 unit 0: 3.5dd 80 cyl, 2 head, 11 sec [9 sec], 512 bytes/sec
ahsc0 at mainbus0
scsibus0 at ahsc0: 8 targets, 8 luns per target
aucc0 at mainbus0
audio0 at aucc0: half duplex, playback, capture
zbus0 at mainbus0: i/o size 0x06552000
nextkva: 0x1678000, want pa 0x50000000, size 16777216, avail 106242048
board at zbus0: pa 0x50000000 man/pro 3643/16 not configured
board at zbus0: pa 0xe90000 man/pro 3643/19 not configured
xsurf at zbus0: pa 0xea0000 man/pro 4626/23 not configured
nextkva: 0x2678000, want pa 0x51000000, size 16777216, avail 106242048
board at zbus0: pa 0x51000000 man/pro 2206/62 not configured
cbiiisc0 at zbus0 pa 0xf01060 man/pro 8512/100
trying to get pa for va: 0x1acf58cbiiisc0:  no SCSI termination, host adapter 
deactivated.
scsibus1 at cbiiisc0: 0 targets, 8 luns per target
nextkva: 0x2679000, want pa 0xfffe0000, size 4096, avail 106242048
matched by Zorro ID 8512, 101
p5pb0 at zbus0 pa 0xfffe0000 man/pro 8512/101
nextkva: 0x26ba000, want pa 0xfffa0000, size 266240, avail 106242048
nextkva: 0x46ba000, want pa 0xe0000000, size 33554432, avail 106242048
mapped fffa0000 -> 2679000, e0000000 -> 26ba000
pci0 at p5pb0 bus 0
pm2fb0 at pci0 dev 0 function 0: PCI configuration registers:
  Common header:
    0x00: 0x3d07104c 0x02800007 0x03800001 0x00000000

    Vendor Name: Texas Instruments (0x104c)
    Device Name: TVP4020 Permedia 2 (0x3d07)
    Command register: 0x0007
      I/O space accesses: on
      Memory space accesses: on
      Bus mastering: on
      Special cycles: off
      MWI transactions: off
      Palette snooping: off
      Parity error checking: off
      Address/data stepping: off
      System error (SERR): off
      Fast back-to-back transactions: off
      Interrupt disable: off
    Status register: 0x0280
      Interrupt status: inactive
      Capability List support: off
      66 MHz capable: off
      User Definable Features (UDF) support: off
      Fast back-to-back capable: on
      Data parity error detected: off
      DEVSEL timing: medium (0x1)
      Slave signaled Target Abort: off
      Master received Target Abort: off
      Master received Master Abort: off
      Asserted System Error (SERR): off
      Parity error detected: off
    Class Name: display (0x03)
    Subclass Name: miscellaneous (0x80)
    Interface: 0x00
    Revision ID: 0x01
    BIST: 0x00
    Header Type: 0x00 (0x00)
    Latency Timer: 0x00
    Cache Line Size: 0x00

  Type 0 ("normal" device) header:
    0x10: 0xe1000000 0xe0000000 0xe0800000 0x00000000
    0x20: 0x00000000 0x00000000 0x00000000 0xe4e4e4e4
    0x30: 0xffff0001 0x00000000 0x00000000 0xc0c00100

    Base address register at 0x10
      type: 32-bit nonprefetchable memory
      base: 0xe1000000, size: 0x00020000
    Base address register at 0x14
      type: 32-bit nonprefetchable memory
      base: 0xe0000000, size: 0x00800000
    Base address register at 0x18
      type: 32-bit nonprefetchable memory
      base: 0xe0800000, size: 0x00800000
    Base address register at 0x1c
      not implemented(?)
    Base address register at 0x20
      not implemented(?)
    Base address register at 0x24
      not implemented(?)
    Cardbus CIS Pointer: 0x00000000
    Subsystem vendor ID: 0xe4e4
    Subsystem ID: 0xe4e4
    Expansion ROM Base Address: 0xffff0001
    Reserved @ 0x34: 0x00000000
    Reserved @ 0x38: 0x00000000
    Maximum Latency: 0xc0
    Minimum Grant: 0xc0
    Interrupt pin: 0x01 (pin A)
    Interrupt line: 0x00

  Device-dependent header:
    0x40: 0x00000000 0x00000000 0x00000000 0x00000000
    0x50: 0x00000000 0x00000000 0x00000000 0x00000000
    0x60: 0x00000000 0x00000000 0x00000000 0x00000000
    0x70: 0x00000000 0x00000000 0x00000000 0x00000000
    0x80: 0x00000000 0x00000000 0x00000000 0x00000000
    0x90: 0x00000000 0x00000000 0x00000000 0x00000000
    0xa0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xb0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xc0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xd0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xe0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xf0: 0x00000000 0x00000000 0x00000000 0x00000000

    Don't know how to pretty-print device-dependent header.

Texas Instruments TVP4020 Permedia 2 (miscellaneous display, revision 0x01) at 
? dev 0 function 0 (intrswiz 0, intrpin 0x1, i/o off, mem on, no quirks): Texas 
Instruments TVP4020 Permedia 2
bsr4: e0000000 from 0x2699014
bsr4: ff800000 from 0x2699014
bsr4: e1000000 from 0x2699010
bsr4: fffe0000 from 0x2699010
doing bus space map: tag 0x2391130c base e1000000 maxsize 20000 busflags 0bus 
space tag->base: 26ba000 
trying to get pa for va: 0x26ba000
welcome to bsm_absolute, tag->base=26ba000, pa=e0000000, wanted address=e1000000
returning 0x24f788, PA 36ba000
trying to get pa for va: 0x36ba000 
sanity check with kvtop: e1000000
pm2fb0: 8 MB aperture at 0xe0000000
bsr4_swap: 2010000 from 0x36ba018
bsr4_swap: 0 from 0x36ba020
bsr4_swap: 1000000 from 0x36ba020
bsr4_swap: 88010000 from 0x36bc000
bsr4_swap: 2010000 from 0x36ba018
bsr4_swap: 2010000 from 0x36ba018
bsr4_swap: 2010000 from 0x36ba018
bsr4_swap: e4000000 from 0x36c2a80
bsr4_swap: 2010000 from 0x36ba018
bsr4_swap: 2010000 from 0x36ba018
bsr4_swap: 0 from 0x36ba020
bsr4_swap: 1000000 from 0x36ba020
bsr4_swap: 88010000 from 0x36bc000
wsdisplay at pm2fb0 not configured
board at zbus0: pa 0xfffa0000 man/pro 8512/101 not configured
board at zbus0: pa 0xfffc0000 man/pro 8512/101 not configured
board at zbus0: pa 0xe0000000 man/pro 8512/101 not configured
board at zbus0: pa 0xe0800000 man/pro 8512/101 not configured
board at zbus0: pa 0xe1000000 man/pro 8512/101 not configured
scsibus0: waiting 2 seconds for devices to settle...
scsibus1: waiting 2 seconds for devices to settle...
4 views configured
root device: 

Best regards,
Radosław Kujawa


Home | Main Index | Thread Index | Old Index