Commit Graph

55735 Commits

Author SHA1 Message Date
isaki 1b605f64e0 - Remove duplicated declarations.
- Make declaration of doboot() "extern" explicitly.
2012-05-16 07:32:30 +00:00
rkujawa 057fe0cc5b regen configs 2012-05-15 17:39:50 +00:00
rkujawa 9f18d1594f - Split X-Surf driver from if_ne_zbus, rework, add support for clockports present on X-Surf boards.
- Add gencp(4), a driver for generic clockports (it just needs a base address).

Approved by phx.
2012-05-15 17:35:43 +00:00
tsutsui 3bd688cacb - check bus_space_map(9) return value
- use BUS_SPACE_MAP_SHIFTED_ODD for clarify
- define and use proper macro instead of magic
2012-05-15 12:17:33 +00:00
tsutsui 80a89412b5 com at mainbus was gone.
http://mail-index.NetBSD.org/source-changes/2012/04/29/msg034022.html
2012-05-15 12:14:59 +00:00
skrll b8a204204c Typos in a comment. 2012-05-15 05:45:37 +00:00
nisimura 0e26a28956 A temporaly fix to avoid a lockup by KBT4 DISP button. Not sure
the real fix.  Curse on the every poorly written engineering
documents on Earth.
2012-05-15 02:14:13 +00:00
skrll b9703c3d18 Rename register values. No functional change - same code before and after.
Existing names are prefixed with PL01X_ where they're common between the
PL010 and the PL011. The PL010_/PL011_ prefixes are added where they're
found only on the respective chips.
2012-05-14 19:40:06 +00:00
skrll 59e244130f Remove printf that snuck in somehow. 2012-05-14 11:45:16 +00:00
skrll 0deaa3debb Whitespace in previous. 2012-05-14 11:05:29 +00:00
skrll e0f866efaa device_t/softc split
struct device * -> device_t
struct cfdata * -> cfdata_t
Use aprint*
2012-05-14 10:38:08 +00:00
abs a64e443af7 Revert hax to fix boot blocks for gcc 4.5, accudently committed in last 2012-05-14 10:05:50 +00:00
abs 326f063e60 From the "why was this not done before" box:
Implement WSDISPLAYIO_LINEBYTES so xwsfb works
2012-05-14 08:44:13 +00:00
mrg 542d4ccb17 enable PUFFS and putter. 2012-05-13 07:34:02 +00:00
tsutsui 140f97b123 KNF and cosmetics. No binary change. 2012-05-13 03:00:40 +00:00
tsutsui 888b558562 - use <sys/bus.h> rather than <machine/bus.h>
- no need to include uvm_extern.h
- include "ioconf.h" for struct cfdriver foo_cd
2012-05-13 00:47:16 +00:00
tsutsui 9a84d2f995 Explicitly specify a proper FDC data register address for HD63450 DMAC
to avoid confusion.

Previous one (fdc->sc_addr + fddata) wasn't a right address for
the FDC's data register but one for the command register by accident,
but FDC ignores A0 address input (connected to A1 of x68k address bus)
during DMA xfer (i.e. when DACK is asserted) so it happened to work
as expected on the real X680x0 hardware, but caused trouble on emulators.

The inconsistency was found by Y.Sugahara during debugging XM6i emulator
(and it will be fixed in the next release).
FDC behavior during DMA is confirmed by uPD72068 hardware application note.

XXX: There is no proper MI API to specify DMA address for DMA controller
     (like MC68450) to access devices mapped to memory space by bus_space(9).
