PS3: Rename IPI symbols
Subsystems (5)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/33 Cell: Add spu shutdown method
Add a shutdown method to spu_sysdev_class to allow proper spu resource cleanup on system shutdown. This is needed to support kexec on the PS3 platform.
--- arch/powerpc/platforms/cell/spu_base.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
arch/powerpc/platforms/cell/spu_base.c +11 -1
@@ -462,8 +462,18 @@ void spu_free(struct spu *spu) }EXPORT_SYMBOL_GPL (spu_free); +static int spu_shutdown (struct sys_device *sysdev) +{ + struct spu *spu = container_of(sysdev, struct spu, sysdev); + +spu_free_irqs (spu); +spu_destroy_spu (spu); +return 0 ; +} +struct sysdev_class spu_sysdev_class = { -set_kset_name ("spu" ) +set_kset_name ("spu" ), + .shutdown = spu_shutdown, };int spu_add_sysdev_attr (struct sysdev_attribute *attr)
PATCH 2/33 PS3: Rename IPI symbols
In reply to a message not in the archiveRename the PS3 static symbol virqs to ps3_ipi_virqs to aid in debugging.
--- arch/powerpc/platforms/ps3/smp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/powerpc/platforms/ps3/smp.c +6 -6
@@ -39,11 +39,11 @@ static irqreturn_t ipi_function_handler( }/** -* virqs - a per cpu array of virqs for ipi use +* ps3_ipi_virqs - a per cpu array of virqs for ipi use */ #define MSG_COUNT 4 -static DEFINE_PER_CPU(unsigned int, virqs[MSG_COUNT]); +static DEFINE_PER_CPU(unsigned int, ps3_ipi_virqs[MSG_COUNT]);static const char *names[MSG_COUNT ] = {"ipi call" ,
@@ -62,7 +62,7 @@ static void do_message_pass(int target,return ; } - virq =per_cpu (virqs, target)[msg]; + virq =per_cpu (ps3_ipi_virqs, target)[msg]; result =ps3_send_event_locally (virq);if (result)
@@ -94,13 +94,13 @@ static int ps3_smp_probe(void)static void __init ps3_smp_setup_cpu (int cpu) {int result; -unsigned int *virqs =per_cpu (virqs, cpu); +unsigned int *virqs =per_cpu (ps3_ipi_virqs, cpu);int i;DBG (" -> %s:%d: (%d)\n" , __func__, __LINE__, cpu);/* -* Check assumptions on virqs[] indexing. If this +* Check assumptions on ps3_ipi_virqs[] indexing. If this * check fails, then a different mapping of PPC_MSG_ * to index needs to be setup. */
@@ -132,7 +132,7 @@ static void __init ps3_smp_setup_cpu(intvoid ps3_smp_cleanup_cpu (int cpu) { -unsigned int *virqs =per_cpu (virqs, cpu); +unsigned int *virqs =per_cpu (ps3_ipi_virqs, cpu);int i;DBG (" -> %s:%d: (%d)\n" , __func__, __LINE__, cpu);
PATCH 3/33 PS3: Use __maybe_unused
In reply to a message not in the archiveChange the PS3 debug routines from using the GCC specific '__attribute__ ((unused))' to the preprocessor macro __maybe_unused.
--- arch/powerpc/platforms/ps3/interrupt.c | 4 ++-- arch/powerpc/platforms/ps3/time.c | 2 +- drivers/ps3/vuart.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-)
arch/powerpc/platforms/ps3/interrupt.c +2 -2
@@ -533,7 +533,7 @@ static void _dump_64_bmp(const char *hea *p & 0xffff); } -static void __attribute__ ((unused))_dump_256_bmp (const char *header, +static void __maybe_unused _dump_256_bmp (const char *header,const u64 *p,unsigned cpu,const char * func,int line) { pr_debug("%s:%d: %s %u {%016lx:%016lx:%016lx:%016lx}\n",
@@ -552,7 +552,7 @@ static void _dump_bmp(struct ps3_private }#define dump_mask (_x) _dump_mask(_x, __func__, __LINE__) -static void __attribute__ ((unused))_dump_mask (struct ps3_private * pd, +static void __maybe_unused _dump_mask (struct ps3_private *pd,const char * func,int line) {unsigned long flags;
arch/powerpc/platforms/ps3/time.c +1 -1
@@ -39,7 +39,7 @@ static void _dump_tm(const struct rtc_ti }#define dump_time (_a) _dump_time(_a, __func__, __LINE__) -static void __attribute__ ((unused))_dump_time (int time,const char * func, +static void __maybe_unused _dump_time (int time,const char *func,int line) {struct rtc_time tm;
drivers/ps3/vuart.c +2 -2
@@ -83,7 +83,7 @@ struct ports_bmp { } __attribute__ ((aligned (32)));#define dump_ports_bmp (_b) _dump_ports_bmp(_b, __func__, __LINE__) -static void __attribute__ ((unused))_dump_ports_bmp ( +static void __maybe_unused _dump_ports_bmp (const struct ports_bmp * bmp,const char * func,int line) {pr_debug ("%s:%d: ports_bmp: %016lxh\n" , func, line, bmp->status);
@@ -107,7 +107,7 @@ static int ps3_vuart_match_id_to_port(en }#define dump_port_params (_b) _dump_port_params(_b, __func__, __LINE__) -static void __attribute__ ((unused))_dump_port_params (unsigned int port_number, +static void __maybe_unused _dump_port_params (unsigned int port_number,const char * func,int line) {#if defined(DEBUG )
PATCH 4/33 PS3: Compare firmware version
In reply to a message not in the archiveFrom: Masakazu Mokuno <[email protected]>
Add a utility routine ps3_compare_firmware_version() to compare system firmware versions. Uses the existing ps3_get_firmware_version() routine.
--- arch/powerpc/platforms/ps3/setup.c | 32 ++++++++++++++++++++------------ include/asm-powerpc/ps3.h | 3 ++- 2 files changed, 22 insertions(+), 13 deletions(-)
arch/powerpc/platforms/ps3/setup.c +20 -12
@@ -46,18 +46,26 @@static void smp_send_stop (void ) {}#endif -int ps3_get_firmware_version (union ps3_firmware_version *v) +static union ps3_firmware_version ps3_firmware_version; + +void ps3_get_firmware_version (union ps3_firmware_version *v) { -int result =lv1_get_version_info (&v->raw); + *v = ps3_firmware_version; +} +EXPORT_SYMBOL_GPL (ps3_get_firmware_version); -if (result) { - v->raw =0 ; -return -1 ; - } +int ps3_compare_firmware_version (u16 major,u16 minor,u16 rev) +{ +union ps3_firmware_version x; + + x.pad =0 ; + x.major = major; + x.minor = minor; + x.rev = rev; -return result; +return (ps3_firmware_version.raw - x.raw); } -EXPORT_SYMBOL_GPL (ps3_get_firmware_version); +EXPORT_SYMBOL_GPL (ps3_compare_firmware_version);static void ps3_power_save (void ) {
@@ -146,13 +154,13 @@ static int ps3_set_dabr(u64 dabr)static void __init ps3_setup_arch (void ) { -union ps3_firmware_version v;DBG (" -> %s:%d\n" , __func__, __LINE__); -ps3_get_firmware_version (&v); -printk (KERN_INFO "PS3 firmware version %u.%u.%u\n" , v.major, v.minor, - v.rev); +lv1_get_version_info (&ps3_firmware_version.raw); +printk (KERN_INFO "PS3 firmware version %u.%u.%u\n" , + ps3_firmware_version.major, ps3_firmware_version.minor, + ps3_firmware_version.rev);ps3_spu_set_platform ();ps3_map_htab ();
include/asm-powerpc/ps3.h +2 -1
@@ -35,7 +35,8 @@ union ps3_firmware_version { }; }; -int ps3_get_firmware_version (union ps3_firmware_version *v); +void ps3_get_firmware_version (union ps3_firmware_version *v); +int ps3_compare_firmware_version (u16 major,u16 minor,u16 rev);/* 'Other OS' area */
PATCH 5/33 PS3: Use ioremap_flags
In reply to a message not in the archiveUse ioremap_flags() to map SPU regions as non-guarded. Change the use of _ioremap() to ioremap_flags().
---
o After a number of revisions, I think everyone agrees this is now correct.
arch/powerpc/platforms/ps3/htab.c | 2 +- arch/powerpc/platforms/ps3/spu.c | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-)
arch/powerpc/platforms/ps3/htab.c +1 -1
@@ -273,7 +273,7 @@ void __init ps3_map_htab(void) result =lv1_map_htab (0 , &htab_addr); - htab = (hpte_t *)__ioremap (htab_addr, htab_size, + htab = (__force hpte_t *)ioremap_flags (htab_addr, htab_size,pgprot_val (PAGE_READONLY_X )); DBG("%s:%d: lpar %016lxh, virt %016lxh\n", __func__, __LINE__,
arch/powerpc/platforms/ps3/spu.c +9 -4
@@ -182,15 +182,18 @@ static int __init setup_areas(struct spu {struct table {char * name;unsigned long addr;unsigned long size;}; -spu_pdata (spu)->shadow =__ioremap ( -spu_pdata (spu)->shadow_addr,sizeof (struct spe_shadow ), -pgprot_val (PAGE_READONLY ) | _PAGE_NO_CACHE | _PAGE_GUARDED); +spu_pdata (spu)->shadow =ioremap_flags (spu_pdata (spu)->shadow_addr, +sizeof (struct spe_shadow ), +pgprot_val (PAGE_READONLY ) | + _PAGE_NO_CACHE);if (!spu_pdata (spu)->shadow) {pr_debug ("%s:%d: ioremap shadow failed\n" , __func__, __LINE__); goto fail_ioremap; } - spu->local_store =ioremap (spu->local_store_phys,LS_SIZE ); + spu->local_store = (__force void *)ioremap_flags (spu->local_store_phys, +LS_SIZE , _PAGE_NO_CACHE); +if (!spu->local_store) {pr_debug ("%s:%d: ioremap local_store failed\n" , __func__, __LINE__);
@@ -199,6 +202,7 @@ static int __init setup_areas(struct spu spu->problem =ioremap (spu->problem_phys,sizeof (struct spu_problem )); +if (!spu->problem) {pr_debug ("%s:%d: ioremap problem failed\n" , __func__, __LINE__); goto fail_ioremap;
@@ -206,6 +210,7 @@ static int __init setup_areas(struct spu spu->priv2 =ioremap (spu_pdata (spu)->priv2_addr,sizeof (struct spu_priv2 )); +if (!spu->priv2) {pr_debug ("%s:%d: ioremap priv2 failed\n" , __func__, __LINE__); goto fail_ioremap;
PATCH 6/33 PS3: Fix sparse warnings
In reply to a message not in the archiveFrom: Geert Uytterhoeven <[email protected]>
Fix some PS3 build warnings reported by `make C=1'. You need to install sparse:
git://git.kernel.org/pub/scm/devel/sparse/sparse.git
--- arch/powerpc/platforms/ps3/os-area.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/platforms/ps3/os-area.c +2 -2
@@ -133,7 +133,7 @@ struct saved_params { } static saved_params;#define dump_header (_a) _dump_header(_a, __func__, __LINE__) -static void _dump_header (const struct os_area_header __iomem *h,const char * func, +static void _dump_header (const struct os_area_header *h,const char *func,int line) { pr_debug("%s:%d: h.magic_num: '%s'\n", func, line,
@@ -151,7 +151,7 @@ static void _dump_header(const struct os }#define dump_params (_a) _dump_params(_a, __func__, __LINE__) -static void _dump_params (const struct os_area_params __iomem *p,const char * func, +static void _dump_params (const struct os_area_params *p,const char *func,int line) {pr_debug ("%s:%d: p.boot_flag: %u\n" , func, line, p->boot_flag);
PATCH 7/33 PS3: Add support for HDMI RGB Full Range mode
In reply to a message not in the archiveFrom: Masashi Kimoto <[email protected]>
Add support for HDMI RGB Full Range mode, which is available on system software 1.80 or newer.
--- drivers/ps3/ps3av_cmd.c | 16 ++++++++++++++++ include/asm-powerpc/ps3av.h | 12 +++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-)
drivers/ps3/ps3av_cmd.c +16 -0
@@ -143,6 +143,14 @@ static u32 ps3av_vid_video2av(int vid)return PS3AV_CMD_AV_VID_480P ; } +static int ps3av_hdmi_range (void ) +{ +if (ps3_compare_firmware_version (1 ,8 ,0 ) <0 ) +return 0 ; +else +return 1 ;/* supported */ +} +int ps3av_cmd_init (void ) {int res;
@@ -350,6 +358,10 @@ u32 ps3av_cmd_set_av_video_cs(void *p, u/* should be same as video_mode.video_cs_out */ av_video_cs->av_cs_in =ps3av_cs_video2av (PS3AV_CMD_VIDEO_CS_RGB_8 ); av_video_cs->bitlen_out =ps3av_cs_video2av_bitlen (cs_out); +if ((id &PS3AV_MODE_WHITE ) &&ps3av_hdmi_range ()) + av_video_cs->super_white =PS3AV_CMD_AV_SUPER_WHITE_ON ; +else /* default off */ + av_video_cs->super_white =PS3AV_CMD_AV_SUPER_WHITE_OFF ; av_video_cs->aspect = aspect;if (id &PS3AV_MODE_DITHER ) { av_video_cs->dither =PS3AV_CMD_AV_DITHER_ON
@@ -392,6 +404,10 @@ u32 ps3av_cmd_set_video_mode(void *p, u3 video_mode->pitch = video_mode->width *4 ;/* line_length */ video_mode->video_out_format =PS3AV_CMD_VIDEO_OUT_FORMAT_RGB_12BIT ; video_mode->video_format = ps3av_video_fmt_table[video_fmt].format; +if ((id &PS3AV_MODE_COLOR ) &&ps3av_hdmi_range ()) + video_mode->video_cl_cnv =PS3AV_CMD_VIDEO_CL_CNV_DISABLE_LUT ; +else /* default enable */ + video_mode->video_cl_cnv =PS3AV_CMD_VIDEO_CL_CNV_ENABLE_LUT ; video_mode->video_order = ps3av_video_fmt_table[video_fmt].order; pr_debug("%s: video_mode:vid:%x width:%d height:%d pitch:%d out_format:%d format:%x order:%x\n",
include/asm-powerpc/ps3av.h +9 -3
@@ -159,6 +159,9 @@#define PS3AV_CMD_VIDEO_FMT_X8R8G8B8 0x0000/* video_out_format */ #define PS3AV_CMD_VIDEO_OUT_FORMAT_RGB_12BIT 0x0000 +/* video_cl_cnv */ +#define PS3AV_CMD_VIDEO_CL_CNV_ENABLE_LUT 0x0000 +#define PS3AV_CMD_VIDEO_CL_CNV_DISABLE_LUT 0x0010/* video_sync */ #define PS3AV_CMD_VIDEO_SYNC_VSYNC 0x0001#define PS3AV_CMD_VIDEO_SYNC_CSYNC 0x0004
@@ -311,6 +314,8 @@#define PS3AV_MODE_MASK 0x000F#define PS3AV_MODE_HDCP_OFF 0x1000/* Retail PS3 product doesn't support this */ #define PS3AV_MODE_DITHER 0x0800 +#define PS3AV_MODE_COLOR 0x0400 +#define PS3AV_MODE_WHITE 0x0200#define PS3AV_MODE_FULL 0x0080#define PS3AV_MODE_DVI 0x0040#define PS3AV_MODE_RGB 0x0020
@@ -529,9 +534,9 @@ struct ps3av_pkt_video_mode {u32 video_out_format;/* in: out format */ u32 video_format;/* in: input frame buffer format */ u8 reserved3; -u8 reserved4; +u8 video_cl_cnv;/* in: color conversion */ u16 video_order;/* in: input RGB order */ -u32 reserved5; +u32 reserved4; };/* video: format */
@@ -539,7 +544,8 @@ struct ps3av_pkt_video_format {struct ps3av_send_hdr send_hdr;u32 video_head;/* in: head */ u32 video_format;/* in: frame buffer format */ -u16 reserved; +u8 reserved; +u8 video_cl_cnv;/* in: color conversion */ u16 video_order;/* in: input RGB order */ };
PATCH 8/33 PS3: Move chip mask defs up
In reply to a message not in the archiveThis just moves the definitions of the PS3 chip_mask routines up above the irq setup routines. This change is needed for the kexec updates that follow. Also adds some inline documentation to the routines.
--- arch/powerpc/platforms/ps3/interrupt.c | 147 +++++++++++++++++++-------------- 1 file changed, 86 insertions(+), 61 deletions(-)
arch/powerpc/platforms/ps3/interrupt.c +86 -61
@@ -91,6 +91,92 @@ struct ps3_private { static DEFINE_PER_CPU(struct ps3_private, ps3_private);/** +* ps3_chip_mask - Set an interrupt mask bit in ps3_bmp. +* @virq: The assigned Linux virq. +* +* Sets ps3_bmp.mask and calls lv1_did_update_interrupt_mask(). +*/ + +static void ps3_chip_mask (unsigned int virq) +{ +struct ps3_private *pd =get_irq_chip_data (virq); +u64 bit =0x8000000000000000UL >> virq; +u64 *p = &pd->bmp.mask; +u64 old; +unsigned long flags; + +pr_debug ("%s:%d: cpu %u, virq %d\n" , __func__, __LINE__, pd->cpu, virq); + +local_irq_save (flags); + asmvolatile ( +"1: ldarx %0,0,%3\n" +"andc %0,%0,%2\n" +"stdcx. %0,0,%3\n" +"bne- 1b" + :"=&r" (old),"+m" (*p) + :"r" (bit),"r" (p) + :"cc" ); + +lv1_did_update_interrupt_mask (pd->node, pd->cpu); +local_irq_restore (flags); +} + +/** +* ps3_chip_unmask - Clear an interrupt mask bit in ps3_bmp. +* @virq: The assigned Linux virq. +* +* Clears ps3_bmp.mask and calls lv1_did_update_interrupt_mask(). +*/ + +static void ps3_chip_unmask (unsigned int virq) +{ +struct ps3_private *pd =get_irq_chip_data (virq); +u64 bit =0x8000000000000000UL >> virq; +u64 *p = &pd->bmp.mask; +u64 old; +unsigned long flags; + +pr_debug ("%s:%d: cpu %u, virq %d\n" , __func__, __LINE__, pd->cpu, virq); + +local_irq_save (flags); + asmvolatile ( +"1: ldarx %0,0,%3\n" +"or %0,%0,%2\n" +"stdcx. %0,0,%3\n" +"bne- 1b" + :"=&r" (old),"+m" (*p) + :"r" (bit),"r" (p) + :"cc" ); + +lv1_did_update_interrupt_mask (pd->node, pd->cpu); +local_irq_restore (flags); +} + +/** +* ps3_chip_eoi - HV end-of-interrupt. +* @virq: The assigned Linux virq. +* +* Calls lv1_end_of_interrupt_ext(). +*/ + +static void ps3_chip_eoi (unsigned int virq) +{ +const struct ps3_private *pd =get_irq_chip_data (virq); +lv1_end_of_interrupt_ext (pd->node, pd->cpu, virq); +} + +/** +* ps3_irq_chip - Represents the ps3_bmp as a Linux struct irq_chip. +*/ + +static struct irq_chip ps3_irq_chip = { + .typename ="ps3" , + .mask = ps3_chip_mask, + .unmask = ps3_chip_unmask, + .eoi = ps3_chip_eoi, +}; + +/** * ps3_virq_setup - virq related setup. * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be * serviced on.
@@ -565,67 +651,6 @@ static void __maybe_unused _dump_mask(ststatic void dump_bmp (struct ps3_private * pd) {};#endif /* defined(DEBUG) */ -static void ps3_chip_mask (unsigned int virq) -{ -struct ps3_private *pd =get_irq_chip_data (virq); -u64 bit =0x8000000000000000UL >> virq; -u64 *p = &pd->bmp.mask; -u64 old; -unsigned long flags; - -pr_debug ("%s:%d: cpu %u, virq %d\n" , __func__, __LINE__, pd->cpu, virq); - -local_irq_save (flags); - asmvolatile ( -"1: ldarx %0,0,%3\n" -"andc %0,%0,%2\n" -"stdcx. %0,0,%3\n" -"bne- 1b" - :"=&r" (old),"+m" (*p) - :"r" (bit),"r" (p) - :"cc" ); - -lv1_did_update_interrupt_mask (pd->node, pd->cpu); -local_irq_restore (flags); -} - -static void ps3_chip_unmask (unsigned int virq) -{ -struct ps3_private *pd =get_irq_chip_data (virq); -u64 bit =0x8000000000000000UL >> virq; -u64 *p = &pd->bmp.mask; -u64 old; -unsigned long flags; - -pr_debug ("%s:%d: cpu %u, virq %d\n" , __func__, __LINE__, pd->cpu, virq); - -local_irq_save (flags); - asmvolatile ( -"1: ldarx %0,0,%3\n" -"or %0,%0,%2\n" -"stdcx. %0,0,%3\n" -"bne- 1b" - :"=&r" (old),"+m" (*p) - :"r" (bit),"r" (p) - :"cc" ); - -lv1_did_update_interrupt_mask (pd->node, pd->cpu); -local_irq_restore (flags); -} - -static void ps3_chip_eoi (unsigned int virq) -{ -const struct ps3_private *pd =get_irq_chip_data (virq); -lv1_end_of_interrupt_ext (pd->node, pd->cpu, virq); -} - -static struct irq_chip irq_chip = { - .typename ="ps3" , - .mask = ps3_chip_mask, - .unmask = ps3_chip_unmask, - .eoi = ps3_chip_eoi, -}; -static void ps3_host_unmap (struct irq_host *h,unsigned int virq) {set_irq_chip_data (virq,NULL );
PATCH 9/33 PS3: Simplify definition of DBG
In reply to a message not in the archiveFrom: Geert Uytterhoeven <[email protected]>
Simplify the PS3 definition of DBG.
--- arch/powerpc/platforms/ps3/htab.c | 4 ++-- arch/powerpc/platforms/ps3/interrupt.c | 4 ++-- arch/powerpc/platforms/ps3/mm.c | 4 ++-- arch/powerpc/platforms/ps3/setup.c | 4 ++-- arch/powerpc/platforms/ps3/smp.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-)
arch/powerpc/platforms/ps3/htab.c +2 -2
@@ -29,9 +29,9 @@#include "platform.h" #if defined(DEBUG ) -#define DBG(fmt...) udbg_printf(fmt) +#define DBG udbg_printf#else -#define DBG(fmt...) do{if(0)printk(fmt);}while(0) +#define DBG pr_debug#endif static hpte_t *htab;
arch/powerpc/platforms/ps3/interrupt.c +2 -2
@@ -30,9 +30,9 @@#include "platform.h" #if defined(DEBUG ) -#define DBG(fmt...) udbg_printf(fmt) +#define DBG udbg_printf#else -#define DBG(fmt...) do{if(0)printk(fmt);}while(0) +#define DBG pr_debug#endif /**
arch/powerpc/platforms/ps3/mm.c +2 -2
@@ -30,9 +30,9 @@#include "platform.h" #if defined(DEBUG ) -#define DBG(fmt...) udbg_printf(fmt) +#define DBG udbg_printf#else -#define DBG(fmt...) do{if(0)printk(fmt);}while(0) +#define DBG pr_debug#endif enum {
arch/powerpc/platforms/ps3/setup.c +2 -2
@@ -37,9 +37,9 @@#include "platform.h" #if defined(DEBUG ) -#define DBG(fmt...) udbg_printf(fmt) +#define DBG udbg_printf#else -#define DBG(fmt...) do{if(0)printk(fmt);}while(0) +#define DBG pr_debug#endif #if !defined(CONFIG_SMP )
arch/powerpc/platforms/ps3/smp.c +2 -2
@@ -27,9 +27,9 @@#include "platform.h" #if defined(DEBUG ) -#define DBG(fmt...) udbg_printf(fmt) +#define DBG udbg_printf#else -#define DBG(fmt...) do{if(0)printk(fmt);}while(0) +#define DBG pr_debug#endif static irqreturn_t ipi_function_handler (int irq,void *msg)
PATCH 10/33 PS3: Kexec support
In reply to a message not in the archiveFixup the core platform parts needed for kexec to work on the PS3.
- Setup ps3_hpte_clear correctly.
- Mask interrupts on irq removal.
- Release all hypervisor resources.
- Create new routine ps3_shutdown_IRQ()
---
o Fixed use of the ps3_kexec_cpu_down() 'secondary' arg.
arch/powerpc/platforms/ps3/htab.c | 13 ++++-- arch/powerpc/platforms/ps3/interrupt.c | 68 +++++++++++++++++++++++++-------- arch/powerpc/platforms/ps3/platform.h | 1 arch/powerpc/platforms/ps3/setup.c | 29 ++------------ arch/powerpc/platforms/ps3/smp.c | 2 5 files changed, 70 insertions(+), 43 deletions(-)
arch/powerpc/platforms/ps3/htab.c +10 -3
@@ -234,10 +234,17 @@ static void ps3_hpte_invalidate(unsignedstatic void ps3_hpte_clear (void ) { -/* Make sure to clean up the frame buffer device first */ -ps3fb_cleanup (); +int result; -lv1_unmap_htab (htab_addr); +DBG (" -> %s:%d\n" , __func__, __LINE__); + + result =lv1_unmap_htab (htab_addr); +BUG_ON (result); + +ps3_mm_shutdown (); +ps3_mm_vas_destroy (); + +DBG (" <- %s:%d\n" , __func__, __LINE__); }void __init ps3_hpte_init (unsigned long htab_size)
arch/powerpc/platforms/ps3/interrupt.c +53 -15
143 lines not on this page · raw message
arch/powerpc/platforms/ps3/platform.h +1 -0
@@ -41,6 +41,7 @@ void ps3_mm_shutdown(void);/* irq */ void ps3_init_IRQ (void ); +void ps3_shutdown_IRQ (int cpu);void __init ps3_register_ipi_debug_brk (unsigned int cpu,unsigned int virq);/* smp */
arch/powerpc/platforms/ps3/setup.c +5 -24
@@ -209,31 +209,12 @@ static int __init ps3_probe(void)#if defined(CONFIG_KEXEC )static void ps3_kexec_cpu_down (int crash_shutdown,int secondary) { -DBG (" -> %s:%d\n" , __func__, __LINE__); +int cpu =smp_processor_id (); -if (secondary) { -int cpu; -for_each_online_cpu (cpu) -if (cpu) -ps3_smp_cleanup_cpu (cpu); - }else -ps3_smp_cleanup_cpu (0 ); +DBG (" -> %s:%d: (%d)\n" , __func__, __LINE__, cpu); -DBG (" <- %s:%d\n" , __func__, __LINE__); -} - -static void ps3_machine_kexec (struct kimage *image) -{ -unsigned long ppe_id; - -DBG (" -> %s:%d\n" , __func__, __LINE__); - -lv1_get_logical_ppe_id (&ppe_id); -lv1_configure_irq_state_bitmap (ppe_id,0 ,0 ); -ps3_mm_shutdown (); -ps3_mm_vas_destroy (); - -default_machine_kexec (image); +ps3_smp_cleanup_cpu (cpu); +ps3_shutdown_IRQ (cpu);DBG (" <- %s:%d\n" , __func__, __LINE__); }
@@ -255,7 +236,7 @@ define_machine(ps3) { .power_off = ps3_power_off,#if defined(CONFIG_KEXEC ) .kexec_cpu_down = ps3_kexec_cpu_down, - .machine_kexec = ps3_machine_kexec, + .machine_kexec = default_machine_kexec, .machine_kexec_prepare = default_machine_kexec_prepare, .machine_crash_shutdown = default_machine_crash_shutdown,#endif
arch/powerpc/platforms/ps3/smp.c +1 -1
@@ -138,7 +138,7 @@ void ps3_smp_cleanup_cpu(int cpu)DBG (" -> %s:%d: (%d)\n" , __func__, __LINE__, cpu);for (i =0 ; i <MSG_COUNT ; i++) { -free_irq (virqs[i], (void *)(long )i); +/* Can't call free_irq from interrupt context. */ ps3_event_receive_port_destroy (virqs[i]); virqs[i] =NO_IRQ ; }
PATCH 11/33 PS3: System-bus rework
In reply to a message not in the archiveRework the PS3 system bus to unify device support.
- DMA region sizes must be a power of two
- storage bus DMA updates:
- Small fixes for the PS3 DMA core:
o fix alignment bug
o kill superfluous test
o indentation
o spelling
o export ps3_dma_region_{create,free}()
- ps3_dma_region_init():
o Add addr' and len' parameters, so you can create a DMA region that does not cover all memory (use NULL' and 0' to cover all memory). This is needed because there are not sufficient IOMMU resources to have all DMA regions cover all memory.
o Uninline
- Added remove and shutdown routines to all drivers.
- Added loadable module support to all drivers.
- Added HV calls for iopte management (needed by sound driver).
--- arch/powerpc/platforms/ps3/interrupt.c | 24 - arch/powerpc/platforms/ps3/mm.c | 618 ++++++++++++++++++++++++++------ arch/powerpc/platforms/ps3/platform.h | 11 arch/powerpc/platforms/ps3/system-bus.c | 533 +++++++++++++++++++++++---- include/asm-powerpc/lv1call.h | 3 include/asm-powerpc/ps3.h | 148 +++++-- 6 files changed, 1087 insertions(+), 250 deletions(-)
arch/powerpc/platforms/ps3/interrupt.c +11 -13
@@ -400,17 +400,15 @@ int ps3_send_event_locally(unsigned int* ps3_sb_event_receive_port_setup - Setup a system bus event receive port. * @cpu: enum ps3_cpu_binding indicating the cpu the interrupt should be * serviced on. -* @did: The HV device identifier read from the system repository. -* @interrupt_id: The device interrupt id read from the system repository. +* @dev: The system bus device instance. * @virq: The assigned Linux virq. * * An event irq represents a virtual device interrupt. The interrupt_id * coresponds to the software interrupt number. */ -int ps3_sb_event_receive_port_setup (enum ps3_cpu_binding cpu, -const struct ps3_device_id *did,unsigned int interrupt_id, -unsigned int *virq) +int ps3_sb_event_receive_port_setup (struct ps3_system_bus_device *dev, +enum ps3_cpu_binding cpu,unsigned int *virq) {/* this should go in system-bus.c */
@@ -421,8 +419,8 @@ int ps3_sb_event_receive_port_setup(enumif (result)return result; - result =lv1_connect_interrupt_event_receive_port (did->bus_id, - did->dev_id,virq_to_hw (*virq), interrupt_id); + result =lv1_connect_interrupt_event_receive_port (dev->bus_id, + dev->dev_id,virq_to_hw (*virq), dev->interrupt_id);if (result) { pr_debug("%s:%d: lv1_connect_interrupt_event_receive_port"
@@ -434,24 +432,24 @@ int ps3_sb_event_receive_port_setup(enum }pr_debug ("%s:%d: interrupt_id %u, virq %u\n" , __func__, __LINE__, - interrupt_id, *virq); + dev->interrupt_id, *virq);return 0 ; }EXPORT_SYMBOL (ps3_sb_event_receive_port_setup); -int ps3_sb_event_receive_port_destroy (const struct ps3_device_id *did, -unsigned int interrupt_id,unsigned int virq) +int ps3_sb_event_receive_port_destroy (struct ps3_system_bus_device *dev, +unsigned int virq) {/* this should go in system-bus.c */ int result;pr_debug (" -> %s:%d: interrupt_id %u, virq %u\n" , __func__, __LINE__, - interrupt_id, virq); + dev->interrupt_id, virq); - result =lv1_disconnect_interrupt_event_receive_port (did->bus_id, - did->dev_id,virq_to_hw (virq), interrupt_id); + result =lv1_disconnect_interrupt_event_receive_port (dev->bus_id, + dev->dev_id,virq_to_hw (virq), dev->interrupt_id);if (result) pr_debug("%s:%d: lv1_disconnect_interrupt_event_receive_port"
arch/powerpc/platforms/ps3/mm.c +512 -106
905 lines not on this page · raw message
arch/powerpc/platforms/ps3/platform.h +11 -0
@@ -83,6 +83,7 @@ enum ps3_dev_type {PS3_DEV_TYPE_STOR_ROM =TYPE_ROM ,/* 5 */ PS3_DEV_TYPE_SB_GPIO =6 ,PS3_DEV_TYPE_STOR_FLASH =TYPE_RBC ,/* 14 */ + PS3_DEV_TYPE_NOACCESS = 255, }; int ps3_repository_read_bus_str(unsigned int bus_index, const char *bus_str,
@@ -217,4 +218,14 @@ int ps3_repository_read_num_spu_resourceint ps3_repository_read_spu_resource_id (unsigned int res_index,enum ps3_spu_resource_type * resource_type,unsigned int *resource_id); +/* Page table entries */ +#define IOPTE_PP_W 0x8000000000000000ul/* protection: write */ +#define IOPTE_PP_R 0x4000000000000000ul/* protection: read */ +#define IOPTE_M 0x2000000000000000ul/* coherency required */ +#define IOPTE_SO_R 0x1000000000000000ul/* ordering: writes */ +#define IOPTE_SO_RW 0x1800000000000000ul/* ordering: r & w */ +#define IOPTE_RPN_Mask 0x07fffffffffff000ul/* RPN */ +#define IOPTE_H 0x0000000000000800ul/* cache hint */ +#define IOPTE_IOID_Mask 0x00000000000007fful/* ioid */ +#endif
arch/powerpc/platforms/ps3/system-bus.c +452 -81
730 lines not on this page · raw message
include/asm-powerpc/lv1call.h +3 -0
@@ -238,6 +238,7 @@ LV1_CALL(destruct_virtual_address_space, LV1_CALL(configure_irq_state_bitmap, 3, 0, 11 ) LV1_CALL(connect_irq_plug_ext, 5, 0, 12 ) LV1_CALL(release_memory, 1, 0, 13 ) +LV1_CALL(put_iopte, 5, 0, 15 ) LV1_CALL(disconnect_irq_plug_ext, 3, 0, 17 ) LV1_CALL(construct_event_receive_port, 0, 1, 18 )LV1_CALL (destruct_event_receive_port,1 ,0 ,19 )
@@ -268,6 +269,8 @@ LV1_CALL(remove_repository_node, LV1_CALL(read_htab_entries, 2, 5, 95 ) LV1_CALL(set_dabr, 2, 0, 96 ) LV1_CALL(get_total_execution_time, 2, 1, 103 ) +LV1_CALL(allocate_io_segment, 3, 1, 116 ) +LV1_CALL(release_io_segment, 2, 0, 117 ) LV1_CALL(construct_io_irq_outlet, 1, 1, 120 ) LV1_CALL(destruct_io_irq_outlet, 1, 0, 121 )LV1_CALL (map_htab,1 ,1 ,122 )
include/asm-powerpc/ps3.h +98 -50
253 lines not on this page · raw message
PATCH 12/33 PS3: System-bus uevent
In reply to a message not in the archiveFrom: David Woodhouse <[email protected]>
To allow userspace to automatically load modules, we need to hook up uevent for ps3_system_bus devices. I've used the form 'ps3:%d' with the ps3_match_id, since that's what we use for matching drivers.
---
o Fixed WS.
arch/powerpc/platforms/ps3/system-bus.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
arch/powerpc/platforms/ps3/system-bus.c +16 -0
@@ -437,9 +437,25 @@ static void ps3_system_bus_shutdown(strudev_dbg (&dev->core," <- %s:%d\n" , __func__, __LINE__); } +static int ps3_system_bus_uevent (struct device *_dev,char **envp, +int num_envp,char *buffer,int buffer_size) +{ +struct ps3_system_bus_device *dev =ps3_dev_to_system_bus_dev (_dev); +int i =0 , length =0 ; + +if (add_uevent_var (envp, num_envp, &i, buffer, buffer_size, + &length,"MODALIAS=ps3:%d" , + dev->match_id)) +return -ENOMEM ; + + envp[i] =NULL ; +return 0 ; +} +struct bus_type ps3_system_bus_type = { .name ="ps3_system_bus" , .match = ps3_system_bus_match, + .uevent = ps3_system_bus_uevent, .probe = ps3_system_bus_probe, .remove = ps3_system_bus_remove, .shutdown = ps3_system_bus_shutdown,
PATCH 13/33 PS3: System-bus modinfo attribute
In reply to a message not in the archiveFrom: David Woodhouse <[email protected]>
Add modinfo attribute to ps3_system_bus devices. Also make them all children of the same ps3_system_bus 'device' so they appear in a corresponding subdirectory under /sys/devices
---
o Fixed WS.
arch/powerpc/platforms/ps3/system-bus.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/powerpc/platforms/ps3/system-bus.c +15 -0
@@ -452,6 +452,20 @@ static int ps3_system_bus_uevent(structreturn 0 ; } +static ssize_t modalias_show (struct device *_dev,struct device_attribute *a, +char *buf) +{ +struct ps3_system_bus_device *dev =ps3_dev_to_system_bus_dev (_dev); +int len =snprintf (buf,PAGE_SIZE ,"ps3:%d\n" , dev->match_id); + +return (len >=PAGE_SIZE ) ? (PAGE_SIZE -1 ) : len; +} + +static struct device_attribute ps3_system_bus_dev_attrs[] = { +__ATTR_RO (modalias), + __ATTR_NULL, +}; +struct bus_type ps3_system_bus_type = { .name ="ps3_system_bus" , .match = ps3_system_bus_match,
@@ -459,6 +473,7 @@ struct bus_type ps3_system_bus_type = { .probe = ps3_system_bus_probe, .remove = ps3_system_bus_remove, .shutdown = ps3_system_bus_shutdown, + .dev_attrs = ps3_system_bus_dev_attrs, };static int __init ps3_system_bus_init (void )
PATCH 14/33 PS3: Repository probe cleanups
In reply to a message not in the archiveRepository updates:
- Extract ps3_repository_find_bus() from ps3_repository_find_device(), as the storage driver needs it.
- Make ps3_repository_find_device() return -ENODEV if a device is not found, just like if a bus is not found.
- Add ps3_repository_read_vuart_sysmgr_port() and ps3_repository_read_vuart_av_port() to get vuart port info.
- Add device enumeration routines ps3_repository_find_device() and ps3_repository_find_devices().
- Cleanup debug routines.
--- arch/powerpc/platforms/ps3/platform.h | 31 + arch/powerpc/platforms/ps3/repository.c | 592 +++++++++++++++++--------------- 2 files changed, 340 insertions(+), 283 deletions(-)
arch/powerpc/platforms/ps3/platform.h +20 -11
@@ -131,24 +131,28 @@ int ps3_repository_read_dev_reg(unsigned/* repository bus enumerators */ struct ps3_repository_device { +enum ps3_bus_type bus_type;unsigned int bus_index; +unsigned int bus_id; +enum ps3_dev_type dev_type;unsigned int dev_index; -struct ps3_device_id did; +unsigned int dev_id; }; -int ps3_repository_find_device (enum ps3_bus_type bus_type, -enum ps3_dev_type dev_type, -const struct ps3_repository_device *start_dev, -struct ps3_repository_device *dev); -static inline int ps3_repository_find_first_device ( -enum ps3_bus_type bus_type,enum ps3_dev_type dev_type, -struct ps3_repository_device *dev) +static inline struct ps3_repository_device *ps3_repository_bump_device ( +struct ps3_repository_device *repo) { -return ps3_repository_find_device (bus_type, dev_type,NULL , dev); + repo->dev_index++; +return repo; } -int ps3_repository_find_interrupt (const struct ps3_repository_device *dev, +int ps3_repository_find_device (struct ps3_repository_device *repo); +int ps3_repository_find_devices (enum ps3_bus_type bus_type, +int (*callback)(const struct ps3_repository_device *repo)); +int ps3_repository_find_bus (enum ps3_bus_type bus_type,unsigned int from, +unsigned int *bus_index); +int ps3_repository_find_interrupt (const struct ps3_repository_device *repo,enum ps3_interrupt_type intr_type,unsigned int *interrupt_id); -int ps3_repository_find_reg (const struct ps3_repository_device *dev, +int ps3_repository_find_reg (const struct ps3_repository_device *repo,enum ps3_reg_type reg_type,u64 *bus_addr,u64 *len);/* repository block device info */
@@ -218,6 +222,11 @@ int ps3_repository_read_num_spu_resourceint ps3_repository_read_spu_resource_id (unsigned int res_index,enum ps3_spu_resource_type * resource_type,unsigned int *resource_id); +/* repository vuart info */ + +int ps3_repository_read_vuart_av_port (unsigned int *port); +int ps3_repository_read_vuart_sysmgr_port (unsigned int *port); +/* Page table entries */ #define IOPTE_PP_W 0x8000000000000000ul/* protection: write */ #define IOPTE_PP_R 0x4000000000000000ul/* protection: read */
arch/powerpc/platforms/ps3/repository.c +320 -272
690 lines not on this page · raw message
PATCH 15/33 PS3: Vuart rework
In reply to a message not in the archivePS3 vuart updates to reflect the new PS3 unified device support.
- Move vuart devices to the PS3 system bus.
- Replace use of ps3_vuart_port_device with ps3_system_bus_device.
- Make the PS3 vuart bus driver a loadable module.
- Add remove() and shutdown() routines.
- Move ps3_vuart_work into ps3_vuart_port_priv.tx_list.
- Remove redundant spinlock ps3_vuart_work.lock.
- No longer free ps3_vuart_port_device.priv on shutdown.
- Cleanup Kconfig defs.
- Export symbols needed for modular port drivers.
- Arrange to use port numbers found in repository.
- Fix bugs in ps3_vuart_read_async() and polled reading
- Cleanup handling of shared interrupt with ps3_vuart_bus_interrupt_get() and ps3_vuart_bus_interrupt_put()
- Add more comments to vuart.c.
--- arch/powerpc/platforms/ps3/Kconfig | 21 arch/powerpc/platforms/ps3/interrupt.c | 2 drivers/ps3/vuart.c | 813 +++++++++++++++++++-------------- drivers/ps3/vuart.h | 71 -- include/asm-powerpc/ps3.h | 17 5 files changed, 520 insertions(+), 404 deletions(-)
arch/powerpc/platforms/ps3/Kconfig +8 -13
@@ -73,18 +73,12 @@ config PS3_USE_LPAR_ADDR config PS3_VUART depends on PPC_PS3 - bool "PS3 Virtual UART support" if PS3_ADVANCED - default y - help - Include support for the PS3 Virtual UART. - - This support is required for several system services - including the System Manager and AV Settings. In - general, all users will say Y. + tristate config PS3_PS3AV + depends on PPC_PS3 tristate "PS3 AV settings driver" if PS3_ADVANCED - depends on PS3_VUART + select PS3_VUART default y help Include support for the PS3 AV Settings driver.
@@ -93,13 +87,14 @@ config PS3_PS3AV general, all users will say Y or M. config PS3_SYS_MANAGER - bool "PS3 System Manager driver" if PS3_ADVANCED - depends on PS3_VUART - default y + depends on PPC_PS3 + tristate "PS3 System Manager driver" if PS3_ADVANCED + select PS3_VUART + default m help Include support for the PS3 System Manager. This support is required for system control. In - general, all users will say Y. + general, all users will say Y or M. endmenu
arch/powerpc/platforms/ps3/interrupt.c +2 -0
@@ -564,6 +564,7 @@ int ps3_vuart_irq_setup(enum ps3_cpu_binreturn result; } +EXPORT_SYMBOL_GPL (ps3_vuart_irq_setup);int ps3_vuart_irq_destroy (unsigned int virq) {
@@ -583,6 +584,7 @@ int ps3_vuart_irq_destroy(unsigned int vreturn result; } +EXPORT_SYMBOL_GPL (ps3_vuart_irq_destroy);/** * ps3_spe_irq_setup - Setup an spe virq.
drivers/ps3/vuart.c +487 -326
1,294 lines not on this page · raw message
drivers/ps3/vuart.h +23 -48
98 lines not on this page · raw message
include/asm-powerpc/ps3.h +0 -17
@@ -407,23 +407,6 @@ static inline void *ps3_system_bus_get_dextern struct bus_type ps3_system_bus_type; -/* vuart routines */ - -struct ps3_vuart_port_priv ; - -/** -* struct ps3_vuart_port_device - a device on a vuart port -*/ - -struct ps3_vuart_port_device { -enum ps3_match_id match_id; -struct device core; -struct ps3_vuart_port_priv * priv;/* private driver variables */ - -}; - -int ps3_vuart_port_device_register (struct ps3_vuart_port_device *dev); -/* system manager */ #ifdef CONFIG_PS3_SYS_MANAGER
PATCH 16/33 PS3: System manager re-work
In reply to a message not in the archivePS3 sys-manager updates to reflect the new PS3 unifed device support. Fixups to the PS3 sys-manager driver to properly support sys_reboot().
- Add varable request_tag to struct ps3_sys_manager_header.
- Move ctrl_alt_del from PS3_SM_EVENT_POWER_RELEASED to PS3_SM_EVENT_POWER_PRESSED.
- Make the PS3 sys-manager driver a loadable module.
- Add new file sys-manager-core.c.
- Add new struct ps3_sys_manager_ops for dynamic binding.
- Put data sent to device on stack.
- Add support for PS3_SM_SERVICE_ID_REQUEST_ERROR.
--- drivers/ps3/Makefile | 1 drivers/ps3/sys-manager-core.c | 68 +++++++++ drivers/ps3/sys-manager.c | 290 +++++++++++++++++++++++++++-------------- include/asm-powerpc/ps3.h | 15 +- 4 files changed, 269 insertions(+), 105 deletions(-)
drivers/ps3/Makefile +1 -0
@@ -1,3 +1,4 @@ obj-$(CONFIG_PS3_VUART) += vuart.o obj-$(CONFIG_PS3_PS3AV) += ps3av.o ps3av_cmd.o +obj-$(CONFIG_PPC_PS3) += sys-manager-core.o obj-$(CONFIG_PS3_SYS_MANAGER) += sys-manager.o
drivers/ps3/sys-manager-core.c new file +68 -0
68 lines not on this page · raw message
drivers/ps3/sys-manager.c +191 -99
516 lines not on this page · raw message
include/asm-powerpc/ps3.h +9 -6
@@ -409,13 +409,15 @@ extern struct bus_type ps3_system_bus_ty/* system manager */ -#ifdef CONFIG_PS3_SYS_MANAGER -void ps3_sys_manager_restart (void ); +struct ps3_sys_manager_ops { +struct ps3_system_bus_device *dev; +void (*power_off)(struct ps3_system_bus_device *dev); +void (*restart)(struct ps3_system_bus_device *dev); +}; + +void ps3_sys_manager_register_ops (const struct ps3_sys_manager_ops *ops);void ps3_sys_manager_power_off (void ); -#else -static inline void ps3_sys_manager_restart (void ) {} -static inline void ps3_sys_manager_power_off (void ) {} -#endif +void ps3_sys_manager_restart (void );struct ps3_prealloc {const char *name;
@@ -426,4 +428,5 @@ struct ps3_prealloc {extern struct ps3_prealloc ps3fb_videomemory; +#endif
PATCH 17/33 PS3: Rework AV settings driver
In reply to a message not in the archiveMake the PS3 ps3av driver a loadable module.
- Replace static data with kmalloc()'ed.
o Allocate struct ps3av dynamically, as it contains data used as vuart receive/transmit buffers
o Move static recv_buf from ps3av_do_pkt() to struct ps3av
- Move ps3av_vuart_{read,write}() from drivers/ps3/ps3av_cmd.c to drivers/ps3/ps3av.c and make them static as they're used in that file only.
- Make device a PS3 system-bus device.
- Update copyright formatting.
- Make two new routines ps3av_register_flip_ctl() and ps3av_flip_ctl() to support late binding of the frame buffer flip control routine.
--- drivers/ps3/Makefile | 3 drivers/ps3/ps3av.c | 372 +++++++++++++++++++++++--------------------- drivers/ps3/ps3av_cmd.c | 35 ---- include/asm-powerpc/ps3av.h | 36 ++-- 4 files changed, 220 insertions(+), 226 deletions(-)
drivers/ps3/Makefile +2 -1
@@ -1,4 +1,5 @@ obj-$(CONFIG_PS3_VUART) += vuart.o -obj-$(CONFIG_PS3_PS3AV) += ps3av.o ps3av_cmd.o +obj-$(CONFIG_PS3_PS3AV) += ps3av_mod.o +ps3av_mod-objs += ps3av.o ps3av_cmd.o obj-$(CONFIG_PPC_PS3) += sys-manager-core.o obj-$(CONFIG_PS3_SYS_MANAGER) += sys-manager.o
drivers/ps3/ps3av.c +198 -174
734 lines not on this page · raw message
drivers/ps3/ps3av_cmd.c +2 -33
@@ -868,7 +868,7 @@ int ps3av_cmd_avb_param(struct ps3av_pkt {int res; -ps3fb_flip_ctl (0 );/* flip off */ +ps3av_flip_ctl (0 );/* flip off */ /* avb packet */ res = ps3av_do_pkt(PS3AV_CID_AVB_PARAM, send_len, sizeof(*avb),
@@ -882,7 +882,7 @@ int ps3av_cmd_avb_param(struct ps3av_pkt res); out: -ps3fb_flip_ctl (1 );/* flip on */ +ps3av_flip_ctl (1 );/* flip on */ return res; }
@@ -1003,34 +1003,3 @@ void ps3av_cmd_av_monitor_info_dump(cons | PS3AV_CMD_AV_LAYOUT_176 \ | PS3AV_CMD_AV_LAYOUT_192) -/************************* vuart ***************************/ - -#define POLLING_INTERVAL 25/* in msec */ - -int ps3av_vuart_write (struct ps3_vuart_port_device *dev,const void *buf, -unsigned long size) -{ -int error =ps3_vuart_write (dev, buf, size); -return error ? error : size; -} - -int ps3av_vuart_read (struct ps3_vuart_port_device *dev,void *buf, -unsigned long size,int timeout) -{ -int error; -int loopcnt =0 ; - - timeout = (timeout +POLLING_INTERVAL -1 ) /POLLING_INTERVAL ; -while (loopcnt++ <= timeout) { - error =ps3_vuart_read (dev, buf, size); -if (!error) -return size; -if (error != -EAGAIN ) { -printk (KERN_ERR "%s: ps3_vuart_read failed %d\n" , - __func__, error); -return error; - } -msleep (POLLING_INTERVAL ); - } -return -EWOULDBLOCK ; -}
include/asm-powerpc/ps3av.h +18 -18
@@ -1,20 +1,23 @@/* -* Copyright (C) 2006 Sony Computer Entertainment Inc. -* Copyright 2006, 2007 Sony Corporation +* PS3 AV backend support. * -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published -* by the Free Software Foundation; version 2 of the License. +* Copyright (C) 2007 Sony Computer Entertainment Inc. +* Copyright 2007 Sony Corp. * -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; version 2 of the License. * -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#ifndef _ASM_POWERPC_PS3AV_H_#define _ASM_POWERPC_PS3AV_H_
@@ -704,12 +707,6 @@ static inline void ps3av_cmd_av_monitor_extern int ps3av_cmd_video_get_monitor_info (struct ps3av_pkt_av_get_monitor_info *,u32 ); -struct ps3_vuart_port_device ; -extern int ps3av_vuart_write (struct ps3_vuart_port_device *dev, -const void *buf,unsigned long size); -extern int ps3av_vuart_read (struct ps3_vuart_port_device *dev,void *buf, -unsigned long size,int timeout); -extern int ps3av_set_video_mode (u32 ,int );extern int ps3av_set_audio_mode (u32 ,u32 ,u32 ,u32 ,u32 );extern int ps3av_get_auto_mode (int );
@@ -722,5 +719,8 @@ extern int ps3av_video_mute(int);extern int ps3av_audio_mute (int );extern int ps3av_dev_open (void );extern int ps3av_dev_close (void ); +extern void ps3av_register_flip_ctl (void (*flip_ctl)(int on,void *data), +void *flip_data); +extern void ps3av_flip_ctl (int on);#endif /* _ASM_POWERPC_PS3AV_H_ */
PATCH 18/33 PS3: Frame buffer system-bus rework
In reply to a message not in the archiveFrom: Geert Uytterhoeven <[email protected]>
Convert the ps3fb device from a platform device to a PS3 system bus device. Fix the remove and shutdown methods to support kexec and to make ps3fb a loadable module.
--- arch/powerpc/platforms/ps3/setup.c | 9 - drivers/video/Kconfig | 4 drivers/video/ps3fb.c | 290 ++++++++++++++++--------------------- include/asm-powerpc/ps3fb.h | 12 - 4 files changed, 134 insertions(+), 181 deletions(-)
arch/powerpc/platforms/ps3/setup.c +5 -4
@@ -107,7 +107,7 @@ static void ps3_panic(char *str)while (1 ); } -#ifdef CONFIG_FB_PS3 +#if defined(CONFIG_FB_PS3 ) || defined(CONFIG_FB_PS3_MODULE )static void prealloc (struct ps3_prealloc *p) {if (!p->size)
@@ -125,10 +125,11 @@ static void prealloc(struct ps3_prealloc }struct ps3_prealloc ps3fb_videomemory = { - .name ="ps3fb videomemory" , - .size =CONFIG_FB_PS3_DEFAULT_SIZE_M *1024 *1024 , - .align =1024 *1024 /* the GPU requires 1 MiB alignment */ + .name ="ps3fb videomemory" , + .size =CONFIG_FB_PS3_DEFAULT_SIZE_M *1024 *1024 , + .align =1024 *1024 /* the GPU requires 1 MiB alignment */ }; +EXPORT_SYMBOL_GPL (ps3fb_videomemory);#define prealloc_ps3fb_videomemory () prealloc(&ps3fb_videomemory)static int __init early_parse_ps3fb (char *p)
drivers/video/Kconfig +2 -2
@@ -1790,8 +1790,8 @@ config FB_IBM_GXT4500 adaptor, found on some IBM System P (pSeries) machines. config FB_PS3 - bool "PS3 GPU framebuffer driver" - depends on (FB = y) && PS3_PS3AV + tristate "PS3 GPU framebuffer driver" + depends on FB && PS3_PS3AV select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT
drivers/video/ps3fb.c +127 -163
445 lines not on this page · raw message
include/asm-powerpc/ps3fb.h +0 -12
@@ -41,16 +41,4 @@ struct ps3fb_ioctl_res { __u32 num_frames; /* num of frame buffers */ }; -#ifdef __KERNEL__ - -#ifdef CONFIG_FB_PS3 -extern void ps3fb_flip_ctl (int on); -extern void ps3fb_cleanup (void ); -#else -static inline void ps3fb_flip_ctl (int on) {} -static inline void ps3fb_cleanup (void ) {} -#endif - -#endif /* __KERNEL__ */ -#endif /* _ASM_POWERPC_PS3FB_H_ */
Re: [patch 18/33] PS3: Frame buffer system-bus rework
Quoted 5 lines · Geoff Levand
From: Geert Uytterhoeven <[email protected]>
Convert the ps3fb device from a platform device to a PS3 system bus device. Fix the remove and shutdown methods to support kexec and to make ps3fb a loadable module.
Are you going to submit this to the fb maintainer (Antonio Daplas?) or do you want me to take it because of dependencies on other patches in your series?
Paul.
Re: [patch 18/33] PS3: Frame buffer system-bus rework
Hi Paul,
Quoted 10 lines · Paul Mackerras
Quoted 5 lines · Geoff Levand
From: Geert Uytterhoeven <[email protected]>
Convert the ps3fb device from a platform device to a PS3 system bus device. Fix the remove and shutdown methods to support kexec and to make ps3fb a loadable module.
Are you going to submit this to the fb maintainer (Antonio Daplas?) or do you want me to take it because of dependencies on other patches in your series?
I think it's best if you take it, since the changes to ps3fb depend on the PS3 system bus device core changes.
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453 Fax: +32 (0)2 700 8622 E-mail: [email protected] Internet: http://www.sony-europe.com/
Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V. Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619
Re: [patch 18/33] PS3: Frame buffer system-bus rework
In reply to Paul Mackerras-----Original Message-----
From: Paul Mackerras [mailto:[email protected]]
Sent: Mon 6/18/2007 11:47 PM
To: Levand, Geoffrey
Cc: [email protected]; [email protected]; = Geert Uytterhoeven
Subject: Re: [patch 18/33] PS3: Frame buffer system-bus rework =20
Quoted 3 lines · Geoff Levand
From: Geert Uytterhoeven <[email protected]> =20
Convert the ps3fb device from a platform device to a PS3 system bus =
device.
Quoted 1 line
Fix the remove and shutdown methods to support kexec and to make ps3fb =
a
Quoted 1 line
loadable module.
Are you going to submit this to the fb maintainer (Antonio Daplas?) or do you want me to take it because of dependencies on other patches in your series?
Hi Paul,
Sorry for the delay, and this formatting. I am away on holiday, with just a crappy Web browser interface...
I was hoping you could take it, as it fits in with the series, and touches my platform code. Thanks.
-Geoff
PATCH 19/33 PS3: Device registration routines.
In reply to a message not in the archiveAdd routines to probe devices present on the system and to register those devices with the LDM.
---
o Fixed __init and __devinit markers.
arch/powerpc/platforms/ps3/Makefile | 1 arch/powerpc/platforms/ps3/device-init.c | 499 +++++++++++++++++++++++++++++++ 2 files changed, 500 insertions(+)
arch/powerpc/platforms/ps3/Makefile +1 -0
@@ -4,3 +4,4 @@ obj-y += system-bus.o obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_SPU_BASE) += spu.o +obj-y += device-init.o
arch/powerpc/platforms/ps3/device-init.c new file +499 -0
499 lines not on this page · raw message
PATCH 20/33 PS3: Rename processor id symbols
In reply to a message not in the archiveRename the PS3 static symbols node to ppe_id and cpu to thread_id to clarify usage.
--- arch/powerpc/platforms/ps3/interrupt.c | 55 +++++++++++++++++---------------- 1 file changed, 29 insertions(+), 26 deletions(-)
arch/powerpc/platforms/ps3/interrupt.c +29 -26
@@ -78,14 +78,14 @@ struct ps3_bmp {/** * struct ps3_private - a per cpu data structure * @bmp: ps3_bmp structure -* @node: HV logical_ppe_id -* @cpu: HV thread_id +* @ppe_id: HV logical_ppe_id +* @thread_id: HV thread_id */ struct ps3_private {struct ps3_bmp bmp __attribute__ ((aligned (PS3_BMP_MINALIGN ))); -u64 node; -unsigned int cpu; +u64 ppe_id; +u64 thread_id; }; static DEFINE_PER_CPU(struct ps3_private, ps3_private);
@@ -105,7 +105,8 @@ static void ps3_chip_mask(unsigned int vu64 old;unsigned long flags; -pr_debug ("%s:%d: cpu %u, virq %d\n" , __func__, __LINE__, pd->cpu, virq); +pr_debug ("%s:%d: thread_id %lu, virq %d\n" , __func__, __LINE__, + pd->thread_id, virq);local_irq_save (flags); asm volatile(
@@ -117,7 +118,7 @@ static void ps3_chip_mask(unsigned int v : "r" (bit), "r" (p) : "cc" ); -lv1_did_update_interrupt_mask (pd->node, pd->cpu); +lv1_did_update_interrupt_mask (pd->ppe_id, pd->thread_id);local_irq_restore (flags); }
@@ -136,7 +137,8 @@ static void ps3_chip_unmask(unsigned intu64 old;unsigned long flags; -pr_debug ("%s:%d: cpu %u, virq %d\n" , __func__, __LINE__, pd->cpu, virq); +pr_debug ("%s:%d: thread_id %lu, virq %d\n" , __func__, __LINE__, + pd->thread_id, virq);local_irq_save (flags); asm volatile(
@@ -148,7 +150,7 @@ static void ps3_chip_unmask(unsigned int : "r" (bit), "r" (p) : "cc" ); -lv1_did_update_interrupt_mask (pd->node, pd->cpu); +lv1_did_update_interrupt_mask (pd->ppe_id, pd->thread_id);local_irq_restore (flags); }
@@ -162,7 +164,7 @@ static void ps3_chip_unmask(unsigned intstatic void ps3_chip_eoi (unsigned int virq) {const struct ps3_private *pd =get_irq_chip_data (virq); -lv1_end_of_interrupt_ext (pd->node, pd->cpu, virq); +lv1_end_of_interrupt_ext (pd->ppe_id, pd->thread_id, virq); }/**
@@ -241,8 +243,8 @@ int ps3_virq_destroy(unsigned int virq) {const struct ps3_private *pd =get_irq_chip_data (virq); -pr_debug ("%s:%d: node %lu, cpu %d, virq %u\n" , __func__, __LINE__, - pd->node, pd->cpu, virq); +pr_debug ("%s:%d: ppe_id %lu, thread_id %lu, virq %u\n" , __func__, + __LINE__, pd->ppe_id, pd->thread_id, virq);set_irq_chip_data (virq,NULL );irq_dispose_mapping (virq);
@@ -278,7 +280,8 @@ int ps3_irq_plug_setup(enum ps3_cpu_bind/* Binds outlet to cpu + virq. */ - result =lv1_connect_irq_plug_ext (pd->node, pd->cpu, *virq, outlet,0 ); + result =lv1_connect_irq_plug_ext (pd->ppe_id, pd->thread_id, *virq, + outlet,0 );if (result) { pr_info("%s:%d: lv1_connect_irq_plug_ext failed: %s\n",
@@ -310,12 +313,12 @@ int ps3_irq_plug_destroy(unsigned int viint result;const struct ps3_private *pd =get_irq_chip_data (virq); -pr_debug ("%s:%d: node %lu, cpu %d, virq %u\n" , __func__, __LINE__, - pd->node, pd->cpu, virq); +pr_debug ("%s:%d: ppe_id %lu, thread_id %lu, virq %u\n" , __func__, + __LINE__, pd->ppe_id, pd->thread_id, virq);ps3_chip_mask (virq); - result =lv1_disconnect_irq_plug_ext (pd->node, pd->cpu, virq); + result =lv1_disconnect_irq_plug_ext (pd->ppe_id, pd->thread_id, virq);if (result) pr_info("%s:%d: lv1_disconnect_irq_plug_ext failed: %s\n",
@@ -657,8 +660,8 @@ static void _dump_bmp(struct ps3_privateunsigned long flags;spin_lock_irqsave (&pd->bmp.lock, flags); -_dump_64_bmp ("stat" , &pd->bmp.status, pd->cpu, func, line); -_dump_64_bmp ("mask" , &pd->bmp.mask, pd->cpu, func, line); +_dump_64_bmp ("stat" , &pd->bmp.status, pd->thread_id, func, line); +_dump_64_bmp ("mask" , &pd->bmp.mask, pd->thread_id, func, line);spin_unlock_irqrestore (&pd->bmp.lock, flags); }
@@ -669,7 +672,7 @@ static void __maybe_unused _dump_mask(stunsigned long flags;spin_lock_irqsave (&pd->bmp.lock, flags); -_dump_64_bmp ("mask" , &pd->bmp.mask, pd->cpu, func, line); +_dump_64_bmp ("mask" , &pd->bmp.mask, pd->thread_id, func, line); spin_unlock_irqrestore(&pd->bmp.lock, flags); }#else
@@ -722,8 +725,8 @@ static unsigned int ps3_get_irq(void) plug &=0x3f ;if (unlikely (plug) ==NO_IRQ ) { -pr_debug ("%s:%d: no plug found: cpu %u\n" , __func__, __LINE__, - pd->cpu); +pr_debug ("%s:%d: no plug found: thread_id %lu\n" , __func__, + __LINE__, pd->thread_id);dump_bmp (&per_cpu (ps3_private,0 ));dump_bmp (&per_cpu (ps3_private,1 ));return NO_IRQ ;
@@ -753,16 +756,16 @@ void __init ps3_init_IRQ(void)for_each_possible_cpu (cpu) {struct ps3_private *pd = &per_cpu (ps3_private, cpu); -lv1_get_logical_ppe_id (&pd->node); - pd->cpu =get_hard_smp_processor_id (cpu); +lv1_get_logical_ppe_id (&pd->ppe_id); + pd->thread_id =get_hard_smp_processor_id (cpu);spin_lock_init (&pd->bmp.lock); -pr_debug ("%s:%d: node %lu, cpu %d, bmp %lxh\n" , __func__, - __LINE__, pd->node, pd->cpu, +pr_debug ("%s:%d: ppe_id %lu, thread_id %lu, bmp %lxh\n" , + __func__, __LINE__, pd->ppe_id, pd->thread_id,ps3_mm_phys_to_lpar (__pa (&pd->bmp))); - result =lv1_configure_irq_state_bitmap (pd->node, pd->cpu, -ps3_mm_phys_to_lpar (__pa (&pd->bmp))); + result =lv1_configure_irq_state_bitmap (pd->ppe_id, + pd->thread_id,ps3_mm_phys_to_lpar (__pa (&pd->bmp)));if (result) pr_debug("%s:%d: lv1_configure_irq_state_bitmap failed:"
PATCH 21/33 PS3: Use clear_bit
In reply to a message not in the archiveReplace the inline asm with bitops in the PS3 interrupt chip mask routines.
--- arch/powerpc/platforms/ps3/interrupt.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-)
arch/powerpc/platforms/ps3/interrupt.c +2 -24
@@ -100,24 +100,13 @@ static DEFINE_PER_CPU(struct ps3_privatestatic void ps3_chip_mask (unsigned int virq) {struct ps3_private *pd =get_irq_chip_data (virq); -u64 bit =0x8000000000000000UL >> virq; -u64 *p = &pd->bmp.mask; -u64 old;unsigned long flags;pr_debug ("%s:%d: thread_id %lu, virq %d\n" , __func__, __LINE__, pd->thread_id, virq);local_irq_save (flags); - asmvolatile ( -"1: ldarx %0,0,%3\n" -"andc %0,%0,%2\n" -"stdcx. %0,0,%3\n" -"bne- 1b" - :"=&r" (old),"+m" (*p) - :"r" (bit),"r" (p) - :"cc" ); - +clear_bit (63 - virq, &pd->bmp.mask);lv1_did_update_interrupt_mask (pd->ppe_id, pd->thread_id);local_irq_restore (flags); }
@@ -132,24 +121,13 @@ static void ps3_chip_mask(unsigned int vstatic void ps3_chip_unmask (unsigned int virq) {struct ps3_private *pd =get_irq_chip_data (virq); -u64 bit =0x8000000000000000UL >> virq; -u64 *p = &pd->bmp.mask; -u64 old;unsigned long flags;pr_debug ("%s:%d: thread_id %lu, virq %d\n" , __func__, __LINE__, pd->thread_id, virq);local_irq_save (flags); - asmvolatile ( -"1: ldarx %0,0,%3\n" -"or %0,%0,%2\n" -"stdcx. %0,0,%3\n" -"bne- 1b" - :"=&r" (old),"+m" (*p) - :"r" (bit),"r" (p) - :"cc" ); - +set_bit (63 - virq, &pd->bmp.mask);lv1_did_update_interrupt_mask (pd->ppe_id, pd->thread_id);local_irq_restore (flags); }
Re: [patch 21/33] PS3: Use clear_bit
Quoted 4 lines · Geoff Levand
Replace the inline asm with bitops in the PS3 interrupt chip mask routines.
Signed-off-by Geoff Levand <[email protected]>
PATCH 22/33 powerpc: Output params value in early_init_devtree
In reply to a message not in the archiveAdd a printout of the params value to early_init_devtree. This value is handy to have for comparison when debugging the bootwrapper code.
--- arch/powerpc/kernel/prom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/prom.c +1 -1
@@ -1005,7 +1005,7 @@ static void __init early_reserve_mem(voivoid __init early_init_devtree (void *params) { -DBG (" -> early_init_devtree()\n" ); +DBG (" -> early_init_devtree(%p)\n" , params);/* Setup flat device-tree pointer */ initial_boot_params = params;
PATCH 23/33 powerpc: Localize mmu_off
In reply to a message not in the archiveThis just removes the dependency __mmu_off has on the symbol __after_prom_start. I found the current code inconvenient when I wanted to put some debugging code between the call to __mmu_off and the branch to __after_prom_start.
--- arch/powerpc/kernel/head_64.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/powerpc/kernel/head_64.S +3 -1
@@ -1695,9 +1695,11 @@ _GLOBAL(__start_initialization_multiplat 2: /* Switch off MMU if not already */ - LOAD_REG_IMMEDIATE(r4, .__after_prom_start - KERNELBASE) + LOAD_REG_IMMEDIATE(r4, __mmu_off_return - KERNELBASE) add r4,r4,r30 bl .__mmu_off +__mmu_off_return: + b .__after_prom_start _STATIC(__boot_from_prom)
Re: [patch 23/33] powerpc: Localize mmu_off
Quoted 4 lines · Geoff Levand
This just removes the dependency
__mmu_offhas on the symbol__after_prom_start. I found the current code inconvenient when I wanted to put some debugging code between the call to__mmu_offand the branch to__after_prom_start.
You are entering this code with the mmu on?
My first thought was that is unexpected, but aparently Apple machines do that, so its supported for the master -- not the slaves.
Quoted 22 lines
Signed-off-by Geoff Levand <geoffrey.levand at am.sony.com>--- arch/powerpc/kernel/head_64.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)arch/powerpc/kernel/head_64.S +3
-1@@ -1695,9 +1695,11 @@ _GLOBAL(__start_initialization_multiplat 2: /* Switch off MMU if not already */ - LOAD_REG_IMMEDIATE(r4, .__after_prom_start - KERNELBASE) + LOAD_REG_IMMEDIATE(r4, __mmu_off_return - KERNELBASE) add r4,r4,r30 bl .__mmu_off +__mmu_off_return: + b .__after_prom_start _STATIC(__boot_from_prom)Signature · 1 line
--
That seems like a long label.
I could stand a 1: there (ie a local numeric label).
Hmm... how about always going directly there:
- bl .__mmu_off - b .__after_prom_start + mtlr r4 + b .__mmu_off
So that there is no space to add code that is skipped if the mmu was on?
milton
Re: [patch 23/33] powerpc: Localize mmu_off
Quoted 7 lines · Milton Miller
Quoted 4 lines · Geoff Levand
This just removes the dependency
__mmu_offhas on the symbol__after_prom_start. I found the current code inconvenient when I wanted to put some debugging code between the call to__mmu_offand the branch to__after_prom_start.You are entering this code with the mmu on?
No, mmu is off on PS3.
Quoted 3 lines
My first thought was that is unexpected, but aparently Apple machines do that, so its supported for the master -- not the slaves.
Yes, Apple enters with the mmu on.
Quoted 35 lines
Quoted 22 lines
Signed-off-by Geoff Levand <geoffrey.levand at am.sony.com>--- arch/powerpc/kernel/head_64.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)arch/powerpc/kernel/head_64.S +3
-1@@ -1695,9 +1695,11 @@ _GLOBAL(__start_initialization_multiplat 2: /* Switch off MMU if not already */ - LOAD_REG_IMMEDIATE(r4, .__after_prom_start - KERNELBASE) + LOAD_REG_IMMEDIATE(r4, __mmu_off_return - KERNELBASE) add r4,r4,r30 bl .__mmu_off +__mmu_off_return: + b .__after_prom_start _STATIC(__boot_from_prom)Signature · 1 line
--That seems like a long label.
I could stand a 1: there (ie a local numeric label).
Hmm... how about always going directly there:
(quoted diff) +2
-2- bl .__mmu_off - b .__after_prom_start + mtlr r4 + b .__mmu_off
Quoted 1 line
So that there is no space to add code that is skipped if the mmu was on?
This was intended to be a simple update. I think the existing code is OK, so I would prefer to just drop this patch for 2.6.23. Feel free to continue the effort.
-Geoff
Re: [patch 23/33] powerpc: Localize mmu_off
In reply to Geoff LevandQuoted 4 lines · Geoff Levand
This just removes the dependency
__mmu_offhas on the symbol__after_prom_start. I found the current code inconvenient when I wanted to put some debugging code between the call to__mmu_offand the branch to__after_prom_start.
So we do an extra unnecessary branch... I realize it doesn't really matter, but on the other hand, if you're hacking around with debug stuff, you can easily change __after_prom_start to the label where your debug code starts.
Paul.
Re: [patch 23/33] powerpc: Localize mmu_off
Quoted 11 lines · Paul Mackerras
Quoted 4 lines · Geoff Levand
This just removes the dependency
__mmu_offhas on the symbol__after_prom_start. I found the current code inconvenient when I wanted to put some debugging code between the call to__mmu_offand the branch to__after_prom_start.So we do an extra unnecessary branch... I realize it doesn't really matter, but on the other hand, if you're hacking around with debug stuff, you can easily change
__after_prom_startto the label where your debug code starts.
Sure, I don't really care about this one, so let's drop it.
-Geoff
PATCH 24/33 powerpc: Correct __secondary_hold comment
In reply to a message not in the archiveRemove references to pSeries and OpenFirmware in the __secondary_hold usage comment. __secondary_hold is a generic routine and can be used by other platforms.
--- arch/powerpc/kernel/head_64.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/kernel/head_64.S +2 -2
@@ -103,8 +103,8 @@ __secondary_hold_acknowledge: . = 0x60 /* - * The following code is used on pSeries to hold secondary processors - * in a spin loop after they have been freed from OpenFirmware, but + * The following code is used to hold secondary processors + * in a spin loop after they have entered the kernel, but * before the bulk of the kernel has been relocated. This code * is relocated to physical address 0x60 before prom_init is run. * All of it must fit below the first exception vector at 0x100.
Re: [patch 24/33] powerpc: Correct __secondary_hold comment
Quoted 3 lines · Geoff Levand
Remove references to pSeries and OpenFirmware in the
__secondary_holdusage comment.__secondary_holdis a generic routine and can be used by other platforms.
The comment is correct, just incomplete. Well, the part that you changed anyways. How about changing the subject to:
Expand comment for other uses of __secondary_hold.
Quoted 10 lines
Signed-off-by Geoff Levand <geoffrey.levand at am.sony.com>--- arch/powerpc/kernel/head_64.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/kernel/head_64.S __secondary_hold_acknowledge: · line 110
Quoted 10 lines
arch/powerpc/kernel/head_64.S +2
-2@@ -103,8 +103,8 @@ __secondary_hold_acknowledge: . = 0x60 /* - * The following code is used on pSeries to hold secondary processors - * in a spin loop after they have been freed from OpenFirmware, but + * The following code is used to hold secondary processors + * in a spin loop after they have entered the kernel, but * before the bulk of the kernel has been relocated. This code * is relocated to physical address 0x60 before prom_init is run. * All of it must fit below the first exception vector at 0x100.
I don't like the resulting wording. In particular, I don't like "after they have entered the kernel", as most of the kernel is not available to be entered. In addition, the unchanged part of the comment refers to relocating from offset 0x60-0x100 to address 0x60, but in fact offset 0x0-0x100 is placed at address 0 (0x60 is just the entry point), and its done from within prom_init not before.
How does this text sound?
This code starting at offset 0x60 is used to hold secondary processors before the kernel has been relocated to its linked address. Any platform or pre-boot environment may transfer secondary processors to the kernel by copying the first 0x100 bytes to address 0, and then instructing the secondary cpus to branch to address 0x60 after placing their hardware id (as specified by the device tree) in r3. When booting from OpenFirmware using the client interface, the copy is performed by the boot cpu in prom_init and then the start-cpu method is used to transfer the cpus to this loop. Although __secondary_hold_acknoledge is used serially to provide a positive handshake that each cpu has started, neither its address nor the protocol is considered part of the kernel entry ABI and should not be relied on by external code. The code and data for the secondary cpus must be contained in bytes 0x4 - 0x100, that is before the first exception vector and after at least one instruction for the master entrypoint.
milton
Re: [patch 24/33] powerpc: Correct __secondary_hold comment
Quoted 8 lines
How does this text sound?
This code starting at offset
0x60is used to hold secondary processors before the kernel has been relocated to its linked address. Any platform or pre-boot environment may transfer secondary processors to the kernel by copying the first0x100bytes to address 0, and then instructing the secondary cpus to branch to address0x60after placing their hardware id (as specified by the device tree) in r3.
I think it is a Really Bad Idea(tm) to make this part of the kernel ABI. Can't you just make the secondaries enter the kernel by jumping to the normal kernel entry point (with some flag set in some register I suppose)?
Segher
Re: [patch 24/33] powerpc: Correct __secondary_hold comment
In reply to Milton MillerQuoted 29 lines · Milton Miller
Quoted 3 lines · Geoff Levand
Remove references to pSeries and OpenFirmware in the
__secondary_holdusage comment.__secondary_holdis a generic routine and can be used by other platforms.The comment is correct, just incomplete. Well, the part that you changed anyways. How about changing the subject to:
Expand comment for other uses of
__secondary_hold.Quoted 19 lines
Signed-off-by Geoff Levand <geoffrey.levand at am.sony.com>--- arch/powerpc/kernel/head_64.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/powerpc/kernel/head_64.S +2
-2@@ -103,8 +103,8 @@ __secondary_hold_acknowledge: . = 0x60 /* - * The following code is used on pSeries to hold secondary processors - * in a spin loop after they have been freed from OpenFirmware, but + * The following code is used to hold secondary processors + * in a spin loop after they have entered the kernel, but * before the bulk of the kernel has been relocated. This code * is relocated to physical address 0x60 before prom_init is run. * All of it must fit below the first exception vector at 0x100.
Quoted 8 lines
Quoted 1 line
I don't like the resulting wording. In particular, I don't like "after they have entered the kernel", as most of the kernel is not available to be entered. In addition, the unchanged part of the comment refers to relocating from offset 0x60-0x100 to address
0x60, but in fact offset 0x0-0x100 is placed at address 0 (0x60is just the entry point), and its done from withinprom_initnot before.
This was intended to be a simple update to make the comment more accurate, not a quest to perfect it. I would prefer to just drop this patch for 2.6.23. Feel free to continue the effort.
-Geoff
PATCH 25/33 Powerpc: Add signed types to bootwrapper
In reply to a message not in the archiveAdd signed types to the powerpc zImage bootwrapper. These are needed by the PS3 hcall interface.
--- arch/powerpc/boot/types.h | 4 ++++ 1 file changed, 4 insertions(+)
arch/powerpc/boot/types.h +4 -0
@@ -7,6 +7,10 @@ typedef unsigned char u8;typedef unsigned short u16 ;typedef unsigned int u32 ;typedef unsigned long long u64 ; +typedef signed char s8 ; +typedef short s16 ; +typedef int s32 ; +typedef long long s64 ;#define min (x,y) ({ \ typeof(x) _x = (x); \
PATCH 26/33 Powerpc: Add u64 printf to bootwrapper
In reply to a message not in the archiveAdd support for the 'll' (long long) printf qualifier in the powerpc zImage bootwrapper. This is useful for bootwrapper debugging on 64 bit platforms.
--- arch/powerpc/boot/stdio.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
arch/powerpc/boot/stdio.c +9 -1
@@ -190,7 +190,11 @@ int vsprintf(char *buf, const char *fmt,/* get the conversion qualifier */ qualifier =-1 ; -if (*fmt =='h' || *fmt =='l' || *fmt =='L' || *fmt =='Z' ) { +if (*fmt =='l' && *(fmt +1 ) =='l' ) { + qualifier ='q' ; + fmt +=2 ; + }else if (*fmt =='h' || *fmt =='l' || *fmt =='L' + || *fmt =='Z' ) { qualifier = *fmt; ++fmt; }
@@ -281,6 +285,10 @@ int vsprintf(char *buf, const char *fmt, num = va_arg(args, unsigned long);if (flags &SIGN ) num = (signed long ) num; + }else if (qualifier =='q' ) { + num = va_arg(args, unsigned long long); +if (flags &SIGN ) + num = (signed long long ) num; }else if (qualifier =='Z' ) { num =va_arg (args, size_t); }else if (qualifier =='h' ) {
PATCH 27/33 Powerpc: Fix constantness of bootwrapper arg
In reply to a message not in the archiveFixes the constantness of the powerpc bootwrapper's console_ops.write routine. Allows writing of constant strings.
--- arch/powerpc/boot/of.c | 2 +- arch/powerpc/boot/ops.h | 2 +- arch/powerpc/boot/serial.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
arch/powerpc/boot/of.c +1 -1
@@ -261,7 +261,7 @@ static int of_console_open(void)return -1 ; } -static void of_console_write (char *buf,int len) +static void of_console_write (const char *buf,int len) {call_prom ("write" ,3 ,1 , of_stdout_handle, buf, len); }
arch/powerpc/boot/ops.h +1 -1
@@ -51,7 +51,7 @@ extern struct dt_ops dt_ops;/* Console operations */ struct console_ops {int (*open)(void ); -void (*write)(char *buf,int len); +void (*write)(const char *buf,int len);void (*edit_cmdline)(char *buf,int len);void (*close)(void );void *data;
arch/powerpc/boot/serial.c +1 -1
@@ -27,7 +27,7 @@ static int serial_open(void)return scdp->open (); } -static void serial_write (char *buf,int len) +static void serial_write (const char *buf,int len) {struct serial_console_data *scdp = console_ops.data;
PATCH 28/33 powerpc: Bootwrapper global scope kernel_entry_t.
In reply to a message not in the archiveFor the convenience of custom platform code make the powerpc bootwrapper typdef kernel_entry_t global in scope.
--- arch/powerpc/boot/main.c | 2 -- arch/powerpc/boot/ops.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/boot/main.c +0 -2
@@ -36,8 +36,6 @@ struct addr_range {unsigned long size; }; -typedef void (*kernel_entry_t )(unsigned long ,unsigned long ,void *); -#undef DEBUGstatic struct addr_range prep_kernel (void )
arch/powerpc/boot/ops.h +2 -0
@@ -19,6 +19,8 @@#define MAX_PATH_LEN 256#define MAX_PROP_LEN 256/* What should this be? */ +typedef void (*kernel_entry_t )(unsigned long r3,unsigned long r4,void *r5); +/* Platform specific operations */ struct platform_ops {void (*fixups)(void );
PATCH 29/33 PS3: Device tree source.
In reply to a message not in the archiveThe PS3 device tree source.
---
o After extended mail and IRC discussions, everyone aggreed on this one.
arch/powerpc/boot/dts/ps3.dts | 68 +++++++++++++++++++++++++++++++++++++ arch/powerpc/platforms/ps3/setup.c | 2 - 2 files changed, 69 insertions(+), 1 deletion(-)
arch/powerpc/boot/dts/ps3.dts new file +68 -0
@@ -0,0 +1,68 @@ +/* + * PS3 Game Console device tree. + * + * Copyright (C) 2007 Sony Computer Entertainment Inc. + * Copyright 2007 Sony Corp. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/ { + model = "SonyPS3"; + compatible = "sony,ps3"; + #size-cells = <2>; + #address-cells = <2>; + + chosen { + }; + + /* + * We'll get the size of the bootmem block from lv1 after startup, + * so we'll put a null entry here. + */ + + memory { + device_type = "memory"; + reg = <0 0 0 0>; + }; + + /* + * The boot cpu is always zero for PS3. + * + * dtc expects a clock-frequency and timebase-frequency entries, so + * we'll put a null entries here. These will be initialized after + * startup with data from lv1. + * + * Seems the only way currently to indicate a processor has multiple + * threads is with an ibm,ppc-interrupt-server#s entry. We'll put one + * here so we can bring up both of ours. See smp_setup_cpu_maps(). + */ + + cpus { + #size-cells = <0>; + #address-cells = <1>; + + cpu@0 { + device_type = "cpu"; + reg = <0>; + ibm,ppc-interrupt-server#s = <0 1>; + clock-frequency = <0>; + timebase-frequency = <0>; + i-cache-size = <8000>; + d-cache-size = <8000>; + i-cache-line-size = <80>; + d-cache-line-size = <80>; + }; + }; +};
arch/powerpc/platforms/ps3/setup.c +1 -1
@@ -193,7 +193,7 @@ static int __init ps3_probe(void)DBG (" -> %s:%d\n" , __func__, __LINE__); dt_root =of_get_flat_dt_root (); -if (!of_flat_dt_is_compatible (dt_root,"PS3" )) +if (!of_flat_dt_is_compatible (dt_root,"sony,ps3" ))return 0 ; powerpc_firmware_features |=FW_FEATURE_PS3_POSSIBLE ;
Re: [patch 29/33] PS3: Device tree source.
Quoted 3 lines
The PS3 device tree source.
Signed-off-by Geoff Levand <[email protected]>
Segher
PATCH 30/33 PS3: Bootwrapper support.
In reply to a message not in the archiveAdd support to build the PS3 flash rom image.
zImage.ps3 is a wrapped image that contains a flat device tree, an lv1 compatible entry point, a wrapper program with a standard entry point, and an optional initrd. otheros.bld is the gzip compresed rom image built from zImage.ps3. otheros.bld is suitable for programming into the PS3 boot flash memory.
Also remove the now unneeded lmb calls in the platform code.
--- arch/powerpc/boot/Makefile | 21 ++-- arch/powerpc/boot/ps3-head.S | 84 ++++++++++++++++ arch/powerpc/boot/ps3-hvcall.S | 184 +++++++++++++++++++++++++++++++++++++ arch/powerpc/boot/ps3.c | 158 +++++++++++++++++++++++++++++++ arch/powerpc/boot/wrapper | 55 +++++++++++ arch/powerpc/boot/zImage.ps3.lds.S | 50 ++++++++++ arch/powerpc/platforms/ps3/mm.c | 2 7 files changed, 543 insertions(+), 11 deletions(-)
arch/powerpc/boot/Makefile +12 -9
@@ -41,11 +41,13 @@ zliblinuxheader := zlib.h zconf.h zutil. $(addprefix $(obj)/,$(zlib) gunzip_util.o main.o): \ $(addprefix $(obj)/,$(zliblinuxheader)) $(addprefix $(obj)/,$(zlibheader)) +src-plat-$(CONFIG_PPC_PS3) += ps3-head.S ps3-hvcall.S ps3.c + src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \ ns16550.c serial.c simple_alloc.c div64.S util.S \ gunzip_util.c elf_util.c $(zlib) devtree.c \ 44x.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c -src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \ +src-plat := $(src-plat-y) of.c cuboot-83xx.c cuboot-85xx.c holly.c \ cuboot-ebony.c treeboot-ebony.c prpmc2800.c src-boot := $(src-wlib) $(src-plat) empty.c
@@ -75,11 +77,11 @@ $(addprefix $(obj)/,$(zliblinuxheader)): $(obj)/empty.c: @touch $@ -$(obj)/zImage.lds $(obj)/zImage.coff.lds: $(obj)/%: $(srctree)/$(src)/%.S +$(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds: $(obj)/%: $(srctree)/$(src)/%.S @cp $< $@ clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \ - empty.c zImage.coff.lds zImage.lds + empty.c zImage zImage.coff.lds zImage.ps3.lds zImage.lds quiet_cmd_bootcc = BOOTCC $@ cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $<
@@ -102,7 +104,7 @@ hostprogs-y := addnote addRamDisk hack-c targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ - $(obj)/zImage.lds $(obj)/zImage.coff.lds + $(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds wrapper :=$(srctree)/$(src)/wrapper wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
@@ -187,11 +189,12 @@ $(obj)/zImage.%: vmlinux $(wrapperbits) $(obj)/zImage.iseries: vmlinux $(STRIP) -s -R .comment $< -o $@ -$(obj)/zImage.ps3: vmlinux - $(STRIP) -s -R .comment $< -o $@ +$(obj)/zImage.ps3: vmlinux $(wrapper) $(wrapperbits) $(srctree)/$(src)/dts/ps3.dts + $(STRIP) -s -R .comment $< -o vmlinux.strip + $(call cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,) -$(obj)/zImage.initrd.ps3: vmlinux - @echo " WARNING zImage.initrd.ps3 not supported (yet)" +$(obj)/zImage.initrd.ps3: vmlinux $(wrapper) $(wrapperbits) $(srctree)/$(src)/dts/ps3.dts $(obj)/ramdisk.image.gz + $(call cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,$(obj)/ramdisk.image.gz) $(obj)/zImage.holly-elf: vmlinux $(wrapperbits) $(call if_changed,wrap,holly,$(obj)/dts/holly.dts,,)
@@ -230,7 +233,7 @@ install: $(CONFIGURE) $(addprefix $(obj) # anything not in $(targets) clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* \ - treeImage.* zImage.dts zImage.dts_initrd + treeImage.* zImage.dts zImage.dts_initrd otheros.bld # clean up files cached by wrapper clean-kernel := vmlinux.strip vmlinux.bin
arch/powerpc/boot/ps3-head.S new file +84 -0
84 lines not on this page · raw message
arch/powerpc/boot/ps3-hvcall.S new file +184 -0
184 lines not on this page · raw message
arch/powerpc/boot/ps3.c new file +158 -0
158 lines not on this page · raw message
arch/powerpc/boot/wrapper +55 -0
65 lines not on this page · raw message
arch/powerpc/boot/zImage.ps3.lds.S new file +50 -0
50 lines not on this page · raw message
arch/powerpc/platforms/ps3/mm.c +0 -2
@@ -1213,8 +1213,6 @@ void __init ps3_mm_init(void)BUG_ON (map.rm.base);BUG_ON (!map.rm.size); -lmb_add (map.rm.base, map.rm.size); -lmb_analyze ();/* arrange to do this in ps3_mm_add_memory */ ps3_mm_region_create (&map.r1, map.total - map.rm.size);
Re: [patch 30/33] PS3: Bootwrapper support.
Quoted 38 lines · Geoff Levand
zImage.ps3 is a wrapped image that contains a flat device tree, an lv1 compatible entry point, a wrapper program with a standard entry point, and an optional initrd. otheros.bld is the gzip compresed rom image built from zImage.ps3. otheros.bld is suitable for programming into the PS3 boot flash memory.
Also remove the now unneeded lmb calls in the platform code.
Signed-off-by Geoff Levand <geoffrey.levand at am.sony.com>--- arch/powerpc/boot/Makefile | 21 ++-- arch/powerpc/boot/ps3-head.S | 84 ++++++++++++++++ arch/powerpc/boot/ps3-hvcall.S | 184 +++++++++++++++++++++++++++++++++++++ arch/powerpc/boot/ps3.c | 158 +++++++++++++++++++++++++++++++ arch/powerpc/boot/wrapper | 55 +++++++++++ arch/powerpc/boot/zImage.ps3.lds.S | 50 ++++++++++ arch/powerpc/platforms/ps3/mm.c | 2 7 files changed, 543 insertions(+), 11 deletions(-)arch/powerpc/boot/Makefile +3
-1@@ -41,11 +41,13 @@ zliblinuxheader := zlib.h zconf.h zutil. $(addprefix $(obj)/,$(zlib) gunzip_util.o main.o): \ $(addprefix $(obj)/,$(zliblinuxheader)) $(addprefix $(obj)/,$(zlibheader)) +src-plat-$(CONFIG_PPC_PS3) += ps3-head.S ps3-hvcall.S ps3.c + src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \ ns16550.c serial.c simple_alloc.c div64.S util.S \ gunzip_util.c elf_util.c $(zlib) devtree.c \ 44x.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c -src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \ +src-plat := $(src-plat-y) of.c cuboot-83xx.c cuboot-85xx.c holly.c \ cuboot-ebony.c treeboot-ebony.c prpmc2800.c
Quoted 1 line
src-boot := $(src-wlib) $(src-plat)
empty.c
The policy so far has been code for all platforms is compiled for all invocations of make in the boot directory. Therefore just add your files directly to src-plat. If needed, add a flags override to set the cpu type.
Quoted 45 lines
arch/powerpc/boot/Makefile +0
-1@@ -75,11 +77,11 @@ $(addprefix $(obj)/,$(zliblinuxheader)): $(obj)/empty.c: @touch $@ -$(obj)/zImage.lds $(obj)/zImage.coff.lds: $(obj)/%:$(srctree)/$(src)/%.S
+$(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds:
$(obj)/%: $(srctree)/$(src)/%.S@cp $< $@clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \
arch/powerpc/boot/Makefile +1
-1- empty.c zImage.coff.lds zImage.lds + empty.c zImage zImage.coff.lds zImage.ps3.lds
zImage.lds
quiet_cmd_bootcc= BOOTCC $@cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -carch/powerpc/boot/Makefile +1
-2-o $@ $<@@ -102,7 +104,7 @@ hostprogs-y := addnote addRamDisk hack-c targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ - $(obj)/zImage.lds $(obj)/zImage.coff.lds + $(obj)/zImage.lds $(obj)/zImage.coff.lds$(obj)/zImage.ps3.lds
wrapper :=$(srctree)/$(src)/wrapper
wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff
mktree) \arch/powerpc/boot/Makefile +1
-2@@ -187,11 +189,12 @@ $(obj)/zImage.%: vmlinux $(wrapperbits) $(obj)/zImage.iseries: vmlinux $(STRIP) -s -R .comment $< -o $@ -$(obj)/zImage.ps3: vmlinux - $(STRIP) -s -R .comment $< -o $@ +$(obj)/zImage.ps3: vmlinux $(wrapper) $(wrapperbits)$(srctree)/$(src)/dts/ps3.dts
arch/powerpc/boot/Makefile +3
-2+ $(STRIP) -s -R .comment $< -o vmlinux.strip + $(call cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,) -$(obj)/zImage.initrd.ps3: vmlinux - @echo " WARNING zImage.initrd.ps3 not supported (yet)" +$(obj)/zImage.initrd.ps3: vmlinux $(wrapper) $(wrapperbits)
Quoted 3 lines
$(srctree)/$(src)/dts/ps3.dts $(obj)/ramdisk.image.gz
+ $(call
cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,$(obj)/ramdisk.image.gz)
The separate rule here is to pick up ps3.dts, correct?
After Marc's 3 patch series this would be handled by the config file.
Quoted 71 lines
$(obj)/zImage.holly-elf: vmlinux $(wrapperbits)
$(call if_changed,wrap,holly,$(obj)/dts/holly.dts,,)arch/powerpc/boot/Makefile +1
-1@@ -230,7 +233,7 @@ install: $(CONFIGURE) $(addprefix $(obj) # anything not in $(targets) clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* \ - treeImage.* zImage.dts zImage.dts_initrd + treeImage.* zImage.dts zImage.dts_initrd otheros.bld # clean up files cached by wrapper clean-kernel := vmlinux.strip vmlinux.binarch/powerpc/boot/ps3-head.S new file +7
-0@@ -0,0 +1,84 @@ +/* + * PS3 bootwrapper entry. + * + * Copyright (C) 2007 Sony Computer Entertainment Inc. + * Copyright 2007 Sony Corp. + * + * This program is free software; you can redistribute it and/ormodify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA02111-1307 USA
+ */arch/powerpc/boot/ps3-head.S new file +34
-0+ +#include "ppc_asm.h" + + .text + +/* + * __system_reset_overlay - The PS3 first stage entry. + * + * The bootwraper build script copies the 0x100 bytes at symbol + * __system_reset_overlay to offset 0x100 of the rom image. + */ + + .globl __system_reset_overlay +__system_reset_overlay: + + /* Switch to 32-bit mode. */ + + mfmsr r9 + clrldi r9,r9,1 + mtmsrd r9 + nop + + /* Get thread number in r3 and branch. */ + + mfspr r3, 0x88 + cntlzw. r3, r3 + li r4, 0 + li r5, 0 + beq 1f + + /* Secondary goes to __secondary_hold in kernel. */ + + li r4, 0x60 + mtctr r4
arch/powerpc/boot/ps3-head.S line 63
Quoted 10 lines
arch/powerpc/boot/ps3-head.S new file +10
-0+ bctr + + /* Primary waits for __secondary_hold_acknowledge. */ +1: + li r5, 0x10 /* __secondary_hold_acknowledge */ + or 28, 28, 28 /* db8cyc */ + + ld r4, 0(r5) + cmpdi r4, 0 + beq 1b
(1) The address of __secondary_hold_acknowledge is not stable. It has changed in the past and may change in the future. (2) This works because you always have exactly 2 cpus, and your secondary cpu is not id 0.
Because this is part of the kernel source tree, I'm not opposed to this usage, but I think some checking would be in order. A comment that this only works for two cpus with the slave id not being 0, and some check that nm on the kernel image results in the expected symbol and value.
Since I'm here, I'll mention that the li to r5 doesn't need to be in the loop. In fact, the load to r4 could be expressed as 0x10(0) or better create a symbol and use secondary_ack@l(0) eliminating the need for r5 and easing the above check.
Quoted 17 lines
arch/powerpc/boot/ps3-head.S new file +14
-0+ + /* Primary goes to _zimage_start in wrapper. */ + + lis r4, _zimage_start at ha + addi r4, r4, _zimage_start at l + mtctr r4 + bctr + +/* + * __system_reset_kernel - Place holder for the kernel reset vector. + * + * The bootwrapper build script copies 0x100 bytes from offset 0x100 + * of the rom image to the symbol __system_reset_kernel. At runtime + * the bootwrapper program copies the 0x100 bytes at
__system_reset_kernel
+ * to ram address0x100. This symbol must occupy0x100bytes.
+ */
arch/powerpc/boot/ps3-head.S line 84
Quoted 5 lines
arch/powerpc/boot/ps3-head.S new file +5
-0+ + .globl __system_reset_kernel +__system_reset_kernel: + + . = __system_reset_kernel + 0x100
Not bad. Since this code doesn't have to be at any particular location when it is built (you have no .org or similar, its all PIC), I don't see anything that couldn't be done from an asm block in the platform .c file, like the entry point in prpmc2800.c file; that would save a file in the boot directory. In that case __system_reset_kernel would be an array of 256 bytes.
[removed ps3-hvcall.S and lmb hack removal from followup]
Quoted 37 lines
arch/powerpc/boot/ps3.c new file +7
-0@@ -0,0 +1,158 @@ +/* +* PS3 bootwrapper support. +* +* Copyright (C) 2007 Sony Computer Entertainment Inc. +* Copyright 2007 Sony Corp. +* +* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA02111-1307 USA
+ */arch/powerpc/boot/ps3.c new file +12
-0+ +#include <stdarg.h> +#include <stddef.h> +#include "types.h" +#include "elf.h" +#include "string.h" +#include "stdio.h" +#include "page.h" +#include "ops.h" + +extern s64 lv1_panic (u64 in_1); +extern s64 lv1_get_logical_partition_id (u64 *out_1);
arch/powerpc/boot/ps3.c line 41
Quoted 10 lines
arch/powerpc/boot/ps3.c new file +10
-0+extern s64 lv1_get_logical_ppe_id (u64 *out_1); +extern s64 lv1_get_repository_node_value (u64 in_1,u64 in_2,u64 in_3, +u64 in_4,u64 in_5,u64 *out_1,u64 *out_2); + +#ifdef DEBUG +#define DBG(fmt...) printf(fmt) +#else +static inline int __attribute__ ((format (printf,1 ,2 )))DBG ( +const char *fmt, ...) {return 0 ;} +#endif
This should be in stdio.h for all. Maybe ops, but that is a bit of a catch-all and printf is not there.
Quoted 18 lines
arch/powerpc/boot/ps3.c new file +4
-0+ +BSS_STACK (4096 ); + +/* A buffer that may be edited by tools operating on a zImage binary so as to
+ * edit the command line passed to vmlinux (by setting /chosen/bootargs).
+ * The buffer is put in it's own section so that tools may locate it easier.
+ */arch/powerpc/boot/ps3.c new file +7
-0+static char cmdline[COMMAND_LINE_SIZE] + __attribute__((__section__("__builtin_cmdline"))); + +static void prep_cmdline (void *chosen) +{ +if (cmdline[0 ] =='\0' ) + getprop(chosen, "bootargs", cmdline,COMMAND_LINE_SIZE-1);
arch/powerpc/boot/ps3.c line 64
Quoted 9 lines
arch/powerpc/boot/ps3.c new file +9
-0+else +setprop_str (chosen,"bootargs" , cmdline); + +printf ("cmdline: '%s'\n" , cmdline); +} + +static void ps3_console_write (const char *buf,int len) +{ +}
I'm guessing your testing was done with some non-empty function that you are not prepared to release. Otherwise you would not have added all the printf code. I'm not complaining, just noting for my observations below.
arch/powerpc/boot/ps3.c line 71
Quoted 7 lines
arch/powerpc/boot/ps3.c new file +7
-0+ +static void ps3_exit (void ) +{ +printf ("ps3_exit\n" ); +lv1_panic (0 );/* zero = no reboot */ +while (1 ); +}
Does the hypervisor give some kind of indication that the code paniced?
A comment telling us users what to expect might be nice.
Quoted 46 lines
arch/powerpc/boot/ps3.c new file +26
-0+ +static int ps3_repository_read_rm_size (u64 *rm_size) +{ +s64 result; +u64 lpar_id; +u64 ppe_id; +u64 v2; + + result =lv1_get_logical_partition_id (&lpar_id); + +if (result) +return -1 ; + + result =lv1_get_logical_ppe_id (&ppe_id); + +if (result) +return -1 ; + +/* +* n1: 0000000062690000 : ....bi.. +* n2: 7075000000000000 : pu...... +* n3: 0000000000000001 : ........ +* n4: 726d5f73697a6500 : rm_size. +*/ + + result = lv1_get_repository_node_value(lpar_id,
0x0000000062690000ULL,
+0x7075000000000000ULL,ppe_id,0x726d5f73697a6500ULL,rm_size,arch/powerpc/boot/ps3.c new file +7
-0+ &v2); + +printf ("%s:%d: ppe_id %lu \n" , __func__, __LINE__, + (unsigned long )ppe_id); +printf ("%s:%d: lpar_id %lu \n" , __func__, __LINE__, + (unsigned long )lpar_id); + printf("%s:%d: rm_size %llxh \n", __func__, __LINE__,
*rm_size);arch/powerpc/boot/ps3.c new file +9
-0+ +return result ?-1 :0 ; +} + +void ps3_copy_vectors (void ) +{ +extern char __system_reset_kernel[]; + +memcpy ((void *)0x100 , __system_reset_kernel,0x100 );
arch/powerpc/boot/ps3.c line 124
Quoted 10 lines
arch/powerpc/boot/ps3.c new file +10
-0+flush_cache ((void *)0x100 ,0x100 ); +} + +void platform_init (void ) +{ +extern char _end[]; +extern char _dtb_start[]; +extern char _initrd_start[]; +extern char _initrd_end[]; +const u32 heapsize =0x1000000 - (u32 )_end;/* 16MiB */
Ok your heap is from (wrapper) _end to 16MiB.
arch/powerpc/boot/ps3.c line 135
Quoted 11 lines
arch/powerpc/boot/ps3.c new file +11
-0+void *chosen; +unsigned long ft_addr; +u64 rm_size; + + console_ops.write = ps3_console_write; + platform_ops.exit = ps3_exit; + +printf ("\n-- PS3 bootwrapper --\n" ); + +simple_alloc_init (_end, heapsize,32 ,64 ); +ft_init (_dtb_start,0 ,4 );
Ok this is the end of platform_init for most platforms.
arch/powerpc/boot/ps3.c line 140
Quoted 5 lines
arch/powerpc/boot/ps3.c new file +5
-0+ + chosen =finddevice ("/chosen" ); + +ps3_repository_read_rm_size (&rm_size); +dt_fixup_memory (0 , rm_size);
this is dt_fixups.
Quoted 7 lines
arch/powerpc/boot/ps3.c new file +3
-0+ +if (_initrd_end > _initrd_start) { + setprop_val(chosen, "linux,initrd-start",(u32)(_initrd_start));
+ setprop_val(chosen, "linux,initrd-end",
(u32)(_initrd_end));
+ }
This is part of prep_initrd.
arch/powerpc/boot/ps3.c line 158
Quoted 13 lines
arch/powerpc/boot/ps3.c new file +13
-0+ +prep_cmdline (chosen); + + ft_addr = dt_ops.finalize (); + +ps3_copy_vectors (); + +printf (" flat tree at 0x%lx\n\r" , ft_addr); + + ((kernel_entry_t )0 )(ft_addr,0 ,NULL ); + +ps3_exit (); +}
Based on past comments, I belive that you are not calling the normal _start() specifically to avoid dragging in zlib. Oh, but you call prep_cmdline, which means you still get main.c and it drags zlib. I guess we should move prep_initrd and prep_cmdline. Were you just skipping prep_kernel?
This code and the concept in your .lds file looks like it could be used by other platforms in a generic way
(except for the call to ps3_exit which should be exit, and the call to ps3_copy_vectors, which can be moved earlier. While its likely similar functionality would be needed, the details of what to patch and copy may vary).
Quoted 116 lines
arch/powerpc/boot/wrapper +11
-0@@ -144,6 +144,15 @@ miboot|uboot) cuboot*) gzip= ;; +ps3) + platformo="$object/ps3-head.o $object/ps3-hvcall.o $object/ps3.o" + lds=$object/zImage.ps3.lds + gzip= + ext=bin + objflags="-O binary" + ksection=.kernel:vmlinux.bin + isection=.kernel:initrd + ;; esac vmz="$tmpdir/`basename \"$kernel\"`.$ext"@@ -239,4 +248,50 @@ treeboot*) fi exit 0 ;; +ps3) + # The ps3's loader supports loading gzipped binary images fromflash
arch/powerpc/boot/wrapper +2
-0+ # rom to addr zero. The loader enters the image at addr 0x100. A + # bootwrapper overlay is use to arrange for the kernel to beloaded
arch/powerpc/boot/wrapper +3
-0+ # to addr zero and to have a suitable bootwrapper entry at 0x100. + # To construct the rom image, 0x100 bytes from offset 0x100 in the + # kernel is copied to the bootwrapper symbol
__system_reset_kernel.
+ # The0x100bytes at the bootwrapper symbol__system_reset_overlayisarch/powerpc/boot/wrapper +38
-0+ # then copied to offset 0x100. At runtime the bootwrapper program + # copies the 0x100 bytes at __system_reset_kernel to addr 0x100. + + system_reset_overlay=0x`${CROSS}nm "$ofile" \ + | grep ' __system_reset_overlay$' \ + | cut -d' ' -f1` + system_reset_overlay=`printf "%d" $system_reset_overlay` + system_reset_kernel=0x`${CROSS}nm "$ofile" \ + | grep ' __system_reset_kernel$' \ + | cut -d' ' -f1` + system_reset_kernel=`printf "%d" $system_reset_kernel` + overlay_dest="256" + overlay_size="256" + + rm -f "$object/otheros.bld" + + ${CROSS}objcopy -O binary "$ofile" "$ofile.bin" + + msg=$(dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \ + skip=$overlay_dest seek=$system_reset_kernel \ + count=$overlay_size bs=1 2>&1) + + if [ $? -ne "0" ]; then + echo $msg + exit 1 + fi + + msg=$(dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \ + skip=$system_reset_overlay seek=$overlay_dest \ + count=$overlay_size bs=1 2>&1) + + if [ $? -ne "0" ]; then + echo $msg + exit 2 + fi + + gzip --force -9 --stdout "$ofile.bin" > "$object/otheros.bld" + ;; esacarch/powerpc/boot/zImage.ps3.lds.S new file +40
-0@@ -0,0 +1,50 @@ +OUTPUT_ARCH(powerpc:common) +ENTRY(_zimage_start) +EXTERN(_zimage_start) +SECTIONS +{ + _vmlinux_start = .; + .kernel:vmlinux.bin : { *(.kernel:vmlinux.bin) } + _vmlinux_end = .; + + . = ALIGN(8); + _dtb_start = .; + .kernel:dtb : { *(.kernel:dtb) } + _dtb_end = .; + + . = ALIGN(4096); + _initrd_start = .; + .kernel:initrd : { *(.kernel:initrd) } + _initrd_end = .; + + _start = .; + .text : + { + *(.text) + *(.fixup) + } + _etext = .; + . = ALIGN(4096); + .data : + { + *(.rodata*) + *(.data*) + *(.sdata*) + __got2_start = .; + *(.got2) + __got2_end = .; + } + + . = ALIGN(4096); + _edata = .; +
arch/powerpc/boot/zImage.ps3.lds.S line 50
Quoted 10 lines
arch/powerpc/boot/zImage.ps3.lds.S new file +10
-0+ . = ALIGN(4096); + __bss_start = .; + .bss : + { + *(.sbss) + *(.bss) + } + . = ALIGN(4096); + _end = . ; +}
You don't seem to relocate the initrd. Your lds file has the initrd on the 4k page boundary after the dtb, which is after the kernel as copied by objcopy -O binary. As far as I know, objcopy only copies the load sections; it doesn't create space in the output binary image for alloc only sections. What prevents the initrd from being in the kernel bss, which it clears before even looking at the device tree? For that matter, what prevents the device tree from being allocated in this bss range?
I'm guessing that you tested with some additional code to display the console output, which made _end be above the kernel _end, or close enough that the finalized bss was above the kernel _end? Did you test an initrd? I guess an attached initrd would also solve the problem of the final dtb being overwritten, but not the start of the initrd.
I think your approach to the image layout has promise but still needs some refinement. To solve the problem of where is the kernel end, I would create a section to hold the kernel elf header and use the elf_parse routines that are now conveniently in a separate file. The wrapper script would dd off the header and then it would be linked into the wrapper like the other sections. At that point the initrd could be moved before creating the malloc pool above it.
This approach can be used whenever there is something capable of installing an image at address 0 in ram before starting its execution, and is useful when the time to install that image is less than the time to decompress the kernel (and copy either it or the zImage, for the case where the entry point is fixed in low memory). I can think of other platforms where this holds true. In your case, this is true because the hypervisor decompresses the image.
What should this type of image be called? Its not really a zImage, since there is nothing compressed (well, maybe the initrd/initramfs). uImage is already taken (u would have stood for uncompressed). Something like wrapped image? flat image? combined image? We'd still do make zImage to invoke make for it.
One more point. You indicated that this image had a standard entry point. Were you thinking it will be used for kexec? Or were you just trying to state you used the library _zimage_start? While the current kexec-tools for 64-bit assumes the entry point to be image offset 0, the same address is used for both the boot cpu entry point and the address of the slave code to copy to address 0. If you want the master to execute the wrapper code, you will need to patch the branch at address 0 in the kernel image to go to _zimage_start in the wrapper, and then from the wrapper patch it back before starting the kernel. Or perhaps you don't plan to run the wrapper on the kexec path? In that case the system reset handler would retained the patched handler and the initrd ignored would be ignored. While you usage may not care, other platforms use the system reset vector. In either case, _zimage_start doesn't have the necessary slave code, and therefore shouldn't be the entry point for the final image when we fix that bug in kexec-tools.
milton
Re: [patch 30/33] PS3: Bootwrapper support.
Quoted 9 lines · Milton Miller
Quoted 7 lines · Geoff Levand
arch/powerpc/boot/Makefile +0
-0@@ -41,11 +41,13 @@ zliblinuxheader := zlib.h zconf.h zutil. $(addprefix $(obj)/,$(zlib) gunzip_util.o main.o): \ $(addprefix $(obj)/,$(zliblinuxheader)) $(addprefix $(obj)/,$(zlibheader))
Quoted 16 lines
Quoted 11 lines
arch/powerpc/boot/Makefile +3
-1+src-plat-$(CONFIG_PPC_PS3) += ps3-head.S ps3-hvcall.S ps3.c + src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \ ns16550.c serial.c simple_alloc.c div64.S util.S \ gunzip_util.c elf_util.c $(zlib) devtree.c \ 44x.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c -src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \ +src-plat := $(src-plat-y) of.c cuboot-83xx.c cuboot-85xx.c holly.c \ cuboot-ebony.c treeboot-ebony.c prpmc2800.csrc-boot := $(src-wlib) $(src-plat)
empty.cThe policy so far has been code for all platforms is compiled for all invocations of make in the boot directory. Therefore just add your files directly to src-plat. If needed, add a flags override to set the cpu type.
OK, I can do that. I don't think it is a good way, but I will do it.
Quoted 14 lines
Quoted 10 lines
-$(obj)/zImage.ps3: vmlinux
- $(STRIP) -s -R .comment $< -o $@
+$(obj)/zImage.ps3: vmlinux $(wrapper) $(wrapperbits) $(srctree)/$(src)/dts/ps3.dtsarch/powerpc/boot/Makefile +3
-2+ $(STRIP) -s -R .comment $< -o vmlinux.strip + $(call cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,) -$(obj)/zImage.initrd.ps3: vmlinux - @echo " WARNING zImage.initrd.ps3 not supported (yet)" +$(obj)/zImage.initrd.ps3: vmlinux $(wrapper) $(wrapperbits)Quoted 3 lines
$(srctree)/$(src)/dts/ps3.dts $(obj)/ramdisk.image.gz
+ $(call
cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,$(obj)/ramdisk.image.gz)
Quoted 3 lines
The separate rule here is to pick up
ps3.dts, correct?After Marc's 3 patch series this would be handled by the config file.
Yes, these rules will need to be re-worked, but the current form will continue to work with those changes.
Quoted 35 lines
Quoted 35 lines
+ *
__system_reset_overlay- The PS3 first stage entry.
+ *
+ * The bootwraper build script copies the0x100bytes at symbol
+ *__system_reset_overlayto offset0x100of the rom image.
+ */arch/powerpc/boot/Makefile +30
-0+ + .globl __system_reset_overlay +__system_reset_overlay: + + /* Switch to 32-bit mode. */ + + mfmsr r9 + clrldi r9,r9,1 + mtmsrd r9 + nop + + /* Get thread number in r3 and branch. */ + + mfspr r3, 0x88 + cntlzw. r3, r3 + li r4, 0 + li r5, 0 + beq 1f + + /* Secondary goes to __secondary_hold in kernel. */ + + li r4, 0x60 + mtctr r4 + bctr + + /* Primary waits for __secondary_hold_acknowledge. */ +1: + li r5, 0x10 /* __secondary_hold_acknowledge */ + or 28, 28, 28 /* db8cyc */ +
Quoted 8 lines
arch/powerpc/boot/Makefile
Quoted 3 lines
arch/powerpc/boot/Makefile +3
-0+ ld r4, 0(r5) + cmpdi r4, 0 + beq 1b(1) The address of
__secondary_hold_acknowledgeis not stable. It has changed in the past and may change in the future. (2) This works because you always have exactly 2 cpus, and your secondary cpu is not id 0.
Yes, it is simplified and PS3 specific.
Quoted 5 lines
Because this is part of the kernel source tree, I'm not opposed to this
usage, but I think some checking would be in order. A comment that
this only works for two cpus with the slave id not being 0, and some check that nm on the kernel image results in the expected symbol and value.
I can make it work without using __secondary_hold_acknowledge by just using a delay, but it is not as precise.
Quoted 4 lines
Since I'm here, I'll mention that the li to r5 doesn't need to be in the loop. In fact, the load to r4 could be expressed as 0x10(0) or better create a symbol and use secondary_ack@l(0) eliminating the need for r5 and easing the above check.
Seems like a cleaner way, but I don't think it is a good idea to use __secondary_hold_acknowledge if it is not well known, so I will avoid its use.
Quoted 20 lines
Quoted 20 lines
arch/powerpc/boot/Makefile +14
-0+ + /* Primary goes to _zimage_start in wrapper. */ + + lis r4, _zimage_start at ha + addi r4, r4, _zimage_start at l + mtctr r4 + bctr + +/* + * __system_reset_kernel - Place holder for the kernel reset vector. + * + * The bootwrapper build script copies 0x100 bytes from offset 0x100 + * of the rom image to the symbol __system_reset_kernel. At runtime + * the bootwrapper program copies the 0x100 bytes at
__system_reset_kernel
+ * to ram address0x100. This symbol must occupy0x100bytes.
+ */arch/powerpc/boot/Makefile +3
-0+ + .globl __system_reset_kernel +__system_reset_kernel:
Quoted 8 lines
arch/powerpc/boot/Makefile
Quoted 2 lines
arch/powerpc/boot/Makefile +2
-0+ + . = __system_reset_kernel + 0x100Not bad. Since this code doesn't have to be at any particular
location when it is built (you have no .org or similar, its all PIC), I don't see anything that couldn't be done from an asm block in the platform .c file, like the entry point inprpmc2800.cfile; that would save a file in the boot directory.
For me that would be a significant effort, and I don't think I can consolidate them for 2.6.23. I will consider it for 2.6.24.
Quoted 23 lines
Quoted 23 lines
arch/powerpc/boot/Makefile +3
-0+BSS_STACK(4096); + +/* A buffer that may be edited by tools operating on a zImage binaryso as to
+ * edit the command line passed to vmlinux (by setting /chosen/bootargs).
+ * The buffer is put in it's own section so that tools may locate it easier.
+ */arch/powerpc/boot/Makefile +7
-0+static char cmdline[COMMAND_LINE_SIZE] + __attribute__((__section__("__builtin_cmdline"))); + +static void prep_cmdline(void *chosen) +{ + if (cmdline[0] == '\0') + getprop(chosen, "bootargs", cmdline,COMMAND_LINE_SIZE-1);
arch/powerpc/boot/Makefile +6
-0+ else + setprop_str(chosen, "bootargs", cmdline); + + printf("cmdline: '%s'\n", cmdline); +} +
Quoted 8 lines
arch/powerpc/boot/Makefile
Quoted 3 lines
arch/powerpc/boot/Makefile +3
-0+static void ps3_console_write(const char *buf, int len) +{ +}I'm guessing your testing was done with some non-empty function that you are not prepared to release. Otherwise you would not have added
all the printf code. I'm not complaining, just noting for my
observations below.
Someone might be interested in making ps3_console_write() save the messages to memory and print them later, so I thought it wold be good to leave the printf's in.
Quoted 10 lines
arch/powerpc/boot/Makefile
Quoted 7 lines
arch/powerpc/boot/Makefile +7
-0+ +static void ps3_exit(void) +{ + printf("ps3_exit\n"); + lv1_panic(0); /* zero = no reboot */ + while (1); +}Does the hypervisor give some kind of indication that the code paniced?
A comment telling us users what to expect might be nice.
The lpar will be shutdown. Non-zero will make it reboot. That is the documented behavior. If I get a better idea of what it will do I will put in a better comment.
Quoted 53 lines
arch/powerpc/boot/Makefile
Quoted 7 lines
arch/powerpc/boot/Makefile +7
-0+void platform_init(void) +{ + extern char _end[]; + extern char _dtb_start[]; + extern char _initrd_start[]; + extern char _initrd_end[]; + const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */Ok your heap is from (wrapper)
_endto 16MiB.arch/powerpc/boot/Makefile
Quoted 11 lines
arch/powerpc/boot/Makefile +11
-0+ void *chosen; + unsigned long ft_addr; + u64 rm_size; + + console_ops.write = ps3_console_write; + platform_ops.exit = ps3_exit; + + printf("\n-- PS3 bootwrapper --\n"); + + simple_alloc_init(_end, heapsize, 32, 64); + ft_init(_dtb_start, 0, 4);Ok this is the end of
platform_initfor most platforms.arch/powerpc/boot/Makefile
Quoted 5 lines
arch/powerpc/boot/Makefile +5
-0+ + chosen = finddevice("/chosen"); + + ps3_repository_read_rm_size(&rm_size); + dt_fixup_memory(0, rm_size);this is
dt_fixups.Quoted 7 lines
arch/powerpc/boot/Makefile +3
-0+ + if (_initrd_end > _initrd_start) { + setprop_val(chosen, "linux,initrd-start",(u32)(_initrd_start));
+ setprop_val(chosen, "linux,initrd-end",
(u32)(_initrd_end));
+ }This is part of
prep_initrd.Quoted 11 lines
arch/powerpc/boot/Makefile +11
-0+ + prep_cmdline(chosen); + + ft_addr = dt_ops.finalize(); + + ps3_copy_vectors(); + + printf(" flat tree at 0x%lx\n\r", ft_addr); + + ((kernel_entry_t)0)(ft_addr, 0, NULL); +
Quoted 8 lines
arch/powerpc/boot/Makefile
Quoted 2 lines
arch/powerpc/boot/Makefile +2
-0+ ps3_exit(); +}Based on past comments, I belive that you are not calling the normal
_start()specifically to avoid dragging in zlib. Oh, but you callprep_cmdline, which means you still getmain.cand it drags zlib. I guess we should moveprep_initrdandprep_cmdline. Were you just skippingprep_kernel?
I was hoping to eventually get rid of most of the unused stuff that is now linked in, but for now I just need something working.
Quoted 6 lines
This code and the concept in your .lds file looks like it could be used by other platforms in a generic way
(except for the call tops3_exitwhich should be exit, and the call tops3_copy_vectors, which can be moved earlier. While its likely similar functionality would be needed, the details of what to patch and copy may vary).
I did try to make it generic in my initial RFC's but it wasn't well received, so I just went with a platform specific approach and tried to simplify it.
Quoted 54 lines
Quoted 43 lines
arch/powerpc/boot/zImage.ps3.lds.S new file +40
-0@@ -0,0 +1,50 @@ +OUTPUT_ARCH(powerpc:common) +ENTRY(_zimage_start) +EXTERN(_zimage_start) +SECTIONS +{ + _vmlinux_start = .; + .kernel:vmlinux.bin : { *(.kernel:vmlinux.bin) } + _vmlinux_end = .; + + . = ALIGN(8); + _dtb_start = .; + .kernel:dtb : { *(.kernel:dtb) } + _dtb_end = .; + + . = ALIGN(4096); + _initrd_start = .; + .kernel:initrd : { *(.kernel:initrd) } + _initrd_end = .; + + _start = .; + .text : + { + *(.text) + *(.fixup) + } + _etext = .; + . = ALIGN(4096); + .data : + { + *(.rodata*) + *(.data*) + *(.sdata*) + __got2_start = .; + *(.got2) + __got2_end = .; + } + + . = ALIGN(4096); + _edata = .; +arch/powerpc/boot/zImage.ps3.lds.S line 50
Quoted 10 lines
arch/powerpc/boot/zImage.ps3.lds.S new file +10
-0+ . = ALIGN(4096); + __bss_start = .; + .bss : + { + *(.sbss) + *(.bss) + } + . = ALIGN(4096); + _end = . ; +}
Quoted 8 lines
You don't seem to relocate the initrd. Your lds file has the initrd on the 4k page boundary after the dtb, which is after the kernel as copied by objcopy -O binary. As far as I know, objcopy only copies the load sections; it doesn't create space in the output binary image for alloc only sections. What prevents the initrd from being in the kernel bss, which it clears before even looking at the device tree? For that matter, what prevents the device tree from being allocated in this bss range?
Yes, a point I missed. I think it is easier to just make objcopy output the bss, so that is what I'll do for now.
objflags="-O binary --set-section-flags=.bss=contents,alloc,load,readonly,data"
I'll consider doing a relocation later.
Quoted 5 lines
I'm guessing that you tested with some additional code to display the console output, which made
_endbe above the kernel_end, or close enough that the finalized bss was above the kernel_end? Did you test an initrd? I guess an attached initrd would also solve the problem of the final dtb being overwritten, but not the start of the initrd.
No, I did not test initrd, so it is still todo.
Quoted 7 lines
I think your approach to the image layout has promise but still needs some refinement. To solve the problem of where is the kernel end, I would create a section to hold the kernel elf header and use the
elf_parseroutines that are now conveniently in a separate file. The wrapper script would dd off the header and then it would be linked into the wrapper like the other sections. At that point the initrd could be moved before creating the malloc pool above it.
OK, I'll consider it.
Quoted 8 lines
This approach can be used whenever there is something capable of installing an image at address 0 in ram before starting its execution, and is useful when the time to install that image is less than the time to decompress the kernel (and copy either it or the zImage, for the case where the entry point is fixed in low memory). I can think of other platforms where this holds true. In your case, this is true because the hypervisor decompresses the image.
Quoted 5 lines
What should this type of image be called? Its not really a zImage, since there is nothing compressed (well, maybe the initrd/initramfs). uImage is already taken (u would have stood for uncompressed). Something like wrapped image? flat image? combined image? We'd still do make zImage to invoke make for it.
At this point I just want to get my platform code included so distros can start to use it. I don't want to turn this patch into an effort to provide a new generic kernel infrastructure. That should be a different effort, then when that is ready we can switch this code over.
Quoted 3 lines
One more point. You indicated that this image had a standard entry point. Were you thinking it will be used for kexec? Or were you just trying to state you used the library
_zimage_start?
I was thinking kexec. My initial work was to add zImage support to kexec, but I dropped that to focus on getting the bootwrapper and kexec of vmlinux working. I have no plan to restart that work so will drop that part of the comment.
I'll send out an updated patch.
-Geoff
Re: [patch 30/33] PS3: Bootwrapper support.
In reply to Milton MillerQuoted 22 lines · Milton Miller
Quoted 14 lines · Geoff Levand
arch/powerpc/boot/Makefile +1
-2@@ -187,11 +189,12 @@ $(obj)/zImage.%: vmlinux $(wrapperbits) $(obj)/zImage.iseries: vmlinux $(STRIP) -s -R .comment $< -o $@ -$(obj)/zImage.ps3: vmlinux - $(STRIP) -s -R .comment $< -o $@ +$(obj)/zImage.ps3: vmlinux $(wrapper) $(wrapperbits)$(srctree)/$(src)/dts/ps3.dts
arch/powerpc/boot/Makefile +3
-2+ $(STRIP) -s -R .comment $< -o vmlinux.strip + $(call cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,) -$(obj)/zImage.initrd.ps3: vmlinux - @echo " WARNING zImage.initrd.ps3 not supported (yet)" +$(obj)/zImage.initrd.ps3: vmlinux $(wrapper) $(wrapperbits)Quoted 3 lines
$(srctree)/$(src)/dts/ps3.dts $(obj)/ramdisk.image.gz
+ $(call
cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,$(obj)/ramdisk.image.gz)The separate rule here is to pick up
ps3.dts, correct?
Quoted 1 line
After Marc's 3 patch series this would be handled by the config file.
^ k :)
Yep. Hack the appropriate Kconfig to 'select WANT_DEVICE_TREE' then make config to set DEVICE_TREE to the name of your dts file (e.g., ps3.dts). See configs/prpmc2800_defconfig for an example.
The patches Milton is referring to are at:
http://patchwork.ozlabs.org/linuxppc/patch?id=11428 + 11429 + 11430
Quoted 21 lines
Quoted 21 lines
arch/powerpc/boot/ps3-head.S new file +14
-0+ + /* Primary goes to _zimage_start in wrapper. */ + + lis r4, _zimage_start at ha + addi r4, r4, _zimage_start at l + mtctr r4 + bctr + +/* + * __system_reset_kernel - Place holder for the kernel reset vector. + * + * The bootwrapper build script copies 0x100 bytes from offset 0x100 + * of the rom image to the symbol __system_reset_kernel. At runtime + * the bootwrapper program copies the 0x100 bytes at
__system_reset_kernel
+ * to ram address0x100. This symbol must occupy0x100bytes.
+ */arch/powerpc/boot/ps3-head.S new file +4
-0+ + .globl __system_reset_kernel +__system_reset_kernel: +
Quoted 8 lines
Quoted 1 line
+ . =
__system_reset_kernel+0x100Not bad. Since this code doesn't have to be at any particular
location when it is built (you have no .org or similar, its all PIC), I don't see anything that couldn't be done from an asm block in the platform .c file, like the entry point inprpmc2800.cfile; that would save a file in the boot directory. In that case__system_reset_kernelwould be an array of 256 bytes.
Agree.
As for the rest of Geoff's patch, I think I get the gist of what's going on but it would be really nice to have it described in English (and put in the patch description). That way others (like me) could understand the problem you're solving and what your solution is.
(Hey, Paul made me do that so you can too! ;)
Mark
Re: [patch 30/33] PS3: Bootwrapper support.
Quoted 7 lines · Mark A. Greer
Quoted 6 lines
Not bad. Since this code doesn't have to be at any particular
location when it is built (you have no .org or similar, its all PIC), I don't see anything that couldn't be done from an asm block in the platform .c file, like the entry point inprpmc2800.cfile; that would save a file in the boot directory. In that case__system_reset_kernelwould be an array of 256 bytes.
Quoted 6 lines
Agree.
As for the rest of Geoff's patch, I think I get the gist of what's going on but it would be really nice to have it described in English (and put in the patch description). That way others (like me) could understand the problem you're solving and what your solution is.
This is from the comment the patch adds to the wrapper script. I think it gives you what you need:
+ps3)
+ # The ps3's loader supports loading gzipped binary images from flash + # rom to addr zero. The loader enters the image at addr 0x100. A + # bootwrapper overlay is use to arrange for the kernel to be loaded + # to addr zero and to have a suitable bootwrapper entry at 0x100. + # To construct the rom image, 0x100 bytes from offset 0x100 in the + # kernel is copied to the bootwrapper symbol __system_reset_kernel. + # The 0x100 bytes at the bootwrapper symbol __system_reset_overlay is + # then copied to offset 0x100. At runtime the bootwrapper program + # copies the 0x100 bytes at __system_reset_kernel to addr 0x100.
Re: [patch 30/33] PS3: Bootwrapper support.
Quoted 10 lines · Geoff Levand
Quoted 4 lines · Mark A. Greer
As for the rest of Geoff's patch, I think I get the gist of what's going on but it would be really nice to have it described in English (and put in the patch description). That way others (like me) could understand the problem you're solving and what your solution is.
This is from the comment the patch adds to the wrapper script. I think it gives you what you need:
arch/powerpc/boot/wrapper treeboot*) · line 260
Quoted 10 lines
arch/powerpc/boot/wrapper +10
-0+ps3) + # The ps3's loader supports loading gzipped binary images from flash + # rom to addr zero. The loader enters the image at addr 0x100. A + # bootwrapper overlay is use to arrange for the kernel to be loaded + # to addr zero and to have a suitable bootwrapper entry at 0x100. + # To construct the rom image, 0x100 bytes from offset 0x100 in the + # kernel is copied to the bootwrapper symbol __system_reset_kernel. + # The 0x100 bytes at the bootwrapper symbol __system_reset_overlay is + # then copied to offset 0x100. At runtime the bootwrapper program + # copies the 0x100 bytes at __system_reset_kernel to addr 0x100.
Yes, that was what I needed. I should have found that myself...my apologies.
Mark
Re: [patch 30/33] PS3: Bootwrapper support.
In reply to Geoff Levandarch/powerpc/boot/wrapper treeboot*) · line 260
Quoted 13 lines · Geoff Levand
This is from the comment the patch adds to the wrapper script. I think it gives you what you need:
arch/powerpc/boot/wrapper +10
-0+ps3) + # The ps3's loader supports loading gzipped binary images from flash + # rom to addr zero. The loader enters the image at addr 0x100. A + # bootwrapper overlay is use to arrange for the kernel to be loaded + # to addr zero and to have a suitable bootwrapper entry at 0x100. + # To construct the rom image, 0x100 bytes from offset 0x100 in the + # kernel is copied to the bootwrapper symbol __system_reset_kernel. + # The 0x100 bytes at the bootwrapper symbol __system_reset_overlay is + # then copied to offset 0x100. At runtime the bootwrapper program + # copies the 0x100 bytes at __system_reset_kernel to addr 0x100.
Yes, that is useful, but Mark is right, your patch description is a bit terse, and something like that in the patch description would be useful.
Paul.
RE: [patch 30/33] PS3: Bootwrapper support.
-----Original Message-----
From: Paul Mackerras [mailto:[email protected]]
Sent: Mon 6/18/2007 11:44 PM
To: Levand, Geoffrey
Cc: Mark A. Greer; ppcdev; Milton Miller
Subject: Re: [patch 30/33] PS3: Bootwrapper support. =20
Quoted 1 line · Geoff Levand
This is from the comment the patch adds to the wrapper script. I =
think
Review
Quoted 4 lines
it gives you what you need:
=20(quoted diff) +2
-0+ps3) + # The ps3's loader supports loading gzipped binary images from =
flash
Review
Quoted 2 lines
(quoted diff) +2
-0+ # rom to addr zero. The loader enters the image at addr 0x100. A + # bootwrapper overlay is use to arrange for the kernel to be =
loaded
Review
Quoted 2 lines
(quoted diff) +2
-0+ # to addr zero and to have a suitable bootwrapper entry at 0x100. + # To construct the rom image, 0x100 bytes from offset 0x100 in =
the
Quoted 1 line
+ # kernel is copied to the bootwrapper symbol =
__system_reset_kernel.
Quoted 1 line
+ # The
0x100bytes at the bootwrapper symbol =
__system_reset_overlay is
Quoted 1 line
+ # then copied to offset
0x100. At runtime the bootwrapper =
program
Quoted 1 line
+ # copies the
0x100bytes at__system_reset_kernelto addr0x100.
Yes, that is useful, but Mark is right, your patch description is a bit terse, and something like that in the patch description would be useful.
I prepared a new patch with this description and was waiting a while to = get
all the comments. I'll send it out soon.
-Geoff
PATCH v2 30/33 PS3: Bootwrapper support.
In reply to Geoff LevandAdd support to build the PS3 flash rom image.
zImage.ps3 is a wrapped image that contains a flat device tree, an lv1 compatible entry point, and an optional initrd. otheros.bld is the gzip compresed rom image built from zImage.ps3. otheros.bld is suitable for programming into the PS3 boot flash memory.
Also remove the now unneeded lmb calls in the platform code.
---
v2 changes:
o Make platform specific files build for all platforms.
o Remove use of __secondary_hold_acknowledge.
o Change patch comment about zImage entry.
o Add comment about lv1_panic() to ps3_exit().
o Make room for bss section in otheros.bld.
arch/powerpc/boot/Makefile | 20 ++-- arch/powerpc/boot/ps3-head.S | 80 ++++++++++++++++ arch/powerpc/boot/ps3-hvcall.S | 184 +++++++++++++++++++++++++++++++++++++ arch/powerpc/boot/ps3.c | 161 ++++++++++++++++++++++++++++++++ arch/powerpc/boot/wrapper | 55 +++++++++++ arch/powerpc/boot/zImage.ps3.lds.S | 50 ++++++++++ arch/powerpc/platforms/ps3/mm.c | 2 7 files changed, 541 insertions(+), 11 deletions(-)
arch/powerpc/boot/Makefile +11 -9
@@ -46,7 +46,8 @@ src-wlib := string.S crt0.S stdio.c main gunzip_util.c elf_util.c $(zlib) devtree.c \ 44x.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \ - cuboot-ebony.c treeboot-ebony.c prpmc2800.c + cuboot-ebony.c treeboot-ebony.c prpmc2800.c \ + ps3-head.S ps3-hvcall.S ps3.c src-boot := $(src-wlib) $(src-plat) empty.c src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -75,11 +76,11 @@ $(addprefix $(obj)/,$(zliblinuxheader)): $(obj)/empty.c: @touch $@ -$(obj)/zImage.lds $(obj)/zImage.coff.lds: $(obj)/%: $(srctree)/$(src)/%.S +$(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds: $(obj)/%: $(srctree)/$(src)/%.S @cp $< $@ clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \ - empty.c zImage.coff.lds zImage.lds + empty.c zImage zImage.coff.lds zImage.ps3.lds zImage.lds quiet_cmd_bootcc = BOOTCC $@ cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $<
@@ -102,7 +103,7 @@ hostprogs-y := addnote addRamDisk hack-c targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ - $(obj)/zImage.lds $(obj)/zImage.coff.lds + $(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds wrapper :=$(srctree)/$(src)/wrapper wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
@@ -187,11 +188,12 @@ $(obj)/zImage.%: vmlinux $(wrapperbits) $(obj)/zImage.iseries: vmlinux $(STRIP) -s -R .comment $< -o $@ -$(obj)/zImage.ps3: vmlinux - $(STRIP) -s -R .comment $< -o $@ +$(obj)/zImage.ps3: vmlinux $(wrapper) $(wrapperbits) $(srctree)/$(src)/dts/ps3.dts + $(STRIP) -s -R .comment $< -o vmlinux.strip + $(call cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,) -$(obj)/zImage.initrd.ps3: vmlinux - @echo " WARNING zImage.initrd.ps3 not supported (yet)" +$(obj)/zImage.initrd.ps3: vmlinux $(wrapper) $(wrapperbits) $(srctree)/$(src)/dts/ps3.dts $(obj)/ramdisk.image.gz + $(call cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,$(obj)/ramdisk.image.gz) $(obj)/zImage.holly-elf: vmlinux $(wrapperbits) $(call if_changed,wrap,holly,$(obj)/dts/holly.dts,,)
@@ -230,7 +232,7 @@ install: $(CONFIGURE) $(addprefix $(obj) # anything not in $(targets) clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* \ - treeImage.* zImage.dts zImage.dts_initrd + treeImage.* zImage.dts zImage.dts_initrd otheros.bld # clean up files cached by wrapper clean-kernel := vmlinux.strip vmlinux.bin
arch/powerpc/boot/ps3-head.S new file +80 -0
80 lines not on this page · raw message
arch/powerpc/boot/ps3-hvcall.S new file +184 -0
184 lines not on this page · raw message
arch/powerpc/boot/ps3.c new file +161 -0
161 lines not on this page · raw message
arch/powerpc/boot/wrapper +55 -0
65 lines not on this page · raw message
arch/powerpc/boot/zImage.ps3.lds.S new file +50 -0
50 lines not on this page · raw message
arch/powerpc/platforms/ps3/mm.c +0 -2
@@ -1213,8 +1213,6 @@ void __init ps3_mm_init(void)BUG_ON (map.rm.base);BUG_ON (!map.rm.size); -lmb_add (map.rm.base, map.rm.size); -lmb_analyze ();/* arrange to do this in ps3_mm_add_memory */ ps3_mm_region_create (&map.r1, map.total - map.rm.size);
PATCH v3 30/33 PS3: Bootwrapper support.
In reply to Geoff LevandSubject: PS3: Bootwrapper support.
Add support to build the PS3 flash rom image and remove some unneeded lmb calls.
The PS3's lv1 loader supports loading gzipped binary images from flash rom to addr zero. The loader enters the image at addr 0x100.
In this implementation a bootwrapper overlay is use to arrange for the kernel to be loaded to addr zero and to have a suitable bootwrapper entry at 0x100. To construct the rom image, 0x100 bytes from offset 0x100 in the kernel is copied to the bootwrapper symbol __system_reset_kernel. The 0x100 bytes at the bootwrapper symbol __system_reset_overlay is then copied to offset 0x100. At runtime the bootwrapper program copies the 0x100 bytes at __system_reset_kernel to addr 0x100.
zImage.ps3 is a wrapped image that contains a flat device tree, an lv1 compatible entry point, and an optional initrd. otheros.bld is the gzip compresed rom image built from zImage.ps3. otheros.bld is suitable for programming into the PS3 boot flash memory.
---
v3 changes:
o Add details about PS3 loader to patch description.
v2 changes:
o Make platform specific files build for all platforms.
o Remove use of __secondary_hold_acknowledge.
o Change patch comment about zImage entry.
o Add comment about lv1_panic() to ps3_exit().
o Make room for bss section in otheros.bld.
arch/powerpc/boot/Makefile | 20 ++-- arch/powerpc/boot/ps3-head.S | 80 ++++++++++++++++ arch/powerpc/boot/ps3-hvcall.S | 184 +++++++++++++++++++++++++++++++++++++ arch/powerpc/boot/ps3.c | 161 ++++++++++++++++++++++++++++++++ arch/powerpc/boot/wrapper | 55 +++++++++++ arch/powerpc/boot/zImage.ps3.lds.S | 50 ++++++++++ arch/powerpc/platforms/ps3/mm.c | 2 7 files changed, 541 insertions(+), 11 deletions(-)
arch/powerpc/boot/Makefile +11 -9
@@ -46,7 +46,8 @@ src-wlib := string.S crt0.S stdio.c main gunzip_util.c elf_util.c $(zlib) devtree.c \ 44x.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \ - cuboot-ebony.c treeboot-ebony.c prpmc2800.c + cuboot-ebony.c treeboot-ebony.c prpmc2800.c \ + ps3-head.S ps3-hvcall.S ps3.c src-boot := $(src-wlib) $(src-plat) empty.c src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -75,11 +76,11 @@ $(addprefix $(obj)/,$(zliblinuxheader)): $(obj)/empty.c: @touch $@ -$(obj)/zImage.lds $(obj)/zImage.coff.lds: $(obj)/%: $(srctree)/$(src)/%.S +$(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds: $(obj)/%: $(srctree)/$(src)/%.S @cp $< $@ clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \ - empty.c zImage.coff.lds zImage.lds + empty.c zImage zImage.coff.lds zImage.ps3.lds zImage.lds quiet_cmd_bootcc = BOOTCC $@ cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $<
@@ -102,7 +103,7 @@ hostprogs-y := addnote addRamDisk hack-c targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ - $(obj)/zImage.lds $(obj)/zImage.coff.lds + $(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds wrapper :=$(srctree)/$(src)/wrapper wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
@@ -187,11 +188,12 @@ $(obj)/zImage.%: vmlinux $(wrapperbits) $(obj)/zImage.iseries: vmlinux $(STRIP) -s -R .comment $< -o $@ -$(obj)/zImage.ps3: vmlinux - $(STRIP) -s -R .comment $< -o $@ +$(obj)/zImage.ps3: vmlinux $(wrapper) $(wrapperbits) $(srctree)/$(src)/dts/ps3.dts + $(STRIP) -s -R .comment $< -o vmlinux.strip + $(call cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,) -$(obj)/zImage.initrd.ps3: vmlinux - @echo " WARNING zImage.initrd.ps3 not supported (yet)" +$(obj)/zImage.initrd.ps3: vmlinux $(wrapper) $(wrapperbits) $(srctree)/$(src)/dts/ps3.dts $(obj)/ramdisk.image.gz + $(call cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,$(obj)/ramdisk.image.gz) $(obj)/zImage.holly-elf: vmlinux $(wrapperbits) $(call if_changed,wrap,holly,$(obj)/dts/holly.dts,,)
@@ -230,7 +232,7 @@ install: $(CONFIGURE) $(addprefix $(obj) # anything not in $(targets) clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* \ - treeImage.* zImage.dts zImage.dts_initrd + treeImage.* zImage.dts zImage.dts_initrd otheros.bld # clean up files cached by wrapper clean-kernel := vmlinux.strip vmlinux.bin
arch/powerpc/boot/ps3-head.S new file +80 -0
80 lines not on this page · raw message
arch/powerpc/boot/ps3-hvcall.S new file +184 -0
184 lines not on this page · raw message
arch/powerpc/boot/ps3.c new file +161 -0
161 lines not on this page · raw message
arch/powerpc/boot/wrapper +55 -0
65 lines not on this page · raw message
arch/powerpc/boot/zImage.ps3.lds.S new file +50 -0
50 lines not on this page · raw message
arch/powerpc/platforms/ps3/mm.c +0 -2
@@ -1213,8 +1213,6 @@ void __init ps3_mm_init(void)BUG_ON (map.rm.base);BUG_ON (!map.rm.size); -lmb_add (map.rm.base, map.rm.size); -lmb_analyze ();/* arrange to do this in ps3_mm_add_memory */ ps3_mm_region_create (&map.r1, map.total - map.rm.size);
PATCH v4 1/1 PS3: Bootwrapper support.
Subject: PS3: Bootwrapper support.
Add support to build the PS3 flash rom image and remove some unneeded lmb calls.
The PS3's lv1 loader supports loading gzipped binary images from flash rom to addr zero. The loader enters the image at addr 0x100.
In this implementation a bootwrapper overlay is use to arrange for the kernel to be loaded to addr zero and to have a suitable bootwrapper entry at 0x100. To construct the rom image, 0x100 bytes from offset 0x100 in the kernel is copied to the bootwrapper symbol __system_reset_kernel. The 0x100 bytes at the bootwrapper symbol __system_reset_overlay is then copied to offset 0x100. At runtime the bootwrapper program copies the 0x100 bytes at __system_reset_kernel to addr 0x100.
zImage.ps3 is a wrapped image that contains a flat device tree, an lv1 compatible entry point, and an optional initrd. otheros.bld is the gzip compresed rom image built from zImage.ps3. otheros.bld is suitable for programming into the PS3 boot flash memory.
---
Hi Paul.
I rebased this to your latest for-2.6.23 branch. Please apply.
-Geoff
v4 changes:
o Rebase to for-2.6.23 branch of powerpc.git.
v3 changes:
o Add details about PS3 loader to patch description.
v2 changes:
o Make platform specific files build for all platforms.
o Remove use of __secondary_hold_acknowledge.
o Change patch comment about zImage entry.
o Add comment about lv1_panic() to ps3_exit().
o Make room for bss section in otheros.bld.
arch/powerpc/boot/Makefile | 21 ++-- arch/powerpc/boot/ps3-head.S | 80 ++++++++++++++++ arch/powerpc/boot/ps3-hvcall.S | 184 +++++++++++++++++++++++++++++++++++++ arch/powerpc/boot/ps3.c | 161 ++++++++++++++++++++++++++++++++ arch/powerpc/boot/wrapper | 55 +++++++++++ arch/powerpc/boot/zImage.ps3.lds.S | 50 ++++++++++ arch/powerpc/platforms/ps3/mm.c | 2 7 files changed, 542 insertions(+), 11 deletions(-)
arch/powerpc/boot/Makefile +12 -9
@@ -46,7 +46,8 @@ src-wlib := string.S crt0.S stdio.c main gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \ 44x.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \ - cuboot-ebony.c treeboot-ebony.c prpmc2800.c + cuboot-ebony.c treeboot-ebony.c prpmc2800.c \ + ps3-head.S ps3-hvcall.S ps3.c src-boot := $(src-wlib) $(src-plat) empty.c src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -75,11 +76,11 @@ $(addprefix $(obj)/,$(zliblinuxheader)): $(obj)/empty.c: @touch $@ -$(obj)/zImage.lds $(obj)/zImage.coff.lds: $(obj)/%: $(srctree)/$(src)/%.S +$(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds: $(obj)/%: $(srctree)/$(src)/%.S @cp $< $@ clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \ - empty.c zImage.coff.lds zImage.lds + empty.c zImage zImage.coff.lds zImage.ps3.lds zImage.lds quiet_cmd_bootcc = BOOTCC $@ cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $<
@@ -102,7 +103,7 @@ hostprogs-y := addnote addRamDisk hack-c targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ - $(obj)/zImage.lds $(obj)/zImage.coff.lds + $(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds wrapper :=$(srctree)/$(src)/wrapper wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
@@ -179,11 +180,12 @@ $(obj)/zImage.%: vmlinux $(wrapperbits) $(obj)/zImage.iseries: vmlinux $(STRIP) -s -R .comment $< -o $@ -$(obj)/zImage.ps3: vmlinux - $(STRIP) -s -R .comment $< -o $@ +$(obj)/zImage.ps3: vmlinux $(wrapper) $(wrapperbits) $(srctree)/$(src)/dts/ps3.dts + $(STRIP) -s -R .comment $< -o vmlinux.strip + $(call cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,) -$(obj)/zImage.initrd.ps3: vmlinux - @echo " WARNING zImage.initrd.ps3 not supported (yet)" +$(obj)/zImage.initrd.ps3: vmlinux $(wrapper) $(wrapperbits) $(srctree)/$(src)/dts/ps3.dts $(obj)/ramdisk.image.gz + $(call cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,$(obj)/ramdisk.image.gz) $(obj)/uImage: vmlinux $(wrapperbits) $(call if_changed,wrap,uboot)
@@ -206,7 +208,8 @@ install: $(CONFIGURE) $(addprefix $(obj) sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $< # anything not in $(targets) -clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* treeImage.* +clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* treeImage.* \ + otheros.bld # clean up files cached by wrapper clean-kernel := vmlinux.strip vmlinux.bin
arch/powerpc/boot/ps3-head.S new file +80 -0
80 lines not on this page · raw message
arch/powerpc/boot/ps3-hvcall.S new file +184 -0
184 lines not on this page · raw message
arch/powerpc/boot/ps3.c new file +161 -0
161 lines not on this page · raw message
arch/powerpc/boot/wrapper +55 -0
65 lines not on this page · raw message
arch/powerpc/boot/zImage.ps3.lds.S new file +50 -0
50 lines not on this page · raw message
arch/powerpc/platforms/ps3/mm.c +0 -2
@@ -1213,8 +1213,6 @@ void __init ps3_mm_init(void)BUG_ON (map.rm.base);BUG_ON (!map.rm.size); -lmb_add (map.rm.base, map.rm.size); -lmb_analyze ();/* arrange to do this in ps3_mm_add_memory */ ps3_mm_region_create (&map.r1, map.total - map.rm.size);
PATCH 31/33 PS3: Select MEMORY_HOTPLUG.
In reply to a message not in the archiveThe PS3 uses the kernel's hotplug memory support, so make sure it is always enabled when building for PS3.
--- arch/powerpc/platforms/ps3/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/powerpc/platforms/ps3/Kconfig +1 -0
@@ -7,6 +7,7 @@ config PPC_PS3 select USB_OHCI_BIG_ENDIAN_MMIO select USB_ARCH_HAS_EHCI select USB_EHCI_BIG_ENDIAN_MMIO + select MEMORY_HOTPLUG help This option enables support for the Sony PS3 game console and other platforms using the PS3 hypervisor.
PATCH 32/33 PS3: Fix more sparse warnings
In reply to a message not in the archiveFrom: Geert Uytterhoeven <[email protected]>
Fix some PS3 build warnings reported by `make C=1'.
--- arch/powerpc/platforms/ps3/mm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
arch/powerpc/platforms/ps3/mm.c +5 -5
@@ -239,7 +239,7 @@ void ps3_mm_vas_destroy(void)* @size is rounded down to a multiple of the vas large page size. */ -int ps3_mm_region_create (struct mem_region *r,unsigned long size) +static int ps3_mm_region_create (struct mem_region *r,unsigned long size) {int result;unsigned long muid;
@@ -280,7 +280,7 @@ zero_region:* @r: pointer to struct mem_region */ -void ps3_mm_region_destroy (struct mem_region *r) +static void ps3_mm_region_destroy (struct mem_region *r) {int result;
@@ -893,7 +893,7 @@ static int dma_ioc0_map_area(struct ps3_* This is the common dma unmap routine. */ -int dma_sb_unmap_area (struct ps3_dma_region *r,unsigned long bus_addr, +static int dma_sb_unmap_area (struct ps3_dma_region *r,unsigned long bus_addr,unsigned long len) {unsigned long flags;
@@ -929,8 +929,8 @@ int dma_sb_unmap_area(struct ps3_dma_regreturn 0 ; } -int dma_ioc0_unmap_area (struct ps3_dma_region *r,unsigned long bus_addr, -unsigned long len) +static int dma_ioc0_unmap_area (struct ps3_dma_region *r, +unsigned long bus_addr,unsigned long len) {unsigned long flags;struct dma_chunk *c;
PATCH 33/33 PS3: Update ps3_defconfig
In reply to a message not in the archiveUpdate ps3_defconfig.
--- arch/powerpc/configs/ps3_defconfig | 131 +++++++++++++++---------------------- 1 file changed, 55 insertions(+), 76 deletions(-)
arch/powerpc/configs/ps3_defconfig +55 -76
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.21 -# Fri May 11 10:16:27 2007 +# Linux kernel version: 2.6.22-rc4 +# Thu Jun 14 19:52:01 2007 # CONFIG_PPC64=y CONFIG_64BIT=y
@@ -87,7 +87,11 @@ CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y CONFIG_FUTEX=y +CONFIG_ANON_INODES=y CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y CONFIG_SHMEM=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_SLAB=y
@@ -152,7 +156,11 @@ CONFIG_PS3_HTAB_SIZE=20 CONFIG_PS3_USE_LPAR_ADDR=y CONFIG_PS3_VUART=y CONFIG_PS3_PS3AV=y -CONFIG_PS3_SYS_MANAGER=y +CONFIG_PS3_SYS_MANAGER=m +CONFIG_PS3_STORAGE=y +CONFIG_PS3_DISK=y +CONFIG_PS3_ROM=y +CONFIG_PS3_FLASH=y CONFIG_PPC_CELL=y # CONFIG_PPC_CELL_NATIVE is not set # CONFIG_PPC_IBM_CELL_BLADE is not set
@@ -301,20 +309,8 @@ CONFIG_IPV6_SIT=y # CONFIG_IPV6_MULTIPLE_TABLES is not set # CONFIG_NETWORK_SECMARK is not set # CONFIG_NETFILTER is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# # CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# # CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# # CONFIG_TIPC is not set # CONFIG_ATM is not set # CONFIG_BRIDGE is not set
@@ -343,7 +339,7 @@ CONFIG_BT=m CONFIG_BT_L2CAP=m CONFIG_BT_SCO=m CONFIG_BT_RFCOMM=m -# CONFIG_BT_RFCOMM_TTY is not set +CONFIG_BT_RFCOMM_TTY=y # CONFIG_BT_BNEP is not set CONFIG_BT_HIDP=m
@@ -352,7 +348,9 @@ CONFIG_BT_HIDP=m # CONFIG_BT_HCIUSB=m CONFIG_BT_HCIUSB_SCO=y -# CONFIG_BT_HCIUART is not set +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y # CONFIG_BT_HCIBCM203X is not set # CONFIG_BT_HCIBPA10X is not set # CONFIG_BT_HCIBFUSB is not set
@@ -418,10 +416,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 # Misc devices # # CONFIG_BLINK is not set - -# -# ATA/ATAPI/MFM/RLL support -# # CONFIG_IDE is not set #
@@ -447,7 +441,7 @@ CONFIG_CHR_DEV_SG=m # # Some SCSI devices (e.g. CD jukebox) support multiple LUNs # -# CONFIG_SCSI_MULTI_LUN is not set +CONFIG_SCSI_MULTI_LUN=y # CONFIG_SCSI_CONSTANTS is not set # CONFIG_SCSI_LOGGING is not set # CONFIG_SCSI_SCAN_ASYNC is not set
@@ -467,11 +461,6 @@ CONFIG_SCSI_WAIT_SCAN=m # # CONFIG_ISCSI_TCP is not set # CONFIG_SCSI_DEBUG is not set -# CONFIG_SCSI_ESP_CORE is not set - -# -# Serial ATA (prod) and Parallel ATA (experimental) drivers -# # CONFIG_ATA is not set #
@@ -490,27 +479,13 @@ CONFIG_NETDEVICES=y # CONFIG_TUN is not set # -# PHY device support -# - -# # Ethernet (10 or 100Mbit) # # CONFIG_NET_ETHERNET is not set CONFIG_MII=m - -# -# Ethernet (1000 Mbit) -# - -# -# Ethernet (10000 Mbit) -# -CONFIG_MLX4_DEBUG=y - -# -# Token Ring devices -# +CONFIG_NETDEV_1000=y +CONFIG_GELIC_NET=y +# CONFIG_NETDEV_10000 is not set # # Wireless LAN
@@ -536,10 +511,6 @@ CONFIG_USB_NET_MCS7830=m # CONFIG_USB_NET_RNDIS_HOST is not set # CONFIG_USB_NET_CDC_SUBSET is not set # CONFIG_USB_NET_ZAURUS is not set - -# -# Wan interfaces -# # CONFIG_WAN is not set # CONFIG_PPP is not set # CONFIG_SLIP is not set
@@ -563,6 +534,7 @@ CONFIG_USB_NET_MCS7830=m # CONFIG_INPUT=y # CONFIG_INPUT_FF_MEMLESS is not set +# CONFIG_INPUT_POLLDEV is not set # # Userland interfaces
@@ -581,7 +553,27 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # # CONFIG_INPUT_KEYBOARD is not set # CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set +CONFIG_INPUT_JOYSTICK=y +# CONFIG_JOYSTICK_ANALOG is not set +# CONFIG_JOYSTICK_A3D is not set +# CONFIG_JOYSTICK_ADI is not set +# CONFIG_JOYSTICK_COBRA is not set +# CONFIG_JOYSTICK_GF2K is not set +# CONFIG_JOYSTICK_GRIP is not set +# CONFIG_JOYSTICK_GRIP_MP is not set +# CONFIG_JOYSTICK_GUILLEMOT is not set +# CONFIG_JOYSTICK_INTERACT is not set +# CONFIG_JOYSTICK_SIDEWINDER is not set +# CONFIG_JOYSTICK_TMDC is not set +# CONFIG_JOYSTICK_IFORCE is not set +# CONFIG_JOYSTICK_WARRIOR is not set +# CONFIG_JOYSTICK_MAGELLAN is not set +# CONFIG_JOYSTICK_SPACEORB is not set +# CONFIG_JOYSTICK_SPACEBALL is not set +# CONFIG_JOYSTICK_STINGER is not set +# CONFIG_JOYSTICK_TWIDJOY is not set +# CONFIG_JOYSTICK_JOYDUMP is not set +# CONFIG_JOYSTICK_XPAD is not set # CONFIG_INPUT_TABLET is not set # CONFIG_INPUT_TOUCHSCREEN is not set # CONFIG_INPUT_MISC is not set
@@ -598,7 +590,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set +CONFIG_VT_HW_CONSOLE_BINDING=y # CONFIG_SERIAL_NONSTANDARD is not set #
@@ -652,12 +644,8 @@ CONFIG_GEN_RTC=y # Multimedia devices # # CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -# CONFIG_USB_DABUSB is not set +# CONFIG_DVB_CORE is not set +# CONFIG_DAB is not set # # Graphics support
@@ -672,13 +660,13 @@ CONFIG_GEN_RTC=y CONFIG_FB=y # CONFIG_FIRMWARE_EDID is not set # CONFIG_FB_DDC is not set -CONFIG_FB_CFB_FILLRECT=y -CONFIG_FB_CFB_COPYAREA=y -CONFIG_FB_CFB_IMAGEBLIT=y -# CONFIG_FB_SYS_FILLRECT is not set -# CONFIG_FB_SYS_COPYAREA is not set -# CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_SYS_FOPS is not set +# CONFIG_FB_CFB_FILLRECT is not set +# CONFIG_FB_CFB_COPYAREA is not set +# CONFIG_FB_CFB_IMAGEBLIT is not set +CONFIG_FB_SYS_FILLRECT=y +CONFIG_FB_SYS_COPYAREA=y +CONFIG_FB_SYS_IMAGEBLIT=y +CONFIG_FB_SYS_FOPS=y CONFIG_FB_DEFERRED_IO=y # CONFIG_FB_SVGALIB is not set # CONFIG_FB_MACMODES is not set
@@ -751,9 +739,10 @@ CONFIG_SND_VERBOSE_PROCFS=y # # CONFIG_SND_USB_AUDIO is not set # CONFIG_SND_USB_USX2Y is not set +# CONFIG_SND_USB_CAIAQ is not set # -# SoC audio support +# System on Chip audio support # # CONFIG_SND_SOC is not set
@@ -1098,7 +1087,6 @@ CONFIG_NLS_ISO8859_1=y # # CONFIG_DLM is not set # CONFIG_UCC_SLOW is not set -# CONFIG_UCC_FAST is not set # # Library routines
@@ -1125,7 +1113,7 @@ CONFIG_HAS_DMA=y # # CONFIG_PRINTK_TIME is not set CONFIG_ENABLE_MUST_CHECK=y -# CONFIG_MAGIC_SYSRQ is not set +CONFIG_MAGIC_SYSRQ=y # CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_FS is not set # CONFIG_HEADERS_CHECK is not set
@@ -1155,16 +1143,7 @@ CONFIG_DEBUG_STACKOVERFLOW=y # CONFIG_DEBUGGER is not set CONFIG_IRQSTACKS=y # CONFIG_BOOTX_TEXT is not set -CONFIG_PPC_EARLY_DEBUG=y -# CONFIG_PPC_EARLY_DEBUG_LPAR is not set -# CONFIG_PPC_EARLY_DEBUG_G5 is not set -# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set -# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set -# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set -# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set -# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set -# CONFIG_PPC_EARLY_DEBUG_BEAT is not set -# CONFIG_PPC_EARLY_DEBUG_44x is not set +# CONFIG_PPC_EARLY_DEBUG is not set # # Security options