-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Russell King
authored and
Russell King
committed
Jun 30, 2005
1 parent
f174ac1
commit 417b820
Showing
76 changed files
with
3,578 additions
and
582 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: bd53d1270f51c6cfb53b06c8f93fd42327871d6b | ||
refs/heads/master: 44454bcdb90532b372c74e3546043d8a3a468939 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright (C) Cort Dougan 1999. | ||
* | ||
* 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; either version | ||
* 2 of the License, or (at your option) any later version. | ||
* | ||
* Generate a note section as per the CHRP specification. | ||
* | ||
*/ | ||
|
||
#include <stdio.h> | ||
|
||
#define PL(x) printf("%c%c%c%c", ((x)>>24)&0xff, ((x)>>16)&0xff, ((x)>>8)&0xff, (x)&0xff ); | ||
|
||
int main(void) | ||
{ | ||
/* header */ | ||
/* namesz */ | ||
PL(strlen("PowerPC")+1); | ||
/* descrsz */ | ||
PL(6*4); | ||
/* type */ | ||
PL(0x1275); | ||
/* name */ | ||
printf("PowerPC"); printf("%c", 0); | ||
|
||
/* descriptor */ | ||
/* real-mode */ | ||
PL(0xffffffff); | ||
/* real-base */ | ||
PL(0x00c00000); | ||
/* real-size */ | ||
PL(0xffffffff); | ||
/* virt-base */ | ||
PL(0xffffffff); | ||
/* virt-size */ | ||
PL(0xffffffff); | ||
/* load-base */ | ||
PL(0x4000); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/* | ||
* Copyright 2001 IBM 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; either version | ||
* 2 of the License, or (at your option) any later version. | ||
*/ | ||
#include <stdio.h> | ||
#include <unistd.h> | ||
#include <string.h> | ||
|
||
extern long ce_exec_config[]; | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
int i, cnt, pos, len; | ||
unsigned int cksum, val; | ||
unsigned char *lp; | ||
unsigned char buf[8192]; | ||
char *varname; | ||
if (argc != 2) | ||
{ | ||
fprintf(stderr, "usage: %s name <in-file >out-file\n", | ||
argv[0]); | ||
exit(1); | ||
} | ||
|
||
varname = strrchr(argv[1], '/'); | ||
if (varname) | ||
varname++; | ||
else | ||
varname = argv[1]; | ||
|
||
fprintf(stdout, "#\n"); | ||
fprintf(stdout, "# Miscellaneous data structures:\n"); | ||
fprintf(stdout, "# WARNING - this file is automatically generated!\n"); | ||
fprintf(stdout, "#\n"); | ||
fprintf(stdout, "\n"); | ||
fprintf(stdout, "\t.data\n"); | ||
fprintf(stdout, "\t.globl %s_data\n", varname); | ||
fprintf(stdout, "%s_data:\n", varname); | ||
pos = 0; | ||
cksum = 0; | ||
while ((len = read(0, buf, sizeof(buf))) > 0) | ||
{ | ||
cnt = 0; | ||
lp = (unsigned char *)buf; | ||
len = (len + 3) & ~3; /* Round up to longwords */ | ||
for (i = 0; i < len; i += 4) | ||
{ | ||
if (cnt == 0) | ||
{ | ||
fprintf(stdout, "\t.long\t"); | ||
} | ||
fprintf(stdout, "0x%02X%02X%02X%02X", lp[0], lp[1], lp[2], lp[3]); | ||
val = *(unsigned long *)lp; | ||
cksum ^= val; | ||
lp += 4; | ||
if (++cnt == 4) | ||
{ | ||
cnt = 0; | ||
fprintf(stdout, " # %x \n", pos+i-12); | ||
fflush(stdout); | ||
} else | ||
{ | ||
fprintf(stdout, ","); | ||
} | ||
} | ||
if (cnt) | ||
{ | ||
fprintf(stdout, "0\n"); | ||
} | ||
pos += len; | ||
} | ||
fprintf(stdout, "\t.globl %s_len\n", varname); | ||
fprintf(stdout, "%s_len:\t.long\t0x%x\n", varname, pos); | ||
fflush(stdout); | ||
fclose(stdout); | ||
fprintf(stderr, "cksum = %x\n", cksum); | ||
exit(0); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.