2012-05-12 15:29:22 +00:00
nisimura 3334dfd18f Move I2C node adjustment stuff to autoconf.c from iic_eumb.c for
the ease of maintainance.
2012-05-12 13:13:24 +00:00
nisimura 5d9f22d740 More "no" designations to reflect the target NAS hardware configuration.
Is provided as a reference for other NAS platforms.  Before-after
factor is the 91% fitness.
2012-05-12 10:27:17 +00:00
nisimura 221ade12a9 A temporary solution to have KURO-BOX/T4 two way "dialogue" style
sat protocol. Need more work for robustness. Unbreak the previous
commit made by accident.
2012-05-11 21:40:49 +00:00
nisimura 9c08938065 make sure to have the correct I2C TOD attached for KURO-BOX/T4. 2012-05-11 21:12:34 +00:00
skrll 9e585c4c14 u_int*_t -> uint*_t
Same code before and after.
2012-05-11 15:39:17 +00:00
cegger 0ef7b4d395 xc_wait() does not wait for all cpus to finish
their callback. That means the ucode buffer is released while still in use
and this causes a crash.
Quick fix: check if the ucode buffer has been freed and abort.
You may need to run 'cpuctl ucode' twice to apply it to all cpus.

Per discussion with rmind@ use low priority xcalls and splhigh.
2012-05-10 12:35:53 +00:00
skrll b6641977d5 Typo 2012-05-10 11:47:09 +00:00
skrll ca99b53a12 Bit more KNF 2012-05-10 11:03:22 +00:00
skrll 3542915f60 KNF 2012-05-10 11:01:35 +00:00
skrll a79f423c7f KNF 2012-05-10 10:48:23 +00:00
skrll 9ae4f82b80 _int*_t -> uint*_t
Same code before and after.
2012-05-10 10:27:09 +00:00
skrll 9ea87d7dd7 u_int*_t -> uint*_t 2012-05-10 09:56:27 +00:00
skrll 4501565ba1 KNF 2012-05-10 07:39:48 +00:00
cegger 1daeac0d8a fix crash when booting with -x. 2012-05-09 13:58:09 +00:00
macallan 8b2ecf848a provide a BAT mapping for the PCI IO range on Grackle/Heathrow based macs
now drivers that need PCI IO access work again
2012-05-08 05:15:45 +00:00
matt 12ca21c5bb Preserve some MACCFG2 bits 2012-05-07 23:04:22 +00:00
dsl 12bb5f8f0a Rejig the way TRAP() and ZTRAP() are defined and add Z/TRAP_NJ() that
excludes the 'jmp alltraps'.
Use the _NJ versions for trap entries with non-standard code.
Move all the KDTRACE_HOOKS code into a single block inside the
  IDTVEC(trap03) code. This removes a mis-predicted from every
  trap when KDTRACE_HOOKS are enabled.
Add a few blank lines, need some comments as well :-)
No functional changes intended.
2012-05-07 21:09:29 +00:00
dsl 32a805349b Add a ';' that got deleted in a slight tidyup. 2012-05-07 21:04:09 +00:00
dsl 53a9a10f6e Move all the XEN differences to a single conditional.
Merge the XEN/non-XEN versions of INTRFASTEXIT and
  INTR_RECURSE_HWFRAME by using extra defines.
Split INTRENTRY so that code can insert extra instructions
  inside user/kernel conditional.
2012-05-07 20:51:20 +00:00
tsutsui e197458932 Fix wrong raw keycode in xt_keymap_c860[] so that right shift properly works
on Xserver on C7x0/860.  From steleto.

Should be pulled up to netbsd-6.
2012-05-07 18:36:16 +00:00
tsutsui 485e133a8e Add dummy bus_dma(9) typedefs (enabled by __HAVE_NO_BUS_DMA) in <sys/bus.h>
for ports which don't bother to have unnecessary bus_dma(9) implementation
to appease MI driver modules that require bus_dma_tag_t.

For amiga, move <m68k/bus_dma.h> inclusion from <machine/pci_machdep.h>
to <machine/bus.h> since amiga will want actual bus_dma(9) in future
for PCI devices.

Fixes builds on sys/modules/if_axe etc on ancient ports.

