PERFORCE change 98366 for review
Olivier Houchard
cognet at FreeBSD.org
Fri Jun 2 22:21:06 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=98366
Change 98366 by cognet at cognet on 2006/06/02 22:18:52
Add a new variable, s3c2410_uart_vaddr, to be able to give the uart
virtual address from the board-dependant code.
Nuke the got_mmu mess.
There's no need to insert the mapped device into the initial pagetable
provided by _start() when we're about to use the new pagetables anyway.
Affected files ...
.. //depot/projects/arm/src/sys/arm/s3c2xx0/fs2410_machdep.c#3 edit
.. //depot/projects/arm/src/sys/arm/s3c2xx0/uart_cpu_s3c2410.c#2 edit
Differences ...
==== //depot/projects/arm/src/sys/arm/s3c2xx0/fs2410_machdep.c#3 (text+ko) ====
@@ -176,15 +176,13 @@
extern void *_end;
-int got_mmu = 0;
-
-extern vm_offset_t sa1_cache_clean_addr;
-
extern int *end;
struct pcpu __pcpu;
struct pcpu *pcpup = &__pcpu;
+extern vm_offset_t s3c2410_uart_vaddr;
+
/* Physical and virtual addresses for some global pages */
vm_paddr_t phys_avail[10];
@@ -498,16 +496,9 @@
(7<<BANKCON_TACC_SHIFT)|(0<<BANKCON_TOCH_SHIFT)|
(0<<BANKCON_TCAH_SHIFT));
- /*
- * Map I/O registers that are used in startup. Now we are
- * still using page table prepared by bootloader. Later we'll
- * map those registers at the same address in the kernel page
- * table.
- */
- pmap_devmap_bootstrap((vm_offset_t)read_ttb(), fs2410_devmap);
-
/* Disable all peripheral interrupts */
ioreg_write32(INTCTL_VBASE + INTCTL_INTMSK, ~0);
+ s3c2410_uart_vaddr = UART_VBASE;
cninit();
/* Set stack for exception handlers */
@@ -527,7 +518,6 @@
/* Enable MMU, I-cache, D-cache, write buffer. */
- got_mmu = 1;
arm_vector_init(ARM_VECTORS_LOW, ARM_VEC_ALL);
pmap_curmaxkvaddr = afterkern + PAGE_SIZE;
==== //depot/projects/arm/src/sys/arm/s3c2xx0/uart_cpu_s3c2410.c#2 (text+ko) ====
@@ -50,13 +50,15 @@
extern struct uart_ops uart_s3c2410_ops;
+vm_offset_t s3c2410_uart_vaddr;
+
int
uart_cpu_getdev(int devtype, struct uart_devinfo *di)
{
di->ops = uart_s3c2410_ops;
di->bas.chan = 0;
di->bas.bst = &s3c2xx0_bs_tag;
- di->bas.bsh = 0x50000000;
+ di->bas.bsh = s3c2410_uart_vaddr;
di->bas.regshft = 0;
di->bas.rclk = 0;
di->baudrate = 9600;
More information about the p4-projects
mailing list