summaryrefslogtreecommitdiffstats
path: root/stand/powerpc
diff options
context:
space:
mode:
authorkevans <kevans@FreeBSD.org>2018-04-06 21:37:25 +0000
committerkevans <kevans@FreeBSD.org>2018-04-06 21:37:25 +0000
commit883f323de4b8a7c082d104c900d77da04fb6869c (patch)
tree8883a8e2e75a488b83da075775f097a0edb434a1 /stand/powerpc
parent8b6d58da477582eaf6b2510f34d30b581ad2b6b5 (diff)
downloadFreeBSD-src-883f323de4b8a7c082d104c900d77da04fb6869c.zip
FreeBSD-src-883f323de4b8a7c082d104c900d77da04fb6869c.tar.gz
MFC r330806-r330815, r330837, r330864, r330883
pc98 changes associated with the named commits are also included in this commit, despite not having been made with the original commits due to its removal in head. r330806: Minor cosmetic changes. Make sure { on the same line as struct for all struct *devdesc. Move some type definitions to next to the dv_type define, since that's what sets the d_type. r330807: We can't use d_opendata for blkio storage. open_disk uses d_opendata for it's own purpse. We can't store blkio there. Fortunately, blkio is stored elsewhere and we never actually retrieve blkio from d_opendata. Eliminate it as a source of confusion. Eliminate all stores of d_opendata in efi since this layer doesn't own that field. r330808: Make struct libi386_devdesc match the struct devdesc better Move data to top and call it d_opendata. r330809: Use the actual struct devdesc at the start of all *_devdesc structs The current system is fragile and requires very careful layout of all *_devdesc structures. It also makes it hard to change the base devdesc. Take a page from CAM and put the 'header' in all the derived classes and adjust the code to match. For OFW, move the iHandle h_handle out of a slot conflicting with d_opendata. Due to quirks in the alignment rules, this worked. However changing the code to use d_opendata storage now that it's a pointer is hard, so just have a separate field for it. All other cleanups were to make the *_devdesc structures match where they'd taken some liberties that were none-the-less compatible enough to work. r330810: Remove d_type from devdesc. It's not needed as we can fetch it from d_dev->dv_type when we need it. r330811: GC unused routines. Sponsored by: Netflix r330812: Use the one-line-per-file pattern here, and sort the file names. Sponsored by: Netflix r330813: Move the env convenience routines out of boot1.c. These routines are more generally useful. Even though boot1 is on its way out, it's better to make these common during the transition than copy them. r330814: Star BootCurrent entry when booting. Sponsored by: Netflix r330815: Print the load and device path as well as BootCurrent and BootOrder Sponsored by: Netflix r330837: biosdisk.c should not set d_opendata. Same as 330807, d_opendata is owned by open_disk and we should not set it. M stand/i386/libi386/biosdisk.c r330864: Prefer uintXX_t to u_intXX_t A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines. With consistency a great soul has simply nothing to do. -- Ralph Waldo Emerson r330883: Fix typo that misteriously passes compilation.
Diffstat (limited to 'stand/powerpc')
-rw-r--r--stand/powerpc/boot1.chrp/boot1.c12
-rw-r--r--stand/powerpc/kboot/ppc64_elf_freebsd.c2
-rw-r--r--stand/powerpc/ofw/elf_freebsd.c2
-rw-r--r--stand/powerpc/ofw/main.c4
-rw-r--r--stand/powerpc/ofw/ppc64_elf_freebsd.c2
5 files changed, 11 insertions, 11 deletions
diff --git a/stand/powerpc/boot1.chrp/boot1.c b/stand/powerpc/boot1.chrp/boot1.c
index e73186a..5e54c95 100644
--- a/stand/powerpc/boot1.chrp/boot1.c
+++ b/stand/powerpc/boot1.chrp/boot1.c
@@ -54,7 +54,7 @@ int main(int ac, char **av);
static void exit(int) __dead2;
static void load(const char *);
-static int dskread(void *, u_int64_t, int);
+static int dskread(void *, uint64_t, int);
static void usage(void);
@@ -79,8 +79,8 @@ static char *__ultoa(char *buf, u_long val, int base);
/*
* Open Firmware interface functions
*/
-typedef u_int32_t ofwcell_t;
-typedef u_int32_t u_ofwh_t;
+typedef uint32_t ofwcell_t;
+typedef uint32_t u_ofwh_t;
typedef int (*ofwfp_t)(void *);
ofwfp_t ofw; /* the prom Open Firmware entry */
ofwh_t chosenh;
@@ -94,7 +94,7 @@ static int ofw_setprop(ofwh_t, const char *, void *, size_t);
static int ofw_read(ofwh_t, void *, size_t);
static int ofw_write(ofwh_t, const void *, size_t);
static int ofw_claim(void *virt, size_t len, u_int align);
-static int ofw_seek(ofwh_t, u_int64_t);
+static int ofw_seek(ofwh_t, uint64_t);
static void ofw_exit(void) __dead2;
ofwh_t bootdevh;
@@ -322,7 +322,7 @@ ofw_write(ofwh_t devh, const void *buf, size_t len)
}
static int
-ofw_seek(ofwh_t devh, u_int64_t off)
+ofw_seek(ofwh_t devh, uint64_t off)
{
ofwcell_t args[] = {
(ofwcell_t)"seek",
@@ -541,7 +541,7 @@ load(const char *fname)
}
static int
-dskread(void *buf, u_int64_t lba, int nblk)
+dskread(void *buf, uint64_t lba, int nblk)
{
/*
* The Open Firmware should open the correct partition for us.
diff --git a/stand/powerpc/kboot/ppc64_elf_freebsd.c b/stand/powerpc/kboot/ppc64_elf_freebsd.c
index 9547077..adbdc7f 100644
--- a/stand/powerpc/kboot/ppc64_elf_freebsd.c
+++ b/stand/powerpc/kboot/ppc64_elf_freebsd.c
@@ -57,7 +57,7 @@ struct trampoline_data {
vm_offset_t md_load64(char *args, vm_offset_t *modulep, vm_offset_t *dtb);
int
-ppc64_elf_loadfile(char *filename, u_int64_t dest,
+ppc64_elf_loadfile(char *filename, uint64_t dest,
struct preloaded_file **result)
{
int r;
diff --git a/stand/powerpc/ofw/elf_freebsd.c b/stand/powerpc/ofw/elf_freebsd.c
index 78bebf4..7693306 100644
--- a/stand/powerpc/ofw/elf_freebsd.c
+++ b/stand/powerpc/ofw/elf_freebsd.c
@@ -46,7 +46,7 @@ extern char end[];
extern vm_offset_t reloc; /* From <arch>/conf.c */
int
-__elfN(ofw_loadfile)(char *filename, u_int64_t dest,
+__elfN(ofw_loadfile)(char *filename, uint64_t dest,
struct preloaded_file **result)
{
int r;
diff --git a/stand/powerpc/ofw/main.c b/stand/powerpc/ofw/main.c
index d3ada31..785c61b 100644
--- a/stand/powerpc/ofw/main.c
+++ b/stand/powerpc/ofw/main.c
@@ -40,7 +40,7 @@ struct arch_switch archsw; /* MI/MD interface boundary */
extern char end[];
extern char bootprog_info[];
-u_int32_t acells, scells;
+uint32_t acells, scells;
static char bootargs[128];
@@ -73,7 +73,7 @@ memsize(void)
phandle_t memoryp;
cell_t reg[24];
int i, sz;
- u_int64_t memsz;
+ uint64_t memsz;
memsz = 0;
memoryp = OF_instance_to_package(memory);
diff --git a/stand/powerpc/ofw/ppc64_elf_freebsd.c b/stand/powerpc/ofw/ppc64_elf_freebsd.c
index 6d85029..96efb16 100644
--- a/stand/powerpc/ofw/ppc64_elf_freebsd.c
+++ b/stand/powerpc/ofw/ppc64_elf_freebsd.c
@@ -46,7 +46,7 @@ extern char end[];
extern vm_offset_t reloc; /* From <arch>/conf.c */
int
-ppc64_ofw_elf_loadfile(char *filename, u_int64_t dest,
+ppc64_ofw_elf_loadfile(char *filename, uint64_t dest,
struct preloaded_file **result)
{
int r;
OpenPOWER on IntegriCloud