linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* apparent error in micropatch.c
@ 2004-09-17 23:23 Robert P. J. Day
  0 siblings, 0 replies; only message in thread
From: Robert P. J. Day @ 2004-09-17 23:23 UTC (permalink / raw)
  To: Linuxppc-dev mailing list


   i *believe* there's an error in arch/ppc/8xx_io/micropatch.c 
regarding how the SMC patch is applied.

   in the latest bk pull of that file, line 186:

#ifdef USE_SMC_PATCH
#define PATCH_DEFINED
/* SMC2/IIC/SPI Patch */
/* This is the area from 0x2000 to 0x23ff.
*/
uint patch_2000[] = {
         0x3fff0000,
         0x3ffd0000,
         0x3ffb0000,
         ... etc ...

actually, that patch is not 1024 bytes long, but 1280 bytes, which 
means it goes to 0x24ff, not 0x23ff.  this certainly seems like it's 
going to cause problems further down, when that same file defines a 
relocation base for a couple structures starting at 0x2400:


#if defined(USE_SMC_PATCH) || defined(USE_IIC_PATCH)

         iip = (iic_t *)&commproc->cp_dparam[PROFF_IIC];
#define RPBASE 0x0400    <--  ???????
         iip->iic_rpbase = RPBASE;

         /* Put SPI above the IIC, also 32-byte aligned.
         */
         i = (RPBASE + sizeof(iic_t) + 31) & ~31;
         spp = (spi_t *)&commproc->cp_dparam[PROFF_SPI];
         spp->spi_rpbase = i;


i'm pretty sure that trying to relocate the iic_t struct to that 
offset is going to clash badly with the tail end of the patch, no?
perhaps RPBASE could be set to 0x0500 to avoid this?

or am i misreading something?

rday

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-09-17 23:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-17 23:23 apparent error in micropatch.c Robert P. J. Day

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).