Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Dec 2002 12:19:31 -0800 (PST)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 21926 for review
Message-ID:  <200212042019.gB4KJVaM084701@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=21926

Change 21926 by marcel@marcel_nfs on 2002/12/04 12:19:17

	Revert the non-sensible name change from rsdt to sdt in
	the previous commit(s).
	We are dealing with the root SDT, so rsdt is a good name.
	The fact that there's an extended root SDT is irrelevent.
	
	Suggested by: takawata, jhb

Affected files ...

.. //depot/projects/ia64/usr.sbin/acpi/acpidump/acpi.c#5 edit
.. //depot/projects/ia64/usr.sbin/acpi/acpidump/acpidump.c#6 edit

Differences ...

==== //depot/projects/ia64/usr.sbin/acpi/acpidump/acpi.c#5 (text+ko) ====

@@ -328,20 +328,20 @@
 }
 
 void
-acpi_handle_sdt(struct ACPIsdt *sdp)
+acpi_handle_rsdt(struct ACPIsdt *rsdp)
 {
-	struct	ACPIsdt *sdp_child;
+	struct	ACPIsdt *sdp;
 	char *p, *end;
 
-	acpi_print_sdt(sdp);
+	acpi_print_sdt(rsdp);
 	printf(BEGIN_COMMENT);
 	printf("\tEntries={ ");
-	p = (void*)sdp->body;
-	end = p + (sdp->len - SIZEOF_SDT_HDR);
+	p = (void*)rsdp->body;
+	end = p + (rsdp->len - SIZEOF_SDT_HDR);
 	while (p < end) {
-		if (p != (void*)sdp->body)
+		if (p != (void*)rsdp->body)
 			printf(", ");
-		if (sdp->signature[0] == 'X') {
+		if (rsdp->signature[0] == 'X') {
 			printf("0x%016x", *((u_int64_t*)p));
 			p += sizeof(u_int64_t);
 		} else {
@@ -352,23 +352,23 @@
 	printf(" }\n");
 	printf(END_COMMENT);
 
-	p = (void*)sdp->body;
+	p = (void*)rsdp->body;
 	while (p < end) {
-		if (sdp->signature[0] == 'X') {
-			sdp_child = acpi_map_sdt(*((u_int64_t*)p));
+		if (rsdp->signature[0] == 'X') {
+			sdp = acpi_map_sdt(*((u_int64_t*)p));
 			p += sizeof(u_int64_t);
 		} else {
-			sdp_child = acpi_map_sdt(*((u_int32_t*)p));
+			sdp = acpi_map_sdt(*((u_int32_t*)p));
 			p += sizeof(u_int32_t);
 		}
 
-		if (acpi_checksum(sdp_child, sdp_child->len))
-			errx(1, "SDT at %p is corrupt\n", sdp_child);
-		if (!memcmp(sdp_child->signature, "FACP", 4)) {
-			acpi_handle_facp((struct FACPbody *)sdp_child->body,
-			    (sdp->signature[0] == 'X') ? 1 : 0);
+		if (acpi_checksum(sdp, sdp->len))
+			errx(1, "SDT at %p is corrupt\n", sdp);
+		if (!memcmp(sdp->signature, "FACP", 4)) {
+			acpi_handle_facp((struct FACPbody *)sdp->body,
+			    (rsdp->signature[0] == 'X') ? 1 : 0);
 		} else
-			acpi_print_sdt(sdp_child);
+			acpi_print_sdt(sdp);
 	}
 }
 

==== //depot/projects/ia64/usr.sbin/acpi/acpidump/acpidump.c#6 (text+ko) ====

@@ -86,25 +86,23 @@
 asl_dump_from_devmem()
 {
 	struct	ACPIrsdp *rp;
-	struct	ACPIsdt *sdp;
-	vm_offset_t sdt_addr;
+	struct	ACPIsdt *rsdp;
 
 	rp = acpi_find_rsd_ptr(xaddr);
 	if (!rp)
 		errx(1, "Can't find ACPI information\n");
 
 	acpi_print_rsd_ptr(rp);
-	sdt_addr = (rp->xsdt != 0) ? rp->xsdt : rp->rsdt;
-	sdp = (struct ACPIsdt*) acpi_map_sdt(sdt_addr);
-	if (memcmp(sdp->signature, "RSDT", 4) != 0 &&
-	    memcmp(sdp->signature, "XSDT", 4) != 0) {
-		hd(sdp, 256);
-		errx(1, "SDT is not a RSDT nor a XSDT\n");
+	rsdp = acpi_map_sdt((rp->xsdt != 0) ? rp->xsdt : rp->rsdt);
+	if (memcmp(rsdp->signature, "RSDT", 4) != 0 &&
+	    memcmp(rsdp->signature, "XSDT", 4) != 0) {
+		hd(rsdp, 256);
+		errx(1, "Root SDT is not a RSDT nor a XSDT\n");
 	}
-	if (acpi_checksum(sdp, sdp->len))
+	if (acpi_checksum(rsdp, rsdp->len))
 		errx(1, "RSDT/XSDT checksum corrupted\n");
 
-	acpi_handle_sdt(sdp);
+	acpi_handle_rsdt(rsdp);
 }
 
 static void

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212042019.gB4KJVaM084701>