"Sounds good" from martin@ on port-m68k@.
2012-05-07 18:16:38 +00:00
jym 8cf41b7663 Merge i386 and amd64 version of db_memrw.c.
Use this opportunity to skip calculating the VA of the page. Let the CPU
deal with the invalidation itself through invlpg + destination address to
avoid converting between canonical/non canonical forms.
2012-05-07 17:45:28 +00:00
joerg 1da1d2193c Raise per-image text size limit to 256MB. 64MB has seen already, so
provide some margin of grows.
2012-05-07 16:16:44 +00:00
jym 6ddc2f08de For correctness: do not forget VA_SIGN_NEG(). 2012-05-07 12:23:05 +00:00
jym 6a8edbf721 invlpg on a non canonical address is a noop, so no chance to invalidate
the TLB and the CPU will not notice the access right change.

This results in write protection faults in supervisor mode when patching
kernel code through ddb(4) (originally mapped as read only).

Bug reported by David Laight on port-amd64@ (thanks!), patch and test by
me.

i386 is unaffected as PG_LGFRAME does not mask the sign bits. For the
sake of correctness, use VA_SIGN_NEG(...) anyway.

XXX this is the patch that will be pulled-up to -5 and -6.
2012-05-07 12:20:27 +00:00
jym 7db24764fe Use the current destination address to compute PTE, not the address of
origin.

Harmless, except when db_write_text() passes a page boundary.

From Bug Hunting.

XXX has to be pulled up to -5 and -6.
2012-05-07 12:12:03 +00:00
jym 1cc61dc5c3 Use pmap_pte_*bits macros to set/clear bits in a PTE. Remove pmap_pte_flush
calls as these operations are synchronously flushed under Xen; they should
not be cached.

XXX the code can be shared between i386 and amd64, but I will merge
them once I figure out why db_write_text() can cause page faults for
certain CPUs in long mode (code looks correct, but single stepping or
adding debug printf's makes the bug magically disappear... sigh)

Bug reported by David Laight on port-amd64@ when attempting to set
breakpoints through ddb(4).
2012-05-07 02:32:09 +00:00
jym 86fb416954 Remove XXXSMP comment and explain why no TLB shootdown is required here. 2012-05-07 02:15:34 +00:00
jym 82dd894c71 I am not quite sure that __data_start (set through location counter) is
a char... declare it as int, like amd64.
2012-05-07 02:12:35 +00:00
tsutsui bf4f59d877 Make x68k's floppy driver actually work with proper bounce buffer xfer ops
on machines with extended high memories:

- dev/fd.c:
 - add missing bus_dmamap_sync(9) POSTREAD/POSTWRITE ops

- x68k/machdep.c:
 - update avail_end variable (which is used to check DMA'able memory range
   in intio.c) properly per probed extended memory regions

The problem was found during debugging XM6i's FDC emulation by
Y.Sugahara, isaki@, and me.

Should be pulled up to netbsd-6.
2012-05-06 19:46:18 +00:00
jym 07829955b6 Add latest CR4 bits:
- CR4_VMXE: VMX operations, used for hardware virtualization.
- CR4_SMXE: SMX operations, used for safer Mode Extensions (ground for
            Intel's TXT - Trusted Execution Technology - platform).
- CR4_FSGSBASE: enable *FSBASE and *GSBASE instructions, for R/W access
                to FS/GS segment base addresses.
- CR4_PCIDE: enable Process Context IDentifiers (other architectures may call
             these "address space identifiers").
- CR4_OSXSAVE: enable xsave and xrestore instructions
- CR4_SMEP: Supervisor Mode Execution Prevention. Allows enforcing --x rights
            from cpl 0.

From Intel® 64 and IA-32 Architectures Software Developer’s Manual,
March 2012.

Align declarations.

CPUID_* bits for these features follow.
2012-05-05 15:08:29 +00:00
macallan 648feb69e9 make sure opt_sunkbd.h exists 2012-05-05 13:47:07 +00:00
macallan 1da85cff6f remove some commented out / unused junk 2012-05-02 00:55:26 +00:00