Re: [RFC/PATCH] Implement {read,update}_persistent_clock. v2

2007-09-11 Thread Milton Miller
On Tue Sep 11 18:17:46 EST 2007, Tony Breeds wrote: > +unsigned long read_persistent_clock(void) > { > struct rtc_time tm; > + static int first = 1; > + > + if (first) { > + first = 0; > + if (ppc_md.time_init) > + timezone_offs

Re: [PATCH 08/10] bootwrapper: Add a firmware-independent "raw" target.

2007-09-10 Thread Milton Miller
On Sep 10, 2007, at 9:25 AM, Scott Wood wrote: +static inline void disable_irq(void) +{ + int dummy; + asm volatile("mfmsr %0; rlwinm %0, %0, 0, ~(1<<15); mtmsr %0" : +"=r" (dummy) : : "memory"); +} >> >> This will fail (mtm

Re: [PATCH 08/10] bootwrapper: Add a firmware-independent "raw" target.

2007-09-10 Thread Milton Miller
On Sep 10, 2007, at 9:30 AM, Scott Wood wrote: > On Mon, Sep 10, 2007 at 09:25:13AM -0500, Scott Wood wrote: >>> (5) space below load to decompress vmlinux (no vmlinux_alloc to >>> fallback to malloc) >>> (6) all space above load address available to hold malloc region >>> (7) for console output (

Re: [PATCH 08/10] bootwrapper: Add a firmware-independent "raw" target.

2007-09-09 Thread Milton Miller
On Fri Sep 7 10:58:03 EST 2007, David Gibson wrote: >> On Wed, Sep 05, 2007 at 02:21:16PM -0500, Scott Wood wrote: >> This target produces a flat binary rather than an ELF file, >> fixes the entry point at the beginning of the image, and takes >> a complete device tree with no fixups needed. >> >>

Re: [PATCH v2] powerpc: Add workaround for MPICs with broken register reads

2007-09-07 Thread Milton Miller
On Sep 7, 2007, at 4:21 AM, Olof Johansson wrote: > Some versions of PWRficient 1682M have an interrupt controller in which > the first register in each pair for interrupt sources doesn't always > read with the right polarity/sense values. > > To work around this, keep a software copy of the regi

Re: [PATCH] powerpc: Add workaround for MPICs with broken register reads

2007-09-06 Thread Milton Miller
On Wed Sep 5 12:44:17 EST 2007, Olof Johansson wrote: > diff --git a/arch/powerpc/platforms/Kconfig > b/arch/powerpc/platforms/Kconfig > index 041df77..b9f1efa 100644 > --- a/arch/powerpc/platforms/Kconfig > +++ b/arch/powerpc/platforms/Kconfig > @@ -137,6 +137,10 @@ config MPIC_U3_HT_IRQS >

Re: [PATCH 2/9] bootwrapper: Add strtoull().

2007-08-30 Thread Milton Miller
On Thu Aug 30 02:46:38 EST 2007, Scott Wood wrote: > + if (*ptr >= '0' && *ptr <= '9' && *ptr < '0' + base) > + digit = *ptr - '0'; > + else if (*ptr >= 'A' && *ptr < 'A' + base - 10) > + digit = *ptr - 'A' + 10; > +

[PATCH] qemu-system-ppc -prep initial port

2007-08-27 Thread Milton Miller
EMU PReP-specific stuff for the zImage boot wrapper. + * + * Copyright (C) 2007 Milton Miller, IBM Corp. <[EMAIL PROTECTED]> + * Copyright (C) 2006 Paul Mackerras, IBM Corp. <[EMAIL PROTECTED]> + * + * This program is free software; you can redistribute it and/or modify + * it

Re: [PATCH 1/2] [POWERPC] Remove cmd_line from head*.S

2007-08-23 Thread Milton Miller
On Thu Aug 23 13:27:31 EST 2007, Kumar Gala wrote: > On Aug 22, 2007, at 10:09 PM, Stephen Rothwell wrote: >> >> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c >> index 0028fe6..dc85005 100644 >> --- a/arch/powerpc/kernel/prom.c >> +++ b/arch/powerpc/kernel/prom.c >> @@ -60,6

Re: [PATCH 2/2] fix showing xmon help

2007-07-22 Thread Milton Miller
On Jul 20, 2007, at 3:15 AM, Ishizaki Kou wrote: > Milton Miller <[EMAIL PROTECTED]> wrote: >> On Jul 18, 2007, at 11:12 AM, Andreas Schwab wrote: >> >>> Milton Miller <[EMAIL PROTECTED]> writes: >>> >>>>>

Re: [PATCH 2/2] fix showing xmon help

2007-07-18 Thread Milton Miller
On Jul 18, 2007, at 11:12 AM, Andreas Schwab wrote: > Milton Miller <[EMAIL PROTECTED]> writes: > >>> case '?': >>> - printf(help_string); >>> + xmon_puts(help_string); >>>

Re: [PATCH 10/61] bootwrapper: flatdevtree fixes

2007-07-18 Thread Milton Miller
On Jul 18, 2007, at 1:56 PM, Scott Wood wrote: > Milton Miller wrote: >> In-Reply-To: <[EMAIL PROTECTED]> >> On Wed Jul 18 11:33:08 EST 2007, Scott Wood wrote: >>> 1. ft_create_node was returning the internal pointer rather than a >>> phandle. >>

Re: [PATCH 2/15] boot: record header bytes in gunzip_start

2007-07-18 Thread Milton Miller
On Jul 18, 2007, at 9:11 PM, David Gibson wrote: > On Tue, Jul 10, 2007 at 05:08:05PM -0500, Milton Miller wrote: >> >> Record the number of header bytes skipped in the total bytes read >> field. >> >> This is needed for the initramfs parsing code to

Re: [PATCH 3/15] boot: simplfy gunzip_finish

2007-07-18 Thread Milton Miller
On Jul 18, 2007, at 9:39 PM, David Gibson wrote: > On Tue, Jul 10, 2007 at 05:08:32PM -0500, Milton Miller wrote: >> >> Call gunzip_partial to calculate the remaining length and copy the >> data to the user buffer. This makes it shorter and reduces >> duplication.

Re: [patch 14/14] Bamboo zImage wrapper

2007-07-18 Thread Milton Miller
Sorry for the broken reply but the list is broken. On Wed Jul 18 04:16:01 EST 2007, Josh Boyer wrote: > Add a bootwrapper for Bamboo bamboo is what, an evaluation board? for which processor? > Signed-off-by: Josh Boyer > > --- > arch/powerpc/boot/44x.h |1 > arch/powerpc/boot/M

Re: [PATCH 10/61] bootwrapper: flatdevtree fixes

2007-07-18 Thread Milton Miller
On Wed Jul 18 11:33:08 EST 2007, Scott Wood wrote: > 1. ft_create_node was returning the internal pointer rather than a > phandle. > 2. ft_find_device_rel was treating lookups relative to root as an > error. No, it is treating lookups relative to NULL as an error. Your patch changes it to treat

Re: [PATCH 09/61] bootwrapper: Add dt_is_compatible().

2007-07-18 Thread Milton Miller
On Wed Jul 18 11:33:06 EST 2007, Scott Wood wrote: > +int dt_is_compatible(void *node, const char *compat) > +{ > + char *buf = (char *)prop_buf; > + int compat_len = strlen(compat); > + int len, pos; > + > + len = getprop(node, "compatible", buf, MAX_PROP_LEN); > + if

Re: [PATCH 2/2] fix showing xmon help

2007-07-18 Thread Milton Miller
On Wed Jul 18 19:26:40 EST 2007, Ishizaki Kou wrote: > In some configuration, xmon help string is larger than xmon_printf > buffer. We need not to use printf. This patch adds xmon_puts and > change to use it to show help string. [Since I'm requesting changes I'll suggest a new change log.] In so

Re: [PATCH 09/61] bootwrapper: Add dt_is_compatible().

2007-07-18 Thread Milton Miller
In-Reply-To: <[EMAIL PROTECTED]> On Wed Jul 18 11:33:06 EST 2007, Scott Wood wrote: > +int dt_is_compatible(void *node, const char *compat) > +{ > + char *buf = (char *)prop_buf; > + int compat_len = strlen(compat); > + int len, pos; > + > + len = getprop(node, "compatible"

Re: [PATCH 10/61] bootwrapper: flatdevtree fixes

2007-07-18 Thread Milton Miller
In-Reply-To: <[EMAIL PROTECTED]> On Wed Jul 18 11:33:08 EST 2007, Scott Wood wrote: > 1. ft_create_node was returning the internal pointer rather than a > phandle. > 2. ft_find_device_rel was treating lookups relative to root as an > error. No, it is treating lookups relative to NULL as an erro

[PATCH/EXAMPLE 15/15] bootwrapper: example sreset marshalling

2007-07-10 Thread Milton Miller
An example using the marshalling code that can be entered by sreset. By linking the marshalling code is at 0 and differentiating a cpu id from a device tree, it also works for kexec. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- For reference only, not intended to be merged.

[PATCH 14/15] boot: add a hook to start cpus

2007-07-10 Thread Milton Miller
The kexec code is doing strange contortions with dtops.finalize and platform_ops.vmlinux_alloc to manage the slave cpus. Add a hook with the needed information. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- Index: work.git/arch/powerpc/boot/k

[PATCH 13/15] bootwrapper: attach an empty vmlinux

2007-07-10 Thread Milton Miller
Allow the boot wrapper code to be linked without an attached vmlinux. Rather than invent a new syntax to invoke the wrapper, attach the stripped version of empty.o, which produces the same result. This new intermediary is called zBoot. Signed-off-by: Milton Miller <[EMAIL PROTEC

[PATCH 12/15] bootwrapper: extract the vmlinux from initramfs

2007-07-10 Thread Milton Miller
Teach the kexec platform to find the vmlinux from the initramfs. The implementation searches the initramfs for a file specified by the boot-file property in chosen. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- Status: working. Index: work.git/arch/powerpc/boot/k

[PATCH 11/15] bootwrapper: allow vmlinuz to be an external payload

2007-07-10 Thread Milton Miller
both the kernel to execute and any user space tools such as kexec (for reboot), crash dump, or oprofile. Another use would be to uncompress directly from a memory mapped region such as a flash partition. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- Check for no find_vmlinuz method

[PATCH 10/15] bootwrapper: add cpio file extraction library.

2007-07-10 Thread Milton Miller
Add a library to search through a cpio or initramfs to a specified path contained in a cpio. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- Status: tested and working. This file is designed to also be usable in a stand alone user space application. Index: work.git/arch/powerp

[PATCH 9/15] bootwrapper: rtas support

2007-07-10 Thread Milton Miller
add_occupied_range is needed here. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- Removed use_call_rtas(); instead put asm() at the file level. Index: work.git/arch/powerpc/boot/rtas.c === --- /dev/null 1970-01-01

[PATCH 8/15] bootwrapper: convert flatdevtree to version 16

2007-07-10 Thread Milton Miller
OF_DT_NOPs. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- Rediffed Makefile Index: work.git/arch/powerpc/boot/flatdevtree_conv.c === --- /dev/null 1970-01-01 00:00:00.0 + +++ work.git/arch/powerp

[PATCH 7/15] bootwrapper: Add kexec callable zImage wrapper

2007-07-10 Thread Milton Miller
memory node off the root with a name starting with "memory" must contain enough free memory (not in the reserved ranges) in the first reg range to uncompress the the kernel with padding. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- I split a few more routines out from this file

[PATCH 6/15] bootwrapper: switch 64 bit cpus to 32 bit mode

2007-07-10 Thread Milton Miller
Add code to check if the processor is in 64 or 32 bit mode using only instructions from the 32 bit subset. If the processor is in 64 bit mode, switch to 32 bit mode by clearing MSR[SF]. Also add a 64 bit procedure descriptor to use as a elf64 entry point. Signed-off-by: Milton Miller <[EM

[PATCH 5/15] bootwrapper: occupied memory ranges

2007-07-10 Thread Milton Miller
call init_malloc for fine grain allocation. Also, an optional vmlinux_alloc. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- Fixed a bug when extending across multiple ranges. Cleaned up documentation Index: work.git/arch/powerpc/boot/memra

[PATCH 4/15] bootwrapper: smp support code

2007-07-10 Thread Milton Miller
requirements. Note: this code works with kernel head_64.S. head_6xx.S needs the 0x60 entry point (it currently uses something closer to 0xC0; but the similar code is at 0xC4); the other heads don't appear to support SMP. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- Cleaned up do

[PATCH 3/15] boot: simplfy gunzip_finish

2007-07-10 Thread Milton Miller
Call gunzip_partial to calculate the remaining length and copy the data to the user buffer. This makes it shorter and reduces duplication. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- Index: work.git/arch/powerpc/boot/gunzip_

[PATCH 2/15] boot: record header bytes in gunzip_start

2007-07-10 Thread Milton Miller
Record the number of header bytes skipped in the total bytes read field. This is needed for the initramfs parsing code to find the end of the zip file. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- Index: work.git/arch/powerpc/boot/gunzip_

[PATCH 1/15] boot: find initrd location from device-tree

2007-07-10 Thread Milton Miller
Some platforms have a boot agent that can create or modify properties in the device-tree and load images into memory. Provide a helper to set loader_info used by prep_initrd(). Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- Moved to devtree.c as suggested. define UNIT_MAX hardco

[PATCH 0/15] bootwrapper: support for kexec to zImage

2007-07-10 Thread Milton Miller
This series creates a 32 bit zImage wrapper for a 32 or 64 bit PowerPC Linux kernel. This allows you to kexec a zImage with its compressed vmlinux instead of the uncompressed vmlinux elf. The elf is also packaged as a 64 bit elf for use by kexec-tools for 64 bit kernels. This series also adds c

[PATCH 07/11] dtc: implement labels on property data

2007-07-06 Thread Milton Miller
aa bb ], two: < four: 1234 > eight: ; will produce labels with offsets 0, 2, 4, and 8 bytes from the beginning of the data for property prop. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- The testcase in the following patch will also note in the source tree the gap between labe

[PATCH 00/11] dtc: some fixes, and make asm labels for data

2007-07-06 Thread Milton Miller
The following series adds the features of labeling memory reserve slots and labeling specific bytes or cells of property data. When translating from dts to asm, a global symbol is created with the name matching the label in the dts file. With these features a program does not need to understand t

[PATCH 09/11] dtc: add a testcase with labels

2007-07-06 Thread Milton Miller
Create a source file with labels for use as a testcase to check parsing dts files. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- I started with the existing test01.dts and added labels and a labeled subnode. The labels could instead be added to that file if desired, but that woul

[PATCH 10/11] dtc: align header comments in asm output

2007-07-06 Thread Milton Miller
Insert tabs to align the comments describing the fields of the boot parameters header struct. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- Previously some of the comments were seperated by one space and others by one tab from the field. Purely cosmetic, but then so are the co

[PATCH 04/11] dtc: implement labels on memory reserve slots

2007-07-06 Thread Milton Miller
Allow a label to be placed on a memory reserve entry. Change the parser to recogonise and store them. Emit them when writing assembly output. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- The infrastructure for storing the label was already present, so the changes are small. Inde

[PATCH 03/11] dtc: complain about unparsed digits in cell lists

2007-07-06 Thread Milton Miller
Check that strtoul() parsed the complete string. As with the number overflow case, write a non-fatal error message to stdout. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- I saw the FIXME and knew how to fix it. I think the severity should be higher, but opted for the detailed

[PATCH 06/11] dtc: allow a label: in any dts context

2007-07-06 Thread Milton Miller
a colon. The included terminating colon will prevent matching hex numbers. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- The following patches parse matches in CELLDATA and BYTESTRING in addition to the current INITIAL context; matches in MEMRESERVE and INCLUDE context will not be

[PATCH 11/11] dtc: format memory reserve as pairs on two lines

2007-07-06 Thread Milton Miller
When writing the memory reserve table in assembly output, emit both halves of each 64 bit number on a single .long statement. This results in two lines per memory reserve slot instead of four, each line contains one field (start or size). Signed-off-by: Milton Miller <[EMAIL PROTEC

[PATCH 08/11] dtc: store labels in asscending order

2007-07-06 Thread Milton Miller
that be added in the future (data formatting would need to break at each label). Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- Currently cosmetic as the labels will be on the correct data either way. Index: dtc/

[PATCH 05/11] dtc: clean up grow_data_for()

2007-07-06 Thread Milton Miller
struct data or directly copying empty_data. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- It took me a bit of time to find the source of the uninitialized pointer that was causing my changes to segfault. diff --git a/data.c b/data.c index 5d7db17..3d68792 100644 --- a/data.c +++ b/

[PATCH 02/11] dtc: move declaration of yyerror

2007-07-06 Thread Milton Miller
yyerror() is used by both dtc-parser.y and dtc-lexer.l, so move the declaration to srcpos.h. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- eliminates implicit declaration warning. Index: dtc/dtc-parser.y === --- dtc.or

[PATCH 01/11] dtc: fix asm for version 17

2007-07-06 Thread Milton Miller
The version 17 flat device tree format added struct size. When writing versin 17 assembly output the field must be emitted. Signed-off-by: Milton Miller <[EMAIL PROTECTED]> --- Found when trying to parse the binary from the assembled output. Index: dtc/flat

<    1   2   3   4