Changeset 39cb79a in mainline for genarch


Ignore:
Timestamp:
2005-10-29T13:37:52Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2cd0485d
Parents:
b9b103d3
Message:

sparc64 work.
Link kernel with load address 0x4000.
Add fragment of Linux image header to force SILO to always load the kernel at 0x4000.
Adjust ofw.h and ofw.c to work also on sparc64.

Location:
genarch
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • genarch/include/firmware/ofw/ofw.h

    rb9b103d3 r39cb79a  
    3434#define MAX_OFW_ARGS    10
    3535
    36 typedef __u32 ofw_arg_t;
    37 typedef __u32 ihandle;
    38 typedef __u32 phandle;
     36typedef __native ofw_arg_t;
     37typedef int ihandle;
     38typedef int phandle;
    3939
    4040/** OpenFirmware command structure
     
    4343typedef struct {
    4444        const char *service;          /**< Command name */
    45         __u32 nargs;                  /**< Number of in arguments */
    46         __u32 nret;                   /**< Number of out arguments */
     45        __native nargs;               /**< Number of in arguments */
     46        __native nret;                /**< Number of out arguments */
    4747        ofw_arg_t args[MAX_OFW_ARGS]; /**< List of arguments */
    4848} ofw_args_t;
     
    5454extern void ofw_init(void);
    5555extern void ofw_done(void);
    56 extern __address ofw_call(const char *service, const int nargs, const int nret, ...);
     56extern __native ofw_call(const char *service, const int nargs, const int nret, ...);
    5757extern void ofw_putchar(const char ch);
    5858extern phandle ofw_find_device(const char *name);
  • genarch/src/firmware/ofw/ofw.c

    rb9b103d3 r39cb79a  
    5050void ofw_done(void)
    5151{
    52         ofw_call("exit", 0, 0);
     52        (void) ofw_call("exit", 0, 0);
    5353        cpu_halt();
    5454}
    5555
    56 __address ofw_call(const char *service, const int nargs, const int nret, ...)
     56__native ofw_call(const char *service, const int nargs, const int nret, ...)
    5757{
    5858        va_list list;
     
    8282                return;
    8383       
    84         ofw_call("write", 3, 1, ofw_stdout, &ch, 1);
     84        (void) ofw_call("write", 3, 1, ofw_stdout, &ch, 1);
    8585}
    8686
    8787phandle ofw_find_device(const char *name)
    8888{
    89         return ofw_call("finddevice", 1, 1, name);
     89        return (phandle) ofw_call("finddevice", 1, 1, name);
    9090}
    9191
    9292int ofw_get_property(const phandle device, const char *name, void *buf, const int buflen)
    9393{
    94         return ofw_call("getprop", 4, 1, device, name, buf, buflen);
     94        return (int) ofw_call("getprop", 4, 1, device, name, buf, buflen);
    9595}
    9696
Note: See TracChangeset for help on using the changeset viewer.